Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
garethrowlands
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
garethrowlands
2mo ago
It's really not that simple. Yaml can be more token efficient but not necessarily. And it's often not the biggest factor.
2.
▲
by
garethrowlands
2mo ago
I totally agree with you. > the goodness of language for long code is inversely proportional to how nice it is for shell one-liners Well, except for this bit. Oil or fish and awk are perfectly fine for one liners but don't repeat th
3.
▲
by
garethrowlands
2mo ago
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 another huge dependency).
4.
▲
by
garethrowlands
2mo ago
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 bec
5.
▲
by
garethrowlands
2mo ago
The trinary is semantically just an if expression though. Perl inherits C's problem that `if` can't be used in an expression context: my $x = if ($cond) { 1 } else { 2 }; # Syntax error Because of this, Perl introduces a s
6.
▲
by
garethrowlands
2mo ago
Absolutely! Your company likely started using bash before python was ubiquitous.
7.
▲
by
garethrowlands
2mo ago
I still think that learning the shell environment makes a lot of sense these days. But mainly for interactive use. It's amazing the scripts your LLM can make you with, say, fd and fzf.
8.
▲
by
garethrowlands
2mo ago
Heh, I like that. We are indeed stuck with posix shell syntax; I didn't claim we weren't.
9.
▲
by
garethrowlands
2mo ago
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'. > Old doesn't imply arcane. Indeed so. For example
10.
▲
by
garethrowlands
2mo ago
Sorry, the backticks were merely meant to delimit the code.
11.
▲
by
garethrowlands
2mo ago
Some models are better than others. But it's all fixable with a relatively small skill. Try PowerShell Windows Skill perhaps.
12.
▲
by
garethrowlands
2mo ago
$ Hey, claude, I've figured out the powershell one-liner we need and I've pasted it below. Please insert it into the application. ... I have analysed your idiomatic one-liner and propose adding the following 30 lines into the appl
13.
▲
by
garethrowlands
2mo ago
I have some absolutely amazing bash scripts that I would never have contemplated making myself in bash. And they'd only have been somewhat better in python. Claude for the win!
14.
▲
by
garethrowlands
2mo ago
> System shell, however, isn't meant for writing entire applications. Programmable shells are, in fact, for programming. That posix shell syntax makes it impractical for meaningfully large scripts is something you just accept. And,
15.
▲
by
garethrowlands
2mo ago
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.
16.
▲
by
garethrowlands
2mo ago
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
17.
▲
by
garethrowlands
2mo ago
The number one hard working concept in Haskell is parameterisation. A typical Haskell concept is just a concept, not a Haskell concept.
18.
▲
by
garethrowlands
3mo ago
That map doesn't seem to include the trees in actual parks. Somewhere like Hampstead Heath or Richmond Park has actual woods.
19.
▲
by
garethrowlands
3mo ago
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 Plant
20.
▲
by
garethrowlands
9mo ago
Citation needed.
21.
▲
by
garethrowlands
10mo ago
STM isn't really used in Go like it is in Haskell. 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. h
22.
▲
by
garethrowlands
10mo ago
It's very good. And quite short!
23.
▲
by
garethrowlands
11mo ago
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.
24.
▲
by
garethrowlands
11mo ago
I used to use XSLT a lot, though it was a while ago. 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 J
25.
▲
by
garethrowlands
11mo ago
The term 'variable' is from mathematics. As others have said, the values of variables do vary but they do not mutate.
26.
▲
by
garethrowlands
11mo ago
One way to get some intuition with FCIS is to write some Haskell. Because Haskell programs pretty much have to be FCIS or they won't compile. How it plays out is... 1. A Haskell program executes side effects (known as `IO` in Haskell).
27.
▲
by
garethrowlands
11mo ago
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. Ch
28.
▲
by
garethrowlands
11mo ago
I'm unclear what you're suggesting here. Are you suggesting you couldn't write a POS in Haskell, say?
29.
▲
by
garethrowlands
11mo ago
> Indeed, the general idea of imperative assembly comes to mind as the ultimate "core" for most software. That's not what functional core, imperative shell means though. It's a given that CPUs aren't functional.
30.
▲
by
garethrowlands
1y ago
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 byt
More ›