frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Learn Prolog Now

https://lpn.swi-prolog.org/lpnpage.php?pageid=top
130•rramadass•3h ago•64 comments

The last-ever penny will be minted today in Philadelphia

https://www.cnn.com/2025/11/12/business/last-penny-minted
71•andrewl•1h ago•98 comments

Yt-dlp: External JavaScript runtime now required for full YouTube support

https://github.com/yt-dlp/yt-dlp/issues/15012
617•bertman•7h ago•380 comments

Yann LeCun to depart Meta and launch AI startup focused on 'world models'

https://www.nasdaq.com/articles/metas-chief-ai-scientist-yann-lecun-depart-and-launch-ai-start-fo...
702•MindBreaker2605•10h ago•499 comments

Launch HN: JSX Tool (YC F25) – A Browser Dev-Panel IDE for React

5•jsunderland323•18m ago•2 comments

The Geometry Behind Normal Maps

https://www.shlom.dev/articles/geometry-behind-normal-maps/
80•betamark•4h ago•5 comments

Ioannis Yannas invented artificial skin for treatment of burns–dies at 90

https://news.mit.edu/2025/professor-ioannis-yannas-dies-1027
56•bookofjoe•1w ago•1 comments

Waymo robotaxis are now giving rides on freeways in LA, SF and Phoenix

https://techcrunch.com/2025/11/12/waymo-robotaxis-are-now-giving-rides-on-freeways-in-these-3-cit...
113•nharada•1h ago•110 comments

Micro.blog launches new 'Studio' tier with video hosting

https://heydingus.net/blog/2025/11/micro-blog-offers-an-indie-alternative-to-youtube-with-its-stu...
60•justin-reeves•4h ago•21 comments

Fighting the New York Times' invasion of user privacy

https://openai.com/index/fighting-nyt-user-privacy-invasion
121•meetpateltech•3h ago•113 comments

What happened to Transmeta, the last big dotcom IPO

https://dfarq.homeip.net/what-happened-to-transmeta-the-last-big-dotcom-ipo/
152•onename•9h ago•77 comments

NetHack4 Philosophy

http://nethack4.org/philosophy.html
26•suioir•1w ago•10 comments

Helm v4.0.0

https://github.com/helm/helm/releases/tag/v4.0.0
26•todsacerdoti•59m ago•17 comments

Pakistani newspaper mistakenly prints AI prompt with the article

https://twitter.com/omar_quraishi/status/1988518627859951986
395•wg0•6h ago•139 comments

Laptops with Stickers

https://stickertop.art/main/
574•z303•1w ago•629 comments

X5.1 solar flare, G4 geomagnetic storm watch

https://www.spaceweatherlive.com/en/news/view/593/20251111-x5-1-solar-flare-g4-geomagnetic-storm-...
377•sva_•20h ago•109 comments

A Vision of Chocolate's Future in an Amsterdam Brownie

https://www.bloomberg.com/graphics/2025-opinion-future-of-chocolate/
48•laurex•5d ago•38 comments

The PowerPC Has Still Got It (Llama on G4 Laptop)

https://www.hackster.io/news/the-powerpc-has-still-got-it-c4348bd7a88c
31•stmw•1h ago•14 comments

Bluetooth 6.2 – more responsive, improves security, USB comms, and testing

https://www.cnx-software.com/2025/11/05/bluetooth-6-2-gets-more-responsive-improves-security-usb-...
207•zdw•6d ago•129 comments

Fungus in Chernobyl nuclear disaster zone has mutated to 'feed' on radiation (2024)

https://www.unilad.com/news/world-news/fungus-chernobyl-mutated-feed-radiation-164735-20241217
59•thunderbong•2h ago•54 comments

Four strange places to see London's Roman Wall

https://diamondgeezer.blogspot.com/2025/11/odd-places-to-see-londons-roman-wall.html
258•zeristor•19h ago•85 comments

Building a CI/CD Pipeline Runner from Scratch in Python

https://muhammadraza.me/2025/building-cicd-pipeline-runner-python/
3•mr_o47•2d ago•1 comments

Please donate to keep Network Time Protocol up – Goal 1k

https://www.ntp.org/
295•gastonmorixe•10h ago•213 comments

