Parsers and parsing accessories. Para-academic. Rootless cosmopolitan redneck. Writes for @Status451Blog. 'Juvenile but not white supremacist' -- @splcenter
I was planning on holding off on this announcement until the project was farther along, but I'm excited to announce that I've been working on a new programming language called Phil, and the team at @Higherdotfun_ is supporting its development.
@fewinputs Sketching out some longer-horizon concrete plans. You've been giving me ideas. Btw, @sergeybratus said he loves the interactive Tour you made.
@introsp3ctor I used Haskell for the first draft mostly out of familiarity, but tbh this is why LLVM was the first lowering target. I figure nearly everyone already has LLVM in their TCB broadly speaking anyway, so you're no worse off for calling the boundary of competence there.
I freely admit that I am using Rocq for Phil mainly because my logic programming is inadequate by comparison. Skill issue on my end. Erik is right. Though, in Rocq's defense, the implementation and proof base are moving at a rate I couldn't have imagined two years ago.
With all the noise around formal verification today, it is easy to forget that the Lean or Dafny approach is not the only game in town. When you look closely at how different paradigms connect specifications, proofs, and executable code, four distinct philosophies emerge—each differing on who does the work of finding the witness.
1. Program, Then Prove (Lean, Dafny)
In Dafny or Lean, you write an algorithm that computes the value you want—the witness—alongside a proof that the witness satisfies your specification. In Dafny, the specification and implementation languages are distinct. Yet even in Lean, which fuses them via dependent types, the proof is erased at compile time; at runtime, the machine simply executes the deterministic algorithm you wrote.
2. Program Calculation (Squiggol / Bird–Meertens)
In the Squiggol style, you start with an obviously correct, albeit inefficient, executable program. There is no separate specification and implementation—the specification is the implementation. From there, you apply algebraic, correctness-preserving transformations (like fusion and promotion) to calculate an efficient algorithm. Every equational step is its own proof, though you are still manually deriving the algorithm that computes the witness.
3. Constructive Proof Extraction & Refinement (Rocq, Isabelle/HOL)
Rocq (formerly Coq) and Isabelle/HOL take this a step further through code extraction. In Rocq’s constructive logic, you don't even have to write the algorithm first: you can prove an existential theorem (∃ witness), and Rocq will erase the purely logical steps to extract the computational skeleton of your proof directly into an OCaml program. Classical systems like Isabelle/HOL achieve a similar result through stepwise data refinement, transforming abstract mathematical specs into executable code. Still, the human must construct the proof—and thus the underlying algorithm—ahead of time.
4. Proof Search as Execution (Logic Programming)
Logic programming collapses the entire divide at runtime. You state the axioms, and your query is the existential theorem you want to prove. Execution is the proof search itself, using unification and resolution to dynamically construct the witness you are after.
In the first three approaches, the human invents or vibe codes the algorithm (or proof) that produces the witness, and the machine verifies it.
Only in logic programming do you state what makes a witness valid and let execution itself find both the proof and the witness together—which is why logic programming is my favorite paradigm for formal verification.
The generic lowering contract puts it a little more formally: "Lowering receives semantics; realization supplies representation." Every realization decision carries explicit assumptions and proof obligations.
https://t.co/H2cJr7GDyS
I do want to point out that the Phil compiler does plenty of lowering, but in a deliberately opinionated way. Section 16 of the Tour puts the bottom line up front: lowering may choose representation, not meaning.
https://t.co/7d9DSuqkKD
@HackingDave Reminds me of that time I was working at Berkeley and the assistant PI upgraded PHP a major version and several minors *in prod* ... because of an IT warning about a vuln in a module we weren't even using. Took the whole app down.
That was a crappy twelve hours.
@ver0x77@fewinputs Changed my mind. The Philcoin community is building great stuff, and I think the custom launchpad feature that the Higher team are working on will sort things out in the long run. I'm comfortable letting it ride.
today showed exactly why Phil matters, and why the philcoin community keeps building for it
$15.5M left Lighter today and the protocol wasn't even hacked. what's being reported: two market maker API keys leaked. those keys aren't supposed to be able to send money out. so the attacker made a pool from the victim's own account, bought 99.99% of it for $10k, and moved the funds in $1M at a time
every step was allowed. the rule was the bug. it checked where the money went, not who owned it after
Phil is built for exactly this. you write the rule once, in one line: after a move, the owner still holds all of it. and the language refuses anything that breaks it
so within hours of the news we wrote that rule in Phil and ran the same drain against it
refused
Phil doesn't stop a key from leaking. it stops a leaked key from reaching the money
Meredith Patterson is building the language that refuses this kind of loss. the philcoin community is the one showing it, live, the same day it happens
still unconfirmed by Lighter and our page says so. will update when the post-mortem is out
https://t.co/yXO1hSW5Q4
$philcoin
Ea5dBrJZN58yV1nm1Q4DybJNYKeTvwpb2GEkXyW64bUH
I am amazed and delighted that Phil users who want to use exotic backends can already use the language in consequential ways before that backend even exists. Seriously check out what @fewinputs and the Philcoin community have been up to. Great stuff!
philcoin community doesn't wait around. we build
today I got "my coin" working and here's why it's big
paste any solana coin, connect your wallet, and from one page you can:
- lock supply until a date. no cancel, no early unlock
- open a burn vault for the fees. the SOL only leaves when someone burns the coin
- run a giveaway where a future block picks the winner, not the dev
then you share the link and anyone can check all of it without a wallet
every one of those actions goes through code that Meredith Patterson's Phil compiler produced. 3 days ago Phil on solana was a program that returned 42. now it's a launch kit any coin can use
no team allocation, no roadmap promises, just a community shipping real tools for a real language every single day
devnet for now, unaudited, mainnet is next
https://t.co/yWEVe9wTjQ
$philcoin
Ea5dBrJZN58yV1nm1Q4DybJNYKeTvwpb2GEkXyW64bUH
@ggsarzi@IvyAstrix@Grimezsz In fairness, writing a whole-ass programming language is pretty wordcelly, but equally typecelly and proofcelly, and the words are mostly on github
I'm a mediocre shape rotator, I put all that XP into rotating proofs