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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Writing an HTTP server in Prolog

238 点作者 jamesbvaughan超过 8 年前

13 条评论

dangoldin超过 8 年前
Pretty cool.<p>I also did a stint messing around with Prolog and it was pretty awesome discovering an entirely new programming paradigm. I ended up doing the Priceonomics puzzle (<a href="https:&#x2F;&#x2F;priceonomics.com&#x2F;jobs&#x2F;puzzle&#x2F;" rel="nofollow">https:&#x2F;&#x2F;priceonomics.com&#x2F;jobs&#x2F;puzzle&#x2F;</a>) in Prolog and wrote up about it here - <a href="http:&#x2F;&#x2F;dangoldin.com&#x2F;2013&#x2F;06&#x2F;07&#x2F;fun-with-prolog-priceonomics-puzzle&#x2F;" rel="nofollow">http:&#x2F;&#x2F;dangoldin.com&#x2F;2013&#x2F;06&#x2F;07&#x2F;fun-with-prolog-priceonomics...</a>
评论 #12941360 未加载
nextos超过 8 年前
There is a revival of Datalog, a subset of Prolog, in relational databases and RAD. E.g., see LogicBlox or Datomic.<p>I always think Datalog should have taken a big chunk of SQL&#x27;s market. And I wish something like Mozart&#x2F;Oz was more mainstream so that we could implement subsystems using logic programming wherever needed.
评论 #12941585 未加载
gnarbarian超过 8 年前
Prolog is extremely different than other programming languages and as a result, learning it and writing a few small programs is very mind expanding.<p>It really drives home how different paradigms are suited to different problems. Prolog is suited toward problems like Einsteins riddle<p><a href="https:&#x2F;&#x2F;udel.edu&#x2F;~os&#x2F;riddle.html" rel="nofollow">https:&#x2F;&#x2F;udel.edu&#x2F;~os&#x2F;riddle.html</a>
评论 #12941984 未加载
评论 #12941037 未加载
Spooky23超过 8 年前
In one of my first jobs out of college, I got assigned to figure out how to make the Tivoli Enterprise Console do something useful. They gave up on the IGS guys and picked me because I took a class that used Prolog in my sophomore year.<p>IBM bundled some ancient prolog dialect (copyright 1991 iirc) and the product was a mess.<p>But it was a great time... a coworker and I came up with a way to persist facts to DB2 and decode&#x2F;standardize all sorts of fubar network device alarms. Good times.
评论 #12941910 未加载
nickpsecurity超过 8 年前
James, check out Mercury next as it&#x27;s a faster, better Prolog with some industrial use.<p><a href="https:&#x2F;&#x2F;mercurylang.org" rel="nofollow">https:&#x2F;&#x2F;mercurylang.org</a>
评论 #12942532 未加载
评论 #12941872 未加载
评论 #12944586 未加载
chatmasta超过 8 年前
Have you learned about definite clause grammar yet? Once you do, you may be tempted to rewrite your parser, because it&#x27;s a much more elegant way of constructing parsing rules.
评论 #12944394 未加载
pizza超过 8 年前
Machine Learning in Prolog <a href="https:&#x2F;&#x2F;www.cs.unm.edu&#x2F;~luger&#x2F;ai-final2&#x2F;CH7_Machine%20Learning%20Algorithms%20in%20Prolog.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cs.unm.edu&#x2F;~luger&#x2F;ai-final2&#x2F;CH7_Machine%20Learni...</a>
ga2arch超过 8 年前
Awesome, one of the most fun i had at university was building a Uri parser with prolog.<p>After i discovered that you could define operators i built a combinatorial parser, something akin to <a href="https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;parsec" rel="nofollow">https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;parsec</a> (of course nowhere as powerful) with similar syntax and do notation. <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;ga2arch&#x2F;e8904177f722c6560e37" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;ga2arch&#x2F;e8904177f722c6560e37</a><p>And i didn&#x27;t have to define backtracking because it is handled by prolog itself.
p4bl0超过 8 年前
This is really fun. Thanks for sharing!
评论 #12941041 未加载
sleepprogger超过 8 年前
Site seem to be down. `Error establishing a database connection`
评论 #12946876 未加载
hossbeast超过 8 年前
.pl is perl, use .pg for prolog
评论 #12941615 未加载
评论 #12941439 未加载
评论 #12941569 未加载
评论 #12942992 未加载
MrFeynmannsJoke超过 8 年前
Sometimes, just because you can doesn&#x27;t mean you should..
评论 #12941038 未加载
aibottle超过 8 年前
No! What are you doing?! Let that language die in peace!
评论 #12941033 未加载