Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Scheje: A little Scheme implementation on top of Clojure (github.com/turbopape)
102 points by slim on June 9, 2022 | hide | past | favorite | 15 comments


Somebody needs to write a Clojure in Scheme counterpart to this so we can go full circle!


Clojure in Common Lisp came up a couple of days ago: https://github.com/ruricolist/cloture

Discussion: https://news.ycombinator.com/item?id=31655574

It should be straightforward to run it in Scheme, which extends Lisp from what I understand, although I only used Scheme in college. I'm not even entirely sure why Schema and Lisp are separate languages, although I've seen some Lisp examples that seemed a bit too low-level to be of practical use. I find that level of attention generally useless when macros and inlined functions provide leverage for free. Although I'm generally against domain-specific languages, so I would like to know if Scheme is a DSL of Lisp or if either can be implemented completely in the other via macros (or both).

I'm trying to get to higher-level functional languages likes F#, Haskell and Clojure/ClojureScript. Although once functional languages allow impurity via mutable variables, they effectively throw the baby out with the bathwater since that forces large swaths of the codepath to fall back to being imperative. ClojureScript especially has a nice functional-imperative bridge where the code just blocks on input/output and lets the Javascript runtime run, rather than getting too lost in monads (from what I can tell, I haven't actually written any ClojureScript yet). I feel that this was the fundamental insight that's been missed in pretty much every other language, the lack of which led to the function coloring mess of async/await that we'll spend the next few decades stripping from legacy code.



Someone might get the impression that lisps mostly get used to write lisps :P


Some lisps are good for writing forum services where you can have discussions about using lisp to write lisps


Does HN use sexp serialized http messages too ? We'd call that being rethful


Don't those lisps tend to get written in lisp?


Some say its lisps all the way down...


Ostensibly yes, but: https://xkcd.com/224/


Is this a lisp war or a collective lisp prank? Or just an intellectual circlej... uh, exercise?


There's actually a long tradition of writing lisps in lisp. The language really lends itself to explorations into experimental language features.

Of Course, C's tend to be written in C too, so there's that..


Programming languages tend to get programmed in programming languages.

The cool part is really how concise this kind of code is in a lisp (from OP):

https://github.com/turbopape/scheje/blob/master/src/scheje/i...

It's kind of magical! If someone explained this code in say a programming lecture, they would be compelled to dress like a wizard.


Not dressed as a wizard, but there is a wizard on the cover of this book which has an entire chapter on writing an interpreter like that:

https://mitpress.mit.edu/sites/default/files/sicp/full-text/...


Or a fez.





Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: