I tried to write a programming language that compiles to SAT many years ago: https://sentient-lang.org/
HN user
cpatuzzo
A software implementation of Lee Sallows' Pangram Machine from his paper 'In Quest of Pangram'.
It's one thing to apologise, but there was no talk in the article about measures they're taking to prevent this happening again. I sincerely hope they're scrambling internally to put some safeguards in place. Yes, it's bad a minor version bump changed behaviour, but now they know this can happen, it's irresponsible not to mitigate this risk, e.g. by scrubbing the card details for expired subscriptions from Stripe.
Hey everyone, I'm really flattered by everyone's interest in the language. I had no expectation of that when I worked on it. I'm happy to try and answer questions, though my memory's a bit fuzzy now. I think the reason for this sudden interest was this self-referential Tweet by Robin Houston which used Sentient to construct a pangram:
https://twitter.com/robinhouston/status/1177575725240639489?...
The best resource to understand the language is probably this podcast: https://whyarecomputers.com/4
I'm immensely grateful to Tom for coaxing me into recording it with him.
Neat, but not the most illuminating introductory demo.
Agreed. It was the first one I made so it just happened to become the homepage. It'd probably be better served by one of the others.
I still don't see how/where it assigns an index to "members", or how it reasons about "members" at all
Members is an array of booleans. Its intended meaning is: "is the number with this index in the subset?". When it iterates over the numbers, it only adds them to the sum if members[index] is true. The standard library is light so doesn't have a #zip function which would probably help clarity.
Also confusing is declaring sum=0 instead of sum=?
I think this demonstrates an unusual thing about Sentient in that you can write your constraint-based programs in a procedural style, but their evaluation is far from procedural such that you can set sum to anything you like at runtime.
I sometimes think of Sentient programs as running over the space of all possible values for variables. Sometimes they're completely deterministic (as in a conventional language) but other times they're determined at runtime as a consequence of the invariants of your program.
It reminds me a bit of quantum physics where the 'act of measuring' seems to determine the actual value of something.
It's returning the empty set. You can click on the grid to cycle through some of the solutions.
Also, there's an easter egg hidden in this example.