I loved when zozi said it’s zozin time and zozied all over
@distant6606 Жыл бұрын
🤣
@maxmster55 Жыл бұрын
My favorite part
@waxlbloh6450 Жыл бұрын
😳
@adr420 Жыл бұрын
❤
@tekno679 Жыл бұрын
I once attempted to write a music visualizer in python and failed horribly. This man did it in C and made it hot-swappable. Respect.
@contentprogramming Жыл бұрын
try it again to prove to yourself that youre improving ;)
@tekno679 Жыл бұрын
@@contentprogramming Sadly I don't think I'll have time for that, but I think I did improve, because now I'm doing an image->sound conversion program for my bachelor's thesis 😎
@sinewaveaddict Жыл бұрын
@@tekno679Making some sound out of a FFT transformation of the discrete information present in the image, I presume? It sounds like an interesting project!
@tekno679 Жыл бұрын
@@sinewaveaddict I'm planning on it being a modular program where you can select the exact algorithm you want to use for the conversion. Currently I have an algorithm that does straightening of the image by a space-filling curve and mapping to frequencies and some other basic ones. I did think about adding a DCT too, but the most challenging thing about this is that it increases the space to 3D essentially and you want to output a "1D" sound that somehow corresponds to the input.
@vitfirringur Жыл бұрын
In my late teens I wrote an irc bot in C which used hot reloading to support plugins. I did this by parsing the the shared objects manually and looking for exported functions that were prefixed by IRC commands and an underscore: PRIVMSG_foo, etc. Probably the coolest, most advanced thing I had built at that point. This sort of reminds me of that.
@RobertFletcherOBE Жыл бұрын
No lies from the artists, Once you get good at drawing you don't need smoothing (though they do still use it when they don't need control). The reason your line is jittery is your drawing from your wrist, and your drawing short strokes, digital artists zoom in so that they can do long fluent strokes from the elbow and shoulder (broader radius). (source: classically trained animator who now develops tools for creatives). Also I hope it goes without saying. Awesome stream :)
@TsodingDaily Жыл бұрын
Oh! I see what you mean! Thanks! I'll practice that.
@DominicShillingford Жыл бұрын
The math as to which frequencies you get from the FFT is a bit more complicated than you used here. There are two issues, because of reasons the top half of your FFT (for example elements 128-255 if N = 256) will mirror the bottom half and doesn't give you any more information, you might as well throw it away. The highest frequency you get will always be half of the sampling frequency (for example 22.05 kHz if you use 44.1 kHz audio). You can't change this even by increasing N and it will be the middle (emph. middle) element of your FFT vector. Your value of N will determine the lowest frequency you can resolve, it will be 44.1 kHz (again assuming 44.1 kHz audio) divided by the number of samples. Say you choose N = 2048 then the FFT[0] will be your zero hertz amplitude then FFT[1] will be 44.1 kHz / 2048 = 21.53 Hz and FFT[2] will be 43.06 Hz. This will continue until FFT[1024] which will give the amplitude at half the sampling rate, i.e. 22.05 kHz. You can throw away everything after this because it will just mirror the first half (blame Nyquist). Also it's customary to view both the amplitude and the frequency logarithmically in which case your amplitude is essentially in dB (human's also perceive amplitude logarithmically). Also you'll want to sum over the bins if you view the frequencies logarithmically instead of average.
@pagenotfound_code_404 Жыл бұрын
yepieee!!! Thats the think I'm interested rn, interactive programming, jit compilers, hot reloading, things like that. this video is just in time!!!
@zombozer6333 Жыл бұрын
For the macro around 2:04:44 you can use the # symbol to turn symbols like 'plug_hello' into strings. #define PLUG_HOOK(f_name, libplug) \ do { \ f_name = dlsym(libplug, #f_name); \ if (f_name== NULL) { \ fprint(stderr, "ERROR: could not find %s symbol in %s: %s", \ #f_name, libplug_file_name, dlerror()); \ return false; \ } \ while(1) \ You could use it like this: PLUG_HOOK(plug_hello, libplug); I haven't tested this though. You still need to declare all the global variables and repeat this macro for every function but it's a pretty simple solution for what it does.
@mohammedalhaddar2182 Жыл бұрын
Why is it enclosed in an infinite loop?
@IGrizzllyGuy Жыл бұрын
@@mohammedalhaddar2182 I think he wanted to say while(0);
@JonnyDeRico Жыл бұрын
you could use a sine wave sweep to check for correct working fft
@flyLeonardofly Жыл бұрын
1:26:58 Dap, dap technology from the 70ies😂😂😂😂
@zombozer6333 Жыл бұрын
Padding samples with zeros caused smoothing around 1:38:12 also the range of frequencies you get from the fft depends only on the sample rate not the number of samples. The number of samples only effects the precision of the frequencies you get back.
@steled03 Жыл бұрын
Its always possible to implement a raylib callback handler inside the program, which calls the callback in the plu gin with some data argument!
@robsokolowski9015 Жыл бұрын
Flyway reminds me a bit of Lamdera, a "full stack Elm" that has type safe migrations for the stateful backend.
@ryonagana Жыл бұрын
this was perfectly done by Id Software,, used in Quake 2 Engine, when you enter in a server it hot loads the server dynamic library of the game, doesnt matter if the server is running on windows or linux, it just take cares of the loading and endianess
@francklenormand2680 Жыл бұрын
The technic to clean all the symbols resolution is to resolve only 1: a structure containing all the pointers on functions. The struct must be defined in the plugin and retrieved by main app
@zombozer6333 Жыл бұрын
The high frequencies seem to be shown to be very low. Maybe you could sum them instead of taking the average. That would also make more sence to me because it preserves the area under the curve (sort of like the energy in the sound).
@ferasboulala6220 Жыл бұрын
This is exactly what should have been done with a log scale on top for visualization, if needed.
@parallel4344 Жыл бұрын
I have also done something like this for my visualizers.
@TECHN01200 Жыл бұрын
I love the message of programming is universal. I am entirely with you on this point, it disappoints me that there are hardly any low level jobs anymore for anyone with fewer than 5 years of C experience.
@kibels894 Жыл бұрын
If you're skilled enough in C to work in low level then put it on your resume. If you have the skills there's no reason to let your resume be the reason they reject you.
@brd5548 Жыл бұрын
Very entertaining and educational demonstration! Python dev here😝, but we do have dll hot reloading functionality within python since very early days. For dlopen/dlclose/dlsym calls, they exist under the standard lib ctypes, whose signatures are pretty much the same with the posix ones if I remember. The whole CPython interpreter itself is just basically a huge C virtual machine, so it's pretty easy for cpython to interop with c code. For JavaScript, I do believe the node.js runtime has similar functionalities, but I'm not sure if it's a js language standard feature or just a node.js thing.
@DanelonNicolas Жыл бұрын
I love this man... ❤ the moment when hot realoading works was EPIC!!!! how about that!!!
@enc6428 Жыл бұрын
js hot reloading is just reading a js file as a string and passing it to eval()
@awesomeguy11000 Жыл бұрын
If I could make a stream request: try to program anything without warnings using clang -Weverything and clang static analyzer
@arcxm Жыл бұрын
23:13 "reload this hot library" ^^, 1:26:56 xD
@TankorSmash Жыл бұрын
1:27:00 Python does have hotreloading, basically built in. Javascript absolutely has hot reloading if you use a build tool. It absolutely wasn't your point but in case anyone is curious, it's very common!
@haakonness Жыл бұрын
In the start of the stream he said that it is possible in python, js and even java. So he is aware, he was just hyping :P
@antropod5 ай бұрын
I wonder if Twitch stores subscription money as a complex number in their database
@byterbrodTV Жыл бұрын
Thank you for video. Interesting project. I guess after watching this video we all doesn't need java or c# with their "VM hotswap thingy" anymore. Will put my little thoughts below. 1:03:00 - I suppose guy from chat means the case when you press R and hold it. I wonder, will it reload plugin every frame? I don't know how exactly KeyPressed() works, but in that cases something like KeyReleased() might be better, because it would called once when you release your R button. 1:35:47 - As a little bit of music making person i would say that normal people can't hear frequences after about 15-16k, it's just a high pitch noise, so 2^14 is enough for EQ. Keep this project up, we waiting for the moment when we could drag and drop music into player by hand :>
@bobby9568 Жыл бұрын
The King is back! 🎉
@mightyhelper8336 Жыл бұрын
Maybe you could run some pure sine waves to test it
@gwentarinokripperinolkjdsf6837 ай бұрын
I am about to start working on hot reloading on a simple OS I am working on (it's not really an OS, just a un hosted application) for quite similar reasons, I find debugging on real hardware (and it has to be on real hardware) to be very painful, my idea is to have the kernel listen on the serial port (which surprisingly modern computers have) and listen for commands, one of which would take a binary blob as a parameter that would contain a recompiled version of the OS which it would then overwrite
@SimGunther Жыл бұрын
Virgin VM image vs Chad hot reloaded .so file 😎
@nilsnilss Жыл бұрын
you can use multiple compilation buffers by renaming the compilation buffer and then switiching the buffer and then start a new compilation
@flleaf Жыл бұрын
1:12:18 two weeks? isn't there only one video on youtube on this?
@OxAA00 Жыл бұрын
Great channel and great video!
@portersky Жыл бұрын
Bro just made ringbuffer like I did in my DSP lab 😂
@Celicaw8 Жыл бұрын
1:06:39 Couldn't you make a wrapper function with the same signature, where the bufferData is a structure with the bufferdata and the userdata, then pass this wrapper to the function you registered the callback with?
@l.f-z9i Жыл бұрын
Respect and thanks the remarkable work.
@maximeetienne260111 ай бұрын
Great video, very informative. Could someone explain why did he was forced to link dynamically raylib to make the hot reloading work ?
@gameofpj3286 Жыл бұрын
Maybe smooth the fft by using 50% of the previous fft and 50% of the new calculated one :D I think it's called exponential smoothing or something like that.
@jamesbarret4240 Жыл бұрын
afaik it's called temporal smoothing, similar algorithms are used in anti-aliasing (TAA). good idea
@gameofpj3286 Жыл бұрын
@@jamesbarret4240 Yea it's exponential smoothing. Probably a good idea to have it just smoothed when it goes down tho.
@HimanshuSharma-b3q3u2 ай бұрын
Question: does 2.5Ghz wifi use fft at endpoints (aka the devices) or they use tuned antenna for it. please some one please tell me.
@ShowierData9978 Жыл бұрын
you can use a callback within the main program; then call the dll callback
@bloomingvision Жыл бұрын
Thats the point of all this though - its about not doing the short cuts. "just use a this and this is all unnecessary" . T's "Programming is Universal" speech captures the essence of it. There is a fundamental universality that we should know. LINKERS AND LOADERS - A beautiful are. We should all know it. My Book coming out: Computer Science in Rust :) Will re-deliver these arts. Soding.... this goes down in my book as the Traders equivalent of Gecko's Greed is Good speech -- PROGRAMMING IS UNIVERSAL.
@postmodernist1848 Жыл бұрын
The standard library has an M_PI #define. GNU extension has M_PIf. Also why not just cast M_PI to float?
@dancinglazer1628 Жыл бұрын
apparently M_PI is non standard
@eazypeazy8559 Жыл бұрын
so fcking cool. I watch your streams as entertainment random CS course....
@not_just_burnt Жыл бұрын
i love myself some fearofdark music too!!
@phill13able11 ай бұрын
How to confirm neovim like yours?
@johnhammer8668 Жыл бұрын
How did you find static linking was the cause for crash? Why does dynamically linked library does not crash?
@Shonicheck Жыл бұрын
12:57 The --cake-- smooth line is a lie!
@SimonBuchanNz Жыл бұрын
One really annoying thing with trying to do this especially in other languages is if you use global init code or thread locals or the like, it just stops working because apparently that's just too hard for glibc to figure out. Ugh. A more reliable and buzzword friendly approach is to use WASM, but now you have the mess of interop.
@exciting-burp Жыл бұрын
Hot teloading is a big deal in JS bevause everything is unnecessarily complicated in JS.
@rakaboy1619 Жыл бұрын
its like i cant build a http server and this man out here casually makes a hot code reloading in C in a time it takes me to make a class. trutly a tsoding moment
@wrnlb666 Жыл бұрын
libdl has a windows wrapper. I think it is crossplatform enough?
@gaweqqwgfas9980 Жыл бұрын
you're doing cool stuff while i struggle to install a c compiler ffs
@TsodingDaily Жыл бұрын
You can do it! I believe in you!
@aciddev_ Жыл бұрын
zozi bought new camera! yay
@vividimagination2044 Жыл бұрын
If you want to get around these annoying "accept our cookies or else" prompts without accepting anything then you can just open your browsers console, find the modal and elegantly slam that delete button with fervor
@lazarstanojevic7841 Жыл бұрын
is there a video where he talks about his setup (editor, os and stuff like that)?
@Stroopwafe1 Жыл бұрын
Editor: Emacs OS: Debian Keyboard: Yes /j He has some videos where he talks about that it doesn't matter what he uses, just use what works best for you
@Gigasharik5 Жыл бұрын
Tsoding, was you ever try to write AGI?
@slendi9623 Жыл бұрын
This is really cool, I tried doing the same thing but with getting the .so file's mtime and doing a compare on that `if (get_modification_date() > prev_modification_date)`, however it likes to bus error and segfault for some reason. But when I do IsKeyPressed, it just werks. Weird.
@slendi9623 Жыл бұрын
Its because I recompiled main
@andrewlamichhane1090 Жыл бұрын
Is that a new zozing place ?
@paco3447 Жыл бұрын
Regarding this, a whatever’s Erlang project could be a next and funny try.
@deathvall3y Жыл бұрын
0:03:0 why does it say porn folder 7.6 GiB in the tray 🤔
@rogerbusquetsduran559611 ай бұрын
How were you anble to build the shared lib while having it opened by your application?
@SoftBreadSoft9 ай бұрын
readonly does not lock files, so read+write succeeds.
@filipbook5605 Жыл бұрын
Does anyone here have a license for a switch case developer??? I'm looking for one
@mason-pe5lk Жыл бұрын
Sounds complicated. I would've just piped the music to my headset and to the visualizer.
@RagePower2000 Жыл бұрын
What font do you use?
@somecretin Жыл бұрын
the pervasive self-absorbed narcissism is such a turn-off
@zombozer6333 Жыл бұрын
I think it's crashing because you are passing a callback to instruction in the SO. Then when the SO is closed the callback is called and it segfaults. I gues when the code barely changed the new version gets loaded into the same memory? That seems weird though because I would expect the memory layout to be randomized through ASLR although I'm not an expert on that. To fix this you could place the callback function in the static file. This can then call into the updated version of the SO. Otherwise you would have to somehow pause the audio so the callback doesn't get called. (Edit): I didn't see the extra section at the end. You already solved it so nvm.
@user-oe4id9eu4v Жыл бұрын
ASLR is something to do with kernel loading process into memory with exec* syscalls. Dynamic linking using dl* functions is resolved by dynamic linker, which is part of libc. So address of each functions will change every time program is reloaded, but not when simply shared object is reloaded.
@fish1r1 Жыл бұрын
dll is dynamic link library.
@bibliusz777 Жыл бұрын
What is wrong with Nix?
@Narblo Жыл бұрын
why dont you use pragma once?
@aviationbutterr Жыл бұрын
pragma once is a non-standard directive. header guards will always work on any standard-compliant compiler
@png261 Жыл бұрын
what software does he use to zoom in out and dim screen ?
@flleaf Жыл бұрын
boomer (on his github)
@png261 Жыл бұрын
@@flleaf thanks a lot, such a useful tool
@gameofpj3286 Жыл бұрын
Also I really love how you can see the melody playing at 2:13:07 :o
@万宇阳 Жыл бұрын
"Can your python and javascript do that??!" Python and javascript don't segfault lol
@ryonagana Жыл бұрын
imp library, now importlib in Python 3
@Isaac-zy5do Жыл бұрын
Just give you NaNs instead lol
@tauraamui Жыл бұрын
you should use Excalidraw instead of trying to handwrite text with a mouse.
@begga9682 Жыл бұрын
1:26:58 Python goobers got owned lmao
@LogicEu Жыл бұрын
Very cool stuff
@desertfish74 Жыл бұрын
Rezozing ze code
@Gordonfreems Жыл бұрын
This was a vibe, amazing stream
@glorioussir9673 Жыл бұрын
You can use "x macro" for function loading deduplication, quite handy technic en.wikipedia.org/wiki/X_macro
@bd3670 Жыл бұрын
Am I the only one who noticed: "Porn Folder" in his terminal?
@heyyouhere Жыл бұрын
todays session is hot omgggg
@parlor3115 Жыл бұрын
Oh yeah!
@titaniumtomato7247 Жыл бұрын
So is this how a shell is made, or does the shell just have its own interpreter?
@bonniesimon14 Жыл бұрын
Love the video without it, but still would be awesome to have timestamps.
@varshneydevansh Жыл бұрын
Woah in just 2 mins
@dryoldcrabman6890 Жыл бұрын
1:11:46 kek
@azir8930 Жыл бұрын
❤
@sinamobasheri Жыл бұрын
This is not hot I wanna hot
@monprenometmonnom5518 Жыл бұрын
en.wikipedia.org/wiki/Tiny_C_Compiler : TinyC Compiler able to compile C string code inside EXE
@flleaf Жыл бұрын
interesting, didn't know youtube doesn't delete comments with wikipedia links