Wow. This just made me realize people actually like coding. It also made me realize I like seeing code from people that like to code. It also made me realize I want to be one of those people who like to code. I also realized my new goal for the countdown to age 21 is to make code that people like to see because I like to code.
It's amazing how it runs at just the right framerate to watch it spin like a screensaver. The C version spins so fast you can barely tell what's happening.
you know... I'm thinking of starting something called The Donut Project, where I let everyone make donuts in different languages... wouldn't that be fun? Maybe I'll officially announce it after 500 subs or smth
Yooo someone finally done it! I tried this like a year ago but gave up when I realized I need to come up with a one-liner to do it. So I ended up just posting the regular one (on my channel btw)
I would've replace single quotes to double (near 'math') and remove whitespaces at the end of the lines, otherwise make them on one line length (right now they are fluctuated with various length)
You'd be surprised about how lenient Python actually is about indentation. Python allows for one-liners just fine. And it ignores whitespace within parenthesized expressions.
There is a dramatically simpler solution. Just write the entire code normally, then surround the code with triple quotes and set a variable “code” equal to it. Then replace all the actual new lines and tabulations with characters in code var and run eval(code). Add additional new lines as necessary until desired donut size is reached
And you don't need to draw a line all the way left on the first line, the first word or a parenthesis will do. itertools provides a multitude of ways to make infinite loops in an expression, e.g. dropwhile of cycle. For extra horror, make it a set to start the whole thing with a {.
Python, indents are important‽ Fuk, that's why I've been having so much trouble learning it.., how do I make indents visible? Like actually see all the spaces and tabs in a text editor that automatically fits to the screen?
@@carbon98 android, pydroid 3, but have been using a text editor a lot first, some cut and paste.. (it was actually hard to find one for Android that will actually let you use a txt extension or file extension of your choice)
Bro i have a good idea for ya how to accomplish this 😊 | if you gonne use this idea plsss show my comment 😢 The Idea. 1. Get the dounut python script working 2. If the code works then do this make a str variable named x and the x is equal to the python donut script. 3. Once you did it you can start to import base64 lib and use its encoder or use other encoder. 4. Using the base64 encoder lib (personally !) Encode the whole x variables string # note. For example in unix /linux using bash we can do that like this echo "hello" | base64 and jt have been encoded / showes the encoded text of hello.!! 5. Now we have the encoded text of the donut we can use it how ever we want. 6. Now we can do this z="""""" 7. and uniform the text as we want no matter how you like :) 8. Using a lib or without even a lib we can use something like .sort or idk something (sorry did not remember) that will remove the spaces. 9. Once the spaces are removed we can say it to decode the encoded text 10. We can make it to not print the output but directly run it 😊🤔 i hope it helped you. )
This is like the 6th donut.c video in my recommended videos, and i enjoyed all of them the challenge of indents is an interesting one. Also, the first music track is used by bausffs for his outro and it messed with my brain honestly
Yes, and I actually considered this... I decided against it because, one, people will complain about how its mostly comments, and two, because it's no fun to see half the donut be grey :)
I'm inviting developers to make their own donuts in The Donut Project... see my latest community post. Feel free to start making your own versions and let me know under the post-If I get enough submissions,, I will feature everyone who makes the donuts in a future video :)
@@evanzhoudev i saw so many examples and tons of tutorials and recently working on linear algebra in order to get the specific cordinates and equations for rotating the banana. It will took me a while but i think its woth it
This is very interesting do you mind sharing that specific parametric equations for said donut? As I belive getting smth like that can be very difficult
@@evanzhoudev Trivially easy, actually. E.g. gas allows ; to separate statements in x86 assembly, and C style comments can hide line breaks from the assembler. Some (usually archaic) platforms have more specific restrictions, like labels in column 0.
You could've used regular non-one-line code. Just make a string out of it and pass it to eval(). Line breaks necessary to make a donut could be done with string addition like eval("..." + "...")
that would be slightly harder as a croissant is not a nice mathematical shape like a torus, but @FRESHxLEMONxSLICES seems to be doing a banana, which is similar!
Well there was some afterthought and keen realisation which made this come to fruition otherwise this wouldn't have happened but yes that's practically it although you gotta commend his effort on manually doing this for hours on end
@@xClairy nah there is no way he spent multiple hours on it, he literally just pressed space a few times and added a few parentheses... that's like me making a video called "i made minecraft", but in reality i just download the source code and replace tabs with spaces
@@aspectreishauntingeurope Well replacing stuff and working it out still takes time y'know considering he wasted some time tryna brute fore it and then finally did the calculations so at least at hour would've gone into it. Although I won't argue that it is click baity but he did give the credits so that's that. Either way I wish you a wonderful day!
Haha, very nice work! I still can't believe I nerd sniped so many people with this monstrosity
You really changed the world for the better with that donut!
It means so much that you are watching my video :)
the esoteric programming and code golf community thanks you for the massive increase in popularity and creativity you gave it.
Thanks for creating the original donut.c code 👍
After watching one donut related tutorial for blender my feed is now filled with donut related programming and 3d modelling
Join us
Lol
Welcome to the club, buddy *slaps ass*
blenderguru am i right?
@@multiarray2320 Yes
Great! Now make donut shaped code that can turn any one liner into donut shaped code
Was genuinely planning to do that, may work on that someday :)
this will truly be the bane of linters and static analysis tools
@@evanzhoudevi'll do it
Java: 80000000000TB take it or leave it
@@Emmet_v15update?
Doing something similar as this in lua, it's a nice exercise to see how much you know the programming language syntax.
lua is easier, semicolons + no indents
You don't even need semicolons!
I've actually done this in Lua and it was 50/50 headache and awesomeness
lets fucking gooo... man made all python devs happy
Man used so much parentheses that lisp is jealous
Wow. This just made me realize people actually like coding. It also made me realize I like seeing code from people that like to code. It also made me realize I want to be one of those people who like to code. I also realized my new goal for the countdown to age 21 is to make code that people like to see because I like to code.
It's amazing how it runs at just the right framerate to watch it spin like a screensaver. The C version spins so fast you can barely tell what's happening.
Bro you are insane! I can't wait to see your channel blow up 🔥
My friend ordered me to tell you congratulations . Pursue your dreams young man !~
Love hearing lofi songs I listen to a lot be used on TH-cam XD
Love the video!
bro made is bigger than what it was supposed to be and filled the end with a comment , what a manace
Thanks for the co- I mean cool project
Can you make it in all the programming languages and compare their memory usage size?
you know... I'm thinking of starting something called The Donut Project, where I let everyone make donuts in different languages... wouldn't that be fun? Maybe I'll officially announce it after 500 subs or smth
@@evanzhoudev Subbed
Here you go, 500 subs completed
@@utkarshprakash6485Stay tuned... The Donut Project is coming soon
@@evanzhoudev Making donut with whitespace language 😎
Yooo someone finally done it! I tried this like a year ago but gave up when I realized I need to come up with a one-liner to do it. So I ended up just posting the regular one (on my channel btw)
average HOME - We're Finally Landing enjoyer
This is art! Such a playful linguistic creation. git clone'd
unbelievable you can did it
I only know print thing in python so for me this looks dope
This is truly epic
It looks like a proper donut!
when you have 3 braincells and want donut
Amazing!
I like that. That's like slapping a bag of dogfood at the Costco you know I'm saying? Good stuff
Its only a matter of time until bad apple
amazing
He did it :o
son of a gun he did it!
I would've replace single quotes to double (near 'math') and remove whitespaces at the end of the lines, otherwise make them on one line length (right now they are fluctuated with various length)
This deserves thousands of views. Really awesome stuff
they got what they deserved 😈
i think i've seen ur profile pic on the raycast slack and now ur video got recommended to me lol
To much power.
i cant even fathom how it is possible, since python is so specific about indentation
You'd be surprised about how lenient Python actually is about indentation. Python allows for one-liners just fine. And it ignores whitespace within parenthesized expressions.
I’d bet you realized that last thing after you watched the video :)
hey bro just wanted to ask, what was the font that you used in your visual studio code; looks cool!
Unbelievable....
EvanZhouTextShaper
It's called a shower thought because I'm watching this video in the shower
The background music is Better Days by Lakey Inspired
There is a dramatically simpler solution. Just write the entire code normally, then surround the code with triple quotes and set a variable “code” equal to it. Then replace all the actual new lines and tabulations with characters in code var and run eval(code). Add additional new lines as necessary until desired donut size is reached
ofc ik that's easier, but that's no fun :D
And you don't need to draw a line all the way left on the first line, the first word or a parenthesis will do. itertools provides a multitude of ways to make infinite loops in an expression, e.g. dropwhile of cycle. For extra horror, make it a set to start the whole thing with a {.
@@0LoneTech I realized that today too!
Now make one that renders it's own code and spins that in 3D
Thank you chat gpt!
that's so cool wtf
i tried using semicolons to make a one liner but soon realised about the indent problem
3:47 I agree, just why 🤣
Do Lua next
Imposible...
How can I generate a donut template myself
This has been around for so long bro you didn’t make this
My thought was something like exec('tab=" "*4 etc.')
Cool
NOICE
Hey there! Would it be okay for you if I printed this on a canvas for my office? I would keep your name included of course.
sure!
pls just use 2d nesting or putting a list in a list and make a function the convert the information in the list to make into a donut
Python, indents are important‽ Fuk, that's why I've been having so much trouble learning it.., how do I make indents visible? Like actually see all the spaces and tabs in a text editor that automatically fits to the screen?
are you on VSCode? theres a setting for seeing indentation there as dots. dw, the indentation in python is really easy imo
@@carbon98 android,
pydroid 3, but have been using a text editor a lot first, some cut and paste..
(it was actually hard to find one for Android that will actually let you use a txt extension or file extension of your choice)
amazing code!
I tried to run it in terminal but it keeps adding frames line by line :(
all fun and nice and everything but what is the name of the music at 4:50?
Sorry for late response: HOME - We're Finally Landing
One time i heard someone who didnt code say “whats a ka code!?” He meant C code
I thaught it was the donut shape in SPWN language
Bro i have a good idea for ya how to accomplish this 😊 | if you gonne use this idea plsss show my comment 😢
The Idea.
1. Get the dounut python script working
2. If the code works then do this make a str variable named x and the x is equal to the python donut script.
3. Once you did it you can start to import base64 lib and use its encoder or use other encoder.
4. Using the base64 encoder lib (personally !) Encode the whole x variables string
# note. For example in unix /linux using bash we can do that like this echo "hello" | base64 and jt have been encoded / showes the encoded text of hello.!!
5. Now we have the encoded text of the donut we can use it how ever we want.
6. Now we can do this z=""""""
7. and uniform the text as we want no matter how you like :)
8. Using a lib or without even a lib we can use something like .sort or idk something (sorry did not remember) that will remove the spaces.
9. Once the spaces are removed we can say it to decode the encoded text
10. We can make it to not print the output but directly run it 😊🤔 i hope it helped you. )
This is like the 6th donut.c video in my recommended videos, and i enjoyed all of them
the challenge of indents is an interesting one.
Also, the first music track is used by bausffs for his outro and it messed with my brain honestly
what ide do you use?
VSCode for heavy projects and Zed for lighter ones :)
pep8 will go to waste while shaping Python like a donut lmao
what music in the end?
We’re Finally Landing by Home
Pass a base64 code to decoder and exec function. B64 code is a string and newlines should be ingnored by decoder
😂😂😂😂😂 ah man I'm dying
now make one in befunge
niko
niko
Couldn't you just fill the top half with comments so that the start of the code actually is at the widest part of the donut?
Yes, and I actually considered this... I decided against it because, one, people will complain about how its mostly comments, and two, because it's no fun to see half the donut be grey :)
Why be a baker if I can code my own donut?
Go and rust next thanks you for your service
I'm inviting developers to make their own donuts in The Donut Project... see my latest community post. Feel free to start making your own versions and let me know under the post-If I get enough submissions,, I will feature everyone who makes the donuts in a future video :)
lol i can try atlest my friend @@evanzhoudev
Some one else made this tho. Like in 2020 right ? I think I saw this on Lex Friedman.
Not python… he did it in C and it’s harder in a indent based language like python :)
donut except the first line :) sorry bro. but it was a nice try indeed!
420th sub
How this not have a milly
Hi nefarious intent
nef pls bring back intent store 🙏 we need you back!
yoyoyo its hump day
come back to mc cheating pls its so shit without you :pray:
please update the zeroday hacked client for 1.8.9
Someone did this in brainfuck in a geometry dash level
Aka brainfugd
100K+ views and 1K~ subs dang how did that happen lol
Subbed! Hope your channel blows up (maybe mine will someday too)
Good job Bro Keep it up 🔥 I am currently working on a 3D rotating banana in C++
Interesting! May I ask how you plan to do this? A banana is not a very neat shape like a donut/torus...
@@evanzhoudev i saw so many examples and tons of tutorials and recently working on linear algebra in order to get the specific cordinates and equations for rotating the banana. It will took me a while but i think its woth it
@@FRESHxLEMONxSLICES Most definitely... just like how I spent hours on this, but yours is arguably cooler!
@@evanzhoudev Thanks i hope we work together one day 💐
This is very interesting do you mind sharing that specific parametric equations for said donut? As I belive getting smth like that can be very difficult
Come back nef
turtle not exist
great! now do binary :3
man, it feels like you got too much time, you good? like really...... do you wanna talk to someone ? (obv joking, nice video!)
i'm good lol 👍
ahok
AI?
Now do it in assembly
Was planning but don’t think it’s possible? Any idea?
@@evanzhoudev Trivially easy, actually. E.g. gas allows ; to separate statements in x86 assembly, and C style comments can hide line breaks from the assembler. Some (usually archaic) platforms have more specific restrictions, like labels in column 0.
couldnt you just use exec?
yes, but that's no fun... I might even call it "cheating"
@@evanzhoudev i guess yeah, just thought of that immediately, nice video though
I really love this
Another good video
holy shit this is a 1k view video from a 50sub channel?? I honestly thought I was watching something from someone much larger, great job!
Now it’s a 30k view video from a 400 sub channel… that was fast ;)
You could've used regular non-one-line code. Just make a string out of it and pass it to eval(). Line breaks necessary to make a donut could be done with string addition like eval("..." + "...")
meh that's no fun... I know you can do that, but this is far cooler
@@evanzhoudev yeah, i agree. Besides, who needs a donut that's just one color)
I love this. Wow.
voice is low
can u make croissant shape?
that would be slightly harder as a croissant is not a nice mathematical shape like a torus, but @FRESHxLEMONxSLICES seems to be doing a banana, which is similar!
Nice vid
This man is a menace
The world will become a better place when we destroy everything related to python programming language
yeah 10 fps
Lol. Bro really spent that much time on a donut 😂. Good
wait did you just take someone else's code and simply formatted it a little bit? this is so clickbaity and lazy...
Well there was some afterthought and keen realisation which made this come to fruition otherwise this wouldn't have happened but yes that's practically it although you gotta commend his effort on manually doing this for hours on end
@@xClairy nah there is no way he spent multiple hours on it, he literally just pressed space a few times and added a few parentheses... that's like me making a video called "i made minecraft", but in reality i just download the source code and replace tabs with spaces
@@aspectreishauntingeurope Well replacing stuff and working it out still takes time y'know considering he wasted some time tryna brute fore it and then finally did the calculations so at least at hour would've gone into it. Although I won't argue that it is click baity but he did give the credits so that's that. Either way I wish you a wonderful day!
@@xClairy a wonderful day to you too!
It’s not clickbait but it might be lazy, depending on how you see it… trust me though, it wasn’t easy ;)
lower quality software than the original
what de fak lmao