Hacker News new | ask | show | jobs
by jcinau 590 days ago
Share my experience. I tried 3-4 different LLMs, and one of them is outstanding.

For code samples, popular programming languages are much better than languages like Clojure.

Two examples: About a week ago, I had found Myers' string diff algorithm and asked to write some code and initially it spat out Python code. I asked it write a Common Lisp code, and it generated about 90% complete code. I rewrote it again and the whole thing took less than a day. It was my first time seeing 'quality' from machine generated code.

I experimented further. I found Automerge-Java and want to write a Clojure wrapper. So asked it how to parse Java source files and it showed a Python code. I ran it and gave some feedback than I could get almost perfect output, which is easy to process from Clojure side. After three days, I could write interface generator. From my experience, this type of work is time consuming process and three days is pretty good I think. I fed it concrete patterns and pointed mistakes less than ten times.

Overall, it still lacks of 'creativity' but for concrete examples with 'right' patterns, saves a huge amount of time.

1 comments

Hold on..

In my experience I found that ChatGPT writes awesome Clojure code. So much so that most of my clojure code in the last few months were written by clojure. sure it gets some stuff wrong but overall it knows more clojure functions than I do.

My prompts start by asking it questions about appropriate functions to use and then write the code itself. The prompts have to be a bit verbose and give it instructions to evaluate and think before generating output.