Notes

  • View

    Hah, this is interesting. Steve Klabnik likes to write tutorials for things as he learns about them, and apparently that’s how The Rust Programming Language came about: https://steveklabnik.github.io/jujutsu-tutorial/. He seems to have a nice setup for writing these tutorials that’s based on mdBook (https://rust-lang.github.io/mdBook/index.html).

  • View

    Convert a ReadableStream to whatever format you want (JSON, Uint8Array, text, etc.) using the Response constructor: await new Response(myReadableStream).json()

  • View

    It would be super sick to have a Mac app that allows you to map domain names to ports on the local machine. It would make local development when you have multiple backend servers so much easier. It would be pretty easy to build too—just a UI around /etc/hosts.

  • View

    // Convert a Uint8Array containing pcm_s16le data to a Float32Array containing
    // pcm_f32le data.
    function toFloat32Array(uint8Array: Uint8Array) {
    	const dataView = new DataView(uint8Array.buffer);
    	const float32Array = new Float32Array(uint8Array.length / 2);
    
    	for (let i = 0; i < float32Array.length; i++) {
    		const int16 = dataView.getInt16(i * 2, true); // Read little-endian int16
    		float32Array[i] = Math.max(-1, int16 / 32768.0); // Normalize to [-1.0, 1.0)
    	}
    
    	return float32Array;
    }
  • View

    Neat video on animating height to auto with just CSS, useful for accordions: https://www.youtube.com/watch?v=B_n4YONte5A

  • View

    Being able to implement traits on external types in Rust is super nice—wish you could do the same for interfaces in Go.

  • View

  • View

    The UX of native browser tooltips (using the title attribute) is so much better than fancy custom components that people build

  • View

    Next.js providers shared between components retain their value between navs