ai

Ovi Stoica 2025-03-02T10:10:09.874639Z

I’ve started using Claude Code and if you are using emacs or nvim you should check it out. https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview It does a very good job with clojure

πŸ™ 4
Nick McAvoy 2025-03-12T13:27:11.575059Z

How does this supplement or replace things you showed off in January, e.g. gptel?

Ovi Stoica 2025-03-12T13:48:12.179389Z

Quite a lot. Claude code is able to explore the code base on its own, change files and run shell commands. It is more of a self contained code agent

Nick McAvoy 2025-03-12T13:49:52.667849Z

Do you end up interacting with Claude more on the CLI then than from within emacs?

Ovi Stoica 2025-03-12T13:58:47.275829Z

I have a vterm session within emacs and it’s just a buffer

πŸ‘ 1
Nick McAvoy 2025-03-12T22:51:57.711349Z

Do you find you pay more for Anthropic API usage under Claude Code than you did before?

Casey 2025-03-25T14:57:17.716579Z

@ovidiu.stoica1094 I just saw your repomix mention, I haven't seen that tool before. I've just been cloning opensource libs into a dedicated docs dir.. but repomix sounds better? Could you share an example of how you use it with clojure projects?

Casey 2025-03-25T14:59:59.859919Z

For example I just ran it on reitit and it output:

πŸ“ˆ Top 5 Files by Character Count and Token Count:
──────────────────────────────────────────────────
1.  dev-resources/json/json100k.json (101,542 chars, 37,100 tokens)
2.  test/cljc/reitit/openapi_test.clj (61,948 chars, 10,218 tokens)
3.  CHANGELOG.md (58,548 chars, 17,900 tokens)
4.  perf-test/clj/reitit/opensensors_perf_test.clj (42,911 chars, 11,897 tokens)
5.  test/cljc/reitit/ring_coercion_test.cljc (36,614 chars, 7,360 tokens)
None of those top 5 files seem really relevant to Claude who needs the ns APIs

martinklepsch 2025-03-25T18:55:00.146639Z

https://repomix.com/ β€” you can use it here and change the include pattern to only include stuff that's relevant? (e.g. src and docs maybe)

πŸ‘ 1
Eric Dvorsak 2025-03-23T13:11:58.416119Z

How would you make an "expert" with this, an llm with specific context and prompt to help fix a specific problem, eg deal with some missionary code?

braai engineer 2025-03-23T13:13:09.152869Z

expose a Prompt via MCP Server and add the server to your MCP client. E.g. Claude Desktop, Claude Code and Cursor are MCP clients. Cursor has some ergonomics around this where you add prompting rules under .cursor/rules and inform the model in .cursor/rules/README.md or in CLAUDE.md at top-level.

braai engineer 2025-03-23T13:13:18.388979Z

Modex does not support Prompts yet

braai engineer 2025-03-23T13:13:53.097479Z

here are my https://github.com/theronic/clojure-prompts

braai engineer 2025-03-23T13:14:38.373989Z

you can also configure MCP servers for Claude Code

Eric Dvorsak 2025-03-23T13:14:56.449779Z

@martinklepsch started a collective project to group prompts like this

Eric Dvorsak 2025-03-23T13:15:17.387629Z

https://ctxs.ai/

braai engineer 2025-03-23T13:15:24.886849Z

ah cool, I haven't seen it yet, but he has reached out to me on twtr re: collaborating on context I briefly glossed over the Clojure style guide on ctxs now, but it seems more focused on style & convention (e.g. whitespace) than principles (I haven't read all of it) these new clojure-prompts are more about naming, structure, usage

martinklepsch 2025-03-23T15:16:33.917489Z

The Clojure style guide is submitted by @chris358 β€” I fully expect there to be multiple Clojure style guides on the site :)

martinklepsch 2025-03-23T15:17:58.409609Z

@yenda1 would be cool to get your missionary stuff in. Even if it is niche, it’s useful for people in #missionary and can be shared

martinklepsch 2025-03-23T16:05:25.571619Z

Ah and btw, rebuilding the site to be a bit more dynamic, with product hunt style upvotes & GitHub Auth https://ctxs.ai/weeklyhttps://ctxs.ai/weeklyhttps://ctxs.ai/weekly

Eric Dvorsak 2025-03-20T21:09:10.216869Z

$130 dollars in the last two days. would go down a lot with: β€’ a good claude.md file that make it use clj-kondo after edits to at least ask for manual help when dealing with parens imbalance because it can spin for minutes on a missing parens otherwise β€’ integration of MCP servers for complex libs like honeysql or missionary so it doesn't write garbage code that have no chance to do anything β€’ some good guidelines to do test driven development the right way, because it can easily decide midway to start mocking stuff and after minutes of spinning instead of fixing a bug it basically replaced every piece of code you were testing by mocks that do exactly what the test expects. it might sound bad the way I describe it but it's not, it's really already impressive out of the box, and I think there is ways to make it avoid these culprits and go even further already today.

πŸ‘ 2
Ovi Stoica 2025-03-13T07:03:06.495409Z

YES! πŸ˜„ For a heavy duty day, I pay 5$ easy. But I heard cases of people paying 50$ days 😡

Eric Dvorsak 2025-03-22T08:17:54.411419Z

I did the clj-kondo change and it does solve the parens imbalance issue quite well

Ovi Stoica 2025-03-22T08:21:22.533679Z

The clj-kondo change sounds like a great idea. Do you have the exact CLAUDE.md snippet for that? I’d love to see those MCP servers. What I did to improve output is I put a dedicated doc for llms with the full repomix for UIX, re-frame & daisy-ui and it can query necessary parts when it needs. Works quite well

Eric Dvorsak 2025-03-22T08:25:21.501419Z

- ALWAYS run clj-kondo --report-level error --lint your.namespace` after editing a namespace and immediately fix any issue.`

Ovi Stoica 2025-03-22T08:25:41.297759Z

Golden!

Eric Dvorsak 2025-03-22T08:26:58.636329Z

yeah the repomix is a good idea, I wish claude allowed to publish a project as mcp server because I already have quite a good expert at missionary and honeysql and I don't feel like diving into how to make my own mcp server yet

Ovi Stoica 2025-03-22T08:28:39.959969Z

cc @petrus for MCP server advice with https://github.com/theronic/modex

πŸ‘ 2
braai engineer 2025-03-22T08:36:30.638839Z

Example https://github.com/theronic/datomic-mcp/blob/main/src/modex/mcp/datomic.clj#L64-L131 using Modex. Currently, the tools macro accepts an ordered vector of args like fn or defrecord methods for tool parameters, then extracts metadata for the MCP types, docstrings & optionality. I will probably simplify this so your tool handler takes a map of args with some macro sugar so you can resolve the upcoming tools/handler to defn for proper indentation, e.g.

(defhandler ^:string foo
  "Foo tool takes name & age & greets user."
  [{:keys [name age]
    :or   {age 37}
    :type {name :string, age :number}
    :doc  {name "A person's name"
           age  "A person's age"}}]
  (str name " is " age " years old"))
where presence in :or implies optional arg. or maybe (def my-tool (tools/handler [{:keys [...]} ..) Note that Modex does not support pagination yet, but you can work around it. The MCP spec is also evolving to support streaming.

braai engineer 2025-03-22T09:08:34.058109Z

the Modex tools macro is just sugar on top of (tool/->Tool ...) record and tool args via tools/->Parameter record, and returns a map where key is tool name and value is Tool record. You can build these directly if you want, but it's work to specify the MCP types/docstrings this way πŸ™‚