<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>Tue, 28 Jul 2026 06:52:16 +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 "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>I totally agree with you.<p>> the goodness of language for long code is inversely proportional to how nice it is for shell one-liners<p>Well, except for this bit. Oil or fish and awk are perfectly fine for one liners but don't repeat the mistakes of posix shell syntax.</p>
]]></description><pubDate>Sun, 26 Jul 2026 13:33:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=49058071</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49058071</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49058071</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>Yeah, I don't see pwsh finding a place in the ecosystem. Even oil or fish struggle. Their place was mostly taken by python (which is a huge dependency but not <i>another</i> huge dependency).</p>
]]></description><pubDate>Sun, 26 Jul 2026 13:30:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=49058034</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49058034</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49058034</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>I like your 2026 perspective. Objectively, the posix shell syntax is genuinely bad, even though the overall system that it enabled is amazing. It's a very old system that took off because it solved a problem - history is kind to it because of that context. Though, awk is around the same age and provides a proof-by-existence that posix shell syntax didn't <i>have</i> to be make these mistakes.</p>
]]></description><pubDate>Sun, 26 Jul 2026 13:26:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057992</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057992</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057992</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>The trinary is semantically just an if expression though. Perl inherits C's problem that `if` can't be used in an expression context:<p><pre><code>  my $x = if ($cond) { 1 } else { 2 };  # Syntax error
</code></pre>
Because of this, Perl introduces a second syntax to plug the gap:<p><pre><code>  my $x = $cond ? 1 : 2;
</code></pre>
That expression is neither obtuse nor hard to read.<p>Something like the code below <i>is</i> hard to read:<p><pre><code>  my $fee =
    $is_member
        ? ($is_student ? $student_member_fee : $member_fee)
        : ($is_student ? $student_fee        : $standard_fee);
</code></pre>
It's equivalent to the following code that uses `if`:<p><pre><code>  my $fee;
  if ($is_member) {
      if ($is_student) {
          $fee = $student_member_fee;
      }
      else {
          $fee = $member_fee;
      }
  }
  else {
      if ($is_student) {
          $fee = $student_fee;
      }
      else {
          $fee = $standard_fee;
      }
  }
</code></pre>
But ideally you would want to write this:<p><pre><code>  my $fee =
    if ($is_member) {
        if ($is_student) {
            $student_member_fee
        }
        else {
            $member_fee
        }
    }
    else {
        if ($is_student) {
            $student_fee
        }
        else {
            $standard_fee
        }
    };
