HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
guregu
worker-prolog
TypeScript2022–2023
guregu / worker-prolog

worker-prolog

serverless Prolog for Cloudflare Workers

2Distinct people
3Mentions
0Explicit recommenders
14GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

serverless Prolog for Cloudflare Workers

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week3 dated mentions

Observed mentions: 2022-06-27 03:47:04 UTC to 2023-01-08 10:48:52 UTC. Weeks start Monday, UTC.

0122022-06-27 00:00:00 UTC to 2022-07-04 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsJun 272022-07-04 00:00:00 UTC to 2022-07-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-07-11 00:00:00 UTC to 2022-07-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-07-18 00:00:00 UTC to 2022-07-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-07-25 00:00:00 UTC to 2022-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-08-01 00:00:00 UTC to 2022-08-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-08-08 00:00:00 UTC to 2022-08-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-08-15 00:00:00 UTC to 2022-08-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-08-22 00:00:00 UTC to 2022-08-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-08-29 00:00:00 UTC to 2022-09-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-09-05 00:00:00 UTC to 2022-09-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-09-12 00:00:00 UTC to 2022-09-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-09-19 00:00:00 UTC to 2022-09-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-09-26 00:00:00 UTC to 2022-10-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsSep 262022-10-03 00:00:00 UTC to 2022-10-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-10-10 00:00:00 UTC to 2022-10-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-10-17 00:00:00 UTC to 2022-10-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-10-24 00:00:00 UTC to 2022-10-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-10-31 00:00:00 UTC to 2022-11-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-07 00:00:00 UTC to 2022-11-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-14 00:00:00 UTC to 2022-11-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-21 00:00:00 UTC to 2022-11-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-28 00:00:00 UTC to 2022-12-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-05 00:00:00 UTC to 2022-12-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-12 00:00:00 UTC to 2022-12-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-19 00:00:00 UTC to 2022-12-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-26 00:00:00 UTC to 2023-01-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-02 00:00:00 UTC to 2023-01-09 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJan 2

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jun 272022-06-27 00:00:00 UTC2022-07-04 00:00:00 UTC211
Jul 42022-07-04 00:00:00 UTC2022-07-11 00:00:00 UTC000
Jul 112022-07-11 00:00:00 UTC2022-07-18 00:00:00 UTC000
Jul 182022-07-18 00:00:00 UTC2022-07-25 00:00:00 UTC000
Jul 252022-07-25 00:00:00 UTC2022-08-01 00:00:00 UTC000
Aug 12022-08-01 00:00:00 UTC2022-08-08 00:00:00 UTC000
Aug 82022-08-08 00:00:00 UTC2022-08-15 00:00:00 UTC000
Aug 152022-08-15 00:00:00 UTC2022-08-22 00:00:00 UTC000
Aug 222022-08-22 00:00:00 UTC2022-08-29 00:00:00 UTC000
Aug 292022-08-29 00:00:00 UTC2022-09-05 00:00:00 UTC000
Sep 52022-09-05 00:00:00 UTC2022-09-12 00:00:00 UTC000
Sep 122022-09-12 00:00:00 UTC2022-09-19 00:00:00 UTC000
Sep 192022-09-19 00:00:00 UTC2022-09-26 00:00:00 UTC000
Sep 262022-09-26 00:00:00 UTC2022-10-03 00:00:00 UTC000
Oct 32022-10-03 00:00:00 UTC2022-10-10 00:00:00 UTC000
Oct 102022-10-10 00:00:00 UTC2022-10-17 00:00:00 UTC000
Oct 172022-10-17 00:00:00 UTC2022-10-24 00:00:00 UTC000
Oct 242022-10-24 00:00:00 UTC2022-10-31 00:00:00 UTC000
Oct 312022-10-31 00:00:00 UTC2022-11-07 00:00:00 UTC000
Nov 72022-11-07 00:00:00 UTC2022-11-14 00:00:00 UTC000
Nov 142022-11-14 00:00:00 UTC2022-11-21 00:00:00 UTC000
Nov 212022-11-21 00:00:00 UTC2022-11-28 00:00:00 UTC000
Nov 282022-11-28 00:00:00 UTC2022-12-05 00:00:00 UTC000
Dec 52022-12-05 00:00:00 UTC2022-12-12 00:00:00 UTC000
Dec 122022-12-12 00:00:00 UTC2022-12-19 00:00:00 UTC000
Dec 192022-12-19 00:00:00 UTC2022-12-26 00:00:00 UTC000
Dec 262022-12-26 00:00:00 UTC2023-01-02 00:00:00 UTC000
Jan 22023-01-02 00:00:00 UTC2023-01-09 00:00:00 UTC101

