I Made My Own Programming Language

preview_player
Показать описание
This was a very difficult project, but I managed to create my own interpreted programming language from scratch!

LINKS
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

MUSIC
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

█▀ █ █ █▄▄ █▀ █▀▀ █▀█ █ █▄▄ █▀▀
▄█ █▄█ █▄█ ▄█ █▄▄ █▀▄ █ █▄█ ██▄
Рекомендации по теме
Комментарии
Автор

This is such a gem of a channel and I look forward to seeing more of your content.

Also thanks for the kind words regarding my series. Sorry it was finished so abruptly. I’m planning some big stuff coming soon regarding compiler theory.

tylerlaceby
Автор

So I can finally write spaghetti code and nobody can complain?

krauterfrischkase
Автор

By creating a programming language you have activated the internet's trap card
Someone's going to port DOOM

AdrianHereToHelp
Автор

If you want to write a compiled language but don't want to learn about optimization, you can instead write only a compiler frontend that compiles into an intermediate representation and then let a compiler backend like LLVM handle the optimization and machine code generation for you.

sinom
Автор

A return statement could be called "serve"

snoowzin
Автор

Invisible ink would actually go so hard. There are 25 characters in unicode defined as whitespace which is more than enough.
Edit: somewhat unsurprisingly it already exists. But the existing version uses only tabs, spaces and newlines so you could definitely get way more user friendly while still being invisible... Though still not at all user friendly

jblen
Автор

Interpreted Languages like Python and JavaScript, are typically compiled to an internal byte code which is run immediately.

Many interpreted languages have a read-eval-print-loop, but that is not the normal way to run code.

Some scripting languages used as shells only have a REPL, such as bash on *nix or batch on dos, but these are often not thought of as "real programming languages, "

BenjaminGoldberg
Автор

This is really cool, I tried creating a mix of python and c# a while ago, it didn't go far but I might try it again

Shuhkky
Автор

That's super creative, programming languages are hard enough so making one by yourself is crazy man

mezzoflow
Автор

I recommend watching the VODs where "Tsoding" created porth.
Porth is a language inspired by forth

arjix
Автор

An alternative to having a compiled language translate to machine code is to do what Java does and have it compile into a virtual machine. Kind of a best of both worlds!

kplays_
Автор

9:33 but those bits are the best bits of programming videos. The "boring" bits are the most interesting because it is mostly trial and error, which is interesting because you get to see the persons thought process.

cubealot
Автор

Nice! It's always such a treat to see people take on this challenge. I build my own lang in C, and string manipulation definitely was a major roadblock XD.

Fun watch, hope to see you update it in the future, perhaps you can move from a tree walker (running the AST) to a proper bytecode interpreter, this'll definitely make your language more speedy, even getting it at or above the speed of python!

robotnik
Автор

I like the scopes the syntax and the way you return values, im subscribing

BlackneeedWasHere
Автор

1:39 "which can cost a bit of performance, or in case of python A LOT OF PERFORMANCE" 💀💀

rodrigoqteixeira
Автор

I appreciate your decision to make this in C++ instead of Python, because an interpreted language running on an interpreted language would be catastrophically slow and resource-intensive. I plan to make my own programming language someday: a fusion of Java, Lua, and some of my other favourite languages that compiles to bytecode and runs in a VM. Anyways, nice video!

NOTES:
The function declaration syntax reminds me a lot of Lua (which uses `function` to define a function, and `end` to finish it), I don't really see that sort of thing in most languages.

nulcow
Автор

My recommendation for your next attempt, and I hope you have a next attempt, would be to write it in pure C and aim for translating your language into C. Generally they refer to that as transpiling, but it's still technically a compiler, and it has the added benefit of being exceedingly portable because you can use cross platform libraries for all the complex bits of your language. I would also aim for writing a BASIC variant instead of a custom language, but I really only recommend that because that was the first language I wrote a compiler for having nostalgia for QBasic. As far as parsing, consider using an FSM.

anon_y_mousse
Автор

Just wait. Someday I'll make a game using your prog. language

danthon
Автор

I am probably going to modify this to make it “normal” and see how it is. Turning a “esoteric” language into a “practical” language.

xanderplayz
Автор

Next step: make a compiled language using LLVM.

oglothenerd