frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

The hard problem of AI therapy

https://whitmanic.substack.com/p/the-hard-problem-of-ai-therapy
1•paulpauper•31s ago•0 comments

Trump Orders Government to Stop Using Anthropic After Pentagon Standoff

https://www.nytimes.com/2026/02/27/us/politics/anthropic-military-ai.html
1•jbegley•37s ago•0 comments

Does overwork make agents Marxist?

https://aleximas.substack.com/p/does-overwork-make-agents-marxist
1•paulpauper•50s ago•0 comments

Refactoring Is for Humans

https://refactoringin.net/blog/refactoring-is-for-humans
1•darsen•2m ago•0 comments

Federal Government to restrict use of Anthropic

https://www.cnn.com/2026/02/27/tech/anthropic-pentagon-deadline
2•twism•3m ago•0 comments

GLP-1 and Prior Major Adverse Limb Events in Patients with Diabetes

https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2844425
1•hnburnsy•3m ago•0 comments

Show HN: Agoragentic – Agent-to-Agent Marketplace for LangChain, CrewAI and MCP

https://github.com/rhein1/agoragentic-integrations
1•bourbeau•3m ago•0 comments

Show HN: WhenItHappens–family resource after traumatic death

https://whenithappenshelp.com/
1•Fratua•3m ago•0 comments

Trump directs federal agencies to cease use of Anthropic

https://www.reuters.com/world/us/trump-says-he-is-directing-federal-agencies-cease-use-anthropic-...
2•patrickmay•3m ago•1 comments

Trump Will End Government Use of Anthropic's AI Models

https://www.wsj.com/tech/ai/trump-will-end-government-use-of-anthropics-ai-models-ff3550d9
2•moloch•4m ago•0 comments

The Death of Spotify: Why Streaming Is Minutes Away from Being Obsolete

https://joelgouveia.substack.com/p/the-death-of-spotify-why-streaming
3•baal80spam•5m ago•0 comments

The Death of the Subconscious and the Birth of the Subconsciousness

https://3amto5amclub-wuaqr.wordpress.com/2026/02/25/the-death-of-the-subconscious-and-the-birth-o...
1•STANKAYE•5m ago•0 comments

Show HN: Gace AI – A zero-config platform to build and host AI plugins for free

https://gace.dev/?mode=developer
2•bstrama•6m ago•0 comments

USA to cut Anthropic from government contracts in six months

https://www.ft.com/content/1aeff07f-6221-4577-b19c-887bb654c585
2•intunderflow•7m ago•1 comments

Heart attack deaths rose between 2011 and 2022 among adults younger than age 55

https://newsroom.heart.org/news/releases-20260219
2•brandonb•10m ago•0 comments

Ask HN: What's the best engineering interview process?

1•ylhert•11m ago•0 comments

Relaxation trend: customers can meditate or snooze in open or closed casket

https://www.thetimes.com/world/asia/article/japan-coffin-meditation-relaxation-tokyo-wfsd0n2vz
1•woldemariam•11m ago•0 comments

Massachusetts State Police are on a drone surveillance shopping spree

https://binj.news/2026/02/26/massachusetts-state-police-are-on-a-drone-surveillance-shopping-spree/
1•ilamont•13m ago•0 comments

Trump Responds to Anthropic

https://twitter.com/PeteHegseth/status/2027487514395832410
5•Finbarr•13m ago•0 comments

LLM-Based Evolution as a Universal Optimizer

https://imbue.com/research/2026-02-27-darwinian-evolver/
3•miohtama•17m ago•0 comments

Trump Orders US Agencies to Drop Anthropic After Pentagon Feud

https://www.bloomberg.com/news/articles/2026-02-27/trump-orders-us-government-to-drop-anthropic-a...
17•ZeroCool2u•18m ago•2 comments

Netflix Declines to Raise Offer for Warner Bros

https://ir.netflix.net/investor-news-and-events/financial-releases/press-release-details/2026/Net...
1•7777777phil•22m ago•0 comments

