Control Your Dependencies
Vložit
- čas přidán 6. 09. 2024
- Previous Episodes: • Music Visualizer
References:
- Tsoding - Musializer - github.com/tso...
- Raylib - www.raylib.com/
- Miniaudio - miniaud.io/
- nu11 - WIP Works 2016-2022 - / nu11-wip-works-2016-2022
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
- Servers: zap-hosting.co...
Sorry Tsoding, but this project needs npm+asyncify and 500mb of packages, my PR is ready and you can't stop me.
uh oh
I hear villain music
no **closed**
Can you get it merged soon? It's blocking my Rust rewrite PR.
LGTM
I started to learn C around 2 months ago because I kinda want to switch to systems/embedded programming, coming from a background of 5 years working as a webdev (shame on me), and discovering raylib was the best thing that could happen to me, I really learned a lot of how Makefiles work, how linking works, managing libraries, cross-platform compilation, etc. I feel really comfortable with the dev flow of a C project now.
The thing about C dependencies: there are so few of them(STB, Raylib, Sokol, etc) and they are so minimal and neat that you don't need a fricking package manager for C. They are so good you're happy to go dl them and put them in the folder.
And the reason for why these libraries don't really require a package manager is because they're built to be standalone for the most part. Whereas in languages that have package managers as a feature, the culture is very much to introduce a chain of dependencies; to build a dependency they use lots of dependencies that use lots of dependencies and so on without any care in the world. It is quite horrifying what behaviour package managers normalise when it comes to an ecosystem.
Everyone agrees spaghetti code is bad, but dependency hell is just spaghetti code on a module basis, but everyone just accepts it because of convenience.
@@jambalaya974 The culture (aka web dev) is that people after bootcamps (so without any understanding of underlying tech) copy-paste code without any thought. I mean, things like leftpad and isArray exist in npm-ecosystem, it's enough of a proof. Those people not only never read language docs, they don't even stop to think for a second - 'Do I really need to pull hundreds of dependencies to get this to work?'. Not to mention that some of those deps can be malicious.
It's refreshing to see that it can be done "the other way".
@@jambalaya974 C has make and cmake, which are basically just terrible package managers if you think about it.
In languages with a decent package manager, many libraries are designed to work as small parts of many other dependencies. Apart from outrageous compile times (which are not uncommon) you get all the advantages of code reuse and small modules with non of the downsides.
Also, many projects in C have many dependencies. Look at GAP for an example of spaghetti C code with a ton of dependencies.
@@jambalaya974 so your solution is to just not include package manager? it sounds kind of like "let's just not give smartphones to kids" -- it may sound ok, but the result is always garbage. maybe there is a better strategy like reviewing and pruning packages over time, or merging the ones that are downloaded concurrently into a single bundle? i mean, if you need a program to actually work, you will include whatever stupid thing. you cannot write on a short notice linear algebra or statistics or codecs, it requires a serious amount of time and effort, and a thorough knowledge of the subject. this is why, btw, such things exist as several separate packages in the first place.
then there are also proprietary libraries (which in many cases are so hideous, that they can only be fixed by communism)
@@Daniel_Zhu_a6f I did not make a prescriptive statement on whether package managers as a language feature are a necessary evil or not for the time being. Just that they are not ideal and the culture they breed is awful.
To me, Nix is ideal.
I thought this was a video about getting more money back from the tax man for my kids. Now Im hooked on C!
26:25 that Beat is 🔥
Why doesn't Raylib just #define NO_WAV macros etc ONLY when miniaudio's header guard isn't already #defined? Seems like an easy solution to the problem
Looks like we are ALIVE ❤
I had a weird thought regarding plugin functionality. What if you made the buttons themselves loadable as plugins. Say for instance a dynamic library or maybe a scripting language so if recording doesn't work on someone's platform they could rewrite the code and load it once they've repaired it and bingo. It would increase the complexity of the plugin system, but it would be interesting to see someone come up with a filter that could be passed around and loaded up on demand to say make your recording sound like a robot voice, or to invert the colors of the visualizer.
great video, great beatbox 😊
I just wanted to say this video was great. It was a lot better than the last non stream video. Actually excellent. I loved it
habamax is a black magic sleeper cell segway
honey look! tsoding uploaded
What are the benefits of a header-only lib over the same code in separate .c and .h files? I've always considered it to be a gimmick, a-la "Look, my whole library fits in just one file!", but some way more experienced programmers seem to like them a lot, what am I missing?
There's a section explaining this in in the STB repo. Single header isn't the only appeal though, it's also just that other C libraries like libpng are significantly more low level than the API you usually get with single header libraries. Experienced programmers like them because they get you started quickly. You can get a window up or image loaded in just a couple lines of code instead of hundreds and immediately start writing the applications you actually wanted to make. Once your needs become more specific you can either switch to the lower level API that the lib exposes or ditch it entirely for a more robust alternative.
I assume it's just for simplicity, it's easier to move one file around and you don't need to add header files to whatever build system or script you're using
This video reminds me 'debug the debugger' episode. Epic.
depend on your control
Please do more of this kind of videos❤
Looks like we're-- wait what
After you are done with the main functionality, are you going to make a plug-in version of misializer (like .vst or .aex)? I think it would be cool to explore this topic
or CLAP
this thumbnail is fire!!
I'm surprised how Raylib doesn't support audio input. It is useful for chatting and other features.
No, migrate this to Rust, install and compile 500 crates containing 320 different versions of the same duplicate dependencies.
🎵DEEM ©AAAA! 🎵
I believe software in 2024 must run in watch -n 0.5 and my cpu will not even go up by 0.1 degree celsius.
18:18 what if remove `#include "raylib.h"` but not change compiler command?
No asyncifiy?
Упустил немного момент: почему отказываемся от записи вейв файлов через миниаудио, если от целого миниаудио не отказываемся (с девайсом через него работаем)?
01:07:42 did that just change when you unpressed mouse!?
no looks like we're live. my day is ruined
я смотрю тебя уже примерно год, но так и не понял, что значит азузин сешн? (остальное меня не смущает)
Люди не могут прочитать Цодинг, поэтому часто называют меня Зозин :)
@TsodingDaily во дают.
А я думал это твоя фамилия, ан нет, еще один уандерфул сарказм))) Так и слышу каждый раз - "Мистер Азузин" 😂
Alexej are you using Debian?
Maybe nix(nixos) is also a way
Day 10,000 of asking you to do odin
Baj programmer PagMan
1:10:44 Lol Vim's Visual Mode can do that and even more. Can your stinky emacs do that?
he was joking
am i first?
3:38 BSD or gtfo!