So I Made My Own Programming Language...

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 213

  • @Chadderbox
    @Chadderbox  Před 2 lety +51

    Hey, if you liked this video, I'd really appreciate if you liked the video.
    You can also subscribe because I'm thinking of doing stuff similar to this in more videos, and you'll see them when they come out.

    • @venerable_nelson
      @venerable_nelson Před 2 lety

      Check out Lisp (or lisp like languages). Racket was a language we used in school to create our own programming language as a class project. Functional programming is great for building your parser/interpreter (just like how you did with Python). It also opens the door of the functional programming paradigm, which is a rabbit hole in and of itself.
      What is a monad? And how could you use it to maintain state? ;)

    • @squidwardthemathematician
      @squidwardthemathematician Před rokem

      Um, actually, the first high-level programming language was Plankalkul, developed in Germany 1943.

  • @barj
    @barj Před 2 lety +290

    Came for programming, stayed for history of the computer 😤

    • @mrmoist
      @mrmoist Před 2 lety +1

      So true, hey quirky question but are you a lizard

    • @Stondonk
      @Stondonk Před 2 lety +1

      @@mrmoist bro you also think he's a lizard. It just makes sense doesn't it?

    • @ChadderboxDev
      @ChadderboxDev Před 2 lety +1

      @@Stondonk you guys are barji-lizardites as well?

    • @Guy_Sandler
      @Guy_Sandler Před 2 lety

      Because that's how you extend the video

    • @Chadderbox
      @Chadderbox  Před 2 lety +11

      I timestamped everything, you can skip the 'filler' if you want :)

  • @alexander191297
    @alexander191297 Před 2 lety +96

    So you’ve made Python, just with semicolons instead of whitespace… I dig it! :)

  • @The_Codemaster144k
    @The_Codemaster144k Před 2 lety +19

    Keep making videos like this and this will eventually make you go viral! I tried doing this sort of thing one time but I gave up after dealing with a lot of bugs.. I find this kind of stuff really intresting and its great to see somebody make a video about this process

  • @LetThereBeMayhem
    @LetThereBeMayhem Před 2 lety +64

    The amount of things which you've achieved in a this short period of time is shocking, well done!

  • @astrovation3281
    @astrovation3281 Před 2 lety +5

    1:52 Lua is used to program Roblox games, and there are over 20 Million of those, so I wouldn't say Lua died off.

    • @zelokorLocalGodOfChaosAndBread
      @zelokorLocalGodOfChaosAndBread Před 2 lety +2

      not to mention all the games made with it, world of warcraft is one, fuck someone even made an entire fantasy console that uses lua (pico8) so even if roblox didn't exist, it would still be pretty popular

  • @ciso
    @ciso Před 2 lety +11

    The crafting interpreters book is really good and writing your own simple interpeter is actually not that hard. So if you haven't I would definitely recommend following along that part of the book (and all the others as well ;). I am currently reading it and implementing my own little scripting language in rust. Im especially excited about the bytecode representation and I hope that you can successfully continue to work on your little language. 😁

    • @dawsonpate7385
      @dawsonpate7385 Před rokem

      Man this is an old comment but I am reading and learning from this book rn 😂. It is amazing and helped me so much more than online tutorials/explanations to lay out the groundwork. Currently making a small scripting language to run on a microcontroller to be able to have portable apps that I can load on an sdcard and interface with my firmware (I know micropython exists but this has to be a custom solution for my connected peripherals and custom stack)

    • @ciso
      @ciso Před rokem

      @@dawsonpate7385 Cool! Do you have github/gitlab account where I could look at this?

  • @antonnym214
    @antonnym214 Před rokem +2

    I wrote an interpreter called R-code which ran under PCDOS/MSDOS back in the 80s. The language controlled on-screen robots that would battle in a maze, and it would run up to 5 programs simultaneously. Then in 2012, I designed a language called LIM (Limited Instruction Model or "Less Is More") Which is a Turing complete, robust general-purpose language which has only 24 reserved words. None of that was easy, so I applaud you for sticking with it. All good wishes.

    • @Chadderbox
      @Chadderbox  Před rokem

      Your projects sound a lot more impressive than mine. Well done, that is awesome!

  • @wazaDev
    @wazaDev Před 2 lety +4

    Really interesting how you approached it, it seems so clean and efficient.

  • @daboxguy3848
    @daboxguy3848 Před 2 lety +19

    Well done. The amount of research you did for this is awesome. A project always seems simple from an outside point of view, but most of starting any project is a learning process.

  • @segsfault
    @segsfault Před 2 lety +24

    It's like typescript but in python

  • @robinpage2730
    @robinpage2730 Před 2 lety +20

    For bootstrapping, don't just write the compiler in itself, write each library/module in a different source language. For extra pain:)

  • @ChadderboxDev
    @ChadderboxDev Před 2 lety +7

    Came for the Declan Mckenna brazil riff, stayed for the Scarily accurate Boris Johnson impression.

  • @GamesBySaul
    @GamesBySaul Před 2 lety +6

    You are mad, absolutely amazing though, very cool to make your own language, never realised Python could do so much

  • @TheDarkOne629
    @TheDarkOne629 Před 2 lety +1

    Nice work! You've taken the first step into madness. Lift the other and join us in the abyss. >:)
    Here's a little story about my last venture into it.
    I understand the pain of writing a language in itself. My last language is an interpreted Lisp. The standard library is written ~95% in itself. Getting it to parse itself would not be a huge problem until the "AST" is generated. This makes me want to define all the base types (various numbers, strings, lists, vectors, symbols, keywords, maps, delays; Most pre-defined in Ruby) as new types inside my lisp. I know how to define them in a moderatly efficient way, but it sounds like a nightmare to get them into the bootstrap module itself.
    code -> tokens -> reader -> eval
    In lisp, most structures are created when the reader is running, NOT when it's evaluated. This means, that I can't easily remake vectors during evaluation and then time-travel back to get their definition into the reader. This could be solved by just setting up another layer of runtimes but them I have double the overhead.
    code -> tokens -> reader -> (eval to set up bootstrap modules -> tokens -> reader -> eval code with new system)
    Also, if I asked the system "hey, is this variable a vector or a list?", should it look for the Ruby-definition or for the new one?
    I could try to implement a bytecode-format, which would be easier to parse, to analyse and to run.
    Nah, the next version will just transpile to Ruby or D. I've done like 3 transpilers before my first interpreter. Should be easier than melting my brain further.
    I've been at this for a year by now but made no process because seeing the terrible performance (as bad as one would expect from an interpreter written in Ruby) is already demotivating enough.
    Maybe write a bytecode-format and then transpile that to D? Maybe I should finish the core-language first? Nah.
    However, it could be fun to write a syntax-analyser in my lisp for itself. The code itself is just a recursive structure afterall.
    Thanks for reading. :-)

  • @MrFantom_
    @MrFantom_ Před 2 lety +4

    I recently created my own custom interpreted programming language just for a my game I’m making. It’s used to create custom game files for my game, so users don’t have to know any other programming languages to get things working. My situation was different though, There’s only about 14 or so commands with super simple syntax, just a tag system somewhat similar to HTML. I wrote the interpreter in C#, my main programming language. Mainly because I’m too lazy to learn anything else just for a simple project like this lol

  • @yumeed
    @yumeed Před 2 lety +1

    even though I didnt understand much I GET THAT YOU PUT A LOT OF WORK IN THIS its just amazing... !!

  • @harleyspeedthrust4013
    @harleyspeedthrust4013 Před rokem +2

    I had to do this recently for a project, me and two guys were building a cryptocurrency on Blockchain from scratch for a class project. We said we would include smart contracts but the professor didn't think we could get the whole project done in time, so we had to prove him wrong. We implemented simple smart contracts by designing a custom programming language used to verify transactions - it was imperative that the language was not Turing complete so that programs were guaranteed to halt. We didn't have gas fees, so if a program didn't halt then nodes would get stuck verifying the transaction and the Blockchain would never progress.

  • @hedwig7s
    @hedwig7s Před 2 měsíci +2

    So basically you turned python into javascript

  • @Twingamerdudes
    @Twingamerdudes Před 2 lety +1

    0:18 me too, it's pretty hard. I like it, it's pretty fun. Good job bro. (btw my language is not finished yet so yeah)

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      Good work, I hope your language ends up better than mine!

    • @Twingamerdudes
      @Twingamerdudes Před 2 lety +1

      @@Chadderbox thanks. But your language is 10x better than mine so far XD

  • @jan_harald
    @jan_harald Před 2 lety +3

    running AS another language is totally fine, and there's plenty of other languages that do it, e.g. Haxe and Nim are the ones I can think of off the top of my head

    • @jan_harald
      @jan_harald Před 2 lety +3

      and neither of those are hobby languages or anything, either, btw, although they aren't that popular outside some niches (e.g. haxe is popular with the folks who used to make flash games and such, but not so much for other people, despite being very capable)

    • @Chadderbox
      @Chadderbox  Před 2 lety +2

      I like Haxe, I don't see much point in Nim though.

  • @mrmoist
    @mrmoist Před 2 lety +1

    Came for history of the computer, stayed for declan mckenna brazil riff

  • @MattSuguisAsFondAsEverrr
    @MattSuguisAsFondAsEverrr Před 2 lety +3

    I've a programming language in développement as well
    It parses definitely very differently than normal because I can't comprehend those from actual tutorials and didn't realise I could exploit stacks by version 0.9 so yea I do need some more skills but I'm now 530 builds (version 1.2) in lmao and so far so good

  • @anhuman7022
    @anhuman7022 Před 2 lety +2

    Thanks for the video
    I am also trying to make something similar, but way worse
    The subprocess method worked really well

  • @danimgmd3510
    @danimgmd3510 Před rokem

    snakecase
    your:
    Okay did
    Otheres:
    ERROR, why no snake_case

  • @colinmaharaj
    @colinmaharaj Před 6 měsíci

    Some years ago I was trying to create a scripting language that is almost like C but at the end of a line is the end of your statement
    If you want to have multiple statements on one line then you would use the semicolon.

  • @SHD69
    @SHD69 Před rokem

    i love how you make your videos look so simple and easy :D Thumbs up!

    • @Bl0xxy
      @Bl0xxy Před 6 měsíci +1

      he didn't even make a real coding language, he made just a python extension

  • @tegasteve8195
    @tegasteve8195 Před 2 lety +1

    This video was really entertaining, can you show an indepth tutorial

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      The GitHub repo is in the description, I'd recommend looking through that.

  • @leos8407
    @leos8407 Před rokem

    I love seeing letters and numbers on my screen 😀
    (the most productive thing i’ve ever done)

  • @portaltotheweekend_189

    your issue with bootstrapping is that what you created is not a compiled language. For example, Python is interpreted so if you looked at the source code for Python right now it would be in Cpp or C or whatever it is written in. If you want to make it actually compiled there is a nifty python library called LLVMlite which basically allows you to emit LLVM IR code from python. This way LLVM can handle all the crazy compiler optimizations and stuff while all you have to do is focus on generating the IR code with python. Then you can take the LLVM executable file you generated from the python compiler and use that to bootstrap the language, since its a separate executable that is not relying on another programming language run anymore at this point. LLVM is what Rust, Swift, Julia, Zig and a lot of other big languages use so you don't have to worry about it not being a good tool or whatever.

  • @renedescartesdomingosmuala298

    Very interesting!
    So, what's next?
    Are you planning to create your own vm for the language or something like that?

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      I've got no clue, to be honest.

  • @solon7740
    @solon7740 Před rokem

    Bro thats a really good Video and I appreciate the effort you put into making this language. But I think it would've been quite nice to see something from the code with you talking about what you did there and how you came to the solution. Not only talking about "I had lot of bugs" but instead telling us which bugs you've encountered and how you got around them.
    Appreciate your work. Cheers

    • @Chadderbox
      @Chadderbox  Před rokem

      That's fair. I will remember this for future videos. The code linked in the description if you are curious.

  • @dorbie
    @dorbie Před rokem

    Languages typically aren't bootstrapped. They're written initially in another language then reimplemented in themselves which is called dogfooding or self-hosting. Not all programming languages dogfood. Most these days use C & C++, often leveraging the LLVM project and easy support for system and 3rd party libraries these languages offer. Many never move away from this, particularly the slower interpreted languages. This includes Javascript & Python. Implementing Javascript or Python in their own languages would have profound negative performance implications, however other choices might be faster, look at the Bun project that boosted the performance of Javascript by implementing it in Zig. It's also unavoidable that an interpreted language running in a VM / interpreter at some point needs to run on the physical hardware. It can't simply be turtles all the way down, so how would you dog food a VM implementation when there is no underlying compiler to native code? If it was written in interpreted code at least something under the hood must be compiled. If you contemplate this you might realize that when compiling a compiler, or even bootstrapping one you rely on archival code in the compiled compiler and that might contain hidden bugs or even malicious code that is not present in the codebase but compiled into the compiler binary. Quite scary and mind bending when you first realize this.

    • @Chadderbox
      @Chadderbox  Před rokem

      Everyone I have talked to refers to this as bootstrapping. But yes this is an interesting discussion that I had to leave out of the video to save on time.

    • @dorbie
      @dorbie Před rokem

      ​@@Chadderbox You might be right, when I hear bootstrapping I envision it's starting from nothing or very little and bringing up from almost no features to full functionality. In practice though these tend to be reimplementations after a very functional compiler is already in place and successful using another language, at which point someone considers it worth dogfooding. It is vastly easier to reimplement a language in itself when you have a fully functional compiler before you start.

  • @vasekharang
    @vasekharang Před měsícem

    I made for fun "programming language", that was just fully translating to c++ and then running g++ from command line to create executable from the cpp file by itself. So syntax like python, speed like c++ and fully compatible with all c++ libraries. It just shortened c++, instead of #include , you just used import , instead of std::cout

  • @sixvivid
    @sixvivid Před rokem

    Watching this as I am building my own language as well, and using a similar method of parsing code to another compiler.
    I definitely agree, comments were much harder than expected!
    First thing I did after I got the parser to output properly and make sure code was working,
    was printing text. Next was variables. Then IF statements, then loops, then graphics, and so on

  • @ramongonzalezfernandez8904

    3:51 that seems closer to typescript than c#

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f Před 2 lety +1

      Typescript was based off c#

    • @ramongonzalezfernandez8904
      @ramongonzalezfernandez8904 Před 2 lety

      @@user-dh8oi2mk4f typescript added types to javascript, which use a format which is not used by C#, and the rest of his language is very similar to javascript, so your point doesn't stand.

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f Před 2 lety +1

      @@ramongonzalezfernandez8904 they were designed by the same person. Maybe it wasn't right to say that one was based off the other, but they are definitely very similar

  • @Bl0xxy
    @Bl0xxy Před 6 měsíci

    I didn't watch much of the video, but I looked at the code and it doesn't look like a real programming language but instead just a thing that converts your syntax to Python code.
    It's more of an extension of Python with your own syntax, is that right?

  • @cbbcbb6803
    @cbbcbb6803 Před 2 lety

    You forgot to mention that Grace Harper also invinted COBOL, which was much more popular than A-ZERO.

  • @strike6621
    @strike6621 Před 2 lety +3

    Lol! I wanted to make a programming language, and I did the same thing you did, and it was also in python! Although I gave up because it was too hard.

  • @Drifyt
    @Drifyt Před 2 lety

    What an awesome channel subbed and keep at it love your presentations.

  • @AndrieMC
    @AndrieMC Před 2 měsíci

    You should actually make your own programming language, your language right now is just like how typescript is to javascript, your language is to python

  • @GodofWar1515
    @GodofWar1515 Před rokem

    Nice job! You certainly have a lot of dedication to your learning, I'm impressed. I look forward to your upcoming projects :) you've got a sub from me mate. Keep up the good work.

  • @idiotflextech4273
    @idiotflextech4273 Před 2 lety +2

    I am currently making my own programming language in c#, this involves basically creating concepts as to how you can recreate a function that is triggered by code for that language, which sometimes involves practically reconstructing the entire way things work. And even though your language is meant to be simpler and easier to make, what I’ve made and am aiming to make seems so much simpler than what you’re explaining. 😐lol

    • @samochreno
      @samochreno Před 2 lety +1

      I dont think c# is a good idea for this

    • @idiotflextech4273
      @idiotflextech4273 Před 2 lety +1

      @@samochreno its going well so far and its better than java so i think im fine

    • @samochreno
      @samochreno Před 2 lety +1

      @@idiotflextech4273 well, good luck

    • @dimitar.bogdanov
      @dimitar.bogdanov Před 2 lety +1

      @@samochreno C# is a pretty good language for writing compilers. It has a very, very good text library, obviously built on .NET Core so portability is guranteed, there are tons of lexer/parser generator libraries (if you don't want to write your own). There are bindings for clanglib and llvm for the backend side of the compiler. The language is well suited for the job.

    • @samochreno
      @samochreno Před 2 lety

      @@dimitar.bogdanov I was stupid indeed, I think C# is a great language for building a compiler, I don't know why I made that comment, I think maybe because C# is not very good for memory management if he's making an interpreter

  • @bwnjuara5716
    @bwnjuara5716 Před rokem

    What did You Use for Making a Computer Programming Language? Visual Studio? Blank Black Computer Screen and Write Small Codings Then Turn Them into Complex Codings and Larger Codings? Or Computer Core Nucleus in a Form of Green Colored Number 0’s and 1’s Called The Computer Binary Code?

  • @himitesolaymane
    @himitesolaymane Před rokem

    I created an interpreter that does not convert the code to python code instead it runs it using a executer I wrote

  • @cbbcbb6803
    @cbbcbb6803 Před 2 lety +2

    I cannot love Python either.
    Thanks. Very good job. 👏

  • @max_ishere
    @max_ishere Před 2 lety +1

    You shouldve started with an AST that you get after parsing and then implement a way to convert it to python

  • @linusbrendel
    @linusbrendel Před 6 měsíci

    I really don't get why anyone would want to have a line with a single character.

  • @andrewpriestleyxyz
    @andrewpriestleyxyz Před 2 lety +1

    The most impressive part of this video is that you managed to successfully get useful information off of stack overflow

  • @cyanuranus6456
    @cyanuranus6456 Před rokem

    Instead of Making Your Programming Language Using Python. You Can Just Learn Computer Binary Codes in a Form of 0's and 1's

  • @mrmaniac9905
    @mrmaniac9905 Před 2 lety +1

    Parsing is a solved problem. Use something like flex, gnu bison, or my personal favorite antlr. You can then generate bytecode, or write an interpreter by building an AST from the generated lexer and parsers, parse tree

  • @ThatBoringDeveloper
    @ThatBoringDeveloper Před 2 lety

    What about Fortran I never heard of A zero much less it being the first high level language

  • @peterSobieraj
    @peterSobieraj Před rokem

    I think that next time you should do it right way.
    If you analise comments when converting to tokkens, most problems that you were facing go away.
    Aond once you have full tree of user pgoram, you can have options to save it in many different formats, or execute it.

  • @cyanuranus6456
    @cyanuranus6456 Před rokem

    I Also Want to Make a Programming Language Just like Bjarne Stroustrup and Guido Van Rossum. They're The Ones Who Made C++ and Python. Robert Made Lua

  • @colin1444
    @colin1444 Před 2 lety

    you should make a language to make languages

  • @SabeDoesThingsChannel

    yo, I am also wanting to make a programming language based off python if you could give me some resources to look at that would be sick.

    • @Chadderbox
      @Chadderbox  Před rokem

      The GitHub repo for the language is in the description, I didn't really use any other resources though.

  • @cyanuranus6456
    @cyanuranus6456 Před rokem

    So I Wanted to Do The Same. By Learning Computer Binary Codes of 0's and 1's. So I Can Make a Programming Language

  • @foxtrot000
    @foxtrot000 Před 8 měsíci

    3:26 to make it extra slow💀

  • @int4_t
    @int4_t Před 2 lety

    Did you forget to make a new linux distro because that always comes first

  • @vodracseck
    @vodracseck Před rokem

    it's an dsl (domain specific language)

  • @cnitrotimes
    @cnitrotimes Před rokem

    Assalomu alaykum bro, Can you realease SFML 2.6 tutorial? Thanks for response in advance

  • @qwerty_qwerty
    @qwerty_qwerty Před rokem

    Seeing lua in the trash can in the thumbnail 😢😢

    • @Chadderbox
      @Chadderbox  Před rokem

      Easily the worst programming language :)

  • @IlliaZhdanov
    @IlliaZhdanov Před rokem

    5:22 you parse the comment, well duh, if you'll want to put // in a string, just escape it with \

  • @funwithalbi2425
    @funwithalbi2425 Před 2 lety

    i wanna do this and i need help cuz ive not gone anywhere

  • @cyanuranus6456
    @cyanuranus6456 Před rokem

    You Can Just Make a Programming Language from Scratch. But NOT Make a Programming Language in Scratch. "From" not "In"

  • @WhoTheHellTookDudedogScrewYou

    This is really good!

  • @legendrags
    @legendrags Před 9 měsíci

    you just made a python preprocessor, but if it makes it better it is good+

  • @Dorbellprod
    @Dorbellprod Před 2 lety +1

    Impressive. Now make an English compiler.

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      No u

    • @gachastorys5129
      @gachastorys5129 Před 2 lety

      What's funny is that there's an entire programming language called english that's not a joke look it up. I have yet to see somebody do something interesting with it

    • @Dorbellprod
      @Dorbellprod Před 2 lety

      @@gachastorys5129 I have heard of it actually but I think I forgor 💀

  • @gachastorys5129
    @gachastorys5129 Před 2 lety

    I am very impressed at this! is there anything like for loops or while loops or anything else of note? i would love to see this expanded upon but i would (im not forcing you) like to see you to make a game in Java without a game engine. you can do it without any external tools or graphics librarys

    • @gachastorys5129
      @gachastorys5129 Před 2 lety

      oh and i tried running the .exe file but whenever i do it just crashes without me pressing anything... can you please tell me how to propperly (i dont know how to spell dont judge me >:( ) run it thank you!

    • @Chadderbox
      @Chadderbox  Před 2 lety

      I'm working more on the language. Loops are fully supported because they are part of python. I might do something in Java eventually, but I don't really see a point considering I've already done it in C#, which is just better Java.

    • @Chadderbox
      @Chadderbox  Před 2 lety

      Look at the readme, it is a command line utility

    • @foxtro484
      @foxtro484 Před 2 lety

      @@Chadderbox microsoft java*

  • @johnnyfrankenstein0123

    2:08
    The 437 lbs mountain gorilla watching this video on the eastern congo basin:

  • @opposite342
    @opposite342 Před 2 lety

    For Pyinstaller, did you bother recompiling the module? It seems like using it directly causes antivirus to flag them (it sure does for me last time I used it).

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      Yeah, no matter what I do I can't stop your computer registering it as an unknown program. You'll notice most things you make with C/C++ and compile as well will be flagged when you compile them too. Either that or I'm really stupid.

  • @cyanuranus6456
    @cyanuranus6456 Před rokem

    Learn Computer Binary Codes of 0's and 1's in Hexadecimals or Translation. You'll Make a Programming Language. Making a Programming Language is Not Using a Compiler or Lexer in Another Programming Language. You Can Just Learn it from wikiHow I Saw from the Browser. You Should Make a Programming Language by Learning Computer Binary Codes in a Form of 0's and 1's

    • @Chadderbox
      @Chadderbox  Před rokem

      Is this comment AI generated?

    • @cyanuranus6456
      @cyanuranus6456 Před rokem

      @@Chadderbox Is That Even an Excuse?

    • @Chadderbox
      @Chadderbox  Před rokem

      Well, if you can do it then I'd love to see a video of you doing it. If you can do it within the next 3 years I'll be even more impressed.

  • @IlliaZhdanov
    @IlliaZhdanov Před rokem

    It's only hard to make a compiled language. Interpreters are EASY.

  • @TheStickCollector
    @TheStickCollector Před 2 lety

    Interesting

  • @UsmanDev
    @UsmanDev Před 2 lety

    Pretty cool!

  • @ithaca2076
    @ithaca2076 Před 2 lety +1

    i love this! ive been trying to make my own language too. right now i know i can make a lexer, but not a good one. it would only just be a load of "if, else..." statements which is slow and not great. so i found a solution, something like this:
    temp = ''
    result = []
    while i < range(len(program_in_one_string)):
    char = program_in_one_string[i]
    if char in [list of unicode space characters]:
    # ignore basically
    i += 1
    # if we hit a character like "(", "}", ":", etc process it accordingly
    elif char in [list of your programs delimiters]:
    result.append(temp)
    result.append(char)
    temp = ''
    i += 1
    # essentially if your temp value is in the list of tokens your program uses, append it to the results
    elif char in [list of all of your langs tokens]:
    result.append(temp)
    i += len(temp)
    temp = ''
    # otherwise, append the character to temp.
    else:
    temp += char
    i += 1
    im extremely happy with my code to be honest and even in python is relatively fast. but its dumb. since a lexer is just a tokenizer but it also adds some helpful values, (like token start and end, type of token sometimes, etc) the code above is more like a tokenizer. the idea is to save time with the lexer, since all you need is to do is to simply get whatever is written on the text file chopped up, and you can determine whether or not its syntactically correct or whatever in the parser or something idk.
    youd have to likely heavily modify my code above, especially because im on my phone and likely made a typo or something but you get the idea. i found it to be very VERY useful for quick processing times

  • @bowersindustry
    @bowersindustry Před 2 lety

    This is awesome!

  • @enderger5308
    @enderger5308 Před 2 lety

    Wasn’t Perl the previous king of the spot Python now fills? Autotools is written in it, and most Unix systems come with it preinstalled (so, anything but Windows).

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      Yeah perl was used for a lot of things but people don't really like it from what I can tell.

    • @enderger5308
      @enderger5308 Před 2 lety

      While it’s not anywhere near it’s heyday, a few nuts like me still find it nice (I personally enjoy Raku, but Perl5 works for portability). That said, it’s not always looked at as the best and it can be easily misused (like the C preprocessor, in a way).

  • @dunkmania5155
    @dunkmania5155 Před 2 lety

    If it weren't for this video, I may have never learned that Python supports semicolons. Thank you for enlightening me!

  • @onichan6897
    @onichan6897 Před 2 lety

    Using LLVM is cool

  • @minodigital328
    @minodigital328 Před rokem

    I hear Lua is very underrated

  • @thomasm9095
    @thomasm9095 Před 2 lety +1

    This just makes me wonder how computers read binary, and better yet who made binary and how, and how did that person think of making binary and how the system for their pc can read binary and what binary was made in if text editors didn't exist and how the people making binary even knew what they where doing 😳

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      It's pretty nuts.

    • @corinnarust
      @corinnarust Před 2 lety

      this is called: microcode.
      basically, primitive instructions are called in binary. They are read by the hardware. Instead of ones and zeros, 5v and 2v.
      and some crazy people created "binary libraries", and then some initial text in screen, and then a really simple compiler, and this simple compiler was used to create a better compiler, and a better compi...
      this comment threw an exception: com.youtube.StackOverflowException: "Stop with recursive comments"

  • @A_MehChannel
    @A_MehChannel Před 5 měsíci

    python is inefficient enough, and youre gonna make it more slow by making an interpreted language in it!

  • @cheatcentral790
    @cheatcentral790 Před 2 lety

    Hey man, I have not looked at your code so idk if u did it this way but to fix the bracket and indentation problem. I would have stored a global variable called x or something and every time it comes across a "{" it increases by 1 and then decreases by 1 at a "}" and then just add 4spaces*x at in front of the character in the indentation so something like this:
    x = 0
    script = """
    if (1 == 1) {
    if (2 == 2) {
    print("Hello World");
    }
    }
    """
    pythonScript = ""
    token = "";
    for i in script:
    if token == "print":
    indents = ""
    for i in range(0,4*x):
    indents+=" "
    pythonScript += indents+"print"
    token = ""
    else:
    if i == "{":
    x+=1
    elif i == "}":
    x-=1
    else:
    token+=i;
    Sorry for messy code as I am mainly a c++ developer and I wrote it in the comments and did not try it out also I obviously did not add any detection for function value so it will not detect what you want to print.

    • @Chadderbox
      @Chadderbox  Před 2 lety

      It gets more complicated than this when considering comments and strings

    • @cheatcentral790
      @cheatcentral790 Před 2 lety

      @@Chadderbox
      x = 0
      script = """
      if (1 == 1) {
      if (2 == 2) {
      print("Hello World");
      }
      }
      """
      pythonScript = ""
      inString = False
      inComment = False
      token = "";
      for i in script:
      if token == "print":
      indents = ""
      for i in range(0,4*x):
      indents+=" "
      pythonScript += indents+"print"
      token = ""
      else:
      if inString == False and inComment == False:
      if i == "'" or i == '"':
      inString = True
      elif i == "#":
      inComment = True
      elif i == "{":
      x+=1
      elif i == "}":
      x-=1
      else:
      token+=i;
      else:
      if i == "'" or i == '"' and inComment == False and inString == True:
      inString = False
      elif i == "#" and inString == false and inComment == true:
      inComment = False
      So something like that?

  • @ArmaanM123
    @ArmaanM123 Před 11 měsíci

    In the thumb nail: I love how Javascript is still on the podium even if it is in the trash!🤣

    • @Chadderbox
      @Chadderbox  Před 11 měsíci

      One of the best at being the worst!

  • @universalunblocking
    @universalunblocking Před 2 lety +3

    “But I want to force you to have semi colons”
    Already better than python gg

  • @espero_dev
    @espero_dev Před 2 lety

    Hey bro I can help you add really useful stuff like a built in compilers and a decompiler

    • @Chadderbox
      @Chadderbox  Před 2 lety

      Do what you want, it's open source.

    • @espero_dev
      @espero_dev Před 2 lety

      @@Chadderbox how good are you in coding?

    • @espero_dev
      @espero_dev Před 2 lety

      @@Chadderbox and if you could get a custom OS what coding languages will you like and do you want a Mac look or windows look or play with settings and figure out what looks best for you :) I will make you a custom OS

    • @Chadderbox
      @Chadderbox  Před 2 lety

      Not very

  • @hadawardgz
    @hadawardgz Před 2 lety

    Well, TypeScript is just a transpiler that converts your code to pure JS and people call it a programming language, so yeah, you can assume you made a new language

  • @somnvm37
    @somnvm37 Před rokem

    quite hard to watch the video with all of these bright colours and text for the whole screen
    not the entirety of the video needs to look like a misterbeast thumbnail

  • @adrianyt1749
    @adrianyt1749 Před 2 lety

    you can call it P#

  • @Guy_Sandler
    @Guy_Sandler Před 2 lety

    Wow this is what I was looking to make lol

  • @le9038
    @le9038 Před 2 lety +1

    I think I would probably make my own programming language.
    For one, I don't like semicolons at the end of the line. Because if you accidentally leave out one in your code, your whole program won't compile and you have to go to that one line and add one in.
    Second, I was writing some C++ one day and I was curious what a program actually looked like in assembly. So I wrote it down and fed it to a decompiler and as it turns out, C++ (when using a library) calls everything and leaves in the rest that won't be used. Kinda like buying a swiss army knife only to use it for opening wine bottles.
    Also third, while I was watching programming videos, I notice that most programming language look pretty simular to each other and one programming language to the next will mostly have the same stuff from the other.

    • @dynpallomah5918
      @dynpallomah5918 Před 2 lety +3

      i disagree. for a free-form language, semicolons are sometimes crucial for parsing, and having them can make things look a bit clearer. relying on context to determine the end of a statement is not a good thing. that's why i hate python because i feel like i cannot write my programs in my style. i cannot seperate a long statement or a function call with
      . feels like the semicolon-related complains often comes from inexperienced programmers
      not related but python uses words like 'and', 'or', 'not' as logical operators in contrast to the symbols used in most popular languages. i feel dumber using python, like a toddler

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f Před 2 lety +1

      Ofc c++ leaves out stuff that isn’t used, the linker isn’t gonna add code that isn’t run.

  • @sanchalghosh2110
    @sanchalghosh2110 Před 2 lety

    You didn't mention FORTRAN

  • @Legoman69
    @Legoman69 Před 2 lety

    Do not question Legoman69

  • @Gandalf_the_Black_
    @Gandalf_the_Black_ Před rokem

    Perhaps what you made was a programming dialect

  • @TheN0D3
    @TheN0D3 Před 2 lety

    Admit it guys you wanted to make a game engine since the existing ones are too complicated

  • @stopmotionproductions7686

    Pov Craig n Dave just taught you about lexemes 😌

    • @Chadderbox
      @Chadderbox  Před 2 lety +1

      Only UK Computer Science students will understand the pain :(

  • @jacoboneill3735
    @jacoboneill3735 Před rokem

    Sounds simmilar to python but also different. Programming accent? 😂

  • @Scrampy1
    @Scrampy1 Před rokem

    How hard is it?

    • @Scrampy1
      @Scrampy1 Před rokem

      That sounds wrong😳😳😳

  • @ClayTheFoxx
    @ClayTheFoxx Před rokem

    He reinvented JavaScript 🤦‍♂️🤦‍♂️🤦‍♂️