WASM on Backend is the Future

  Рет қаралды 36,104

Tsoding Daily

Tsoding Daily

Күн бұрын

Пікірлер: 123
@chaqua1559
@chaqua1559 3 ай бұрын
Time to take a break from coding by watching Code
@cococry
@cococry 3 ай бұрын
based
@Y1001
@Y1001 3 ай бұрын
too real
@TiaguinhouGFX
@TiaguinhouGFX 3 ай бұрын
it's for real a relief, because when you get stressed out/tired you get to watch other people build something and throughout the whole process it's them doing the thinking, and it's us getting the reward of them being successful.
@rvft
@rvft 3 ай бұрын
Bro just like me fr fr
@soroushyaghoubi7709
@soroushyaghoubi7709 3 ай бұрын
@@cococrybased
@WiseWeeabo
@WiseWeeabo 3 ай бұрын
Javascript, never supposed to be a programming language, used only because browsers can't agree on anything, ends up somehow being used in the backend, but because it's so bad, we're now compiling real languages into a web version of assembly so that we can run it on a js runtime in the backend.. cool
@brambasiel
@brambasiel 3 ай бұрын
Node.js was made to have a singular programming language for both frontend and backend programming, reducing the need of writing interop code. It was the best solution for it's time. Front-end and back-end devs became fullstack developers at the cost of performance. Keep in mind that wasm did not exist back then.
@owlmostdead9492
@owlmostdead9492 3 ай бұрын
Javascript is the perfect example of the sunken cost fallacy.
@WiseWeeabo
@WiseWeeabo 3 ай бұрын
​@@brambasiel you realize WASM works on the front-end as well, right? the rational thing to do would be now to use the same language on the front-end as the back-end, and have it not be JavaScript (or Node)~
@brambasiel
@brambasiel 3 ай бұрын
​@@WiseWeeabo Yeah that's what the Rust and C# Blazor people have been doing for years which has not really taken of... Unfortunately WASM is still slow for interacting with dom elements and I think that native code will lead to larger bundle sizes than JS: The inevitable over-reliance on emscriptem and bringing your own language runtime instead of using browser provided features will have the opposite effect and make the web even slower to **load** than it already is. A bloated WASM will be a 10MB file load while a bloated JS bundle will be more like a 2-5MB download. If Twitch decided to rewrite their entire site in WASM I doubt they will be using a slick low level programming language like C or C3. Tsoding is using WASM for its best possible usecase, canvas and doing heavy math. Try doing React level DOM operations in WASM and your solution will be likely more bloated than using React itself, at least with the current WASM tech available.
@brambasiel
@brambasiel 3 ай бұрын
​@@WiseWeeabo (I think my response message got deleted, so here is the summary of it) The Rust and C# Blazor people have been doing this for years which never really took off. Tsoding is using WASM for it's best usecase, doing canvas and heavy math. Current wasm is slower than JS for doing DOM manipulations. I think the inevitable over-relience on emscriptem will make wasm bundles bigger than js bundles. Big companies won't be using sleek low level languages like C or C3 if they rewrite their sites in WASM. Imagine the equivalent of something like C++ Boost being shipped with every wasm bundle. (And I don't think Rust would be better.) The average webdev does not care about low level programming, they care about development speed and making money. (sadge but true)
@arhantalwar
@arhantalwar 3 ай бұрын
Fuck, That thumbnail is dope.
@luanbravo4401
@luanbravo4401 3 ай бұрын
Also Tsoding 2 videos ago: C3 -> 8==D
@luanbravo4401
@luanbravo4401 3 ай бұрын
Shout out to all russians who also don't have twitter, like us Brazilian. Keep up the awesome content!
@nyyakko
@nyyakko 3 ай бұрын
e que por favor nunca mais volte!! kkkkkkkkkk
@benisrood
@benisrood 3 ай бұрын
​@@nyyakkoyou mean because people are better off without twatter?
@brambasiel
@brambasiel 3 ай бұрын
almost sounds like a luxury tbh
@pesterenan
@pesterenan 3 ай бұрын
The best thing that has ever happened to us. A melhor coisa que já aconteceu pra gente. Я не знаю, как написать вышесказанное по-русски.
@caio757
@caio757 3 ай бұрын
É triste nossa realidade
@sukaisnaini1843
@sukaisnaini1843 3 ай бұрын
ceiling written in C2 floor in C3 and wall in C4 hehe.
@dorianligthart3378
@dorianligthart3378 3 ай бұрын
tsodin' explodin'
@dmitrypatriarkh9757
@dmitrypatriarkh9757 3 ай бұрын
Next must be Interlude i guess
@houssembousmaha3615
@houssembousmaha3615 3 ай бұрын
I always preferred married responsibily principle
@lenk172
@lenk172 3 ай бұрын
I try to have as much coupling in my code as possible
@tristeub997
@tristeub997 3 ай бұрын
This is really great quality content.
@chriswinslow
@chriswinslow 3 ай бұрын
@02:37:59 Accidently coded in Doppler effect. I was thinking, can other players hear bombs explode which other players throw? Maybe depending on how far away the explosion is the quieter the volume of the explosion should be?
@00000masnnnnnnnnnnnnn
@00000masnnnnnnnnnnnnn 3 ай бұрын
Watching from Pakistan from my mobile 4G data. Bought the data package just to watch videos on this channel.
@KnThSelf2ThSelfBTrue
@KnThSelf2ThSelfBTrue 3 ай бұрын
I have an idea to kill full-stack TypeScript: I always thought it'd be cool to be able to jump-to-definition from something calling a function in WASM to the original source code function, and to use that bridge to also cross the client-server boundary at the same time that you're potentially crossing a language boundary. I know that with a naming convention you can basically accomplish the same thing- you just take three seconds to grep and open a file, but I seriously think that saving three seconds at that moment is the biggest reason people still want to use full-stack TypeScript.
@Shrek_The_Mathematician
@Shrek_The_Mathematician 3 ай бұрын
Sadly until we get DOM bindings directly in WASM we will never be able to fully kill JS/TS
@SamualN
@SamualN 3 ай бұрын
The reason JS still persists on the frontend is because for WASM to be able to manipulate the DOM, it has to call out into JS glue code which has much more performance overhead than just using JS to do DOM manipulation. The other thing WASM sucks at compared to JS is bundle size. People laugh at some websites serving you >1MB of JS but good websites should never serve you more than 300KiB of JS. For WASM, big binaries are just the norm. And if you have JS on the frontend, it becomes very convenient to have JS on the backend since you can share lots of code. Like you'll never be in a situation where the form validator on the client disagrees with the form validator on the server because they should be running the exact same code on both. The one thing WASM tends to have JS beat on is performance intensive calculations like re-encoding an image from JPEG to WebP for example. Those sort of operations are perfect for doing in a Web Worker in WASM. There are some cool fullstack rust based frameworks like Leptos but they tend to be pre-1.0 and not quite ready for production yet. I''m keeping my eye on them though.
@Tigregalis
@Tigregalis 3 ай бұрын
@@SamualN The "glue code" argument is no longer true, the overhead is almost irrelevant: which is to say that if/when WASM gets direct access to the DOM, it's not going to be faster. It's actually the cost of serialising/deserialising UTF16 strings (JS) from UTF8 strings (most compiled languages) and vice versa that's the cause of slowdown. WASM binary size is definitely a problem though.
@SamualN
@SamualN 3 ай бұрын
@@Tigregalis the text encoding conversion is what I was mostly referring to when talking about WASM having to go through glue code is talk to the DOM (though I should have directly stated it). I would hope that if they ever let WASM talk directly to the DOM, WASM will be allowed to speak UTF-8
@daysofend
@daysofend 3 ай бұрын
@@SamualN The reason JS exists is because it's not that bad. It's very flexible, it has a huge community, and V8 is a beast. People will just compile JS/TS to WASM.
@antropod
@antropod 3 ай бұрын
It would be funny to make a compiled language called ToyScript, which is not a toy language
@Seedwreck
@Seedwreck 3 ай бұрын
Rather it being full fledged with some like compiler/interpreter/transpile suite or some serialization shit lmaooo
@MatthewPherigo
@MatthewPherigo 3 ай бұрын
Have you looked into the Lunatic framework? It provides an Erlang-style VM for webassembly, they have a Rust version so you get Rust + Erlang style threads and messages.
@vinialves12362
@vinialves12362 3 ай бұрын
14:21 Brazil mentioned let's go (not for a good reason tho)
@jamesgphillips91
@jamesgphillips91 3 ай бұрын
id love to see your takes on Golem Cloud and wasicloud. The tooling for building wasm components is growing so fast!
@ecosta
@ecosta 3 ай бұрын
39:00 - "Temporary code". Hard to believe when I hear that at the exact moment I'm sadly looking at my screen while trying to remove some convoluted "temporary code" left by my team at work. With parts in TS as well, for extra irony....😆
@btarg1
@btarg1 3 ай бұрын
Why does his keyboard sound like a gamecube controller and where can I get one
@JoniSudeste
@JoniSudeste 3 ай бұрын
I understand none out of wasn, but you are really clear when speaking out your "programming thoughts" that is really conforting for us, noobs. thumbs up
@bbq1423
@bbq1423 3 ай бұрын
1:10:54 top level await is only available in module files and since the file extension is js and not mjs, it doesn’t use modules. A la Fortran .f90.
@averbenko
@averbenko 3 ай бұрын
Does standard library of C3 use fast square root when calculating distance between vectors? If not, then it makes sense to use squared distance (like it was in typescript code).
@thelazycoder64
@thelazycoder64 3 ай бұрын
27:13 we know your neighbors are aliens 👽
@remrevo3944
@remrevo3944 3 ай бұрын
23:52 Tsoding out here context shaming poor little LLMs.
@TsodingDaily
@TsodingDaily 3 ай бұрын
>little First L in LLM stands for "Large"
@ferdynandkiepski5026
@ferdynandkiepski5026 3 ай бұрын
With the amount of parameters this is beginning to look like win32. Just missing some defines making pointer types and magic values.
@Odod4000
@Odod4000 3 ай бұрын
NEW STREAM!! I love your videos! Very Cool! 😀
@Odod4000
@Odod4000 3 ай бұрын
When will you start making your own OS? 😀
@Beam_Teamer
@Beam_Teamer 3 ай бұрын
WebUrmom should be a twitch emote 🤣🤣
@southgonholditdown
@southgonholditdown 3 ай бұрын
Actually PHP on the backend is the future. Learn PHP now!
@ficolas2
@ficolas2 3 ай бұрын
no thx
@SlinkyD
@SlinkyD 3 ай бұрын
Old web dev is back?
@mxjeonsgw
@mxjeonsgw 3 ай бұрын
Nah I'm good like this. Thanks though.
@vitaliiivanov9514
@vitaliiivanov9514 3 ай бұрын
Let's run it in FE as well with Web Assembly! I will call this framework Web Ass!
@inspacesilence
@inspacesilence 3 ай бұрын
I am a newbie and programming since last year , i can build anything with the help of libraries but when it comes to start from scratch i feel like i am dumb and should give up on coding... plz help me how can i build anything from scratch like you do
@iamdozerq
@iamdozerq 3 ай бұрын
You should first have an idea what you want. Then try to make the most simple feature you can do now. From here you will be seeing code not blanket. Try to plan out every step first as far as you can without thinking too much, then do smallest step possible. Then watch your plan again.
@inspacesilence
@inspacesilence 3 ай бұрын
@@iamdozerq i'll definitely try this by starting with creating something very small
@vaolin1703
@vaolin1703 3 ай бұрын
Take courses in DSA and systems programming in case you haven’t already.
@jamiechristie7655
@jamiechristie7655 3 ай бұрын
common.c3 uses mem::new_array() to allocate wasm memory. Fair enough. I guess mem::new_array is a part of c3 standard lib. How do I do this in C (rather than C3) though? Can I use malloc()? I keep getting tangled up in std library difficulties. Is what I am trying even possible? (great content, by the way!)
@HatsuSixty
@HatsuSixty 3 ай бұрын
You cannot use the C standard library in web assembly. This is because the functions of C's standard library are located in libc, which contains native code, and can't be linked with web assembly. The way C3 solves that is by not linking with the standard library. Instead, the C3 compiler compiles the standard library and bundles it with your code. To use malloc in web assembly you would need to implement it yourself.
@jamiechristie7655
@jamiechristie7655 3 ай бұрын
@@HatsuSixty Thank for your explanation. That's a nifty trick by C3 - and probably why Tsoding chose C3. It might also explain why the c3c compiler appears - in the video - to take so long It's a shame it isn't easy to recompile libc.a to libc.wasm, and link with it. But I expect that gets tricky quickly (what would one do syscalls, for example). Running C->wasm in "node" is a new trick for me, and I'm rather enjoying playing with it. Such good content here. Love it. Thanks again for the reply.
@duckeggcarbonara
@duckeggcarbonara 3 ай бұрын
Check out the Onyx programming language which compiles solely to WASM and can do serves and client side code
@MarcelRobitaille
@MarcelRobitaille 2 ай бұрын
22:52 Would have worked in vim. Can your emacs do that? Can your emacs do that?
@artemiasalina1860
@artemiasalina1860 3 ай бұрын
If I ever get my name legally changed I'm going to change it to Max Long (and my middle name will be Web).
@xade8381
@xade8381 6 күн бұрын
thought you'd remove server dependency with WASM
@nathanpotter1334
@nathanpotter1334 3 ай бұрын
Mr. Zozin. Amazing content
@Xotchkass
@Xotchkass 3 ай бұрын
Why use WebAssembly on the backend if you can use... Assembly?
@vitaliiivanov9514
@vitaliiivanov9514 3 ай бұрын
Web Assembly can serve as an environment to run staff across different machines, pretty much like JVM
@niggacockball7995
@niggacockball7995 3 ай бұрын
because mobile devices use ARM chips while desktop uses X64 and they are different architectures meaning their instructions arent compatible.
@mibeon
@mibeon 3 ай бұрын
Брат по коду, расскажи немного о твоей машине. Что за железо, как настроенно окружение? Почему именно Debian? А как ты подключил таблет для рисования? Какой у тебя?
@iamdozerq
@iamdozerq 3 ай бұрын
Какой то мусор 10 летний у него, деб, и3, емакс, таблет просто воткнул и он заработал. С его же слов это все не важно и нужно только под себя настроить себе систему что бы ПИСАТЬ КОД. Смысла у него что то копировать никакого.
@nyyakko
@nyyakko 3 ай бұрын
Pog
@techviking2
@techviking2 3 ай бұрын
Use c4 when you render bombs. 🎉
@Seedwreck
@Seedwreck 3 ай бұрын
Web on the back, mind the web
@Seedwreck
@Seedwreck 3 ай бұрын
Maybe what we should be doing is just using ASM
@souvikpatrahowrah
@souvikpatrahowrah 3 ай бұрын
simd acceleration available?
@theevilcottonball
@theevilcottonball 3 ай бұрын
Partially, Ithink the C3 vector types can compile to SIMD.
@DART2WADER
@DART2WADER 3 ай бұрын
New framework - "nowade" by Tsoding .)))
@saurav4249
@saurav4249 3 ай бұрын
what text editor do you use ?
@maplepenguin8568
@maplepenguin8568 3 ай бұрын
He uses emacs
@saurav4249
@saurav4249 3 ай бұрын
@@maplepenguin8568 time to learn emacs
@lamaistul
@lamaistul 3 ай бұрын
AssemblyScript FTW
@GreggHarris-gm7ef
@GreggHarris-gm7ef 3 ай бұрын
THEYRE DRILLIN HWHAT?!
@JoseLucasd
@JoseLucasd 3 ай бұрын
Zozin make my life good
@bayzed
@bayzed 3 ай бұрын
ZOZIN! WE HAVE TO COOK, ZOZIN!
@aforum4459
@aforum4459 3 ай бұрын
lol just saw your folder name 1:58:49 (sorry I'm immature that cracked me up.)
@GreggHarris-gm7ef
@GreggHarris-gm7ef 3 ай бұрын
shouldve written it in zig
@RustIsWinning
@RustIsWinning 3 ай бұрын
C3 better
@GreggHarris-gm7ef
@GreggHarris-gm7ef 3 ай бұрын
@@RustIsWinning zig is the best. OF ALL TIME
@necmi030
@necmi030 3 ай бұрын
german part was pretty amusing
@FaZekiller-qe3uf
@FaZekiller-qe3uf 3 ай бұрын
Nwade
@keng_knyaz
@keng_knyaz 3 ай бұрын
rompompom
@slimanemimane2249
@slimanemimane2249 3 ай бұрын
Idk what to call ms zozin A web dev or a game dev
@mariomaliqi184
@mariomaliqi184 3 ай бұрын
Warum redest du so viel deutsch?
@James-l5s7k
@James-l5s7k 3 ай бұрын
32 bit future? LOL
@debadityamalakar
@debadityamalakar 3 ай бұрын
Third,Also based
@zcizzorhandz5567
@zcizzorhandz5567 3 ай бұрын
Im sorry but this is BS, it's the future of serverless but that's where it stops.No cloud service is going to make money with Wasm in compute. Only serverless
@eldonad
@eldonad 3 ай бұрын
nwade
@ettyxcbyrcburcbtxcfhcdtyurt
@ettyxcbyrcburcbtxcfhcdtyurt 3 ай бұрын
you need keeps hair treatment not youtube money
@VincentLAnderson
@VincentLAnderson 3 ай бұрын
I TOLD THEM, I WARNED THEM ALL,. NODE.WASM WAS INEVITABLE! THE CONSEQUENCE OF OUR FOLLY.
@Odod4000
@Odod4000 3 ай бұрын
ULONG_MAX 🤣🤣🤣
I Don't Need No Silly Frameworks You Can't Live Without
2:37:59
Tsoding Daily
Рет қаралды 37 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Async vs Multithreading
2:23:41
Tsoding Daily
Рет қаралды 26 М.
Your backend is too complicated
9:47
Isaac Harris-Holt
Рет қаралды 94 М.
Porffor: Compile Your JavaScript To WebAssembly
20:49
Theo - t3․gg
Рет қаралды 61 М.
You Don't Know Network Programming
2:20:44
Tsoding Daily
Рет қаралды 63 М.
Catching up with async Rust
17:55
fasterthanlime
Рет қаралды 24 М.
so i tried ghostty...
6:18
ThePrimeTime
Рет қаралды 201 М.
This is better than TempleOS
1:55:21
Tsoding Daily
Рет қаралды 102 М.
Where is Rust being used?
11:46
Let's Get Rusty
Рет қаралды 144 М.
WebAssembly On The Server??? Why?
13:42
Code to the Moon
Рет қаралды 38 М.