Christopher Lemmer Webber is a user on You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Christopher Lemmer Webber @cwebber

What lisps are there for "systems programming" where the system being programmed doesn't have a tagged architecture?

I guess one could say "a whole bunch of compiler intermediate languages" but I'm not sure that counts

· Web · 0 · 1

@cwebber Only thing that comes to mind is Clojure, but that falls into the "we are a JavaScript shop so everything is running on Node" fallacy.

@craigmaloney @cwebber I thought Clojure was a Lisp running on the Java virtual machine.

@starbreaker @craigmaloney Yeah by "systems programming" I mean "compiles to native code"

Though I guess that's maybe kind of a wonky definition, since Guile 3.0 will compile to native code

@cwebber @starbreaker Ah, I thought systems programming meant something like "can be run from cron to do sysadmin tasks". Kind of how PHP was always bastardized.

@craigmaloney @cwebber @starbreaker yeah in my experience "systems programming" is most often used to mean "I need to derive an unwarranted sense of superiority from the fact that the language I'm using is very tedious while lacking both expressivity and formal rigor"

@cwebber @craigmaloney @starbreaker you can certainly apply that term with that definition to Rust, but thankfully most people I've interacted with in that community don't act like that.

I guess my point is that we should prefer terms that have clear unambiguous meanings. If you're asking about lisps that compile to machine code, talk about machine code.

@technomancy @craigmaloney @starbreaker I was joking with Rust, and I think it's good that people are making a "Safer C-like world" with Rust.

My probably hypersnark there was being unimpressed with seeing blogposts where people say, "Wow, I spent five days being beat up by Rust's compiler... now I feel really accomplished!"

@cwebber @technomancy @starbreaker Hey now, some people pay good money for that sort of thing.


@cwebber @technomancy @craigmaloney @starbreaker Do keep in mind that a lot of the people coming to Rust are probably coming from a web development background, so they see it as a "much harder Javascript" rather than as a "much easier/safer C++".

@seanl @cwebber @technomancy @starbreaker I've seen more C/C++ developers coming to it as a "you mean I don't have to lose my foot every time I declare a variable? What is this sorcery?"

@craigmaloney @cwebber @technomancy @starbreaker With all the cool C++14 features I imagine these days it's driven more by a desire to repurpose the brain real estate taken up by all of C++'s dark cobwebby/sharp corners to some more useful purpose. Oh and garbage collection, since one hits the limits of unique pointers rather quickly, and shared pointers are... pointy.

@seanl @cwebber @technomancy @starbreaker Sadly my forays into C++ have looked like this:

book: Here's cout and cin

me: Oh, those are quite nice.

book: Here's hello world in C++

me: Oh, that's real nice.

book: Here's C++'s object syntax.

me: Well, that's not too

book: Here's a more complex example

me: *gibbers in the fetal position in a secluded corner*

@seanl @craigmaloney @cwebber @technomancy @starbreaker yeah, I thought I will be safe if I'm going to use smart modern things but I lost my foot at shared_ptr(&localVariable) recently

@charlag @craigmaloney @cwebber @technomancy @starbreaker And of course adding a lifetime dimension to pointer types to avoid that sort of thing would just complicate the language that much more.

@seanl @cwebber @technomancy @craigmaloney @starbreaker this! Just yesterday I've heard a complain from a JS guy that "they've been developing Rust for so long and it's still as hard as C++".
That's not the point, ugh!

@craigmaloney @technomancy @cwebber @starbreaker The way I would use it is, essentially, "has a facility for inline assembly & can have the entire standard library disabled" -- in other words, "straightforward to write an OS in". But, most people who do "systems programming" aren't actually concerned with avoiding OS dependencies, so their use is going to be very different, though I can't actually figure out what they mean! (Probably what suggested)

@technomancy though you can do systems programming in ada, and it also supports formal proofs

@cwebber @starbreaker @craigmaloney Do you mean things like Gambit and Chez Scheme?

I think nanopass fits the notion of "whole bunch of compiler intermediate languages".

I feel like Kent Dybvig and Mark Feeley (and their students) will be your people on this topic...

@cwebber Chicken comes to mind, but I think Chez and Bigloo also does native code. And SBCL for Common Lisp.

@cwebber would you count Chicken Scheme as a lisp? iirc it uses ansi C as it's intermediate representation

(sorry if I'm misunderstanding what you mean by "tagged architecture")

@balrogboogie @cwebber Chicken Scheme would definitely be the first lisp-ish thing I would go to if I wanted to interface with C code or do low-level programming, because it's simple and I'm already familiar with it. Much nicer to interface with C libraries than Racket since you get to use the headers and the C compiler to make sure your types are correct.

SBCL is the first Common Lisp compiler that comes to mind. AIUI it is competitive with C for performance.


what dou you mean with "tagged architecture ?

@cwebber have you considered SBCL? Or pre-scheme?

@apg pre-scheme definitely, and SBCL in the same way that Guile 3.0 will be. Unfortunately, since we aren't generally using tagged architectures, dynamic typing has a runtime cost that it wouldn't on a tagged architecture. JITs and type annotation (which SBCL does support iirc) may help though.