Remix.run Logo
xscott 13 hours ago

Yeah, but sorting algs, FFTs, matrix factorizations, backprop, and many other things just aren't the same with purely functional data structures.

Maybe these well known cases could be hidden in the API, but it's easy to come up with other examples. I forget what Clojure calls it, but they have some notion about things where they're mutable during "birth" and then locked down.

Someone smarter than me knows how to do this right.

IsTom 11 hours ago | parent [-]

That sounds like Haskell's ST monad and yeah, that could work. These are very specific "escape hatches" though and typically people want more.

xscott 10 hours ago | parent [-]

As far as I can tell, the good models will use whatever you give them. So it seems we should only give them language features that help humans understand and maintain what the model writes.

Amusingly, a friend had Claude write some BrainF*ck the other day. Non-trivial algorithm, and it made working code on the first try.