</code></pre>
Though, of course, perl5 doesn't allow that.</p>
]]></description><pubDate>Sun, 26 Jul 2026 13:21:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057962</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057962</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057962</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>Absolutely!<p>Your company likely started using bash before python was ubiquitous.</p>
]]></description><pubDate>Sun, 26 Jul 2026 12:59:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057742</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057742</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057742</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>I still think that learning the shell environment makes a lot of sense these days. But mainly for interactive use. It's <i>amazing</i> the scripts your LLM can make you with, say, fd and fzf.</p>
]]></description><pubDate>Sun, 26 Jul 2026 12:55:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057708</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057708</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057708</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>Heh, I like that. We are indeed stuck with posix shell syntax; I didn't claim we weren't.</p>
]]></description><pubDate>Sun, 26 Jul 2026 12:52:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057683</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057683</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057683</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>There are plenty of alternative shells that don't suffer these problems. Posix syntax didn't win because it was better - it's the classic 'worse is better'.<p>> Old doesn't imply arcane.<p>Indeed so. For example, awk is about the same age but doesn't suffer the same problems.<p>> the shell syntax was never meant to be anything like a systems or application programming language<p>A programmable shell is not only like a programming language, it <i>is</i> a programming language. Systems tasks have some specialised requirements but, overall, scripting is programming. There is nothing in the problem domain that <i>requires</i> the posix string-substitution problems.<p>If fish or oil had existed back then, they would likely have won, since they are better.</p>
]]></description><pubDate>Sun, 26 Jul 2026 12:51:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057667</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057667</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057667</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>Sorry, the backticks were merely meant to delimit the code.</p>
]]></description><pubDate>Sun, 26 Jul 2026 12:39:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057539</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057539</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057539</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>Some models are better than others. But it's all fixable with a relatively small skill. Try PowerShell Windows Skill perhaps.</p>
]]></description><pubDate>Sun, 26 Jul 2026 11:57:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057214</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057214</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057214</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>$ Hey, claude, I've figured out the powershell one-liner we need and I've pasted it below. Please insert it into the application.<p>...<p>I have analysed your idiomatic one-liner and propose adding the following 30 lines into the application Yes/Yes and always accept such idiocy/No<p>ESCAPE ESCAPE<p>/clear<p>I want to update my powershell skill so that it writes idiomatic pipelines and does not introduce idioms from other languages.<p>[PASTES overeagerness wording from Claude prompting best practices]</p>
]]></description><pubDate>Sun, 26 Jul 2026 11:50:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057160</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057160</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057160</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>I have some absolutely amazing bash scripts that I would <i>never</i> have contemplated making myself in bash. And they'd only have been somewhat better in python. Claude for the win!</p>
]]></description><pubDate>Sun, 26 Jul 2026 11:39:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=49057085</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49057085</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49057085</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>> System shell, however, isn't meant for writing entire applications.<p>Programmable shells are, in fact, for programming. That posix shell syntax makes it impractical for meaningfully large scripts is something you just accept. And, realistically, it is something you have to accept.<p>Minimalism isn't why posix shell syntax is bad. For example, awk and jq are minimal but don't make the same mistakes.<p>Powershell was never designed to be your system shell (Windows doesn't really rely on one) but the main reason it can't be <i>the</i> shell is startup time, which rules it out of wrapper scripts. Its having lots of features might contribute to that but it's not the problem per se (being built on .net is the reason - that and startup time not really mattering on windows). Its lacking the syntax problems of posix shells is very much <i>not</i> a problem. Powershell's error handling is just fine, by the way.<p>The startup time of even pwsh is too slow to be usable in many scenarios.<p>PowerShell's not going to be the system shell on your *nix box but it wasn't designed to be. But your posix shell isn't the system shell because it's better. It's pretty much the ultimate expression of worse is better.<p>That's why there's an industry of alternatives without the faults, such as oil, elvish, fish, nushell. And why awk is so popular.</p>
]]></description><pubDate>Sun, 26 Jul 2026 11:27:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=49056996</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49056996</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49056996</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>The only upside of weird bash tricks is there's so much bash out there that the LLMs are really well trained on it - so you won't have to read the script, just the tests.</p>
]]></description><pubDate>Sun, 26 Jul 2026 10:57:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=49056777</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49056777</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49056777</guid></item><item><title><![CDATA[New comment by garethrowlands in "A shell colon does nothing. Use it anyway"]]></title><description><![CDATA[
<p>Articles like this are fun but they all come from posix shell syntax being fundamentally bad for scripting/programming. All the piping stuff is great, of course. And the overall ecosystem is great. But the interpretation of the script itself working by a series of string substitutions is a mechanism we wouldn't accept in a regular programming language. And there's no excuse for it really, except that shell syntax is really, really old.<p>For example, what does `$foo` mean in shell syntax? In any reasonable language (perl or powershell, for example, or python if you drop the `$`), it's an expression that evaluates to whatever value's inside that variable. In shell, `$foo` isn't an expression in that sense, and what it does depends on what's inside it via a variety of string substitution rules.<p>This is the main reason we have arcane articles like this.<p>That said, nice article.</p>
]]></description><pubDate>Sun, 26 Jul 2026 10:54:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=49056764</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=49056764</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49056764</guid></item><item><title><![CDATA[New comment by garethrowlands in "After 7 years in production, Scarf has reluctantly moved away from Haskell"]]></title><description><![CDATA[
<p>The number one hard working concept in Haskell is parameterisation. A typical Haskell concept is just a concept, not a Haskell concept.</p>
]]></description><pubDate>Sat, 11 Jul 2026 15:30:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=48872888</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=48872888</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48872888</guid></item><item><title><![CDATA[New comment by garethrowlands in "Can you see three trees?"]]></title><description><![CDATA[
<p>That map doesn't seem to include the trees in actual parks. Somewhere like Hampstead Heath or Richmond Park has actual woods.</p>
]]></description><pubDate>Sat, 20 Jun 2026 20:04:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=48612496</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=48612496</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48612496</guid></item><item><title><![CDATA[New comment by garethrowlands in "Can you see three trees?"]]></title><description><![CDATA[
<p>That's awesome. Though, it doesn't seem to think Hampstead Heath has any trees. Nor Croydon, not even Thornton Heath. The Wilderness in Richmond Park seems to be a missing spot, as are some of the plantations (maybe Isabella Plantation, my map fu is failing me). Maybe the royal parks keep their own records?</p>
]]></description><pubDate>Sat, 20 Jun 2026 20:02:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=48612476</link><dc:creator>garethrowlands</dc:creator><comments>https://news.ycombinator.com/item?id=48612476</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48612476</guid></item><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></channel></rss>