Yesterday a student came to me with project questions. She was trying to learn some ground-level tool basics (how useState works in React, but details don’t matter), and she was just hopelessly confused: the pieces were there, fragments of nascent understanding littered all around, but somehow it just wasn’t coming together for her.
She walked me through her fragments of non-working code, and as I was trying to figure out how she’d got so lost, she popped back to her documentation source:
1/2
ChatGPT.
I had her type “react usestate” into a search engine and showed her how to identify the React project’s •actual documentation• in the search results.
She looks at it. A long pause. Then: “This is SO much better.”
After who knows how many hours of struggle, she was unstuck in 5 minutes.
2/2
@inthehands I keep saying exactly this is going to happen, and exactly this keeps happening.
@jenniferplusplus
The marketing is in full force; the skepticism and the skills to navigate are still forming. And the lag between those two things is where the investors make their buck.
@jenniferplusplus
Tangential thought:
The current LLM craze reminds me a •lot• of late-19C-early-20C spiritualism (attempts to communicate with the dead, seances and all that). There’s a deep hunger for it to be real. And it almost seems possible! And smart, famous people keep buying in (Arthur Conan Doyle, Mr. Logic)! And there’s obvious reason to doubt, but…tantalizing pieces of evidence keep surfacing! And yes, one thing after another keeps turning out to be smoke and mirrors, but…but but….
@inthehands @jenniferplusplus I love this analogy so much
In this case, for me at least, the ghosts are kind of real though... https://simonwillison.net/2024/Mar/23/building-c-extensions-for-sqlite-with-chatgpt-code-interpreter/
Make of that what you will!
@inthehands @jenniferplusplus maybe the analogy here holds in that sometimes a spiritualist might give you life advice that turns out to be useful anyway?
@simon @jenniferplusplus
I do think that seances etc gave folks all kinds of valuable things in the 19C: closure, a way to grieve, perhaps therapy before therapy was a thing.
Re your post, which I only skimmed: this sort “what goes here? what’s there right pattern? where do I start??” question in an unfamiliar domain seems like a thing that LLMs could be good at. In your case…
@simon @jenniferplusplus …he binary ←→ string and dot product code is readily boilerplate, but getting it into a DB extn is potentially a hard thing to look up.
Then again, I’d be extremely suspicious of those string conversion functions. Stuff like this in C code sets off my alarm bells:
char *result = malloc(size * 12 + 2); // Max 10 digits per float + comma + space
(Note no further memory bounds check in the code for that buf! Eek)
Isn’t there a library for that job…?
@inthehands @jenniferplusplus Yeah I'm really suspicious about those too! I might drop that feature entirely - the thing that converts strings of "[1.0, 3.0, 5.3]" to binary and back again isn't actually performance critical at all, so I can do that as a Python function instead. The thing I need to be fast is just that vector_similarity() function which operates directly against binary blobs
@inthehands @jenniferplusplus As for existing libraries... I'll be honest, my C fluency is so poor that just the idea of trying to compile in some other library is enough to put me off! But I imagine I could get there with a bunch more LLM-assisted research
@inthehands @simon @jenniferplusplus
> (Note no further memory bounds check in the code for that buf! Eek)
*Anything* in C that manipulates memory without later bounds checking is a zillion levels of “Eek”.
(I need to go into ChatGPT sometime soon and see if I can get it to write me some C code with “gets” in it. FFS, K&R had example code with that function for a long time, through the 90s at least. Eek, indeed.)