Live data from Hacker News

Biff.core: system composition for Clojure web apps

biffweb.com

21–30 of 34 posts

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

#21
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?

If anyone can enlighten me as to why my above comment is getting downvoted: please do.

My impression is that I voiced a valid concern. I suspected handling parentheses is problematic.

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

#22
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 am currently working through https://lukwol.github.io/gleam-guide/ and it's fun so far as a ReasonML/Elm/elixir enjoyer

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

#23
post #7
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?

AI is very good at Clojure. In fact, from what I can see, I get a much better experience on a large Clojure+ClojureScript code base than many other people. Surprisingly so. I'm still not sure why, is it higher token density of the language? My experience? Large, well-written and well-maintained code base to lean on as context? In any case, the experience so far has been excellent.

I have been trying to explain to people that LLMs are worse in languages like Rust. You have a better test harness with the type system, but the syntax is so much more complicated. Handling all of those special cases, where a misplaced asterisk can mean accessing a completely different data structure, is exactly what LLMs are bad at. Because it is just trying to write something plausible.

Clojure meanwhile is very terse without being unreadable. It really does read like a series of data transformations.

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

#24

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!

Said every author of a component library :) Maybe the plurality of choice is good.

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

#25

Earlier quoted context omitted.

If everyone wants to move to biff.core that's fine with me!

Said every author of a component library :) Maybe the plurality of choice is good.

hehe yes. There are plenty of other languages with dominant frameworks etc; I like being in a community of experimenters.

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

#26
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?

If anyone can enlighten me as to why my above comment is getting downvoted: please do. My impression is that I voiced a valid concern. I suspected handling parentheses is problematic.

> why my above comment is getting downvoted

The most infamous two letters of our time - humans do not like machines, and absolutely hate those who do.

> I voiced a valid concern

Not unwarranted. When you treat a homoiconic language just like any other, LLMs do sometimes get messy with paren-balancing, but most models correct it on a second-third try. You still get some benefits - e.g., Clojure is the most token efficient mainstreamish PL.

To get the most benefit from it, one must teach the model to treat it just like a human programmer would. It makes no sense to treat Clojure like Python or Go, or C - it's like ordering a pair of swim fins and jumping into water with the unpacked box. Lisp dialects shine when you use the REPL (true Lisp REPL - not some faux-repl like Python's), so you have to "teach" the model a way to operate the live REPL, not passively reading/writing "static" code that's fed into it batch-style. When you do that, models not only get much better grasp of where the syntactic elements should be, they start reasoning about the program in a way more interesting fashion, empirically evaling pieces on the fly, interactively - without juggling state, without compiling, without even having to save things (until proven to work).

Does that make Clojure "the best LLM-suited PL"? Not really - there's simply no such thing. For sure though, the homoiconic nature of the language absolutely makes it enormously interesting and well-suited for it.

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

#27

Earlier quoted context omitted.

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.

Not really running agents at all literally just using the $20 chatGPT subscription and editing files.

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

#29
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 am currently working through https://lukwol.github.io/gleam-guide/ and it's fun so far as a ReasonML/Elm/elixir enjoyer

Looks sweet. Where did you even find that?

Gleam, lustre, and tauri? Amazing

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

#30

Earlier quoted context omitted.

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.

Not really running agents at all literally just using the $20 chatGPT subscription and editing files.

Well, that's not how a Clojure dev normally would write it. If you're not using the REPL (with or without AI) - you're missing the point/misusing the tool. Therefore "remains shockingly bad" perspective is unfair - it's like using a screwdriver to remove nails while complaining that it keeps bending.
Post reply on HN