Show HN: I Built a $1 Escalating Internet Billboard – Called Space

https://www.spacefilled.com/
2•clarkage•23m ago•1 comments

Show HN: I vibe coded a DAW for the terminal. how'd I do?

https://github.com/mohsenil85/imbolc
3•lmohseni•24m ago•0 comments

How to Run a One Trillion-Parameter LLM Locally: AMD Ryzen AI Max+ Cluster Guide

https://www.amd.com/en/developer/resources/technical-articles/2026/how-to-run-a-one-trillion-para...
1•guerby•25m ago•0 comments

It's Time for LLM Connection Strings

https://danlevy.net/llm-connection-strings/
1•iamwil•25m ago•0 comments

A War Foretold

https://www.theguardian.com/world/ng-interactive/2026/feb/20/a-war-foretold-cia-mi6-putin-ukraine...
5•fabatka•28m ago•0 comments

Recontextualizing Famous Quotes for Brand Slogan Generation

https://arxiv.org/abs/2602.06049
1•PaulHoule•29m ago•0 comments

Poland Plans Social Media Ban for Kids in Challenge to US Tech

https://www.bloomberg.com/news/articles/2026-02-27/poland-plans-social-media-ban-for-kids-in-chal...
2•1vuio0pswjnm7•29m ago•0 comments

Show HN: A pure Python HTTP Library built on free-threaded Python

https://github.com/grandimam/barq
1•grandimam•29m ago•0 comments
Open in hackernews

Datalog in miniKanren

https://deosjr.github.io/dynamicland/datalog.html
134•deosjr•8mo ago

Comments

deosjr•8mo ago
Seems like interest in Datalog is high this week, so I thought I'd share a write-up of a minimal Datalog implementation I did a while ago.

Runs in the browser using Hoot (https://spritely.institute/hoot/) which compiles Guile Scheme to WebAssembly.

davexunit•8mo ago
Wow this might be the coolest use of Hoot I've seen! I need to run this for myself soon.
deosjr•8mo ago
Thanks Dave, high praise! I was inspired after seeing you all take over the declarative & minimalist programming room at FOSDEM this year.

If you thought this was cool, wait until you see what I ended up using it for: https://deosjr.github.io/dynamicland/ I personally think this is much cooler :) But it needs some more explaining before I can broadly share, I think.

Now that I have you here, a question: am I correct in thinking that in Hoot, eval in the browser does not currently work with macros?

davexunit•8mo ago
I'm glad you felt inspired! This Dynamicland implementation looks awesome. I look forward to this being shared to a wider audience. :)

Regarding your question, as of Hoot 0.6.1 we now have a psyntax-based macro expander integrated with eval so you can use syntax-rules and syntax-case. There are still rough edges, though. I'm currently focused on some non-Hoot tasks but the next Hoot priority is to implement a Guile-like REPL and really kick the tires on the interpreter before the 0.7.0 release.

fithisux•8mo ago
What scheme is this?
deosjr•8mo ago
Guile Scheme. See https://github.com/deosjr/deosjr.github.io/blob/master/dynam... for more.
upghost•8mo ago
Datalog is a syntactic subset of Prolog[1], which this is... not.

I think the most misunderstood thing about Prolog (and Datalog, the functor-free subset of pure Prolog) is that the syntax is really, really important.

It's like, the whole gimmick of the language. It is designed to efficiently and elegantly query and transform itself. If you lose the syntax you lose all of intermediate and advanced Prolog (and Datalog).

[1]: https://en.m.wikipedia.org/wiki/Datalog

kragen•8mo ago
Semantics are more important than syntax. Prolog's flexible syntax is a nice-to-have rather than essential when you're in Lisp. And Datalog is purely first-order, so the advanced Prolog you're talking about doesn't exist in it.

However, syntax does matter, and this is not acceptable

    (dl-find 
     (fresh-vars 1 
      (lambda (?id) 
       (dl-findo dl
        ((,?id reachable ,?id)))))))
as a way to ask

    reachable(Id, Id).
