News for hackers. Stuff that matters.
Re:Beam VM Wisdoms (2019) by uh_uh on Wednesday April 21, 2021 @06:04PM (#26896014)
What I would really like to see is a statically typed language on top of the Erlang VM (dialyzer was not amazing last time I checked it, which was admittedly years ago).
Re:Beam VM Wisdoms (2019) by ricketycricket on Wednesday April 21, 2021 @06:07PM (#26896040)
Gleam exists: https://gleam.run/
Re:Beam VM Wisdoms (2019) by uh_uh on Wednesday April 21, 2021 @06:09PM (#26896062)
I'm looking at this now, thanks! Should have Google'd before typing.
Re:Beam VM Wisdoms (2019) by Joker_vD on Wednesday April 21, 2021 @08:19PM (#26897100)
Dialyzer is such a weird beast, it's overly optimistic IMO. We have code that almost literally is

    -record(outside_error, {
        reason :: term()
    }).

    -record(inside_error, {
        reason :: binary()
    }).

    -spec to_inside_error(#outside_error{}) -> #inside_error{}.
    to_inside_error(#outside_error{reason = Reason}) ->
        #inside_error{reason = Reason}.
and it typechecks just fine. I mean, yeah, we actually always used to have binaries in #outside_error—until now. Now we've started to sometimes pass a map in it. And so, somewhere down the line calls to unicode:binary_to_characters/1 suddenly start crashing because a map is not a binary, duh, but! it all still typechecks. Amazing.
Re:Beam VM Wisdoms (2019) by ff_ on Wednesday April 21, 2021 @06:07PM (#26896044)
Are you aware of PureScript on Erlang?

https://github.com/purerl/purerl

Re:Beam VM Wisdoms (2019) by uh_uh on Wednesday April 21, 2021 @06:09PM (#26896063)
I wasn't, thanks!
Re:Beam VM Wisdoms (2019) by ritchiey on Wednesday April 21, 2021 @08:17PM (#26897083)
You can also compile OCAML/ReasonML to Erlang.

https://caramel.run/