<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: JohnyTex</title><link>https://news.ycombinator.com/user?id=JohnyTex</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Tue, 16 Jun 2026 20:53:51 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=JohnyTex" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by JohnyTex in "SQL: Incorrect by Construction"]]></title><description><![CDATA[
<p>> In MySQL, if you acquire a lock on Alice, then attempt acquire on Bob... then another session acquire Bob, then acquires Alice: The engine notices. Nothing bad happens. One of the threads gets marked as a deadlock and is rolled back, the other succeeds. So... yeah, not really a problem. MySql chooses at "random" which one lives.<p>That my program terminates and must be restarted by an external process is something I would consider "a problem", actually. This is not to cast shade on MySQL, it's just that if you really want deterministic transactions it's hard / impossible with most SQL databases. For most use cases optimistic concurrency is perfectly fine though!<p>> Actually... hang on, pause, let me remind you what you learned in your undergrad CS 400 class: Acquire Locks in consistent order.<p>The problem is that most SQL database engines acquire locks in the order that the rows are read, not in the order that they are sorted. So lock ordering depends on the query plan, not on the query itself. This is definitely true in SQL Server; I'm pretty sure it's the same in Postgres, but I haven't found anything to corroborate that claim yet. However, it's very clear from reading the MySQL / InnoDB documentation that there's basically no way to guarantee consistent lock ordering: <a href="https://dev.mysql.com/doc/refman/8.4/en/innodb-deadlocks.html" rel="nofollow">https://dev.mysql.com/doc/refman/8.4/en/innodb-deadlocks.htm...</a></p>
]]></description><pubDate>Fri, 15 May 2026 13:33:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=48148395</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=48148395</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48148395</guid></item><item><title><![CDATA[New comment by JohnyTex in "SQL: Incorrect by Construction"]]></title><description><![CDATA[
<p>How would you ensure Alice doesn't overdraft her account?</p>
]]></description><pubDate>Fri, 15 May 2026 13:22:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=48148263</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=48148263</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48148263</guid></item><item><title><![CDATA[New comment by JohnyTex in "SQL: Incorrect by Construction"]]></title><description><![CDATA[
<p>If the failure mode of the "correct" solution is to exit the program, I stand by my assertion that it is incorrect by construction.</p>
]]></description><pubDate>Fri, 15 May 2026 13:20:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=48148253</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=48148253</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48148253</guid></item><item><title><![CDATA[New comment by JohnyTex in "Why F#?"]]></title><description><![CDATA[
<p>The situation is a bit more complex in F# than C#, as there are multiple ways to do it. Scott Wlaschin has a good overview post about it here:<p><a href="https://fsharpforfunandprofit.com/posts/dependencies/" rel="nofollow">https://fsharpforfunandprofit.com/posts/dependencies/</a><p>FWIW you can do it exactly the same way you do it in C#; it’s not “wrong”, it might just feel a bit out of place.</p>
]]></description><pubDate>Tue, 01 Apr 2025 16:05:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=43548427</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=43548427</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43548427</guid></item><item><title><![CDATA[New comment by JohnyTex in "Why F#?"]]></title><description><![CDATA[
<p>Personally I think F# is excellent for writing ye olde CRUD applications, especially as the business logic becomes more complex. F# is really good at domain modeling, as creating types comes with minimal overhead. C# has improved a lot in this area (eg record types) but it’s still got a long way to go.<p>I wrote a tutorial about how to get up and running with web dev in F# that might be of interest: <a href="https://functionalsoftware.se/posts/building-a-rest-api-in-giraffe-pt1" rel="nofollow">https://functionalsoftware.se/posts/building-a-rest-api-in-g...</a></p>
]]></description><pubDate>Tue, 01 Apr 2025 16:02:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=43548384</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=43548384</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43548384</guid></item><item><title><![CDATA[New comment by JohnyTex in "Why F#?"]]></title><description><![CDATA[
<p>FWIW I think writing F# is a really cohesive experience in day-to-day work. While there are usually at least two ways to do things, due to .NET interoperability requirements, it’s usually pretty clear which way is the “right” way to do something.<p>F# feels kind of similar to Python in this regard, where there might be more than one way to do it, but there is community and ecosystem consensus on what is the <i>right</i> way.<p>I think a lot of credit should go to Don Syme for this; he seems to have a very clear vision of what F# should and should not be, and the combination of features ends up being very tasteful and well composed.</p>
]]></description><pubDate>Tue, 01 Apr 2025 15:51:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=43548252</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=43548252</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43548252</guid></item><item><title><![CDATA[New comment by JohnyTex in "Demystifying the Enigma Machine – A Functional Journey by Isaac Abraham [video]"]]></title><description><![CDATA[
<p>Isaac Abraham gave an interesting presentation at the last Func Prog Stockholm about modeling an Enigma machine in F#. Some interesting history in there, also a good introduction to F# if you haven't tried it before.</p>
]]></description><pubDate>Fri, 21 Mar 2025 13:15:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=43435287</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=43435287</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43435287</guid></item><item><title><![CDATA[Demystifying the Enigma Machine – A Functional Journey by Isaac Abraham [video]]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.youtube.com/watch?v=5o7qFyz7LJ0">https://www.youtube.com/watch?v=5o7qFyz7LJ0</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=43435286">https://news.ycombinator.com/item?id=43435286</a></p>
<p>Points: 1</p>
<p># Comments: 1</p>
]]></description><pubDate>Fri, 21 Mar 2025 13:15:29 +0000</pubDate><link>https://www.youtube.com/watch?v=5o7qFyz7LJ0</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=43435286</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43435286</guid></item><item><title><![CDATA[Little languages are the future of programming]]></title><description><![CDATA[
<p>Article URL: <a href="https://chreke.com/little-languages.html">https://chreke.com/little-languages.html</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=33693472">https://news.ycombinator.com/item?id=33693472</a></p>
<p>Points: 179</p>
<p># Comments: 208</p>
]]></description><pubDate>Mon, 21 Nov 2022 15:16:57 +0000</pubDate><link>https://chreke.com/little-languages.html</link><dc:creator>JohnyTex</dc:creator><comments>https://news.ycombinator.com/item?id=33693472</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=33693472</guid></item></channel></rss>