core-typed

2025-12-05T14:11:46.049429Z

Messing around with LLMs and typed clojure. Here is a very basic example, https://github.com/iwillig/csb/blob/main/src/csb/db.clj#L31-L58 I found it to be a positive experience. I been thinking that maybe typed clojure could make LLM’s more effective. Will let people know how it goes.

👏 1
👀 1
2025-12-05T16:23:39.937499Z

I experimented a bit with using LLMs to add annotations themselves as a way to try GitHub Models. Might be of interest https://github.com/typedclojure/typedclojure/blob/4edaa0d63bb8ed9b93fa38e97bbd77f14256b39d/typed-clojure-port.prompt.yml

👁️ 1
2025-12-05T16:51:18.386299Z

btw there should already be clj-kondo configs for typed clojure on the classpath at https://github.com/typedclojure/typedclojure/tree/main/typed/clj.runtime/resources/clj-kondo.exports/org.typedclojure/typed.clj.runtime, you might need to call --copy-configs https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#importing

2025-12-05T16:52:39.432829Z

my biggest friction so far with LLM's + clojure has been paren matching.

2025-12-05T16:57:53.435229Z

I looked into parinfer (matching parens based on indentation, the latter of which LLM's are good at) but it's quite difficult to get a standalone impl that a coding agent can use. Most require editor integration.

2025-12-05T17:03:05.274819Z

I am using clojure-lsp with opencode to prevent bad parens from getting into the code base.

2025-12-05T17:03:48.768779Z

But sometimes Claude gets mad at the linters and uses python to write the bad clojure to a file. Its a little frustrating.

2025-12-05T17:04:10.132089Z

Thanks for the clj-kondo advice

2025-12-05T17:08:47.193029Z

I was thinking a more positive directive like "if you have a syntax error, try running parinfer on the code and study the output to learn where the syntax error might be"

2025-12-05T17:10:25.469609Z

which tools consume opencode.json ?

2025-12-05T17:12:15.324679Z

looks like you mention clj-paren-repair-claude-hook in the project, maybe that's what I want

2025-12-05T17:22:43.780629Z

clj-paren-repair works pretty well.