Top
Best
New

Posted by pushpankar 2 days ago

Chez from a Clojurian perspective(get-aksh.com)
69 points | 44 commentspage 2
silcoon 6 hours ago|
Can I ask you why you choose Chez, over other schemes? Why not Racket, GNU Guile or CHICKEN scheme?

Interesting reading anyway, kudos!

pushpankar 6 hours ago||
Because

1. it has great performance which I wanted for a text editor.

2. if I ever needed to get to low level, it has great c ffi. I ran some benchmark and c ffi cost was among the best.

sjamaan 3 hours ago||
FWIW, CHICKEN's FFI is pretty good too, and it allows redefining modules and even evaluating code inside modules, so might fit your interactivity needs better. The string copying overhead in the FFI is gone in CHICKEN 6 now.
DonaldPShimoda 4 hours ago||
FWIW, Racket is not actually a Scheme. It's a derivative that shares a lot in common, but it does not strictly follow the Scheme standard. (It does provide Scheme implementations in the standard library, though.)
Zambyte 3 hours ago||
> It's a derivative that shares a lot in common, but it does not strictly follow the Scheme standard.

I've used a decent amount of Schemes and even contributed to some. It's kind of my understanding that this is the case for all Schemes, really. Most Schemes support multiple versions of the standards (r5rs, r6rs, r7rs) as well as their own non-standard extensions, which are essentially required to be useful.

Saying that Racket supports X language doesn't say much, being a language oriented language - any language can be included as a library. But, as you mentioned, Scheme standards are available through the Racket standard library, which is about as much Scheme as anything you would call a Scheme implementation.

Maybe it's a bit reductionist to call Racket a Scheme implementation, but in general Lisps are always much more than the standards they implement.

DonaldPShimoda 3 hours ago||
Maybe a more critical note is that the Racket maintainers explicitly chose to move away from labeling Racket as "a Scheme". My understanding is that most Scheme implementations are merely extensions on top of a Scheme standard, whereas Racket makes some changes that are not backwards compatible. Racket is also not morally a Scheme because of differing guiding philosophies in the implementation.
sjamaan 2 hours ago||
You nailed it. They don't really want to be seen as a Scheme implementation anymore. That's also why they renamed from PLT Scheme to Racket: https://racket-lang.org/new-name.html
throwaway27448 6 hours ago||
> You can implement a namespace-like thing on top of it and together with continuations it can surpass the interactivity of Clojure.

I'm curious what you're thinking of here. Can you expound?

pushpankar 5 hours ago|
Environments are top level things that can store functions and other defintions. These can be mutable. The other side of this is continuation. A continuation is invocable multiple times in scheme.

Lets say you want to debug a function.

```

(define (f1 arg1 arg2)

  ;; body calls f2 and others
)

```

Now you can capture the continuation just before the body of the f1. Then, you can use chez's eval-in-continuation to evaluate the updated body of the function. Once you are satisfied, you can continue the continuation with output. If there is problem in f2, you can update f2 and retry from f1 again. You can walk up/down the continuation stack to go back to different point and try from there.

Similarly, you can declare a function, implement its body, eval-in-continuation, update the body until you are satisfied, and then move on to next thing.

Almost all features are there. It just needs a good editor support and some ux design.

nathell 6 hours ago|
These days we also have Jolt, a vibecoded Clojure implementation on top of Chez!

https://jolt-lang.net/

brabel 6 hours ago||
This looks very cool , how does it compare with the similar language, Jank?
0_gravitas 2 hours ago||
Jank uses C++/LLVM as it's "host" language, like Clojure uses the JVM as it's host, or ClojureCLR uses .NET as it's host

You can see a compiled list of dialects and what host/space they target here if you're interested: https://clojure.cc/dialects/

zelphirkalt 44 minutes ago||
Interesting. Though already the intro text reeks of LLM vibing, which is a little not so much faith-inspiring.