I didn't reverse-engineer the protocol for my blood pressure monitor in 24 hours

https://james.belchamber.com/articles/blood-pressure-monitor-reverse-engineering/
323•jamesbelchamber•20h ago•124 comments

.NET MAUI is coming to Linux and the browser

https://avaloniaui.net/blog/net-maui-is-coming-to-linux-and-the-browser-powered-by-avalonia
298•vyrotek•19h ago•244 comments

Simulating a Planet on the GPU: Part 1 (2022)

https://www.patrickcelentano.com/blog/planet-sim-part-1
101•Doches•11h ago•15 comments

Using street lamps as EV chargers

https://www.techbriefs.com/component/content/article/54104-using-street-lamps-as-ev-chargers
46•rbanffy•1w ago•47 comments

The terminal of the future

https://jyn.dev/the-terminal-of-the-future
287•miguelraz•21h ago•149 comments

Perkeep – Personal storage system for life

https://perkeep.org/
293•nikolay•14h ago•59 comments

Pikaday: A friendly guide to front-end date pickers

https://pikaday.dbushell.com
279•mnemonet•1d ago•128 comments
Open in hackernews

Learn Prolog Now

https://lpn.swi-prolog.org/lpnpage.php?pageid=top
124•rramadass•3h ago

Comments

jackallis•2h ago
is prolog a use-case language or is it as versatile as python?
zimpenfish•1h ago
In theory, it's as versatile as Python et al[0] but if you're using it for, e.g., serving bog-standard static pages over HTTP, you're very much using an industrial power hammer to apply screws to glass - you can probably make it work but people will look at you funny.

[0] Modulo that Python et al almost certainly have order(s) of magnitude more external libraries etc.

bigfishrunning•1h ago
> you can probably make it work but people will look at you funny

Don't threaten me with a good time

qsort•1h ago
Python wins out in the versatility conversation because of its ecosystem, I'm still kinda convinced that the language itself is mid.

Prolog has many implementations and you don't have the same wealth of libraries, but yes, it's Turing complete and not of the "Turing tarpit" variety, you could reasonably write entire applications in SWI-Prolog.

WillAdams•1h ago
Right, Python is usually the second-best choice for a language for any problem --- arguably the one thing it is best at is learning to program (in Python) --- it wins based on ease-of-learning/familiarity/widespread usage/library availability.
aeonik•1h ago
More like 3rd to 5th best is most categories. There's just a lot of categories.

Its ease of use and deployment give it a lot more staying power.

The syntax is also pretty nice.

ecshafer•53m ago
I don't know if I would say its second-best. It just happened to get really popular because it has relatively easy syntax, and Numpy is a really great library making all of those scientific packages that people were using Fortran and C++ for before available in an easier language. This boosted the language, right when data science became a thing, right when dynamic programming became popular, right when there was a boost in Learn 2 Code forget about learning fundamentals was a thing. Its an okay language I guess, but I really think it was lucky that Numpy exists and Numby or Numphp.
ux266478•46m ago
Personally I find Python more towards the bottom of the list with me, despite being the language I learned on. Especially if the code involved is "pythonic". Just doesn't jive with my neurochemistry. All the problems of C++ with much greater ambiguity, and I've never really been impressed with the library ecosystem. Yeah there's a lot, but just like with node it's just a mountain of unusably bad crap.

