Live data from Hacker News

(How to Write a (Lisp) Interpreter (In Python)) (2010)

norvig.com

51–60 of 101 posts

Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)

#51

This 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?

There is PreScheme[0]

[0] https://groups.scheme.org/prescheme/1.3/

Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)

#52

This 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?

[deleted]

Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)

#53
I used Norvig’s lisp2.py to build a low code UI. I modified the interpreter to accept JSON flavored lisp, basically replace parens with brackets. The upside is that it was very very easy to make a react front end that manipulates JSON (JLisp). My thinking was, I need a serialization format for operations from the front end, and a way to interpret them. I could write my own language that no one has heard of, or use lisp, which few have used.

https://github.com/paddymul/buckaroo/blob/main/buckaroo/jlis...

Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)

#54

This 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?

You can use a regular common lisp distribution like SBCL and just stick to foreign types https://www.sbcl.org/manual/#Foreign-Types this way you still have a GC for lighter tasks but with the option of manual memory management

Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)

#55

What 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…

Truly futuristic programming where we we program behaviours. Lisp is 66 years old, I think its impact on computer science has already happened.

Lisp is eldritch by programming language standards; we are still wrestling with the ramifications of McCarthy's half-page of code.

Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)

#56

This 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?

If it exists, it's probably among the ones listed at https://www.softwarepreservation.org/projects/LISP/

If it doesn't exist, you could try modifying one of the listed implementations.

Re: (How to Write a (Lisp) Interpreter (In Python)) (2010)

#57
post #55

Earlier quoted context omitted.

Truly futuristic programming where we we program behaviours. Lisp is 66 years old, I think its impact on computer science has already happened.

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)

#58

This 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?

You can use a regular common lisp distribution like SBCL and just stick to foreign types https://www.sbcl.org/manual/#Foreign-Types this way you still have a GC for lighter tasks but with the option of manual memory management

You can also use the DYNAMIC-EXTENT declaration to (in general) tell your implementation to stack-allocate a value.

http://clhs.lisp.se/Body/d_dynami.htm#dynamic-extent

Post reply on HN