Live data from Hacker News

Joker: A small interpreted dialect of Clojure written in Go

joker-lang.org

11–20 of 73 posts

Re: Joker: A small interpreted dialect of Clojure written in Go

#11
post #3

This project looks awesome, though I'm a bit sad that "performance" is a non-goal as stated in the README. Clojure being able to compile to a single shippable binary is just what I need in my life. Kudos to the author.

I have long had the ambition to be the N:th guy to try Clojure on C++. For similar reasons. I have a pretty good idea how to do it, already got HAMT and some macroexpanded code to work. But then you remember how even ClojureCLR struggled at times, and that you'd be lightyears behind that, not to speak of CLJ/CLJS, and alone. Maybe one day? :)

Re: Joker: A small interpreted dialect of Clojure written in Go

#12
post #11
post #3

This project looks awesome, though I'm a bit sad that "performance" is a non-goal as stated in the README. Clojure being able to compile to a single shippable binary is just what I need in my life. Kudos to the author.

I have long had the ambition to be the N:th guy to try Clojure on C++. For similar reasons. I have a pretty good idea how to do it, already got HAMT and some macroexpanded code to work. But then you remember how even ClojureCLR struggled at times, and that you'd be lightyears behind that, not to speak of CLJ/CLJS, and alone. Maybe one day? :)

It would seem to me the most significant challenge would be having functional data structures in C++, that would be a non-trivial effort I would think. Even if you were to use other libraries that experiment with this. Without those, the language just doesn’t make any sense.

Re: Joker: A small interpreted dialect of Clojure written in Go

#13
post #12
post #11

Earlier quoted context omitted.

I have long had the ambition to be the N:th guy to try Clojure on C++. For similar reasons. I have a pretty good idea how to do it, already got HAMT and some macroexpanded code to work. But then you remember how even ClojureCLR struggled at times, and that you'd be lightyears behind that, not to speak of CLJ/CLJS, and alone. Maybe one day? :)

It would seem to me the most significant challenge would be having functional data structures in C++, that would be a non-trivial effort I would think. Even if you were to use other libraries that experiment with this. Without those, the language just doesn’t make any sense.

Yeah, that was the problem with most attempts I saw, unordered_map won't work. I did write a persistent hash map and vector [1], but ended up mostly using them in C++ projects. I wouldn't advise anyone else to use them at this level of testing/maturity though. Writing them was super interesting.

1: https://hg.sr.ht/~vnorilo/pcoll/browse (not production quality)

Re: Joker: A small interpreted dialect of Clojure written in Go

#14
post #12
post #11

Earlier quoted context omitted.

I have long had the ambition to be the N:th guy to try Clojure on C++. For similar reasons. I have a pretty good idea how to do it, already got HAMT and some macroexpanded code to work. But then you remember how even ClojureCLR struggled at times, and that you'd be lightyears behind that, not to speak of CLJ/CLJS, and alone. Maybe one day? :)

It would seem to me the most significant challenge would be having functional data structures in C++, that would be a non-trivial effort I would think. Even if you were to use other libraries that experiment with this. Without those, the language just doesn’t make any sense.

Immer [0][1] seems like a really serious attempt at bringing high-quality persistent data structures to C++.

[0]: https://www.youtube.com/watch?v=sPhpelUfu8Q

[1]: https://sinusoid.es/immer/

Re: Joker: A small interpreted dialect of Clojure written in Go

#15
post #2

This would go really well with https://cyclone.thelanguage.org/ .

I realize the project is no longer being developed by the original group, but is there a recent fork by others or version of cyclone for 64-bit computers?

I've given up on Rust for me personally, but I think it is a great PL and effort. I am still playing with Zig, but I would love to just leverage my C background, and see if Cyclone eases me away from always coding in C.

Re: Joker: A small interpreted dialect of Clojure written in Go

#16
post #3

This project looks awesome, though I'm a bit sad that "performance" is a non-goal as stated in the README. Clojure being able to compile to a single shippable binary is just what I need in my life. Kudos to the author.

What would be the advantage over other Lisps if you won't be able to leverage JVM ecosystem?

Re: Joker: A small interpreted dialect of Clojure written in Go

#17
post #7

Hey! That's my name! :) Incidentally, I also have a small language also implemented in Go although it's actually called "🃏". So it's a Clojure REPL and linter/formatter? Why have REPL at all then?

Why have REPL at all then?

To many, interactive development and debugging is the main point of the Clojure REPL. (Also true for many dynamic languages.) I take it you don't code and debug using such techniques. Some feel they are a revelation.

Re: Joker: A small interpreted dialect of Clojure written in Go

#18
post #4
post #3

This project looks awesome, though I'm a bit sad that "performance" is a non-goal as stated in the README. Clojure being able to compile to a single shippable binary is just what I need in my life. Kudos to the author.

Can do that with Graal these days: https://github.com/BrunoBonacci/graalvm-clojure/blob/master/...

I explored this briefly but it ended up taking about 25 seconds to compile hello-world in Clojure. That struck me as causing a lot of pain to develop for.

That, combined with how you'd lose access to a lot of the java library ecosystem, makes it less appealing to me to develop on.

Re: Joker: A small interpreted dialect of Clojure written in Go

#19
post #3

This project looks awesome, though I'm a bit sad that "performance" is a non-goal as stated in the README. Clojure being able to compile to a single shippable binary is just what I need in my life. Kudos to the author.

It’s difficult to write a fast interpreter in Go. It doesn’t optimize interpreter inner loops particularly well, you can’t do the data structure tricks you can do in C, and there is no JIT compiler available like in Java.

The best way forward might be an option to compile some Joker code by generating Go code for it.

(This is based on writing an interpreter a few years ago. Perhaps Go’s compiler has improved?)

Re: Joker: A small interpreted dialect of Clojure written in Go

#20
post #11
post #3

This project looks awesome, though I'm a bit sad that "performance" is a non-goal as stated in the README. Clojure being able to compile to a single shippable binary is just what I need in my life. Kudos to the author.

I have long had the ambition to be the N:th guy to try Clojure on C++. For similar reasons. I have a pretty good idea how to do it, already got HAMT and some macroexpanded code to work. But then you remember how even ClojureCLR struggled at times, and that you'd be lightyears behind that, not to speak of CLJ/CLJS, and alone. Maybe one day? :)

I think recreating Clojure point by point is not optimal. There is some middle ground between full on Clojure and the straightjacket of the STL datastructures.

- Clojure is kinda difficult to reason about performance wise. The lazyness.. some weird corner cases (like how `(first ..)` is slower than `(nth .. 0)`

- The STL is very strict on the "zero cost abstraction" front.

Maybe something like Immer but with some syntactic sugar to make it more light weight like Clojure?

With hooking into GDB you could probably make a REPL as well.. GDB has live code reload, introspection - you even get state of crash and sane stack traces :)

Post reply on HN