[Openmcl-devel] Obfuscated Lisp contest anyone? (Seriously)
Tim McNerney
mc at media.mit.edu
Sun May 7 06:58:02 PDT 2023
I like the educational angle, which is kinda the antithesis of obfuscation. Calling it the “short, sweet, and elegant contest” captures the spirit.
The obfuscated C winner I most liked was a (tiny) BASIC interpreter compressed into 1,500 bytes of source code. It became completely understandable after I macroexpanded it.
Ron,
I fiddled with your “entry.”
Transforming lambda into let when appropriate didn’t help readability. The overall style looks Y combinator-ish, which alas I’ve never wrapped my head around. Is there source to source transform that turns this style into recursive code?
--Tim
> On May 7, 2023, at 11:02, Adlai C <munchking at gmail.com> wrote:
>
> On 4/15/23, Ron Garret <ron at flownet.com> wrote:
>>
>>>> On Apr 15, 2023, at 7:38 AM, Tim McNerney <mc at media.mit.edu> wrote:
>>>
>>> Hmm… Is it crazy to contemplate launching an obfuscated Lisp contest?
>>
>> Here is my entry:
>>
>> ((λ f ((λ g (g g)) (λ (h x) ((f (h h)) x))))
>> [...]
>
> Is part of the competition figuring out the definition of the lambda
> syntactic sugar? It's not necessarily the simplest imaginable
> definition, due to possible ambiguity in the handling of the list
> designator.
>
> I think in general, due to the complexity and diversity of CL, such
> competitions could be divided by theme, where one main competition
> allows anything, with a separate category for entries specifically
> focused on the [ab]use of one specific technique, whether readtables,
> local functions, macros from hell, etc. Ideally such competitions
> eventually produce good examples for educating future students.
>
More information about the Openmcl-devel
mailing list