Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
caramel
:candy: a functional language for building type-safe, scalable, and maintainable applications
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Gleam is written in Rust and is a nice example (besides Rust itself) of what it looks like to write a language in Rust. By my own tracking (https://github.com/alilleybrinker/langs-in-rust) Gleam is one of the most popular languages written in Rust and is one of the few top languages in that list which isn't a reimplementation of an existing language!
I think Haskell or OCaml would do a better job on the ADTs for a parse tree. When doing this, I found Rust's enums... anemic... and got very annoyed by the awkwardness of having to Box recursive types. I was reaching for the ability to continue to be able to pattern match on nodes while attaching common attributes (line numbers, etc.) and ended up having to bury everything 1 level deep in a struct which ended up feeling awkward.
That and Rust's iterators are terrible at introducing ownership agony.
In any case, I've ... done it (https://github.com/rdaum/moor/blob/main/crates/compiler/src/...) but can't say I liked it.
I do really like "pest" as a parser generator though.
If this piqued your interest you might also be interested in: https://github.com/leostera/riot
https://github.com/wmealing/gleam-otp-design-principals/blob...
This is what I wrote regarding using otp in gleam. One of the issues I'm working on next is to send typed messages to processes, which has me a little stumped.
At the moment the typed channels work, you can't register () a channel or a pid.
I will likely continue working on this document once I have my current project completed.
They seem to have rewritten/wrapped OTP, but it's not production ready. https://github.com/gleam-lang/otp
YMMV, but a BEAM language without OTP severely limits its appeal and usability.
Caramel is a very similar language (ML dialect) that builds for BEAM.
https://caramel.run/