Live data from Hacker News

Biff.core: system composition for Clojure web apps

biffweb.com

11–20 of 34 posts

Re: Biff.core: system composition for Clojure web apps

#11
post #9
post #4

Earlier quoted context omitted.

This is a bit of an "XY Problem" question. I have migrated all my code to Gleam, FE and BE, Bun, browser, and BEAM. Claude knows much less about Gleam than it does about Javascript or React. However the constraints of Gleam and its Elm inspired framework Lustre are so strong, Claude gives me much better results. The only difference is I need to adjust my initial guidance.

Any favorite gleam projects to learn from? I've always admired the direction gleam was heading in, and the community is awesome. But with gradual typing now in elixir, I'm weighing whether or not gleam offers anything special enough to get me spending time there instead of just using elixir.

Lustre is great

Re: Biff.core: system composition for Clojure web apps

#12
post #2

Recently my impression has been that whatever the agentic tools are best at is also what's best for solo projects or proof of concepts. I used to love writing custom CSS, but Claude is just so much better at Tailwind that I ended up switching, even though I still kind of loathe the class soup. Is AI any good at Clojure?

> Is AI any good at Clojure?

It's okay when you use it just like any other PL, which is roughly the Unix/pipe model - batch-style. Agent spawns process -> reads stdout/stderr -> spawns next process. State lives in-between the calls and in files. Each tool invocation is stateless.

Things get far more interesting when you give an LLM a true Lisp REPL. LLM stops guessing and starts empirically analyzing current state of things and produces working solution faster, costing far less tokens. And you get to watch it solve things interactively, e.g. I often let AI poke through our UI (via Playwright-driven Clojurescript REPL), while monitoring situation in k8s - through nrepl port, connected to Clojure REPL.

Re: Biff.core: system composition for Clojure web apps

#13
post #2

Recently my impression has been that whatever the agentic tools are best at is also what's best for solo projects or proof of concepts. I used to love writing custom CSS, but Claude is just so much better at Tailwind that I ended up switching, even though I still kind of loathe the class soup. Is AI any good at Clojure?

It is but it remains shockingly bad at closing sufficiently deeply nested parens at least as far as chatGPT

I bet you're just treating it like any other (non-homoiconic) language. An agent that edits files and re-runs `clj` is doing something fundamentally different from what a Clojure developer typically does. When you give the agent a REPL - things get far more interesting.

Re: Biff.core: system composition for Clojure web apps

#14
post #2

Recently my impression has been that whatever the agentic tools are best at is also what's best for solo projects or proof of concepts. I used to love writing custom CSS, but Claude is just so much better at Tailwind that I ended up switching, even though I still kind of loathe the class soup. Is AI any good at Clojure?

Yes. Generally, it's quite good. It does have a blind spot with parens, but good old Claude Opus then cranks up a python script (yes!) to sort it all out. I wouldn't leave any of the models out on their own - you'll still have to clean up some obviously crazy stuff, but it's pretty clear what needs to done. In conclusion, Claude and ChatGPT are quite decent at Clojure. Oh, I do like Biff.

I would guess the parens will be problematic because of tokenization. something like `)))` is a single token and so is ')])'. I think having strings like that as single tokens probably makes the link between open and closing parens harder to associate. Probably could be papered over with harness help.

Re: Biff.core: system composition for Clojure web apps

#15
post #2

Recently my impression has been that whatever the agentic tools are best at is also what's best for solo projects or proof of concepts. I used to love writing custom CSS, but Claude is just so much better at Tailwind that I ended up switching, even though I still kind of loathe the class soup. Is AI any good at Clojure?

It's the language best positioned for AI with world class nREPL.

Re: Biff.core: system composition for Clojure web apps

#16
post #2

Recently my impression has been that whatever the agentic tools are best at is also what's best for solo projects or proof of concepts. I used to love writing custom CSS, but Claude is just so much better at Tailwind that I ended up switching, even though I still kind of loathe the class soup. Is AI any good at Clojure?

Maybe I'm just lucky, but I almost never run into paren-matching issues. Hooked to a working REPL, Clojure isn't merely "good", I'd say it is dominant compared to a lot of other langs.

Re: Biff.core: system composition for Clojure web apps

#17
post #9
post #4

Earlier quoted context omitted.

This is a bit of an "XY Problem" question. I have migrated all my code to Gleam, FE and BE, Bun, browser, and BEAM. Claude knows much less about Gleam than it does about Javascript or React. However the constraints of Gleam and its Elm inspired framework Lustre are so strong, Claude gives me much better results. The only difference is I need to adjust my initial guidance.

Any favorite gleam projects to learn from? I've always admired the direction gleam was heading in, and the community is awesome. But with gradual typing now in elixir, I'm weighing whether or not gleam offers anything special enough to get me spending time there instead of just using elixir.

I wrote a book about setting up a small gleam project, covers organization of the project in general. A draft is live at https://escherize.com/gleam-katas

Re: Biff.core: system composition for Clojure web apps

#18
post #9

Earlier quoted context omitted.

Any favorite gleam projects to learn from? I've always admired the direction gleam was heading in, and the community is awesome. But with gradual typing now in elixir, I'm weighing whether or not gleam offers anything special enough to get me spending time there instead of just using elixir.

I wrote a book about setting up a small gleam project, covers organization of the project in general. A draft is live at https://escherize.com/gleam-katas

Beautiful. Will definitely work through this.

Re: Biff.core: system composition for Clojure web apps

#20

Maybe I'm grumpy and old or something, but I wish there was only one Component library for Clojure, out of all the things this should have been the one everyone settled on.

If everyone wants to move to biff.core that's fine with me!
Post reply on HN