News for hackers. Stuff that matters.
Re:Gleam: a type safe language on the Erlang VM by bmitc on Tuesday November 07, 2023 @06:52PM (#38184838)
You could use F# for that purpose.
Re:Gleam: a type safe language on the Erlang VM by CooCooCaCha on Tuesday November 07, 2023 @06:55PM (#38184860)
I want something more like rust or typescript. Not Haskell.
Re:Gleam: a type safe language on the Erlang VM by bmitc on Tuesday November 07, 2023 @06:59PM (#38184903)
Then F# it is. :)

Rust was partially inspired by F# and OCaml and actually had a much more ML-like syntax early on. Probably something similar goes for Typescript. And actually, the same for Gleam as well.

F# doesn't really relate to Haskell at all. They are very different languages. F# is a multiparadigm language that easily supports concise code in the imperative, OOP, and functional styles.

It sounds like you maybe don't know much about F# if you think it's like Haskell, which is okay. But that's also why I would recommend checking it out.

Re:Gleam: a type safe language on the Erlang VM by xupybd on Tuesday November 07, 2023 @07:25PM (#38185136)
F# is not Haskell at all. If you want to write non functional code you can. It's functional first but it has side effects, mutable variables and a host of features you get in other languages. I really recommend trying it.
Re:Gleam: a type safe language on the Erlang VM by giraffe_lady on Tuesday November 07, 2023 @08:14PM (#38185495)
I use ReScript for this. Bindings for node are very complete and for deno they're enough for the most common uses.
Re:Gleam: a type safe language on the Erlang VM by hannofcart on Tuesday November 07, 2023 @11:39PM (#38186864)
+1 to this.

Love Rust and everything about it.

However, to script something small/casual I would like all the rest of Rust but with automatic garbage collection, without having to worry about lifetimes.

Re:Gleam: a type safe language on the Erlang VM by cpursley on Tuesday November 07, 2023 @06:54PM (#38184859)
Does F# compile to distributed Erlang?
Re:Gleam: a type safe language on the Erlang VM by sshine on Tuesday November 07, 2023 @07:45PM (#38185303)
Not practically.

There are some one-person attempts at compilers from F#/OCaml to BEAM, but they haven’t seen an update for some years.

Re:Gleam: a type safe language on the Erlang VM by Conscat on Wednesday November 08, 2023 @03:53AM (#38188102)
Caramel is a very similar language (ML dialect) that builds for BEAM.

https://caramel.run/

Re:Gleam: a type safe language on the Erlang VM by yashrk on Wednesday November 08, 2023 @06:19AM (#38188913)
No updates on GitHub since Aug 2022. Isn't it abandoned?

Supported and battle-tested OCaml or StandardML for BEAM would be great, of course. I'm waiting for something like this for years.