My Own 3b1b Animation Engine but in C

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 104

  • @BboyKeny
    @BboyKeny 6 месяцев назад +220

    "Remember the code is more scared of you than you are scared of the code" - Zozin 2024

    • @no_name4796
      @no_name4796 5 месяцев назад +3

      I mean, the code doesn't crash you, you cŕash the code...

    • @LBCreateSpace
      @LBCreateSpace 3 месяца назад +1

      Code has crashed me at times 😅

  • @Lewdovico
    @Lewdovico 6 месяцев назад +129

    Looks like we're alive.

    • @TheMelopeus
      @TheMelopeus 6 месяцев назад +7

      He is alive and well, active on twitch and discord :D

  • @Daniikk1012
    @Daniikk1012 6 месяцев назад +130

    I think the main reason people love Lua is because of how incredibly simple, yet powerful it is (Same reason people like C, but it's a scripting language, so in a different way).
    The only structural data type in it is a table. Want arrays? Use integers as keys. Want an object? Use field names. Want a dictionary? Use whatever you want as the key.
    Want to access something that doesn't exist? It's nil. Want to delete something? Set it to nil. Applies to both fields in tables and variables.
    The syntax is minimal. No need for semicolons OR newlines, because it is always possible to infer where statement separation occurs. There are only 21 keywords, which is mostly control flow and primitive values.
    Want more power? That's what metatables are for. Use them to add operator overloading to your tables. Or use them to implement inheritance.
    The compiler/interpreter itself is also deliberately simple. It is a single pass compiler, written in pure ANSI C (Except for dynamic linking, but for embedding it is an understandable compromise), very fast and small (One of the fastest scripting languages), because it was designed to be embeddable.

    • @TheDolphiner
      @TheDolphiner 6 месяцев назад +18

      Reading the lua manual really gives the feeling of "we want the most power with the fewest features." It doesn't have traits I look for in a "real" language, but it's inspiring as a different perspective designed with a different use case than the mindset I usually work with.

    • @angryapplebombs914
      @angryapplebombs914 6 месяцев назад +7

      This is actually one of the best comments I’ve read describing why I find Lua so enjoyable thank you for this. I might steal it later

    • @JH-pe3ro
      @JH-pe3ro 6 месяцев назад +7

      I switched over from Lua to Janet recently because it brings the mindset of Lua to a Lisp syntax, without the compromises of Fennel or the baggage of CL/Scheme systems. And it's more fleshed out as a standalone scripting system, which ended up being "bolted on" to Lua with Luarocks, and I've never been happy with how that worked. It takes a little while to get comfortable with the idioms specific to Janet, but I'm finding it cozy enough.
      Edit: Also, if we are after minimalism, Forth is a decent scripting environment for gluing together chunks of assembly, and probably enough for this usecase.

    • @jeremyjurksztowicz6278
      @jeremyjurksztowicz6278 6 месяцев назад +1

      Metatables and coroutines elevates Lua to S-tier power. Also small and fast enough to run on a GameBoy Advance. Love Lua.

    • @no_name4796
      @no_name4796 5 месяцев назад

      Honestly i descovered lua writing my neovim config, and yeah it's a very interesting language.
      It's nice that it's not polluted with 69 ways to do the same thing (cough cough c++ cough cough)

  • @ШамрайВадим-ч9н
    @ШамрайВадим-ч9н 6 месяцев назад +62

    that "i can't even spell 'world' anymore, i haven't programmed in C for a while" caught me off guard

  • @toddkfisher
    @toddkfisher 6 месяцев назад +59

    The commentary on Stack Overflow alone makes this worth watching.

    • @rubenvis6568
      @rubenvis6568 6 месяцев назад +10

      Starting at about 1:52:10 :-)

  • @adampaul7905
    @adampaul7905 6 месяцев назад +33

    I want a full song from "Can you Rust doooo thaaaat ? i don't think soooo"

  • @curious5972
    @curious5972 6 месяцев назад +19

    I made my own engine almost 2 years ago for my grad project. I used ffmpeg and nodejs child process and my own graphics library written in JS. Which gives me a massive success in grad result. Its even 3 times faster than manim ❤

    • @ardnys35
      @ardnys35 6 месяцев назад +4

      hi, i am looking for inspiration for my grad project and this graphic stuff is really interesting.
      how difficult was it and did you do it by yourself or with a group?
      it's hard to find a topic interesting but also not too difficult to scare people away, because we have to do it with a group.

  • @HuntingKingYT
    @HuntingKingYT 6 месяцев назад +11

    "Remember - code is afraid of you more than you are afraid of code" - I really like this quote, until they start using it on dogs.

  • @SaidMetiche-qy9hb
    @SaidMetiche-qy9hb 6 месяцев назад +12

    Tosding the gordon ramsy of C programming 🤣🤣

  • @wernersmidt3298
    @wernersmidt3298 Месяц назад +1

    Since I'm in my 40s, I too now have a nob.old.

  • @AndarManik
    @AndarManik 6 месяцев назад +3

    I'm excited to see what primitives you decide to use. I know that the what makes manim good is the choice of primitives, I'm assuming the same needs to happen with this library considering its a programming viz and not just a viz.

  • @ratchet1freak
    @ratchet1freak 6 месяцев назад +7

    For programming the animation itself maybe an immediate mode style api would be nice. Instead of having to build an array of keyframes. Which are going to be a pain to change on a hot reload. If you don't mind borrowing from sebastian lague's animation setup.
    That is you have a function that gets called every frame and it then does things like float t = interval(a, 5); which returns a value from 0 to 1 depending on where in the animation you are. Then the next time you call interval(a, 3) the effective interval starts after the previous one finished. And it uses the t to render an animation.
    To facilitate this you would need a float animTime; and a float currentTime; in Animation where animTime gets updated based on the input into interval() and currentTime is the time you are visualizing. So the return value becomes return remapAndClamp(currentTime, animTime, animTime + period, 0, 1)
    You can apply ease-in and out on the returned t if needed.

  • @stephanbranczyk8306
    @stephanbranczyk8306 6 месяцев назад +12

    Honestly, AI is not much better. Google's AI would refuse to give information on C/C++ functions to minors because the functions were tagged "unsafe"

  • @_orangutan
    @_orangutan 6 месяцев назад +3

    I think Tsoding programs in a Hyperbolic Time Chamber.

  • @SaidMetiche-qy9hb
    @SaidMetiche-qy9hb 6 месяцев назад +2

    17:20 Skia is a giant Google bloatware for drawing shapes that's like 600megs of source

  • @hieudoan4929
    @hieudoan4929 6 месяцев назад +2

    Lol perfect illustration of SO answer

  • @skilz8098
    @skilz8098 5 месяцев назад

    You can do all of this in Assembly if you know what you are doing. C/C++ just makes assembly much easier and more streamlined as they automate a bunch of repetitive tasks for you behind the scenes. You don't have to setup and tear down all the registers for the stack frame, you don't have to manage the stack pointer for every routine call, you don't have to query or access the hardware or interrupts directly, you don't have to manage the memory at the hardware level and worry about v-table entries, and so on. You don't have to worry about which register your return value is in, checking the flags for the conditions of all of your operations, the branch predictor, etc. Assembly is architect independent, machine specific and isn't really portable. Yet you can still do all of this in Assembly if you know what you are doing. It's not about this language or that, it's about your understanding of the hardware and how the software operates it. At the end of the day, it's a skill issue based on your level of understanding and knowledge of the system you are interfacing with.

    • @kaelanm-s3919
      @kaelanm-s3919 5 месяцев назад +1

      Bro, making a graphics library by raw dogging assembly???? Please stop, you're giving me new nightmares to wake up to

    • @samuelwaller4924
      @samuelwaller4924 16 дней назад

      ​@@kaelanm-s3919 he already did it lol

  • @tianned
    @tianned 6 месяцев назад +3

    38:18 expectation
    38:34 reality
    42:25
    42:32
    Mr Zozins explanations are the best imo, probably would become a great teacher if he wished to

    • @MasterHigure
      @MasterHigure 6 месяцев назад +2

      Macro source is as unreadable in C as it is in Rust.

  • @gg-bt4sp
    @gg-bt4sp 6 месяцев назад +16

    Hi, Panim playlist link broken
    Have a nice day

  • @alexanderkovalev391
    @alexanderkovalev391 6 месяцев назад

    you're actually reinvented erlang's hot code reload approach with your plugin system. take a look at those ideas, it is really cool when the entire system upgrades with no restart

  • @blackhaze3856
    @blackhaze3856 6 месяцев назад +134

    Is 3b1b parent of R2D2?

    • @Shywizz
      @Shywizz 6 месяцев назад +6

      Its 3*blue*1*brown* another channel that does explanatory math videos

    • @angelcaru
      @angelcaru 6 месяцев назад +88

      @@Shywizz www.wikipedia.org/wiki/Joke

    • @oserodal2702
      @oserodal2702 6 месяцев назад +23

      ​@@angelcarubetter response than wooosh

    • @howdoiexitvim-sg2xl
      @howdoiexitvim-sg2xl 6 месяцев назад +22

      ​@@oserodal2702the most amazing thing is youtube not obliterating the comment containing a link

    • @programist2.091
      @programist2.091 6 месяцев назад +14

      And a nephew of 2b2t

  • @lordeji655
    @lordeji655 6 месяцев назад +2

    28:53 I don't know why people ignore the gcc "-fanalyzer" option which gives A LOT more warning and would, for example here, clearly give a warning for a segfault.

    • @multicoloredwiz
      @multicoloredwiz 6 месяцев назад

      It's annoying n slow. Surprisingly cl /analyze is pretty good!

    • @lordeji655
      @lordeji655 6 месяцев назад

      @@multicoloredwiz annoying ? To have warnings that help you not crash your program ?
      And obviously it's slower. It's a tradeoff as always in programming. The most important thing is that you can choose between safety and speed which is the power of C (while rust fans will brag about the safety and then compile for 10min).

    • @multicoloredwiz
      @multicoloredwiz 6 месяцев назад

      @@lordeji655 I agree with you on all points I'm just answering ur question

    • @lordeji655
      @lordeji655 6 месяцев назад

      @@multicoloredwiz AH sorry x)

  • @nashiora
    @nashiora 6 месяцев назад

    If I have to use a dynamic language, for any number of reasons, I'd want it to be Lua. I love it for the semantics, definitely not the syntax haha. Otherwise, yes I'd also prefer statically typed compiled languages.

  • @chillydill4703
    @chillydill4703 6 месяцев назад

    I like where this is going, tsoding!

  • @minirop
    @minirop 5 месяцев назад

    the *worst* part of function pointer declaration is that it was done "on purpose". there is a special case in the parser to handle that ugly syntax IIRC.

  • @zeusdeux
    @zeusdeux 6 месяцев назад +4

    New tsoding vid, let’s goooooo!!

  • @anon_y_mousse
    @anon_y_mousse 6 месяцев назад

    Maybe RIIC should become the catch phrase. I think I should start that cult.

  • @shoofle
    @shoofle 6 месяцев назад

    the captions seem to be a chat playback for some reason!

  • @suvetar
    @suvetar 6 месяцев назад

    Skia is a graphics library from Google, it has a lot of handy bindings ... in Csharp for example ... raylib is way cooler though 🙂

  • @nyyakko
    @nyyakko 6 месяцев назад +4

    Pog

  • @mihailazar2487
    @mihailazar2487 6 месяцев назад

    As the prophecy fortold

  • @sudoupdate
    @sudoupdate 6 месяцев назад

    Itzzzzz Tshooooding suiiiiiiiiii

  • @АлександрС-д1т
    @АлександрС-д1т 6 месяцев назад

    Best animation for loot boxes in game 😂

  • @hubstrangers3450
    @hubstrangers3450 6 месяцев назад

    Thank you....

  • @BolasDear
    @BolasDear 6 месяцев назад

    what are programming socks , i had not found them in whole market.

  • @hamed9327
    @hamed9327 6 месяцев назад +1

    the pascal case function names are so clear, what is this font?

  • @aniketbisht2823
    @aniketbisht2823 6 месяцев назад

    2:02:53 Why do you use memset/memcpy for struct instead of assignment? Is this a C thing? I think C does support struct assignment. As a C++ programmer, this is absolutely bizarre.

  • @bufferc6362
    @bufferc6362 6 месяцев назад +8

    I love you.

  • @amritpal1418
    @amritpal1418 3 месяца назад

    Why he is manually copy nob from other directory I mean he could use alias for that

  • @kerowagdy9417
    @kerowagdy9417 6 месяцев назад

    How is Twitch Chat caption even possible? 🤔
    I haven't uploaded a single video on yt so it might be easy. Is it that you can export stream chat as transcript ?

    • @yjlom
      @yjlom 6 месяцев назад +2

      you can read the chat with the API, so it should just be a matter of storing the comments with their timestamps and then converting that to a transcript track

    • @kerowagdy9417
      @kerowagdy9417 6 месяцев назад

      @@yjlom
      Yeah that makes sense

  • @skilz8098
    @skilz8098 5 месяцев назад

    I couldn't stop laughing at about @1:30:40 in the video, I could hear the perfect background song starting to play in the back of my mind... ruclips.net/video/EYb84BDMbi0/видео.html

  • @AlmogD
    @AlmogD 6 месяцев назад +2

    LOVE YOUR VIDEOS
    The Panim Playlist link is not working :(

  • @UnrealCatDev
    @UnrealCatDev 6 месяцев назад +4

    when Vulkan?

    • @wildwestrom
      @wildwestrom 6 месяцев назад +3

      He did a Rust Vulkan stream awhile ago. Quite useful imo

    • @UnrealCatDev
      @UnrealCatDev 6 месяцев назад +1

      @@wildwestrom I don't care about some smelly bad language

    • @bhavyakukkar
      @bhavyakukkar 6 месяцев назад +2

      ​@@UnrealCatDev then why are you watching this video

    • @UnrealCatDev
      @UnrealCatDev 6 месяцев назад +1

      @@RTZemun yes

  • @mil_klover375
    @mil_klover375 27 дней назад

    Panim couse it written in python

  • @GajanandamaniAdhikari
    @GajanandamaniAdhikari 6 месяцев назад

    Bruh, what font is this. Sweet

  • @KnightOfEvil
    @KnightOfEvil 6 месяцев назад

    Why captions are just Twitch Chat. Is that a mistake?

  • @tiwanndev
    @tiwanndev 6 месяцев назад

    what do you mean google shitiness

  • @aniketbisht2823
    @aniketbisht2823 6 месяцев назад +1

    Seeing you use macros all over the place gives me aneurysms, as a C++ programmer. I guess this is what "production" C looks like because you need generics and meta-programming in large projects. In C++ using templates (with concepts) and function overloading helps you achieve this (along with little bit of constexpr).
    You said you are not a fan of "dynamic" languages. Here C is no better than those dynamic languages. Whereas in C++ most (generic programming) errors would be caught at compile time and the usage of static_asserts and concepts make those errors easy to reason about.
    44:04 It's embarrassing to see this dude. This function macro, in C++, could have been a simple function template (with appropriate constraints).

    • @monad_tcp
      @monad_tcp 6 месяцев назад +3

      C++ template metaprogramming is the embarassing thing

  • @Phoenix4_Trade
    @Phoenix4_Trade 6 месяцев назад +1

    you say what welcome to ? what

    • @AnksioXD
      @AnksioXD 6 месяцев назад +15

      recreational programming session

  • @DanelonNicolas
    @DanelonNicolas 6 месяцев назад

    Great 🎉

  • @D-V-O-R-A-K
    @D-V-O-R-A-K 6 месяцев назад

    WHERE RED CAR???

  • @dorktales254
    @dorktales254 6 месяцев назад +1

    you mean twitch.tuvalu right? right?