Show HN: Pile Programming Language (github.com)
Pile is a Lisp running the JVM. It will feel familiar to users of Clojure as it has much of the same syntax and similar concepts, like persistent collections with literal syntax and namespaces, however no code was copied.
Expected Lisp features like read/eval, macros, first-class functions and a runtime compiler have been implemented. Java interop exists including varargs support, first-class Java functions, functional interface integration and streams. Runtime polymorphism is accomplished by multimethods and generic functions (type-based multiple dispatch). I targeted the modern JVM to take advantage of features like virtual threads, invokedynamic, constantdynamic, and records to name a few.
As I am still writing and testing the language there will be bugs, and the current implementation should only be used for evaluation. I am looking for feedback on the implementation and desired features people may have.
Thanks!
2 comments
[ 2.8 ms ] story [ 133 ms ] threadI was just trying to use `Path/of` in the past few days and it took awhile to get familiar with the Clojure varargs interop, so it's nice to see that pile has simple support for it already.
I was also wondering how much the use of more contemporary Java features could enhance the source code or the runtime performance. This implementation seems like a great test-bed for answering such questions.
A small aside: The README uses `Paths/get`, which might be deprecated eventually: https://github.com/openjdk/jdk/blob/b16e5584abcae18fdcc4494f...
Should just use `Path/of` directly.
BTW, I thought I would give it a try, but my initial naive attempt hasn't yielded any results:
As for your build error I've only seen that with mismatched Java versions. If I run the repl (which is just a single mvn command) with JAVA_HOME pointing to jdk 19 I get the same error. But, I can see obviously you've installed jdk 20 and shown the version. I am unfamiliar with how nix sets up the environment, but is it possible it's running mvn with a different JDK than the version 20 you installed? The seems like it would be the most likely cause.