3 ms·
PicoLisp was the first programming language i choose to study because i wanted to learn more about programming language design. It really, really embodies "Code
by freemint 4y ago
PicoLisp was the first programming language i choose to study because i wanted to learn more about programming language design. It really, really embodies "Code is data and data is code" while the built-in core are just C calling conventions pointers the interpreter jumps to everything above that is neatly packed AST in memory. The no-sql database is just neatly packed binary AST stored on disk and is accessed via pointers into the database files.
Nowadays i mostly do numerical work where an all interpreted language with only infinite precision integers (or fixed point numbers thinly wrapped on top) is not really suited but if i need to do a complicated automatic code generation pipeline, i just write a short picolisp script which prints the source code in the target language. The ability to execute and modify ASTs as the nested lists they are is just so convenient.
- pflanze 4y ago> picolisp script which prints the source code in the target language. The ability to execute and modify ASTs as the nested lists they are is just so convenient. I'd be interested in seeing some of your code doing this. I've done lots of Scheme and some Clojure and CL, and in my own programming style I mostly avoid using bare s-expressions to represent ASTs (I use structures/objects instead[1]) except in macros, because that is giving me less ambiguity and better error checking. I wonder whether we are working at different levels of scale, or different ways of working that make us prefer one over the other. [1] I guess it's clear what I mean--basically coding like in an object oriented language, albeit without mutation--but here's an example (definitions and use): https://github.com/pflanze/chj-schemelib/blob/master/corescheme.scm https://github.com/pflanze/chj-schemelib/blob/master/coresch... https://github.com/pflanze/chj-schemelib/blob/master/corescheme-optimize.scm https://github.com/pflanze/chj-schemelib/blob/master/coresch...