Live data from Hacker News

Building an interpreter for my programming language with ChatGPT

6502.is-a.dev

71–80 of 141 posts

Re: Building an interpreter for my programming language with ChatGPT

#71
post #62

I have been developing a hobby project (AI powered document search) for a few months and was in sore need of a frontend. My frontend development skills however are stuck in late 1990s and I have zero skill with anything but plain HTML and a little bit of JS. Several times I tried learning React, reading tutorials, watching videos, but the whole idea of it was very removed from how I learned to code, so I gave up ever…

It's simply not magic.

Re: Building an interpreter for my programming language with ChatGPT

#72

A poem using only git commands (it did try to cat this to a file at first) Git clone, my heart will follow Git add, let’s make this love last Git commit, I’ll always be true Git push, let’s make this official Git branch, let’s take this to the next level Git merge, our love will grow stronger Git checkout, let’s explore new adventures Git stash, let’s keep our secrets safe Git pull, let’s stay connected Git status, o…

I use my computer, and type in a command I press enter, and watch it expand ls will list all the files, in a directory cd will change the directory, with flexibility touch will create a new file, with a simple name rm will delete it, with no one to blame mv will move it, to a new location cp will copy it, for duplication chmod will change the permissions, for security grep will search for a pattern, with ease and agi…

There's nothing more terrifying to me than those arbitrary poems everyone makes it write. Because these clearly show without a shadow of doubt, that it didn't simply "splice together half a dozen Wikipedia articles."

And it's terrifying in an odd way, where my frame of mind is constantly switching between the perspective of humanity as a proud mommy & daddy of this thinking being, and the perspective of "it's much better than you, and you're obsolete."

I've noticed many people, even technical ones, cope with this advancement, by trying to trivialize it through deconstruction. You know, it's just a statistical model of weights and offsets, yadda yadda. I know how Transformers like GPT work, and neural networks in general. But it's like knowing you're made of molecules and cells. Or like saying "brains are just meat". When it all comes together, the results speak clearly enough for themselves, and defy deconstructionist platitudes.

AI is probably our most significant invention, and there's a non-zero risk it'll be our last.

Re: Building an interpreter for my programming language with ChatGPT

#73

I tried to make ChatGPT solve IMO-type math problems. However, its reasoning is almost always flawed. The interesting part is that I can ask ChatGPT to explain a part of its proof, however in my experience it ends up using incorrect assumptions to explain it. (for example, "You are right that 1 is an odd number. However, 1 is not an odd number so it works to solve the problem")

Same experience.

I've spent hours trying to teach it about Peano numbers. "A thingie is either N or Sx where x is a thingie".

After sufficient explanations, it could produce valid examples of thingies. N, SN, SSN, and so on.

Then I tried to teach it a method of solving equations like "SSSy = SSSSN". "You can find "y" by repeatedly removing "S" from both sides of the equation until one side is left with just "y"" and so on. I provided it with definitions, examples, tricks, rules. It made lots of mistakes. After pointing them out, it wrote a correct solution. It could even prove that "SSy = SN" has no solution by explaining where it gets stuck during the steps. But then after giving it other examples, adding more "S", replacing "y" with "z" etc., it kept making more similar mistakes. Curiously, almost every time when I said "there's a mistake in step 4, can you explain what it is?" it correctly explained the mistake. But then it kept repeating these mistakes.

Re: Building an interpreter for my programming language with ChatGPT

#74
post #6

Earlier quoted context omitted.

For ChatGPT to be the Google killer they need to provide source URLs.

It looks like it has web browsing support built-in in some form, but it's disabled at the moment. That said, I'm skeptical that it'd be able to "disrupt" google, as the track record of things that are said to do that is quite bad. On the other hand, google seems to be heading in the same direction with projects such as Lamda. In a roundabout way, this might just end up being the quick answer box at the top of search…

I’d love to have an AI that I can ask “give me a list of all currently available products satisfying all of the following conditions […]” (because Amazon and Google are largely useless when you’re looking for specific properties or have specific constraints). That is, it’s the query capabilities I’d be excited about.

Re: Building an interpreter for my programming language with ChatGPT

#75
post #49

Earlier quoted context omitted.

Google search absolutely does hallucinate completely fictitious results. It's called SEO spam. Google just gives you associations provided by random other people on the internet. It's largely garbage, most often deliberately disingenuous (to make you look at an ad). Ad revenue models for the internet encourage the generation of this type of false material. A better criticism would be that the same thing will happen t…

> Google search absolutely does hallucinate completely fictitious results No, it absolutely does not. Yes, there is SEO spam in the index, but no - it is not Google hallucating it. It really exists on the internet, see also the second point of my comment. > the same thing will happen to something like chatgpt This isn't something that "happens to" GPT, GPT is doing it. There's probably even already GPT -> SEO spam pi…

