4 ms·
> Note the script block containing a list of shell scripts. Does this look like data? Code is Data! Lisp-it or Quit!
by philipov 8y ago
> Note the script block containing a list of shell scripts. Does this look like data?
Code is Data! Lisp-it or Quit!
- amboo7 8y agohttps://readable.sourceforge.io/ https://readable.sourceforge.io/
- krapp 8y agoOne of these days, I want to come up with a non Turing complete s-expression based config format (basically something like a Lispy JSON) and post it here just to watch Lispers rage at not being able to write DSLs in it.
- q3k 8y agoKicad uses non-turing-complete S-expressions as a file format: https://github.com/KiCad/Connectors.pretty/blob/master/bnc-ci.kicad_mod https://github.com/KiCad/Connectors.pretty/blob/master/bnc-c...
- kazinator 8y agoRational Rose also did that (does? Is that still around?) The IMAP4 mail protocol uses S-expressions also.
- jimbokun 8y agoBut...they will be able to write DSLs in it. Just create functions with the same name as the head atom of the top level lists, then run the config file as a program. Or write macros matching the syntax of your format to generate code. I mean, maybe there is something about your format that makes these specific approachs inconvenient. But once you give a Lisper a bunch of S-expressions, you just opened the door for them to unleash the full power of Lisp upon it. So I think your plan to frustrate Lispers by making an S-expression based format popular, will just give them even more power.
- taeric 8y agoI don't think many non lispers realize that you can pass the same structure to different parts of your program for different manipulations or executions. Truly, the code as data mantra is just too removed from most languages. It is too easy to think eval is something that can just take in a string, at best. Completely missing that you can literally change how your code is evaluated.