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
Hey! Very nice session! I enjoyed it a lot! Glad you enjoyed raylib! 😄
@hamzadlm6625
Жыл бұрын
fantastic lib! I started enjoying it too making particle simulations in Go
@bernardoramirez1759
Жыл бұрын
Was CLITERAL actually intentional? Lmao
When you find the CLITERAL
everyone else: make sure to prefex a function not to pollute the namespace based raylib: #define RED
@sikailud
Жыл бұрын
#define int unsigned char // everybody go back 60year
@tsunami870
Жыл бұрын
#define true false
@tsunami870
Жыл бұрын
@@totheknee bro what
@Djellowman
Жыл бұрын
@@tsunami870 no oop allowed
@homelessrobot
10 ай бұрын
#define while(x) (exit(x))
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
Жыл бұрын
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! 😅
Hello dear tsoding, Keep what you are doing, you are an inspiration to many ❤
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.
Yes I also like raylib more than sdl
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.
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!
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!!!
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)
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.
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
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
Жыл бұрын
i would just do this with GDI+ in windows
@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.
I would love to see tsoding doing some protein folding stuff
I would love to see you make your own version control system (tscm
What an incredible series
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"
Does creating an environment script for your build increase cross compatibility of software across different platforms?
Some alternatives to C: look for C2lang, C3lang or betterC
i dont know what is he doing. but he is doing it good.
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.
this is perfect for embedded systems!
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
Жыл бұрын
At about 1:00:00 he says he doesn't have a job and hasn't had one for 5 years
@keremardicli4013
Жыл бұрын
@@stewartzayat7526 holy moly... He can get any spot at any company, especially working on low level high performance tasks and simulations
Am I the only one having seen that on the bottom of his terminal, it says Porn folder 6.7 GiB?
YEAHHHH BABY
pascal case gives me WinAPI flashbacks
Raylib so cool!
CLITERAL 🥺
I’m here for the download button!
YT compression hates those weights lol
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
Жыл бұрын
Could you programm scene 2d transformation with Raylib ? It's very usefull
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
Жыл бұрын
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
Жыл бұрын
@@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
CLITERAL
Raylib is not written in zig it is just a bindings for zig and many others.
try out Odin language Tsoding!
I loooooove raylib
as someone whose tried both I also like raylib over sdl
What chair do you use?
2:09:27 Why isn't Zig an alternative? It can compile C code too.
Can i ask what font you use?
Very Poggers
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.
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.
CLITERAL r/TheyKnew
@gandab
Жыл бұрын
35:25
17:11 should've kept the 69
Looks like we are not alive
🤓
you could've just used zig to build it? :D
what text editor do you use?
@toddmartin7030
Жыл бұрын
Tsoding uses emacs
I prefer SDL because it’s lower level and mostly gets out of your way, but raylib has a place too.
Nah CLITERAL is crazy 💀
2:33:48
I like SDL 1.2 better than anything
@egorandreevich7830
Жыл бұрын
why?
@gothamindembaum
6 ай бұрын
@@egorandreevich7830yeah why
unfortunately GayLib is banned in Russia
you should invest in your keyboard😆
First! Yo!
First like as well
че ты из россии чтоли?
raylib? no, gaylib