News for hackers. Stuff that matters.
Re:Scheje: A little Scheme implementation on top of Clojure by ARandomerDude on Thursday June 09, 2022 @11:01AM (#31682074)
Somebody needs to write a Clojure in Scheme counterpart to this so we can go full circle!
Re:Scheje: A little Scheme implementation on top of Clojure by zackmorris on Thursday June 09, 2022 @03:13PM (#31685504)
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.

Re:Scheje: A little Scheme implementation on top of Clojure by screap on Thursday June 09, 2022 @11:25AM (#31682403)
Re:Scheje: A little Scheme implementation on top of Clojure by jascii on Thursday June 09, 2022 @10:38AM (#31681738)
Someone might get the impression that lisps mostly get used to write lisps :P
Re:Scheje: A little Scheme implementation on top of Clojure by MawKKe on Thursday June 09, 2022 @10:47AM (#31681865)
Some lisps are good for writing forum services where you can have discussions about using lisp to write lisps
Re:Scheje: A little Scheme implementation on top of Clojure by agumonkey on Thursday June 09, 2022 @03:26PM (#31685666)
Does HN use sexp serialized http messages too ? We'd call that being rethful
Re:Scheje: A little Scheme implementation on top of Clojure by jascii on Thursday June 09, 2022 @10:50AM (#31681900)
Don't those lisps tend to get written in lisp?
Re:Scheje: A little Scheme implementation on top of Clojure by MawKKe on Thursday June 09, 2022 @10:58AM (#31682023)
Some say its lisps all the way down...
Re:Scheje: A little Scheme implementation on top of Clojure by jascii on Thursday June 09, 2022 @06:32PM (#31687804)
Ostensibly yes, but: https://xkcd.com/224/
Re:Scheje: A little Scheme implementation on top of Clojure by AtlasBarfed on Thursday June 09, 2022 @10:39AM (#31681758)
Is this a lisp war or a collective lisp prank? Or just an intellectual circlej... uh, exercise?
Re:Scheje: A little Scheme implementation on top of Clojure by jascii on Thursday June 09, 2022 @10:45AM (#31681825)
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..

Re:Scheje: A little Scheme implementation on top of Clojure by dgb23 on Thursday June 09, 2022 @11:31AM (#31682505)
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.

Re:Scheje: A little Scheme implementation on top of Clojure by Jtsummers on Thursday June 09, 2022 @12:05PM (#31682940)
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/...

Re:Scheje: A little Scheme implementation on top of Clojure by jgwil2 on Thursday June 09, 2022 @03:22PM (#31685625)
Or a fez.
Re:Scheje: A little Scheme implementation on top of Clojure by kkylin on Thursday June 09, 2022 @04:50PM (#31686670)