LISP Liggas be thinkin dey an AST tree or sum shieet.When will they find out about parsers?
>>108360850Did you know that the Lisp Reader scans a raw character stream and groups characters into tokens (atoms like symbols and numbers, delimiters like parentheses), then recursively builds nested S-expressions from them, bottoming out at atoms to produce a tree of ordinary linked lists? Reader macros intercept special characters mid-stream to expand shorthand like 'foo into (quote foo) before the structure is even complete, and in Common Lisp you can define your own, making the surface syntax extensible from within the language itself. The resulting structure is not some opaque compiler-internal AST; it is the same cons-cell list you manipulate with car, cdr, and cons in your own programs, which is exactly what homoiconicity means. Because code and data share the same representation, macros are just functions that take your source as an ordinary list, mess with it using ordinary list operations, and hand back new code, with no special AST API or reflection framework needed. This self-similarity is not a curiosity but a foundational design decision that every language trying to bolt metaprogramming on afterward is slowly and painfully trying to reinvent.And if all of that sounds like the most elegant, self-consistent system for representing and manipulating code ever devised, that's because God wrote the universe in Lisp and every other programming language is just humanity's failed attempt to read the source code.
>>108360850>When will they find out about parsers?never, it's the quintessential skill issue of the Lisp fag