• Sloth Bytes
  • Posts
  • 🦥The Future of Web Development?: Web Assembly (WASM)

🦥The Future of Web Development?: Web Assembly (WASM)

In partnership with

Hello friends!

Welcome to this week’s Sloth Bytes.

Ancient sloths were the size of elephants.

Today, sloths are about the size of a dog. But ancient sloths, known as Megatherium, could grow to be the same size as Asian elephants. Unfortunately, they went extinct around 10,000 years ago.

WebAssembly (WASM)

What is WebAssembly?

WebAssembly (WASM) is a simple instruction format for a stack-based virtual machine. It's made to be a portable option for fast web applications.

Why WASM Matters:

  • Near-native performance in the browser

  • Language-agnostic (C, C++, Rust, etc. can compile to WASM)

  • Complements JavaScript, doesn't replace it

  • Enables complex applications in the browser

Key Features:

  1. Fast execution

  2. Compact binary format

  3. Open web standard

  4. Secure sandboxed execution

How WASM Works:

Real-World Use Cases:

  • Video and audio codecs

  • Game engines (e.g., Unity)

  • CAD applications

  • Scientific simulations

Benefits of WASM:

  1. Performance boost for compute-intensive tasks

  2. Brings desktop-quality applications to the web

  3. Reuse existing C/C++/Rust codebases on the web

  4. Improved load times for large applications

Challenges:

  • Learning curve for web developers

  • Limited direct DOM access

  • Debugging can be complex

Future Prospects:

  • Broader language support

  • Improved tooling and debugging

  • Potential for server-side WASM

If you’re curious and want to learn it check out the docs

The Daily Newsletter for Intellectually Curious Readers

  • We scour 100+ sources daily

  • Read by CEOs, scientists, business owners and more

  • 3.5 million subscribers

Thank you to everyone who submitted last week 😃 

WaxAxiom, ddat828, Shraddha Patel, ravener, kwame-Owusu, AndrewMarin554, FragileBranch, sloprope, RelyingEarth8, OmarZaatari, DevonKirby, and so much more. Sorry if I didn’t include you, I got lazy…

Loves me, Loves me not…

"Loves me, loves me not" is a traditional game in which a person plucks off all the petals of a flower one by one, saying the phrase "Loves me" and "Loves me not" when determining whether the one that they love, loves them back.

Given a number of petals, return a string which repeats the phrases "Loves me" and "Loves me not" for every alternating petal, and return the last phrase in all caps. Remember to put a comma and space between phrases.

Examples

loves_me(3) âžž "Loves me, Loves me not, LOVES ME"

loves_me(6) âžž "Loves me, Loves me not, Loves me, Loves me not, Loves me, LOVES ME NOT"

loves_me(1) âžž "LOVES ME"

Notes

  • Remember to return a string.

  • The first phrase is always "Loves me".

How To Submit Answers

Reply with

  • A link to your solution (github, twitter, personal blog, portfolio, replit, etc)

  • or if you’re on the web version leave a comment!

Video should be coming out this week or early next week. I think.

uhhh yeah that’s all I got. Nothing too crazy going on.

That’s all from me!

Have a great week, be safe, make good choices, and have fun coding.

See you all next week.

Reply

or to participate.