<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: garethrowlands</title><link>https://news.ycombinator.com/user?id=garethrowlands</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 25 Apr 2026 23:38:01 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=garethrowlands" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by garethrowlands in "Functional programming and reliability: ADTs, safety, critical infrastructure"]]></title><description><![CDATA[
<p>Citation needed.</p>
]]></description><pubDate>Sun, 28 Dec 2025 17:36:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=46412768</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=46412768</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46412768</guid></item><item><title><![CDATA[New comment by garethrowlands in "Ditch your mutex, you deserve better"]]></title><description><![CDATA[
<p>STM isn't really used in Go like it is in Haskell.<p>Here's the example from a Go STM package that's based on Haskell STM. It has gotchas that you won't encounter in Haskell though, due to the nature of these languages.<p><a href="https://github.com/anacrolix/stm/blob/master/cmd/santa-example/main.go" rel="nofollow">https://github.com/anacrolix/stm/blob/master/cmd/santa-examp...</a><p>For the equivalent Haskell, check out the link at the top of the file.</p>
]]></description><pubDate>Tue, 18 Nov 2025 16:07:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=45968083</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45968083</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45968083</guid></item><item><title><![CDATA[New comment by garethrowlands in "The Pragmatic Programmer: 20th Anniversary Edition (2023)"]]></title><description><![CDATA[
<p>It's very good. And quite short!</p>
]]></description><pubDate>Mon, 17 Nov 2025 10:36:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=45952407</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45952407</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45952407</guid></item><item><title><![CDATA[New comment by garethrowlands in "Removing XSLT for a more secure browser"]]></title><description><![CDATA[
<p>XSLT's matching rules allow a 'push' style of transform that's really neat. But you can actually do that with any programming language such as Javascript.</p>
]]></description><pubDate>Wed, 05 Nov 2025 17:27:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=45825457</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45825457</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45825457</guid></item><item><title><![CDATA[New comment by garethrowlands in "Removing XSLT for a more secure browser"]]></title><description><![CDATA[
<p>I used to use XSLT a lot, though it was a while ago.<p>You can use Javascript to get the same effect and, indeed, write your transforms in much the same style as XSLT. Javascript has xpath (still). You have a choice of template language but JSX is common and convenient. A function for applying XSLT-style matching rules for an XSLT push style of transform is only a few lines of code.<p>Do you have a particular example where you think Javascript might be more verbose than XSLT?</p>
]]></description><pubDate>Wed, 05 Nov 2025 17:23:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=45825403</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45825403</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45825403</guid></item><item><title><![CDATA[New comment by garethrowlands in "John Carmack on mutable variables"]]></title><description><![CDATA[
<p>The term 'variable' is from mathematics. As others have said, the values of variables do vary but they do not mutate.</p>
]]></description><pubDate>Fri, 31 Oct 2025 14:01:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=45772077</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45772077</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45772077</guid></item><item><title><![CDATA[New comment by garethrowlands in "Simplify your code: Functional core, imperative shell"]]></title><description><![CDATA[
<p>One way to get some intuition with FCIS is to write some Haskell.<p>Because Haskell programs pretty much have to be FCIS or they won't compile.<p>How it plays out is...<p>1. A Haskell program executes side effects (known as `IO` in Haskell). The type of the `main` program is `IO ()`, meaning it does some IO and doesn't return a value - a program is not a function<p>2. A Haskell program (code with type `IO`) can call functions. But since functions are pure in Haskell, they can't call code in `IO`.<p>3. This doesn't actually restrict what you can do but it does influence how you write your code. There are a variety of patterns that weren't well understood until the 1990s or later that enable it. For example, a pure Haskell function can calculate an effectful program to execute. Or it can map a pure function in a side-effecting context. Or it can pipe pure values to a side-effecting stream.</p>
]]></description><pubDate>Tue, 28 Oct 2025 09:28:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=45730771</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45730771</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45730771</guid></item><item><title><![CDATA[New comment by garethrowlands in "Simplify your code: Functional core, imperative shell"]]></title><description><![CDATA[
<p>Surely transactions are a pretty good example of where functional core / imperative shell is a good guide. You really don't want to be doing arbitrary side effects inside your transaction because those can't be backed out. Check out STM in Haskell for a good example.</p>
]]></description><pubDate>Tue, 28 Oct 2025 09:12:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=45730665</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45730665</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45730665</guid></item><item><title><![CDATA[New comment by garethrowlands in "Simplify your code: Functional core, imperative shell"]]></title><description><![CDATA[
<p>I'm unclear what you're suggesting here. Are you suggesting you couldn't write a POS in Haskell, say?</p>
]]></description><pubDate>Mon, 27 Oct 2025 23:34:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=45727612</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45727612</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45727612</guid></item><item><title><![CDATA[New comment by garethrowlands in "Simplify your code: Functional core, imperative shell"]]></title><description><![CDATA[
<p>> Indeed, the general idea of imperative assembly comes to mind as the ultimate "core" for most software.<p>That's not what functional core, imperative shell means though. It's a given that CPUs aren't functional. The advice is for people  programming in languages that have expressions - ruby, in the case of the original talk. The functional paradigm mostly assumes automatic memory management.</p>
]]></description><pubDate>Mon, 27 Oct 2025 23:33:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=45727598</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45727598</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45727598</guid></item><item><title><![CDATA[New comment by garethrowlands in "A comparison of Ada and Rust, using solutions to the Advent of Code"]]></title><description><![CDATA[
<p>On strings in Ada vs Rust. Ada's design predates Unicode (early 1980s vs 1991), so Ada String is basically char array whereas Rust string is a Unicode text type. This explains why you can index into Ada Strings, which are arrays of bytes, but not into Rust strings, which are UTF8 encoded buffers that should be treated as text. Likely the Rust implementation could have used a byte array here.</p>
]]></description><pubDate>Sat, 04 Oct 2025 19:10:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=45475825</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=45475825</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45475825</guid></item><item><title><![CDATA[New comment by garethrowlands in "What would a Kubernetes 2.0 look like"]]></title><description><![CDATA[
<p>It's disappointing that your terraform experience with Typescript or python is better than your experience with HCL. HCL should really be better than it is.</p>
]]></description><pubDate>Fri, 20 Jun 2025 09:13:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=44325902</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=44325902</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44325902</guid></item><item><title><![CDATA[New comment by garethrowlands in "What would a Kubernetes 2.0 look like"]]></title><description><![CDATA[
<p>Declarative languages can absolutely loop. Otherwise functional languages wouldn't be a thing.<p>HCL's looping and conditionals are a mess but they're wonderful in comparison to its facilities for defining and calling functions.</p>
]]></description><pubDate>Fri, 20 Jun 2025 09:11:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=44325891</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=44325891</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44325891</guid></item><item><title><![CDATA[New comment by garethrowlands in "What would a Kubernetes 2.0 look like"]]></title><description><![CDATA[
<p>Any of the modern configuration languages would be better. They're all very sensitive to the problems of side effects and environment-specific behaviour - it's a defining characteristic. For example, pkl.</p>
]]></description><pubDate>Fri, 20 Jun 2025 09:07:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=44325870</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=44325870</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44325870</guid></item><item><title><![CDATA[New comment by garethrowlands in "What would a Kubernetes 2.0 look like"]]></title><description><![CDATA[
<p>Terraform is good overall but HCL just isn't a very good language.<p>Given that its main purpose is to describe objects of various types, its facilities for describing types are pretty weak and its facilities for describing data are oddly inconsistent. Its features for loops and conditionals are weak and ad-hoc compared with a regular programming language. Identifier scope / imports are a disaster and defining a function is woeful.<p>Some of this is influenced by Terraform's problem domain but most of it isn't required by that (if it was required, people wouldn't have such an easy time doing their Terraform in python/go/rust).<p>Despite this, Terraform is overall good. But there's a reason there's a small industry of alternatives to HCL.</p>
]]></description><pubDate>Fri, 20 Jun 2025 08:35:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=44325717</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=44325717</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44325717</guid></item><item><title><![CDATA[New comment by garethrowlands in "Four Lectures on Standard ML (1989) [pdf]"]]></title><description><![CDATA[
<p>Kotlin is also nicely expression-oriented</p>
]]></description><pubDate>Mon, 31 Mar 2025 09:58:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=43533116</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=43533116</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43533116</guid></item><item><title><![CDATA[New comment by garethrowlands in "The two factions of C++"]]></title><description><![CDATA[
<p>Switch + goto is the classic way to implement a state machine in C.</p>
]]></description><pubDate>Mon, 25 Nov 2024 19:39:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=42239434</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=42239434</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42239434</guid></item><item><title><![CDATA[New comment by garethrowlands in "The two factions of C++"]]></title><description><![CDATA[
<p>Switch + goto is very close to being a native syntax for state machines. It's also very efficient.</p>
]]></description><pubDate>Mon, 25 Nov 2024 19:37:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=42239419</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=42239419</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42239419</guid></item><item><title><![CDATA[New comment by garethrowlands in "Branded types for TypeScript"]]></title><description><![CDATA[
<p>As others have said, types don't necessarily exist at runtime. Types allow reasoning about the program source without executing it. Java is more the exception than the rule here; conventionally compiled languages such as C don't usually have types at runtime.</p>
]]></description><pubDate>Wed, 15 May 2024 19:54:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=40371588</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=40371588</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40371588</guid></item><item><title><![CDATA[New comment by garethrowlands in "Total Functional Programming (2004) [pdf]"]]></title><description><![CDATA[
<p>Absolutely.<p>It's often helpful to distinguish between effects and side-effects. The idea is that an effect is deliberate and explicit, such as, say, sending an email or moving a robot's arm. Whereas a side-effect is one that happens but wasn't your explicit objective - heating the CPU, say, or silently caching a value in thread-local storage. Haskell programs often use the type system to make these kinds of distinction.</p>
]]></description><pubDate>Thu, 07 Mar 2024 17:07:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=39631406</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=39631406</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39631406</guid></item></channel></rss>