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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Löb and möb: strange loops in Haskell (2013)

86 点作者 improv32超过 6 年前

4 条评论

nickdrozd超过 6 年前
Loeb&#x27;s theorem says that you can prove a statement S if you can prove that S is implied by its own provability. It&#x27;s actually a generalization of Goedel&#x27;s second incompleteness theorem (let S be a false statement like <i>0 = 1</i>). I can see something in the article that looks like Loeb&#x27;s theorem (<i>f (f a -&gt; a) -&gt; f a</i>, reading <i>f</i> as <i>it can be proved that</i>), but I don&#x27;t know Haskell, so I&#x27;m completely lost after that. Can someone explain in non-Haskell terms what&#x27;s going on?
评论 #18182776 未加载
评论 #18175962 未加载
moomin超过 6 年前
I wrote an article based on this one: <a href="https:&#x2F;&#x2F;colourcoding.net&#x2F;2018&#x2F;03&#x2F;29&#x2F;marvellous-moeb&#x2F;" rel="nofollow">https:&#x2F;&#x2F;colourcoding.net&#x2F;2018&#x2F;03&#x2F;29&#x2F;marvellous-moeb&#x2F;</a><p>I think one thing it’s super good for is constructing cyclic graphs from flat representations: you don’t need to do cycle detection. (The example in the code, sadly, does need cycle detection and doesn’t have it. I keep meaning to write a follow-up.)
arciini超过 6 年前
When (from an engineering, not personal curiosity perspective) is it worthwhile to use loeb?<p>After reading the article for about 15 minutes, I finally understand loeb and it&#x27;s pretty cool! It&#x27;s an easy way to actually run a list of lazy-loading statements (functions) in a way that all of them resolve to their eventual values.<p>That being said, it feels like the function is both too abstract to understand, yet not effective as an abstraction that I can apply to other problems. For a few contrasting examples, reverse_string is not a very abstract function, as it operates on a very concrete operand and produces an effect that&#x27;s intuitive outside of mathematical theory. On the other end, a hash table is very abstract, but we choose to learn it because it&#x27;s such an useful solution.<p>As for loeb, I only understand how to use it to create a spreadsheet, yet it&#x27;s clearly meant for more than that since it&#x27;s given such an abstract name. It&#x27;s also not called evaluate_lazy_functions_on_operands either so it must be more than that too! Is there something I&#x27;m missing?
评论 #18173472 未加载
评论 #18173422 未加载
tempodox超过 6 年前
&gt; Feeling smart? Let&#x27;s change that...<p>If I ever saw a description of Haskell in a nutshell, this is it. YMMV, of course.