I see Janet is small and embeddable. Does that mean faster startup time than a full JVM? It's nice that most of Janes the literals match Clojure, so aside from `def` inside a function (as opposed to `let`), it's natural for a Clojure user to read.
I see Janet is small and embeddable. Does that mean faster startup time than a full JVM? It's nice that most of Janes the literals match Clojure, so aside from `def` inside a function (as opposed to `let`), it's natural for a Clojure user to read.
Our product (https://kpow.io) is written in vanilla Clojure/Clojurescript, it will quite happily run with a 64MB heap for smaller workloads.
64Mb for a non-trivial full-stack enterprise-grade application with authentication enabled providing a rich UI and multiple asynchronous and/or scheduled background processes that monitor and manage Kafka resources. Sure we don't recommend running multi-cluster production workloads on a 64MB heap, but requiring further memory for real workloads has nothing to do with Clojure and we're a long way from 'insane' memory use, or doing simple things.
Maybe spending too much time in JavaScript-land has jaded my view of memory consumption.
Two things:
* Janet doesn't have a built-in set data structure literal. Need to use a library for that.
* Janet has mutable and immutable versions of arrays and hashmaps (the literals for the mutable variety are prefixed with `@`)
[0] https://github.com/janet-lang/janet/issues/324#issuecomment-...
It looks like the examples on the linked page use let, so it definitely seems like it's available.
Fwiw, you can technically use def anywhere in Clojure, it's just not good practice to do so.
[1] https://gist.github.com/eigenhombre/ea1d2c6d2fcd5b5c9ca7e8df...
Where Clojure shines, is long-running processes. Try the same benchmark, but instead printing "hello world" 1000000x times and compare it, and you'll have a benchmark showing Clojure's strength rather than weakness.
In the end, benchmarks usually show what the author(s) wanted to show with the benchmark.