is

Scott L. Burson: Comparison: FSet vs. Sycamore

[BULLETIN: Quicklisp now has the latest version of FSet.]

Sycamore, primarily by Neil Dantam, is a functional collections library that is built around the same weight-balanced binary tree data structure (with leaf vectors) that FSet uses.  While the README on that page comments briefly on the differences between Sycamore and FSet, I don't feel that it does FSet justice.  Here is my analysis.

Dantam claims that his library is 30% to 50% faster than FSet on common operations.  While I haven't done comprehensive micro-benchmarking, a couple of quick tests indicates that this claim is plausible.  A look through the internals of the implementation confirms that it is clean and tight, and I must commend him.  There may be some techniques in here that I could usefully borrow.

Most of the performance difference is necessitated by two design choices that were made differently in the two libraries.  One of these Dantam mentions in his comparison: FSet's use of a single, global ordering relation implemented as a CLOS generic function, vs. Sycamore's more standard choice of requiring a comparison function to be supplied when a collection is created.  The other one he doesn't mention: the fact that FSet supports a notion of equivalent-but-unequal values, which are values that are incomparable — there's no way, or at least no obvious way, to say which is less than the other, and yet we want to treat them as unequal.  The simplest example is the integer 1 and the single-float 1.0, which have equal numerical values (and cl:= returns true on them), but which are nonetheless not eql.  (I have a previous blog post that goes into a lot more detail about equality and comparison.)  Since Sycamore expects the user-supplied comparison function to return an integer that is negative, zero, or positive to indicate the ordering of its arguments, there's no encoding for the equivalent-but-unequal case, nor is there any of the code that would be required to handle that case.

Both of these decisions were driven by my goal for the FSet project.  I didn't just want to provide a functional collections library that could be called occasionally when one had a specific need for such a data structure.  My ambition was much grander: to make functional collections into a reasonable default choice for the vast majority of programming situations.  I wanted FSet users (including, of course, myself) to be able to use functional collections freely, with very little extra effort or thought.  While Lisp by itself reaches a little bit in this direction — lists can certainly be used functionally — lists used as functional collections run into severe time complexity problems as those collections get large.  I wanted the FSet collections to be as convenient and well-supported as lists, but without the time complexity issues.

— Or rather, I wanted them to be even more convenient than lists.  Before writing FSet, I had spent years working in a little-known proprietary language called Refine, which happened to be implemented on top of Common Lisp, so it was not unusual to switch between the two languages.  And I had noticed something.  In contrast to CL, with its several different predefined equality predicates and with its functions that take :test arguments to specify which one to use, Refine has a single notiion of equality.  The value space is cleanly divided between immutable types, which are compared by value — along with numbers, these include strings, sets, maps, and seqs — and mutable objects, which are always compared by identity.  And it worked!  I found I did not miss the ability to specify an equality predicate when performing an operation such as "union".  It was just never needed.  Get equality right at the language level, and the problem goes away.

