"ChatGPT, make a new programming language"
Вставка
- Опубліковано 26 бер 2023
- Asking ChatGPT to create a new programming language for me.
👀 Gear I use: www.amazon.com/shop/alexziskind
▶️ How to get Copilot FREE - • Get GitHub Copilot for...
▶️ github gave me a BEAST for coding - • github gave me a BEAST...
▶️ M1 MacBook Air Running Visual Studio and Xamarin for Mac - • M1 MacBook Air Running...
▶️ Apple M1 vs Intel Core i9 and .NET Performance - First Look - • Apple M1 vs Intel Core...
▶️ Apple M1 vs Intel i9 JavaScript Nx Workspace Install and Build Speed Comparisons - • Apple M1 vs Intel i9 J...
Sign up for GitHub wait lists: github.com/features/preview
Copilot-x: github.com/features/preview/c...
- - - - - - - - -
❤️ SUBSCRIBE TO MY UA-cam CHANNEL 📺
Click here to subscribe: www.youtube.com/@azisk?sub_co...
- - - - - - - - -
📱LET'S CONNECT ON SOCIAL MEDIA
ALEX ON TWITTER: / digitalix
- - - - - - - - -
#programming #gpt4 #chatgpt - Наука та технологія
I think telling it about the overall goals, then asking it for very specific parts one at a time would go better. Like "Write a lexer/tokeniser for this". "Construct the AST". "Make the evaluator for the AST". Part of my work for my master's thesis includes a custom interpreted language, so I've very recently written a language :P. Instead of tokenising and parsing entirely manually you can also write a grammar and use a tool to generate parsed output from it. For my project we used peggy
Is Peggy better than antlr?
@@ruyvieira104 couldn’t tell you. Never heard of antlr. Just ocamllex and Peggy.
that's the way. actually I'm learning a lot about building toy programming languages that way.
Ahhhh man hows it feel as someone fresh in education to see AI start to learn how to do these tasks that are "human" and beat us at it? It's scary but I welcome the AI to improve out lives.
You probably can easily imagine that a next-gen AI will not need any programming language, as they are made for us. AI will/should create programs as an executable form, directly.
@@Carbon_Fiber how is such a mega database different from a file system?
@@MindfulCharacters The point is that no more coding is involved in such process, no human coding and no AI coding (if we call coding the writing of some code to generate an executable)
@@MindfulCharacters it is wrong but it will be right at some point. And quicker than you know.
@@MindfulCharacters it might be possible, AI directly executes realtime generated binary directly in the processor, identifying the processor architecture and also skipping the assembly layer, and hence it could be considered not coding and instead flipping transistors and resistors directly by controlling flow of current, down to the analog level.
You just == MIC DROPPAGE
Just FYI, if you ever get one of those network errors (they usually come when the response is long), you can just edit your prompt and add whatever it had written, and say “Continue from this point” or “You had written this, but left it incomplete” or something of the sorts.
Sometimes I just refresh and go back to the same conversation instead of making a new one and explaining it timed out
What sometimes helps is, copying the code and pasting it into a new session describing the situation.
I loved your idea how to utilize ChatGTP in a very creative way and see the overall process you shared.
thx. glad you enjoyed
This is awesome - I don’t know if you’ve read crafting interpreters but this would be a great way to meta program the boilerplate code
Very good book
haven’t read that one yet. thanks for the suggestion
Yeah, this book is what helped me write my first custom programming language
When it comes to the long scripts, i tend to ask chatgpt to give me the functions/refs only so they can be coded in later, then i ask it to show me the code for each function at a time in relation to the project it knows and that seems to help with the network errors!
Although before anything i actually ask it to give me a file and folder structure for the project i describe to it and start from there. It seems to have less network areas when you reduce the load chatgpt has to deal with at any one time.
ChatGPT is surprisingly good in suggesting domain-specific languages design.
I asked it several days ago to design a programming language which would be 1. Easy for Large Language Model to write, and 2. Easy to humans to review and maintain. And it basically designed Rust for me LUL.
Promt: Write a "hello world" program in a hypothetical programming language that does not yet exist, but is designed with these specific goals in mind:
1. GPT models would be especially useful for generating correct, performant, maintainable code for it.
2. It would be especially convenient for humans to do a code review of what the GPT model has written, and spot any errors at a glance.
3. It would match Python in terms of features.
4. It would be on par with Rust in terms of security and performance.
Have to say I’m still unsure if it’s just spitting up things it has already seen, or its making stuff up when it comes to a slightly more complex problem. I use it for quick look ups (instead of docs) and translation between SQL and sql alchemy, and writing shell scripts. Fun video as always
it is funny that you mentioned 'infinite loop'. From my conversation with ChatGPT about programming it seems that AI fears eternal loops the most. At least this is how it described the hell when asked to make a joke about how an "AI ChatBot, javascript developer and a python programmer land in hell"... ;)
I did this a couple of weeks ago and got fusion code a c based language that can fuse logic between all programming languages, I stopped when it came time to build the interpreter, let me know if you want to see the paper.
We want to see your video explanation.
i was trying to develop a programa with chat gpt and I got almost the same problems, when things star to become big they looses himself and we got trapped in the loops. I would like to see if, you as a experient dev, could optimize the processe to build new programs and make kind a tutorial to help other les experienced.
thanks, great job, keep with AIs I am loving see you work on them!
I did actually try the whole run it blindly situation, I had to write a utility, and I wanted to see if Chat GPT could write it for me. In the end, I wound up in a slight infinite loop, and debugged it myself.
One way to get a better response would be to ask to write a BNF for a new language, and after that ask to create a lexer and later a parser as separated inputs.
BNF would be a good experiment, but I doubt GPT-4 has learned what BNF or EBNF notation is. There's lots of BNF examples in open source, but it's not millions :) Between antlr, yacc, llvm, javacc and the others maybe there's 100K examples.
Fantastic, I have tries this myself but it was a fun watch!
I think this video perfectly exemplifies a typical ChatGPT session. I tried to get it to write an interface for a serial device I had and, initially, I was amazed and excited that it was writing code. The first example was, naturally, very basic, and I then set about prompting it for features and improvements. But, after an hour of prompt finagling, I was getting no-where. ChatGPT suffers from "scatterbrain". I struggled to keep it on topic, struggled to have it remember the improvements it had already made etc. When I asked it to list the code we were working on, it would give me something extremely similar to the previous listing, but wholly incompatible. Sometimes the top half of it's code was incompatible with the bottom half. The longer this went on, the worse it got.
As a rule of thumb (for now), if you don't get what you want in 5-7 prompts, you may as well quit and try again.
However, I was very impressed with it's ability to comprehend my prompts and for it to return anything remotely meaningful is very exciting.
Why does this comment sound like a product review?! Sorry. Cool video. Good fun.
What version of ChatGPT was that? 3.5 or 4 ?
6:00 I too got my share of network error after a long code output, probably some outage that will get fixed
Chatgpt also creates new features inside existing languages... Yesterday we've been chitchatting about asynchronous programming in sql server 2022. I asked is there any in house solution to run procedure asynchronously (apart from jobs or own implementation in Service Broker). He replied - yes it is, it's called "async_exec" and it's available since sql server 2016. Long story short - no it's not and after long conversation it finally agreed that if I want to use "async_exec" I need to write it by my onw using Service Broker queue...
😯
It hallucinates APIs and features. I've seen this too and it is frustrating.
can You make it produce music based on an output of a mathematical algorithm like a binary tree for example? Kind of curious how it would handle such abstractions @Alex
Can you ask it to run a demo of what it just created and self QC it?
A little curious, how were you able to get 100 messages /4hrs cap instead of the usual 25/3hrs, or was this video recorded a while ago when the cap was different?
this video was filmed last week :) they’ve decreased the limit since
I did ask it to make a clicker game on the phone app one it did it most likely does just pull it from the internet
So I gave it a function, just a basic command telling it to, when I say,”(name)recall”, recall all messages in chat, including code, ordering of messages, functions, etc and how we got to our conversation now… it seems to help for those moments.
I needed a quick and dirty image function I wanted to use with Keyboard Maestro. The prompt at the bottom gets me most of the way there. It would be easy to strengthen it by asking for image size and image format checks. I tested it for my exact requirements, and it worked. But not code you would put in a production chain, but it’s a good start.
prompt gpt-4:
Python code to test if one image exists in another image. Returns a boolean and x,y of the top, left matching coords of the found image. The comparison of the match can be exact.
that’s a useful function. gives me an idea to try have it create a function i’ve long been wanting - dominant color detector in javascript, but without using canvas.
@@AZisk I tried out a 'dominant color detector in javascript, no canvas required' and got results right away! I used to tinker with python a lot, and was just starting to get the hang of js as a hobbyist. It's been a while since I've dabbled in it though. I don't often wish I could turn back time, but these new tools make me wish I could!
btw. I got gpt to rewrite my response here, lol. (rewrite to confident but not to formal
)
Hallo,
do you face any problem with bluetooth connection ?
I have MacBook Pro 14 inch 2021 and if I connect more than 4 devices, it's start to disconnect other devices or not working probably.
Im using mouse, keyboard, and trackpad from apple and AirPods Max. but if I connect any extra device the AirPods Max not working anymore or working but start to disconnect and reconnect.
also the ID finger print on the Magic Keyboard not working most of the time.
do you face like these problem with BT connection.
by the way I called the apple support and they try to fix this problem since more than 1 month.
Can you ask it to convert your swiftScript file into a C program that can then be submitted to a compiler?
ooh. I didn’t think of that. would have definitely worked
maybe 🤔
i tried this when chatgpt came out, it didn't really work. It did look a lot like how i coded my own programming language. I did everything in separate chunks which seemed to help, so I made it do the lexer, parser and interpreter all separate. I could also debug some of the mistakes it made since well... mine looked really similar.
The main reason it didn't do all of the other stuff is because it takes a really large amount of code to do loops, if statements, etc. I needed like 2000-3000 lines
It doesnt have that long of a memory. open a.i limits it or the model does for some reason. Future gpt models might be able to help write or they might just be able to write it in one go without any outside help. So when u ask it to write something, ask it to do it in chunks and then demand it to continue from where it left off. That way it might just work. Then restart the chat after you get 5 responses or so.
@@Andytlp yea i did it in chunks except it doesnt really keep track of what each chunk does when you make a lot of them so you get a lot of bugs
Can ChatGPT write down OS drivers?
Sounds like Rust, except for the exceptions I so hate in my day job when I need to do Java …
We need a whole series with Chatgpt please
I suspect if the limitations on chatgpt's output length and network bandwidth to one client were removed it would likely be a better experience overall, however those things you mentioned before would still be an issue, it is really a hard limitation with using a language trained AI model for code, since it's not really trained on specifically code it's trained on language which is very volatile where code is not. I'd bet if they used the same algorithm trained specifically on code they'd end up with a model very capable of making code.
GPTs get more and more forgetful and incoherent the longer the input prompt (conversation in the case of ChatGPT) is. You need to start your sessions again and bring the answers you got from the last one into a new question. Rephrase it something like "given this hypothetical language:
One problem why ChatGPT can't generate complex programs is that its output is limited to 4096 characters as far as I know, at least it cut off many scripts it tried to give to me and just marked the answer as done...
It has limited memory. Sometimes you have to paste large segments of code in and explain what you're trying to do over again and just ask it to optimize what's there.
JavaScript frameworks will be popping each minute now ...
3:04 And THIS is exactly how the AI will manage to execute some super destructive code & end humanity.
_Famous last words:_ *"Woupsie! I just run some unknown code given to me from some AI, now we have SkyNet"...* 🤦♂🤦🤦♀
Alex: chat GPT, write me a fast, secure, bombproof, strongly typed language.
Chat GPT: have you tried Ada?
Love the thumbnail.Cracks me up.
If GPT 4 is an artificial intelligence but can't actually code... that means either the "AI" or the programmer isn't intelligent.
I was able to make chatgpt create a simple bnf grammar, the grammar that the AI generated had several issues but I was able to fix it and turn into a flex/bison/llvm project that kinda works, the project is not finished but this is nice to test chatGPT limitations.
nice!
isnt that typescript ?
3:04 Please tell me you're doing this within a virtual environment lol
Oh ok I did not see this coming hahaha you are really cool creator
Finally another language I can say I have 10 years of experience
How about asking ChatGPT to create a docker container giving it a verbose configuration description?
You managed to do it! You fried an AI! :D
just wait until GPT-5 when it has double the parameters. maybe then it will be able to do it with less choking :)
Yeah future iterations should be able to code in just 0 and 1s or the lowest level possible from the highest input just regular speech. In a world like that you could ask a chatbot to code anything and it will do so with Maximum efficiency.
I have asked chatgpt to write me some esp32 c++ code. The code has put a string terminator ('\0') beyond the end of the allocated buffer. When I mentioned this, agreed and corrected the code, by overwriting the last character of the string with the terminating zero. It gave me a two paragraph intro about why is it not a good idea to modify an allocated buffer beyond it's bounds. Very impressive and pathetic at the same time :)
9:00 you need to switch to gpt4. Far longer responses supported.
closed captions said CHAD GPT lol
Chat GPT understands PEG and eBNF grammar which is quite helpful
So he made swift?)
I think one problem with the way these LLM generate output is that if it starts making mistakes those mistakes will only get worse as the conversation continues as it uses all previous input to generate new output. Basically the errors can compound and make more errors more likely as it generates more and more.
i didn't realise just how powerful chatgpt is until i used it to help me learn java, i got 94% last semester
Imagine the AI having a very long term goal that is executed by having people put in seemingly inane commands that ends up creating skynet 😂
haha. i suspected it was an existing language!
How about creating a MiniChatGPT PC version that can ALSO work... completely offline quite fine. Unlimited tokens !!!
Can you give it a naive python script and ask it to improve and optimize it and make it look more professional
could this be made using c or assembly? because gpt seems to know both.
Your example basically proved my main gripe about these generators… 1. They’re highly dependent on your input - see also the other post response comments here, to further lament this, 2. 1. Being true, means that in order to solve your own issues, you’ll need to learn the language of the AI bot, effectively making you dependent on proprietary generators, if you use these as main tools, 3. You won’t learn anything generic enough, or basic enough, to really help you progress as a developer, 4. Being runnable does not mean being correct!
"Essentially, all we did was to write a calculator in python."
...and launched a couple of nukes.
Hopefully, not everyone will blindly copy & paste code from AI and run it.
When it times out, I just refresh the browser and let it know what happened, and it will finish the task for me.
Like this kind of content
glad you enjoyed!
I asked it to write a program that writes a program that writes a program that prints hello world and it did that. Then I asked it to make it recursive and it just did that and I was blown away...
🔥🔥🔥🔥
Chatgpt is so human-like and AI-like when it answers.
Our jobs are safe guys, no worries
Fun video nice comment recommendation 😂
Glad you enjoyed
I done this already and the program uses one word commands
I think code will lead to mind reading lol
I too make JPytson.
This is crazy. Programming languages will be soon a thing of the past anyway. It will be directly prompt to software.
I can imagine AI simply writing in 0, 1 and creating if it must the minimum higher language necessary for it to function. Of course humans will have no clue what it is doing at all one of the fears about misalignment
it will give you better code if you have it rerite the code 3 times
Ask ChatGPT to make a block-based kid-friendly programming language.
We all gonna die xD 😂😂
Hurrah! Now there is no more need for JavaScript developers 😀
In a couple months or a year chatGPT will probably be able to make anything you asking it.
I’m really curious how this AI stuff will evolve over the next couple years.
Bro looks like the Fortnite guy when hes on the thumbnail
wow
This is a glimpse into our future, AI are going to create their own programming languages and we humans won't be able to understand what the hell they're doing.
well i mean to get that far without a ton of effort is better thatt getting that far with hours upon hour of effort put in
Yes, you are doing a lot of work... you are using an ambiguos language to tell a computer to write code. We used to write in formal and precise languages to tell the computer to write code. I dont understand the hype of Chat-GPT in our field, while it is true it could save you some time, you struggle to chat with the computer to get what you want it to do
Also it probably cribbed this language from the many thousands of toy interpreters people have made and put online. Real intelligent.
We are f..ed up...
why?
@@toxichunter6984 I think it is very clear. The world is becoming a place where humanity is not needed. The rule of nature "Unnecessary parts are to be disappeared"...
For what?
4:31 swwfwffile:)
You need to work with it like a human being. Start with the big picture, then use it to write small components.
If you're a good manager and can manage the resulting work well, you can use this tool to build large projects.
The core of working with these models is to be able to manage the work output, otherwise you will get lost.
Alex, you need to work on your management skills.
Yassa, massa!
my chatgpt make JS-Next
Call it SWISH
Wow now every📍 language👄💬 become a program👌💻 language👄💬 because reasonable🤔 part done by chat gpt😂😂😂
Chat GPT, make a better Metroid Game Remake better than any current game that exists..
JavaScript etc are just high-level languages meant to aid humans in programming but if a computer is doing the programming a language becomes unnecessary.
This guy is sooo happy he will be out of a job soon 😂😂😂😂🎉🎉🎉
He knows Universal basic income would be a big thing
The new popular programming language is English.
ChatGPT will translate it into executable binaries for your processor.
In the futuro all will be pseudocode
You look like Jeff Besos’s cousin
i don’t know Jeff Bezos’s cousin, so I don’t know whether I look like him :)
now ask gpt 4
I want this, just so I can use AI to make code for it. Lol. also, by the way, give me the input that I can use in order to make the AI actually understand the programming language so It can
actually generate code from it.
chatgpt was failed with created a simple complier or interpreter but still faster than human