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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Truth Functional Logic for Hackers

48 点作者 ChilledTonic2 个月前

6 条评论

mcguire2 个月前
The important part is at the end of the article: &quot;<i>For those interested in building a stronger foundation in logic, the Open Logic Project provides excellent free educational resources on propositional and predicate logic, formal proof systems, and other topics such as modal logic and set theory - all targetted towards a non-mathematical audience.</i>&quot;<p><a href="https:&#x2F;&#x2F;openlogicproject.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;openlogicproject.org&#x2F;</a>
tantalor2 个月前
I don&#x27;t get it. Isn&#x27;t this what compilers are for? So I don&#x27;t have to rewrite my code in an equivalent but stupider way just to get a marginal performance gain.
评论 #43339291 未加载
评论 #43336210 未加载
nvader2 个月前
In this blog article from 2021, I warn about making this change without appropriate care, as it has been a source of common bugs: <a href="https:&#x2F;&#x2F;danverbraganza.com&#x2F;writings&#x2F;de-morgans-flaw-perform-this-refactor-carefully" rel="nofollow">https:&#x2F;&#x2F;danverbraganza.com&#x2F;writings&#x2F;de-morgans-flaw-perform-...</a>
评论 #43338512 未加载
hoppp2 个月前
My first thought was to rewrite it without any or and operation. just return early from if statement.<p>If user is blacklisted return access denied; If account is expired return access denied; If no conditions match return access granted;<p>Wouldn&#x27;t that be more effective?
评论 #43338550 未加载
lucaspauker2 个月前
<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;De_Morgan%27s_laws" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;De_Morgan%27s_laws</a>
cluckindan2 个月前
The code blocks’ font size varies line by line on mobile. Hint: set it to be smaller than the body text size because monospace fonts tend to be a bit larger than proportional ones.
评论 #43337270 未加载