ai

Ovi Stoica 2025-01-04T06:29:19.466429Z

One great thing about Clojure in the AI era is its expressivity. You can express very complex ideas and processes in very few lines of code. This is important because you can use your entire codebase as a prompt to an LLM to help you understand/debug/add features to a Clojure project. You can use this project to turn your codebase into a prompt: https://github.com/mufeedvh/code2prompt. Then, use some LLM to talk to that codebase. Most of the time, codebases in other languages can’t be reduced to a prompt. The biggest context window I know is Google Gemini Flash 2.0 (1M tokens). Penpot, 1 of the biggest Clojure projects I know, results in about 950k tokens. In a prompt, you can add almost the entire Penpot codebase (backend, common, frontend) and ask an LLM about it. I don’t think another Penpot’s size project can boast this result.

🙏 1
Ovi Stoica 2025-01-06T10:21:10.132489Z

That is a good point, indeed. Having the entire repository as a prompt is good for understanding specific flows, niche and technical points, etc. This case (voice-fn-expert) is a mix of my clojure-expert prompt + the voice-fn repo-prompt. On day 2 day tasks, I mainly use the clojure-expert prompt, and give 2-5 files as extra context and it works perfectly

2025-01-06T12:00:03.259959Z

I have claude hooked up to my repl and shell, and also end up telling it to open x y z files and propose changes via the repl. I wouldn't say it works perfectly, it still makes paren balancing issues. But hooking sonnet 3.5 up to a repl is one of the most eye-opening things I've done wrt agency of these models. Give them what you see as output (error/output) and they run with it. Able to self-steer quite well, earlier models (gpt-4-turbo etc.) would just hit dead ends and go of track.. Sadly only claude can do this well, flash 2.0 is getting better, but still does weird stuff wrt tool calling, I think it might be overly tuning them on safety turning them into "scared" at a lack of a better non anthropocentric word.

🚀 1
2025-01-05T18:54:49.569709Z

Have you done much testing with such a big context window? Just from my experience with LLM's I see that long context tends to become much worse. But the papers on long context by google showed impressive charts.

Ovi Stoica 2025-01-04T06:32:58.648039Z

As a practical example, if you have a library, you can create a prompt with it and use it whenever you have questions or need a brainstorming partner. Here’s my example prompt with voice-fn (used within emacs gptel): https://github.com/ovistoica/emacs/blob/main/prompts/voice-fn-expert.md.

Ovi Stoica 2025-01-04T06:37:53.129739Z

If you ever need a Clojure expert prompt, you can use this one: https://github.com/ovistoica/emacs/blob/main/prompts/clojure-expert.md It works surprisingly well in both project architecture and code generation. Currently, use it with Claude and Google Gemini 2 to great results. It will still produce bugs, but they are very subtle (for example, in a core.async context, it generated code that sent a packet to just one channel instead of fanning out to all consumers who wanted it)

🙏 5