Very interesting to see an alternative approach to implementing Clojure!
And it's soooo featureful already!
I 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.
BTW, I thought I would give it a try, but my initial naive attempt hasn't yielded any results:
nix shell nixpkgs#maven nixpkgs#jdk20
Restored session: Wed Sep 20 03:51:47 HKT 2023
pile on master is v0.0.1-SNAPSHOT via on (ap-southeast-1)
java --version
openjdk 20.0.2 2023-07-18
OpenJDK Runtime Environment Zulu20.32+11-CA (build 20.0.2+9)
OpenJDK 64-Bit Server VM Zulu20.32+11-CA (build 20.0.2+9, mixed mode, sharing)
pile on master is v0.0.1-SNAPSHOT via v20.0.2 on (ap-southeast-1)
time ./repl
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.pile:pile-lang >-------------------------
[INFO] Building pile-lang 0.0.1-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ pile-lang ---
[INFO] Deleting /Users/onetom/github.com/sixfootbeard/pile/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ pile-lang ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 8 resources from src/main/pile to target/classes
[INFO]
[INFO] --- compiler:3.10.1:compile (default-compile) @ pile-lang ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 294 source files to /Users/onetom/github.com/sixfootbeard/pile/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.358 s
[INFO] Finished at: 2023-09-20T03:53:30+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project pile-lang: Fatal error compiling: error: release version 20 not supported -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
./repl 2.37s user 0.18s system 236% cpu 1.075 total
Thanks for the kind words. I hadn't noticed the Paths/Path issue. I'll fix that.
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.
Comments
Very interesting to see an alternative approach to implementing Clojure! And it's soooo featureful already!
I 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:
Thanks for the kind words. I hadn't noticed the Paths/Path issue. I'll fix that.
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.