I think lua is the much better language for a wide variety of reasons (Most of the good Python libraries are just wrappers around C libraries, which is necessary because Python's FFI is really substandard), but I wouldn't reach for python or lua if I'm expecting to write more than 1000 lines of code. They both scale horribly.

rramadass•32m ago
FWIK; You can't compare the two. Python is far more general and larger than Prolog which is more specialized. However there have been various extensions to Prolog to make it more general. See Extensions section in Prolog wikipedia page - https://en.wikipedia.org/wiki/Prolog#Extensions Eg. Prolog++ - https://en.wikipedia.org/wiki/Prolog%2B%2B to allow one to do large-scale OO programming with Prolog.

Earlier, Prolog was used in AI/Expert Systems domains. Interestingly it was also used to model Requirements/Structured Analysis/Structured Design and in Prototyping. These usages seems interesting to me since there might be a way to use these techniques today with LLMs to have them generate "correct" code/answers.

For Prolog and LLMs see - https://news.ycombinator.com/item?id=45712934

Some old papers/books that i dug up and seem relevant;

Prototyping analysis, structured analysis, Prolog and prototypes - https://dl.acm.org/doi/10.1145/57216.57230

Prolog and Natural Language Analysis by Fernando C. N. Pereira and Stuart M. Shieber (free digital edition) - http://www.mtome.com/Publications/PNLA/pnla.html

The Application of Prolog to Structured Design - https://www.researchgate.net/publication/220281904_The_Appli...

jodrellblank•31m ago
Do you mean Northern Conservative Baptist Great Lakes Region Council of 1879 standard Prolog?[2]

SWI Prolog (specifically, see [2] again) is a high level interpreted language implemented in C, with an FFI to use libraries written in C[1], shipping with a standard library for HTTP, threading, ODBC, desktop GUI, and so on. In that sense it's very close to Python. You can do everyday ordinary things with it, like compute stuff, take input and output, serve HTML pages, process data. It starts up quickly, and is decently performant within its peers of high level GC languages - not v8 fast but not classic Java sluggish.

In other senses, it's not. The normal Algol-derivative things you are used to (arithmetic, text, loops) are clunky and weird. It's got the same problem as other declarative languages - writing what you want is not as easy as it seemed like it was going to be, and performance involves contorting your code into forms that the interpreter/compiler is good with.

It's got the problems of functional languages - everything must be recursion. Having to pass the whole world state in and out of things. Immutable variables and datastructures are not great for performance. Not great for naming either, you can't do x++ you have to do "x1 is x+1" leaving temporary variable names all over.

It's got some features I've never seen in other languages - the way the constraint logic engine just works with normal variables is cool. Code-is-data-is-code is cool. Code/data is metaprogrammable in a LISP macro sort of way. New operators are just another predicate. Declarative Grammars are pretty unique.

The way the interpreter will try to find any valid path through your code - the thing which makes it so great for "write a little code, find a solution" - makes it tough to debug why things aren't working. And hard to name things, code doesn't do things it describes the relation of states to each other. That's hard to name on its own, but it's worse when you have to pass the world state and the temporary state through a load of recursive calls and try to name that clearly, too.

It's full of legacy, even more than Python is. It has a global state - the Prolog database - but it's shunned. It has two or three different ways of thinking about strings, and it has atoms. ISO Prolog doesn't have modules, but different implementations of Prolog do have different implementations of modules. Literals for hashtables are contentious (see [2] again). Same for object orientation, standard library predicates, and more.

[1] https://www.swi-prolog.org/pldoc/man?section=foreign

[2] https://news.ycombinator.com/item?id=26624442

mattbettinson•1h ago
In university, Learning prolog was my first encounter with the idea that my IQ may not be as high as I thought
ge96•1h ago
intro to quantum physics for me (which is only sophomore) I noped out of advanced math/physics at that point, luckily I did learn to code on my own
chanux•1h ago
I thoroughly enjoyed doing all the exercises. It was challenging and hence, fun!

I don't think I ever learned how it can be useful other than feeding the mind.

vidarh•1h ago
I also found it mindbending.

But some parts, like e.g. the cut operator is something I've copied several times over for various things. A couple of prototype parser generators for example - allowing backtracking, but using a cut to indicate when backtracking is an error can be quite helpful.

echelon•1h ago
There are declarative languages like SQL and XSLT.

And then there are declarative languages like Prolog.

droningparrot•1h ago
I had more success with the Prolog language track on https://exercism.org/tracks/prolog

It's a mind-bending language and if you want to experience the feeling of learning programming from the beginning again this would be it

zemptime•1h ago
I've recently started modeling some of my domains/potential code designs in Prolog. I'm not that advanced. I don't really know Prolog that well. But even just using a couple basic prolog patterns to implement a working spec in the 'prolog way' is *unbelievably* useful for shipping really clean code designs to replace hoary old chestnut code. (prolog -> ruby)
ramses0•1h ago
I keep wishing for "regex for prolog", ie: being able to (in an arbitrary language) express some functional bits in "prolog-ish", and then be able to ask/query against it.

    let prologBlob = new ProLog()
    prologBlob.add( "a => b" ).add( "b => c" )
    prologBlob.query( "a == c?" ) == True
(not exactly that, but hopefully you get the gist)

There's so much stuff regarding constraints, access control, relationship queries that could be expressed "simply" in prolog and being able to extract out those interior buts for further use in your more traditional programming language would be really helpful! (...at least in my imagination ;-)

zemptime•1h ago
I've wished for the same kind of 'embed prolog in my ruby' for enumerating all possible cases, all invalid cases, etc in test suites. Interesting to know it's not just me!
naasking•1h ago
Maybe try a Ruby Kanren implementation:

https://minikanren.org/

uKanren is conceptually small and simple, here's a Ruby implementation: https://github.com/jsl/ruby_ukanren

dflock•1h ago
There are a bunch of libraries that will do this - here's one example of a python one: https://github.com/yuce/pyswip - and a ruby one: https://github.com/preston/ruby-prolog
zemptime•46m ago
I did try ruby-prolog. The deeper issue is that its just not prolog. Writing in actual prolog affords a lot of clarity and concision which would be quite noisy in ruby-prolog. To me, the difference was stark enough it wasn't worth any convenience already being in ruby was worth.
dflock•1h ago
There are a bunch of libraries that will do this - here's one example of a python one: https://github.com/yuce/pyswip - and a ruby one: https://github.com/preston/ruby-prolog
dragonwriter•1h ago
While usually using native syntax rather than strings, somethign like that exists for most languages of any popularity (and many obscure ones), in the form of miniKanren implementations.

https://minikanren.org/

svieira•48m ago
You might be interested in Flix:

https://play.flix.dev/?q=PQgECUFMBcFcCcB2BnUBDUBjA9gG15JtAJb...

is an embedded Datalog DB and query in a general-purpose programming language.

More examples on https://flix.dev/

dukeofdoom•1h ago
Always felt this would be language that Sherlock Holmes would use...so be sure to wear the hat when learning it
waynecochran•1h ago
I remember writing a Prolog(ish) interpreter in Common Lisp in an 90's AI course in grad school for Theorem proving (which is essentially what Prolog is doing under the hood). Really foundational to my understanding of how declarative programming works. In an ideal world I would still be programming in Lisp and using Prolog tools.
travisgriggs•42m ago
> In an ideal world…

I see this sentiment a lot lately. A sense of missed nostalgia.

What happened?

In 20 years, will people reminisce about JavaScript frameworks and reminisce how this was an ideal world??

drannex•33m ago
I can tell you, from the year 2045, that running the worlds global economy on Javascript was the direct link to the annihilation of most of our freedom and existence. Hope this helps.
fithisux•16m ago
I also see the CL or Tcl+C or Assembly as an ideal world.
teunispeters•9m ago
Speaking as someone who just started exploring Prolog and lisp, and ended up in the frozen north isolated from internet - access. The tools were initially locked/commercial only during a critical period, and then everyone was oriented around GUIs - and GUI environments were very hostile to the historical tools, and thus provided a different kind of access barrier.

A side one is that the LISP ecology in the 80s was hostile to "working well with others" and wanted to have their entire ecosystem in their own image files. (which, btw, is one of the same reasons I'm wary of Rust cough)

Really, it's only become open once more with the rise of WASM, systemic efficiency of computers, and open source tools finally being pretty solid.

ux266478•1h ago
Prolog really is such a fantastic system, if I can justify its usage then I won't hesitate to do so. Most of the time I'll call a language that I find to be powerful a "power tool", but that doesn't apply here. Prolog is beyond a power tool. A one-off bit of experimental tech built by the greatest minds of a forgotten generation. You'd it find deep in irradiated ruins of a dead city, buried far underground in a bunker easily missed. A supercomputer with the REPL's cursor flickering away in monochrome phosphor. It's sitting there, forgotten. Dutifully waiting for you to jack in.
lmf4lol•51m ago
When I entered university for my Bachelors, I was 28 years old and already worked for 5 or 6 years as a self-taught programmer in the industry. In the first semester, we had a Logic Programming class and it was solely taught in Prolog. At first, I was mega overwhelmed. It was so different than anything I did before and I had to unlearn a lot of things that I was used to in "regular" programming. At the end of the class, I was a convert! It also opened up my mind to functional programming and mathematical/logical thinking in general.

I still think that Prolog should be mandatory for every programmer. It opens up the mind in such a logical way... Love it.

Unfortunately, I never found an opportunity in my 11 years since then to use it in my professional practice. Or maybe I just missed the opportunities?????

ux266478•25m ago
Did they teach you how to use DCGs? A few months ago I used EDCGs as part of a de-spaghettification and bug fixing effort to trawl a really nasty 10k loc sepples compilation unit and generate tags for different parts of it. Think ending up with a couple thousand ground terms like:

tag(TypeOfTag, ParentFunction, Line).

Type of tag indicating things like an unnecessary function call, unidiomatic conditional, etc.

I then used the REPL to pull things apart, wrote some manual notes, and then consulted my complete knowledgebase to create an action plan. Pretty classical expert system stuff. Originally I was expecting the bug fixing effort to take a couple of months. 10 days of Prolog code + 2 days of Prolog interaction + 3 days of sepples weedwacking and adjusting the what remained in the plugboard.

_spduchamp•1h ago
I remember a project I did in undergrad with Prolog that would fit connecting parts of theoretical widgets together based on constraints about how different pieces could connect and it just worked instantly and it felt like magic because I had absolutely no clue how I would have coded that in Pascal or COBOL at that time. It blew my mind because the program was so simple.
DeathArrow•1h ago
What kind of problems is Prolog helping to solve besides GOFAI, theorem proving and computational linguistics?
glkindlmann•1h ago
Others have more complete answers, but the value for me of learning Prolog (in college) was being awakened to a refreshingly different way of expressing a program. Instead of saying "do this and this and this", you say "here's what it would mean for the program to be done".
ux266478•57m ago
Any kind of problem involving the construction, search or traversal of graphs of any variety from cyclic semi-directed graphs to trees, linear programming, constraint solving, compilers, databases, formal verification of any kind not just theorem proving, computational theory, data manipulation, and in general anything.
gota•47m ago
At work, I bridged the gap between task tracking software and mandatory reports (compliance, etc.). Essentially, it handles distributing the effective working hours of workers across projects, according to a varied and very detailed set of constraints (people take time off, leave the company and come back, sick days, different holidays for different remote workers, folks work on multiple stuff at the same time, have gaps in task tracking, etc.).

In the words of a colleague responsible for said reports it 'eliminated the need for 50+ people to fill timesheets, saves 15 min x 50 people x 52 weeks per year'

It has been (and still is) in use for 10+years already. I'd say 90% of the current team members don't even know the team used to have to "punch a clock" or fill timesheets way back.

rramadass•23m ago
See my comment here - https://news.ycombinator.com/item?id=45902960
arein3•1h ago
We had it in university courses and it seemed useless. DSL for backtracking.
ecshafer•58m ago
I really enjoyed learning Prolog in university, but it is a weird language. I think that 98% of tasks I would not want to use Prolog for, but for that remaining 2% of tasks it's extremely well suited for. I have always wished that I could easily call Prolog easily from other languages when it suited the use case, however good luck getting most companies to allow writing some code in Prolog.
rootnod3•49m ago
That is where Lisp or Scheme weirdly shines. It is incredibly easy to add prolog to a Lisp or a Scheme. It’s almost as if it comes out naturally if you just go down the rabbit hole.

“The little prover” is a fantastic book for that. The whole series is.

ecshafer•37m ago
I worked through the little scheme but not the little prover, I think Ill take a look at that. Thanks.
rootnod3•6m ago
One can of course add the same stuff to other languages in form of libraries and stuff, but lisp/scheme make it incredibly easy to make it look like part of the language itself and make seem a mere extension of the language. So you can have both worlds if you want to. Lisp/scheme is not dead.

In fact, in recent years people have started contributing again and are rediscovering the merits.

ashton314•13m ago
[delayed]
quux•51m ago
yes
samuell•49m ago
I love Prolog, and have seen so many interesting use cases for it.

In the end though, it mostly just feels enough of a separate universe to any other language or ecosystem I'm using for projects that there's a clear threshold for bringing it in.

If there was a really strong prolog implementation with a great community and ecosystem around, in say Python or Go, that would be killer. I know there are some implementations, but the ones I've looked into seem to be either not very full-blown in their Prolog support, or have close to non-existent usage.

disambiguation•42m ago
I am once again shilling the idea that someone should find a way to glue Prolog and LLMs together for better reasoning agents.

https://news.ycombinator.com/context?id=43948657

Thesis:

1. LLMs are bad at counting the number of r's in strawberry.

2. LLMs are good at writing code that counts letters in a string.

3. LLMs are bad at solving reasoning problems.

4. Prolog is good at solving reasoning problems.

5. ???

6. LLMs are good at writing prolog that solves reasoning problems.

Common replies:

1. The bitter lesson.

2. There are better solvers, ex. Z3.

3. Someone smart must have already tried and ruled it out.

Successful experiments:

1. https://quantumprolog.sgml.net/llm-demo/part1.html

naasking•24m ago
> LLMs are bad at counting the number of r's in strawberry.

This is a tokenization issue, not an LLM issue.

f1shy•16m ago
Wouldn’t that be like a special case of neuro-symbolic programming?! There are plenty of research going on
jodrellblank•15m ago
> "4. Prolog is good at solving reasoning problems."

Plain Prolog's way of solving reasoning problems is effectively:

    for person in [martha, brian, sarah, tyrone]:
      if timmy.parent == person:
        print "solved!"
You hard code some options, write a logical condition with placeholders, and Prolog brute-forces every option in every placeholder. It doesn't do reasoning.

Arguably it lets a human express reasoning problems better than other languages by letting you write high level code in a declarative way, instead of allocating memory and choosing data types and initializing linked lists and so on, so you can focus on the reasoning, but that is no benefit to an LLM which can output any language as easily as any other. And that might have been nice compared to Pascal in 1975, it's not so different to modern garbage collected high level scripting languages. Arguably Python or JavaScript will benefit an LLM most because there are so many training examples inside it, compared to almost any other langauge.

nuc1e0n•6m ago
What makes you think your brain isn't also brute forcing potential solutions subconciously and only surfacing the useful results?
lynndotpy•14m ago
As someone who did deep learning research 2017-2023, I agree. "Neurosymbolic AI" seems very obvious, but funding has just been getting tighter and more restrictive towards the direction of figuring out things that can be done with LLMs. It's like we collectively forgot that there's more than just txt2txt in the world.
rramadass•13m ago
You might find Eugene Asahara's detailed Prolog in the LLM Era series of about a dozen blog posts very useful - https://eugeneasahara.com/category/prolog-in-the-llm-era/
hacker_homie•11m ago
Prolog doesn't look like javascript or python so:

1. web devs are scared of it.

2. not enough training data?

I do remember having to wrestle to get prolog to do what I wanted but I haven't written any in ~10 years.

Avicebron•4m ago
@goblinqueen, you around?
myth_drannon•41m ago
Two Prolog books that I find very interesting:

Advanced Turbo prolog - https://archive.org/details/advancedturbopro0000schi/mode/2u...

Prolog programming for artificial intelligence - https://archive.org/details/prologprogrammin0000brat_l1m9/mo...

wodenokoto•33m ago
The background image says "testing version" - is there a production version?
cubefox•27m ago
There seems to an interesting difference between Prolog and conventional (predicate) logic.

In Prolog, anything that can't be inferred from the knowledge base is false. If nothing about "playsAirGuitar(mia)" is implied by the knowledge base, it's false. All the facts are assumed to be given; therefore, if something isn't given, it must be false.

Predicate logic is the opposite: If I can't infer anything about "playsAirGuitar(mia)" from my axioms, it might be true or false. It's truth value is unknown. It's true in some model of the axioms, and false in others. The statement is independent of the axioms.

Deductive logic assumes an open universe, Prolog a closed universe.

IceDane•13m ago
Prolog is easily one of my favorite languages, and as many others in this thread, I first encountered it during university. I ended up teaching it for a couple of years (along with Haskell) and ever since, I've gone on an involuntary prolog bender of sorts once or twice a year. I almost always use it for Advent of code as well.
shevy-java•6m ago
But I don't wanna!