TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Erlang/OTP by Example

218 pointsby jxubover 6 years ago

6 comments

jlouisover 6 years ago
If you get to the part about monitors, consider erlang:demonitor(Ref, [flush]) in your own code. This also removes the monitor message from your mailbox if it arrived in between, which is a real problem in an async setting.<p>Though in some situations, it is better to just ignore the spurious message when it arrives by tracking what monitors you have enabled in the process state. Unkonwn monitors are just gracefully ignored. The same pattern is useful with timeouts as well. Cancel the timeout, but if it arrives in your mailbox while the cancel is happening, you can just detect an old timeout and ignore it.
评论 #18265734 未加载
plainOldTextover 6 years ago
In addition, two other highly informative resources:<p>* <a href="http:&#x2F;&#x2F;spawnedshelter.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;spawnedshelter.com&#x2F;</a><p>* <a href="http:&#x2F;&#x2F;beam-wisdoms.clau.se&#x2F;en&#x2F;latest&#x2F;" rel="nofollow">http:&#x2F;&#x2F;beam-wisdoms.clau.se&#x2F;en&#x2F;latest&#x2F;</a>
davidwover 6 years ago
This is also a fantastic Erlang learning resource: <a href="https:&#x2F;&#x2F;learnyousomeerlang.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;learnyousomeerlang.com&#x2F;</a>
the_clarenceover 6 years ago
I&#x27;m kind of sad that Elixir is getting all the love and the cool resources since I much prefer Erlang&#x27;s syntax. Thanks for this page!
评论 #18267077 未加载
ilovecachingover 6 years ago
As someone who has worked two jobs now writing, deploying, and operating Erlang clusters, I recommend switching to Rust. Erlang requires a lot of TLC to get right, it&#x27;s super slow, and it&#x27;s hard to burst. Like, super hard to burst. Erlang nodes are meant to cluster as a k graph and never go down. Modern ops, especially container ops, does availability through ephemerality of services. The BEAM just doesn&#x27;t like to be treated like cattle. Also Erlang has notoriously bad error messages, very little abstraction, and converting between binary strings and lists is a pain. Gaining Erlang operational knowledge also takes a while. We eventually had to rewrite things like gen_server, ditch mnesia etc. as we scaled.<p>So why Rust? Like Erlang, it&#x27;s damn good at concurrency and enables functional programming. It also enables event driven programming through tokio, which is a better fit for web servers than green threads (you&#x27;re mostly waiting on the network). Unlike Erlang, it&#x27;s super fast (even at math), has a great type system, amazing error messages, low memory usage, and the community is already quite a bit bigger.
评论 #18266489 未加载
评论 #18265378 未加载
评论 #18265456 未加载
评论 #18266644 未加载
评论 #18265973 未加载
评论 #18265666 未加载
评论 #18266803 未加载
评论 #18265217 未加载
评论 #18267937 未加载
评论 #18266181 未加载
评论 #18267185 未加载
评论 #18266298 未加载
评论 #18265953 未加载
评论 #18268345 未加载
评论 #18265227 未加载
评论 #18265267 未加载
评论 #18265758 未加载
xq3000over 6 years ago
Cool site!<p>PS: Content looks cropped on an iPhone 7 nonmatter how you resize it
评论 #18266747 未加载
评论 #18265233 未加载