Live data from Hacker News

Learning Rust with ChatGPT, Copilot and Advent of Code

simonwillison.net

41–43 of 43 posts

Re: Learning Rust with ChatGPT, Copilot and Advent of Code

#41
post #36

Earlier quoted context omitted.

If you use it on a project “True intelligence” is not the word I would use to describe it. I have spent 2-8 hours using it every day since launch as a dev tool. It is very good for learning stuff, scaffolding solutions etc. but it is very bad when you try to do something obscure. For example, I was learning Bazel using it and I spent 2-3 hours trying to debug an issue going back and forth with it. Eventually I went t…

Yeah I'm surprised you're the first person I've seen mentioning that it makes up libraries. I asked it to create a Clojure function to render the mandelbrot set as ascii art, which apparently someone got to work in Erlang with only minimal modifications to the code. For Clojure it seemingly invented the clojure.math.complex namespace and functions it thought should belong there.

A quick workaround might be getting it to generate the code it thinks should be in that library.

(I get tho that you were just reiterating that it makes stuff up, not looking for solutions).

Re: Learning Rust with ChatGPT, Copilot and Advent of Code

#42
This is amazing. Nice to see how Simon uses various tools to achieve his goals in his daily writeups. It might not be "intelligence" but it's still a very subtle search engine for programmers with a human language interface.

I always found it a bit tedious to have to type out everything when you know you want a loop over and array or something. Now you can just tell ChatGPT what you want and let it do the typing. Disregarding the mistakes it makes while appearing confident about its answers :-)

Now programmers can finally be directors where ChatGPT is the film team or the cinematographer. Sometimes it's overconfident and you need to correct it to conform to your imagination. Also as a programmer/director you still need a lot of knowledge to ask the right questions, judge the answers and so on (as demonstrated in Simon's writeups).

Re: Learning Rust with ChatGPT, Copilot and Advent of Code

#43

This is so cool! I looked at the transcript for day 5 [1] and realized how I learned the same thing regarding Rust strings not being indexable with integers due to them being a series of grapheme clusters. I didn't use ChatGPT and had to dig through the crate documentation [2] and look at stackoverflow [3], but Simon was able to get an equally great explanation by simply asking "Why is this so hard?" which I could re…

> The Rust docs are amazing and you can see they bring up indexing in the "UTF-8" section, but it requires me reading a section of the doc which I may not have realized was the reason for my frustration with a compiler error regarding indexing.

I would say this is a bug on the compiler error: it should be making it clear not only that you can't index on the string, but also why. If the explanation is too long, it should be linking to the right section of the book.

Post reply on HN