Skip to content

Comment on Ask HN: Those with success using GPT-4 for programming – what are you doing?

Comments

I've been using it to refactor Clojure codes and port Scheme examples into Clojure.

Maybe because Lisps have very low syntax, I find I can just copy off function/macro definitions as context and GPT3.5 can rewrite the code into something I can use... And by testing in a REPL (in :dev) I can instantly see which code has hallucinations and which work perfectly.

Tbh I find it hallucinates mainly when dealing with mutable states (e.g. atoms) or with pipelines of complex maps transformed by multimethods -

Just using small data bits and normal pure functions make GPT3.5 work perfectly because it doesn't need to take into account code outside the 2048-4096 tokens it's thinking right now?

I have tried several combinations of converting one programming language to another. One combination that worked OK, with some manual corrections, was Common Lisp to Clojure. I think Python to Common Lisp worked OK for pure code

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.