Programming languages are a whole lot more structured and predictable than human language.
In JavaScript the only token that ever comes after "if " is "(" for example.
Programming languages are a whole lot more structured and predictable than human language.
In JavaScript the only token that ever comes after "if " is "(" for example.
I once asked it for a short example code of something, no longer than 15 lines and it said "here's a code that's 12 lines long" and then added the code. Did it have the specific code "in mind" already? Or was it just a reasonably-sounding length and it then just came up with code that matched that self-imposed constraint?
Separately (and apologies for going on a tangent), where do you think we are in the Gartner cycle?
Around GPT3 time I was expecting for trough of disillusionment to come, particularly when we see the results of it being implemented everywhere but it hasn't really come yet. I'm seeing too many examples of good usage (young folks using it for learning, ESL speakers asking for help and revisions, high-level programmers using it to save themselves additional keystrokes, the list is long).
I actually think it helps to reframe this. It hallucinates up a method call that predictively should exist.
If you're working with boto3, maybe that's not actually practical. But if it's a method within your codebase, it's actually a helpful suggestion! And if you prompt it with the declaration and signature of the new method, very often it will write the new helper method for you!
I wonder if it is better at some languages than others. I have been using it for Go for a week or two and it’s ok but not awesome. I am also learning how to work with it, so probably will keep at it, but it is clearly a generative model not a thinking being I am working with.
struct String { char * text; long size; }
...or pointers to them. I then asked it to write tests for the functions it created. Everything... the functions and the tests... worked beautifully. I am not a professional programmer so I mainly use these LLMs for things other than code generation, but the little I've done has left me quite impressed! (Of course, not being a professional programmer no doubt makes me far easier to impress.)
I'm pretty sure " " (whitespace) is a token as well, which could come after a `if` as well. I think overall your point is a pretty good one though.
> Programming languages are a whole lot more structured and predictable than human language.
> In JavaScript the only token that ever comes after "if " is "(" for example.
But isn't that like saying that it's easy to generate English text, all you need is a dictionary table where you randomly pick words?
(BTW, keep up the blog posts, I really enjoy them!)