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.
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.
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.
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)
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 ❤
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.
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.
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.
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.
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
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 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).
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.
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.
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.
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 ?
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
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
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).
"Remember the code is more scared of you than you are scared of the code" - Zozin 2024
I mean, the code doesn't crash you, you cŕash the code...
Code has crashed me at times 😅
Looks like we're alive.
He is alive and well, active on twitch and discord :D
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.
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.
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
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.
Metatables and coroutines elevates Lua to S-tier power. Also small and fast enough to run on a GameBoy Advance. Love Lua.
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)
that "i can't even spell 'world' anymore, i haven't programmed in C for a while" caught me off guard
The commentary on Stack Overflow alone makes this worth watching.
Starting at about 1:52:10 :-)
I want a full song from "Can you Rust doooo thaaaat ? i don't think soooo"
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 ❤
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.
"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.
Tosding the gordon ramsy of C programming 🤣🤣
Since I'm in my 40s, I too now have a nob.old.
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.
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.
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"
I think Tsoding programs in a Hyperbolic Time Chamber.
17:20 Skia is a giant Google bloatware for drawing shapes that's like 600megs of source
Lol perfect illustration of SO answer
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.
Bro, making a graphics library by raw dogging assembly???? Please stop, you're giving me new nightmares to wake up to
@@kaelanm-s3919 he already did it lol
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
Macro source is as unreadable in C as it is in Rust.
Hi, Panim playlist link broken
Have a nice day
Thank you! Fixed!
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
Is 3b1b parent of R2D2?
Its 3*blue*1*brown* another channel that does explanatory math videos
@@Shywizz www.wikipedia.org/wiki/Joke
@@angelcarubetter response than wooosh
@@oserodal2702the most amazing thing is youtube not obliterating the comment containing a link
And a nephew of 2b2t
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.
It's annoying n slow. Surprisingly cl /analyze is pretty good!
@@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).
@@lordeji655 I agree with you on all points I'm just answering ur question
@@multicoloredwiz AH sorry x)
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.
I like where this is going, tsoding!
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.
New tsoding vid, let’s goooooo!!
Maybe RIIC should become the catch phrase. I think I should start that cult.
the captions seem to be a chat playback for some reason!
Skia is a graphics library from Google, it has a lot of handy bindings ... in Csharp for example ... raylib is way cooler though 🙂
Pog
As the prophecy fortold
Itzzzzz Tshooooding suiiiiiiiiii
Best animation for loot boxes in game 😂
Thank you....
what are programming socks , i had not found them in whole market.
the pascal case function names are so clear, what is this font?
Iosevka
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.
Type aliasing maybe?
I love you.
Why he is manually copy nob from other directory I mean he could use alias for that
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 ?
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
@@yjlom
Yeah that makes sense
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
LOVE YOUR VIDEOS
The Panim Playlist link is not working :(
when Vulkan?
He did a Rust Vulkan stream awhile ago. Quite useful imo
@@wildwestrom I don't care about some smelly bad language
@@UnrealCatDev then why are you watching this video
@@RTZemun yes
Panim couse it written in python
Bruh, what font is this. Sweet
Iosevka
Why captions are just Twitch Chat. Is that a mistake?
No he implemented it himself
No it's tigjt
what do you mean google shitiness
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).
C++ template metaprogramming is the embarassing thing
you say what welcome to ? what
recreational programming session
Great 🎉
WHERE RED CAR???
you mean twitch.tuvalu right? right?