According to the Jargon File, appending a p to a word in some hacker slang turns the word into a question expecting a yes or no answer.
Therefore, saying "sexp?" would be asking for sex.

(Supposedly, this is from LISP)

Also Lisp-related: `sexp' is an abbreviation for `s-expr', itself an abbreviation for `s-expression', itself an abbreviation for `symbolic expression'. A sexp is simply a Lisp expression (be it code or data); `s' distinguishes it from the `meta-expressions' of early Lisps (McCarthy's 1.5, for example). In these Lisps, programs could be expressed with an Algol-derived syntax (m-exprs), or with the parenthesised notation that was also used for expressing lists (s-exprs). s-exprs caught on; m-exprs didn't. Now, almost forty years later, you'll be hard-pressed to find someone who knows what an m-expr is. Then again, you would have back then, too.

in emacs, any "balanced expression", like a block in C/C++ code that begins with a left-brace, {, and ends with a right-brace, }. (Or in Visual Basic code, a block beginning with an "If", and ending with an "Endif". Sick, twisted, I know, but true, nonetheless...)

In the rest of the world, short for "S-expression", which is, in turn, short for "Symbolic Expression"1. Sexps are an idea widely used in Lisp (and Scheme), in various forms. In its most basic form, a sexp can be either an atom, or a dotted pair of sexps.

So, A is a sexp, if A is an atom, A . A is also a sexp, as is A . (A . B), and (A . B) . (C . D). In Lisp, lists are formed as recursive sexps; that is, (A . (B . (C . nil))) is the list of A, B, and C, where nil is also an atom, and denotes the end of a list.2

This brings us to our good friends, car and cdr, which are used to access the left and right elements of a sexp, respectively. (When dealing with lists, they can be viewed as "head" and "tail", again, respectively.)

Used in the IETF's Simple Public Key Infrastructure (SPKI). From RFC 2693:

S-EXPRESSION: the data format chosen for SPKI/SDSI. This is a LISP-like parenthesized expression with the limitations that empty lists are not allowed and the first element in any S-expression must be a string, called the "type" of the expression.
For more information on that, see
http://theory.lcs.mit.edu/~rivest/sexp.html
or the RFC itself.

1Any similarity between this phraseology and neil's is purely coincidental, I promise... see? the nodes were written simultaneously; I just happened to take more time, with mine. FINE, DON'T BELIEVE ME!! SEE IF I CARE!

2in case you couldn't tell, I am using all A, B, C, and D as atoms. I would have explained that earlier, but I would hope that it's obvious? Maybe not...

Log in or registerto write something here or to contact authors.