Do we have a EDN parser in Nim language?

Nim might be the most elegant language at C-level in syntax. https://nim-lang.org

Do we have an EDN parser in Nim?

Don’t think so. What’s the point though? Nim backend with ClojureScript frontend?

Or Nim as compiler backend for Clojure? I as just thinking. It still could be slow giving that Clojure has so many dynamic features. But how about subset of Clojure in Nim, starting from EDN?

I think Nim using reference counted memory management might make this hard. I feel it would be easier to build a Clojure over Go because of this, though the concurrency primitives would need to adapt to Go’s most likely. But I’m not an expert in memory management or Nim so I may be wrong.

1 Like

More langs that can read/write EDN means more places we can use EDN as transport / tooling / etc. Seems like a good thing to have, regardless of the potential of writing a complete Clojure interpreter/compiler.

1 Like

Ya, I’m all onboard to make EDN the new JSON, but I found Nim a particularly odd starting point, that’s why I had to ask what the use case was for.

Edit: I was also worried a ClojureScript dev might have been tempted to skip over using Clojure + JVM for their backend :yum:


Will this help?

Already read about it. Nim code is extremely shorten among all static typed languages. That’s why I got interested about Nim for running Clojure DSL.

https://hookrace.net/blog/make-a-lisp-in-nim/

I was also worried a ClojureScript dev might have been tempted to skip over using Clojure + JVM for their backend :yum:

Why? Clojure already got various of backends, why feeling it’s worrying?

I didn’t mean Nim as a new Clojure backend, in the sense of having a Clojure hosted on Nim. I’m all for more platforms running Clojure. I meant that for some say website project where the frontend is in ClojureScript that maybe the backend for that would not be in Clojure, but in Nim, and so EDN parser was needed for the combination with ClojureScript frontend.

Not sure I made that any clearer. I guess it’s because I’ve seen a lot of people come to ClojureScript, but be wary of Clojure because they are wary of the JVM and all the things they hear about it being bloated, slow to start, memory hungry, can’t scale, complicated etc.

P.S. That said, for some serverless use cases it could make sense to actually use Nim over Clojure or some other fast startup and performant language like Go or Rust in the case where ClojureScript isn’t performant enough and GraalVM fails to compile.

1 Like

Oh… I don’t have a clear goal yet. Just thought it might be interesting if I can get Nim running some Clojure things. Meanwhile I do feel wary about JVM, but luckily I have Node.js to do help with my js programs.

What do you think could help with that? Better guides and tutorials? Better tooling? An honest comparison to other runtimes?

Being a full-time JavaScript programmer, I have very little knowledge with Java or JVM. Mostly I live in the world of ClojureScript and feel better if there’s no JVM involved.

Ah ok. Ya the ClojureScript world is great, and Node.JS is a solid platform. Makes sense to reach for it if you come from that background.

yep. JavaScript can do lots of things. funny that with help of WebAssembly, it sounds like to be possible to compile JVM(kind like… for example http://teavm.org/) to wasm and run Java bytecode.