[Openmcl-devel] Mark Kantrowitz infix.lisp easter egg?

Alexander Repenning ralex at cs.colorado.edu
Fri Dec 2 17:56:14 PST 2011

Using Mark Kantrowitz old but very handy infix we noticed some peculiar pattern of errors where very basic expressions do not correctly convert infix expressions into prefix ones. The version I just tried was this one: http://www.cliki.net/infix

in => pre, red for incorrect

"a + 1"  		=> (+ A 1)
"s + 1"  		=>  S+1
"s - 1"  		=>  S-1
"s * 1"		=> (* S 1)
"a + 1.5" 	=> (+ A 1.5)
"s + 1.5" 		=> (+ S 1.5)
"s + s"		=> (+ S S)
"s + 1 + 1"	=> (+ S+1 1)
"s + 1e1"	=> (+ S 10.0)

Can somebody see a pattern here? AFAIK, the combination of the one letter variables names that are characters D, E, F, L, or S followed by "+" or "-" and then followed by an int does not work. 

Is this a bug or some very special case that is supposed to work like this for no (to me) obvious reason? If this is bug, how could this have slipped through the net for so many years? I know many people have using this software. I tried various versions of infix.lisp. Are D, E, F, L, or S special tokens? If so, what do they mean, and where are they declared?

Confused,  Alex

---- test program spitting out the variable names not working ------

This should print nothing:

   #'(lambda (Char)
       (when (symbolp (read-from-string (format nil "#i(~A + 1)" Char))) ;; should be a list, NOT a symbol!
         (print Char)))

but prints:


Prof. Alexander Repenning

University of Colorado
Computer Science Department
Boulder, CO 80309-430

vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20111202/5efb3732/attachment.htm>

More information about the Openmcl-devel mailing list