Hello world in Clojure
See original GitHub issueThis is an amazing project. Thank you for sharing this with the world.
I’ve tried to compile a hello world program with Clojure, and encountered an issue that comes up when Clojure itself is being compiled.
[ERROR] Failed to execute goal de.mirkosertic.bytecoder:bytecoder-mavenplugin:2020-07-29:compile (default) on project bar: Error running bytecoder: Error linking class bar.core: Error linking class clojure.lang.RT: Error linking class clojure.lang.Compiler: Error linking class clojure.lang.Reflector: Cannot find static method lookup in java/lang/invoke/MethodHandles with signature java.lang.invoke.MethodHandles$Lookup() -> [Help 1]
It is an issue that also came up previously when people tried to use the Graal native image on Clojure code. The good news is that the fix is known, the bad news is that the latter is enabled by a GraalVM feature called substitutions
.
The comprehensive description + fix was submitted by @borkdude and I’ll cite the reference here: https://github.com/oracle/graal/issues/2214
It would be awesome if we could get past this hurdle and compile Clojure to wasm
. Thank you in all cases!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Clojure - Basic Syntax - Tutorialspoint
Write 'Hello world' in a complete Clojure program. ... In our Clojure code, we are using the 'println' statement to print “Hello World”...
Read more >Hello World - ClojureBridge London
Hello World. This is always the first tiny baby step when learning a programming language. Let's try “Hello, World!” in Clojure.
Read more >Hello world in Clojure (Example) - Coderwall
Firstly, Download & Install leiningen - which will help you build your Clojure project. Create a new project using leiningen's lein command:
Read more >clojure-by-example/helloworld.md at master - GitHub
Clojure is a great programming language for prototyping. It's allows you to run code in an interactive console for quick feedback. This console...
Read more >Hello World · Practicalli Clojurescript
Hello World. Create a new file called src/hello_world/core.cljs and add the following code: (ns hello-world.core) (enable-console-print!) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Totally makes sense. Thank you for doing the research and sharing this with us. Yours is an awesome project regardless.
The substitutions are only needed for Java 11. An alternative approach is to copy clojure.lang.Reflector.java into your own project and patch accordingly.