15 ms·
How I fell in love with Erlang
- az09mugen 11mo agoUnrelated to the topic, but I really like the feature `> cd ..` at the bottom of the article. It's simple and accessible even with a smartphone. I wonder if there is an easter egg inside.
- ramon156 11mo agoI'd also love a `cd -` on the top left
- darkwater 11mo agoBecause the homepage has this "interactive terminal" which is funny and nice (kudos for readline shortcut support) but also partially "broken", i.e. the blog post(s) and other links you see with "ls" are not clickable, at least on Firefox.
- Gleamball 11mo agoGreat talk i love it and thanx for sharing.
- abrookewood 11mo agoGreat article & I love the command line interface on the home page.
- vortegne 11mo agoNice post, looking forward to more!
- jacquesm 11mo agoIt's funny how HN goes through these Erlang cycles. It's a long standing tradition, starting off with 'Erlang Day': https://news.ycombinator.com/front?day=2009-03-11 https://news.ycombinator.com/front?day=2009-03-11 Erlang gets a lot of stuff right for scalable web based stuff, and even though there are many of its influences that have by now made it into other languages and eco systems it is still amazing to me that such a well thought out system is run with such incredible modesty. You'll never see the people behind Erlang be confrontational or evangelists, they just do what they're good at and it is up to you whether you adopt it or not. And that is an interesting thing: the people that are good at this are writing code, not evangelizing. If I had to reboot my career I'd pick this eco system over anything else, it has incredible staying power, handles backwards compatibility issues with grace and has a community that you can be proud of joining. Modest, competent, and with a complete lack of drama.
- marceldegraaf 11mo agoIt's funny that you mention this, and it made me take some time to appreciate I've been working with Elixir full-time for almost 10 years now, and the entire experience has been so... stable. There's been little drama, the language is relatively stable, the community has always been there when you need them but aren't too pushy and flashy. It all feels mature and – in the best possible way – boring, and that is awesome.
- deleted 11mo ago[deleted]
- noosphr 11mo agoI've moved from Linux to OpenBSD for this reason. It's all so boring it's wonderful.
- christophilus 11mo agoI like OpenBSD, but I like Docker and Steam too much to daily-drive it.
- fridder 11mo agoFreeBSD can do OCI containers now!
- zwnow 11mo agoFor me it took a tremendous amount of work to somewhat understand the OTP stuff though. Its one of those languages where I can never be confident about my implementations, and thankfully it has features to check whether you have stale processes or whatever. A language I am humbled by whenever I use it.
- giraffe_lady 11mo agoI love saying this but OTP is a really roughneck standard library. They just added shit to it as they needed it without apparently putting too much consideration into the organization, naming, or conventions. It makes it very powerful but very disorienting and experience gained with one part of it often does not really prepare you for other parts. Usually each specific tool was created by someone who used it immediately, so it's all reliable in its way. But there is a lot of redundancy and odd gaps. Elixir's almost extreme attention to naming, organization, and consistent convention is almost as far as you can get from this approach too. It's fun to have them in the same ecosystem and see that there are actually pros and cons to each approach.
- mrkeen 11mo agoThe hyperbole that Haskellers invoke around pure-functional vs impure is that you're never quite sure whether a function call you make will "fire the missiles". It's colourful language, but it's just a stand-in for other properties you might care about. For instance, in head(sort(list)), will the whole list be sorted, or will the smallest element be returned? In atomically(doThis(); doThat()), will doThis be 100% reverted if doThat fails? If you stick to pure functions (and in the second example, STM) then you can unfire the missile! AFAIK, Erlang just fires the missile "over there", not "over here". The author jumped from: (X = X + 1) is bad to (mailbox = mailbox + message) is so simple! I'm not bashing the BEAM, or the ease with which one can send messages (as an Actor language), but I am complaining about the lack of tooling to write non-missile-firing functions on a single node (as a Functional language).
- bargainbin 11mo ago> (mailbox = mailbox + message) is so simple! The author did not say this at all, they barely even touched on capabilities of erlang/OTP. Their focus was on the functional syntax of Erlang. > For instance, in head(sort(list)), will the whole list be sorted, or will the smallest element be returned? Your point isn’t clear. The functions have a clear nested call sequence, take a list, sort it, get the head. Also how is it any different than Haskells `head (sort list)`?
- ctenb 11mo agoIn Haskell with `head (sort list)` the entire list does not have to be sorted, depending on the sort implementation. Everything is lazy, so sort can sort the list just enough to return the smallest element.
- auggierose 11mo agoGoing beyond laziness, a compiler that can understand and exploit equations, could use `head (sort list) = smallest (list)` to make the program more efficient, going from O(n * log n) to O(n) complexity.
- 11mo ago
- andoando 11mo agoMy confusion here is it always seemed liked a simple mapping to take = to mean "make x equal to x+1" rather than "x is already equal to x+1". It is declaring a relationship, between the previous value and the current. One way or another, youre defining transformations. I mean even in the sum example, you see the statement "N is n-1" which is the exact same thing as x = x+1 with = swapped for "is"
- lionkor 11mo agoThat's why I like the x := x + 1 syntax better, or the let x = 2; syntax
- mrkeen 11mo agoIt's N1 is N - 1, not N is N-1
- ceayo 11mo ago> even in the sum example, you see the statement "N is n-1" That wasn't actually what the example said. It said N1 = N - 1, and continued using the N1 value somewhere else. In that example, no actual mutation occured.
- andoando 11mo agoOh my weary eyes, my bad
- davidsainez 11mo agoIt is difficult to understand the full beauty (or horror, depending on your pov) of functional programming with such a simple example. But as you scale up in complexity, it can be someone’s full time job to make sure the model is accurately translated to the computer’s memory. With a pure language, the compiler is responsible for maintaining the mapping to memory, so you (mostly) just focus on the symbolic relationships of your model. This can be extremely freeing once you train yourself to think in functional terms. Of course, there is a performance cost, but this can be managed and in cases where people turn to functional programming reliability and correctness outweigh the cost.
- sam-cop-vimes 11mo agoI can totally relate to this. Programming in Erlang felt so natural compared to the knots I was twisting myself into writing C++. I was churning out C++ code, but wasn't having fun. Suddenly Erlang made it fun and programming became addictive.
- tommica 11mo ago> Suddenly Erlang made it fun and programming became addictive. I'm saying this with complete sincerity: WHAT IS IT THAT YOU PEOPLE SEE!? What is the fun? What are you addicted to? Typing and seeing the output? Solving a problem? I feel like I am missing out on some amazing life altering experience when I see people state that. The same thing I have with the article - what does it mean to love a programming language?
- jayd16 11mo agoYou ever get a fresh pair of sharp scissors or a new very good knife? It feels like that.
- cmoski 11mo agoSolving problems I guess. Have you used painful languages before? Imagine doing that, then discovering one that wasn't getting in your way all the time. It's easier to do things that are difficult in other languages. You can do so much on the BEAM, and you don't have to waste your time with thread pools or other nonsense.
- christophilus 11mo agoIt’s a subjective thing, but when a language clicks for you, work becomes pleasant. You get into (and maintain) a flow state. It feels as if you’re crafting something beautiful and elegant and simple. It’s the same reason people love painting, drawing, or sculpting with one specific medium over an other. They just like the aesthetic and process better. Also, some languages just really stink— slow compilation times, obscure errors, loads of footguns and require much more care and focus on things which are orthogonal to the problem you’re trying to solve.
- 11mo ago
- ctenb 11mo agoI think the older programmer was hinting at gauss's formula with the summing 1 to 10 without using a loop? Recursion is also a loop in some sense.
- donatj 11mo ago> X equals X plus one? That’s not math. That’s a lie. That's really interesting... My wife, who has no real mathematical background had the EXACT same reaction when I was trying to teach her some simple programming. I tried to explain that equals in that context was more of a storage operator than a statement that said line is true. She found it very frustrating and we gave up on the endeavor shortly thereafter. I've personally always had a soft spot for languages like TI-BASIC that use a storage operator rather than overloading = so for example: X + 1 -> X I wonder if I should try a functional language with her.
- SeanDav 11mo agoIt is not a lie it is just apparently familiar notation that actually has an entirely different meaning. It is not an equation, it is an assignment. X := X + 1 is perhaps less confusing, even if meaning the same thing.
- npteljes 11mo agoThat's exactly right. Looking at the Assignment Operator Wiki page, it's also clear where these notations come from. I think an easy way to look at it, for someone coming from a math background, is to think of programming lines as instructions, instead of statements. x=x+1 can be then read as "let x be x+1", and that's it. https://en.wikipedia.org/wiki/Assignment_(computer_science) https://en.wikipedia.org/wiki/Assignment_(computer_science)
- sodapopcan 11mo agoAlthough in Erlang it's closer to an equation with assignment being a side effect. `=` is the pattern matching operator. Eshell V15.2.6 (press Ctrl+G to abort, type help(). for help) 1> X = 1. 1 2> X = X. 1 3> 1 = X. 1 4> X = 2. ** exception error: no match of right hand side value 2 5>
- antonvs 11mo agoIt’s not really such a different meaning, it’s just shorthand for something like: X’ = X + 1 DELETE X X = X’ Even if you treat it as “storing a value in a slot”, a comprehensive model of the operation needs to model the fact that the value of the slot changes over time. So another way to look at it would be: X_t1 = X_t0 + 1 …except that “X” is shorthand for “the latest binding that uses this name.”
- 4gotunameagain 11mo agoCalls a simple swap function with pointers inscrutable (the only hard to decipher character is the asterisk), and as a good counterexample provides this ? -module(ping). -export([start/0, ping/1]). start() -> register(ping, spawn(fun() -> ping(0) end)). ping(Count) -> receive {pong, Pong_PID} -> io:format("Ping received pong (~p)~n", [Count]), Pong_PID ! {ping, self()}, ping(Count + 1) end. I am not against functional programming, or using the tools you love, but at least make a valid argument about it ;)
- cess11 11mo agoThey didn't make such an argument. It's a biographical rumination about the authors personal development and feelings.
- mrkeen 11mo agoPort ping.erl and pong.erl to C and we'll compare them.
- 4gotunameagain 11mo agoBut I am not contrasting the two languages, I'm very aware of their respective strengths and weaknesses. I am just disagreeing with the fact that C is hard to parse.
- jacquesm 11mo agoDecades long C programmer here. C is hard to parse. The thing is, you get used to it and then it feels like it is normal, but it really isn't. Not as bad as Perl, but pretty bad. And it is easy to construct one liners that are tricky to understand, I think C is the only language that has an obfuscation contest that keeps turning up gems year after year.
- simoncion 11mo ago> ...at least make a valid argument about it ;) Like other folks have said, show the equivalent C program and then we can have a discussion about implementation complexity and comprehensibility. Do note that the equivalent C program permits IPC between two instances of the program that could be either running on the same machine or could be running on different machines connected by an IP network. Edit: For general information, here's an Erlang implementation of increment and swap. Swap is made a bit complicated because Erlang doesn't support multiple returns... returning a tuple or list is the way that's handled, so I had it accept a two-element tuple for consistency with what it returns: increment(A) -> A + 1. swap({A, B}) -> {B, A}.
- bishabosha 11mo agothis whole article stinks of AI prose, why should i read it
- croisillon 11mo agothe author loves Erlang, but not to the point of writing their love themself
- nakamoto_damacy 11mo agoWill it ever run in WASM? EDIT: there is Lumen, but not sure if it's stalled or still going.
- calvinmorrison 11mo agoUsage It is not immediately clear what the intended usage pattern for Lumen and WebAssembly is. Pros and Cons Things we like: The idea of having both runtime and code compile is cool Things we’re not big fans of: We could not immediately figure out exactly how Lumen works, and builds appear to be failing The project might be stalled or unmaintained. It has not been updated in over a year.
- nakamoto_damacy 11mo agoWebAssembly’s goal is to be a “portable execution layer” — an OS abstraction. If WASM becomes the standard runtime across browsers, servers, and edge networks, something still has to orchestrate thousands of concurrent tasks, message queues, supervisors, restarts, etc. Erlang/OTP already solves that — beautifully. So, the motivation is: “What if BEAM’s concurrency runtime could itself be compiled to WebAssembly — and become the actor system of the WebAssembly world?” That’s why projects like Firefly and Lumen are interesting: they’re exploring whether Erlang’s runtime model can become part of the WASM ecosystem — just like how Go and Rust shaped the serverless world.
- simoncion 11mo ago> Will it ever run in WASM? A ten-second search reveals [0]. (Have Kids These Days forgotten all about Emscripten?) However, given that web browser pages are often short-lived, I don't see what benefit bringing in all of Erlang and its VM gets you, other than the fact that you've pulled off the stunt. [0] <https://www.antvaset.com/erlang-otp-wasm https://www.antvaset.com/erlang-otp-wasm>
- nakamoto_damacy 11mo agoWASM runs on the edge, e.g. in Cloudflare workers (but I mean more generally) .. And it is an emerging compatibility layer
- imglorp 11mo ago> “How can you sum the numbers from 1 to 10 without using a loop?” Sum = n(n+1)/2
- KingMob 11mo agoYeah, I assume it's missing some context that the numeric solution was off the table.
- javcasas 11mo agoWhen all you know is hammers, all you can think of are nails. Screws are impossible to use and understand. How are you supposed to hammer in a screw? All those ridges are in the way!
- FredPret 11mo agoNot even Erlang can beat Gauss
- robochat 11mo agoI remember being amazed when I learnt about summing arithmetric series.
- macintux 11mo agoI discovered Erlang from Bruce Tate's book[0] and it was such an obviously pragmatic and interesting language that I started participating in the Twitter Erlang community, discovered Basho was using it for Riak and looking for a tech evangelist in the Midwest, and thus began my all-time favorite job. I'm still more of a infrastructure guy than a software developer, but working with such incredibly smart people was a delight. Basho was good at hiring people who could learn Erlang (and, perhaps unsurprisingly, was almost entirely remote). [0]: https://pragprog.com/titles/btlang/seven-languages-in-seven-weeks/ https://pragprog.com/titles/btlang/seven-languages-in-seven-...
- bmacho 11mo agoThere is also Erlang the Movie 2 trying to sell Erlang (called Outlaw Techno Psyhchobitch in the video) with rock and hot chick: https://youtu.be/rRbY3TMUcgQ?t=262 https://youtu.be/rRbY3TMUcgQ?t=262 And they were right, rebranding was all Erlang needed 13 years ago
- jacquesm 11mo agoThat's absolutely terrible and hilarious at the same time.
- RickJWagner 11mo agoFantastic article, my thanks to the author. I must go dig up the Erlang book from my library. As I recall, it was a great read.
- jrm4 11mo agoFor what it's worth, I'm stuck on the very first x = x + 1 thing. Not sure if you want to call it a screwup or bad grammar or whatnot, but it is perhaps the huge mistake that the "equals" sign was used for something that feels like, but emphatically DOES NOT mean, "is equal to." It's "put this into that". It's an action verb. Should have perhaps insisted on x <- x + 1 or maybe better x + 1 -> x
- kwanbix 11mo agoI prefer pascal's way: x := x + 1.
- mock-possum 11mo agoThat’s funny, because to me, it was always immediately obvious that once that line runs, then it must be true - once that line runs, x is now equal to whatever it was before, + 1. It’s the price opposite of the lie, it’s the literal definition of truth, in the sense that what is true is set by that line. Programming is telling things to the computer, and in this case, you’re telling it what x is. Whatever you tell a computer is all the computer knows, whatever a computer does can only be what it’s told. If you never told it what x was, then x wouldn’t be anything… that’s the truth.
- munificent 11mo ago> once that line runs This is the key point. Some people have a mental model that algebraic syntax is describing a set of immutable properties. You are defining things and giving them names, but not changing anything. There is no notion of time or sequence, because the universe is unchanging anyway. All you're doing is elucidating it. Then there is a model where you are molding the state of a computer one imperative modification at a time. Sequence is essential because everything is a delta based on the state of the world before. You have the latter model, which is indeed how the hardware behaves. But people with a mathematical mindset often have the former and find the latter very unintuitive.
- jrm4 11mo ago
- groundzeros2015 11mo agoI want to get into Erlang, but I also know a lot of languages that are cool, effective, but rarely used in jobs.
- SoftTalker 11mo agoThat's the downside. If you look at the monthly "who is hiring" posts here on HN, you rarely see Erlang jobs. Elixir shows up a bit more often but it's still uncommon.
- davidw 11mo agoYeah, I've really enjoyed the jobs where I got to use Erlang, but there haven't been enough of them. Even Elixir is kind of scarce.
- SoftTalker 11mo agoOnly had one, a contract where I got to choose the implementation. Job was to simulate a bunch of sensors on a network and Erlang was perfect for that.
- tamnd 11mo agoIf you like Erlang, I recommend reading Making Reliable Distributed Systems in the Presence of Software Errors by Joe Armstrong: https://erlang.org/download/armstrong_thesis_2003.pdf https://erlang.org/download/armstrong_thesis_2003.pdf His PhD thesis explains the thinking behind Erlang, especially how it handles failures, message passing, and concurrency. It was last updated in 2003, 22 years ago, time really flies!
- b_e_n_t_o_n 11mo agoThank you for this, I'm unlikely to ever touch Erlang but looks like a fascinating read nonetheless.
- endgame 11mo agoIt is a fantastic read. I find myself quoting section 5.3.1 on Well-Behaved Functions (WBFs) quite often, especially rule 2: "If the specification doesn’t say what to do raise an exception." This really helps systems from muddling along into bizarre states, where things are going awry and nobody knows why.
- foobarian 11mo agoObligatory link to Erlang the Musical: https://www.youtube.com/watch?v=upiNIQOS4WE https://www.youtube.com/watch?v=upiNIQOS4WE
- jgoode19 11mo ago[dead]
- mock-possum 11mo ago> “How can you sum the numbers from 1 to 10 without using a loop?” ... And there it was: recursion. Wait, is there something I don’t actually understand about recursion? When a recursive function calls itself, is that not a loop?
- sodapopcan 11mo agoIt depends on how technical you want to get. It's certainly not a loop in the classic sense, like a for loop etc. Like there are no `continue` or `break` semantics and you can't return out of it (and yes yes of course you can still do all that stuff, just not with dedicated keywords). I call it a loop, though. Whenever I make a lil' server in Elixir (mostly always for teaching) I always call the function `loop`: defmodule Server do def start_link do spawn_link(&loop/0) end defp loop do receive do msg -> IO.puts(msg) loop() end end end
- simoncion 11mo agoTo put it another way: anything you can express with iteration, you can express with recursion (just as long as you don't run out of call stack). Once you get it, it's obvious, but if you're not already familiar with the notion, the understanding can be pretty amazing.
- sodapopcan 11mo ago> just as long as you don't run out of call stack And with tail-call you don't even need to worry about that :)
- simoncion 11mo agoOf course, that assumes that you write your functions so that they can be converted into iteration! Did you know that some C/C++ compilers will do tail-call -er- optimization? I learned this quite a while ago, so I'd expect every major C/C++ compiler to do it by now, but I was pretty impressed at the time.
- mrburton 11mo agoR.I.P Joe Armstrong - he was an amazing man, engineer, and human overall. :(
- morshu9001 11mo agoI used Erlang for a couple of years. It's cool and elegant for sure, but it always felt like it took longer to write than JS or Py like I'd otherwise use. Recursion with matchers is sometimes natural, sometimes roundabout to what you want to do. The multiprocess stuff is cool too, but a premature optimization for what I was doing. If I needed to scale, I don't know if that'd be the chosen approach.
- sbuttgereit 11mo agoI do a lot of Elixir programming, which is different and not at the same time :-) . What I find is that it takes me longer to write the initial code than I might in, say, JavaScript, but that the refactoring and ongoing maintenance of code is significantly faster. This is because I think the functional & actor paradigms force you to think harder upfront, but once those decisions are made are easier to manipulate. For me personally, I'd take that trade since I'm either refactoring or maintaining much more frequently... but I understand there are other considerations which could drive a different preference. Also, I'm sure my personal experience isn't necessarily true for everyone... so weight this anecdote accordingly.
- humamf 11mo agoThats interesting. In my case, elixir does take a longer time. Probably because i dont get used to or just use it not as frequent as other languange. Would you mind telling me your elxir program about? Is it a webapps or something similar?
- waynesonfire 11mo agoOne of the features I really like about the BEAM is that it solves the problem of organizing the topology of the applications I build. It's unlikely you're even close to doing this in other languages / frameworks. The supervisor tree is one of the killer-app features of BEAM. I hit the benefits of this ALL the time. I notice how it keeps getting solved over and over again in unique ways that are half-baked. In some ways, this quote is what I'm hinting at, except, things don't even have to be concurrent. That's just a cherry-on-top. "Virding's First Rule of Programming: Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang." I'd also argue that "sufficiently complicated" bar isn't very high.
- calvinmorrison 11mo agoI have been trolling for a while now to find a great project to write in Erlang. I can't write any erlang and it's sufficiently foreign it's been fun to try to get my LLM to do it for me. This is because I cannot make any useful suggestions on _how_ to write it. I have a toy replacement for syslog. i supervised an LLM writing a discord-esq chat program that implemented a imaginary JMAP extension called 'JCHAT'. i had the LLM write a Erlang based dimensional accounting system So far in real life i don't have any uses, which is a shame because it's a great language and OTP comes so batteries included I can think of many use cases.
- robby22 11mo ago500 Internal Server Error nginx/1.24.0 (Ubuntu)
- stevenjgarner 11mo agoTook me a long time to figure out what gets lost with Erlang is: a) Ubiquity — everything understands HTTP. Erlang nodes only talk to Erlang (or a compatible runtime) b) Because there are no middleware standards (REST, GraphQL, OAuth, etc.), you must build or integrate your own abstractions c) Giving up infrastructure (reverse proxies, load balancers, CDNs), You handle distribution yourself or through OTP design d) Interoperability with browsers and APIs, requiring bridging via something like Cowboy or gRPC gateway setcookie secret in Erlang does not create or use an HTTP cookie, SSL certificate, or HTTPS connection. It sets the Erlang distribution cookie, a shared secret string used for node authentication within the Erlang runtime system (the BEAM VM). Erlang’s built-in distributed networking subsystem allows them to connect to each other if: 1) They can reach each other over TCP (default port 4369 for the EPMD — Erlang Port Mapper Daemon — plus a dynamically assigned port for the node-to-node connection). 2) They share the same cookie value (here "secret"). The author's insight "No HTTP. No REST API", reframes the reality that Erlang moves things down the ISO OSI model - HTTP being on layer 7 and TCP being on layer 4. Erlang therefore misses the "benefits" of operating on a higher ISO layer, but gains powerful advantages of operating on layer 4: i) True concurrency ii) Transparent message passing iii) Fault tolerance iv) Soft real-time guarantees v) Persistent cluster connections Erlang’s design assumes a trusted, closed system of cooperating nodes, not a public Internet of clients. In other words, Erlang doesn’t live below Layer 7 — it IS its own Layer 7.
- quaunaut 11mo agoThis reads as if it isn't trivial to have an HTTP API for your public API in Erlang/Elixir, which is weird. Sure there isn't an included HTTP API for Erlang processes, but why exactly would you want one? They're not for the public internet, as their an implementation detail of your system. The majority of what they're capable of just isn't relevant to the public internet.
- stevenjgarner 11mo agoUnfortunately very little is trivial for me. Personally I have found the real value of Erlang to be internally between trusted nodes of my own physical infrastructure as a high-level distributed "brain" or control plane for health monitoring, config distribution (env vars, static config files, etc), smart failover decisions etc. Keep the “outside view” (HTTP, SMTP, DNS) all standards-based OSI, internally mapped to daemons each of which is individually robust (HAProxy, MySQL Cluster, Apache/Node.js, Postfix, PowerDNS etc.). Then use an Erlang/Elixir service as a live config and state authority, replicating state across infrastructure, pushing updates in real time, and having my legacy PHP/Python/JavaScript/etc code query this config via a simple HTTP/JSON API into the Erlang service. I'm not all the way there yet, but what works is most encouraging.
- adamddev1 11mo agoThe only thing holding me back from Erlang is the lack of type checking. Convince me?
- igouy 11mo agohttps://www.erlang.org/doc/system/typespec.html https://www.erlang.org/doc/system/typespec.html
- simoncion 11mo agoYep. You feed files annotated with those to Dialyzer or similar for not-runtime typechecking. That plus the basic runtime checking provided by guard expressions [0] gives you a bunch of coverage... and I think some of the folks who like Elixir are working on their own typechecker thing? I don't really know, because I don't use Elixir. [0] <https://www.erlang.org/doc/system/expressions.html#guard-expressions https://www.erlang.org/doc/system/expressions.html#guard-exp...>
- modernerd 11mo agoYou might like https://gleam.run/ https://gleam.run/, another BEAM language but with type-checking. https://tour.gleam.run/basics/type-checking/ https://tour.gleam.run/basics/type-checking/
- Alupis 11mo agoGleam compiles to Erlang. So you can skip Erlang entirely but get all of the BEAM and ecosystem's benefits. Gleam is very much worth checking out. It's syntax is very nice and natural feeling.
- adamddev1 11mo agoI have checked out Gleam and yes it does look delightful. Function captures are a really cool idea.
- bora_g 11mo agoAuthor here, I'm really surprised to see the story reached top 3. All of them is true and thanks to Erlang still surprises me. My current stack is Elixir + Rustler on server and Rust + Wasm at frontend. Thanks for reading :)
- jjtheblunt 11mo agocan you give advice on frontend pertinent Rust crates?
- hasanhaja 11mo agoThank you so much for the write up! I've been avoiding processes for some reason while I've been learning Elixir and this post pushed me to play with it today. And I started in Erlang and then managed to translate it to Elixir successfully! I ran into this issue and I'm not sure if it's just a me thing. When sending the message from the Pong REPL, the following didn't work for me: ```erl {ping, 'ping@localhost'} ! {pong, self()}. ``` When I checked, the PID of `self()` is different to the PID of the registered `pong` process. I needed to change it to the following: ```erl {ping, 'ping@localhost'} ! {pong, whereis(pong)}. ``` This sends the correct PID to the Ping process and we have an infinite loop counting up.
- btbuildem 11mo agoIt's funny, because I find Erlang to be one of the least accessible languages I've ever tried (and my entry into this world of digital wonders was thru disassembling cracktros on a M68k, before internet, in a then-foreign language). That said, the metaphors are so elegant, the key concepts so well chosen -- yes, the initial onramp may be a cognitive slog, but it's well worth it. It makes everything downstream so much easier.
- deleted 11mo ago[deleted]
- deleted 11mo ago[deleted]
- jesaemolisa 11mo ago[dead]