1,325 karma · joined Dec 2, 2019 (6y ago) · 534 submissions
I also like compost.
and radio.
blog.cofree.coffee www.kpbj.fm www.kchungradio.org
ssbothwell_at_gmail_dot_com
comment 1d ago · link · parent
Nobody would try to understand a 17M line Javascript application by reading it top to bottom either. You'd want design and architecture docs first. That doesn't make Javascript equivalent to assembly, nor does it mean the code is not meant to be read and understood. The difficulty comes from scale and structure.
Lean, Agda and similar languages are high-level languages for writing mathematics. You write definitions, lemmas, theorems, etc. A well organized formalization can be read in the same way as one reads a well organized software application.
comment 1d ago · link · parent
I don't think that's right. These languages were designed to be read and understood by humans, and it's only very recently that we've started outsourcing proof construction to LLMs.
The 1Lab is a good example of a large formalization project done in a human-centric way, where the formal code itself helps build understanding of the subject. It's written in a fork of Agda as a literate, cross-linked reference for homotopy type theory and category theory.
3.
1Lab: A formalised, explorable online resource for homotopy type theory(1lab.dev ↗)
1 points · by solomonb · 1d ago · 1 comment
comment 1d ago · link · parent
It is intended to be written and understood by humans, and it's only very recently that we've started outsourcing that work to LLMs. The new thing here is the size and scope achieved via LLM code gen.
For a large, human-centric formalization project (in a fork of Agda), check out the 1lab: https://1lab.dev
comment 1d ago · link · parent
A proof of X is some actual construction and a proof of ¬(X) is a function that accepts a proof of X and turns it into a contradiction.
A proof of ¬¬(X) is thus a function that accepts a proof of ¬(X) and turns it into a contradiction. It doesn't actually give you a proof of X.
In the case of P=NP, a proof would be an actual SAT algorithm plus its polynomial bound (and some kind of evidence the SAT algorithm meets the bound).
What you actually hold when you've proved ¬¬(P=NP) is a function whose input is a refutation of P=NP and whose output is ⊥. You can't actually get a proof of P=NP from that.
What you have shown is that any attempt to refute P=NP is doomed but you haven't actually proven it to be true. I know its weird...
comment 1d ago · link · parent
Keeping it that way doesn't require a self-appointed NGO to decide anything. It's the default. The ones making a unilateral decision for "us" are the labs trying to change it.
comment 4d ago · link · parent
Different type theories correspond to different systems of formal logic with different levels of power and expression.
Simply Typed Lambda Calculus corresponds to intuitionistic propositional logic. If you lay out the typing judgements of STLC in natural deduction style and then physically erase the terms (leaving the types) then you literally have the rules of intuitionistic propositional logic.
So if you can write a term that typechecks at a type, that term is a proof of the corresponding proposition.
The easiest example is modus ponens, which is exactly the typing rule for function application:
G |- M : A -> B G |- N : A
-------------------------------- (App)
G |- M N : B
"Given a function from A to B and a value of A, you get a value of B."So then in a proof checker you prove the proposition P => (P => Q) => Q by writing a program of that type:
apply :: a -> (a -> b) -> b
apply x f = f x
`apply` is demonstrated in haskell which does not have a rich enough type theory to give you more then an intuition (no pun intended) for how this all works. Things like `undefined` and general recursion let you "prove" any type, so it isn't a consistent logic. Languages like Lean and Agda are built on richer dependent type theories that give you far more expressive power for writing proofs (quantifiers, induction, etc.), and they won't let you cheat the type theory.So to answer your question, no not a merkle tree but a tree none-the-less. You end up with a literal computer program which is a tree of expressions all of which must type check. If they type check then program itself is a proof for whatever proposition is encoded in the type of the program.
comment 1w ago · link · parent
I picked an extreme example. Sadly I don't have a great example of more "business" style code in a public repo to show you right now, but I have had a lot of success using LLMs to write CRUDy haskell APIs and such as well.
I think LLM output quality is wildly dependent on how we prompt them. And I don't just mean giving a really specific design for it to implement or whatever. I have no real proof but suspect that every little thing about how we communicate to an LLM will impact the quality of the output. Like even just our choice of language in how we describe a problem.
I have a friend who is not remotely a programmer who tried to vibe code a big python project with Claude. He came up with really detailed designs and worked through them over and over with Claude. He hit some major roadblocks and asked me to look over the code. I was really shocked at the quality of the code out.
There was tons and tons of dead code, unnecessary repeated expensive computations, no real sense of an architecture, etc. I didn't even re-write it by hand, I just asked claude things like "decompose all the functions to a reasonable size", "use modules to organize the code", "remove dead code", "write pure functions", "parse dont validate", etc. It eliminated thousands of lines of crap, became way easier to read, and improved the speed of the program by orders of magnitude.
comment 1w ago · link · parent
I find there are shibboleths you can say which get the LLM into a space where it can do better but generally I agree with you.
I also find that if the LLM is working in an existing code base with a really opinionated and consistently applied design that it will largely stay consistent with the codebase. Quality will drift as the ratio of human to LLM code changes so you periodically have to do a big cleanup to keep it from going too far.
comment 1w ago · link · parent
Here is an example where I literally just told claude I wanted generic instances for these type classes and we had a brief back and forth about the approach then it one shotted this entire module: https://github.com/solomon-b/monoidal-functors/blob/main/src...
I would say this code is indistinguishable from generics code written by a human. However, this type of code has a tendency to only be writable one way.
19.
Show HN: Dogfood Bench(solomon-b.github.io ↗)
2 points · by solomonb · 1w ago · discuss
comment 3w ago · link · parent
That isn't entirely true when it comes to dependent types and can be seen as a design choice. Types can depend on values and those values can often exist at runtime. Erasure only applies to parts we can determine are not computationally relevant.
For example `Vec n a`. The `n` is a natural number you may need at runtime, such as to get the length without walking the list. A dependent pair `Sigma(n : Nat). Vec n a` carries that `n` at runtime as ordinary data.
In fact many dependently typed languages have techniques, such as quantitative type theory, to assert what is needed at runtime.
comment 4w ago · link · parent
Honestly I can't believe I even need to state this. Its literally how science works..
comment 4w ago · link · parent
Thinking in such a utilitarian way feels like a flavor of Meditations on Moloch.[1] Just look at how short-term, quarter-to-quarter thinking is affecting the economy and the lived experience of every human on earth. It’s horrible.
[1] https://slatestarcodex.com/2014/07/30/meditations-on-moloch/
comment 1mo ago · link · parent
Why is this the argument when someone challenges your source, but when it comes to someone else's source your argument is:
> This is research from a labor advocacy group, with the explicit aim of the organization to advocate for this sort of thing. This doesn't mean the research is is automatically invalid, but it is bias worth mentioning.
comment 1mo ago · link · parent
comment 1mo ago · link · parent
You can can read from Loki or Journald and use regex or alert levels to filter what you pass to the LLM.
I've been using it with deepseek for my homelab. Its pretty helpful.