I made my own programming language, HERE'S HOW!
Vložit
- čas přidán 22. 04. 2023
- I always wondered how a programming language work. This video gives a basic but complete explication. For this, I developed my own programming language, called C--, using C++. I hope you like it!
#cpp #programming #coding #programminglanguage #compiler
Check out my discord server: / discord
Check out my Steam game: store.steampowered.com/app/23...
Source code:
github.com/meemknight/C--
Crafting interpreters:
craftinginterpreters.com
If you want to start learning C++ try this video:
• How To Start or Contin...
Music:
less.people - Twilit chillhop.com
Thank you for adding Subway Surfer video, it extended my attention span.
Anywho great vidoe!
😂😂😂😂 gotchu
@@lowlevelgamedev9330g
Very interesting and entertaining,
The process isn't easy but it's very rewarding for sure.
Yes, it actually has been quite enjoyable so I recommand trying it if you feel like you are up to the challenge!
@@lowlevelgamedev9330 I am trying and making a good Language!
Woow, it's very interesting! Well done, keep it up!😀
Thanks, I'm glad you liked it👍
C-- was already made by Simon Peyton Jones (of Haskell fame) and Norman Ramsey in 1998.
We must be running out of cool names for languages! 👻😱
was about to comment that lol
Didn't know that 😂😂 oh well it is what it is now he doesn't have a while else statement I do so 😂😂
how about C Sharpn't?
@@Sculman7 C Blunt
@@user-tk2jy8xr8b C Flat
Subtitles would really help in understanding this video better. Thanks for making this!
I'll start adding subtitles because I got this complain multiple times. It will take me some time tho 😭😭
@@lowlevelgamedev9330 yk, I don't think subtitles take more than 4 months? Maybe I'm just a god at subtitling tho
@@jmvr he said he'd *start* doing it, as in, he'll do it in future videos. a quick look at his most recent video shows that he does now do subtitles
its a bit unfortunate that the older videos don't have subtitles, but its also really tedious (and, algorithmically speaking, not worth it) to go through a backlog of old videos to add subtitles, so its understandable imo
@@nibbletrinnal2289 damn I was so passive aggressive a month ago, and I don't even remember why lol
@@jmvrYou really were xD. Thanks for recognizing it and admitting it. Most people would defend their douchebaggery despite knowing damn well that that was not ok.
There's Already a C-- Programming Language in Wikipedia. C-- Programming Language is Designed by Simon Peyton Jones and Norman Ramsey
yeah I didn't know that when I started making this video, but it is just a joke after all so I think I'm ok 😂
@@lowlevelgamedev9330 Then Make a Different Name
@@lowlevelgamedev9330 Update The Syntax. Edit The Binary Code
@@cyanuranus6456 it's just a joke dude
Used it last time in early 2000-x as I remember...
Very informative
Thanks
Compilers just really read your intentions and turn them into machine code. You could write anything into a file and have a compiler of some kind understand it and make it work.
yess
When making a game, you're probably gonna at least be creating a simple interpreter based scripting language, so you can run commands while the game is running. That's how I'd actually start making a game from scratch, that is, start with File I/O reading and writing to the system, then create basic actions like showimage() etc..., create an interpreter object if it's oop style and create a main loop that runs the vector list of interpreters. All this before touching graphics I think is a solid way of operating. Almost everyone puts the cart in front of the horse and seems to want to draw a 3d cube immediately to screen using opengl, but that's not where the game logic is actually happening. The graphics are the output, so in a sense focusing on the output last is a big help I think.
well depends on what you want to make, I don't like for example scripting langiages for game dev so I would never do that, also you can't have gameplay without graphics so
@@lowlevelgamedev9330 Technically, you can have gameplay without graphics, if your monitor shuts off and the screen goes black, the game is still up and running.
What do you mean commands while the game is running? And if so, it doesn't need to be the primary way you program the game, because it's super inefficient
I can see that If you want to add some sort of in-game console to debug shit or to give players superser Powers like most valve games does.
But for anything else i dont really see a benefit...
@@lowlevelgamedev9330, how about adventure?
good stuff
Thanks my man 💪
It can be benefitfull for being better developer and understanding how computers work
yes defenetly
5:28 what construct is that? I know it's not BNF syntax, but it kinda looks like it though. I'm creating my own language too, i use EBNF to define my language syntax before implementing in the parser
It is just a Regular Free Grammar, I'm not advanced in this field so I don't know if it follows any standard conventions, I just used it in the same way it was used in the article that I learned from, and it is kust a regex ish sintax, so it is more for me to help me than to be something standard.
@@lowlevelgamedev9330 oh, okay. Nice language btw
Regex is a lifesaver for stuff like this. Also zig has a good builtin tokenizer
yes, most programming languages write them from scratch however as far as I know but I might be wrong
Cue that StackOverflow post about parsing HTML with regex :p
If C++ is a one dimensional grid of plusses and C# is a 2D grid of plusses, I'm waiting for C-Starbase with a 3 dimensional grid!
nah bro I'll go straight to C-tetrahedron 😂😂
Damn it. This video loaded slowly and i distracted. When the video started, i thought some sparkiling sound in my surrounding and panicked only to realise that they are key strokes. 😅
😂😂 whops
Here’s how to make a compiler: so I’ve made this interpreted language…
(I haven’t fully watched this video, don’t know how it’s gonna be, this just seemed funny to me)
🤣😂 Yeah so basically from interpreted to compiled there is one more step but the rest of the process is the same.
@@lowlevelgamedev9330 Lexer and parser are the same, for compilers you then have to compile it (which is a really big step) and for interpreters you then have to write a virtual machine or something like that (which is really different)
Yes
Salut, Vlad :))
Salut, Dani
While() { } else{ }
I love that XDDDDDD
yeah C-- > C++ confirmed 😂
Web devs building a website: I'm genius
Real Chad's building languages: 🗿 czcams.com/video/FSuGx2758Y4/video.html&ab_channel=FRANXD
😂 Yes 💪💪
C-- already exist, it is a programming language made for compilers
Why stop at while else. Make a while catch, for catch, if catch
fair point, try if and while continue will be added next 😂
You should install a spellchecking extension. That will keep your code cleaner, and might help your pronunciation, too.
E.g. "semicolin" 😅(you pronounced it like that, too xD). It's "semicolon".
ye I should improve my spelling 😂 I don't want to use ine in code tho I thpught about it but I fell like that might just annoy me
@@lowlevelgamedev9330 Just try it 😊. When you feel like it's incorrectly marking something, you can disable it for that term.
Same dude from the channel with Linux?
hm don't think so :)))) I don't do linux
Real men write compilers in machine code.
yes, next video I'll write the code on a stone tablet on a stranded island 💪
Why do that by hand? Make your language output to stone tablets, much easier. @@lowlevelgamedev9330
Can you make your own programming language with c++
Yes and it is not that difficult actually
@@lowlevelgamedev9330 ok I want to make a programming language with c++ for making games or 3d like direct x or Open gl ,can I?
It is defenetely possible but it will take a lot of time. You will learn a lot tho.
@@lowlevelgamedev9330 why its forbidden? If I made it what will happen for me?
@@abdelrahmanmohmed3185 The gods of DirectX and OpenGL will smite you with the power of GPU drivers and low level code.
Opperator vs Operator
Make C flat now.
not a bad idea 😂😂
tho c flat doesn't actually exist it would be B 😂🤓
@@lowlevelgamedev9330 ok make that then
@@vk8a8B exists.
Don't wanna throw shade and I don't know if this is what I'm doing but, I've made a compiler for my language that basically acts like assembly but easier. A single letter, char or byte can equal one instruction that is linked to a function in the interpreter. Depending on the instruction the next byte or bytes will be read to satisfy the function parameters. WHY THE FUCK you all have to make it complicated? Mine handles multithreading even and the compiler is still way smaller than yours it seems. O_O
hm you will have to explain what part is complicated because I usually try to not overengineer stuff
@@lowlevelgamedev9330 I'm just talking about your syntax and all. Not to mention I try to not use any header files and stuff unless I'm gonna reuse the code later. So mainly most programs I do are just one .CPP file that I compile into a program. I'm not a professional or anything it's more of a hobby at the moment, so maybe workers require you to implement all that extra stuff.
@@numerius You do know you can make a C/C++ program from just a .CPP file right? You must be used to doing Python I guess.
@@numerius Well specificatly because C++ is very bloated you have to take extra care. It has some nice features that are worth it so this is why my C++ code looks more like C.
@@luckybutunlucky8937 yeah unity build. You can use headers tho. It compiles faster btw and there are some other small benefits.
unironically, a while+else would be baller
fr 😂😂
C-- already exists.
yeah I found out later
DUUUDE c- already exists. and if it didnt, i would make it. i thought c- wasnt a “joke”
c-- already exists, it's just exremely unknown
Next time call the language C?C--:0
😂😂 good idea
C Sharpn't
c m m
it's not like a Slavic B++ . . .
You created an entire programming language because you don't know about -Wfatal-errors 😂
:))
archanomigentoblawg made worse version of c
Look, I’m gonna say this is respectfully as I possibly can.
Please stop fucking flashbanging me 😂😂😂
Your jump cuts between a dark background, and a fucking white webpage, killing me man… i’m only a minute and 15 seconds in and I am turning the video off sadly…
(Who even browses the web without a fucking Dark Mode, psycho stuff 😂😂😂 - Dark Reader is your friend homie)
good point, I have never thought about this aspect, thanks 💪
Do you have discord?
yess link in the description 💪💪