Recorded live on twitch, GET IN / theprimeagen MY MAIN YT CHANNEL: Has well edited engineering videos / theprimeagen Discord / discord Have something for me to read or react to?: / theprimeagenreact
Пікірлер: 120
@farqueueman Жыл бұрын
I'm waiting for them to announce a new JS framework written in WASIX... cause why not. Bwazingwy fwast ♥
@ThePrimeTimeagen Жыл бұрын
uwu
@KaidenBird Жыл бұрын
@@ThePrimeTimeagen 📸📸📸📸📸
@zahawolfe Жыл бұрын
WASM on the browser and server is very very exciting. It really feels like it's fulfilling on the dream of the JVM. Additionally, it's very cool and exciting to be able to write libraries in one language, and have them easily callable in other languages through the WASM interface is amazing. I hope for a future where each language can get the benefits of other languages and we don't have to rewrite libraries in every new language. It would also mean that when you write a new language, you automatically get all the libraries that already exist for wasm.
@stanstrum Жыл бұрын
I totally agree. It seems to me they’re finally completing what JavaApplets set out to accomplish. I remember playing Minecraft on Internet Explorer and how simply it worked, but I imagine it was hell to implement. This seems like such an improvement over that from start to finish.
@w1keee Жыл бұрын
my hope is in the actually portable executable project, they've already figured out how to run the same file on win, mac, linux, the bsds and bios, so i hope that it's possible to have it run in wasm as well
@anyadatzaklatszjutub Жыл бұрын
Wooow, I didn’t even think about that, but you are absolutely right! That would be so cool… plus on a personal note, being a dirty webdev, this is the first thing that let’s me truly branch out, without having to start from scratch… you know what I mean?
@VACatholic Жыл бұрын
NestedVM provides binary translation for Java Bytecode. This is done by having GCC compile to a MIPS binary which is then translated to a Java class file. Hence any application written in C, C++, Fortran, or any other language supported by GCC can be run in 100% pure Java with no source changes.
@Dylan-jp4vw2 ай бұрын
Damn I needed this 2 years ago
@anlumo1 Жыл бұрын
I'm also very excited about the possibilities of wasm, so much so that I'm currently trying to get a project funded that uses wasmer at its core, and all business logic is planned to be written in wasm. One big aspect of this is that I then can write modules in Rust and integrate them easily without forcing everybody else to also use Rust. Use whatever you want, as long as it compiles to wasm.
@soumen_pradhan Жыл бұрын
Will it be running in containers ?
@anlumo1 Жыл бұрын
@@soumen_pradhan It's a desktop and web application, so no Docker or something like that. The modules themselves are naturally sandboxed, so I don't need anything in addition to wasmer.
@soumen_pradhan Жыл бұрын
@@anlumo1 Ah, I see. Hope this trend happens and we get less electron apps.
@NateLevin Жыл бұрын
I don't know about Wasmer... shady CEO, poor internal management, a myriad of other problems
@bdafeesh Жыл бұрын
Wasix is the answer we've all needed. File directories? Sockets?!? Count me in, but hopefully security will still be a high priority (specifically with sockets).
@DMWatchesYoutube Жыл бұрын
its a bilingual jvm, its a good idea because you can write your code in so many languages that compile to wasm now and then just have it run in a nice sandbox
@NathanHedglin Жыл бұрын
Exactly.
@KadenCartwright Жыл бұрын
Just recently had a deployment call where we had to stay up til 1:30 because of erratic issues with our deployment. We switched hosted zones, migrating our domain along with all compute from one AWS account to another, and the devOps guy didn’t think to set the TTL on the name servers to something less than the original 48 hours. Some users were directed to the old instances of everything for the next 48 hours and our business units were absolutely losing their minds because they didn’t understand what was happening
@calder-ty Жыл бұрын
Who needs Solar Flares to flip bits randomly, when DNS will get you every-time for free.
@Gahlfe123 Жыл бұрын
i thikk this is the future steve jobs thought of when he thought apps would be made on the web browser before the app store was a thought. a platform for cross platform applications that run almost natively... i love it
@NathanHedglin Жыл бұрын
😂nah Apple hates the web. They don't get 30% of website revenue
@BlurryBit Жыл бұрын
Say it like “Woah Sex” 😂
@sebsplatter914 Жыл бұрын
Dude, I want to see what you are doing with wasmer, but I usually cant join the stream because of timezones and stuff. Can you just drop a hint somewhere on twitter or here that you are starting so I know when to go and watch recordings? Very excited!
@jkennethking Жыл бұрын
They need to update their tutorials and docs. Getting it running in the browser was, when I tried it last week, not working.
@schneefackel7053 Жыл бұрын
> WASM on the server > "look, we've replicated all of POSIX" Is this some kind of a joke? Everything that can compile to WASM can also compile to native code, so why not just go native then?
@nekomakhea9440 Жыл бұрын
POSIX on WASM sounds amazing. It kinda sounds like BSD's rump kernels, but OS agnostic.
@ThePrimeTimeagen Жыл бұрын
yeah, i think it could be amazing, especially the fact you can just run any program that can be wasm compiled on it.
@pauloffborba Жыл бұрын
It will be nice to see some examples
@Shri Жыл бұрын
7:05 why restart the system? DNS cache can be flushed easily no? Two commands: $ sudo systemd-resolve --flush-caches $ sudo resolvectl flush-caches Should do the trick?
@Wolfeur Жыл бұрын
I'm not very knowledgeable about this, what's the plu-value of WASM on the server compared to a normal compiling?
@javierflores09 Жыл бұрын
it's just the JVM all over again but better since you are not closed to a certain ecosystem as many languages compile to wasm
@Wolfeur Жыл бұрын
@@javierflores09 So basically the portability of Java with the perf of C/Rust/etc.?
@pazu8728 Жыл бұрын
This reminds me of "Rebol", created by Carl Sassenrath.
@VACatholic Жыл бұрын
So we're recreating the JVM, but this time calling it WASM, and that's going to make it work. I mean that makes total sense to me. I don't see how this could possibly fail!
@ThePrimeTimeagen Жыл бұрын
You are out of line... but you are right
@PeterBernardin Жыл бұрын
I mean you can write WASM in pretty much any statically typed language, so that's a plus. But besides that, I would like to understand more of its benefits over JVM. Is it more lightweight maybe? Not sure.
@zahawolfe Жыл бұрын
kzbin.info/www/bejne/o4jWfH5popp4lbM wasm is MUCH more lightweight and faster
@SimonBuchanNz Жыл бұрын
Main differences are: * Flat untyped memory * Instructions are direct matches to hardware * Therefore much simpler and faster to validate and JIT And with WASI/whatever is going on with interface types in general, the promise of a much stronger capability based security model than the standard java context. So, the JVM, but for C.
@VACatholic Жыл бұрын
@@ThePrimeTimeagen It's funny. When I was a young boy, I was told that technology X was a recreation of technology Y, and we're just remaking the same mistake. I thought the old veteran was crazy. Now I see the same thing, and I understand his pain.
@CyborusYT Жыл бұрын
A lot of work is still going into WASI adding the features WASIX provides (and many more!) with much improved security. I've seen from some of the people working on it that WASIX feels like something of a slap in the face. WASIX is made by Wasmer. It is just an API handed down from on-high (it is not open!), then turns around and accused WASI of being closed off and inaccessible (WASI is open!). Very unsettling.
@smithrightАй бұрын
Come back to this, Prime!
@jonforhan9196 Жыл бұрын
WASM is a compilation target
@sawood2010 Жыл бұрын
So do we keep JS around to getElementById things, and let wasm do the rest?
@ThePrimeTimeagen Жыл бұрын
maybe?
@tbfromsd Жыл бұрын
Many devs are still going to want high level abstractions and guardrails no matter how successful WASM is. I would imagine even if all event driven functionality is handled in C or Rust, JS will continue being used in UI. Or some subsets or libraries will be created on the low and high level to make day to day development more standardized. Either way I am amped, been setting aside time to really learn Rust. Being a Dev for 26 years I look forward to maybe my last era being a right tool for the job era, instead of the how do we make JS do this era that has dominated the last decade.
@dandogamer Жыл бұрын
@@tbfromsd I really hate the "do everything in JS era". Problem is it's like a fucking snowball. Everyone is making libraries for it which means when it comes to project time the choice is between using an existing js library or build it yourself. And companies want things done fast :(
@FaZekiller-qe3uf Жыл бұрын
Now I just have to wait for it to actually be ready.
@animanaut Жыл бұрын
looks like js kids need to learn to play with the new kid in the browser sandbox
@catcatcatcatcatcatcatcatcatca Жыл бұрын
DNS is easy. Just never use resources outside your LAN and memorise all the static addresses in it. If you want to use the guest wifi I need your MAC address.
@quachhengtony7651 Жыл бұрын
blazor wasm did it before it was cool
@daltonyon Жыл бұрын
Awesome, I'll take a look later
@stanrock80159 ай бұрын
did you deep dive this?
@ishikawako3521 Жыл бұрын
Why did he shout "tokio"? Perhaps is it "Juliana's Tokyo" by DJ John Robinson.
@marju101010 Жыл бұрын
Whats is the name of the book about networking?
@edhahaz Жыл бұрын
Java: Hey browser look at my new Applet feature! *Ughhhh no* Browser people 10 years later: Hey look what new cool feature we are inventing
@allesarfint Жыл бұрын
But no Java, so huge W
@sohn7767 Жыл бұрын
JavaApplets sucked for a reason
@ddystopia8091 Жыл бұрын
Why is it needed to run wasm on the server? We do know what hardware and architecture is on the server, couldn't we compile to native?
@NathanHedglin Жыл бұрын
Sure you can. WASM gets you closer to a container like environment with WASI(X)
@dungeonmir Жыл бұрын
I have a small question. Does the wasm, webgpu etc. found a solution to stop miners and other dangerous software from turning client into money farm?
@lubba64 Жыл бұрын
that's kind of a problem of any application out there. I don't think thats a specific issue with this stack.
@SimonBuchanNz Жыл бұрын
Browsers have mitigations, but if you go to a website for the purpose of using your CPU and GPU you don't want it complaining that it's actually doing that, so it's mostly focused on third party adverts trying that.
@dungeonmir Жыл бұрын
@@lubba64 I mean common website has no power over your gpu, but with all these new features(i mean webgpu and wasm) the danger of exposing your machine to malicious code is increasing, in my opinion
@MeriaDuck Жыл бұрын
In my world it is always TLS, not DNS that is causing havoc or headaches.
@dynamite-bud Жыл бұрын
In my world too 😢 compiling rustls to wasix
@aiomixrecords Жыл бұрын
indeed, any success with TLS + wasix?
@thingsiplay Жыл бұрын
WASM + WASIX = WASMIX
@JorgetePanete Жыл бұрын
WASMIX + WASI + JVM = WASABI
@_..-_-.._ Жыл бұрын
POSIX , WASIX ...
@kumarthangudu3061 Жыл бұрын
Wasmer is the future.
@noext7001 Жыл бұрын
still dont understand what is wasm and why use it
@dealloc Жыл бұрын
Portability and security.
@SimonBuchanNz Жыл бұрын
It's actually very simple. It's a small instruction set virtual machine designed for very fast JIT with good output. Unlike JavaScript or Java's environment, you have a flat memory model (an array of bytes) that you can arbitrarily read and write. The net result is you can compile C or Rust or whatever native language you want, then run it in any environment you want, with near native performance. You can compile a bunch of existing image compressors and run it in the browser, you can compile tiny 4 like functions and run them on edge servers spread all over the world, most use cases for docker are covered, as the tweet says, and so on. The only real limitations at the moment are technical things like SIMD for performance and that the host has to ferry data back and forwards across the interface, which is great for security but bad for performance in certain use cases like DOM modifications.
@SmugDarkLoser10 Жыл бұрын
People want a cross-platform standard hardware architecture + hw interfaces , but hardware is slow to evolve and very proprietary, so this is an attempt at building that in software. It makes sense, but technically the proper place to solve it is from the hw companies. Maybe if this is successful you'd see companies making wasm machines. It's really just a rehash of the JVM promise. Same shit really. Probably the right solution is not to build stuff on top of other stuff, since standardization of behavior by building a new uniform interface on top of the old cruft is pretty much a classic problem in software that is done repeatedly. Wasm seems like it's done well and smart, but the JVM is probably the same type of solution, and you can easily see if wasm were successful, that it'd add cruft over time, and then it's basically just another shitty layer in the middle of it all.
@Dylan-jp4vw2 ай бұрын
P2P hole punching is the future replacement in DNS
@PaulSebastianM Жыл бұрын
2:47 click on repeat! 😂
@sugasheeze Жыл бұрын
POSIX? Excuse me, it’s pronounced POO-SEX.
@JamesRouzier Жыл бұрын
forking can be tricky
@huynhtrung6338 Жыл бұрын
next video, could you do me a favor by putting the link of the talk in description? Thanks
@istovall2624 Жыл бұрын
Yet again I am here promoting blazor.
@viinz6139 Жыл бұрын
Nice :)
@NathanHedglin Жыл бұрын
Blazor is cool. Unfortunately probably won't ever be all that performant
@istovall2624 Жыл бұрын
@@NathanHedglin have 2 prod apps happen to be react and blazor wasm, only noticeable difference is wasm startup time is like 1 second longer. Should probably run tests, but there has been 0 customer complaints.
@viinz6139 Жыл бұрын
@@istovall2624 pretty much my experience with it, if startup isn't crucial it's really nice
@qchtohere8636 Жыл бұрын
Yey.. Another attack surface...
@im-essi Жыл бұрын
skill issue
@Originalimoc Жыл бұрын
Huh... Just checked out WASI then this came out.
@svaira Жыл бұрын
Do i understand this correctly, that, for example, you could jist write a webmailer without a backend, just with a raw unix socket on Imap? That would be pretty cool. Tofay you still have to reroute through a websocket proxy. I may have to wait until this actually works everywhere (I'm not quite sure about mobile atm), but in principle this seems very nice for web interfaces/clients to other services.
@anonymousalexander6005 Жыл бұрын
And it simplifies Server hosting significantly without relying on NodeJS or JVM runtimes locking you into JS.
@svaira Жыл бұрын
@@anonymousalexander6005 Or without writing your own websocket implementation, which is also not pleasant (let alone safe, since you have to add all the ssl stuff yourself then)
@m4rt_ Жыл бұрын
6:50 IT'S ALWAYS DNS
@monkev1199 Жыл бұрын
I recall someone was complaining about fork in wasix. And to be fair fork needs to die
@emok1ttyk4t Жыл бұрын
TOKIOOOO
@dickheadrecs Жыл бұрын
WASIX MAKES WASM LOOK LIKE WASFIVE
@dickheadrecs Жыл бұрын
you spoke. we listened. we put posix in ur wasm. finally u can fossick with opossums.
@jaysistar2711 Жыл бұрын
Do you know what your problem is? If not, then it's probably DNS. You're welcome!
@laughingvampire7555 Жыл бұрын
so you are talking a "write once run everywhere" mmm where the heck did I heard this before, o yea is called JAVA!!! basically they are reinventing JAVA & GraalVM
@Dylan-jp4vw2 ай бұрын
I hate DNS too
@AmeKniteCS Жыл бұрын
WASI is great, but WASIX ...
@heavymetalmixer91 Жыл бұрын
So . . . will finally Javascript die so I can throw it in the trash?
@happygofishing Жыл бұрын
java but no oracle
@covle9180 Жыл бұрын
It's always DNS.
@bigmandan Жыл бұрын
It's always DNS
@ariseyhun2085 Жыл бұрын
Sadly a lot of people, including myself, are not a fan of the wasmer company. Wasmtime are the real pioneers
@ko-Daegu Жыл бұрын
I love my code runing half the speed
@ariseyhun2085 Жыл бұрын
@@ko-Daegu no idea where you got that idea from. Wasmtime is typically faster. As a test, I just installed the latest versions of wasmtime and wasmer, and wrote a basic fibonachi benchmark (fib(47)) in Rust and ran using wasmtime and wasmer: Wasmer: 23.27 seconds Wasmtime: 23.13 seconds Edit: It turns out it was much faster using the --llvm flag for wasmer, but not sure why this isn't default
@dynamite-bud Жыл бұрын
It's not on default because it takes too long to compile. Wasmer offers three backends single-pass, cranelift from wasmtime and LLVM. Each with their advantages. I think by default you ran cranelift.
@laughingvampire7555 Жыл бұрын
well, the main problem is the UNIX zealots, don't get me wrong, I like the idea of UNIX philosophy but the problem is that is still stuck in the 1970s with the minimalist ALGOL-ish approach, remember that C is ALGOL stripped of all its features. UNIX zealotry never allowed for something like WASI
@Robert-ht5kd Жыл бұрын
Why do you need async? For example Go pretends to have async but under the hood it uses threads that sleep when they wait for reply/data.