←back to thread

Hofstadter on Lisp (1983)

(gist.github.com)
372 points Eric_WVGG | 1 comments | | HN request time: 0.217s | source
Show context
InDubioProRubio ◴[] No.41860980[source]
Lisp aNeeds Braces
replies(3): >>41863741 #>>41866496 #>>41868005 #
1. paddy_m ◴[] No.41863741[source]
> Lisp needs braces

You're a troll, but I'll feed you. I adapted Peter Norvig's excellent lispy2.py [0] to read json. I call it JLisp [1].

Lispy2 is a scheme implementation, complete with macros that executes on top of python. I made it read json, really just replacing () with []. and defining symbols as {'symbol': 'symbol_name'}. I built it because it's easier to get a webapp to emit JSON then paren lisp. I also knew that building an interpreter on top of lisp meant that I wouldn't back myself into a corner. There is incredible power in the lisp, especially the ability to transform code.

[0] https://norvig.com/lispy2.html

[1] https://github.com/paddymul/buckaroo/blob/main/tests/unit/li... #tests for JLisp