Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lpil
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
61.
▲
by
lpil
2y ago
Yes, they are very different. It's not splitting the ecosystem though as the vast majority of Gleam programmers are not former Elixir, Erlang, or LFE programmers, it's people coming from other ecosystems. Gleam grows the BEAM ecos
62.
▲
by
lpil
2y ago
It’s certainly ready for use! The HTTP server made with it is used in production and was the fastest server available on the BEAM for some time, though Elixir’s Bandit has overtaken since then.
63.
▲
by
lpil
2y ago
Aye, but this is the same as Elixir; it doesn't have full support for OTP and you are expected to use Erlang modules when you want the rest. RE named processes, that's coming in the next release, and there's already multiple
64.
▲
by
lpil
2y ago
It’s not limited in Gleam. All existing Erlang and Elixir OTP modules are usable in Gleam, and there’s also an additional set of Gleam OTP modules which provide type safety guarantees for a subset of OTP functionality.
65.
▲
by
lpil
2y ago
Hi, I'm the designer of Gleam! Beyond being functional and sharing a runtime I don't think Elixir and Gleam have much in common at all. Our recent developer survey showed that the majority of Gleam programmers were not Elixir user
66.
▲
by
lpil
2y ago
Gleam isn't different from Erlang or Elixir in this case, all three languages implement OTP in "user land" rather than being part of the language. The only difference is how this OTP code gets distributed from the core team t
67.
▲
by
lpil
2y ago
What you're describing is what `echo` is in terms of functionality and implemented, and it's not a new keyword so it is backwards compatible. There are disadvantages of blurring the lines of what a function is an can do. Gleam val
68.
▲
by
lpil
2y ago
It's not anything like Python. The language that it is most like is probably F# or OCaml. Python's type checkers are optional. They only verify code with annotations. Gleam's type checker is mandatory, so it is impossible to
69.
▲
by
lpil
2y ago
Yup that's right, you can't use Erlang code on JS runtimes or JS code on Erlang runtimes. Most library code doesn't use either, so it's usable on both. Elixir is also quite a lovely language even when not using any BEAM
70.
▲
Gleam v1.9
(gleam.run)
240 points
by
lpil
2y ago
|
71 comments
71.
▲
by
lpil
2y ago
Thank you, very kind!
72.
▲
by
lpil
2y ago
Hello! I'm the creator of Gleam. > It seems to be a direct riff on Haskell's "do notation" syntax sugar It's not this at all! It may seem this way at first as Gleam's `use` is used in many of the same places
73.
▲
by
lpil
2y ago
Erlang doesn't have promises. The main draw of the BEAM ecosystem is that it has a different concurrency system which is capable of many things that the JavaScript one is not.
74.
▲
by
lpil
2y ago
Thank you
75.
▲
by
lpil
2y ago
I’d love to learn more about your project! Is it public?
76.
▲
by
lpil
2y ago
It could be advantageous for applications that need to work offline. It doesn’t seem to need a server connection, making it more like React than LiveView. I may be misunderstanding though! I’ve not tried it myself.
77.
▲
Gleam v1.7
(gleam.run)
20 points
by
lpil
2y ago
|
1 comments
78.
▲
Gleam v1.6.0 Released
(gleam.run)
12 points
by
lpil
2y ago
|
1 comments
79.
▲
by
lpil
2y ago
Try adding some parameters that function! Including more function parameters.
80.
▲
by
lpil
2y ago
Exactly! Beyond line numbers in stack traces it’s all the same.
81.
▲
by
lpil
2y ago
It does offer advantages, but also disadvantages. Lustre lets the programmer pick whichever technique is most suited to each component in their user interface.
82.
▲
by
lpil
2y ago
Gleam also uses that same compiler tooling, though it does not embed the line information presently.
83.
▲
by
lpil
2y ago
This is fine in practice as unexpected runtime errors are rare in Gleam. I’ve yet to have any in any and I’ve been using it in production for years. It would be great if the BEAM had a source map like system so it can have the same high qua
84.
▲
by
lpil
2y ago
It’s so they are readable left to right, which is typically easier. The difference can be seen most clearly with writing the type of functions as arguments.
85.
▲
by
lpil
2y ago
It’s incorrect, Gleam has full type inference and doesn’t require variable annotation.
86.
▲
by
lpil
2y ago
The Lustre framework supports LiveView as well as entirely in-browser state management, which Elixir LiveView cannot do.
87.
▲
by
lpil
2y ago
Yes, and this has been possible for a couple years now.
88.
▲
by
lpil
2y ago
No particular support but you can use all the regular Erlang OTP APIs for this. The trade off is that you lose type safety.
89.
▲
by
lpil
2y ago
What do you mean by deal with transpiration? Elixir and LFE also both compile to Erlang and then run the BEAM compiler to generate bytecode. Erlang is the only BEAM language which goes to bytecode directly today.
90.
▲
by
lpil
2y ago
Gleam dodges the problem by not having methods at all. Totally. Gleam priorities reading over all else, and generally it is praised for being unusually easy to understand code written in it
More ›