5 ms·
Author here. This pops up on HN regularly, which I'm happy to see, but it's pretty dated at this point. Here is a more recent update: https://blog.rongarret.
by lisper 1y ago
Author here. This pops up on HN regularly, which I'm happy to see, but it's pretty dated at this point. Here is a more recent update:
https://blog.rongarret.info/2023/01/lisping-at-jpl-revisited.html https://blog.rongarret.info/2023/01/lisping-at-jpl-revisited...
And, as always, AMA.
- 7thaccount 1y agoAre you still writing lisp at JPL or NASA, or as a hobbyist?
- lisper 1y agoI left JPL in 2004, never to return :-) I'm mostly retired now but I have a part-time consulting gig that uses CL for developing a bespoke custom chip design tool.
- 7thaccount 1y agoVery cool! Sorry to hear that Clozure CL isn't getting the love it deserves. I really wish the lisp community tried banding together under a single implementation, but we all know about the curse :)
- lisper 1y agoThat's what Common Lisp itself is: one Lisp to rule them all. And it actually works pretty well. There are libraries that work across a wide variety of CL implementations.
- 7thaccount 1y agoYeah, but then there are some schemes and racket and Janet and picolisp and so on too. Then there are different CL implementations right (e.g., Allegro, SBCL, that old one the barski book recommends...etc). Too many implementations and not enough users I guess.
- gugagore 1y agoCan you comment on the relation been a live programming environment (no separate "staged" compilation. There is always a dev environment, the REPL, in a deployment), and dynamic types? The typing available in CL, is it like Python type hints in that they don't affect the meaning of a program whatsoever?
- lisper 1y agoType declarations in ANSI CL are promises you make to the compiler in order to allow it to generate faster code. The compiler can also use this information to generate compile-time warnings and errors, but it is not required to. This makes CL's native compile-time type system good for making your code fast, not so much for making it reliable. But it's straightforward to layer a proper modern type checker on top of CL, and in fact this has been done. It's called Coalton: https://coalton-lang.github.io/ https://coalton-lang.github.io/ IMHO this is the Right Answer: types when you want/need them, dynamism when you don't. It seems like a no-brainer to me. I've never understood why so many people think it has to be one or the other. It seems to me like arguing over whether the window on the bike shed should be on the left or the right. If there is disagreement over this, just put in two windows!
- gugagore 1y agoI think you're describing "gradual typing", which had lots of promise and attention, but arguably achieves the worst of both worlds: https://www.ncameron.org/blog/a-response-to-a-decade-of-developing-a-programming-language/ https://www.ncameron.org/blog/a-response-to-a-decade-of-deve... What it comes down to is a reconciliation between these two views: https://ncatlab.org/nlab/show/intrinsic+and+extrinsic+views+of+typing https://ncatlab.org/nlab/show/intrinsic+and+extrinsic+views+... I think the "reliability" you mentioned is "type safety". And I think the dynamicism I sometimes miss in a language with static types is, in a bizarre way, the lack of runtime type errors. If you load a configuration file, necessarily at runtime, but the configuration file has the wrong format, an error should occur. What kind of error? In essence, a type error... Reusing the type checking machinery at runtime is a benefit to some. At the same time, the possibility of type errors (type unsafety) is a threat to the reliability of programs. I have trouble wrapping my head around it, but I ultimately want the bikeshed with both windows.
- rtpg 1y agoyou mention compiling down Lisp code. Did that come with many restrictions in the end result for how you were coding systems? Or would you basically write lisp "as-is" and get decent results?
- lisper 1y agoI'm not sure what you mean by "compiling down Lisp code." Can you elaborate? That phrase doesn't appear in either article.
- rtpg 1y ago> Tooth's processors didn't have nearly enough RAM to run Lisp directly [1] so instead we used a custom-designed compiler written in Lisp to generate 6811 code. Was thinking about this point in the 2002 article. As a Python user, I could imagine a lot of pain going into "try and compile my Python code" (notably downstream from hashing and operator overloading meaning that I might have to end up shipping the entire Python object model into my binary). But perhaps Common Lisp avoids a lot of that mess by being "just" functions?
- lisper 1y agoIt's a little more complicated than that, and I can't fully explain it in an HN comment. I'd have to give you a crash course in compiler design. But the TL;DR is that if you're building a custom language, Lisp gives you the AST (abstract syntax tree -- look it up if you don't already know) for free. You can also sometimes leverage parts of the Lisp compiler depending on what machine you're targeting, though for the 6811 that was not the case.
- larsbrinkhoff 1y agoI imagine - though I don't know - it might have some similarities with GOAL, see https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp and https://opengoal.dev/docs/intro/ https://opengoal.dev/docs/intro/
- jk4930 1y agoWould you send another Lisp program to space, just for the joy of it?
- lisper 1y agoOf course! :-)
- adityaathalye 1y agoOh, I completely forgot about your blog. I only had the JPL page bookmarked. HN is how I heard the story many years ago, and I posted it again because (a) It's my favourite story and (b) a discussion elsewhere in HN reminded me of it. So I had to. Didn't expect it to bubble up on the front page... that says a lot about the enduring quality of your field experience. Thanks for publishing about it!
- devgoth 1y ago> But the best programming language is like the best wine. Different people like different things, and that's OK. Drink whatever is the best fit for your palate, and code in whatever is the best fit for your brain. never has anything rang truer
- belmarca 1y agoHi :) You should check out Gerbil Scheme (https://cons.io https://cons.io). It is built on top of Gambit Scheme (https://gambitscheme.org https://gambitscheme.org) and has the generics you are looking for.
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- HexDecOctBin 1y agoThanks for sharing the BINDING-BLOCK macro, it solves one of my perennial problems with Lispy languages (I believe I have ranted about this on HN too). The best I could come up with was something that required reimplementing defun, etc. And thanks for the "pass" tip for Python. I gave up using Python a few months ago, and ported all my Python scripts to C and ObjC because I just couldn't handle indentation bugs after every refactor. Never realised the solution could be this simple.
- lisper 1y agoThanks for the kind words!