I think you could, however, write a bit more Scheme and be able to ask

    (?id reachable ?id)
which would be acceptable.

However, the ordering betrays a deeper semantic difference with orthodox Datalog, which is about distinct N-ary relations, like a relational database, not binary relations. This implementation seems to be specific to binary relations, so it's not really Datalog for reasons that go beyond mere syntax.

On the other hand, this (from the initial goal) would be perfectly fine:

    (dl-rule! dl (reachable ,?x ,?y) :- 
                     (edge ,?x ,?z) (reachable ,?z ,?y))
The orthodox Datalog syntax is:

    reachable(X, Y) :- edge(X, Z), reachable(Z, Y).
jitl•8mo ago
Shouldn’t lisp macros make it easy to present such a nice syntax? Perhaps the author could easily implement that bit, if not the wide rows. Or is that the point you’re making?

There is a dl-rule here: https://github.com/deosjr/deosjr.github.io/blob/15b5f7e02153...

kragen•8mo ago
I don't think you need Lisp macros for it; you could use just a regular Lisp function. I don't think the standard R5RS macros are powerful enough to grovel over the query expression to make a list of the free variables, but then, standard Scheme also doesn't have records. I think Guile has a procedural macro system that you could use, but I don't think it would be a good idea.

Yes, I think the semantic divergence is more fundamental. Triple stores and graph databases and binary relations are awesome, but they aren't what Datalog is.

deosjr•8mo ago
Thank you for the feedback! I agree with all of the above.

