Everyone Should Use WebAssembly

  Рет қаралды 51,789

Tsoding Daily

Tsoding Daily

Күн бұрын

Пікірлер: 144
@blackhaze3856
@blackhaze3856 2 ай бұрын
'The biggest crime of this game is that it is written entirely in javascript'. Epic.
@Joshua.Developer
@Joshua.Developer 2 ай бұрын
The best thing I can say if you wan to learn DO NOT FOCUS ON JS and REACT. Javascript was never meant to all this stuff.
@smarterlife7331
@smarterlife7331 2 ай бұрын
@@Joshua.Developer you meant TS?
@ivan.jeremic
@ivan.jeremic 2 ай бұрын
let me guess you also love Epic Games and Fortnite.
@luigidabro
@luigidabro 2 ай бұрын
you used the wrong quotes. In real programming you use "" for strings
@anubhav9476
@anubhav9476 2 ай бұрын
I just watched the footnote since i watched the stream, I really appreciate mr zozin's content
@BigBrother4Life
@BigBrother4Life 2 ай бұрын
So this is the guy who design all the leetcode problems.
@pineappleus3031
@pineappleus3031 2 ай бұрын
and he's fucking great
@armanrozika
@armanrozika Ай бұрын
@@pineappleus3031 he made none of the actual stuffs people use today, all that stuff made by other great programmers. This guy,just hobbyist. He is really great tho, just not practical
@fg786
@fg786 2 ай бұрын
just write in whatever language and ship your website as subscription service via CD ROM
@exciting-burp
@exciting-burp 2 ай бұрын
The major issue with WASM is DOM access: it's really _really_ slow, so slow that native JS is typically faster. This is changing though, direct DOM access in WASM is a top priority by the looks of things.
@Y1001
@Y1001 2 ай бұрын
Doubt it's an actual issue for this game though, but yes that's totally true if you were to build some interactive website kind of thing, dom access is primordial.
@HalfMonty11
@HalfMonty11 2 ай бұрын
It's been a top priority for a couple years. There's too many cooks in the kitchen with wasm now and everything is done by committee and takes forever.
@TeaThyme-ci4cl
@TeaThyme-ci4cl 2 ай бұрын
@@HalfMonty11 Its not up to wasm to implement that though, its the browsers that have to implement direct dom access and define the api's wasm will have to interact with.
@berndeckenfels
@berndeckenfels 2 ай бұрын
In that specific case it would be enough to map the canvas to wasm memory
@smallbluemachine
@smallbluemachine 2 ай бұрын
I'm not a web person, but surely one of the benefits of WASM is that you don't need the DOM, its kind of the point. You draw to the "screen" and talk to the network and db, synchronously or asynchronously, like a regular native compiled program. And as such there's no necessary jank from dealing with a DOM.
@CoderDBF
@CoderDBF Ай бұрын
I like how your videos aren’t interrupted by ads every few minutes. It’s also impressive how fast you’re able to troubleshoot things, it’s like you’re plugged straight into the mainframe of the matrix.
@antonpieper
@antonpieper 2 ай бұрын
Nice that you got dynamic allocation working in the end!
@berndeckenfels
@berndeckenfels 2 ай бұрын
An alternative would be allocating a SharedArray in JS - at least that what ChatGPT suggest, unfortunatelly even then you have to copy it into the ImageData
@brambasiel
@brambasiel 2 ай бұрын
I expected the wasm bundles to be big in size, but they're just 16.7KB, good job! I guess the counter arguments for wasm always assume you're using Emscriptem or a bloated language with a big runtime. Will be interesting to see how this project evolves.
@Rene-tu3fc
@Rene-tu3fc 2 ай бұрын
do not, please, ever, stop making clickbait titles. I love you with all my heart.
@ecosta
@ecosta Ай бұрын
The footnote was really interesting! I had similar issues with C++ and I had to call the "initialise" function from my JS in order to get anything "global" working.
@gusic4529
@gusic4529 2 ай бұрын
1:51:21 I think it comes from the fact that anything to do with games / graphics has a lot more "mystery" to the general audience than, let's say, content aware scaling. The same can be said for programming languages, which is probably why it's one of your most popular series
@revenevan11
@revenevan11 2 ай бұрын
Things like the first 30min of this video are why I love your channel (besides your sense of humor). I learn in a similar way by trying to understand how/why the things work at a simple level with less moving parts, but even as a noob recreational programmer I'm not as good at any of this type of lower level language stuff yet. It's a great glimpse into how to troubleshoot and work with a compiler like that, glad you're being a bit unconventional and not just using the build system (even though as a noob if I decide to get into C3 eventually I'd probably start with using the build system personally).
@pineappleus3031
@pineappleus3031 2 ай бұрын
Title: "Everyone should use WebAssembly" Intro: "HELLO EVERYONE" 💀
@chriswinslow
@chriswinslow 2 ай бұрын
I’m so pleased you managed to leverage C3 and now the game is running at 60fps. I really enjoy and appreciate your videos. A lot of people will learn a lot from your content. Thanks.
@MDMAviation
@MDMAviation 2 ай бұрын
I'd suggest making a lib that implements functions like fmodf, fminf, fmaxf, etc. and linking it only when making the wasm. This way I guess the performance would be so much better than calling them in JS (but I'm not sure how it does exactly work). The thing is those functions are called a quadrillion times per second, so I think I'd be the best approach. In fact you'll have the implementation on the std lib probably, so you could just copy paste. Btw, the ImageData data property is already a Uint8ClampedArray. Also just out of curiosity I'd compare accessing the buffer from JS to get the image bytes with a function that spits it directly, in the end you'll get a copy of the bytes anyway and my guess is it'll be faster in wasm. Maybe I'm wrong, but my assumption is this would dramatically improve performance.
@berndeckenfels
@berndeckenfels 2 ай бұрын
@@MDMAviation that should happen automatically if you compile the runtime but Tsosin wanted to keep it small to see how the mechanism works (also WASI should provide some of them?)
@berndeckenfels
@berndeckenfels 2 ай бұрын
@@MDMAviation it’s sad that you can’t flip(double buffer) canvas into a shared array without re-setting the InageData - that would really help wasm animations (like it seems to work with WebGL?)
@christopher8641
@christopher8641 2 ай бұрын
Wasm isn't perfect for everything, but it's also pretty dang good for most things. It's a really cool technology
@000TheMatheus000
@000TheMatheus000 2 ай бұрын
you can override the webassembly interface in typescript to make it know about your custom methods and the buffer
@russinmoder4931
@russinmoder4931 2 ай бұрын
я БЛЯДЬ УМЕР на 48:18
@ruslansmirnov9006
@ruslansmirnov9006 2 ай бұрын
сказал же, ёба, падажди стсуко
@samuraijosh1595
@samuraijosh1595 2 ай бұрын
What does that mean
@ruslansmirnov9006
@ruslansmirnov9006 2 ай бұрын
@@samuraijosh1595 the author says: B**CH HOLD ON A SEC the commenter says: i was goddamn astonished
@ViacheslavRodnikov
@ViacheslavRodnikov 2 ай бұрын
@@samuraijosh1595 that means 'wait, fucker' or something like that
@MaximShershen
@MaximShershen 23 күн бұрын
ПАДАЖИ ЙОБА
@ASTEV-d2y
@ASTEV-d2y Ай бұрын
Hello, do you do a type of coding coaching? I really enjoy programming and I am new to c, I originally learned programming through web development (help me) haha
@klevisimeri607
@klevisimeri607 2 ай бұрын
Thanks for the vid!
@me_12-vw1vi
@me_12-vw1vi 2 ай бұрын
lovely recreational programming session ❤
@Taimoorabdullah
@Taimoorabdullah 2 ай бұрын
Nice, next do items in rust, walls in jai etc xD
@mementomori8856
@mementomori8856 2 ай бұрын
okay this was fun!
@dyto2287
@dyto2287 2 ай бұрын
WebAssembly is not something you "use". It's simply just compile target.
@sanchitwadehra
@sanchitwadehra Ай бұрын
Dhanyavad
@soroushyaghoubi7709
@soroushyaghoubi7709 2 ай бұрын
Who else watches tsoding on 2x?
@seventhtenth
@seventhtenth 2 ай бұрын
when I have the focus to keep up withit
@bibliusz777
@bibliusz777 2 ай бұрын
who on 3x?
@adamconrad5249
@adamconrad5249 2 ай бұрын
@@bibliusz777 who scans the compressed mp4 bytes?
@ilia21-live
@ilia21-live 2 ай бұрын
Okay, offtop but serious. How did you make a custom title for subtitles? (It shows as "English - Twitch chat" for me) I've tried googling, and found nothing. I know I need this
@charliegnu
@charliegnu 2 ай бұрын
You make a regular subtitle file like srt.
@adamconrad5249
@adamconrad5249 2 ай бұрын
Can anyone tell me how his terminal expands to show output and then remains a single line when not active? I have scoured his dotfiles but couldn't figure it out
@atxorsatti
@atxorsatti 2 ай бұрын
ah yes, my man is back
@GreggHarris-gm7ef
@GreggHarris-gm7ef 2 ай бұрын
shouldve written it in zig
@kungfooman
@kungfooman 2 ай бұрын
everybody wasm ganxta until pointers go brrrr
@joaquinfontana7135
@joaquinfontana7135 2 ай бұрын
at the end, what would be the real improvement if you didn't put an fps limit? and the streaming conditions would be the same. really good content btw ❤
@berndeckenfels
@berndeckenfels 2 ай бұрын
@@joaquinfontana7135 there are enough known optiksatins that it’s not worth to worry about the fps just yet (for example inlining the fabs functions)
@Czeckie
@Czeckie 2 ай бұрын
The performance in my firefox is consistently worse (40fps) than in chrome. It used to be both 60fps, but something changed. Chrome is still 60. I don't know if this is some kind of bug, I don't know how to investigate. EDIT: ah, there's probably nothing happening here. Firefox's javascript is just slower. When the game used to be simpler, my firefox was able to do 60fps and not more, since it's locked by the monitor.
@Bvngee
@Bvngee 2 ай бұрын
1:33:07 lol bitrate was not happy about that
@bossgd100
@bossgd100 2 ай бұрын
Can you implement the rollback netcode ? i know its hard but i think you can do it
@000TheMatheus000
@000TheMatheus000 2 ай бұрын
LOCKED 60 FPS in the end. awesomee
@Czeckie
@Czeckie 2 ай бұрын
wasnt streaming
@theevilcottonball
@theevilcottonball 2 ай бұрын
@@Czeckie Or he implemented some faster code in the mean time and spoilered it.
@waltherstolzing9719
@waltherstolzing9719 2 ай бұрын
Does that mean WASM is better than C? Oh no! I'm getting a spwasm!
@hovhadovah
@hovhadovah 2 ай бұрын
"Porn Folder: 43.1 GiB (too smol PepeHands)" 😭
@Y1001
@Y1001 2 ай бұрын
1:10 when people argue that they like javascript (or whatever programming language), most of the time it's just that it's the language they know the most and are scared to go into something they dont know or have to learn new things or cant do the things the way they know how to. So they interpret or express that as being "better".
@Herw768Offcial
@Herw768Offcial 2 ай бұрын
I personally like JS's object, it's like a Lua table except 40x more powerful and modern. The fake not-fake OOP in it is also perfectly understandable. It's not that bad.
@Alex-kb2ws
@Alex-kb2ws 2 ай бұрын
I like javascript (typescript actually) and I worked professionally with js, C#, python and tried on my own C/++, Julia, F#, elixir (each at least one full personal proiect). It's my 2nd favorite language and my favorite language from the ones that you can get paid for using on a commercial project. It's quite expressive, easy to learn but with powerful features/ paradigms for advanced programmers and has a mature ecosystem. If it ever gets rid of the reverse compatibility weirdness and gets and official type system I would have absolutely no complains about the language.
@Dr-Zed
@Dr-Zed 2 ай бұрын
This game actually runs at 120 FPS on my phone
@hubstrangers3450
@hubstrangers3450 2 ай бұрын
Thank you....
@bossgd100
@bossgd100 2 ай бұрын
Where did you learn computer graphics ?
@outcoked
@outcoked 2 ай бұрын
embedded programming when
@Quantum_Nebula
@Quantum_Nebula 2 ай бұрын
damn, he went from 38-40fps in JavaScript to capping at 60fps in web assembly
@Sammysapphira
@Sammysapphira 2 ай бұрын
Duh? Javascript isn't meant for graphics rendering
@Quantum_Nebula
@Quantum_Nebula 2 ай бұрын
@@Sammysapphira yeah, it's still cool to see him write something in JavaScript and then see it converted to web assembly like that. Cool as hell. Was curious if react or some web framework could start using this to boost web performance.
@avraamlinkoln2004
@avraamlinkoln2004 2 ай бұрын
It was 60 at the end because he didn't stream, not because of c3
@DART2WADER
@DART2WADER 2 ай бұрын
1:07:41 Я бы объявил функцию RGBA в СЗ выше, возвращающую цвет.)))
@victordvickie
@victordvickie 2 ай бұрын
POG
@Odod4000
@Odod4000 2 ай бұрын
New Stream YAY
@GreenRiver_Studio
@GreenRiver_Studio 2 ай бұрын
Very interesting.
@blastygamez
@blastygamez 2 ай бұрын
I agree
@mikejohneviota9293
@mikejohneviota9293 2 ай бұрын
😮 holy moly
@danser_theplayer01
@danser_theplayer01 2 ай бұрын
mmmmm Nu. Imma use electron-vite.
@johanavril1691
@johanavril1691 2 ай бұрын
zig
@mangocane8977
@mangocane8977 2 ай бұрын
No zigooners allowed
@explqicot3293
@explqicot3293 2 ай бұрын
I remember looking at wasm around 2018 I believe
@antropod
@antropod 2 ай бұрын
I miss Nob
@JoãoLopes-c8y
@JoãoLopes-c8y 2 ай бұрын
Would it be OK for you to create a Mastodon account? I am from Brazil and X is unfortunately blocked in my country, but I love your content and I want to know what are you up to 🤣🤣🤣🤣
@sanalyny2807
@sanalyny2807 2 ай бұрын
Start watching on 21:40, can anyone say me where is beat from?
@dasten123
@dasten123 2 ай бұрын
Darude - Sandstorm
@thesenamesaretaken
@thesenamesaretaken 2 ай бұрын
I'm probably off the mark but what with the cuppa tea it reminds me of Bottom - Gas man by Guru mediator
@bbrother92
@bbrother92 2 ай бұрын
What is WebAssembly for? Is this JS?
@MaximShershen
@MaximShershen 23 күн бұрын
it's for making hard computations fast
@bbrother92
@bbrother92 23 күн бұрын
@@MaximShershen so why don't all websites use this?
@MaximShershen
@MaximShershen 23 күн бұрын
@@bbrother92 every website do use javascript as main tool for manipulating with DOM.
@MaximShershen
@MaximShershen 2 күн бұрын
​@@bbrother92 Because WebAssembly has appeared recently and it's not stable now
@kawaikaede2269
@kawaikaede2269 2 ай бұрын
Epic wasm club
@nikbl4k
@nikbl4k 2 ай бұрын
doesnt help w/ non-standard text
@WomboBraker
@WomboBraker 2 ай бұрын
haha this man is a genius
@alvaronaranjo2589
@alvaronaranjo2589 2 ай бұрын
2:17:23 que loco!
@eliseulucenabarros3920
@eliseulucenabarros3920 Ай бұрын
next time use Odin!
@daadaptar
@daadaptar 2 ай бұрын
right
@SankuroSanki
@SankuroSanki 2 ай бұрын
Я не знаю англійської, але звучить ніби ти дуже круто щось пояснюєш
@_start
@_start 2 ай бұрын
0.1 seconds 0 views lil bro fell off
@alexanderheim9690
@alexanderheim9690 2 ай бұрын
blud thought he was cooking
@FaZekiller-qe3uf
@FaZekiller-qe3uf 2 ай бұрын
This comment trend fell off less than two days after it started. That was a long time ago. You're a lame late spammer.
@juniorceccon
@juniorceccon 2 ай бұрын
Is this the new "first"?
@hoyoreverse
@hoyoreverse 2 ай бұрын
​@@juniorceccon did you mean "drop-in replacement"? Yeah it seems
@zekiz774
@zekiz774 2 ай бұрын
@@juniorcecconit’s quite old actually. Haven’t seen such a comment in a while.
@itsatomtech
@itsatomtech 2 ай бұрын
🎉 what is this
@Proace15
@Proace15 2 ай бұрын
2:14:20 15 28
@nymez6968
@nymez6968 2 ай бұрын
WebAssembly is a failure by design. You can‘t access the DOM or interact with the Browser directly. Which makes it pretty useless for most things apart from maybe offloading some heavy lifting for performance. I was super hyped but so far only had one use case where it made sense (parsing some file format where there was a library in Rust but none in TypeScript).
@tsgraphics1
@tsgraphics1 2 ай бұрын
Stockholm syndrome. 🤣
@godsservant1092
@godsservant1092 2 ай бұрын
Jesus Christ loves you. He died on the cross for all our sin.
@nil0bject
@nil0bject 2 ай бұрын
#StopKillingGames
@j.r.r.tolkien8724
@j.r.r.tolkien8724 2 ай бұрын
"You like Stockholm syndrome" said the guy that programs in C and uses JavaScript for other than its main purposes and it works.
@theevilcottonball
@theevilcottonball 2 ай бұрын
He actually has Stockholm syndrome with C. Its okay I have that too.
@j.r.r.tolkien8724
@j.r.r.tolkien8724 2 ай бұрын
@@theevilcottonball I know. I meant it partially as a compliment. I love C but I couldn't actually do what he does. It's impressive.
@jungervin8765
@jungervin8765 2 ай бұрын
The reality is no one cares. You care because you are a nerd and this is how you make money. But in the real world not everyone should use wasm, not even for games.
@specy_
@specy_ 2 ай бұрын
Figma, Google docs, Photoshop, twitch, zoom, meets, cloudflare, docker, unity, Spotify, Tesla, netflix... List goes on. Wasm is being used, and not very many people know it, you should definitely learn it
@tth-coulid
@tth-coulid 2 ай бұрын
Learn flutter bro it is better. #notForJobInAmerica.
@normaltaro
@normaltaro 2 ай бұрын
flutter deez nutszz
@ZedDevStuff
@ZedDevStuff 2 ай бұрын
It's good on native devices but it sucks in the browser
@tth-coulid
@tth-coulid 2 ай бұрын
@@ZedDevStuff Good on native devices is enough for me. But the performance on browsers is not that bad after loading.
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 150 М.
I regret doing this...
1:20:07
Tsoding Daily
Рет қаралды 84 М.
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 2,3 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 1,6 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 7 МЛН
Is this the WORST CODE I've EVER SEEN? // Code Review
24:28
The Cherno
Рет қаралды 70 М.
What’s Up with Laravel? It’s Everywhere, and Here’s Why!
6:22
Why Just In Time Coding Is More Effective
7:36
Senior Code Review Buddy
Рет қаралды 3,5 М.
Just enough C to have fun
39:29
Kay Lack
Рет қаралды 62 М.
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 195 М.
I Don't Need No Silly Frameworks You Can't Live Without
2:37:59
Tsoding Daily
Рет қаралды 35 М.
Mojo🔥: a deep dive on ownership with Chris Lattner
48:50
WASM on Backend is the Future
3:31:13
Tsoding Daily
Рет қаралды 34 М.
Кто-то купил WinRar? #shorts #шортс #новости #факты
0:53
This is Хорошо
Рет қаралды 4,3 МЛН
Apple Intelligence vs Galaxy Ai✨ #Shorts
0:19
lifegoodd
Рет қаралды 3,8 МЛН
Tesla Phone ВЫЙДЕТ!?
0:39
ÉЖИ АКСЁНОВ
Рет қаралды 248 М.
Did you know you can test a battery like this? 🪫🔋😳
0:13
scottsreality
Рет қаралды 2,7 МЛН
Durability test of Galaxy Note 8 vs S24 Ultra 😁 #galaxynote8 #s24ultra #iphonexr
0:28
Samsung® telefonlara dair herşey
Рет қаралды 27 МЛН
90 FPS ЗА 30.000 РУБЛЕЙ
9:06
Игорь Линк
Рет қаралды 79 М.