> "it is not Google hallucating it. It really exists on the internet,"

The exact same thing is true for chatGPT, or any other computer system. It is providing information and associations based on the input dataset.

> "GPT is doing it."

And google is "doing it," when google decides there is an association between my query and a bad response. Both systems are analyzing a corpus, drawing associations, and returning parts of that corpus. The output is deterministic based on the input.

The types of associations differ in their depth, but there is no fundamental difference in terms of agency or outcome.

Re: Building an interpreter for my programming language with ChatGPT

#76
post #62

I have been developing a hobby project (AI powered document search) for a few months and was in sore need of a frontend. My frontend development skills however are stuck in late 1990s and I have zero skill with anything but plain HTML and a little bit of JS. Several times I tried learning React, reading tutorials, watching videos, but the whole idea of it was very removed from how I learned to code, so I gave up ever…

It doesn't sound that much different than going through Google and Stackoverflow though, is it? In a few hours of googling you can probably get something working if you are an experienced dev.

Re: Building an interpreter for my programming language with ChatGPT

#77
post #12

I tried to settle a Millenium problem with ChatGPT: Is P = NP ? > No, P is not equal to NP. P (polynomial time) is a subset of NP (nondeterministic polynomial time), meaning that there are certain problems that can be solved in polynomial time that cannot be solved in nondeterministic polynomial time. Good start, although one should say P is conjectured to be not equal to NP. Some serious misunderstanding in that las…

Interesting. It’s giving me a better answer:

P vs. NP is a well-known problem in computer science and mathematical complexity theory. P is the class of problems that can be solved quickly by a computer, while NP is the class of problems for which a solution can be verified quickly by a computer. The question of whether P equals NP is one of the most important open problems in computer science. Many experts believe that P does not equal NP, but this remains unproven.

With your answer, I’d have asked it for an example of a problem that can be solved in polynomial time but cannot be solved in nondeterministic polynomial time.

Re: Building an interpreter for my programming language with ChatGPT

#78
post #62

I have been developing a hobby project (AI powered document search) for a few months and was in sore need of a frontend. My frontend development skills however are stuck in late 1990s and I have zero skill with anything but plain HTML and a little bit of JS. Several times I tried learning React, reading tutorials, watching videos, but the whole idea of it was very removed from how I learned to code, so I gave up ever…

It doesn't sound that much different than going through Google and Stackoverflow though, is it? In a few hours of googling you can probably get something working if you are an experienced dev.

It's very different because it will answer the question you asked, rather than answering a question that matches a substring of the question you asked like Google will.

Re: Building an interpreter for my programming language with ChatGPT

#79

Earlier quoted context omitted.

Google search absolutely does hallucinate completely fictitious results. It's called SEO spam. Google just gives you associations provided by random other people on the internet. It's largely garbage, most often deliberately disingenuous (to make you look at an ad). Ad revenue models for the internet encourage the generation of this type of false material. A better criticism would be that the same thing will happen t…

I think it's important to consider incentives. When you search for a topic that's controversial or political you will find lots of spam in Google. But in that case you understand that you need to approach the results with care and do your own research. GPT is the same here. You're not going to treat its answers about political topics as "the truth" - For these kind of topics GPT is actually quite good! But scientific…

> "But scientific facts are a different story. Nobody has any incentive to claim that 1+2=4 or that some function in Python does X when it really does Y."

Incentive is irrelevant. What mattes is whether these things do happen, irrespective of intent -- and they do! I very, very frequently find incorrect answers to math questions, tech function questions, etc.

Incentive is an important part of the dynamic, but it's not important to consider if we're looking empirically at the integrity of the results.

> "So when you search for these kind of facts on Google you can pretty sure that you get correct answers, or at least someone trying to give you the best answer they can. But not so with GPT."

It is so with GPT. Both systems are "trying to give you the best answer."

I think what you're observing is that the Google search engine has two decades and billions of dollars behind it and ChatGPT is a research preview - not even a finished product.

I remember using search engines in the late 90s (in fact, I worked on one of the leading ones). I think you are extending far too much credit.

Re: Building an interpreter for my programming language with ChatGPT

#80

Earlier quoted context omitted.

it revived my imposter syndrom because I see all the cool tricks people come up with naturally while I get half of what you describe and half easy naive answers :)

While what’s on the blog isn’t cherry picked, it often requires way more context than a human would to solve a problem. For instance I omitted the 100+ message back and forth where I explained the syntax of this extremely simple language.

Even then, the whole endeavor would have been out of reach of my brain I think.
Post reply on HN