Although FSet's compare generic function isn't just for equality — it also defines an ordering that is used by the binary trees — I thought it would probably turn out to be the case that a single global ordering, implemented as a generic function and therefore extensible, would be fine the vast majority of the time.  I think experience has borne this out.  And just as you can mix types in Lisp lists — say, numbers and symbols — without further thought, so you can have any combination of types in an FSet set, effortlessly.  (A project I'm currently working on actually takes considerable advantage of this capability.)

As for supporting equivalent-but-unequal values, this desideratum flows directly from the principle of least astonishment.  While it might not be too surprising for a set or map implementation to fail distinguish the integer 1 from the float 1.0, it certainly would be very surprising, and almost certainly a source of bugs in a compiler that used it, for it to fail to distinguish two uninterned symbols with the same name.  (I saw a macro expansion recently that contained two distinct symbols that both printed as #:NEW.  It happens.)  A compiler using Sycamore for a map on symbols would have to supply a comparison function that accounted for this; it couldn't just compare the package name and symbol name.  (You'd have to do something like keep a weak hash table mapping symbols to integers, assigned in the order in which the comparison function encountered them.  It's doable, but FSet protects you from this madness.)

Along with those deep semantic design choices, I've spent a lot of time on developing a wide and featureful API for FSet (an effort that's ongoing).  FSet has many features that Sycamore lacks, including:

  • seqs, a binary-tree sequence implementation that holds arbitrary Lisp objects (Sycamore ropes hold only characters, which is certainly an important special case, but why restrict ourselves?)
  • default values for maps and seqs (the value to return when the key is outside the domain is associated with the collection, not supplied at the call site; this turns out to be a significant convenience)
  • generic functions that operate on both lists and FSet collections, to shadow the CL builtins
  • the powerful map-union and map-intersection operations (I'll blog about these in the future)
  • more ways to iterate over the collections (the FSet tutorial has a good summary, about 3/4 of the way down)
  • speaking of the tutorial, FSet has lots more documentation

Let me digress slightly to give an example of how FSet makes programming more elegant and convenient.  Joe Marshall just put up a blog post comparing Go(lang) with Common Lisp, which is worth a read on its own; I'm just going to grab a code snippet from there to show a little bit of what programming with FSet is like.  Here's Joe's code:

 (defun collate (items &key (key #'identity) (test #'eql) (merger (merge-adjoin #'eql)) (default nil))
   (let ((table (make-hash-table :test test)))
     (dolist (item items table)
       (let ((k (funcall key item)))
         (setf (gethash k table) (funcall merger (gethash k table default) item))))))

 (defun merge-adjoin (test)
   (lambda (collection item)
     (adjoin item collection :test test)))

And here's what I would write using FSet:

 (defun collate (items &key (key #'identity))
   (let ((result (map :default (set))))
     (dolist (item items result)
       (includef (@ result (funcall key item)) item))))

(Well, I would probably move result outside the dolist form to make it clearer what the return value is, but let's go with Joe's stylistic choice here.)

For those who haven't used FSet: the form (map :default (set)) creates a map whose default is the empty set, meaning that lookups on that map will return the empty set if the key is not in the map.  This saves the includef form from having to handle that possibility.

My version makes assumptions, it's true, about how you want to collect the items with a given key; it doesn't give you other choices.  It could, but what would be the point?  It's already using a general set with better time complexity than lists, and saving you from having to write anything like merge-adjoin.  The extensible global equivalence relation means you're not going to need to supply a :test either.

I think the FSet-enhanced code is cleaner, more elegant, and therefore clearer than the plain-CL version.  Don't you agree?  Maybe you wouldn't say it's a huge improvement, okay, but it's a small example; in a larger codebase, I would argue, these small improvements add up.

* * * * *

To summarize: if you just want a library you can call in a few places for specific purposes, Sycamore might work better for you (but think hard if you're writing a comparator for symbols).  FSet can certainly be used that way, but it can be much more.  If you want to see one way in which Common Lisp can be made into a better language, without giving up anything that we love about it, I urge you to give FSet a try.

FSet has changed the way I write Lisp programs.  — an FSet user

(UPDATE: the magnitude of the performance difference between FSet and Sycamore surprised me, and inspired me to do some profiling of FSet.  It turned out that I could get a 20% speedup on one micro-benchmark simply by adding some inline declarations.  Mea culpa, mea culpa, mea maxima culpa; I should have done this years ago.   With that change, the generic function overhead appears to be the only significant cause of the remaining ~20% performance difference.  I tried creating a Sycamore set using a thin wrapper around fset:compare, and the resulting performance was very similar to that of FSet with its new inlines.)




is

vindarel: Running my 4th Common Lisp script in production© - you can do it too

Last week I finished a new service written in Common Lisp. It now runs in production© every mornings, and it expands the set of services I offer to clients.

It’s the 4th service of this kind that I developed: - they are not big - but have to be done nonetheless, and the quicker the better (they each amount to 1k to 2k lines of Lisp code), - they are not part of a super advanced domain that requires Common Lisp superpowers - I am the one who benefits from CL during development, - I could have written them in Python - and conversely nothing prevented me from writing them in Common Lisp.

So here lies the goal of this post: illustrate that you don’t need to need a super difficult problem to use Common Lisp. This has been asked many times, directly to me or on social media :)

At the same time, I want to encourage you to write a little something about how you use Common Lisp in the real world. Sharing creates emulation. Do it! If you don’t have a blog you can simply write in a new GitHub repository or in a Gist and come share on /r/lisp. We don’t care. Thanks <3

We’ll briefly see what my scripts do, what libraries I use, how I deploy them, what I did along the way.

Needless to say that I dogfooded my CIEL (beta) meta-library and scripting tool for all those projects.

Table of Contents

Scripts n°4 and 2 - shaping and sending data - when you can write Lisp on the side

My latest script needs to read data from a DB, format what’s necessary according to specifications, and send the result by SFTP.

In this case I read a DB that I own, created by a software that I develop and host. So I could have developed this script in the software itself, right? I could have, but I would have been tied to the main project’s versioning scheme, quirks, and deployment. I rather had to write this script on the side. And since it can be done on the side, it can be done in Common Lisp.

I have to extract products and their data (price, VAT...), aggregate the numbers for each day, write this to a file, according to a specification.

To read the DB, I used cl-dbi. I didn’t format the SQL with SxQL this time like in my web apps (where I use the Mito light ORM), but I wrote SQL directly. I’m spoiled by the Django ORM (which has its idiosyncrasies and shortcomings), so I double checked the different kinds of JOINs and all went well.

I had to group rows by some properties, so it was a great time to use serapeum:assort. I left you an example here: https://dev.to/vindarel/common-lisps-group-by-is-serapeumassort-32ma

Dates have to be handled in different formats. I used local-time of course, and I still greatly appreciate its lispy formatter syntax:

(defun date-yymmddhhnnss (&optional date stream)
  (local-time:format-timestring stream
                                (or date (local-time:now))
                                :format
                                '((:year 4)
                                  (:month 2)
                                  (:day 2)
                                  (:hour 2)
                                  (:min 2)
                                  (:sec 2)
                                  )))

the 2 in (:month 2) is to ensure the month is written with 2 digits.

Once the file is written, I have to send it to a SFTP server, with the client’s codes.

I wrote a profile class to encapsulate the client’s data as well as some functions to read the credentials from either environment variables, the file system, or a lisp variable. I had a top-level profile object for ease of testing, but I made sure that my functions formatting or sending data required a profile parameter.

(defun send-stock (profile &key date) ...)
(defun write-stock (profile filename) ...)

Still nothing surprising, but it’s tempting to only use global parameters for a one-off script. Except the program grows and you pay the mess later.

SFTP

To send the result through SFTP, I had to make a choice. The SFTP command line doesn’t make it possible to give a password as argument (or via an environment variable, etc). So I use lftp (in Debian repositories) that allows to do that. In the end, we format a command like this:

lftp sftp://user:****@host  -e "CD I/; put local-file.name; bye"

You can format the command string and run it with uiop:run-program: no problem, but I took the opportunity to release another utility:

First, you create a profile object. This one-liner reads the credentials from a lispy file:

(defvar profile (make-profile-from-plist (uiop:read-file-form "CREDS.lisp-expr"))

then you define the commands you’ll want to run:

(defvar command (put :cd "I/" :local-filename "data.csv"))
;; #<PUT cd: "I/", filename: "data.csv" {1007153883}>

and finally you call the run method on a profile and a command. Tada.

Deploying

Build a binary the classic way (it’s all on the Cookbook), send it to your server, run it.

(during a testing phase I have deployed “as a script”, from sources, which is a bit quicker to pull changes and try again on the server)

Set up a CRON job.

No Python virtual env to activate in the CRON environment...

Add command line arguments the easy way or with the library of your choice (I like Clingon).

Script n°2 and simple FTP

My script #2 at the time was similar and simpler. I extract the same products but only take their quantities, and I assemble lines like

EXTRACTION STOCK DU 11/04/2008
....978202019116600010000001387
....978270730656200040000000991

For this service, we have to send the file to a simple FTP server.

We have a pure Lisp library for FTP (and not SFTP) which works very well, cl-ftp.

It’s a typical example of an old library that didn’t receive any update in years and so that looks abandoned, that has seldom documentation but whose usage is easy to infer, and that does its job as requested.

For example we do this to send a file:

(ftp:with-ftp-connection (conn :hostname hostname
                                   :username username
                                   :password password
                                   :passive-ftp-p t)
      (ftp:store-file conn local-filename filename))

I left you notes about cl-ftp and my SFTP wrapper here:

Scripts n°3 and n°1 - specialized web apps

A recent web app that I’m testing with a couple clients extends an existing stock management system.

This one also was done in order to avoid a Python monolith. I still needed additions in the Python main software, but this little app can be independent and grow on its own. The app maintains its state and communicates it with a REST API.

 

It gives a web interface to their clients (so my clients’ clients, but not all of them, only the institutional) so that they can:

  • search for products
  • add them in shopping carts
  • validate the cart, which sends the data to the main software and notifies the owner, who will work on them.

The peculiarities of this app are that:

  • there is no user login, we use unique URLs with UUIDs in the form: http://command.client.com/admin-E9DFOO82-R2D2-007/list?id=1
  • I need a bit of file persistence but I didn’t want the rigidity of a database so I am using the clache library. Here also, not a great activity, but it works©. I persist lists and hash-tables. Now that the needs grow and the original scope doesn’t cut it any more, I wonder how long I’ll survive without a DB. Only for its short SQL queries VS lisp code to filter data.

I deploy a self-contained binary: code + html templates in the same binary (+ the implementation, the web server, the debugger...), with Systemd.

I wrote more on how to ship a standalone binary with templates and static assets with Djula templates here:

I can connect to the running app with a Swank server to check and set parameters, which is super helpful and harmless.

It is possible to reload the whole app from within itself and I did it with no hiccups for a couple years, but it isn’t necessary the most reliable, easiest to set up and fastest method. You can do it, but nobody forces you to do this because you are running CL in production. You can use the industry’s boring and best practices too. Common Lisp doesn’t inforce a “big ball of mud” approach. Develop locally, use Git, use a CI, deploy a binary...

Every thing that I learned I documented it along the way in the Cookbook ;)

Another app that I’ll mention but about which I also wrote earlier is my first web app. This one is open-source. It still runs :)

 

In this project I had my friend and colleague contribute five lines of Lisp code to add a theme switcher in the backend that would help him do the frontend. He had never written a line of Lisp before. Of course, he did so by looking at my existing code to learn the existing functions at hand, and he could do it because the project was easy to install and run.

(defun get-template(template &optional (theme *theme*))
  "Loads template from the base templates directory or from the given theme templates directory if it exists."
  (if (and (str:non-blank-string-p theme)
           (probe-file (asdf:system-relative-pathname "abstock" (str:concat "src/templates/themes/" theme "/" template))))
      ;; then
      (str:concat "themes/" theme "/" template)
      ;; else :D
      template))

He had to annotate the if branches :] This passed the code review.

Lasting words

The 5th script/app is already on the way, and the next ones are awaiting that I open their .docx specification files. This one was a bit harder but the Lisp side was done sucessfully with the efficient collaboration of another freelance lisper (Kevin to not name him).

All those tasks (read a DB, transform data...) are very mundane.

They are everywhere. They don’t always need supercharged web framework or integrations.

You have plenty of opportunities to make yourself a favor, and use Common Lisp in the wild. Not counting the super-advanced domains where Lisp excels at ;)


Links

I have done some preliminary Common Lisp exploration prior to this course but had a lot of questions regarding practical use and development workflows. This course was amazing for this! I learned a lot of useful techniques for actually writing the code in Emacs, as well as conversational explanations of concepts that had previously confused me in text-heavy resources. Please keep up the good work and continue with this line of topics, it is well worth the price! [Preston, October of 2024]




is

Joe Marshall: Don't Try to Program in Lisp

A comment on my previous post said,

The most difficult thing when coming to a different language is to leave the other language behind. The kind of friction experienced here is common when transliterating ideas from one language to another. Go (in this case) is telling you it just doesn't like to work like this.
Try writing simple Go, instead of reaching for Lisp idioms. Then find the ways that work for Go to express the concepts you find.

That's not at all how I approach programming.

A friend of mine once paid me a high compliment. He said, “Even your C code looks like Lisp.”

When I write code, I don't think in terms of the language I'm using, I think in terms of the problem I'm solving. I'm a mostly functional programmer, so I like to think in terms of functions and abstractions. I mostly reason about my code informally, but I draw upon the formal framework of Lambda Calculus. Lambda Calculus is a simple, but powerful (and universal) model of computation.

Programming therefore becomes a matter of expressing the solution to a problem with the syntax and idioms of the language I'm using. Lisp was inspired by Lambda Calculus, so there is little friction in expressing computations in Lisp. Lisp is extensible and customizable, so I can add new syntax and idioms as desired.

Other languages are less accommodating. Some computations are not easily expressable in the syntax of the language, or the semantics of the language are quirky and inconsistent. Essentially, every general purpose fourth generation programming language can be viewed as a poorly-specified, half-assed, incomplete, bug-ridden implementation of half of Common Lisp. The friction comes from working around the limitations of the language.




is

"Dragons of Paris" and the Role of Time in the Mongolian Wizard Series

 .

The kind people at Reactor Magazine have posted my two latest Mongolian Wizard stories, one yesterday and the other today. Thursday's "Halcyon Afternoon" took place during a rare moment of peace for Franz-Karl Ritter. But in today's "Dragons of Paris," it's warfare as usual. 

Time has always been a little tricky in this series. The first story was clearly set in the Nineteenth Century but, though only a few years have passed, the series has now reached what is recognizably World War I. Mostly this occurred for reasons explained in "The Phantom in the Maze" and "Murder in the Spook House." (And which I anticipate giving me increasing difficulties in writing the next ten stories.) But also, in a more literary background sense, I wanted to cover the transition from a way of life now alien to us to something more modern, if not contemporary. 

So time may get a bit more slippery in the future. That's if, of course, the stories go in the direction I intend. Sometimes the fiction has its own ideas where it wants to go and the author can only follow along meekly in its wake.

You can read the story here. Or just go to the ezine and poke around. It's a good place to poke around.


Above: The illustration is by Dave Palumbo. I'm grateful for that.


*





is

Who owns Greenland rsquo s island

Who owns Greenland rsquo s island



View Comic!







is

Why Virat Kohli, Jasprit Bumrah were missing from Perth nets; India ramp up privacy amid Manchester United-like security - Hindustan Times

  1. Why Virat Kohli, Jasprit Bumrah were missing from Perth nets; India ramp up privacy amid Manchester United-like security  Hindustan Times
  2. Virat Kohli in focus: Intense net session begins for upcoming Test series against Australia  The Times of India
  3. Virat Kohli in Australia for BGT: A timeline  India Today
  4. Black veil of secrecy: India begin training in privacy in Perth  ESPNcricinfo
  5. India to play intra-squad warm-up match at WACA on Friday ahead of Australia Tests but BCCI denies public viewing  Hindustan Times




is

3 Children, 3 Women Missing After 10 Suspected Kuki Militants Killed In Encounter In Manipur's Jiribam - NDTV

  1. 3 Children, 3 Women Missing After 10 Suspected Kuki Militants Killed In Encounter In Manipur's Jiribam  NDTV
  2. Manipur on boil: 2 more bodies found, 6 missing  The Times of India
  3. Additional paramilitary forces rushed to Manipur amid spike in ethnic violence  Hindustan Times
  4. Letters to The Editor — November 13, 2024  The Hindu
  5. 2 men found dead, 6 of family missing day after militants killed in Manipur  India Today




is

you insist phone

Today on Married To The Sea: you insist phone


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

listen carefully

Today on Married To The Sea: listen carefully


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

fishing is borin

Today on Married To The Sea: fishing is borin


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

is this all there is

Today on Married To The Sea: is this all there is


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

does this suck

Today on Married To The Sea: does this suck


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

you done this before

Today on Married To The Sea: you done this before


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

i wont stand for this

Today on Married To The Sea: i wont stand for this


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

running this show

Today on Married To The Sea: running this show


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

if you are listenin

Today on Married To The Sea: if you are listenin


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

im glad you like this r

Today on Married To The Sea: im glad you like this r


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




is

what kind of vision

Today on Married To The Sea: what kind of vision


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!













is

Mad Science Monday: Never Visit The Dentist Again

I think the next logical step is a pulled-tooth via skydiving.

~NSHA




is

This Plan is Full of Hot Air




is

It Only Has Some of The Bells and Whistles

Along with the pink helmet and white basket, the bike gang had serious questions about granting him membership.

~NSHA




is

McDonnell ends his Armagh career

Armagh football suffers another blow as Steven McDonnell announces his retirement from the intercounty game.




is

Christian Pulisic & Tim Weah headline USMNT November roster drop | SOTU

Alexi Lalas and David Mosse reacted to the second United States Men's National Team roster release of the Mauricio Pochettino era, with Christian Pulisic, Tim Weah, and Weston McKennie headlining the squad.




is

Lakers' Anthony Davis says his eye is fine, declines to wear goggles

Los Angeles Lakers star Anthony Davis says he has recovered from being poked in the left eye by Toronto’s Jakob Poeltl, and his latest eye injury still hasn’t persuaded him to wear protective goggles




is

Bears fire OC Shane Waldron, how much of it is on Caleb Williams? | First Things First

Nick Wright reacts to the Chicago Bears firing OC Shane Waldron, then discusses how much Caleb Williams is to blame for the team's poor season.




is

Joey Logano 1-on-1: Winning Cup Series championship is 'electric'

Joey Logano sat down with FOX Sports to discuss the wild pace-car wreck, the playoff format and the feeling of winning the title at Phoenix.




is

Alabama's Ryan Williams on Travis Hunter winning Biletnikoff: 'I can't let him do that'

In an interview on FOX Sports' "All Facts, No Brakes," Alabama stars Ryan Williams and Jaylen Mbakwe shared why they stayed after Nick Saban's retirement and their thoughts on Travis Hunter.




is

C.J. Stroud tops the list of best-selling NFL jerseys midway through 2024 season

Three quarterbacks lead the way in top NFL jerseys sales so far this season.




is

Deion Sanders talks Shedeur Sanders’ growth from last year to this season | Speak

Deion Sanders discusses the impressive growth of Shedeur Sanders from last season to this year, highlighting his development as Colorado’s QB and the strides he’s made on the field.




is

Deion Sanders compares Shedeur and Travis’ chemistry to Michael Irvin and Troy Aikman | Speak

Deion Sanders talks about the strong chemistry between Shedeur Sanders and Travis Hunter, comparing it to the connection Michael Irvin had with Troy Aikman during their playing days.




is

Deion Sanders argues why Travis Hunter is a Heisman front-runner this year | Speak

Deion Sanders argues why Travis Hunter is a top contender for the Heisman this year, highlighting his unique talent and impact on Colorado’s success.




is

2024-25 NBA championship odds: Celtics, Thunder favored; Cavs rising

A number of contenders are chasing the defending champion Celtics on the oddsboard. Check out where things stand, with insight from Jason McIntyre.




is

what 'polite' means: Culpeper, O'Driscoll & Hardaker (2019)

I've studied the word please off and on for a few years now.* Currently, I'm trying to finish up a study that I started an embarrassing number of years ago. Now that I've returned to it, I have the pleasure of reading all the works that have been published on related topics in the meantime. They couldn't inform my study design, but they must now inform the paper I hope to publish. One of these is a chapter by Jonathan Culpeper, Jim O'Driscoll and Claire Hardaker: "Notions of Politeness in Britain and North America," published in the book in From Speech Acts to Lay Understandings of Politeness, edited by Eva Ogiermann and Pilar Garcés-Conejos Blitvich (Cambridge UP, 2019). 

Their question, what does polite mean in the UK and US, was a research project on my to-do list. When I was a younger scholar, I'd have been (a) royally annoyed with those authors for getting to it first, (b) sad, sad, sad that I didn't get to do a fun piece of research, and (c) consumed with self-loathing for not being quick enough to do the project myself. It is both the blessing and curse of middle age that I now look at anything anyone else has done with gratitude. Good! Now I don't have to do it! 

Let's start with why it's interesting to ask about "notions of politeness" in the two countries. Here's a clue from an earlier post about use of please when ordering at restaurants. I asked:
So, how can it be that Americans think of themselves as polite when they fail to extend this common courtesy word?
I argued that Americans (subconsciously) find the lack of please in these contexts "more polite." In the comments section for that post, some people—mostly British people—could just not accept that a food order without a please could be described as polite. To them, to be polite includes saying please. If you're not using the word please, it's just not polite. 

Now, part of the reason for that disagreement is that I was using the word polite in linguistic-theory-laden ways. The distinction between how the word politeness is used in linguistic discussions and how it's used in everyday life has become such a problem for us linguists that we now talk about polite1 and polite2 to distinguish commonplace understandings of polite (1) from our theoretical uses (2). The failures of communication in my previous blogpost probably stemmed from having three understandings of politeness at play: the linguist's polite2, American polite1, and British polite1. 


Postcard from the How to be British series


 

Culpeper et al. set out to contrast British and American polite1. They point out that academic research on the topic of British/American politeness is "full of stereotypes that have largely gone unexamined." These stereotypes hold that British culture favo(u)rs maintaining social distance by using indirectness and avoidance in interaction, while Americans are more interested in creating interactional intimacy by being informal and open. The authors asked: how do AmE and BrE speakers use the word polite? If differences exist, then do they conform to the stereotypes, or do they tell us something new? To investigate this, the authors used two sets of data.


Part 1: clustering 'polite' words in the OEC

First, they searched the Oxford English Corpus, where they found thousands of instances of polite. In AmE, it occurs 6.8 times and in BrE 8.8 times per million words. They then used corpus-linguistic tools to determine which words polite was most likely to co-occur with in the two countries' data. They then used statistical tools to group these collocates into clusters that reflect how they behave linguistically. (I'll skip over the detail of the statistical methods they use, but it suffices to say: they know what they're doing.) For example in the British data, words like courteous, considerate, and respectful form a courteous cluster, while words like cheery, optimistic, and upbeat are in the cheerful cluster. 

The British and American datasets were similar in that polite co-occurred at similar rates with words that formed cheerful and friendly clusters. This seems to go with the common stereotype of American politeness as outgoing and inclusive, but contradicts the British stereotype of reserved behavio(u)r. 

The most notable difference was that British polite collocated with words in a sensible cluster, including: sensible, straightforward, reasonable, and fair. This cluster didn't figure in the American data. The British data also had a calm cluster (calm, quiet, generous, modest, etc.), which had little overlap with American collocates. British polite, then, seems to be associated with "calm rationality, rather than, say, spontaneous emotion." 

Other clusters seemed more complex. Courteous and charming came up as British clusters, while American had respectful, gracious, and thoughtful clusters. However, many of the words in those clusters were the same. For example, almost all the words in the British courteous cluster were in the American gracious cluster. That is, in American courteous and attentive were more closely associated with 'gracious' words like open-minded and appreciative, while British courteous and attentive didn't intersect with more 'gracious' words. Respectful is a particularly interesting case: it shows up in the courteous cluster for the British data, but has its own respectful cluster in American (with words like compassionate and humane). 
 
Looking at these clusters of patterns gives us a sense of the connotations of the words—that is to say, the associations those words bring up for us. Words live in webs of cultural assumptions. Pluck one word in one web, and others will reverberate. But it won't be the same words that would have reverberated if you'd plucked the same word in the other web. It's not that compassionate wasn't in the British data, for example—it's that its patterns did not land it in a cluster with respectful.  In American, respectful seems to have "a warmer flavour" with collocates relating to kindness and positive attitudes toward(s) others, while in the British data respectful has "older historic echoes of courtly, refined, well-mannered behaviour." 

Part 2: 'politeness' and sincerity on Twitter

Their second investigation involved analy{s/z}ing use of polite and its synonyms in a particular 36-hour period on Twitter. The data overall seemed to go against the stereotypes that American politeness is "friendly" and British is "formal", but once they looked at the data in more detail, they discovered why: US and UK words differed in (in)sincerity. In the British data, respectful seemed to "be used as a vehicle for irony, sarcasm and humour", while in the American data friendly "appears to have acquired a negative connotation" about 17% of the time, in which "friendly" people were accused of being untrustworthy or otherwise undesirable. This also underscores the idea that American respectful has a "warmer flavour" than British respectful. It's intriguing that each culture seems to be using words stereotypically associated with them (American–friendly; British–respectful) in ironic ways, while taking the less "typical of them" words more seriously.  

Yay for this study! 

I'm grateful to Culpeper, O'Driscoll and Hardaker for this very interesting paper, which demonstrates why it's difficult to have cross-cultural discussions of what's "polite" or "respectful" behavio(u)r. The more we're aware of these trends in how words are interpreted differently in different places, the better we can take care in our discussions of what's polite, acceptable, or rude. 


*If you're interested in the fruits of my please labo(u)rs so far, have a look at:




is

NYT Spelling Bee: an archive of disallowed BrE words

Twitter has been my main internet stomping ground since 2009, but I've been withdrawing my labo(u)r from it since October, when it became much more volatile for some reason

The New York Times Spelling Bee has been my morning-coffee activity for some of those years, and since November 2020 I've been jokingly tweeting the BrE words that it hasn't accepted. These go in a thread of posts that always start: 

Perfectly Common BrE Words the @NYTimesGames Spelling Bee Has Denied Me: An Occasional Series

Twitter has really degraded this week, which is making me feel a bit sad that perhaps that thread will have to die. (I'm also sad that the thread has frayed along the way—it's very difficult to read it all the way to the beginning because it splits here and there.) So as a clearly procrastinatory measure, I'm putting the list of "perfectly common BrE words" here, with a little more explanation than they tended to get on Twitter.

For those who don't know the Bee: it's an anagram game where one must use the middle letter. The twist—and what makes it a superior anagram game—is that you can use any of the letters as many times as you like. Here's what it looked like on the 5th of April when I hadn't yet got to Genius level.  (My goal every day is 'make it to Genius before breakfast'. It's nice to be called 'Genius' before you've started work.) 


The game, of course, has its own word list, which is suitably American for its New York Times home. Still, some not-usually-AmE words are playable, like FLATMATELORRY and PRAM. But many words that are part of my everyday vocabulary in England are not playable. And non-AmE spellings are generally not playable. 

There's been a lot of attention to AmE words that (orig. AmE) stump non-American players in Wordle. (Here's Cambridge Dictionary's 2022 Word of the Year post, which covers some—and includes a video in which I talk about why HOMER was a great choice for Word of the Year.) Not as much attention has been paid to the Spelling Bee, which you need to subscribe to. I'm sure British players have their own (mental) lists of American words they've had to learn in order to get "Queen Bee" status (finding all the day's words) in the game. If you're one of them, do use the comments to tell us about those weird words.

So, after all that preamble, here are the "Perfectly Common BrE Words the @NYTimesGames Spelling Bee Has Denied Me" words in alphabetical order, with translations or links to other blog posts. But first, a bit more preamble. The disclaimers! 

  • Words in the puzzle must be at least four letters long, so some of these are suffixed forms for which the three-letter base word was unplayable. If there's an -ED form but not an -ING form (etc.), that'll be because the other one's letters weren't in the puzzle. 
  • Some of these would not have been allowable—regardless of their dialectal provenance—on the basis that they are "naughty" words. I include them anyway. 
  • I have checked questionable cases against the GloWbE corpus to ensure that the word really is more common in BrE than AmE.
  • Some are Irish or Australian by origin, but they are still more common in BrE than in AmE.
  • Sometimes my spelling is a bit liberal here. If I could find one British dictionary that allowed me the word with the given spelling, I included it.  
  • Also the phrase "perfectly common" is not meant to be taken too seriously!
  • These words were not playable at the time when I tried to play them. The word list may have changed and some of them may be playable now. 
  • Red ones are ones that have been unsuccessfully played/tweeted about since I first started this blog list. Green ones have been added to the blog since the original post, but were tweeted-about earlier than that—I just missed them in the tangled Twitter threads when I was writing the blog post. 

ABATTOIR
  AmE slaughterhouse

AGGRO aggression, aggressive behavio[u]r

AITCH  the letter. Less need to spell it as a word in AmE. See this old post.

ANAEMIA / ANAEMIC  AmE anemia/anemic

ANNEXE  minority spelling in BrE; usually, as in AmE, it's annex

APNOEA  AmE apnea

APPAL   AmE appall; old post on double Ls

ARDOUR   old post on -or/-our

ARGYBARGY this is a bit of a joke entry because it's usually spelled/spelt ARGY-BARGY (a loud argument), but the Squeeze album has no hyphen. 

ARMOUR    -or/-our

BALLACHE   something annoying or tedious (usually hyphenated, but some dictionaries include the closed-up version)

BIBBED  I don't know why this shows up more in BrE data, but it does, just meaning 'wearing a bib'

BINMAN / BINMEN  AmE garbage man (among other terms); old post on bin

BINT  derogatory term for a woman

BITTY having lots of unconnected parts, often leaving one feeling unsatisfied; for example, this blog post is a bit bitty

BLAG covered in this old post

BLUB / BLUBBING to sob (= general English blubbering)

BOAK retch, vomit, throw up a bit in the mouth. That was gross. Sorry.

BOBBLY having bobbles 

BOBBY  I think this one might be playable now. Informal term for police officer. In AmE, found in bobby pins

BODGE / BODGED make or fix something badly

BOFFIN  see this old post

BOLLOCK / BOLLOCKED  reprimand severely

BOLLOX  This one's more common in Irish English than BrE. To screw something up.

BOKE   see BOAK 

BONCE  the head (informal)

BOYO a boy/man (Welsh informal)

BRILL  short for brilliant, meaning 'excellent'; also a kind of European flatfish

BROLLY  umbrella (informal)

BUNG / BUNGING to put (something) (somewhere) quickly/carelessly. People cooking on television are always bunging things in the oven. 

BUTTY  see this old post

CAFF  a café, but typically used of the kind that is analogous to an AmE diner (that is to say a café is not as fancy in BrE as it would be in AmE)

CAWL  a soupy Welsh dish (recipe); also a kind of basket

CEILIDH  a Scottish social dance (event)

CHANNELLED   post on double Ls

CHAPPIE  a chap (man)

CHAV / CHAVVY  see this old post and/or this one

CHICANE  a road arrangement meant to slow drivers down; see this old post

CHILLI  see this old post

CHIMENEA / CHIMINEA the 'e' spelling is considered etymologically "correct" but the 'i' spelling seems to be more common in UK; I think these kinds of outdoor fireplaces are just more trendy in UK than in US?

CHIPPIE alternative spelling of chippy, informal for a (fish and) chip shop

"cholla" at a UK online supermarket
CHOC chocolate (informal, countable)

CHOLLA  a spelling of challah (the bread) 

CLAG  mud; more common is claggy for 'having a mud-like consistency'

COLOUR    -or/-our

CONNEXION this is a very outdated spelling of connection. Not actually used in UK these days, but wouldn't it be nice to be able to play it?

COOTCH  a hiding place, a shed or similar (from Welsh cwtch)

COUNCILLOR  post on double Ls

CRAIC it's really an Irish one (a 'good time'), but it qualifies here because it's used more in BrE than AmE (and understood pretty universally in UK)

CRIM  criminal

CUTTY  short (in some UK dialects)

DADO  as in dado rail, what's often called a chair rail in AmE (here's a picture)

