HELLO WEBASSEMBLY - A BEGINNERS TUTORIAL TO CODING WEBASSEMBLY (WASM) BY HAND.

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

ความคิดเห็น • 85

  • @silasmarrs1409
    @silasmarrs1409 2 ปีที่แล้ว +10

    I just want to say thank you for this. There are certain programming concepts that don't click for me until they are explained at the byte-level, and this really helped me understand what was going on at a deeper level than any other video I've seen on the topic!

  • @aperson4051
    @aperson4051 3 ปีที่แล้ว +10

    Great video! 25:24 - The final WASM binary is only actually 43 bytes! You highlighted the .wat text version :)

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      hahaha doh!!! thank you, glad you enjoyed

  • @luciano.7b6
    @luciano.7b6 3 ปีที่แล้ว +1

    Hi! I'm from Brazil, I was looking for video tutorial about WEBASSEMBLY and I found this. I'm glad I found you Chris Hay.

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว +3

      Glad it was helpful!

  • @sourdface
    @sourdface ปีที่แล้ว +3

    The bytecode generated was surprisingly easy to understand with the comments given.

  • @jorgegomes83
    @jorgegomes83 2 ปีที่แล้ว +3

    Great content you have here. I was looking for something like this to get started messing with wasm.
    Many thanks!

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว

      Glad it was helpful!

  • @jamesmccafferty8869
    @jamesmccafferty8869 3 ปีที่แล้ว +1

    Great video. Just saved me a few days of digging

  • @migom6
    @migom6 3 ปีที่แล้ว +7

    More web assembly please ❤️

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      I have some more in the pipeline :) thanks for the great comment

  • @109Rage
    @109Rage 3 ปีที่แล้ว +6

    0:14 - "You're probably never going to hand-code WebAssembly for real world projects"
    Me, deciding to hand-code a compiler in WebAssembly: 🙃

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      wooohooooo, that sounds like a lot of fun

  • @caseyonline
    @caseyonline 3 ปีที่แล้ว +2

    awesome .. perfect level of instructional details.

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      Glad you liked it!

  • @henrmota
    @henrmota ปีที่แล้ว

    I noticed that you bring very interesting topics to discussion. Maybe you could make a video explaining how do you learn this new and complex things, and what basic knowledge we should have to investigate this topics by ourselves.

  • @johnhanley2431
    @johnhanley2431 2 ปีที่แล้ว +1

    Bravo. Videos of this quality spark new ideas.

  • @mineeduka4488
    @mineeduka4488 ปีที่แล้ว

    Wow beautiful it is strong type and it has a stack. So beautiful ❤️

  • @jomy10-games
    @jomy10-games 2 ปีที่แล้ว +2

    This is exactly what I was looking for. This will be a great challenge

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว +1

      glad it's useful

  • @faris.abuali
    @faris.abuali 2 ปีที่แล้ว +1

    Thanks!
    Learned a lot from you

  • @safiaguellil3660
    @safiaguellil3660 ปีที่แล้ว

    Thank you very much!
    Very useful and interesting!

  • @zbighugh9193
    @zbighugh9193 2 ปีที่แล้ว

    When I ran "node server.js" I got a "Cannot use import statement outside a module" error. I found out you have to add "type": "module", to package.json like {
    "type": "module",
    "dependencies": {
    "express": "^4.18.1"
    }
    }
    and that fixed the problem. Also, it was not clear that the test.html should be placed in the 'public' folder. But great tutorial. Got everything to work.

  • @MikeNugget
    @MikeNugget 3 ปีที่แล้ว +5

    Would be nice to discuss real examples of using wasm, when and why should it be used. In my opinion the real case is intensive calculations or complex maths but just array sorting.

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว +3

      good shout.. i have a plan for a video on that soon... there is some killer use-cases especially around sandboxing in paas/saas environments

    • @rishikadhikari6326
      @rishikadhikari6326 2 ปีที่แล้ว +2

      To allow complex applications such as AutoCAD to run on the web

    • @MikeNugget
      @MikeNugget 2 ปีที่แล้ว

      @@rishikadhikari6326 Nice one. But I think WASM application is more narrow like transferring some tools written in one language as ffmpeg rather than porting the entire ecosystem because then everything would be run in the browser.

    • @rishikadhikari6326
      @rishikadhikari6326 2 ปีที่แล้ว +1

      @@MikeNugget Figma has its main design engine implemented using web assembly and big companies like adobe are trying to do the same thing. Web assembly is just amazing. Waiting for it to be more advanced.

    • @MikeNugget
      @MikeNugget 2 ปีที่แล้ว

      @@rishikadhikari6326 I know I know, but you can't simply port large desktop app to the web and just run it in your browser unless it was made in some cross platform engine or framework. So let's hope that WASM support will be more developed in game engines and frameworks.

  • @sau002
    @sau002 2 ปีที่แล้ว +1

    Excellent

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว

      Thank you so much 😀

  •  3 ปีที่แล้ว +1

    Amazing, man!

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      Thank you! Cheers!

  • @dmitryponyatov2158
    @dmitryponyatov2158 3 ปีที่แล้ว +2

    Is WASM has some movement toward being itself as a generic runtime both for web backend and frontend?
    front/back convergence will be great for things like data exchange without serialization (VM-native binary messages), and code sharing

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว +1

      i think it's early, but i see it coming

  • @IasonOrlandosOx
    @IasonOrlandosOx ปีที่แล้ว

    Thanks ! Great one

  • @AnasAlZuvix
    @AnasAlZuvix 3 ปีที่แล้ว

    We need more video on WEBASSEMBLY.

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      maybe check out my vid on webassembly stack machine... th-cam.com/video/Hq_cj77fuqo/w-d-xo.html

  • @dmitryponyatov2158
    @dmitryponyatov2158 3 ปีที่แล้ว +1

    What learning resources can you recommend if I want to write my own frontend language using WASM that mixes Smalltalk and Erlang features?
    I don't mean basics like Dragon or Blue books, but maybe some live coding sessions available, or detailed descriptions of how message-based languages can be implemented step by step.

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      i think binaryen is good place to start.. github.com/WebAssembly/binaryen it's what assemblyscript uses.. i do plan to do a vid at some point but it's probs a little bit away on the backlog

  • @bendo01
    @bendo01 3 ปีที่แล้ว

    Thank You so much for these videos

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      You are so welcome!

  • @parkrw
    @parkrw 2 ปีที่แล้ว +1

    Do you have in mind including golang/wasm like rust / wasmt ??

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว

      Yeah happy to do so, I jump around different languages quite a bit, so wasn’t sure if folks wanna see me code in another lanaguage loool, happy to do Go, it’s a language I very much enjoy coding in

  • @gregoryshields4258
    @gregoryshields4258 2 ปีที่แล้ว +1

    I’m curious what is that app you’re drawing on. Apparently you’re using a stylus on your iPad?

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว +1

      GoodNotes is the app, and yes using a stylus with my ipad

    • @gregoryshields4258
      @gregoryshields4258 2 ปีที่แล้ว

      @@chrishayuk Thanks!

  • @benjaminmoseslieb9856
    @benjaminmoseslieb9856 ปีที่แล้ว

    Great video. At 15:28 is that really "binary"? I've heard that some people use machine, binary, assembly and byte code interchangeably, but aren't there important differences?

  • @mandeadaniel1314
    @mandeadaniel1314 3 ปีที่แล้ว +1

    Nicee 🚀🙌

  • @JackyPup
    @JackyPup ปีที่แล้ว

    Is there a market for web_assembly?

  • @agumonkey
    @agumonkey 3 ปีที่แล้ว +1

    wasm bringing lisp and forth through the backdoor. #RPL

  • @andrewgibson8794
    @andrewgibson8794 ปีที่แล้ว

    Any good books to learn this?

  • @PaulFidika
    @PaulFidika 2 ปีที่แล้ว +3

    I am so disappointed that they went with .wat for the file extension name rather than .wtf (webassembly text format)

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว +1

      loooool, i never made the connection

  • @darkmojojojo
    @darkmojojojo 2 ปีที่แล้ว

    Some sample code downloads would be good too. I copied this pretty much to the letter and node won't compile so I have no idea what I'm doing wrong and since you copy-pasted code it's possible I missed something.

  • @DuyTran-ss4lu
    @DuyTran-ss4lu 2 ปีที่แล้ว +1

    Awesome

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว

      thank you, glad you liked 😀

  • @timexpeachtree
    @timexpeachtree 3 ปีที่แล้ว +2

    This is great 👍, I believe all Blazor 🔥 devs who want to be pro level, must see this 🙌

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว +1

      thanks for the kind comments. got more to come on webassembly...

  • @enjoywatching2700
    @enjoywatching2700 3 ปีที่แล้ว +1

    very nice 👍

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      glad the webassembly vids are hitting with you, and thanks for commenting

  • @rmschindler144
    @rmschindler144 6 หลายเดือนก่อน

    installing WABT: on macOS, with Homebrew: `brew install wabt`

  • @okposongebong4066
    @okposongebong4066 2 ปีที่แล้ว +1

    Hi, thanks for shaing... You said you were lazy by calling the local.get 0 twice. Hiw else would you write this?

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว +1

      i was thinking about creating a function that would be a power rather than a square which would give reusability.

  • @claytonsurgeon
    @claytonsurgeon 3 ปีที่แล้ว

    Much appreciated

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      Thanks for the kind words, glad it was useful

  • @_realist_6957
    @_realist_6957 2 ปีที่แล้ว +1

    your eyes expressions are dangerous XD

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว

      Hahaha hadn’t noticed that before

  • @cadetriestocode
    @cadetriestocode 3 ปีที่แล้ว +3

    Wow web assembly is very lispy

  • @niketanjha
    @niketanjha 3 ปีที่แล้ว

    Great.

  • @satya4866
    @satya4866 3 ปีที่แล้ว

    Cool

    • @chrishayuk
      @chrishayuk  3 ปีที่แล้ว

      thank you so much

  • @mineeduka4488
    @mineeduka4488 ปีที่แล้ว

    You're using a dark room and i don't understand why. Dark room is pain for eyes

  • @chudchadanstud
    @chudchadanstud 2 ปีที่แล้ว

    wat?

  • @Yas-gs8cm
    @Yas-gs8cm 2 ปีที่แล้ว +1

    bruh, that's just lisp

    • @chrishayuk
      @chrishayuk  2 ปีที่แล้ว

      it's very stylistically close to lisp due to the use of S-Expressions

  • @TheChrisey
    @TheChrisey 2 ปีที่แล้ว

    Keep in mind that even though web assembly is much faster than JS, it is no way near native performance. virtual machine code and managed memory is still several times slower than native code.

  • @darkmojojojo
    @darkmojojojo 2 ปีที่แล้ว

    I'm getting:
    await WebAssembly
    ^^^^^
    SyntaxError: Unexpected reserved word

    • @darkmojojojo
      @darkmojojojo 2 ปีที่แล้ว

      So apparently I had an old install of node so problem solved.

  • @electrotsmishar
    @electrotsmishar 2 ปีที่แล้ว +1

    lovely