TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Distributed Systems in Haskell

58 点作者 isaac21259将近 4 年前

3 条评论

rkangel将近 4 年前
The Elixir Version of this:<p>1. Absolutely block. Everywhere it makes sense. Use this to serialise stuff (e.g. if I send a ping I want to wait for a pong before I send a different message). Take advantage of the fact that you&#x27;ve separate things into a process (Elixir term - green thread&#x2F;fibre) for each task, e.g. each connection to a different node is its own process.<p>2. You can absolutely just use timeouts, but there are a few ways of doing it depending on context. Operating things as a state-machine is usually the clearest way to do things and if you get the event &quot;timeout&quot; before you get the event &quot;response&quot; (or similar) you can handle all that very clearly.<p>3. Yup, good advice. In Elixir this is also about separating pure functional code, from the &#x27;process machinery&#x27; that runs it. Mostly because pure functional code is easier to test!
juxtapose超过 3 年前
It&#x27;s a shame that the Cloud Haskell ecosystem is kind of ... on halt? I wish they at least would review patches and make Cloud Haskell packages compile against latest GHC releases. :&#x2F;
xupybd将近 4 年前
I suspect most of that class would not have known Haskell well enough to complete the assignment.