Live data from Hacker News

Unix philosophy and filesystem access makes Claude Code amazing

alephic.com

151–160 of 223 posts

Re: Unix philosophy and filesystem access makes Claude Code amazing

#151
post #102

Earlier quoted context omitted.

1. Small programs that do a single thing and are easy to comprehend. 2. Those programs integrate with one another to achieve more complex tasks. 3. Text streams are the universal interface and state is represented as text files on disk. Sounds like the UNIX philosophy is a great match for LLMs that use text streams as their interface. It's just so normalized that we don't even "see" it anymore. The fact that all your…

Right, and Claude Code is a large proprietary monolith. There’s nothing particularly UNIXy about it except that it can fork/execve to call ripgrep (or whatever), and that its CLI can use argv or stdin to receive inputs. That’s nowhere enough to make it “UNIX way”.

The point is that Claude Code is USING the unix world. Not that it IS the unix way.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#152
post #106
post #99

Just because a popular new tool runs in the terminal, doesn't make it a shining example for the "Unix philosophy" lol. the comparison makes no sense if you think about it for more than 5 seconds and is hacker news clickbait you and i fell for :(

The Unix philosophy here is less about it being a terminal app (it's a very rich terminal app, lots of redrawing the whole screen etc) and more about the fact that giving a modern LLM the ability to run shell commands unlocks an incredibly useful array of new capabilities. An LLM can do effectively anything that a human can do by typing commands into a shell now.

And to create Lovecraftian horrors to fix.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#153

Earlier quoted context omitted.

Uh, my only objection way about talking about Claude Code as “UNIX way/philosophy”. While there are some similarities, they’re nowhere sufficient to call it so. (As far as I’m aware our brains are opposite of UNIX, starting right from the fact they had evolved and were not designed at all. And the article is about Claude and not me.)

The purpose is not so much Claude Code, but that LLMs running semi-autonomously in a shell environment with access to Unix tools are powerful in a way that a web chatbot is not. Replace Claude Code with some other TUI such as opencode and, modulo some of the specifics of CC's implementation, the truth still stands.

In context of UNIX philosophy, something like llm(1) is probably a better option.

https://llm.datasette.io/en/stable/

Re: Unix philosophy and filesystem access makes Claude Code amazing

#155

Earlier quoted context omitted.

The light switch moment for me is when I realized I can tell claude to use linters instead of telling it to look for problems itself. The later generally works but having it call tools is way more efficient. I didn't even tell it what linters to use, I asked it for suggestions and it gave me about a dozen of suggestions, I installed them and it started using them without further instruction. I had tried coding with C…

As an extension of this idea: for some tasks, rather than asking Claude Code to do a thing, you can often get better results from asking Claude Code to write and run a script to do the thing . Example: read this log file and extract XYZ from it and show me a table of the results. Instead of having the agent read in the whole log file into the context and try to process it with raw LLM attention, you can get it to rea…

Codex is a lot better at this. It will even try this on its own sometimes. It also has much better sandboxing (which means it needs approvals far less often), which makes this much faster.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#156

All GUI apps are different, each being unhappy in its own way. Moated fiefdoms they are, scattered within the boundaries of their operating system. CLI is a common ground, an integration plaza where the peers meet, streams flow and signals are exchanged. No commitment needs to be made to enter this information bazaar. The closest analog in the GUI world is Smalltalk, but again - you need to pledge your allegiance bef…

Apple ShortCuts and AppleScript integration is also cool.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#157
post #140

Earlier quoted context omitted.

How does Claude Code use the browser in your script/tool? I've always wanted to control my existing Safari session windows rather than a Chrome or a separate/new Chrome instance.

Most browsers these days expose a control API (like ChromeDevtools Protocol MCP [1]) that open up a socket API and can take in json instructions for bidirectional communication. Chrome is the gold standard here but both Safari and Firefox have their own driver. For you existing browser session you'd have to start it already with open socket connection as by default that's not enabled but once you do the server should…

It's extremely handy too! If you try to use web automation tools like selenium or playwright on a website that blocks them, starting chrome browser with the debug port is a great way to get past Cloudflare's "human detector" before kicking off your automation. It's still a pain in the ass but at least it works and it's only once per session

Re: Unix philosophy and filesystem access makes Claude Code amazing

#158
Yep. If you're already familiar with Unix, Claude Code doesn't even seem that amazing. The idea of composing simple things together into data pipelines is incredibly powerful. It seems every generation rediscovers this. Kleppmann wrote about it in his book. ESR has a whole book about it.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#159

Earlier quoted context omitted.

Most browsers these days expose a control API (like ChromeDevtools Protocol MCP [1]) that open up a socket API and can take in json instructions for bidirectional communication. Chrome is the gold standard here but both Safari and Firefox have their own driver. For you existing browser session you'd have to start it already with open socket connection as by default that's not enabled but once you do the server should…

It's extremely handy too! If you try to use web automation tools like selenium or playwright on a website that blocks them, starting chrome browser with the debug port is a great way to get past Cloudflare's "human detector" before kicking off your automation. It's still a pain in the ass but at least it works and it's only once per session

Note that while --remote-debugging-port itself cannot be discovered by cloudflare once you attach a client to it that can be detected as Chrome itself changes it's runtime to accomodate the connection even if you don't issue any automation commands. You need to patch the entire browser to avoid these detection methods and that's why there are so many web scraping/automation SAAS out there with their own browser versions as that's the only way to automate the web these days. You can't just connect to a consumer browser and automate undetected.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#160
post #89

Earlier quoted context omitted.

As an extension of this idea: for some tasks, rather than asking Claude Code to do a thing, you can often get better results from asking Claude Code to write and run a script to do the thing . Example: read this log file and extract XYZ from it and show me a table of the results. Instead of having the agent read in the whole log file into the context and try to process it with raw LLM attention, you can get it to rea…

It's a bit annoying that you have to tell it to do it, though. Humans (or at least programmers) "build the tools to solve the problem" so intuitively and automatically when the problem starts to "feel hard", that it doesn't often occur to the average programmer that LLMs don't think like this. When you tell an LLM to check the code for errors, the LLM could simply "realize" that the problem is complex enough to warra…

I have the opposite experience.

I used claude to translate my application and I asked him to translate each text in the application to his best abilities.

That worked great for one view, but when I asked him to translate the rest of the application in the same fashion he got lazy and started to write a script to substitute some words instead of actually translating sentences.

Post reply on HN