Re: Obfuscated Lisp contest anyone? (Seriously)
Ron Garret <[email protected]> Sun, 7 May 2023 09:30:24 -0700
| Newsgroups | gmane.lisp.openmcl.devel |
|---|---|
| Message-ID | <[email protected]> |
Here is how I produced my code: https://flownet.com/ron/lambda-calculus.html <https://flownet.com/ron/lambda-calculus.html> The λ macro is defined in the introduction. rg > On May 7, 2023, at 6:58 AM, Tim McNerney <[email protected]> wrote: > > 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 <[email protected]> wrote: >> >> On 4/15/23, Ron Garret <[email protected]> wrote: >>> >>>>> On Apr 15, 2023, at 7:38 AM, Tim McNerney <[email protected]> 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. >> >