Live data from Hacker News

Beam VM Wisdoms (2019)

beam-wisdoms.clau.se

31–40 of 40 posts

Re: Beam VM Wisdoms (2019)

#31
post #24

Earlier quoted context omitted.

Most "1st year of CS" people do not know C or understand how pointers work, let alone an 'opcode'

C is not a mandatory subject in first year of CS where you live? At least it used to be where I live, pretty universally (although at that time our universities were in the middle of a Pascal-to-C transition, so as to speak).

The United States? No, there are no mandatory subjects for majors.

My CS curriculum didn't have any "learn this language" classes, you were just expected to know the language that the class was taught in, with the exception of one of the classes that spent some time reviewing OCaml concepts.

Mostly it was C/C++ and Python for the scientific/numeric classes.

Re: Beam VM Wisdoms (2019)

#32
post #24

Earlier quoted context omitted.

Most "1st year of CS" people do not know C or understand how pointers work, let alone an 'opcode'

C is not a mandatory subject in first year of CS where you live? At least it used to be where I live, pretty universally (although at that time our universities were in the middle of a Pascal-to-C transition, so as to speak).

We started with a semester of ML (to make sure nobody has prior experience) followed a semester with some quick assembly, some quick C, and a lot of Java. After that you are just expected to know whatever language the course requires

Re: Beam VM Wisdoms (2019)

#33
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)

#36
post #33

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).

Gleam exists: https://gleam.run/

I'm looking at this now, thanks! Should have Google'd before typing.

Re: Beam VM Wisdoms (2019)

#37
post #35
post #33

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).

Are you aware of PureScript on Erlang? https://github.com/purerl/purerl

I wasn't, thanks!

Re: Beam VM Wisdoms (2019)

#40
post #33

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).

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.
Post reply on HN