| ▲ | Gleam doesn't compile to Erlang source anymore(gleam.run) | ||||||||||||||||||||||||||||||||||||||||||||||
| 106 points by ingve 5 hours ago | 20 comments | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | zachrip 2 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Shout out to Giacomo's twitch streams. He has taught me about some features of Gleam, Rust, and on top of that he's just a very chill person. He takes time away from his focus to answer questions politely and without judgement. There are dozens of programming streams where the streamer forgets to leave their ego at the door and he is not one of them. I highly recommend following it. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | impoppy 5 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
This raises an obvious question. Why Gleam team weren't doing that in the first place? Obviously they didn't have direct Gleam AST -> Erlang source pipeline, they must have had to build some their own custom Erlang AST representation that they then translated into the source code. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | 0x69420 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
to those curious, erlang abstract form[1] is the AST representation used by the erlang compiler/etc. per [1], you can see that it's canonically made of erlang terms, and you have easy access to routines for manipulating this representation from the standard library; it's really comfy when you need it! it's also the target elixir compiles down to, and the representation manipulated by parse transforms, which in base erlang are the way syntactic sugar (notably qlc[2] and some of the more cutesy pattern matches in merl[3] (which, in turn, manipulates the very same representation to do its job. very meta!)) is done. most BEAM languages actually settle on erlang abstract format. you'd think core erlang would be more common since it feels more like a traditional functional IR, but basically only LFE does this, because it's a moving target without any particular stability guarantees from release to release. 1: https://www.erlang.org/doc/apps/stdlib/erl_parse.html#t:abst... | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | __jonas 24 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Pretty exciting change that I didn’t see coming —- I wonder if someone will end up implementing an integration with the Whatsapp Erlang debugger | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | jazzypants 9 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Let me guess: still no string interpolation in a language ostensibly intended for building user interfaces? | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | lexx an hour ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Amazing news! Thank you! | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | vortegne 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Congratulations to the team! I love Gleam and am genuinely having fun every time I write Gleam code. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | phcreery 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
The misuse of commas is distracting; at least it’s better than reading ai blogs. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | nwalkr an hour ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||
idk, i'm not sure about wording. erlang abstract form still is erlang source, it's ast of erlang source text. one call to erl_prettypr:format and text source is back. word 'transpiler' is still there and there is nothing "pejorative" in it, it's transpilers all the way down everywhere. but talking pejorative, i was surprised. my opinion of gleam was already pretty low, but i did not expect to see post-1.0 compiler emitting text erlang source. maybe it's not that good of idea to implement compiler in language completely foreign to target ecosystem. | |||||||||||||||||||||||||||||||||||||||||||||||