What Hacker News says

3 sources
Hey, this is mine. Thanks for submitting it. I'll answer some questions. > Why? I ported Trealla Prolog to WASM (WASI) and I was looking for something useful to test it against. I found Spin, which can run WASM+CGI, and landed on this. Making this project exposed a number of bugs in my port that have now been fixed, so consumers of more useful projects[1][2] benefit as well. Also, PHP style templates are just fun! There's something valuable to just being able to shove a little bit of code inside some HTML and get it up on the internet. I started my webdev journey with PHP many many years ago, and it's nice to revisit it from a different perspective. I don't use the real (elephant) PHP anymore, but I've gained a newfound appreciation for how fun its quick & dirty development style is. I hope this project can serve as an example of how to u
Read the rest
se Prolog for fun things. It does showcase some of the cooler dynamic aspects of the language, and the PHP parsing code is like 10 lines of DCG. > Is it a joke? Yes and no. The name is certainly a joke. I was pondering what 'Prolog on Rails' might be and thought calling it PHP would be funny. This led to the PHP-style templates which were quick to implement and pretty powerful. Despite the humorous presentation, it does actually work. > Can you use Prolog for web services? Yes! For example, SWI has a mature HTTP package: https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p.... It's used to power SWISH, an online Prolog code sharing thing: https://swish.swi-prolog.org/ > Next steps? I would like to support persistence somehow. I think it'd be really cool if you could use Prolog's dynamic database[3] as a persistent store. Spin has components for Postgres and Redis so it shouldn't be too hard to implement, but I lose the WASI compatibility if I do that... which means I can't use the binary from WAPM, etc. I would also like to experiment with running Trealla on Cloudflare Workers. I have another project, worker-prolog[4], which uses Tau Prolog (a Prolog written in Javascript) on Workers. On a somewhat related note, I've also been playing around with Cosmopolitan libc[5]. I got Trealla to compile to an APE executable but there's some issues with the embedded Prolog libraries getting garbled, so I need to improve my GDB skills and figure out what's going on there. Finally, I'd like to say thanks to Andrew Davison (@infradig on GitHub), the author of Trealla Prolog, for letting me add WASM support to his project and helping me with lots of things. For example, PHP led to Andrew implementing improvements for using DCGs to parse Prolog terms, which is now super fast[6]! [1]: https://github.com/guregu/trealla-js [2]: https://github.com/trealla-prolog/go [3]: https://www.swi-prolog.org/pldoc/man?predicate=assertz/1 [4]: https://github.com/guregu/worker-prolog [5]: https://justine.lol/cosmopolitan/ [6]: https://github.com/trealla-prolog/trealla/issues/53
In PHP: Prolog Home Page
Sorry, just saw this now. Mostly for fun! But I have some slightly crazy ambitions. Prolog lets you easily write complex queries, so it works quite well sitting on top of some in-memory data. I think that you could use Prolog's unification as a GraphQL-like "universal API", all that's missing is a quick and easy way to store Prolog data durably. I wrote some more here, but I plan on writing a proper article sometime soon: https://github.com/guregu/worker-prolog
In Rust advocacy at a medium-sized startup

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.