I liked Raylib better than SDL (ML in C Ep.05)

Ғылым және технология

Previous Episodes: • Machine Learning in C
Chapters:
- Coming Soon...
References:
- nn.h: github.com/tsoding/nn.h
- raylib: www.raylib.com/
- Some AI format: onnx.ai/
- Text Editor in Jai: github.com/focus-editor/focus
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9

Пікірлер: 82

  • @raylibtech
    @raylibtech Жыл бұрын

    Hey! Very nice session! I enjoyed it a lot! Glad you enjoyed raylib! 😄

  • @hamzadlm6625

    @hamzadlm6625

    Жыл бұрын

    fantastic lib! I started enjoying it too making particle simulations in Go

  • @bernardoramirez1759

    @bernardoramirez1759

    Жыл бұрын

    Was CLITERAL actually intentional? Lmao

  • @CardfightVanja
    @CardfightVanja Жыл бұрын

    When you find the CLITERAL

  • @adamm450
    @adamm450 Жыл бұрын

    everyone else: make sure to prefex a function not to pollute the namespace based raylib: #define RED

  • @sikailud

    @sikailud

    Жыл бұрын

    #define int unsigned char // everybody go back 60year

  • @tsunami870

    @tsunami870

    Жыл бұрын

    #define true false

  • @tsunami870

    @tsunami870

    Жыл бұрын

    @@totheknee bro what

  • @Djellowman

    @Djellowman

    Жыл бұрын

    @@tsunami870 no oop allowed

  • @homelessrobot

    @homelessrobot

    10 ай бұрын

    #define while(x) (exit(x))

  • @someunusualgames
    @someunusualgames Жыл бұрын

    14:30 raylib is in PascalCase because, according to raysan, it's inspired by a C# framework called XNA, and also because it was made as a teaching tool, it was clearer for his alumni to write the functions name without prefixes. Really cool to see raylib getting love, I love to use it to make little games and it's way easier to work with than SDL :)

  • @raylibtech

    @raylibtech

    Жыл бұрын

    Yeap, that's it! Actually, it was used to teach programming basics before jumping to XNA/MonoGame and follow with Unity. Using that syntax was the easiest way to follow all the subjects for the students. Also, I never expected raylib would become so popular... it was a weekend project that has lasted for 10 years now! 😅

  • @seggsfault
    @seggsfault Жыл бұрын

    Hello dear tsoding, Keep what you are doing, you are an inspiration to many ❤

  • @anon_y_mousse
    @anon_y_mousse Жыл бұрын

    I like that you optimized the memory allocations for the input and output matrices into one single allocation. It almost feels like you read my comment on that from the prior video. That error message with the semicolon is kind of a holdover from the c89 days when programmers would just declare variables that were default int with their name and a semicolon. Since you hadn't included the correct header it assumed uint64_t was a variable name and was expecting a semicolon following it. Although I suspect you knew that already, this might help the possibly one person who reads my comment.

  • @NuclearShadowYT
    @NuclearShadowYT Жыл бұрын

    Yes I also like raylib more than sdl

  • @sirynka
    @sirynka Жыл бұрын

    In case if you read youtube comments. n+1 threads could be to fully saturate the cpu in case of some sort of bottlenecks (like io operations) But it's just a theory and I have not benchmarked it on the real projects or investigated any further. Just the first thing that has come to my mind.

  • @empireempire3545
    @empireempire3545 Жыл бұрын

    I hope you'll make a stream/video with the continuation in pthreads. I'm massive Raylib fan and i did kinda similar stuff to what you did here - molecular dynamics simulation with live visualization of the components of the energy function (potential, kinetic...). Love this, please keep it up!

  • @diegorocha2186
    @diegorocha2186 Жыл бұрын

    I think even in real life our learn rate is like this one when we are learning something new. Pretty cool stream as usual mr Zozen!!!

  • @TheBigLou13
    @TheBigLou13 Жыл бұрын

    does it generate further knowledge and inside to reorder the hidden layer by emerging color? (keeping all their weight/bias connections intact, by reordering them as well)

  • @koktszfung
    @koktszfung Жыл бұрын

    I think the jumps are intrinsic to the cost function. It is like rolling down a hill, the path depends on the hill and where you start.

  • @ikeofili355
    @ikeofili355 Жыл бұрын

    You have a few typos when saving and loading the matrix. For mat_save, the second fwrite in the for loop should be `fwrite(&MAT_AT(m, i, 0) + n, ...)` not `fwrite(m.es + n, ...)` since you changed it to allow for the stride. For mat_load, they typo is in the same while loop but this time you have `fwrite(m.es, sizeof(*m.es) + n,...)` but it should be `fwrite(m.es + n, sizeof(*m.es),...)` Howeverrrr, you don't even need to do any of that because you do not need to keep on trying fread or fwrite if they fail since they are all or nothing type of functions. That is, if fread fails, then either EOF was reached before the required bytes were read, or some IO error occurred. Neither of those can be fixed by trying again. Same with fwrite. It can only fail if some IO error occurs (maybe you only opened it for reading), or you ran out of space on disk. Again, they can't be fixed by trying again. That is why you didn't see any errors and did not notice these typos: your line of execution never gets there since you read and/or write everything first try. I really hope you see this

  • @D_VAULTZ
    @D_VAULTZ Жыл бұрын

    you are the king, Tso-ding. Hilarious monologue. I am surprised youre not creating some pompous terminology for us to endure! You are perfectly well suited to it ;)

  • @D_VAULTZ

    @D_VAULTZ

    Жыл бұрын

    i would just do this with GDI+ in windows

  • @anon_y_mousse

    @anon_y_mousse

    Жыл бұрын

    @@D_VAULTZ But then it wouldn't be easily portable to other platforms. Third party open source library means write once, compile anywhere.

  • @hamzadlm6625
    @hamzadlm6625 Жыл бұрын

    I would love to see tsoding doing some protein folding stuff

  • @sikailud
    @sikailud Жыл бұрын

    I would love to see you make your own version control system (tscm

  • @Pi7on
    @Pi7on Жыл бұрын

    What an incredible series

  • @Venganza_
    @Venganza_ Жыл бұрын

    1:37:00 tsoding, briefly: "hmm thats good but 8 bytes seems too large" tsoding in episode one after writing the code to allocate memory for the neural network: "chat why are you guys saying i need to deallocate memory? its 2023 the operating system can just deal with it for me"

  • @saiprasadhakki9189
    @saiprasadhakki91899 ай бұрын

    Does creating an environment script for your build increase cross compatibility of software across different platforms?

  • @marcmichel8855
    @marcmichel8855 Жыл бұрын

    Some alternatives to C: look for C2lang, C3lang or betterC

  • @strange_man
    @strange_man Жыл бұрын

    i dont know what is he doing. but he is doing it good.

  • @sirynka
    @sirynka Жыл бұрын

    I'd assume that jumping of the cost function is related to the binary nature of the problem you're trying to solve. When the network figures how to use one of the input neurons correctly the loss decreases drastically. If you would try to solve the problem with more continuous input/output space, loss would likely be smoother. Nevermind. I've gone looking at random pictures of loss function on the internet and pretty frequently it looks like a jaggedy mess.

  • @eliseulucenabarros3920
    @eliseulucenabarros3920 Жыл бұрын

    this is perfect for embedded systems!

  • @pavelkozhemjachenko3902
    @pavelkozhemjachenko3902 Жыл бұрын

    Ty for the video, Alexey! Unfortunately i can't visit your live streams and can't ask you any questions there, so let me ask in the comments. I really interesting in do you work anywhere right now or you just streaming? If you do work, can you answer where pls?

  • @stewartzayat7526

    @stewartzayat7526

    Жыл бұрын

    At about 1:00:00 he says he doesn't have a job and hasn't had one for 5 years

  • @keremardicli4013

    @keremardicli4013

    Жыл бұрын

    @@stewartzayat7526 holy moly... He can get any spot at any company, especially working on low level high performance tasks and simulations

  • @whilechannel
    @whilechannel Жыл бұрын

    Am I the only one having seen that on the bottom of his terminal, it says Porn folder 6.7 GiB?

  • @lonelyfloat2582
    @lonelyfloat2582 Жыл бұрын

    YEAHHHH BABY

  • @antropod
    @antropod4 күн бұрын

    pascal case gives me WinAPI flashbacks

  • @Nietzscheboy1
    @Nietzscheboy1 Жыл бұрын

    Raylib so cool!

  • @xhivo97
    @xhivo97 Жыл бұрын

    CLITERAL 🥺

  • @DemisM
    @DemisM Жыл бұрын

    I’m here for the download button!

  • @magellan124
    @magellan12425 күн бұрын

    YT compression hates those weights lol

  • @monprenometmonnom5518
    @monprenometmonnom5518 Жыл бұрын

    Hello my french english is poor I made a driver graphic for my software I writed the SFML2 driver I used the quad shape coordinates To have a scene rotation of all graphic elements , i calculate the new 4 quad shape coordinates Quad shape for rectangle and Quad shape for bitmap surface SFML2 provides quad graphic function Actually i tried to make the SDL2 Driver .... But SDL2 not provide Quad shape SDL2 provides only bitmap suface with angle I have to convert quad coordinates to horto coordinates rectangle x , y and dx and dy and angle It's very complicate and i don't like I think i will stop SDL2 Driver and tried Raylib driver

  • @monprenometmonnom5518

    @monprenometmonnom5518

    Жыл бұрын

    Could you programm scene 2d transformation with Raylib ? It's very usefull

  • @ViaConDias
    @ViaConDias Жыл бұрын

    I never ever use PascalCase anyways so for me it wouldn't have any impact, that was my very first thought. Do not know if that's why they used PascalCase but it works for me 😊

  • @ryonagana

    @ryonagana

    Жыл бұрын

    because raylib is based on BGI an old lib comes with borland pascal, borland c++ and turbo C to create apps and games for DOS

  • @ViaConDias

    @ViaConDias

    Жыл бұрын

    @@ryonagana I was actually thinking that it could be because it was based on some old code base. I used to see a lot more PascaCase back in the day and come to think of it, I actually used it too. Thanks a lot for sharing that

  • @cold_ultra
    @cold_ultra Жыл бұрын

    CLITERAL

  • @RuslanKovtun
    @RuslanKovtun Жыл бұрын

    Raylib is not written in zig it is just a bindings for zig and many others.

  • @eliseulucenabarros3920
    @eliseulucenabarros3920 Жыл бұрын

    try out Odin language Tsoding!

  • @fridgeburns
    @fridgeburns Жыл бұрын

    I loooooove raylib

  • @lowlevell0ser25
    @lowlevell0ser25 Жыл бұрын

    as someone whose tried both I also like raylib over sdl

  • @yunootsuka9093
    @yunootsuka9093 Жыл бұрын

    What chair do you use?

  • @egorandreevich7830
    @egorandreevich7830 Жыл бұрын

    2:09:27 Why isn't Zig an alternative? It can compile C code too.

  • @SiviksPlays
    @SiviksPlays2 ай бұрын

    Can i ask what font you use?

  • Жыл бұрын

    Very Poggers

  • @criticalpoint2779
    @criticalpoint2779 Жыл бұрын

    Wow, it seems that your sessions began to be so long that I'm a little bit concerned abut your professional life. Anyway, GREAT CONTENT.

  • @ItIsYouAreNotYour
    @ItIsYouAreNotYour Жыл бұрын

    You are very smart, don't say that shit. I have been considering Raylib for a while. I just didn't feel like making a framework again, haha.

  • @htol78
    @htol78 Жыл бұрын

    CLITERAL r/TheyKnew

  • @gandab

    @gandab

    Жыл бұрын

    35:25

  • @awokawok8453
    @awokawok84539 ай бұрын

    17:11 should've kept the 69

  • @XELER53
    @XELER53 Жыл бұрын

    Looks like we are not alive

  • @schyzisbeats6609
    @schyzisbeats6609 Жыл бұрын

    🤓

  • @minecraftermad
    @minecraftermad Жыл бұрын

    you could've just used zig to build it? :D

  • @b3ztrawni7
    @b3ztrawni7 Жыл бұрын

    what text editor do you use?

  • @toddmartin7030

    @toddmartin7030

    Жыл бұрын

    Tsoding uses emacs

  • @captainfordo1
    @captainfordo17 ай бұрын

    I prefer SDL because it’s lower level and mostly gets out of your way, but raylib has a place too.

  • @thisisrealmaybe3430
    @thisisrealmaybe3430 Жыл бұрын

    Nah CLITERAL is crazy 💀

  • @yc699bk
    @yc699bk Жыл бұрын

    2:33:48

  • @ooichu_
    @ooichu_ Жыл бұрын

    I like SDL 1.2 better than anything

  • @egorandreevich7830

    @egorandreevich7830

    Жыл бұрын

    why?

  • @gothamindembaum

    @gothamindembaum

    6 ай бұрын

    @@egorandreevich7830yeah why

  • @ZombieLincoln666
    @ZombieLincoln6663 ай бұрын

    unfortunately GayLib is banned in Russia

  • @sikailud
    @sikailud Жыл бұрын

    you should invest in your keyboard😆

  • @lukagolubovic3641
    @lukagolubovic3641 Жыл бұрын

    First! Yo!

  • @lukagolubovic3641
    @lukagolubovic3641 Жыл бұрын

    First like as well

  • @vyacheslave154
    @vyacheslave1549 ай бұрын

    че ты из россии чтоли?

  • @zizzyballuba4373
    @zizzyballuba437310 ай бұрын

    raylib? no, gaylib

Келесі