I made a DONUT-SHAPED DONUT.C in PYTHON

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 199

  • @a1k0n
    @a1k0n Рік тому +504

    Haha, very nice work! I still can't believe I nerd sniped so many people with this monstrosity

    • @evanzhoudev
      @evanzhoudev  Рік тому +55

      You really changed the world for the better with that donut!
      It means so much that you are watching my video :)

    • @unflexian
      @unflexian Рік тому +3

      the esoteric programming and code golf community thanks you for the massive increase in popularity and creativity you gave it.

    • @j.21
      @j.21 Рік тому +2

      Thanks for creating the original donut.c code 👍

  • @KynehlScottMisajon
    @KynehlScottMisajon Рік тому +480

    After watching one donut related tutorial for blender my feed is now filled with donut related programming and 3d modelling

  • @kondo-ii
    @kondo-ii Рік тому +223

    Doing something similar as this in lua, it's a nice exercise to see how much you know the programming language syntax.

    • @meta___
      @meta___ Рік тому +11

      lua is easier, semicolons + no indents

    • @BlockOfGaming
      @BlockOfGaming Рік тому +3

      You don't even need semicolons!

    • @KashTheKingYT
      @KashTheKingYT Рік тому +1

      I've actually done this in Lua and it was 50/50 headache and awesomeness

  • @giganooz
    @giganooz Рік тому +149

    Great! Now make donut shaped code that can turn any one liner into donut shaped code

    • @evanzhoudev
      @evanzhoudev  Рік тому +65

      Was genuinely planning to do that, may work on that someday :)

    • @AgriyaKhetarpal
      @AgriyaKhetarpal Рік тому +12

      this will truly be the bane of linters and static analysis tools

    • @Emmet_v15
      @Emmet_v15 11 місяців тому

      ​@@evanzhoudevi'll do it

    • @LSHV
      @LSHV 10 місяців тому

      Java: 80000000000TB take it or leave it

    • @WextraYT
      @WextraYT 9 місяців тому

      @@Emmet_v15update?

  • @stanislasmartin768
    @stanislasmartin768 10 місяців тому +4

    Man used so much parentheses that lisp is jealous

  • @thehypotheticalhuman6166
    @thehypotheticalhuman6166 Рік тому +21

    lets fucking gooo... man made all python devs happy

  • @MatthewFleury-y7g
    @MatthewFleury-y7g Рік тому +5

    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.

  • @anon_y_mousse
    @anon_y_mousse 9 місяців тому +2

    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.

  • @shadowmist9422
    @shadowmist9422 Рік тому +1

    My friend ordered me to tell you congratulations . Pursue your dreams young man !~

  • @character640p
    @character640p Рік тому +52

    Can you make it in all the programming languages and compare their memory usage size?

    • @evanzhoudev
      @evanzhoudev  Рік тому +38

      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

    • @drbinxy9433
      @drbinxy9433 Рік тому +3

      @@evanzhoudev Subbed

    • @utkarshprakash6485
      @utkarshprakash6485 Рік тому +1

      Here you go, 500 subs completed

    • @evanzhoudev
      @evanzhoudev  Рік тому +5

      @@utkarshprakash6485Stay tuned... The Donut Project is coming soon

    • @XCanG
      @XCanG Рік тому

      @@evanzhoudev Making donut with whitespace language 😎

  • @astroorbis
    @astroorbis 11 місяців тому

    Love hearing lofi songs I listen to a lot be used on UA-cam XD
    Love the video!

  • @powerfuluwu
    @powerfuluwu Рік тому

    bro made is bigger than what it was supposed to be and filled the end with a comment , what a manace

  • @KashTheKingYT
    @KashTheKingYT Рік тому

    Bro you are insane! I can't wait to see your channel blow up 🔥

  • @juanjoseguva
    @juanjoseguva Рік тому +8

    This is art! Such a playful linguistic creation. git clone'd

  • @JuxGD
    @JuxGD 10 місяців тому

    average HOME - We're Finally Landing enjoyer

  • @fun-damentals6354
    @fun-damentals6354 Рік тому +62

    i cant even fathom how it is possible, since python is so specific about indentation

    • @SkyyySi
      @SkyyySi Рік тому +13

      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.

    • @evanzhoudev
      @evanzhoudev  Рік тому +7

      I’d bet you realized that last thing after you watched the video :)

  • @CompanionCube
    @CompanionCube Рік тому +5

    when you have 3 braincells and want donut

  • @ethanfiz304
    @ethanfiz304 9 місяців тому

    hey bro just wanted to ask, what was the font that you used in your visual studio code; looks cool!

  • @TheEighthAct
    @TheEighthAct Рік тому

    It's called a shower thought because I'm watching this video in the shower

  • @hy69
    @hy69 Рік тому

    I only know print thing in python so for me this looks dope

  • @fromant65
    @fromant65 Рік тому +31

    This deserves thousands of views. Really awesome stuff

  • @patrickmauboussin
    @patrickmauboussin 10 місяців тому +1

    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

    • @evanzhoudev
      @evanzhoudev  10 місяців тому

      ofc ik that's easier, but that's no fun :D

    • @0LoneTech
      @0LoneTech 9 місяців тому +1

      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 {.

    • @evanzhoudev
      @evanzhoudev  9 місяців тому

      @@0LoneTech I realized that today too!

  • @squarejellyfish16
    @squarejellyfish16 Рік тому

    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)

  • @entergamingvn7186
    @entergamingvn7186 10 місяців тому

    unbelievable you can did it

  • @I_I_I_I_I713
    @I_I_I_I_I713 Рік тому

    Its only a matter of time until bad apple

  • @WilliamWelsh
    @WilliamWelsh Рік тому

    i think i've seen ur profile pic on the raycast slack and now ur video got recommended to me lol

  • @Andy-jd2un
    @Andy-jd2un Рік тому +1

    I like that. That's like slapping a bag of dogfood at the Costco you know I'm saying? Good stuff

  • @jacksonlevine9236
    @jacksonlevine9236 10 місяців тому

    EvanZhouTextShaper

  • @legendrags
    @legendrags 10 місяців тому

    son of a gun he did it!

  • @Papriker98
    @Papriker98 Рік тому +1

    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.

  • @GordonLi-y9j
    @GordonLi-y9j 9 місяців тому

    The background music is Better Days by Lakey Inspired

  • @AndyP3r3z
    @AndyP3r3z 11 місяців тому

    He did it :o

  • @XCanG
    @XCanG Рік тому +1

    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)

  • @awsmeanthony
    @awsmeanthony 11 місяців тому

    To much power.

  • @pc1up-off
    @pc1up-off 10 місяців тому

    all fun and nice and everything but what is the name of the music at 4:50?

    • @evanzhoudev
      @evanzhoudev  10 місяців тому +1

      Sorry for late response: HOME - We're Finally Landing

  • @gean31
    @gean31 Рік тому +1

    Unbelievable....

  • @kimpitus1700
    @kimpitus1700 11 місяців тому

    How can I generate a donut template myself

  • @teaser6089
    @teaser6089 Рік тому

    This is truly epic

  • @RayMelodicJourney
    @RayMelodicJourney Рік тому

    It looks like a proper donut!

  • @agoogleuser2507
    @agoogleuser2507 19 днів тому

    In Oython, you can do it, it will be in a pain the ass later

  • @The-python-guy
    @The-python-guy Рік тому

    Amazing!

  • @sk8crusade269
    @sk8crusade269 Рік тому

    Thank you chat gpt!

  • @petevenuti7355
    @petevenuti7355 Рік тому

    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?

    • @alyme_r
      @alyme_r Рік тому

      are you on VSCode? theres a setting for seeing indentation there as dots. dw, the indentation in python is really easy imo

    • @petevenuti7355
      @petevenuti7355 Рік тому

      @@alyme_r 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)

  • @jammin1336
    @jammin1336 11 місяців тому

    One time i heard someone who didnt code say “whats a ka code!?” He meant C code

  • @rodrigoqteixeira
    @rodrigoqteixeira 11 місяців тому

    3:47 I agree, just why 🤣

  • @official_meelees
    @official_meelees 10 місяців тому

    i tried using semicolons to make a one liner but soon realised about the indent problem

  • @samjackson5549
    @samjackson5549 Рік тому

    This has been around for so long bro you didn’t make this

  • @IntentStore
    @IntentStore Рік тому +27

    How this not have a milly

    • @Umbruheon2048
      @Umbruheon2048 Рік тому +6

      Hi nefarious intent

    • @TaxEvasionProfessional
      @TaxEvasionProfessional Рік тому +1

      nef pls bring back intent store 🙏 we need you back!

    • @DortDev
      @DortDev Рік тому

      yoyoyo its hump day

    • @user-8fe84mfm
      @user-8fe84mfm Рік тому

      come back to mc cheating pls its so shit without you :pray:

    • @ripjoe.-_-.
      @ripjoe.-_-. Рік тому

      please update the zeroday hacked client for 1.8.9

  • @48_subhambanerjee22
    @48_subhambanerjee22 Рік тому +1

    😂😂😂😂😂 ah man I'm dying

  • @_lun4r_
    @_lun4r_ Рік тому

    pep8 will go to waste while shaping Python like a donut lmao

  • @zitronenwasser
    @zitronenwasser Рік тому

    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

  • @Ouabou-gv9lc
    @Ouabou-gv9lc 10 місяців тому

    I thaught it was the donut shape in SPWN language

  • @baronbacku9984
    @baronbacku9984 Рік тому

    that's so cool wtf

  • @abizhalyanzwar5411
    @abizhalyanzwar5411 9 місяців тому

    Do Lua next

  • @koulchilebaiz
    @koulchilebaiz 8 місяців тому

    amazing code!
    I tried to run it in terminal but it keeps adding frames line by line :(

  • @ne0-1234
    @ne0-1234 10 місяців тому

    what ide do you use?

    • @evanzhoudev
      @evanzhoudev  10 місяців тому

      VSCode for heavy projects and Zed for lighter ones :)

  • @yayer_27
    @yayer_27 Рік тому

    amazing

  • @FRESHxLEMONxSLICES
    @FRESHxLEMONxSLICES Рік тому +18

    Good job Bro Keep it up 🔥 I am currently working on a 3D rotating banana in C++

    • @evanzhoudev
      @evanzhoudev  Рік тому +4

      Interesting! May I ask how you plan to do this? A banana is not a very neat shape like a donut/torus...

    • @FRESHxLEMONxSLICES
      @FRESHxLEMONxSLICES Рік тому +4

      @@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

    • @evanzhoudev
      @evanzhoudev  Рік тому +4

      @@FRESHxLEMONxSLICES Most definitely... just like how I spent hours on this, but yours is arguably cooler!

    • @FRESHxLEMONxSLICES
      @FRESHxLEMONxSLICES Рік тому

      @@evanzhoudev Thanks i hope we work together one day 💐

    • @AGamersWork
      @AGamersWork Рік тому +1

      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

  • @samarnagar9699
    @samarnagar9699 Рік тому +1

    Go and rust next thanks you for your service

    • @evanzhoudev
      @evanzhoudev  Рік тому +1

      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 :)

    • @samarnagar9699
      @samarnagar9699 11 місяців тому +1

      lol i can try atlest my friend @@evanzhoudev

  • @chri-k
    @chri-k Рік тому +3

    now make one in befunge

  • @monkeyhorizon
    @monkeyhorizon Рік тому

    My thought was something like exec('tab=" "*4 etc.')

  • @r0fael_programmer
    @r0fael_programmer 11 місяців тому

    Imposible...

  • @sly_dev1l351
    @sly_dev1l351 Рік тому

    what music in the end?

  • @ojurerewaire1571
    @ojurerewaire1571 11 місяців тому

    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

  • @sargismartirosyan9946
    @sargismartirosyan9946 10 місяців тому +1

    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. )

  • @nosult3220
    @nosult3220 Рік тому

    Some one else made this tho. Like in 2020 right ? I think I saw this on Lex Friedman.

    • @evanzhoudev
      @evanzhoudev  Рік тому +3

      Not python… he did it in C and it’s harder in a indent based language like python :)

  • @__________________________6910

    NOICE

  • @stanleyyyyyyyyyyy
    @stanleyyyyyyyyyyy Рік тому

    donut except the first line :) sorry bro. but it was a nice try indeed!

  • @suku-j5w
    @suku-j5w Рік тому

    Cool

  • @isheamongus811
    @isheamongus811 Рік тому

    Pass a base64 code to decoder and exec function. B64 code is a string and newlines should be ingnored by decoder

  • @TheDartFrog
    @TheDartFrog Рік тому +4

    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!

    • @evanzhoudev
      @evanzhoudev  Рік тому +1

      Now it’s a 30k view video from a 400 sub channel… that was fast ;)

  • @HzzH-VAL
    @HzzH-VAL Рік тому

    turtle not exist

  • @SHORTPRIDE
    @SHORTPRIDE 10 місяців тому

    Why be a baker if I can code my own donut?

  • @xyssxy
    @xyssxy Рік тому +1

    couldnt you just use exec?

    • @evanzhoudev
      @evanzhoudev  Рік тому

      yes, but that's no fun... I might even call it "cheating"

    • @xyssxy
      @xyssxy Рік тому

      @@evanzhoudev i guess yeah, just thought of that immediately, nice video though

  • @KashTheKingYT
    @KashTheKingYT Рік тому

    420th sub

  • @superNova5837
    @superNova5837 Рік тому

    Someone did this in brainfuck in a geometry dash level
    Aka brainfugd

  • @teknixstuff
    @teknixstuff Рік тому

    Subbed! Hope your channel blows up (maybe mine will someday too)

  • @basicbasedidot2547
    @basicbasedidot2547 Рік тому

    100K+ views and 1K~ subs dang how did that happen lol

  • @Mr-Yuki
    @Mr-Yuki 11 місяців тому

    man, it feels like you got too much time, you good? like really...... do you wanna talk to someone ? (obv joking, nice video!)

  • @ant5389
    @ant5389 Рік тому

    great! now do binary :3

  • @luanon404
    @luanon404 Рік тому

    AI?

  • @twenty48
    @twenty48 Рік тому

    Come back nef

  • @corners1733
    @corners1733 Рік тому

    ahok

  • @aspectreishauntingeurope
    @aspectreishauntingeurope Рік тому +16

    wait did you just take someone else's code and simply formatted it a little bit? this is so clickbaity and lazy...

    • @xClairy
      @xClairy Рік тому +3

      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

    • @aspectreishauntingeurope
      @aspectreishauntingeurope Рік тому +2

      @@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

    • @xClairy
      @xClairy Рік тому +5

      @@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!

    • @aspectreishauntingeurope
      @aspectreishauntingeurope Рік тому +2

      @@xClairy a wonderful day to you too!

    • @evanzhoudev
      @evanzhoudev  Рік тому +6

      It’s not clickbait but it might be lazy, depending on how you see it… trust me though, it wasn’t easy ;)

  • @TG_3W3p
    @TG_3W3p Рік тому

    voice is low

  • @loogoos4894
    @loogoos4894 Рік тому

    Now do it in assembly

    • @evanzhoudev
      @evanzhoudev  Рік тому

      Was planning but don’t think it’s possible? Any idea?

    • @0LoneTech
      @0LoneTech 9 місяців тому

      @@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.

  • @annecarvalho4773
    @annecarvalho4773 Рік тому +1

    I really love this

  • @borisoid
    @borisoid Рік тому +4

    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("..." + "...")

    • @evanzhoudev
      @evanzhoudev  Рік тому +4

      meh that's no fun... I know you can do that, but this is far cooler

    • @borisoid
      @borisoid Рік тому +3

      @@evanzhoudev yeah, i agree. Besides, who needs a donut that's just one color)

  • @Maxim67459
    @Maxim67459 8 місяців тому

    yeah 10 fps

  • @portalboy.
    @portalboy. Рік тому

    Another good video

  • @gustavoh5143
    @gustavoh5143 Рік тому

    The world will become a better place when we destroy everything related to python programming language

  • @hwstar9416
    @hwstar9416 Рік тому

    lower quality software than the original

  • @TuanPlaysMinecraft
    @TuanPlaysMinecraft Рік тому

    Nice vid

  • @DecoyBBQCam
    @DecoyBBQCam Рік тому

    I love this. Wow.

  • @lswsrya49
    @lswsrya49 Рік тому +2

    can u make croissant shape?

    • @evanzhoudev
      @evanzhoudev  Рік тому +1

      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!

  • @vikingthedude
    @vikingthedude Рік тому

    This man is a menace

  • @hd-bild1513
    @hd-bild1513 Рік тому +1

    Time to see if you can wrangle some other absolutely non-reasonable language into doing this. Like Haskell :)

  • @gneryze
    @gneryze Рік тому +1

    what de fak lmao

  • @TheCookingLabs
    @TheCookingLabs Рік тому

    Lol. Bro really spent that much time on a donut 😂. Good

  • @snudget
    @snudget 9 місяців тому

    Now make one that renders it's own code and spins that in 3D