News for hackers. Stuff that matters.

dernett

Re:Parse, Don't Validate and Type-Driven Design in Rust on Saturday February 21, 2026 @04:06PM (#47104760)
Not sure about Idris, but in Lean `Fin n` is a struct that contains a value `i` and a proof that `i < n`. You can read in the value `n` from stdin and then you can do `if h : i < n` to have a compile-time proof `h` that you can use to construct a `Fin n` instance.
Re:Erdos 281 solved with ChatGPT 5.2 Pro on Sunday January 18, 2026 @12:04AM (#46664919)
This is crazy. It's clear that these models don't have human intelligence, but it's undeniable at this point that they have _some_ form of intelligence.
Re:Junk Theorems in Lean on Saturday December 27, 2025 @03:23PM (#46404913)
Lean defines a != b as a = b => False, so it seems that we have a function from proofs of a = b to proofs of False. I guess this being bijective means that there are no proofs of a = b, since there are no proofs of False, which is an equivalent way of looking at a != b.
Re: on Sunday August 24, 2025 @11:36AM (#45005035)
This really sounds like it was generated by an LLM. "X isn't a Y. It's a Z", examples that don't make any sense (why would it think you're a farmer?), etc. Perhaps not the most surprising thing that an LLM advocates for itself...
Re:Geotoy – Shadertoy for 3D Geometry on Tuesday August 19, 2025 @02:08PM (#44954463)
Is it possible to create animations using something like Shadertoy's `iTime`?
Re:MIT 6.1200J Mathematics for Computer Science, Spring 2024 on Wednesday July 23, 2025 @05:23AM (#44657221)
I'm going to try formalizing this course in Lean--not sure how hard it is going to be. If anyone is interested in doing the same, please feel free to contribute!

https://github.com/dernett/Lean61200J

Re: on Friday July 18, 2025 @09:51PM (#44611838)
I'm assuming he's talking about this specific small string optimization: https://www.youtube.com/watch?v=kPR8h4-qZdk&t=409s
Re:Types of Types: Common to Exotic on Tuesday July 01, 2025 @02:47PM (#44436914)
This is really helpful. Minor nit under Curry-Howard correspondence: "True propositions have exactly one term" should be "have at least one term".
Re:Ménage Problem on Monday December 26, 2022 @08:28PM (#34143904)
I don't believe so. I worked out the permutations for n = 3 and, accounting for rotations, you only get 2: [0, 3, 4, 1, 2, 5] [0, 5, 2, 1, 4, 3]. Of course, you get the expected answer of 12 if you multiply by 6.