Categories
JavaScript Performance WebAssembly

WebAssembly MVP Ships: Native Speed in the Browser

WebAssembly (WASM) is shipping in Chrome, Firefox, and Edge. Safari support is coming. For the first time, we can run compiled languages in the browser at near-native speed. This is a huge technical achievement, but the practical implications are still unclear.

What Is WebAssembly?

WebAssembly is a binary instruction format that browsers can execute. Write code in C, C++, or Rust, compile to .wasm, and run it in the browser. No plugins, no VMs—it's baked into the browser alongside JavaScript.

// Load and instantiate WebAssembly
fetch('module.wasm')
  .then(response => response.arrayBuffer())
  .then(bytes => WebAssembly.instantiate(bytes))
  .then(results => {
    const exports = results.instance.exports;
    // Call WASM functions from JavaScript
    const result = exports.add(5, 3);
    console.log(result); // 8
  });

The performance wins are real. Benchmarks show 10-800x speedups over JavaScript for compute-heavy tasks. Parsing and compiling WASM is faster than JavaScript because the binary format is optimized for quick validation.

Categories
C++ Programming Projects

Desktop Calculator

I always appreciate coding in standard C++. There's something elegant about working with a language that's both powerful and standardized, where you can write portable code that runs anywhere.

Desktop Calculator is an application I've developed in standard C++, based on the calculator example (6.1) from "The C++ Programming Language", Third Edition by Bjarne Stroustrup. If you've read the book, you know it's one of the most comprehensive examples in the text, demonstrating how to build a complete, interactive program with proper error handling and architecture.

Categories
Programming Tutorial

Windows Programming with Dev-C++

Dev-C++ is a good IDE for programming in C++. It supports both MinGW and MSVC compilers and includes useful features like syntax highlighting, integrated debugger, profiler, and TO-DO lists. It's best suited for small to medium-sized project development and is particularly popular among beginners and students.

Basic Requirements

Microsoft Windows

This tutorial assumes you're running Windows XP or later. While newer versions of Windows are recommended, Dev-C++ works well on older systems.