@@universenerdd YOU are dumb, Pluscrafter NEVER said Python was compiled and at least Pluscrafter knows the difference between their, they're and there
@@e.6z1 okay, so what i meant was interpreters are not compilers, if you look at the original comment it makes sence, and i do know the difference, if that was what you were implying
Me: *blinks* Him: Now we are done let’s code the entire f-ing universe edit: dang this was a year ago when I didn't know how to code and now I feel bad for commenting this. Amazing video
It took RU-vid 2 years to recommend this amazing tutorial.... Really well done mate! It's inspired me enough to dabble on my own version. Not sure about an entire language but could be really useful for making CLIs.
Funnily enough, when you are able to do that, you can call your language Turing-complete (it can recreate itself, in itself), and is mostly a good-enough programming language for most basic tasks.
@@0x1EGEN Your original reply: "You mean "self-hosting", turing complete just means it can theoretically compute anything. en.wikipedia.org/wiki/Self-hosting_(compilers)" An answer: no. A self-hosting compiler can compile itself, yes, but a language can be interpreted, and you could still make another language with it. Being Turing-complete means that it can simulate a Turing-machine. Taken from Wikipedia: "For example, an imperative language is Turing-complete if it has conditional branching (e.g., "if" and "goto" statements, or a "branch if zero" instruction; see one-instruction set computer) and the ability to change an arbitrary amount of memory (e.g., the ability to maintain an arbitrary number of data items)." That means, that as long as you have if statements and some way to loop (be it goto statements or a for loop), your language is turning complete.
Thanks! I do plan on doing that soon. The later episodes in this series have gotten more messy and complicated, and I'm planning on redoing this series first. I also am doing a simpler 4 part series on making a math interpreter before that. So hopefully I get around to doing a compiler soon :)
Dude, thanks. You don't know me, but I am a solo game designer with a solid "B" in art skills, but a "C-" in programming. I have been trying to implement a basic like script interpreter in a python program I am making. Been trying for several years to get it right. This tutorial is EXACTLY what I needed. Thanks again.
This is great. Been working my way through Nand 2 Tetris on my own. I made it through the hardware portion all right but once it got to writing the assembler I felt completely lost. Hoping this will give me the nudge I need, so far I'm loving the content and can't wait to finish.
oh your lexer is so nice . it actually handles problems. my lexer just advances over them . so once/if mine ever becomes a compiler instead of a interpreter. literally everything will compile but whether or not it will run is another story entirely.
I’m always so envious of seeing young people with that drive. When I was 15 all I cared about was playing videogames and being cool, such useless things
I've got like 3 yrs of experience in C#, but only like 3 months in Python. Probably not this I should do with only 3 months of exp. but I strongly believe that my C# skills will help. Amazing tutorial ngl
Really thx for this Toutorial! This was my first Toutorial that I used for Python ( If I don’t mention the Python Code in my Java File and 8 Videos of Python but I didn’t test them...) So I learned here not just how to make a programming language, I learned even Python with this Toutorial! Really thx for it!
I thought that the output of "1.2+1" would be "float: 1.2 | plus | int: 1", however I've noticed that it skips the plus sign entirely. It does that for every first character behind a number. I checked my code (I translated your code into lua and thought I messed something up) and then was suprised to see that indeed, it skips the first character that comes after any number in the make_number function. There is an easy fix to it tho! After the loop in the make_number function you need to decrement the self.pos by 1. (self.pos -= 1) After doing that it now correctfully translate the input "1.2+1" to "float: 1.2 | plus | int:1" instead of the output given above. I do not know if the same issue has happened to anyone else before, but if it did it would be nice if you could pin this message, it was not as easy to track down as it might sound from above. Nice video nontheless! It helped me out a lot!
Are you sure you didn't call self.advance() in the while loop of make_tokens() as well, after tokens.append(self.make_number())? That would result in calling self.advance() twice, which creates the issue you ran into. I have the code in the video and I was not able to reproduce your issue at all.
Awesome, I know have a fully working lexer and I am working on a programming language known as jublee. Which already has the basic features of addition , sub , mul and div.
The error output looks so neat! Copilot suggested me how to get output like this: calc> 12+23.3+g Illegal Character: g File , line 1 12+23.3+g ^ Error representation should be: result = f'{self.name}: {self.details}' result += f' File {self.pos_start.filename}, line {self.pos_start.ln + 1}' line = self.pos_start.filetext[:self.pos_start.col+1] result += f' {line}' result += ' ' + ' ' * (self.pos_start.col) + '^' return result
Im creating a language called Neptune, 'cuz it is my favorite planet. I want to make it the most easy to understand programming language using a lot of simple keywords
I think I got something wrong. I followed the tutorial, but what happens when I do 1 + 1 is strange. basic > 1 + 1 [, , ] NEVERMIND I forgot to put __ after __repr
7:11 really really important flaw: the while loop will keep appending same char to the string indefinitely once it starts. there's nothing to advance it. ok you caught this at 10:31, this took me a couple watches to see if you put that somewhere in the video
Good tutorial! I tried this once before when I was still pretty new at python and I didn't understand it so I gave up after the first two vids. But, now that I'm more familiar with the syntax of python, I can actually understand everything in this tutorial.
To speed things up you might want to set self.length to len(text) in __init__, else you change the complexity of advance to O(n) where n is the length of the text.
how did you get it so that when you click new terminal it says just terminal> and not the path to the folder you are working in? Also I copied everything from github and type in the terminal 'python3 shell.py' nothing happens! Edit: I have the Python extention for VScode in version 2018.3.0
On windows you can use the "prompt" command to change what text shows up. If you are using windows 10, it preinstalls a python3 program, but this isn't the real python, rather a link to the microsoft store to install python. This could be why nothing happens. Try just run "python" instead of "python3", otherwise you may have to update your path.
CodePulse yeah man! You write some super clean code! I’m trying to make my own language just for fun and wow this has help a lot. It’s really really fun to! Keep it up man!!
Sorry CodePulse, I have some questions.. :) 1. Python is a language that is a bit slow compared to other lnguages. So can another language created using python be faster than Python ? 2. Does this tutorial series include everything in BASIC Language ? 3. What are the basics of the Programmig Language ? Many thanks to the tutorials you created ^)
1. A language created in Python can be faster if (a) it is compiled to machine code, or (b) it is compiled to byte-code to be interpreted by some other application such as JVM (Java virtual machine), or WASM (WebAssembly to allow it to run on the web). 2. No, as the series progresses the language differs more from the basic language. 3. I'm not sure what you are asking here. Your welcome :)
Thanks. My aim for this series is to improve on HowCode's tutorials, as his original series didn't use proper techniques, and he rushed his newer series in my opinion. I also plan on making the series much longer and add a lot more features that are missing from HowCode's tutorials (for example functions with arguments).
@Najmul hossain As in the minimax algorithm in game theory? It's not really the type of thing that I had planned for the channel, and there seems to be plenty of explanations out there already. But if enough people wanted it, I would definitely consider it.
a year ago i wanted to create a programming language but i don't even know what is class in python,but now i can code in rust,understanding OOP and little bit of data structure and algorithm
When I put a space in between my numbers it errors how do I fix that, I looked back through the video and couldnt find anything I did wrong so please help.
if i knew how to make a programming language, I would call it OceanCode and code for making text with another font like hello world is anyways my favorite font is indeed consolas
i can just imagine teachers using this language in math class, okay students, find the answer to 435*1654, i can't figure it out, USE YOU'RE BASIC TO FIGURE IT OUT
seems difficult but i want to get into it ;) for the first time watching i just rewrite your code. When you began to improve Error class my brains just broke. I think i will watch this vid till I understand it enough good. At all, good tutorials, one of the best ive found. Unfortunately, in Russian programming segment there is no tutors how to create your own compiler/interpreter. But it seems like i found an amazing one in English sorry for broken English
Thank's for your comment! Your English is not bad. I think I overcomplicated this series, and I intend to simply things in my future tutorials :) Good luck!
Oh my godddd i will make my own programming language i will make exe of the files and done my friends will use my programming language boom its name would be py# inspired from python and c# boom well and i will be upgrading it obviously like adding classes and objects in the next 5 years coz i have just completed python 4 months ago and my friends would be like😲😲😲😲 you are 11 and you made a programming language really
i get the error 'import nide' (nide is my language) at the start of the shell file.... no idea why. I even checked the github and it all was the same, im using python 3.9 can anyone help please! edit: i also tried renaming everything to what he used and same result
I personally would've used enums for the token system, I'll just try to follow along with those, hope it isn't too much of a struggle (I'm using C++, and yes I know python doesn't have them builtin but there is a builtin lib for that)