An AI Invented and Implemented a New Programming Language

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2024

ความคิดเห็น • 113

  • @nathanaelsmith3553
    @nathanaelsmith3553 หลายเดือนก่อน +15

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

    • @andrewdunbar828
      @andrewdunbar828 หลายเดือนก่อน +5

      Speaking words of wisdom. Let it is.

    • @karlwest437
      @karlwest437 หลายเดือนก่อน +1

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

  • @bogey4741
    @bogey4741 หลายเดือนก่อน +5

    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.

  • @mmodan69
    @mmodan69 หลายเดือนก่อน +10

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

    • @jfftck
      @jfftck หลายเดือนก่อน +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  หลายเดือนก่อน +1

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

    • @jfftck
      @jfftck หลายเดือนก่อน

      @@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.

  • @stompreaper
    @stompreaper หลายเดือนก่อน

    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.

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน

      You are very kind.

  • @dtwelve2086
    @dtwelve2086 หลายเดือนก่อน +10

    i need an exoskeleton with a cerebral interface asap

    • @allangraham970
      @allangraham970 หลายเดือนก่อน

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

    • @bughunter94
      @bughunter94 หลายเดือนก่อน +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 หลายเดือนก่อน +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 หลายเดือนก่อน +1

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

    • @tkenben
      @tkenben หลายเดือนก่อน

      @@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 หลายเดือนก่อน +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.

  • @macnottsuk
    @macnottsuk หลายเดือนก่อน +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 หลายเดือนก่อน

      You needed to prompt in a different way.

  • @hallkbrdz
    @hallkbrdz หลายเดือนก่อน +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.

  • @brendonwood7595
    @brendonwood7595 หลายเดือนก่อน +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.

  • @dalewheat
    @dalewheat หลายเดือนก่อน +3

    This was a very interesting exercise. Thanks for sharing.

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน +1

      Glad you enjoyed it!

  • @wilsonportugal1102
    @wilsonportugal1102 หลายเดือนก่อน +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.

  • @draken5379
    @draken5379 หลายเดือนก่อน +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.

  • @Reprint001
    @Reprint001 หลายเดือนก่อน +13

    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  หลายเดือนก่อน +8

      You mean a compiler rather than an interpreter?

    • @JustAThought01
      @JustAThought01 หลายเดือนก่อน +5

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

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน +5

      Oh, I see. Why would you do that?

    • @Reprint001
      @Reprint001 หลายเดือนก่อน +5

      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

      @@Reprint001 Agreed.

  • @petver29
    @petver29 หลายเดือนก่อน +1

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

  • @MarcCastellsBallesta
    @MarcCastellsBallesta หลายเดือนก่อน +4

    Interesting experiment!

  • @picksalot1
    @picksalot1 หลายเดือนก่อน +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

  • @tinyBigGAMES
    @tinyBigGAMES หลายเดือนก่อน

    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  หลายเดือนก่อน

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

    • @tinyBigGAMES
      @tinyBigGAMES หลายเดือนก่อน +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.

  • @ThomasGodart
    @ThomasGodart 29 วันที่ผ่านมา

    It's very interesting, congratulations!

  • @revengerwizard
    @revengerwizard หลายเดือนก่อน

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

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน

      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. 👍

  • @xnmrphr
    @xnmrphr หลายเดือนก่อน +1

    Seriously awesome

  • @JanJeronimus
    @JanJeronimus หลายเดือนก่อน

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

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน +1

      About 2 hours

  • @kamilziemian995
    @kamilziemian995 หลายเดือนก่อน +2

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

    • @suki4410
      @suki4410 หลายเดือนก่อน

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

    • @ericpmoss
      @ericpmoss หลายเดือนก่อน

      @@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.

  • @Ben-yw1kl
    @Ben-yw1kl หลายเดือนก่อน

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

  • @musiqtee
    @musiqtee หลายเดือนก่อน +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 หลายเดือนก่อน

    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 หลายเดือนก่อน +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 หลายเดือนก่อน

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

    • @empathy_monster
      @empathy_monster หลายเดือนก่อน

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

  • @woodcat7180
    @woodcat7180 หลายเดือนก่อน

    Very interesting how quickly are AI models evolving.

  • @tlskillman
    @tlskillman หลายเดือนก่อน

    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.

  • @suki4410
    @suki4410 หลายเดือนก่อน

    Very interesting!

  • @fredrikbergquist5734
    @fredrikbergquist5734 หลายเดือนก่อน

    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 หลายเดือนก่อน

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

    • @fredrikbergquist5734
      @fredrikbergquist5734 หลายเดือนก่อน

      @@xaxfixho hahaha just killed the AI hype!

  • @balthazarbulau4095
    @balthazarbulau4095 หลายเดือนก่อน +1

    wait till it starts developing its own language and cut humans out of the discussion

    • @suki4410
      @suki4410 หลายเดือนก่อน +1

      Less Terminator, more outside activity.

    • @ThePowerLover
      @ThePowerLover หลายเดือนก่อน

      @@suki4410 Cope.

    • @ronilevarez901
      @ronilevarez901 หลายเดือนก่อน

      Isn't that what copyright defenders are crying for?
      AI that doesn't train on their IP.

  • @DarthChrisB
    @DarthChrisB หลายเดือนก่อน

    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

      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.

  • @ThePowerLover
    @ThePowerLover หลายเดือนก่อน

    o1? Orion is a few months away.

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน

      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 หลายเดือนก่อน

      ​@@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  หลายเดือนก่อน

      And you know this from your secret contact in OpenAI?

    • @ThePowerLover
      @ThePowerLover หลายเดือนก่อน

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

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน

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

  • @brandonsmith6962
    @brandonsmith6962 หลายเดือนก่อน +5

    Skynet is going live real soon

  • @dansplain2393
    @dansplain2393 หลายเดือนก่อน

    It invented cobol!

  • @The_Ashwatthama
    @The_Ashwatthama หลายเดือนก่อน

    👍

  • @suki4410
    @suki4410 หลายเดือนก่อน

    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.

  • @andrewdunbar828
    @andrewdunbar828 หลายเดือนก่อน

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

  • @DukeofEarl1961
    @DukeofEarl1961 หลายเดือนก่อน +2

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

  • @robba1234
    @robba1234 หลายเดือนก่อน +1

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

    • @fixups6536
      @fixups6536 หลายเดือนก่อน +1

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

  • @joseoncrack
    @joseoncrack หลายเดือนก่อน

    That's actually quite horrible.

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน +1

      The language, the implementation, or the general idea?

    • @joseoncrack
      @joseoncrack หลายเดือนก่อน

      @@GaryExplains A bit of all that. ;)

  • @lezbriddon
    @lezbriddon หลายเดือนก่อน +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'

  • @Kyrelel
    @Kyrelel หลายเดือนก่อน +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 หลายเดือนก่อน

      "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.

  • @christopherlyons7613
    @christopherlyons7613 หลายเดือนก่อน

    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.

  • @johnhunt1725
    @johnhunt1725 หลายเดือนก่อน +1

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

    • @GaryExplains
      @GaryExplains  หลายเดือนก่อน +3

      Interesting observation.

    • @fixups6536
      @fixups6536 หลายเดือนก่อน +1

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

    • @jungervin8765
      @jungervin8765 หลายเดือนก่อน

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

    • @fixups6536
      @fixups6536 หลายเดือนก่อน

      @@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.

  • @DeVibe.
    @DeVibe. หลายเดือนก่อน

    Looks awful 😂

  • @ericpmoss
    @ericpmoss หลายเดือนก่อน +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 หลายเดือนก่อน

      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 หลายเดือนก่อน

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

  • @mndtr0
    @mndtr0 หลายเดือนก่อน

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

    • @ericpmoss
      @ericpmoss หลายเดือนก่อน +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 หลายเดือนก่อน

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

  • @obinnaokafor6252
    @obinnaokafor6252 หลายเดือนก่อน +3

    I smell Visual Basic

    • @ronilevarez901
      @ronilevarez901 หลายเดือนก่อน

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

  • @jesjes-hr3di
    @jesjes-hr3di หลายเดือนก่อน

    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 หลายเดือนก่อน

    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

      Eh?

    • @tordjarv3802
      @tordjarv3802 หลายเดือนก่อน +1

      My thoughts exactly: What?

    • @darren-in-china
      @darren-in-china หลายเดือนก่อน

      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 หลายเดือนก่อน

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