How I Stopped Caring and Just Improved My Project (Nob Ep.01)

  Рет қаралды 42,746

Tsoding Daily

Tsoding Daily

Күн бұрын

Previous Episodes: • Music Visualizer
Chapters:
- 0:00:00 - Announcement
- 0:00:47 - Intro
- 0:05:04 - Hallucinating API
- 0:31:41 - Making the Code Compilable
- 0:40:00 - cmd_append
- 0:49:29 - cmd_run 1
- 0:51:20 - cmd_render
- 1:16:25 - cmd_run 2
- 1:33:17 - Windows Build
- 1:48:14 - Outro
References:
- Tsoding - nobuild - github.com/tsoding/nobuild
- Tsoding - musializer - github.com/tsoding/musializer
Socials:
- Twitch: / tsoding
- Twitter: / tsoding
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9

Пікірлер: 134
@charfractal9441
@charfractal9441 8 ай бұрын
i am extremely happy that a person like you exists , and does these videos , your videos and personality has been inspiring .
@Anubis_moe
@Anubis_moe 8 ай бұрын
Amazing true programmer
@TeamUnpro
@TeamUnpro 6 ай бұрын
yeah its strange, like when you start getting burnt out videos / channels like these remove that burnout
@__someone__3141
@__someone__3141 4 ай бұрын
for real @@TeamUnpro
@liquidsnake6879
@liquidsnake6879 3 ай бұрын
It's not like there's a lot more to do in Russia, if i lived in Russia i'd probably just code for fun as well forget going outside where it's -30 degrees or something
@mxjeonsg
@mxjeonsg 8 ай бұрын
Nothing better than finishing school and eat watching your sessions.
@0ia
@0ia 8 ай бұрын
Haha! I remember eat-watching in the past, it brought joy to my monkey-brain ;) Fun!
@batlin
@batlin 8 ай бұрын
Projects like this are a reminder from Tsoding to us programmers who have been worn down by industry that creativity is important and valuable, even if you're often limited in how creative you can be at most companies.
@rolandinnamorato1953
@rolandinnamorato1953 8 ай бұрын
The soulful man marches on
@ocaly
@ocaly 8 ай бұрын
Haven't seen it yet but just wanted to say: dont let anyone get into your head, they can criticize, whine, do whatever they want, except verbally attack you. There's a fine line between those.
@ocaly
@ocaly 7 ай бұрын
Meant to imply 'whatever' in the verbal sense
@ecosta
@ecosta 8 ай бұрын
The idea of writing code for myself always has that "am-I-crazy" feeling attached. Hearing good engineers saying that out loud helps me keeping my sanity. Thanks for the good work!
@foggy7595
@foggy7595 7 ай бұрын
Probably are, fuck it lol.
@sairohit8201
@sairohit8201 5 ай бұрын
totally relatable, i have totally automated a build process while i was working a little bit on reverse engineering android apps , i felt a lot of times why am i even writing these things but at the end i did it anyway and it was a great experience and got to know recently that whatever we learn will never go to waste or anything. WE SHOULD ALWAYS KEEP LEARNING.
@driden1987
@driden1987 8 ай бұрын
The design is so simple yet effective! I work using gradle and don't understand everything it does and I'm probably only using 1% of the features.
@iamdozerq
@iamdozerq 8 ай бұрын
It's awesome how easily you can embarrass programmer with this shit. Why on the fuck you should use ANOTHER language to even run program on your language? Can you use ONE ANOTHER language to run build system language to run your code? What even a point to it? Wtf is going on generally with this? I use maven and gradle with groovy and kotlin for 3 last small pet-projects and spend time with them more than actual programming of what i want. Not a single one of them makes sense.
@NikolaNevenov86
@NikolaNevenov86 8 ай бұрын
Just watched the intro to 20min mark. When I first started with C about 2+ years a go, that's the thing I hated the most...having to learn Make. Once I realized Make is just compiling a string and executing that string as a command I asked myself "Ok..can't I do the same in python and not struggle with this shit"(because even now Make has some weird logic where you have to struggle to resolve dependencies with different pattern folders). Ended up making a compiler in python and even had the thing check for changed dependency files so it recompiles them. But I gave up on that project because people kept saying it won't be as fast as Make since it's single threaded and Make has multithreading and stuff...so it's fast. So I'm really happy you started doing this in C!
@mattewlefty991
@mattewlefty991 8 ай бұрын
Do you have a github to see the project?
@NikolaNevenov86
@NikolaNevenov86 8 ай бұрын
@@mattewlefty991 sadly no...I think I even deleted the python file once I got the makefile thing figured.
@user-yc1ke9bc6v
@user-yc1ke9bc6v 8 ай бұрын
I like watching your videos even if I do not understang (almost) anything about C. :) I would really love watching a playlist of a C course from you!
@jasonqorbin587
@jasonqorbin587 7 ай бұрын
I am trying to learn CMake yet again and the absurdity of it is now dawning on me. Now that I have an understanding of what it's actually doing (thanks to you) I keep asking myself "Why do I even need this build tool?" Thanks for enlightening me.
@bigyang5847
@bigyang5847 8 ай бұрын
Library doesn't exist? Pff, we'll compile it anyway! Thanks for showing us how to do it!
@mattanimation
@mattanimation 8 ай бұрын
"when did non-existence of library actually stop me from using it?" great question 😆
@gesuchter
@gesuchter 8 ай бұрын
What kind of keyboard do you use (and if it's mechanical, what kind of switches are you using, how do you like these switches?)
@RadicalGaming1000
@RadicalGaming1000 4 ай бұрын
The part starting around the 18 minute mark was what I needed to hear. Thank you
@FDominicus
@FDominicus 8 ай бұрын
I really like this video, well done!
@dickpiano1802
@dickpiano1802 8 ай бұрын
Tsoding, you are the best!
@leonardocaetano6307
@leonardocaetano6307 8 ай бұрын
This is a cool project, actually. I hate dealing with build tools, I use shell scripts and considered it the most clean way to do it, but yours seems to be even more cleaner.
@theevilcottonball
@theevilcottonball 8 ай бұрын
Since the variadic argument types are homogenous you can do this: #define cmd_append(command, ...) _cmd_append(command, sizeof((char*[]){__VA_ARGS__})/sizeof(char*), (char*[]){__VA_ARGS__}) void _cmd_append(cmd* commmand, size_t length, char* strs[]) { for (size_t i = 0; i < length; i++) { // do something with strs[i] } } You get some type-safety and you do not need a sentinel, but most importantly there is no need to remember whether it is va_start or va_begin.
@orizach01
@orizach01 8 ай бұрын
is porth dead? or are you planning to return to it in the future? I think doing some AOC in porth would be fun
@iamdozerq
@iamdozerq 8 ай бұрын
Epic journey!
@BeholdTheDevil
@BeholdTheDevil 3 ай бұрын
"If you don't like the C way of programming. Fucking skill issue, don't use this shit, go use Gradle or Maven..." New favorite quote acquired, might put it on my wall
@rogo7330
@rogo7330 8 ай бұрын
I programmed once in Warcraft 3 pre-lua language. It's funny thing very similar to very old C, you even need to first define everything in function and then goes all the code. Also all its functions for Warcraft 3 leking everywhere and has stupid limits that you still can bypass (like search objects in the area, if Im not mistaken).
@azergante8268
@azergante8268 8 ай бұрын
Funny thing you pick on rust, you might still get inspired by the following: - the Command implementation in the Rust standard lib (similar to your Cmd) - the cc crate that is used to build & link against c or c++ libraries (rust already supports building rust project in rust by via build files)
@JasonShi-xc7nu
@JasonShi-xc7nu 8 ай бұрын
I love this man
@user-sb5vt8iy5q
@user-sb5vt8iy5q 8 ай бұрын
You said your first language was Warcraft 3 map language? I still sometimes play the classic one to this day (none of that reforged bullshit), and I'm wondering if you have any of your warcraft 3 projects somewhere?
@efkastner
@efkastner 8 ай бұрын
“Api-first” is how I’ve done things for decades. Like you said, how can you know how it feels without “using” it first. I really really like re-framing it like chatgpt hallucinations!
@goranceurukic8185
@goranceurukic8185 8 ай бұрын
for some reason i love your humour
@azergante8268
@azergante8268 8 ай бұрын
cool project! FWIW I think using plain C is better than trying to imitate bash. More generally I am wary of DSL tools, they force you to install something, learn a whole new syntax and then work against you as soon as you need to do something a bit complex.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
I often use that same development technique myself. I'll write the outline for something and when I need a function I'll just use it and worry about implementing it later.
@azergante8268
@azergante8268 8 ай бұрын
How about porting Redis to nob, or some other big project as a challenge to see if the approach scales?
@TsodingDaily
@TsodingDaily 8 ай бұрын
I actually just ported Raylib to nob. But Raylib is a relatively simple project. I'll think about Redis, thanks!
@RuslanKovtun
@RuslanKovtun 8 ай бұрын
7:18 - you can always use variadic arguments to do this for you, when you need to add more than one argument at a time
@----__---
@----__--- 8 ай бұрын
wow who would have guessed
@TsodingDaily
@TsodingDaily 8 ай бұрын
@@----__--- The least obnoxious backseater xD
@RandomGeometryDashStuff
@RandomGeometryDashStuff 8 ай бұрын
how can c function know how many variadic args passed? edit: 35:34
@RickeyBowers
@RickeyBowers 8 ай бұрын
@@RandomGeometryDashStuff There are many ways: it could be constant at compile-time; use a sentinel; start and end pointer; or pass a count.
@RandomGeometryDashStuff
@RandomGeometryDashStuff 8 ай бұрын
@@RickeyBowers>constant at compile time isn't that just a non-variadic function?
@aemogie
@aemogie 8 ай бұрын
name it knob - idk what it could mean tho, but maybe - kooler nobuild, kind nobuild, knightly nobuild, or my personal favourite kissable nobuild. (adjectives powered by chatgpt)
@Peewma
@Peewma 8 ай бұрын
holy based tsoding unlocked
@mynarco_yoyo
@mynarco_yoyo 8 ай бұрын
hello tsoding, good stream!
@arcxm
@arcxm 8 ай бұрын
56:16 next project: Tsoding's libc? :)
@kristoff_t2013
@kristoff_t2013 8 ай бұрын
On windows, the gcc executable is in the bin folder of mingw. So if I add it to the path variable, i just need to write "gcc". On linux I added an alias in my bashrc, so I don't have to write it out.
@Radgerayden-ist
@Radgerayden-ist 8 ай бұрын
If you install msys2 with scoop it's all taken care of for you, just type mingw to get into the appropriate shell
@ChaotikmindSrc
@ChaotikmindSrc 8 ай бұрын
use clang !!!!!
@delian66
@delian66 7 ай бұрын
@@ChaotikmindSrc why?
@ChaotikmindSrc
@ChaotikmindSrc 7 ай бұрын
@@delian66 Can cross compile without any hassle , very good error messages (ggc improved a lot lately tho), also one very important thing is to allow some stuff that is considered UB but always has worked correctly in the past (access to unions for one, but there is many more), gcc in that regards is extremely aggressive, completely removing UB code
@ThaLiquidEdit
@ThaLiquidEdit 8 ай бұрын
What's the terminal font? Looks very readable, would also like to use it.
@Peewma
@Peewma 8 ай бұрын
iosevka
@cheebadigga4092
@cheebadigga4092 8 ай бұрын
Exactly!
@mithrandirek1813
@mithrandirek1813 8 ай бұрын
Привет Tsoding! Libc implements obstacks, which are basically dynamic arenas, usefull for growing objects. So they can be used both for arena style allocations or as a dynamic array for your growing structures. They are also tunable and optimized, not like your naive implementations. All things said, I like that you show these ideas and implementations so that other devs get their things togeher! Желаю удачи в дальнейшем, твое творчество мне помогает справляться с дермокодом, который заставляют писать в универе! P.S. If you don't like stdargs, just write your own)
@andresconrado
@andresconrado 8 ай бұрын
Bro, I don´t care how slavic you are, you can't just drop a word like дермокодом and walk away. I need more information. What the actual fuck.
@joshuadonahue5871
@joshuadonahue5871 8 ай бұрын
re: rant at 17:00, Casey Muratori is always harping on this. WRITE THE USAGE CODE FIRST!
@jamesnewman9547
@jamesnewman9547 8 ай бұрын
Well tsoding, if we're including the scripting languages of games - then mine might be startcraft and warcraft III also. Hard to say, because I also messed with some MUDs around that time in VB4 (pirated from early limewire, and 6 was already standard at the time).
@kurtmayer2041
@kurtmayer2041 8 ай бұрын
tsoding: "you shouldn't need a build system" me: "i don't like having to call gcc myself, so i configured make to work anywhere without a makefile"
@remondrk
@remondrk 8 ай бұрын
4:20 based
@myfavouritecolorisgreen
@myfavouritecolorisgreen 8 ай бұрын
how does one even reach this level of profound depth in programming (and C) apart from the obvious passion and years he has put in?
@shubhampawar7921
@shubhampawar7921 8 ай бұрын
For me, I always refer macros from dk window manager, they already have macros for forEach, filter, etc. Makes C look like "modern".
@LyndonWright
@LyndonWright 7 ай бұрын
Would it not be easier to just use a string cmd_append(&cmd, "-o musializer"); why type all the extra "-o", "musializer" saves all problems with multiple arguments cmd_append function later... (I know you will have a good answer!) Your coding is truly inspirational....
@alexs6986
@alexs6986 8 ай бұрын
Have you watched Tom Scotts video 'Why are adverts so loud?' I wonder how much normalizing the audio via LUFS would affect the musializer.
@ImPresSiveXD
@ImPresSiveXD 3 ай бұрын
can you do a tutorial on how to organize your code as a beginner? For me it was hard to follow how you jumped from file to file.
@test-rj2vl
@test-rj2vl 2 ай бұрын
39:16 can you explain this how your code compiled without library?
@ppvan
@ppvan 8 ай бұрын
why you use clang instead of gcc?
@Lars-ce4rd
@Lars-ce4rd 20 күн бұрын
I love the idea of doing an entire rewrite with the only intention of not giving a shit about the user lol
@matthias916
@matthias916 8 ай бұрын
love how you're basically complaining how c doesn't support oop lol, love the videos, keep it up
@afmikasenpai
@afmikasenpai 28 күн бұрын
3:11 simply based
@Mozartenhimer
@Mozartenhimer 8 ай бұрын
This is making me want to use nobuild. So refreshing not having she'll crap.
@ZoraAlven
@ZoraAlven 8 ай бұрын
I am literally applauding on 4:20, THATS HOW BACK TO SANITY LOOKS LIKE HATERS
@TurtleKwitty
@TurtleKwitty 8 ай бұрын
You nkow you could just... make a library and include it in stuff right ?
@helloworld7796
@helloworld7796 8 ай бұрын
I watch your channel, just to remind myself after 15+ yrs of web development, I still don't know **it. :D
@rupen42
@rupen42 8 ай бұрын
33:23 wow I never noticed your videos are edited. Must be a lot of work to go through such long vods. I wonder what got cut there
@TsodingDaily
@TsodingDaily 8 ай бұрын
I think I got distracted by the neighbors making noises. I felt that it kind of ruined the pacing. Might've actually left it in.
@rupen42
@rupen42 8 ай бұрын
@@TsodingDaily it's a really good cut! I wouldn't have noticed it without the camera, probably.
@john.darksoul
@john.darksoul 5 ай бұрын
37:00 In a similar situation I created an array literal from __VA_ARGS__ and passed it to a function along with its length (sizeof(arr) / sizeof(*arr)) 🙃
@shakkar23
@shakkar23 8 ай бұрын
why do you do while(0) in some of your macros?
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
It's a do{}while loop. The 0 condition means it will only execute once.
@vmbinary
@vmbinary 8 ай бұрын
Cool
@Sayan_Shankhari
@Sayan_Shankhari 3 ай бұрын
42:12 you are correct
@homelessrobot
@homelessrobot 7 ай бұрын
saying c and c++ are the same language is like telling your dear sweet mother you got her a vacuum cleaner, a frying pan, and a new dresser for her birthday to put all of your freshly pressed laundry into after she is done vacuuming, cooking for you, and washing your clothes.
@keldwikchaldain9545
@keldwikchaldain9545 3 ай бұрын
I agree end's opposite is begin, as a native speaker.
@AlguienMas555
@AlguienMas555 8 ай бұрын
Jajajaja, how many persons say anything whithout see what they do for themself? Who cares whether you do for you or for teach, is your election. I am happy that persons like you do this kind of content
@claudiusraphael9423
@claudiusraphael9423 7 ай бұрын
20 minutes in and already laughing my ass off .. Nice job! I mean i'm just here for the coding. Yes, right. Truth.
@sportsnow8729
@sportsnow8729 3 ай бұрын
Better yet make it a C library too and allow a program to dynamically build itself
@SP-st6tv
@SP-st6tv 11 күн бұрын
finally I met a brilliant
@antonsimkin
@antonsimkin 8 ай бұрын
thats me on 1:46:18 😎
@TsodingDaily
@TsodingDaily 8 ай бұрын
Yoooo! How is your project doing?
@antonsimkin
@antonsimkin 8 ай бұрын
@@TsodingDaily pretty good, doing my sweet sweet refactoring, hows yours?
@TsodingDaily
@TsodingDaily 8 ай бұрын
Eh, I wish I had more time to work on them. Have to edit the VODs instead. :D
@saidultima
@saidultima 8 ай бұрын
better than CMake lol
@cold_fruit
@cold_fruit 6 ай бұрын
When you realise how C works "under the hood", the varargs stuff makes a lot more sense. Arguments are pushed onto the stack by the caller, and then popped by the callee. va_arg() is basically just a `pop` instruction with type punning (although it's probably implemented as a SP dereference instead). The compiler is "getting out of the way" and letting you access the raw variadic nature of the C calling convention. Of course one could dream up much smarter ways to handle variadic arguments that are more "user friendly", but C is intended to be computer friendly - not human friendly!
@user-ux2kk5vp7m
@user-ux2kk5vp7m 6 ай бұрын
> but C is intended to be computer friendly - not human friendly! uh, no it’s not. C was made to be human friendly, it just so happened that this is what we called human friendly 50 years ago, because 50 years ago the guys that made C were low-level people that liked low-level things.
@veranovus
@veranovus 8 ай бұрын
How about calling the library `no` then you can actually say its full name is no build system.
@zahash1045
@zahash1045 8 ай бұрын
Naaah.... he definitely smoked something before the stream
@nage7447
@nage7447 8 ай бұрын
да форыч !
@mbotegichango5207
@mbotegichango5207 8 ай бұрын
THANK YOU! It's open source so if you don't like it, fork it or use something else
@cagatayguzgun3175
@cagatayguzgun3175 8 ай бұрын
Fake the library till you make the library :D
@fishsayhelo9872
@fishsayhelo9872 8 ай бұрын
vury ged
@Lars-ce4rd
@Lars-ce4rd 20 күн бұрын
I don't know, you C enthusiasts seem to have a lot of problems that I easily solve by installing 9000 dependencies in my beautiful nodejs application that I update three times a day (not adding features, just to continue being able to build it).
@varshneydevansh
@varshneydevansh 8 ай бұрын
Zeroth 🎉😂
@monad_tcp
@monad_tcp 6 ай бұрын
can you fix web development so it doesn't suck anymore
@bladman9700
@bladman9700 22 күн бұрын
16:57
@lrdass
@lrdass 6 ай бұрын
hey tsodin.. all of the sudden telling me to go >use maven you could just tell me to f*** myself chill dude
@grincha09
@grincha09 8 ай бұрын
dlbon
@issussov
@issussov 8 ай бұрын
How cool is it to be the bully in a youtube 2h recording? It must be hard.
@developerdeveloper67
@developerdeveloper67 8 ай бұрын
You should never have cared to begin with. Conventions are for mid devs who care about "clean code" 😂
@AdventuresOfPepero
@AdventuresOfPepero 7 ай бұрын
8:08 don't give a shit about other people opinions.
@rogo7330
@rogo7330 8 ай бұрын
апенд
@herrdingenz6295
@herrdingenz6295 8 ай бұрын
why are you always trying to re-invent the wheel?
@TsodingDaily
@TsodingDaily 8 ай бұрын
Cause the wooden one those mfs invented thousands of years ago sucks when you want to travel actually long distances.
@Jakub7
@Jakub7 8 ай бұрын
because he's based
@ax13h
@ax13h 8 ай бұрын
Every car you see on the road 're-invented the wheel' as part of designing its literal road wheels. It's a natural result of evolving techniques and requirements.
@williamanthony7224
@williamanthony7224 8 ай бұрын
You should always try and recreate tools you use everyday to get an appreciation of what they are actually doing and how they work. If even a few ‘React developers’ tried to write react themselves as en experiment the web would be a better place. Maybe you should try it
@freemasry-gr8hw
@freemasry-gr8hw 8 ай бұрын
I hate this, and it seems there is alot of a$$holes saying it on the internet for anyone who is actually doing something in his life when they are just sitting ranting about others and produce nothing because they have a skill issue.
@abdwyer
@abdwyer 8 ай бұрын
New C (23) feature that is hopefully gonna be cool: embed!!! I want it NOW.
@theevilcottonball
@theevilcottonball 8 ай бұрын
Best one in C23.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
Now that I've woken up and watched the whole video, I just have one additional note. If you wanted to check for naughty characters: if ( strpbrk( cmd, naughty_list ) != NULL ) { /* wrap stuff in quotes */ } // Although I must admit that if the arguments to a variadic function are going to be all one type, the cast of __VA_ARGS__ to a type[] is definitely my preferred method. I usually avoid variadic functions and macros, but when they're the same type it's not so bad.
@fhools
@fhools 5 ай бұрын
you just invented hallucination-driven-programming. write the code using an API you hallucinated that you have, pray a better version of you can implement the hallunicated code
Military Grade Build Tool for C (Nob Ep.02)
2:06:50
Tsoding Daily
Рет қаралды 27 М.
Reverse Engineering Data Files
1:59:16
Tsoding Daily
Рет қаралды 37 М.
where is the ball to play this?😳⚽
00:13
LOL
Рет қаралды 13 МЛН
ISSEI funny story😂😂😂Strange World | Pink with inoCat
00:36
ISSEI / いっせい
Рет қаралды 29 МЛН
How I learned to love build systems
16:31
fasterthanlime
Рет қаралды 129 М.
the new PS4 jailbreak is sort of hilarious
12:21
Low Level Learning
Рет қаралды 53 М.
Ok I tried Tree-sitter! Here is what I think about it...
1:56:47
Tsoding Daily
Рет қаралды 48 М.
fixing my old game engine that apparently doesn't work
13:56
The Cherno
Рет қаралды 74 М.
Will Ada Replace C/C++?
44:57
Tsoding
Рет қаралды 68 М.
I fixed Lua
2:16:48
Tsoding Daily
Рет қаралды 42 М.
Unreasonably Easy Console Apps in Rust
1:54:16
Tsoding Daily
Рет қаралды 87 М.
Let's Talk About Functional Programming
1:47:07
Tsoding Daily
Рет қаралды 64 М.
The standard library now has all you need for advanced routing in Go.
13:52
You don't need Generics in C
1:37:38
Tsoding Daily
Рет қаралды 55 М.
How about that uh?😎 #sneakers #airpods
0:13
Side Sphere
Рет қаралды 9 МЛН
3D printed Nintendo Switch Game Carousel
0:14
Bambu Lab
Рет қаралды 2,5 МЛН
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Рет қаралды 3,6 МЛН
Что еще за обходная зарядка?
0:30
Не шарю!
Рет қаралды 2,1 МЛН