This is one of the very few cases where adding the date in parentheses in the HN submission screws up the title of the post.
(How to Write a (Lisp) Interpreter (In Python)) (2010)
61–70 of 101 posts
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#62What I find promising about LISP is the ability to do term rewriting and macros. But people write lisps in imperative style rather than definitions of desired behaviour declaratively. I don't think we've sufficiently solved how to define desired behaviour to a computer. Term rewriting behaviours. What are your thoughts? I started trying to implement term rewriting into my LISP parser, which is the idea that we can ma…
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#63This might sound crazy or stupid but I really want to know if there is some Lisp with manual memory management? I love Lisp syntax. People complain about the parentheses but for me they are a blessing. I like how extremely uniform and regular they look. But all Lisps I've seen have garbage collectors. If I could find a Lisp with manual memory management, I could ditch C++ in favor of that Lisp. Is there one?
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#64Earlier quoted context omitted.
Someone once said Javascript is a "Scheme-like language with C-like syntax". Always loved that and ashamed I can't remember the original author of the quote. Not Crockford... Maybe Michael Fogus?
Not sure, but Brendan Eich originally wanted to just put Scheme in the Netscape browser but his bosses wanted something with a Java like syntax. (I looked at Wikipedia for reference and it matches my memory of older sources.)
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#65Or you can just from fakelisp import * And turn your Python into a Lisp. https://github.com/akalenuk/fakelisp
Not exactly the same (doesn't embed into the source like this did), but I believe Hylang[0] is the best Lisp package available for modern Python. [0] https://github.com/hylang/hy
Hy is pretty much Lisp-like syntactic sugar over Python semantics. Calysto is a full scheme implementation.
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#66Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#67This might sound crazy or stupid but I really want to know if there is some Lisp with manual memory management? I love Lisp syntax. People complain about the parentheses but for me they are a blessing. I like how extremely uniform and regular they look. But all Lisps I've seen have garbage collectors. If I could find a Lisp with manual memory management, I could ditch C++ in favor of that Lisp. Is there one?
Any by a "compiler" I'm talking doing something simply like taking Pascal, converting it to an s-expr grammar, and going to town.
Scheme can be a simple algol style language. Using s-expr syntax just made your lexer/parser much simpler. And (simple) compilation is really not that hard (just compile it to C for your first crack if you want).
I bet you could get quite far quite quickly.
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#68Earlier quoted context omitted.
Lisp is eldritch by programming language standards; we are still wrestling with the ramifications of McCarthy's half-page of code.
You think lisp is "weird and sinister or ghostly" and that 'we' are still wrestling with something 66 years later? This sounds more like someone getting caught up in the pageantry of a niche that pragmatic people have left behind a long time ago. Lisp was very influential, but those advancement have made their way into practical languages and lisp has been impractical for many decades at this point.
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#69This is one of the very few cases where adding the date in parentheses in the HN submission screws up the title of the post.
Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)
#70What I find promising about LISP is the ability to do term rewriting and macros. But people write lisps in imperative style rather than definitions of desired behaviour declaratively. I don't think we've sufficiently solved how to define desired behaviour to a computer. Term rewriting behaviours. What are your thoughts? I started trying to implement term rewriting into my LISP parser, which is the idea that we can ma…
Lisp is not the language for that unfortunately, it is very much an imperative language with better syntax and _some_ macros. Scheme is close but quotation isn't thought about nearly enough. It is generally a CS problem as logic systems with quotation are very much an open problem. I think that types have gotten too much attention and quotation way too little. Macros are basically a way to deal with the fact that nei…
In support of ways of implementing Scheme hygienic macros, there exists an invention known as syntactic closures. In what ways does a syntactic closure fall short of being a "first class quotation"?