Show HN: Transform your codebase into a single Markdown doc for feeding into AI
121–130 of 172 posts
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#122Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#123Earlier 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
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#124Somewhat 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
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
#125Somewhat 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.
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#126This is like a rediscovery of an org-mode capability that has existed for decades, and doesn't do as much.
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#127Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#128I 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... ```
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#129Such a functionality would be useful for developing some scripts and then converting to a Quarto document [1]. [1] https://quarto.org/
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#130Earlier 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…