3 ms·
I'm always amazed at claude codes ability to build context by just putting grep in a for loop. It's pretty much the same process I would use in an unfamiliar c
by themanmaran 1y ago
I'm always amazed at claude codes ability to build context by just putting grep in a for loop.
It's pretty much the same process I would use in an unfamiliar code base. Just ctrl+f the file system till I find the right starting point.
- eru 1y agoThat's what I used to use as a human, but then I finally overcame my laziness in setting up integration between my editor and compiler (and similar) and got 'jump to definition' working. (Well, I didn't overcome my laziness directly. I just switched from being lazy and not setting up vim and Emacs with the integrations, to trying out vscode where this was trivial or already built in.)
- lukaslalinsky 1y agoDo you trust 'jump to definition'. Obviously it depends on the language server, but it's best effort. I'm often frustrated when it doesn't work, because I broke the code in some way. Or it jumps to a specific definition, but there are multiple. If I was as quick at opening and reading files as claude code, I'd prefer grep with context around the searched term.
- eru 1y ago> Do you trust 'jump to definition'. It depends, for some languages 'jump to definition' tools ask the same compiler/interpreter that you use to build your code, so it's as accurate as it gets, and it's not 'best effort'. It also depends a bit on your project, some project are more prone to re-using names or symbols. > If I was as quick at opening and reading files as claude code, I'd prefer grep with context around the searched term. Well, Claude probably also doesn't want to have to 'learn' how to use all kinds of different tools for different languages and eco-systems.
- guipsp 1y agoIn java, for example, jump to definition is pretty flawless.
- robmccoll 1y agoUnless I'm in an interface and inheritance heavy codebase. Then the first place it jumps to is rarely the one I wanted.
- codyb 1y agoIn ViM with the CoC code completion plugin JTD gives me multiple options when there are many and I can choose the sensible one in a popover before the actual jump occurs. I believe that was my experience with IDEs too?
- 1718627440 1y agoYou can instruct the compiler to tell you, for example by passing -save-temps, and then it's a trivial text search in a single file.
- codyb 1y agoJump to definition works when you have the starting point already. I use both grep and JTD fairly frequently for different use cases.
- eru 1y agoYes. I meant 'Jump to Definition' as one clear example, not as a definitive enumeration of everything that compiler integration can help you with. Eg compiler integration is also really useful to show you the inferred types. Even dinosaurs like old-school Java and C have (limited) type inference: inside of expressions. But of course in a language like Haskell or Rust (or even Python) this becomes much more important.
- nbstme 1y agoIt's mind blowing. It's so simple, elegant and... effective! Grep+glob and a lot of iterations is all we need.
- Analemma_ 1y agoWe always suspected find+grep+xargs was Turing-complete, and now Claude is proving it.
- nbstme 1y agoExactly. AGI implies minimal tooling and very primitive tools.
- SV_BubbleTime 1y agoAGI implies that a system is financially viable to let run 24 hours a day with little to no direction. No amount of find+grep+LLM is even remotely there yet.
- delusional 1y agoThat's one of the most nonsensical comments on all of hackernews. A Markov change could have wrote it. What do you mean Turing complete? Obviously all 3 programs are running on a Turing complete machine. Xargs is a runner for other commands, obviously those commands can be Turing complete. I haven't heard of anybody working on a _proof_ for the Turing completeness of xargs, and I think the only conference willing to publish it would be Sigbovik.
- hyperbovine 1y agoCan’t tell which of these two comments is the joke …
- EdwardDiego 1y agoIt was a joke.