DEFENCE  AmE defense

DEMOB /DEMOBBED  de-mobilize(d); that is, released from the (BrE) armed forces / (AmE) military

DENE  a valley (esp. a narrow, wooded one) or a low sand dune near the sea (regional)

DEVILLED  post on double Ls

DIALLING  post on double Ls

DIDDY    small (dialectal); see this old post

DOBBED / DOBBING  actually Australian, dob = to inform on someone; see this old post on the BrE equivalent grass (someone) up

DODDLE  it's a doddle  = (orig. AmE) it's a piece of cake (very easy)

DOOLALLY  out of one's mind

EQUALLED   post on double Ls

FAFF / FAFFING  one of the most useful BrE words. See this old post

FARL  a kind of (AmE) quick bread, usually cut into triangles; can be made of various things, but here's a recipe for a common kind, the potato farl

FAVOUR   -or/-our

FILMIC cinematic, relating to film

FITMENT = AmE fixture, i.e. a furnishing that is fit(ted) in place

FLANNELETTE = AmE flannel  old post on flannels

FLAVOUR   -or/-our

FLAVOURFUL   -or/-our

FOETAL AmE (and BrE medical) fetal

FOOTMAN a servant or (formerly soldier (of a particular rank)

FUELLED  post on double Ls

FULFIL   post on double Ls

GADGIE / GADGE guy, man, boy (regional)

GAMMON  this post covers the meat meaning, but lately it's also used as an insult for Brexiteers and their political similars

GAMMY  (of a body part) not working well; e.g., I have a gammy knee

GANNET a type of sea bird, but also BrE slang for a greedy person

GAOL  now less common spelling for jail

GIBBET  gallows; to hang (a person) [not really in current use]

GIGGED / GIGGING  to perform at a gig  [playable as of May 2023]

GILET   covered at this clothing post and also at this pronunciation post

GIPPING form of gip, a synonym of BOAK (see above)

GITE French, but used in English for a type of holiday/vacation cottage

GOBBED / GOBBING  form of gob, which as a noun means 'mouth', but as a verb means 'spit'

GOBBIN waste material from a mine

GOBBY mouthy

GOOLY (more often GOOLIE, GOOLEY) a testicle (informal, see GDoS)

getting gunged/slimed
GUNGE  any unpleasant soft or slimy substance; also used as a verb for having such stuff poured over one's head on a children's show (= AmE slime)

GURN / GURNING  see this old post

HAITCH  = AITCH, but pronounced differently See this old post.

HALLO old-fashioned hello 

HENCH strong, fit (like a weightlifter)

HOLDALL  a duffel bag or similar heavy-duty bag; often spelled with a hyphen (hold-all), but at least some places don't. 

HOOPOE a kind of bird (mostly African), which sometimes makes it to England

HOGMANAY it is a proper noun, but I wanted to include it anyway

HOICK / HOIK  to lift/pull abruptly

HOTCHPOTCH  AmE hodgepodge

INNIT invariant tag question: isn't it

INVIGILATING AmE proctoring; old post

JAMMY  lucky; old post 

KIRK  church (Scotland)

KIPPING  form of kip, to take a nap

LAIRY  (esp. of a person) unpleasantly loud, garish 

LAMBING  form of to lamb, give birth to lambs. Often heard in lambing time or lambing season

LAMPED  form of to lamp, to hit a person very hard

LARKING  form of to lark,  'to behave in a silly way for fun'

LAYBY  AmE turnout (and other synonyms/regional terms); a place where a car can move out of the flow of traffic (usually has a hyphen lay-by, but I found one dictionary that doesn't require it)

LIDO an outdoor public swimming pool; there's some debate about how to pronounce it 

LILO  a blow-up mattress for floating on in a pool

LINO  short for linoleum

LOLLY  lollipop or (AmE) popsicle (especially in ice lolly)

LOVAGE  a(n) herb that Americans don't see very often  [has been added! Played successfully on 3 May 2023]

LUPIN  AmE lupine, a flower

LURGI / LURGY  see this old post

MEDIAEVAL  the less common spelling of medieval

MILLIARD  (no longer really used) a thousand million, i.e. a billion 

MILORD address term for a nobleman

MINGE  a woman's pubic hair/area (not flattering) 

MINGING  foul, bad smelling, ugly (rhymes with singing!)

MODELLED  post on double Ls

MOGGY  a cat (informal)

MOOB  man boob

MOULT    AmE molt (related to  -or/-our)

MOZZIE  mosquito

MUPPET in its lower-case BrE sense: 'idiot; incompetent person'

NAFF  this has come up in posts about 'untranslatables' and about a study that identified common BrE words Americans don't know

NAPPY AmE diaper

NAVVY  a manual labo(u)rer (old-fashioned)

NEEP  Scottish English for what the English call a swede and what Americans call a rutabaga (old post on the latter two)

NELLY in the BrE phrase not on your nelly (= AmE not on your life)

NIFFY unpleasant-smelling

NOBBLE  to unfairly influence an outcome; steal 

NOBBLY  alternative spelling of knobbly (which is more common in both AmE & BrE)

NONCY  adjective related to nonce (sex offender, p[a]edophile) 

NOWT  nothing (dialectal)

ODOUR    -or/-our

OFFENCE  AmE offense

OFFIE  short for BrE off-licence; AmE liquor store  (discussed a little in this old post

ORACY  the speaking version of literacy; in US education, it's called orality

PACY  having a good or exciting pace (e.g. a pacy whodunnit)

PAEDO  short for pa(e)dophile

PANTO see this post

PAPPED / PAPPING  from pap, to take paparazzi pictures

PARLOUR    -or/-our

PARP  a honking noise

PEDALLED   post on double Ls

PELMET  another one from the study that identified common BrE words Americans don't know

PENG  slang for 'excellent' 

PIEMAN / PIEMEN this one is usually two words (pie man), but I was able to find a dictionary that allowed it as a single word, so I added it to the list

PIPPED / PIPPING  pip = to defeat by a small amount; often heard in to be pipped at the post 

PITTA another spelling for pita, more in line with the BrE pronunciation of the word

PLAICE another one from the study that identified common BrE words Americans don't know

PLUMMY  see this post

PODGY  chubby

POMMY another Australian one, but English people know it because it's an insult directed at them, often in the phrase pommy bastard

PONCE / PONCY  see this post

PONGING horrible-smelling

POOED / POOING  see this post for the poo versus poop story

POOTLE to travel along at a leisurely speed

POPPADOM / POPPADUM anything to do with Indian food is going to be found more in UK than US

PORRIDGY  like porridge, which in AmE is oatmeal

PUFFA full form: puffa jacket; a kind of quilted jacket; it is a trademark, but used broadly; I did find it in one dictionary with a lower-case p

PUNNET  see this old post

RAILCARD  you buy one and it gives you discounts on train tickets

RANCOUR    -or/-our

RUMOUR     -or/-our

TANNOY  AmE loudspeaker, public address system  (originally a trademark, but now used generically)

TARTY dressed (etc.) in a provocative manner

TELLY  (orig.) AmE tv

TENCH a Eurasian fish

THALI  another Indian menu word 

THICKO  stupid person

TIDDY  small (dialectal) 

TIFFIN  usually referring to chocolate tiffin (recipe)

TINNING  AmE canning

TITBIT see this post

TITCH  a small person 

TIZZ = tizzy (to be in a tizz[y])

TOFF  an upper-class person (not a compliment)

TOMBOLA  see this post

TOTTED / TOTTING  see this post 

TOTTY  an objectifying term for (usually) a woman

TRUG  a kind of basket; these days, often a handled rubber container  

TUPPENCE  two pence

TWIGGED, TWIGGING  form of twig 'to catch on, understand'

UNEQUALLED   post on double Ls

UNVETTED related to my 2008 Word of the Year 

VALOUR   -or/-our

VIVA  an oral exam (short for viva voce)

WANK / WANKING  my original Word of the Year (2006!)

WEEING  AmE peeing

WELLIE  / WELLY  a (BrE) wellington boot / (AmE) rubber boot

WHIN a plant (=furze, gorse)

WHINGE  AmE whine (complain)

WILLIE / WILLY  penis

WOAD a plant used to make blue dye

WOLD a clear, upland area (mostly in place names now)

WOOLLEN   post on double Ls

YOBBO / YOBBY  hooligan / hooliganish

YODELLED   post on double Ls





is

sir, miss (at school)

In my last newsletter, I reacted to this news story:


The article is about addressing teachers as sir or miss, which happens in American schools too (I'm sure there's a lot of variation in that across schools and regions). But in the newsletter I mentioned BrE referential use of the words when talking about the teacher (rather than talking to the teacher). I said: "I’m often taken aback when my child (like any ordinary English child) refers to her teachers as Sir and Miss"—which she often does.

My former colleague David replied to say that he found this odd, since as "a moderately ordinary English child in the north of England in the 1960s," he addressed his (all male) teachers as Sir, but would refer to them by name or description (e.g., our English teacher). He concluded that "referring to teachers as Sir and Miss may be either more recent or more southern."

While the usage may have been new in the 1960s, it definitely existed then, apparently even in the north.

The OED's first citation for that use of Sir is from 1955 in a novel by Edward Blishen, who hailed from London: "‘The cane,’ said Sims vaguely. ‘Sir can't,’ said Pottell...’" A few other quotations can be seen in the OED snippet below (note their nice new layout!)  




On to MissThe first referring-to-(not addressing)-a-teacher citation for Miss is from 1968 in a book by an author from Salford (in the northwest). (You'll spot another Miss example from that book in the Sir examples above. I've reported the error.)


Did Miss really only appear a decade after referential Sir? I doubt it. We have to rely on written records, usually published ones, and there aren't a lot of written records in the voice of schoolchildren. Fiction helps, but it has its biases and gaps. 

And then, of course, there was the 1967 British film To Sir, with Love, in which Sir is used as if it is the name of the teacher played by Sidney Poitier. Is it a term of address there, or referential?  Well, the title always seemed weird to me—certainly not a way I'd address a package. This Sir seems halfway between address and reference. We could label packages with the second-person pronouns that we usually used to address people, i.e., "To you", but we tend to use the third person: "To David". Rather than addressing the recipient, it seems to be announcing the recipient. 

This past academic year, for the first time, I was addressed as Miss a fair amount (no name, just Miss). This came from a new student who apparently was carrying over school habits to university, and so my colleagues were all Miss as well. I thought often about saying something about it to the student, but I also thought: I know what they mean, so why bother? I get to correct people enough in my job, I don't have to take every opportunity to do so and certainly don't need to make a big deal out of what I'm called. (Just don't call me late for dinner.) One picks one's pedantic battles. It's not a million miles from how I feel about my students calling a lecture or seminar a lesson, which I've written about back here.

If you're interested, here's more I've written on:




is

Times People Were Awkwardly Misjudged

Sometimes people are all-too ready to make assumptions about other people, and those assumptions get in the way of empirical facts. You hope someone doesn't misjudge you so publicly that they make a total fool of themselves. Or maybe you do. Everyone knows wrongful times people were misjudged tend to stick in their memory for years.







is

12 Comics That Put Gender Discrimination Into Perspective