展示 HN: Vibe Prolog
Show HN: Vibe Prolog

原始链接: https://github.com/nlothian/Vibe-Prolog

2025年11月,作者在使用Anthropic Claude Code推广活动剩余额度时,意外地在手机上“氛围编码”出一个可用的Prolog解释器——尽管他们已经二十年没有使用Prolog了。该项目旨在探索AI驱动代码生成的极限,特别是利用AI工具,在提示和指导改进之外,不编写任何人工代码。 该解释器成功运行示例查询,展示了基本功能。作者强调严格的测试、代码审查和安全审计,倡导高质量的AI生成代码,并积极纠正任何错误。该项目采用MIT许可,但承认完全AI生成代码的版权含义。通过pull requests和issues积极鼓励贡献和外部工具集成。最终,这是一个有趣的实验,旨在看看“能推到什么程度”,承认已经存在更优秀的Prolog实现。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 展示 HN: Vibe Prolog (github.com/nlothian) 27 分,由 nl 1 天前发布 | 隐藏 | 过去 | 收藏 | 4 条评论 像很多人一样,我获得了 250 美元的 Claude Code 额度,但没有用完。 我决定周末用(主要是)我的手机和 vibe 编码一个 Prolog 解释器来用完它。 现在我正在看看能把它推到什么程度。 forgotpwd16 1 天前 | 下一个 [–] 如果这个项目是关于测试 Claude 的能力,那么提示会更有趣。回复 nl 1 天前 | 父评论 | 下一个 [–] 这不像是一次性生成之类的。回复 tmaly 1 天前 | 前一个 [–] 你有没有考虑过要求一个汇编版本?回复 nl 1 天前 | 父评论 [–] 还没有。你是指目标汇编输出还是用汇编编写?回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

In early November 2025, Anthropic had a program giving out $250 credits for Claude Code on the web. It expired on November 18, and on November 15 I still had $220 left.

I was working on something else and as a side effect accidently vibe coded a prolog interpretor on my phone over the weekend.

I haven't used Prolog for 20 years, and but it does seem to be roughly correct.

It's the Vibe

This project is to see how far I can push it. 🚀

Did I really ask Codex to add more Emojis to this README? Yes I did...

> uv run main.py ./examples/examples.pl  -q "mammal(X)" -v

Loading program from './examples/examples.pl'...
Successfully loaded './examples/examples.pl'
Query: mammal(X).
Solution 1:
X = dog

Solution 2:
X = cat

> uv run main.py ./examples/examples.pl  -q "grandparent('tom', Y)" -v
Loading program from './examples/examples.pl'...
Successfully loaded './examples/examples.pl'
Query: grandparent('tom', Y).
Solution 1:
Y = ann

Solution 2:
Y = pat
  • No human written code. Can prompt things, can tell tools what changes to make but no human written code should be used.
  • Don't deliberatly add slop. If you notice it doing something wrong, get it fixed.
  • Use all the tools you can. Add lots of tests! Add automatic code reviews! Add security audits!
  • Don't settle on average code. If an AI is generating slop, tell it what is wrong and how to improve it.
  • This is a fun project! Don't take it too seriously.
  • I don't know if this works at all. It seems to work, and there are some tests that work but that's it.
  • I'm putting it under a MIT license but as AI written code it isn't clear if it can be copyrighted at all
  • There are lots of real Prolog implementations that are probably better than this! Use them.

YES!

Please send in your vibe contributions! Just open a PR.

Are you a tool vendor who wants your tools used? Yes! I'd love to use them. I prefer a PR but opening an Issue also works

联系我们 contact @ memedata.com