Implementing Scientific Paper in C

  Рет қаралды 44,689

Tsoding Daily

Tsoding Daily

Күн бұрын

Пікірлер: 98
@sooth6487
@sooth6487 Ай бұрын
implementing a scientific paper in C, but also an in depth strawberry pasta discussion at 20:10. Where else would I go to find such diverse content
@AHuMycK
@AHuMycK Ай бұрын
Hi Tsoding, not sure if you read the paper or not but your sum operation is not correctly defined. According to the paper """ All functions appearing in the RandomArt algorithm are scaled so that they map the interval [-1; 1] to the interval [-1; 1]. This condition ensures that all randomly generated expression trees are valid. For example, the scaling for the add function is achieved by defining add(x; y)=(x + y)/2 """ Because your add(x;y) is defined as x+y, it means that your sum node generates invalid expression tree and that's why you were able to generate all those beautifully looking non-linear patterns. I'm not sure it's possible to generate images that you did (4:26:19, 4:26:47 and so on) by using any combination of x,y, add and mult (linear) operands
@weekipi5813
@weekipi5813 Ай бұрын
it's not that he generated an invalid expression tree. The expression tree generated was a valid one, rather the evaluation as you're correctly pointing out was not aligned with the paper.
@froop2393
@froop2393 Ай бұрын
Creating a terminating rule is easy if you do it in reverse. Start with some terminals and then join them with add, mult etc. until you have three left and return them as triple. It's just like building a mahjong stack is super easy, but solving is hard and may fail. I really enjoyed the full 4h. This was one of your best streams ever!
@FaZekiller-qe3uf
@FaZekiller-qe3uf Ай бұрын
tsodinPenger
@krux02
@krux02 Ай бұрын
You missed the opportunity to use Lisp in the domain, where it is at it's best: Generating code at runtime and executing it.
@salim444
@salim444 Ай бұрын
lisp supremacy
@adrien335
@adrien335 Ай бұрын
Could you provide a code snippet/gist to showcase where you would use macros? Just curious.
@krux02
@krux02 Ай бұрын
@@adrien335 Yes I could.
@ismbks
@ismbks Ай бұрын
​@@adrien335asking for a code in yt comments that's a bit wild 😂
@paper_cut9457
@paper_cut9457 Ай бұрын
in the end, programming is all about printf-ing a triangle of stars and feeling good about it: but the level here is quite higher ! thanks
@theevilcottonball
@theevilcottonball Ай бұрын
Errr, no. Tsogramming is much more than that. Printf to a terminal, are you from the 1970s?
@itsmenewbie03
@itsmenewbie03 Ай бұрын
functions mentioned
@Italya3343
@Italya3343 Ай бұрын
Thank you so much for sharing your AMAZING video!! 🔥🔥🔥💐 Plz, continue making more and more paper 📃 to C videos 🙏
@lifelover69
@lifelover69 Ай бұрын
this is the kind of generative art i can get behind, very cool
@asdfmonstrosity
@asdfmonstrosity Ай бұрын
Don't know if you resolve it later, but the paper says to always pick branches->items[0] when depth
@nel_tu_
@nel_tu_ Ай бұрын
This. Also, there is no min. depth for a grammar; you just follow the first branch assuming it terminates. He also missed the part in the paper where there is only 50% chance to go deeper, bro just needs to read. He should have titled the video "Implementing a scientific paper but changing everything because I don't feel like reading it" smh
@kaviisuri9997
@kaviisuri9997 Ай бұрын
Is there a video for when you implemented the bnfuzzer?
@geertdepuydt2683
@geertdepuydt2683 24 күн бұрын
Best way to learn C when coming from another language 100%. Extremely educational.
@ecosta
@ecosta 28 күн бұрын
Implementing a scientific paper is always a bet. Sometimes it just works. Sometimes you find so many holes in the solution that I feel like I'm rewriting the article from scratch.
@coath
@coath Ай бұрын
Epic programming moment
@darktale6716
@darktale6716 Ай бұрын
wow Tsoding knows about the valencian flooding! it was pretty rough
@edbrito-swdev
@edbrito-swdev Ай бұрын
You have the coolest KZbin developer channel. Do you work in the IT industry or do you only do KZbin and these projects (plus patreon and stuff) as a means to make money?
@edbrito-swdev
@edbrito-swdev Ай бұрын
Ok, I just saw you saying "Why pasta with strawberry isn't fine" and now I've lost all my respect for you. Just kidding (but I was shook).
@blackt0wer
@blackt0wer Ай бұрын
He writes code for banks in the .ru
@H3llsHero
@H3llsHero Ай бұрын
He doesn't make money from Twitch/KZbin/Patreon because he is in Russia. He used to work as a software developer for some American company, presumably he saved enough and lives frugally enough to not have a day job anymore. But who knows?
@thebirdhasbeencharged
@thebirdhasbeencharged Ай бұрын
he's a cia bot
@zaitsev5990
@zaitsev5990 Ай бұрын
@@thebirdhasbeencharged KGB*
@Hamsters_Rage
@Hamsters_Rage Ай бұрын
you dont need all this stuff with bools and ifs. if you make all funcs binary, like if_gt, if_less etc - you can store it in just an array-packed binary tree and execute all genetic ops on this array
@John-yg1cq
@John-yg1cq Ай бұрын
In reference to the terminal nodes: I have to ask, is a terminal node not simply a node of type A? As you're calling E, you get a triplet of C C C which then can be a op which then can be self-referential to As, and As can only be random number within range or x or y. As you traverse the grammar, any A node is a terminal node, as described in figure 3 (a)? Am I misunderstanding?
@markahlenganpanjang
@markahlenganpanjang Ай бұрын
The resulting image is insane
@samuraijosh1595
@samuraijosh1595 Ай бұрын
what tool do you use for dark mode on pdfs?
@TsodingDaily
@TsodingDaily Ай бұрын
mupdf
@anon_y_mousse
@anon_y_mousse Ай бұрын
You can also use okular and change its settings to invert colors. Seems to have the most features yet still runs fast, even runs on my Pi.
@theevilcottonball
@theevilcottonball Ай бұрын
Maybe I will implement genetic art as referenced as an inspiration in the paper
@xspager
@xspager Ай бұрын
Not a lisper myself but this paper sounded like the ideal case for Lisp
@thistent
@thistent Ай бұрын
You know, you can apply an invert filter to the CSS in your browser's PDF reader.
@Lucrecious
@Lucrecious Ай бұрын
that is so fucking cool man, nice man
@IvanNovitskii
@IvanNovitskii Ай бұрын
Omg just provide happy path by marking grammar rules that eventually lead to termination with ones, and when you exceed depth take that path. It will no be exactly the right depth but within 2 lvls. You can even have multiple options to exit and scale probabilities. The struggle was painful to watch. But I guess you should have figured it out already. But cool result though nevertheless On a side note, you can precompute how much it takes to exit (in min steps) via each rule in production to make the border strict and do not take path that cannot terminate in time. Its just a graph problem in the end.
@tens0r884
@tens0r884 Ай бұрын
I needa find a girl who's as loyal to me as zozin is to C
@multicoloredwiz
@multicoloredwiz Ай бұрын
Damn.. got a little crazy once he got to the nn/grammar stuff.. uff
@monad_tcp
@monad_tcp Ай бұрын
BNF is almost basically a CFG for an automaton.
@edbrito-swdev
@edbrito-swdev Ай бұрын
A BNF is essentially a DFA (from what I remember from my language processing classes and personal experience. Might be some cases where that breaks, though).
@MrFram
@MrFram Ай бұрын
⁠​⁠@@edbrito-swdev BNF is a notation for CFG, and DFA is below CFGs on the Chomsky Hierarchy, which makes it a subset of CFG, though BNF is usually not used for it. DFA is equivalent to NFA (up to exponential difference in size), and regular expressions are the common notation for NFAs.
@edbrito-swdev
@edbrito-swdev Ай бұрын
@@MrFram Yes, you are obviously completely right. I should have thought a little more about it before writing. Of course Backus Naur has to be above because it is used for grammars and DFAs are used for things like regexes. This should have been obvious to me 🤦
@mohammedkaka5558
@mohammedkaka5558 Ай бұрын
I'm doing this bro, I was looking for a C refresher project then this came up. Any suggestions?
@Siroitin
@Siroitin Ай бұрын
Suggestions for what?
@karoI508
@karoI508 Ай бұрын
suggestion is: stop asking, do it
@SlinkyD
@SlinkyD Ай бұрын
I use your binviz for that. Will you take a PR thru a comment since I can't find my github password or recovery codes? I'll make it a couple of sed commands since its small.
@greyshopleskin2315
@greyshopleskin2315 Ай бұрын
You can generate a patch with either git or diff. Learn about it
@SlinkyD
@SlinkyD Ай бұрын
@@greyshopleskin2315 Who woulda thunk‽
@SlinkyD
@SlinkyD Ай бұрын
no ​@@greyshopleskin2315
@mattshu
@mattshu Ай бұрын
Do you have any vim tutorials? I wish I was as fast as you!
@eeriemyxi
@eeriemyxi Ай бұрын
He uses Emacs. You can use any code editor for multiple years and start typing at insane speeds. It's about practice.
@ratofthecity6351
@ratofthecity6351 Ай бұрын
i think theprimeagen has some decent vim tutorials that are worth watching as a beginner. id recommend using vim (neovim) almost exclusively while you learn it, and to try to incorporate it into your workflow wherever you can. the best way to learn it is by immersing yourself in it. also you should rebind your capslock key to either ctrl or escape - i prefer ctrl but ive heard many vim users like escape
@JamesSjaalman
@JamesSjaalman Ай бұрын
You could have emitted RPN, which is much easier to process.
@Hodebrot
@Hodebrot Ай бұрын
30:39 recreational beatboxer / programmer
@whatthehelliswrongwithyou
@whatthehelliswrongwithyou 25 күн бұрын
whats up с карнеги мелона
@Seedwreck
@Seedwreck Ай бұрын
Implement Chaotic map for PRNG next
@LarsDonner
@LarsDonner Ай бұрын
42:26 Just pretend that your image format uses a 0.8 fixed-point numbers for the color channels. Then even PNG uses the [0..1) range!
@SphereofTime
@SphereofTime Ай бұрын
2:33 hash visualization
@explqicot3293
@explqicot3293 Ай бұрын
Can you do more scientific papers please 🙏
@re_detach
@re_detach Ай бұрын
we gettin 2 the bottom of this 2 day
@theevilcottonball
@theevilcottonball Ай бұрын
Use Rust at 2:20:01. Me litterally coding along writing the same thing in Rust. (because using the same language aas Mr. Tsoding is too easy) Actually Rust is quite nice with pattern matching on the Node enum and yes I clone all over the place to have a fun time in Rust.
@theevilcottonball
@theevilcottonball Ай бұрын
C; single file dependency Cargo: Lets download profiling, deques, bigint, unicode, weezl, adler32, adler2-simd,... they even use a crate "rgb" for a single struct of rgb pixels, an entire crate!
@theevilcottonball
@theevilcottonball Ай бұрын
Sad, that -Wint-conversion does not catch it.
@hubstrangers3450
@hubstrangers3450 Ай бұрын
Thank you....
@devdeev3675
@devdeev3675 Ай бұрын
this in GLSL!!!
@theevilcottonball
@theevilcottonball Ай бұрын
Tsoding: What maps two spacial coordinates to a 3D color. Me: A shader? (I know its a usually 4D color) Tsoding: Neural Network.
@devdeev3675
@devdeev3675 Ай бұрын
@@theevilcottonball Lol, he did it with shaders
@the_yugandharr
@the_yugandharr Ай бұрын
Your streams are free??
@krux02
@krux02 Ай бұрын
Streams are free, but you can't comment for free there. That only works here in the non life version.
@the_yugandharr
@the_yugandharr Ай бұрын
@krux02 free to watch. that's already enough for me :D
@bzboii
@bzboii Ай бұрын
bran cheese
@darktale6716
@darktale6716 Ай бұрын
Hello @laur0276, I am a subtitle watcher :)
@niculaelaurentiu1201
@niculaelaurentiu1201 Ай бұрын
Omg hello xD
@dancinglazer1628
@dancinglazer1628 Ай бұрын
Oh
@John-yg1cq
@John-yg1cq Ай бұрын
21:00 I want to disagree that bread == pasta so much. Thanks, I hate it.
@shrddr
@shrddr Ай бұрын
no f way you get stack overflow on first try when there's only 2/3 chance to add a depth level
@GesteromTV
@GesteromTV Ай бұрын
They litarly sad that going to moon was easier then faking it. Assuming generating random gramar and parsing it was a moon landing.
@imya_mujik_familiya_tajik
@imya_mujik_familiya_tajik Ай бұрын
> 420 meditation lane lmao
@emoosavimehr
@emoosavimehr Ай бұрын
30:58
@xspager
@xspager Ай бұрын
Based
@azharalibhutto1209
@azharalibhutto1209 Ай бұрын
Great ❤❤❤❤❤❤❤
@xbelanch
@xbelanch Ай бұрын
from 16:9 to 4:5 weird
@NicolaCodes
@NicolaCodes Ай бұрын
✅✅✅✅✅✅✅✅
@m4ya_0
@m4ya_0 Ай бұрын
amogus drip
@naranyala_dev
@naranyala_dev Ай бұрын
try sokol
@tilakmadichettitheappdeveloper
@tilakmadichettitheappdeveloper Ай бұрын
neovim > emacs > my boring depressing life j.k
@frogg03_
@frogg03_ Ай бұрын
Big neural networks with random weights basically just give you average values. I think that if you tried small neural networks, one for each r, g and b values, it would be much more interesting!
@rogo7330
@rogo7330 Ай бұрын
For an hour he tried to go around a depth by still doing the same thing as the depth does not exist. Instead of doing what chat tried to tell him "just return NK_RAND and make it terminal". You should go to water instead of tea because it's clearly makes you so freaking nervous and unfocussed, man. (joking, but still, wtf is happening with you? you haven't being like that year ago)
@theevilcottonball
@theevilcottonball Ай бұрын
I don't care that chat is sub only, now. Twitch chat is useless most of the time anyway. In sub only mode its less useless but still useless.
@KybaLioN66
@KybaLioN66 Ай бұрын
zozin ))))))
@Nvimchad
@Nvimchad Ай бұрын
sir why don't you make video series about the topic you cover, I mean It's Hard to see specific topic don't you think it's unorganised, I also looked at playlists but I didn't find that I was looking for... can you please make new series on golang...?
@twl148
@twl148 Ай бұрын
cool but disliking for calling ipv6 a useless protocol
I regret doing this... (Tsoding Q&A Stream)
1:20:07
Tsoding Daily
Рет қаралды 88 М.
Ozoda - Alamlar (Official Video 2023)
6:22
Ozoda Official
Рет қаралды 10 МЛН
PMunch solves AoC 2024 - Day 10 and (hopefully) earlier
1:58:12
Peter Munch-Ellingsen
Рет қаралды 189
Catching up with async Rust
17:55
fasterthanlime
Рет қаралды 16 М.
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 157 М.
I made Futures from scratch
1:56:09
Tsoding Daily
Рет қаралды 29 М.
AWK - A Tool That Does Too Much
11:10
The Exhausted Programmer
Рет қаралды 16 М.
I made JIT Compiler for Brainf*ck lol
3:07:56
Tsoding Daily
Рет қаралды 86 М.
How Linux Kernel Runs Executables
16:46
Nir Lichtman
Рет қаралды 49 М.
Everyone Should Use WebAssembly
3:34:09
Tsoding Daily
Рет қаралды 54 М.
They Made a Sequel to C
1:53:24
Tsoding Daily
Рет қаралды 109 М.
TWISTED: The dramatic history of twisted-pair Ethernet
28:30
The Serial Port
Рет қаралды 174 М.
ТЕЛЕФОН МЕНЯЕТ ЦВЕТ😅 #upx
0:34
RanF
Рет қаралды 639 М.
(✋❌)kageihina VS siajiwoo VS meosimmyyt VS oxzung#tiktok #shorts
0:12
пранк🤣😂😂
0:51
Numdexx1
Рет қаралды 1,2 МЛН
This thing is CRAZY 🤯 #shorts
0:20
House of Highlights
Рет қаралды 48 МЛН