An AI Invented and Implemented a New Programming Language

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 109

  • @bogey4741
    @bogey4741 2 месяца назад +6

    Yeah I ran into the same limitations with o1. The day it came out I jumped into it and started a rp2350 project and initially it worked but then after adding a few features it started to all fall apart. Thinking we need to change how we approach the problems or like you said maybe the full release of o1 will be much better but I kind of doubt that it will be too different.
    At least it’s clear it’s def not replacing programmers any time soon.

  • @nathanaelsmith3553
    @nathanaelsmith3553 2 месяца назад +15

    'Let X is 10' ?
    'EssenceLang' ?
    Essex Slang more like!

    • @andrewdunbar828
      @andrewdunbar828 2 месяца назад +5

      Speaking words of wisdom. Let it is.

    • @karlwest437
      @karlwest437 2 месяца назад +1

      ​@@andrewdunbar828to is or not to is, that is the question

  • @mmodan69
    @mmodan69 2 месяца назад +10

    My immediate thought when the first sample code was shown: "It looks like COBOL". If someone were designing COBOL today.

    • @jfftck
      @jfftck 2 месяца назад +3

      I was going to say the same exact thing, it is funny to use C - which was released after COBOL - to create a COBOL-like language.

    • @GaryExplains
      @GaryExplains  2 месяца назад +1

      @jfftck What language would you use to create another programming language, COBOL-like or not?

    • @jfftck
      @jfftck 2 месяца назад

      @@GaryExplains That is what I would use today, but COBOL was created when there were very primitive languages and even those have more in common with what we call frameworks these days. I am just saying that COBOL predates C and that it is funny that this modern COBOL-like language is using something that was released more than a decade later. Also, COBOL is known for being extremely stable, and that is something that later languages are missing - with many of them being known for being very difficult to write effectively and often it’s that difficulty that leads to buggy software.

    • @stephanhuebner4931
      @stephanhuebner4931 Месяц назад

      Its wordiness reminded me of Applescript, actually, and not in an appealing way.

  • @macnottsuk
    @macnottsuk 2 месяца назад +3

    Well back in the day I knew BASIC, COBOL and a bit of Pascal. So I thought I would ask both GPT3 and Gemini to write a Python program that would read multiple lines of text and check for duplicate lines, display the duplicate lines with line numbers. We got of to a good start, but had some bugs. I asked them to correct the bugs which introduced more bugs. And it all went down hill from there. Conclusion - After the initial program concept the AI could not understand what I was trying to accomplish. At least it was a good Python learning event for me :)

    • @ronilevarez901
      @ronilevarez901 2 месяца назад

      You needed to prompt in a different way.

  • @dtwelve2086
    @dtwelve2086 2 месяца назад +10

    i need an exoskeleton with a cerebral interface asap

    • @allangraham970
      @allangraham970 2 месяца назад

      Elon Musk can do that for you😂 neurolink and optimus.

    • @bughunter94
      @bughunter94 2 месяца назад +1

      @@allangraham970 cant wait for the neural ads, since the neural monthly subscription for my legs to work will probably be too expensive

  • @tkenben
    @tkenben 2 месяца назад +3

    I have seen clips of an AI engineer tweaking the knobs of the prompt to get it to write code. He basically had to formalize how they would communicate to each other. He would send it json files that had key attribute "meanings". Then he would send it a ton of unit tests. The gist I got out of it is that it would have been 10x faster to just write it himself.

    • @brendonwood7595
      @brendonwood7595 2 месяца назад +1

      It was also quicker to ride a horse than drive in the first cars.

    • @tkenben
      @tkenben 2 месяца назад

      @@brendonwood7595 Nice analogy, but it would be more like teaching a machine to ride a horse. The thing is, he was teaching a machine to ride only one horse. All this tweaking was to force the AI to be reproducible and error free, and in so doing basically throwing out the window whatever neat ideas might come out of the interaction. He was basically writing the code anyway, but in a new more complicated trial and error workflow. This was kind of what I was seeing happening here in this video as well.

    • @brendonwood7595
      @brendonwood7595 2 месяца назад +1

      @@tkenbenYou have clearly never done any serious programming. Thats a fairly typical workflow for a human as well, the human just takes longer for each step already.
      Any non trivial code written by a human requires significant test cases to ensure that it is reproducible and error free.
      The fact that many places try to skip this testing is why so much software has so many bugs.

  • @brendonwood7595
    @brendonwood7595 2 месяца назад +1

    I think this highlights the major limitation of the LLM's at the moment. They simply have a small working memory for concepts they can deal with at once and beyond a certain complexity it falls over. I expect that this will become less and less of a limitation as the models progress.

  • @hallkbrdz
    @hallkbrdz 2 месяца назад +9

    So pretty much like any existing interpreted language, a mish-mash of others.
    Still, pretty impressive for code generated code. It's working like a rookie programmer.

  • @draken5379
    @draken5379 2 месяца назад +5

    Ya when i use an LLM, i try keep the context of what it will need to assist me in coding, to the smallest amount i think it will need to help me.
    Too little, or too much, and it just starts to degrade.

  • @wilsonportugal1102
    @wilsonportugal1102 2 месяца назад +4

    At 5:07, the line "let count is 1" seems to be unnecessary and not even used. Am I correct? Overall, what a cool idea to get AI to build a programming language. Hmm, SKYNET is now alive.

  • @Reprint001
    @Reprint001 2 месяца назад +14

    The interpreter is still written in, and needs, a high level language 'C'. I wonder how it would get on if you asked it to write the interpreter in x64 assembly language, as an example.

    • @GaryExplains
      @GaryExplains  2 месяца назад +9

      You mean a compiler rather than an interpreter?

    • @JustAThought01
      @JustAThought01 2 месяца назад +5

      @@GaryExplains, the new language is implement as an interpreter written in assembly language rather than C.

    • @GaryExplains
      @GaryExplains  2 месяца назад +5

      Oh, I see. Why would you do that?

    • @Reprint001
      @Reprint001 2 месяца назад +6

      I was just thinking that the AI is standing on someone else's shoulders if it's using C to write the interpreter. I was curious if it could write an interpreter from first principles in assembly. I'm fairly sure it couldn't (or at least the setup would be prohibitive) because you'd need to give it far too much information regarding the underlying hardware. I've programmed (no where near professionally) over the years and started with assembly years ago thus my intrigue.

    • @esra_erimez
      @esra_erimez 2 месяца назад +2

      @@Reprint001 Agreed.

  • @picksalot1
    @picksalot1 2 месяца назад +1

    Interesting. I was just wondering about what AI would produce if it was asked to create it's own programming language. I have a minimal programming background. From what I could see, EssanceLang looked similar to what a human programmer might create. Is that true? Did you see any code that was identifiable as not being created by a human? Thanks

  • @stompreaper
    @stompreaper 2 месяца назад

    I’ve really been enjoying these thought exercise videos Gary. The topics are interesting, the results are informative and the length is just right. It’s a great formula and I like how you have been mixing them in with the very timely content like the pico 2 work and the continuing progression of performance in the Arm space.
    You are extremely high on my watch right away list when a video posts.

  • @dalewheat
    @dalewheat 2 месяца назад +3

    This was a very interesting exercise. Thanks for sharing.

  • @Ben-yw1kl
    @Ben-yw1kl 2 месяца назад

    I have done similar experiments with chatgpt. Not going as far building a functional interpreter and I took a bit different of an approach.

  • @revengerwizard
    @revengerwizard 2 месяца назад

    I wonder how much of the interpreter implementation was taken by o1-mini directly from the book Crafting Interpreters

    • @GaryExplains
      @GaryExplains  2 месяца назад

      Dunno! The code is in my GitHub repo. If you have a chance please look at the code and the code from Crafting Interpreters and see if you can spot similarities. 👍

  • @JanJeronimus
    @JanJeronimus 2 месяца назад

    Interesting. I wonder how much time you needed to get the result you published on Github.

  • @tinyBigGAMES
    @tinyBigGAMES 2 месяца назад

    I suspect if you had used o1 preview, you would have gotten along much further. I've been consulting with o1-preview on a project, and it's been working out well. In fact, the day I got access I had to write a compiler/vm for pascal. It created a scanner, tokenizer and vm that could compile and run code about as complex as was shown in this video. I did not go further for lack of time (currently working on a project going into production) but was extremely impressed with the thinking, reasoning, and planning it demonstrated with a fairly standard prompt. I went back and forth just a few times until I had working code.

    • @GaryExplains
      @GaryExplains  2 месяца назад

      No, I tried o1-preview as well, obviously.

    • @tinyBigGAMES
      @tinyBigGAMES 2 месяца назад +2

      @@GaryExplains I only saw o1-mini in your video. For me, it went pretty well (compiler stuff only the day got access), I've only been using o1-preview (advanced version). Since then, I've been using it to assist with building library code. For example, I was trying out miniz library and needed a single header drop-in replacement for minizip, so was asking to help duplicate the same functionality of code I've created with minizip, mostly implementing seek within a compressed/encrypted archive. A few back and forth and I was able to get what I needed. I find myself using ChatGPT daily for one reason or the other.

  • @kamilziemian995
    @kamilziemian995 2 месяца назад +2

    For me "file.el" means file written in Emacs Lisp.

    • @suki4410
      @suki4410 2 месяца назад

      99.8% of the world, dont know what EMACS is.

    • @ericpmoss
      @ericpmoss 2 месяца назад

      @@suki4410 Sadly true, and it explains why so many people think LLMs are actually intelligent, instead of statistical plagiarism automata. They ARE sophisticated, but not actually creative -- the output of this attempt was just a mishmash lifted from existing languages, complete with stilted keyword choice, redundancy, and no actual innovation. The only way it would "come up with" something like call-with-continuation is by having scraped a bunch of scheme or ML examples, but since it relies on the statistics of how many people wrote about a feature instead of how novel it really is, I doubt it would ever notice the actual wow factor. It's like when some researchers made an algebraic proof engine in Lisp that successfully proved all sorts of theorems it hypothesized, but everything it did turned out to be inherent to the lambda calculus upon which Lisp was created. I guess it discovered itself, which is impressive, but not going beyond itself.

  • @MarcCastellsBallesta
    @MarcCastellsBallesta 2 месяца назад +4

    Interesting experiment!

  • @xnmrphr
    @xnmrphr 2 месяца назад +1

    Seriously awesome

  • @fredrikbergquist5734
    @fredrikbergquist5734 2 месяца назад

    If you make the promt closer to a specification which might be fairly large you should get something better. Maybe different stages like ask it for a grammar first then ask for an implementation. I think you need many iterations asking it to fix bugs one after the other. Could you ask it to generate test cases? But the language it created was alot of fun looks like it cherry picked from Python among others!

    • @xaxfixho
      @xaxfixho 2 месяца назад

      And whilst he's at it, just type the whole thing

    • @fredrikbergquist5734
      @fredrikbergquist5734 2 месяца назад

      @@xaxfixho hahaha just killed the AI hype!

  • @tlskillman
    @tlskillman 2 месяца назад

    Same experience... AIs help with coding to a point, but as you get into specific issues the AI tends to collapse and to no longer be helpful.

  • @ThomasGodart
    @ThomasGodart Месяц назад

    It's very interesting, congratulations!

  • @woodcat7180
    @woodcat7180 2 месяца назад

    Very interesting how quickly are AI models evolving.

  • @musiqtee
    @musiqtee 2 месяца назад +1

    Well, my meta-analysis of the comments so far;
    Two out of ten will want to use AI (or buy e.g. OpenAI shares) - and eight of ten don’t really bother too much, scaling from “nah” to “we’re doomed”.
    I abstain from concluding, let o1 do it…😂

  • @empathy_monster
    @empathy_monster 2 месяца назад

    Very interesting! I think your little experiment highlights both some pros and cons of AI-generated code. It gives the ability for what developer Maggie Appleton called "barefoot" developers to create local-first software they wouldn't be able to otherwise, and this is exactly one of the benefits she sees. The caution comes in an over-reliance on such tools, especially by less experienced developers, because then no one understands what the code is actually doing, and that is something we definitely don't want, especially when it comes to any type of critical infrastructure. To be clear, I'm not saying you're advocating for anything like that and you probably share the same caution, just simply making an observation on the current state of AI.

    • @ronilevarez901
      @ronilevarez901 2 месяца назад +1

      I hate web dev. So I'm telling AI to write the code.
      In the end I have to read it all anyway to correct it and improve it, but the time I save is worth it.

    • @empathy_monster
      @empathy_monster 2 месяца назад

      @@ronilevarez901 Have you ever tried a static site generator? Something like Hugo or MkDocs. I much prefer markdown to HTML.

    • @empathy_monster
      @empathy_monster 2 месяца назад

      @@ronilevarez901 You might like a static site generator that converts markdown to HTML

  • @petver29
    @petver29 2 месяца назад +1

    Fantastic work! Very important topic. Would love to see more exploration.

  • @DarthChrisB
    @DarthChrisB 2 месяца назад

    You should have let it "think" about the problem first. Maybe it would have realized what it did wrong and fixed it correctly.

    • @GaryExplains
      @GaryExplains  2 месяца назад +2

      I am not sure what you mean by that. o1-mini always has a "thinking" step. When I was asking it to fix the bugs it would "think" for more than 1 minute.

  • @suki4410
    @suki4410 2 месяца назад

    Very interesting!

  • @ThePowerLover
    @ThePowerLover 2 месяца назад

    o1? Orion is a few months away.

    • @GaryExplains
      @GaryExplains  2 месяца назад

      I am not sure what you mean. Obviously we have o1-preview now, and we are waiting for the full release of o1.

    • @ThePowerLover
      @ThePowerLover 2 месяца назад

      ​@@GaryExplains o1 is Q*/Strawberry, o1 is probably going to be released, but, the main thing for OpenAI is "finishing" Orion (their next frontier model), and they're using o1 to train Orion, to give it quality data. Orion is expected to be launched between November of this year and March of 2025.

    • @GaryExplains
      @GaryExplains  2 месяца назад

      And you know this from your secret contact in OpenAI?

    • @ThePowerLover
      @ThePowerLover 2 месяца назад

      @@GaryExplains Only from open-source intelligence (OSINT).

    • @GaryExplains
      @GaryExplains  2 месяца назад

      @ThePowerLover You mean unsubstantiated rumors. Spreading rumors isn't nice.

  • @brandonsmith6962
    @brandonsmith6962 2 месяца назад +5

    Skynet is going live real soon

  • @christopherlyons7613
    @christopherlyons7613 2 месяца назад

    So what are your interpretations of the structure of EssenceLang that it created? Why do you think it picked the syntax structures that it did? Seems a bit verbose and not as intuitively simple as it could be and should have been given your initial design parameters. Interested in your thoughts.

  • @suki4410
    @suki4410 2 месяца назад

    The AI is restricted by the knowlege, that already exists. It can only come up with a mix of the old programming languages! Where is the way for innovation? A new programming language, should be able to write complex programs with just a few inputs, like the input (questions) you ask AI.
    Not to add some numbers, but to have a metha language, to describe what the code should do. eg Draw lines on the screen etc.

  • @dansplain2393
    @dansplain2393 2 месяца назад

    It invented cobol!

  • @The_Ashwatthama
    @The_Ashwatthama 2 месяца назад

    👍

  • @robba1234
    @robba1234 2 месяца назад +1

    Programs, programing programs? I think I saw the movie, didn't end well

    • @fixups6536
      @fixups6536 2 месяца назад +1

      Programs that create or modify programs have been around for more than 60 years. Nothing new. Nothing to be afraid of.

  • @andrewdunbar828
    @andrewdunbar828 2 месяца назад

    Breakdowning it might work. Another video of how it goes after you've breakdowned it.

  • @Kyrelel
    @Kyrelel 2 месяца назад +1

    "let" appears to be superfluous and "with" in not needed in some statements. It may have been easier to optimise the language before generating an interpreter (and yes, I understand this was just an experiment)

    • @fixups6536
      @fixups6536 2 месяца назад

      "let" is a common trick that makes the syntactical analysis pass easier. When a statement begins with an identifier, it can be an assignment "first=1" or a function call "first(param)". In this case, you have to resolve the ambiguity later (generally when you read the next token, but not always), and it makes the analyzer more complex. With the "let" keyword, you know immediately that what follows is an assignment, and the analyzer is simpler. In some more advanced cases, like "first[i]", you have already read 4 tokens, and you don't know what kind of statement it is. It can be an assignment "first[i]=0", or a function call "first[i](param)" (because first is an array of functions). With this last example, you can see that "let" makes things much easier.

  • @joseoncrack
    @joseoncrack 2 месяца назад

    That's actually quite horrible.

    • @GaryExplains
      @GaryExplains  2 месяца назад +1

      The language, the implementation, or the general idea?

    • @joseoncrack
      @joseoncrack 2 месяца назад

      @@GaryExplains A bit of all that. ;)

  • @DukeofEarl1961
    @DukeofEarl1961 2 месяца назад +2

    The most interesting result to come out of this, I think, was that repetition reduces the resultant quality...

  • @lezbriddon
    @lezbriddon 2 месяца назад +1

    It was a simple language it came up with, very 'basic' and human syntax like, instead of C or heaven forbid python.
    Any 'karen' on the street (if not demanding a manager) could grasp 'For n(umber) equals 1 to 6 ' - - Next n(umber) which is why I never understood the takeover with C, especially when nearly every little home computer shipped with 'basic'

  • @mndtr0
    @mndtr0 2 месяца назад

    Seems like AI is will replace all programmers soon... =(

    • @ericpmoss
      @ericpmoss 2 месяца назад +2

      IMO the threat is not "AI", which LLMs are definitely not, but the idiot investor class that sees a shiny new object that promises to make them money without wanting humane working conditions.

    • @fixups6536
      @fixups6536 2 месяца назад

      LLMs are artificial con artists, and you have just been fooled into thinking they can create a programming language.

  • @johnhunt1725
    @johnhunt1725 2 месяца назад +1

    The irony here is that AI is making the creation of new programming languages irrelevant.

    • @GaryExplains
      @GaryExplains  2 месяца назад +3

      Interesting observation.

    • @fixups6536
      @fixups6536 2 месяца назад +1

      Or maybe not. This deal is not done yet. Certainly not in the current state.

    • @jungervin8765
      @jungervin8765 2 месяца назад

      Thats a dumb take. You need an artifical general intelligence to make programming languages irrevelent at the minimum.

    • @fixups6536
      @fixups6536 2 месяца назад

      @@jungervin8765 You do not need AGI. We already know at least one other promising way. But LLMs are not it. They are absolutely not going to make programming languages and programmers irrelevant. LLMs are artificial con artists. They are good at making people believe they can do things they can't actually do.

  • @obinnaokafor6252
    @obinnaokafor6252 2 месяца назад +3

    I smell Visual Basic

    • @ronilevarez901
      @ronilevarez901 2 месяца назад

      Best language ever.
      I don't care what anyone says.

  • @DeVibe.
    @DeVibe. 2 месяца назад

    Looks awful 😂

  • @ericpmoss
    @ericpmoss 2 месяца назад +2

    Well, at least it shows that LLMs aren't going to take over any time soon. It's just a mishmash rather than anything novel.

    • @prosfilaes
      @prosfilaes 2 месяца назад

      Challenge most programmers to write a programming language and create an interpreter, in a very short period of time, you're going to get much the same. I'm not worried about people like Rob Pike losing their job; I think it's the 90% of programmers who have to worry a lot more.

    • @ThePowerLover
      @ThePowerLover 2 месяца назад

      @@prosfilaes More like way worse if the time frame is similar.

  • @jesjes-hr3di
    @jesjes-hr3di 2 месяца назад

    yea very impressive, you are able to query an AI model to create this for you, holy shit its almost like we couldnt do this ourselves.

  • @billyheng4824
    @billyheng4824 2 месяца назад

    Totally wrong !!!! AI should never be having another programming language again. You are riding on horse carrier then real AI future architecture. Don't miss lead others

    • @GaryExplains
      @GaryExplains  2 месяца назад +2

      Eh?

    • @tordjarv3802
      @tordjarv3802 2 месяца назад +1

      My thoughts exactly: What?

    • @darren-in-china
      @darren-in-china 2 месяца назад

      Did he mean that Ai will replace any need to have a programming language as it will be the creator and the program all in one. Basically no more Operating systems and programmes, just Ai.

    • @davidgari3240
      @davidgari3240 Месяц назад

      It seems to me, we have to understand the problem before we create the tool to fix it. What's the problem?
      Language is a tool; money is an idea.
      Get out of the design phase before you buy the parts.
      Is English the right language to use to create a programming language?
      I would ask AI to create a recursive lang like Forth, then use that lang to create the lang to write the next lang in...

  • @sorarmojoanakket.5615
    @sorarmojoanakket.5615 2 месяца назад

    WOW Gary I been first for you and my other favorite tech channel called @whatphoto I'm on a role today lol ❤❤❤