Live data from Hacker News

Show HN: Transform your codebase into a single Markdown doc for feeding into AI

tesserato.web.app

121–130 of 172 posts

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#122
post #99
post #14

Unfortunate naming, given that CodeWeavers is already a company making a Windows "emulator" for Linux and macOS. [1] [1] https://www.codeweavers.com/

All names are taken. There's no need to point this out every time.

Not all names are registered trademarks for software.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#123

Earlier quoted context omitted.

I guess this only works for very small codebase?

Correct, but it's the same as what OP shared. You should use Aider/Cursor for proper indexing/intelligent codebase referencing

I'm still puzzled how come people are convinced by Cursor, while my experience was meh at best. Can it index your stuff? okay it can. Can it refactor a simple function? No it cannot, it can't even rename a damn Java class. How can I trust it to generate then code based on my codebase? So, what is your use case then? Or can anybody point me to some blog/articles/videos showing some real use cases for Cursor? Real as in, something that it provenly can do?

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#124
post #29

Somewhat related. I built an Elm app all in one file as an experiment and to see if I like it. It's a little over 7k lines and I'm occasionally adding more to it. It's actually pretty straightforward if you're in a language with lexical scoping, and it simplifies some things, like includes / cyclical, no modules, no hunting through files, etc. I feel like this set up could integrate really well w/ AI models. I've fou…

I write Elm and use Emacs primarily, and sometimes neovim. Are you using lsp in vim? You’re doing it right by staying in one file until it hurts, that’s the recommendation for Elm, but I can’t recall if I’ve had issues using go-to-def or other lsp functions like your describing

No LSP. It honestly doesn’t speed me up any. I already have the standard library memorized, plus some of the common community lib methods (List.Extra) and my typing speed is faster than I can think anyways.

I’m thinking the same approach would also work well in F#, Haskell, OCaml.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#125
post #29

Somewhat related. I built an Elm app all in one file as an experiment and to see if I like it. It's a little over 7k lines and I'm occasionally adding more to it. It's actually pretty straightforward if you're in a language with lexical scoping, and it simplifies some things, like includes / cyclical, no modules, no hunting through files, etc. I feel like this set up could integrate really well w/ AI models. I've fou…

The big problem with that is you’ll eventually blow your context window feeding the model with stuff that it mostly doesn’t need in order to complete its task.

I can’t think of anything I’d want to add to the context for Elm at least, assuming the standard libraries are already in the model (or can be added via RAG). Gemeni is 2m tokens now and I expect this will grow at least until it’s no longer meaningful.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#126

This is like a rediscovery of an org-mode capability that has existed for decades, and doesn't do as much.

Is it? I use org-babel regularly but wasn't aware of it - what's the function called? As great as org-mode / org-babel is, the user base is too small to not be overlooked.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#128
post #66

I use the following for feeding into AI find . -print -exec cat {} \; -exec echo \; Which will return for each file (and subfolders) the filename and then the content of the file. Then `| pbcopy` to copy to clipboard and paste it into ChatGPT or similar.

That's very nice and compact. I do the same with a short bash script, but wrap each file in triple-backticks and attempt to put the correct language label on each eg: Filename: demo.py ```python ...python code here... ```

Mind sharing the script?

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#130
post #123

Earlier quoted context omitted.

Correct, but it's the same as what OP shared. You should use Aider/Cursor for proper indexing/intelligent codebase referencing

I'm still puzzled how come people are convinced by Cursor, while my experience was meh at best. Can it index your stuff? okay it can. Can it refactor a simple function? No it cannot, it can't even rename a damn Java class. How can I trust it to generate then code based on my codebase? So, what is your use case then? Or can anybody point me to some blog/articles/videos showing some real use cases for Cursor? Real as i…

I think you know the correct answer:)
Post reply on HN