5 ms·
Early Lisp Part II
- sillysaurusx 6y agoFor various ways of interpreting a lisp interpreter, see The Art of the Interpreter: https://dspace.mit.edu/bitstream/handle/1721.1/6094/AIM-453.pdf?sequence=2&isAllowed=y https://dspace.mit.edu/bitstream/handle/1721.1/6094/AIM-453.... I'm not sure what to say about it, other than it's well worth your time. It's also a lot of fun to implement the interpreters it presents. Eventually it settles on emacs-style global namespaces, after more or less proving that every other alternative doesn't really work.
- Sniffnoy 6y agoNon-mobile link: http://funcall.blogspot.com/2021/04/early-lisp-part-ii-apply-redux.html http://funcall.blogspot.com/2021/04/early-lisp-part-ii-apply...
- siraben 6y agoThe Scheme dialect of Lisp is perhaps my favorite for how small the core is (and hygienic macros are an elegant solution to avoiding accidental captures). The R5RS language report also specifies the formal denotational semantics of the language. But it's also more precise than McCarthy's presentation, the denotational semantics can be easily turned into a real, correct-by-construction interpreter[0]. [0] https://github.com/siraben/r5rs-denot https://github.com/siraben/r5rs-denot
- sillysaurusx 6y agoHygenic macros are a solution to a problem that doesn't exist, though. The whole point of macros is to control evaluation. Sometimes you want intentional capture; it's not accidental. Throwing out the chainsaw just because a few people use it improperly means you won't be able to cut trees so easily. But, different people can feel differently about it. :)
- db48x 6y agoI disagree. The hardest part about teaching macros in Lisp is teaching the hoops we much jump through using gensym to avoid accidents. It’s better that the compiler do that for us. And it’s not as if it is impossible to make a deliberate capture in Scheme; you just have to opt in to it, rather than carefully avoiding it in 99% of the macros that you write.
- bjoli 6y agoWhy do lispers believe that scheme can't introduce bindings? Every scheme has a lower lever hygienic macro facility that allows introducing bindings. R6rs has syntax-case. Others have explicit/implicit renaming or syntactic closures. Hygiene is opt-out (except maybe in explicit renaming), not opt-in like in common lisp. That is, IMO, a good thing.
- mst 6y agoGiven a decent percentage of my macros -don't- need capturing I quite like having a form available that's hygeinic out of the box to save me from capturing by accident. I would not at all be happy to not have a facility to do capturing as well, though.
- wtetzner 6y agoScheme gives the ability to capture where you want to. You just have to be explicit about it. Seems like the right default to me.
- antiquark 6y agoWhy do so many HN'ers like lisp? It's just... archaic.
- abecedarius 6y agoYou could've phrased your question in a way that's not like dissing someone's fashion sense. That aside, I think Lisp is genuinely at a sweet spot for the product of nice-to-program-with and simple-to-implement. It's historically important besides, and there's lots of code worth reading in it (SICP and PAIP just to start).
- chriswarbo 6y agoWould you care to elaborate, in some tangible, concrete way?
- sevensor 6y agoYou'll find there are also plenty of people on here who like Forth, and even a few Fortran partisans. There are lots of ways to gratify your curiosity.
- InfiniteRand 6y agoAsk Paul Graham http://www.paulgraham.com/onlisp.html http://www.paulgraham.com/onlisp.html
- submeta 6y agoBecause Lisp has positively influenced many programming paradigms du-jour, it is profound, intellectually satisfying to program in, and to some people's eyes it is a beautiful language, easy to prototype in, easy to write DSLs with. A perfect tool for a hacker-minded programmer.
- aidenn0 6y agoCommon lisp has the best tooling of any dynamic programming language.
- remexre 6y agoFor real -- SLIME's almost 2 decades old, and having used it makes me hate developing Python and JavaScript; being able to fix up broken code when it throws an exception, without having to restart the program is just so dang nice during development. Being able to get completions etc. based on the real state of the real program (as opposed to the results of some imprecise static analysis) is super-nice as well.