logoalt Hacker News

nylonstrung • yesterday at 5:34 PM • 3 replies • view on HN

We don't need a new verifiable language, everyone trying to build new ones is suffering from NIH in my opinion.

Lean is already an extremely powerful and performant FP whose capability is essentially a superset of all other FPs and which has the most powerful metaprogramming and DSL building features outside of Racket

It has massive, likely insurmountable network effects in terms of the lemmas already written for it which can be reused in general purpose contexts

What we need is more libraries, frameworks, contributions to Core and Batteries which make it more useful outside of the domain of pure proofs and mathematics which has obviously been the focus so far.


Replies

danilafe • yesterday at 5:42 PM

I agree with you in part, as I have lightly alluded to in my article. There's a lot to love! Lean's typeclasses + inference, metaprogramming, custom notation, "X implemented as Y" support, and much more are fantastic.

It's not clear to me, however, that the space is completely filled. I find it hard to imagine using Lean for software that deeply interacts with the OS or hardware, or even just "doesn't refcount". Am I unaware of progress in this area? In a similar vein, in terms of practical software success, I think we've seen the most with model checking, yet Lean is not particularly amenable to this. It remains to be seen whether tactics and proofs (+ some sort of repair) will beat out the incumbent.

➕ show 4 replies
jeremyjh • yesterday at 6:01 PM

The author acknowledged that. I recently discovered this on my own and was surprised to learn that:

* Lean 4 is self-hosting

* Lean has monadic I/O, do notation, type classes and other Haskell inspired syntax and language features.

* There is at least one guy building infrastructure fundamentals for web app development: https://github.com/paulbutcher?tab=repositories&q=&type=&lan...

* If you know and like Haskell, Lean is quite approachable (at least initially).

* Dependent types can be much easier to understand than the capabilities possible with the many different type extensions in Haskell. For example, lean-pq has compile time verification of usage of table schemas (that are defined in code) and the machinery for that is very simple to understand compared to the various Haskell libraries that achieve this (click the Try it link at the bottom of the README section on this at https://github.com/typednotes/lean-pq#compile-time-column-ve...)

➕ show 1 reply
dnautics • yesterday at 6:01 PM

> capability is essentially a superset of all other FPs

Is that what we really want? For SW verification you mostly want "just plain logic" and really "set theory" is enough. Sure, the result will be more verbose, but do we care anymore now that the LLMs are writing so much of things? We should pivot to one where these two properties hold:

1. The bridge between the code and the proof is obvious

2. The proof is easily checkable by a human. That could mean more verbose, if you don't elide logical step or steps where the prover goes and looks for a theorem that satisfies the assertion.

➕ show 2 replies