<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: hwayne</title><link>https://news.ycombinator.com/user?id=hwayne</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 30 Apr 2026 20:17:21 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=hwayne" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by hwayne in "When AI writes the software, who verifies it?"]]></title><description><![CDATA[
<p>The key bit is that specifications don't need to be "obviously computable", so they can be a lot simpler than the code that implements them. Consider the property "if some function has a reference to a value, that value will not change unless that function explicitly changes it". It's simple enough to express, but to <i>implement</i> it Rust needs the borrow checker, which is a pretty heavy piece of engineering. And proving the implementation actually guarantees that property isn't easy, either!</p>
]]></description><pubDate>Wed, 04 Mar 2026 03:17:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=47242585</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=47242585</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47242585</guid></item><item><title><![CDATA[New comment by hwayne in "Some silly Z3 scripts I wrote"]]></title><description><![CDATA[
<p>...Whoops. Yup, SMT solvers can <i>famously</i> return `unknown` on top of `sat` and `unsat`. Just added a post addendum about the mistake.</p>
]]></description><pubDate>Thu, 26 Feb 2026 18:31:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=47170053</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=47170053</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47170053</guid></item><item><title><![CDATA[New comment by hwayne in "My Gripes with Prolog"]]></title><description><![CDATA[
<p>I'll warn you that Picat is very much a "research language" and a lot of the affordances you'd expect with a polished PL just aren't there yet. There's also this really great "field notes" repo from another person who learned it: <a href="https://github.com/dsagman/picat" rel="nofollow">https://github.com/dsagman/picat</a></p>
]]></description><pubDate>Fri, 16 Jan 2026 01:40:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=46641977</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46641977</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46641977</guid></item><item><title><![CDATA[New comment by hwayne in "My Gripes with Prolog"]]></title><description><![CDATA[
<p>Check out datalog! <a href="https://learn-some.com/" rel="nofollow">https://learn-some.com/</a> The tutorial there uses Clojure syntax but Datalog normally uses a Prolog syntax.</p>
]]></description><pubDate>Fri, 16 Jan 2026 00:43:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=46641597</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46641597</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46641597</guid></item><item><title><![CDATA[New comment by hwayne in "TLA+ Modeling Tips"]]></title><description><![CDATA[
<p>Also:<p>-   Have a clear notion of what part of the specs represents the system under your control (the "machine"), and what part represents the broader world it interacts with. The world can do more than the machine, and the properties on the world are much more serious.<p>-   Make lots of helpers. You need them more than you think.<p>-   Add way more comments than you normally would. Specs are for analyzing very high-level ideas, and you should be explaining your high-level ideas.<p>-   Make the spec assumptions clear. What has to be true about the operating environment for the spec to be sensible in the first place?<p>-   Use lots of model values, use lots of constants, use lots of ASSUME statements. Constrain your fairness clauses as narrowly as possible.<p>-   Understand the difference between the semantics of TLA+ as an abstract notation and the semantics of TLA+ as something concretely model-checked. For example, TLA+ is untyped, but the model checker is typed. Also, a lot of TLA+ features are not available in different model checkers. OTOH, you can break TLA+ semantics with use of TLCSet and TLCGet.<p>The last tip applies to whatever modeling language you use: most have the same distinction.</p>
]]></description><pubDate>Wed, 17 Dec 2025 21:37:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=46305866</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46305866</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46305866</guid></item><item><title><![CDATA[New comment by hwayne in "TLA+ Modeling Tips"]]></title><description><![CDATA[
<p>I've had to help a client with something not exactly like, but with similar properties as, Google Docs. One of the big properties they had to engineer in was "the doc should eventually look the same for all open browser tabs on the same computer".<p>The other big question: what happens if user A makes change X and user B makes change Y? There's a lot of outcomes the product can pick between, but whatever they pick it should be <i>consistent</i>. That consistency in conflict resolution is a good property to model.</p>
]]></description><pubDate>Wed, 17 Dec 2025 21:35:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=46305851</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46305851</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46305851</guid></item><item><title><![CDATA[New comment by hwayne in "TLA+ Modeling Tips"]]></title><description><![CDATA[
<p>I think the "high school math" slogan is untrue and ultimately scares people away from TLA+, by making it sound like it's their fault for not understanding a tough tool. I don't think you could show an AP calculus student the equation `<>[](ENABLED <<A>>_v) => []<><<A>>_v` and have them immediately go "ah yes, I understand how that's only <i>weak</i> fairness"</p>
]]></description><pubDate>Wed, 17 Dec 2025 21:27:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=46305750</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46305750</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46305750</guid></item><item><title><![CDATA[New comment by hwayne in "AI will make formal verification go mainstream"]]></title><description><![CDATA[
<p>Those things, unlike floats, have approximable-enough facsimiles that you can verify instead. No tools support even fixed point decimals.<p>This has burned me before when I e.g needed to take the mean of a sequence.</p>
]]></description><pubDate>Wed, 17 Dec 2025 21:22:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=46305679</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46305679</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46305679</guid></item><item><title><![CDATA[New comment by hwayne in "AI will make formal verification go mainstream"]]></title><description><![CDATA[
<p>I really do wish that PRISM can one day add some quality of life features like "strings" and "functions"<p>(Then again, AIUI it's basically a thin wrapper over stochastic matrices, so maybe that's asking too much...)</p>
]]></description><pubDate>Wed, 17 Dec 2025 02:07:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=46297372</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46297372</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46297372</guid></item><item><title><![CDATA[New comment by hwayne in "AI will make formal verification go mainstream"]]></title><description><![CDATA[
<p>> No problem with floats or strings as far as specification goes. The particular verification tools you choose to run on your TLA+ spec may or may not have limitations in these areas, though.<p>I think it's disingenuous to say that TLA+ verifiers "may or may not have limitations" wrt floats when <i>none</i> of the available tools support floats. People should know going in that they won't be able to verify specs with floats!</p>
]]></description><pubDate>Wed, 17 Dec 2025 02:06:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=46297362</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46297362</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46297362</guid></item><item><title><![CDATA[New comment by hwayne in "When would you ever want bubblesort? (2023)"]]></title><description><![CDATA[
<p>Thanks for sharing the general term! I didn't know about it.</p>
]]></description><pubDate>Thu, 11 Dec 2025 04:09:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=46227552</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=46227552</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46227552</guid></item><item><title><![CDATA[New comment by hwayne in "A Early History of Algebraic Data Types"]]></title><description><![CDATA[
<p>Now you just gotta go to the first submission and post a link here. Complete the circle!</p>
]]></description><pubDate>Thu, 16 Oct 2025 14:32:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=45605838</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=45605838</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45605838</guid></item><item><title><![CDATA[New comment by hwayne in "A Early History of Algebraic Data Types"]]></title><description><![CDATA[
<p>Since writing this I've been informed of some gaps (mostly through email and a lobsters [1] thread). Some of the main ones:<p>- McCarthy's "Direct Union" is probably conflating "disjoint union" and "direct sum".<p>- ML probably got the sum/product names from Dana Scott's work. It's unclear if Scott knew of McCarthy's paper or was inspired by it.<p>- I called ALGOL-68 a "curious dead end" but that's not true: Dennis Ritchie said that he was inspired by 68 when developing C. Also, 68 had exhaustive pattern matching earlier than ML.<p>- Hoare cites McCarthy in an earlier version of his record paper [2].<p>Also I kinda mixed up the words for "tagged unions" and "labeled unions". Hope that didn't confuse anybody!<p>[1] <a href="https://lobste.rs/s/ppm44i/very_early_history_algebraic_data_types" rel="nofollow">https://lobste.rs/s/ppm44i/very_early_history_algebraic_data...</a><p>[2] <a href="https://dl.acm.org/doi/10.5555/1061032.1061041" rel="nofollow">https://dl.acm.org/doi/10.5555/1061032.1061041</a></p>
]]></description><pubDate>Wed, 15 Oct 2025 15:19:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=45593926</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=45593926</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45593926</guid></item><item><title><![CDATA[New comment by hwayne in "A dumb introduction to z3"]]></title><description><![CDATA[
<p>I love how you create dataclasses to abstract over constraints!</p>
]]></description><pubDate>Wed, 17 Sep 2025 15:11:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=45276824</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=45276824</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45276824</guid></item><item><title><![CDATA[New comment by hwayne in "A dumb introduction to z3"]]></title><description><![CDATA[
<p>Even worse than that, SMT can encode things like Goldbach's conjecture:<p><pre><code>    from z3 import \*

    a, b, c = Ints('a b c')
    x, y = Ints('x y')
    s = Solver()

    s.add(a > 5)
    s.add(a % 2 == 0)
    theorem = Exists([b, c],
                     And(
                         a == b + c,
                         And(
                             Not(Exists([x, y], And(x > 1, y > 1, x \* y == b))),
                             Not(Exists([x, y], And(x > 1, y > 1, x \* y == c))),
                             )
                         )
                     )

    if s.check(Not(theorem)) == sat:
        print(f"Counterexample: {s.model()}")
    else:
        print("Theorem true")</code></pre></p>
]]></description><pubDate>Wed, 17 Sep 2025 14:48:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=45276521</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=45276521</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45276521</guid></item><item><title><![CDATA[New comment by hwayne in "A dumb introduction to z3"]]></title><description><![CDATA[
<p>It really depends on the kind of solving you want to do. Mathematical optimization, as in finding the cheapest/smallest/whatever solution that fits a problem? OR-Tools. Satisfaction problems, like finding counterexamples in rulesets or reverse engineering code? Z3.</p>
]]></description><pubDate>Wed, 17 Sep 2025 14:45:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=45276488</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=45276488</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45276488</guid></item><item><title><![CDATA[New comment by hwayne in "Crimes with Python's Pattern Matching (2022)"]]></title><description><![CDATA[
<p>Now I'm mad I didn't remember the word "antics". It's so much more evocative than "crimes"!</p>
]]></description><pubDate>Fri, 22 Aug 2025 04:13:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=44980932</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=44980932</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44980932</guid></item><item><title><![CDATA[New comment by hwayne in "Stith Thompson's Motif-Index of Folk-Literature [pdf]"]]></title><description><![CDATA[
<p>Entertaining collection of Folklore classifications. Some examples:<p>- T550.6. T550.6. Only half a son is born by queen who ate merely half of mango.<p>- A1066. A1066. Sun will lock moon in deep ditch in earth's bottom and will eat up stars at end of world.<p>- K87.1. K87.1. Laughing contest: dead horse winner.</p>
]]></description><pubDate>Tue, 05 Aug 2025 14:54:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=44798799</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=44798799</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44798799</guid></item><item><title><![CDATA[Motif-Index of Folk-Literature (1958) [pdf]]]></title><description><![CDATA[
<p>Article URL: <a href="https://ia600301.us.archive.org/18/items/Thompson2016MotifIndex/Thompson_2016_Motif-Index.pdf">https://ia600301.us.archive.org/18/items/Thompson2016MotifIndex/Thompson_2016_Motif-Index.pdf</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=44798766">https://news.ycombinator.com/item?id=44798766</a></p>
<p>Points: 6</p>
<p># Comments: 1</p>
]]></description><pubDate>Tue, 05 Aug 2025 14:51:30 +0000</pubDate><link>https://ia600301.us.archive.org/18/items/Thompson2016MotifIndex/Thompson_2016_Motif-Index.pdf</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=44798766</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44798766</guid></item><item><title><![CDATA[New comment by hwayne in "Fast"]]></title><description><![CDATA[
<p>Main way we're validating that now is by using TLA+ models to generate test suites. Mongo came out with a new paper on this recently: <a href="https://will62794.github.io/assets/papers/mdb-txns-modular-verification.pdf" rel="nofollow">https://will62794.github.io/assets/papers/mdb-txns-modular-v...</a></p>
]]></description><pubDate>Thu, 31 Jul 2025 13:43:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=44745576</link><dc:creator>hwayne</dc:creator><comments>https://news.ycombinator.com/item?id=44745576</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44745576</guid></item></channel></rss>