8 ms·
Joker: A small interpreted dialect of Clojure written in Go
- Zababa 5y agoThis would go really well with https://cyclone.thelanguage.org/ https://cyclone.thelanguage.org/.
- eggy 5y agoI 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.
- bruce343434 5y agoWhat made you give up on rust?
- truth_ 5y agoFor me, it was "no need". I liked everything I saw. I just had no need to write Rust.
- eggy 5y agoI am also learning SPARK 2014, a subset of Ada, that is complex, but for me not too complicated. I find Rust complex and complicated, maybe others don't. I will probably stick with SPARK 2014 for my high integrity experiments with hardware and controls. I use C to do a lot of other prototyping and quick apps. My thought is that I will wait for Rust to mature more, but I think it is always going to be complicated and suit the applications it was created for, and I may never have a need for it, or to learn it sufficiently to be able to switch to it.
- pjmlp 5y agoIf you had issues with Rust, with Cyclone it would be even more complex, given the way its type system works, in fact Rust is must more ergonomic from what I can gather from the surviving Cyclone papers.
- bitwize 5y agoCyclone was a research project which is now finished. The good news is, there is a production successor language to Cyclone -- it's called Rust.
- masijo 5y agoThis 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.
- bpicolo 5y agoCan do that with Graal these days: https://github.com/BrunoBonacci/graalvm-clojure/blob/master/doc/clojure-graalvm-native-binary.md https://github.com/BrunoBonacci/graalvm-clojure/blob/master/...
- uDontKnowMe 5y agoI 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.
- dig1 5y agoTrue, but you don't develop that way using graal. You develop java apps the usual way (eclipse, emacs/vim/maven, whatever) and create a fat jar (or uberjar). When you make sure the application is working, compile it with graal, creating a static binary. Clojure cycle is even faster because you keep REPL open and evaluate code directly while application is running. After that, you build uberjar, then compile it with graal.
- uDontKnowMe 5y agoWould there not be a risk that you may get something working nicely in openjdk and then you go to do a native compilation, and it turns out that it doesn't work due to some new method call which uses reflection or something?
- didibus 5y ago
- Joker_vD 5y agoHey! 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?
- stcredzero 5y agoWhy 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.
- emacsen 5y agoThe Eclipse Public License is a showstopper for me. :(
- didibus 5y agoSome clarification for those interested: Joker is not a dialect of Clojure hosted on the Go runtime. Joker is a dialect of Clojure using its own interpreted runtime, that happens to be implemented in Go. That means you cannot use Joker to build statically linked Go binaries and you cannot interop with Go from your own code. And if you're interested in the idea of having an interpreted implementation of Clojure, for scripting use cases and fast startup, I would recommend you look into Babashka instead of Joker: https://babashka.org/ https://babashka.org/ Joker was the best interpreted Clojure prior to Babashka, and nowadays, I would recommend Babashka over Joker all the time. The reason Babashka is better than Joker for this is that it is implemented in Java, so it can directly reuse the existing Clojure implementation and libraries as-is as part of its interpreter. That allowed it to quickly surpass Joker in the amount of Clojure features it support and libraries it exposes, and continue to quickly keep up with Clojure. I'd also say the main developer behind Babashka is more active. Even though Babashka is implemented in Java, it is still a single statically linked binary runtime that starts extremely fast and has a small memory footprint. Kudos to Joker though for pioneering the idea and leading to Babashka. Edit: And if you were excited because you thought this would let you write compiled statically linked binaries in Clojure, well for that you want to look at GraalVM native compilation which lets you compile real Clojure programs as low memory, fast startup, statically compiled single binaries: https://github.com/lread/clj-graal-docs https://github.com/lread/clj-graal-docs
- didibus 5y agoA small correction, Babashka is implemented in Clojure, not Java, but, as such, it can also make use of Java libraries as part of its implementation. So Babashka can bundle both Clojure or Java libraries inside itself.
- cutler 5y agoFor me the most interesting compilation target for Clojure is Dart. Writing Flutter apps in Clojure would be the dog's spherical objects. David Nolen thinks likewise and has commented on it in a recent defn podcast. Christophe Grand and Baptiste Dupuch are the brains behind it: https://twitter.com/cgrand/status/1350063059864346624?lang=en https://twitter.com/cgrand/status/1350063059864346624?lang=e...
- didibus 5y agoHas Flutter really become that popular and awesome? I feel I'm still seeing a lot more of React Native or Electron and other JS based front-ends in the wild, for which ClojureScript is best suited. I'm not sure I'm convinced Flutter will be able to break through those even with Google behind it.
- nkozyra 5y agoI feel like it's picking up steam. I've written a few things in it and found fewer footguns than React Native. Granted, it comes with its own set of idiosyncracies, breaking version changes, half baked community libraries and developer ecosystem, but that's par for the course.
- stefanos82 5y agoAm I the only one who sees Duke, the Java mascot in logo?