3 ms·
Having built remote monitoring and firmware updating systems for high-current LiFePO4 batteries in Rust for low-level STM32 and ESP32 integrations, Clojure for
by pgt 6y ago
Having built remote monitoring and firmware updating systems for high-current LiFePO4 batteries in Rust for low-level STM32 and ESP32 integrations, Clojure for backend and ClojureScript on the frontend - I can corroborate this.
The dynamism of Clojure and the memory safety of Rust are a strong combination, especially for streaming EDN data over websockets to Clojure or ClojureScript frontend.
However, neither Rust nor Clojure is the end-game. Eventually all languages will IMO adopt memory lifecycle management (lookahead guarantees) and borrow-checking as language features to do runtime optimization.
An interesting language in this regard is Carp, a high-performance statically-typed Lisp implemented in Haskell with borrow-checking: https://github.com/carp-lang/Carp https://github.com/carp-lang/Carp
It's a shame they did not opt to follow Clojure syntax more closely, or it would make the transition much easier for the growing Clojure community. Clojure seems to be winning the Lisp language wars.
Rust could have be so much more if it used S-expressions or M-expressions. The macro language is an abomination compared to Lisp, but I understand they had to lure the embedded C crowd.
- deleted 6y ago[deleted]
- didibus 6y ago> Eventually all languages will IMO adopt memory lifecycle management (lookahead guarantees) and borrow-checking as language features to do runtime optimization Personally I'd be more interested in CPUs adding dedicated GC chips such as this paper: https://ieeexplore.ieee.org/document/8695831 https://ieeexplore.ieee.org/document/8695831 > It's a shame they did not opt to follow Clojure syntax more closely, or it would make the transition much easier for the growing Clojure community I've been keeping an eye on Carp, but never tried it, at first glance it looked like they used the Clojure syntax, what part do they deviate from?
- timdeve 6y agoLove Carp, the fact that it compiles to C means it can run everywhere like embedded (GBA[1], ATSAMD51[2], esp8266[3]) but is also expressive enough that you could build web apps with it[4]. It's very pre-v1 though so expect breakage and API change. [1] https://github.com/TimDeve/dino/blob/master/main.carp https://github.com/TimDeve/dino/blob/master/main.carp [2] https://github.com/TimDeve/carpgamer/blob/master/main.carp https://github.com/TimDeve/carpgamer/blob/master/main.carp [3] https://github.com/TimDeve/carp-lang-arduino/blob/master/main.carp https://github.com/TimDeve/carp-lang-arduino/blob/master/mai... [4] https://github.com/TimDeve/koi/blob/master/examples/notes-json-api/main.carp https://github.com/TimDeve/koi/blob/master/examples/notes-js...
- lmilcin 6y agoHow come, I have the same stack. STM32 with Rust. Mqtt, Clojure for backend and ClojureScript with re-frame for frontend. Couldn't be happier.