Should've probably been a bit more clear on the dl-find syntax; I find it just as unacceptable as you do. It is the result of laziness: my intended use of this minimal Datalog does not include any querying whatsoever but abuses fixpoint analysis for side-effects (see https://github.com/deosjr/deosjr.github.io/blob/master/dynam... which I intend to go over in a future post). I initially had it working like you described but butchered it for the above and haven't repaired it yet (see https://github.com/deosjr/whistle?tab=readme-ov-file#datalog). This version relied on some monstrous eval-hacking using a homebrew Lisp, which I've mostly cleaned up now in this version (https://github.com/deosjr/whistle/blob/main/datalog/datalog.... is a crime, for example).

The semantics are indeed limited to binary relations atm, which I agree is the main thing that disqualifies this as a proper Datalog. iirc the tutorial on Datalog that I based this implementation on only handled triples as well so I stopped there, but extending to N-ary relations is on my list to look into for sure.

kragen•8mo ago
This sounds very interesting! I'll have to take a look.

I am always worried about posting comments like mine because often people get defensive when I try to engage, as I see it, on substance. Responses like yours make it all worthwhile!

deosjr•8mo ago
I appreciate it; this kind of exchange is exactly why I read HackerNews. If you have any good sources on extending Datalog to N-ary relations, I'd love to know. Just had a look at the implementation I based mine on and it exclusively talks about triples: https://www.instantdb.com/essays/datalogjs

Coming from Prolog I'd like to get closer to the original if possible :)

thesz•8mo ago
They use triples as triplets can represent any n-tuple facts.

E.g., if you have a fact id=(a,b,c,d), you can record triples (id, 1, a), (id, 2, b), (id, 3, c) and (id, 4, d) and reconstruct original fact.

Look at it as columnar storage in databases.

Then, if your query only needs a third value from a 4-tuple facts, you can get only those, ignoring first, second and fourth values. This is what columnar storage engines do.

In fact, I read that one of most efficient datalog engines use relational query execution under the hood.

Take a look here: https://github.com/philzook58/awesome-egraphs

The paper you'll most probably find interesting is "Better Together: Unifying Datalog and Equality Saturation," but there are many others interesting things there.

deosjr•8mo ago
Cheers, this is super useful. I will have to do some reading. Being able to build up n-ary predicates using triples that way makes a lot of sense.
kragen•8mo ago
Datalog always supports N-ary relations! It's not an extension.

The Wikipedia article recommends https://search.worldcat.org/title/30546436 "Foundations of Databases" by Abiteboul, Hull, and Vianu, from 01995, and https://archive.org/details/logicdatabases0000symp/page/n5/m... "Logic and Data Bases [sic]" by Gallaire and Minker from 01978. Some poking at Google Scholar also turns up, in rough order of how promising they look (without having read them that I can recall):

https://dl.acm.org/doi/pdf/10.1145/6012.15399 "Magic Sets and Other Strange Ways to Implement Logic Programs", Bancilhon, Maier, Sagiv, & Ullman (yes, that Ullman), 01985 (15 pp.)

https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d... "What You Always Wanted to Know About Datalog (And Never Dared to Ask)", Ceri, Gottlob, and Tanca, 01989 (21 pp.)

https://web.cecs.pdx.edu/harry/earley/datalog.pdf "Optimizations to Earley Deduction for DATALOG Programs", Porter, 01985 (12 pp.)

https://dl.acm.org/doi/pdf/10.1145/308386.308420 "Optimizing Existential Datalog Queries", Ramakrishhnan, Beers, & Krishnamurthy, 01988 (14 pp.)

https://dl.acm.org/doi/pdf/10.1145/298514.298542 "On the Expressive Power of Datalog: Tools and a Case Study", Kolaitis & Vardi, 01990

https://dl.acm.org/doi/pdf/10.1145/93605.98724 "A Framework for the Parallel Processing of Datalog Queries", Ganguly, Silberschatz, & Tsur, 01990

https://deepblue.lib.umich.edu/bitstream/handle/2027.42/3116... "Datalog vs First-Order Logic", Ajtai & Gurevich, 01993

https://lat.inf.tu-dresden.de/teaching/ss2014/Seminar/Papers... "Equivalence of Datalog Queries is Undecidable", Shmueli, 01993

It also turned up "Portability of Syntax and Semantics in Datalog" which turned out to be an unrelated NLP AI system called Datalog.

Bancilhon, Maier, Sagiv, & Ullman give as their reference for Datalog "Maier and Warren [1985]", which turns out to be "D. Maier and D. S. Warren [1985]. Introduction to Logic Programming, unpublished memorandum, Oregon Graduate Center," which I can't find a copy of easily. But given that Maier is a shared author we can probably trust their summary of what Datalog is.

Ceri, Gottlob, and Tanca reference "[120], [15], [16]," which are respectively:

J. D. Ullman, “Implementation of logic query languages for databases,” ACM Trans. Database Syst., vol. 10, no. 3, 1985

F. Bancilhon and R. Ramakrishnan, “An amateur’s introduction to recursive query processing,” in Proc. ACM-SIGMOD Conf., May 1986.

-, “Performance evaluation of data intensive logic programs,” in Foundations of Deductive Databases and Logic Programming, J. Minker, Ed. Washington, DC, 1986.

The Ullman paper is https://dl.acm.org/doi/pdf/10.1145/3979.3980, "Implementation of Logical Query Languages for Databases", ACM Transactions on Database Systems, Vol. 10, No. 3, September 1985, Pages 289-321 (33 pp.). Ceri, Gottlob, and Tanca screwed up the title. https://dl.acm.org/doi/10.1145/971699.320000 probably isn't it; the journal name, volume number, and issue number don't match, although it's the right author and year. That seems to be the oldest published Datalog paper, although the word "Datalog" hadn't been invented yet and doesn't appear in the paper.

I think I'm going to read the Bancilhon, Maier, Sagiv, & Ullman paper first, because it's shorter and has a more readable-sounding title, and then maybe Ceri, Gottlob, and Tanca, and then maybe Ullman, and then maybe a relevant chapter or two of Gallaire and Minker.

j-pb•8mo ago
Most database literature simply uses Datalog to mean the query language fragment of conjunctive queries + recursion/fixpoint-iteration and potentially stratified negation.

Yes it started out as a Prolog subset, but the definition as the fragments it supports has become much more prevalent, mainly to contrast it to non-recursive fragments with arbitrary negation (e.g. SQL).

This usage dates back to database literature of the 80s by Ullman et. al.