1. 13

Feel free to tell what you plan on doing this weekend and even ask for help or feedback.

Please keep in mind it’s more than OK to do nothing at all too!

    1. 11

      Short version: writing a WebGPU cube demo in JavaScript.

      Long version:

      I did some graphics programming in university (games, etc) using OpenGL 1.x – when the world started moving to shaders and programmable pipelines I was just entering the workforce and didn’t have time to keep up with ongoing developments, so I figured “I’ll wait a year or so until the API stabilizes, then learn this whole GLSL thing”.

      Well, it’s been twenty years since then and every time I looked the situation was still fluid – v1 -> v2 -> v3, various iterations and subsets of OpenGL ES, WebGL which was OpenGL ES but not(?) and also widely disparaged(!), the rise of D312/Metal/Vulkan, SPIR-V. The “hello world” tutorials kept getting longer and longer – I tried drawing a cube in Vulkan in C++ and it felt like writing a device driver.

      WebGPU seems to have finally crystallized a stable API that everyone I trust regarding graphics things vouches for as “Basically OK”, but now there’s a new challenge, which is that all the examples and tutorials I can find start off something like:

      install NPM and these thirty helper packages, then clone our demo repo and build it with webpack + babel + some other tool that just released a breaking release yesterday, and the compressed minimized opaque blob will render a cube! It’s so easy!

      And that is not what I’m looking for, in multiple meanings. It’s JavaScript, I shouldn’t have to compile anything. Netscape didn’t die for this.

      Anyway, I think I’ve been able to cobble together a basic demo that fits in a single self-contained webpage, doesn’t require compilation or packing or NPM anything, and successfully renders a colorful rotating cube. I’m currently adding a bunch of comments to the code, and plan to put it up on my website today or tomorrow.

      1. 1

        Your previous experience sounds very similar to mine. If you have time to write up what you learn, I’d love to read it. I doubt I’ll ever use WebGPU (if I actually want to do 3D stuff again, I’m more likely to use something higher level like Godot) but I’d love to properly understand it.

        1. 2

          https://john-millikin.com/static/webgpu-rotating-cube.html (lobste.rs comments)

          Not exactly a write-up as such, but it’s only ~600 lines of JS and a lot of that is comments. Definitely a more pleasant experience than Vulkan, and I think I understand the basic idea of what a shader is now.

      2. 1

        drawing a cube in Vulkan in C++ and it felt like writing a device driver

        Vulkan is explicit and write “everything up front.” Once you get over the initial hump, things get much, much smoother. It’s >500 lines just to draw a triangle, but that’s the price you pay for often better performance and no “Who left on blend mode?” type of weird state bugs later.

        1. 1

          I’m obviously not an expert here, but WebGPU feels pretty explicit and up-front about things too. There’s still the manual buffer management and pipeline construction I’d expect in the modern low-overhead graphics idiom. It just doesn’t have the extreme API verbosity of Vulkan (e.g. vkGetPhysicalDeviceSurfaceCapabilitiesKHR, which IIRC is part of an extension I had to probe for to use double-buffering). The WebGPU API feels like humans sat down and designed it with at least some thought toward ergonomics, and Vulkan just has none of that whatsoever.

          It’s possible I was following a poor tutorial – I think it was https://github.com/krOoze/Hello_Triangle/blob/master/src/HelloTriangle.cpp, which is 1500 LoC without counting headers and platform integration.

          1. 1

            Oh, I should have been more specific. I’m not familiar with WebGPU, I was drawing a comparison between OpenGL and Vulkan. The main Vulkan tutorial I’m familiar with is https://vulkan-tutorial.com/

    2. 5

      Figuring out if there’s a there there with nix.

      1. 4

        In my opinion, NixOS offers the best Linux experience out there. It’s way less fiddly and sensitive than Arch, and seemed to work better out-of-the-box. Best of luck!

        1. 2

          I’m trying to stay as far away from NixOS as possible. I finally dared to install it on my Macbook.

          1. 1

            I’ve done a fair amount of nix on macos. if you get stuck/want advice, feel free to send me a message

            1. 2

              Honestly, I’m bouncing off. I can’t build a docker container to work on linux so I don’t see the point of it.

              Here’s the ticket for it: https://github.com/ipetkov/crane/issues/320

              1. 1

                To me, nix is like haskell. It takes a huge up front investment to get good enough at it to the point where it is worth it.

                If nix had better documentation, etc, that would be different, but I just find that things are so often broken and I have no way to fix them myself.

                I’ve been investing in it though, and seeing some good results. But its a big investment. Here’s hoping it’ll pay off

                1. 2

                  100% same.

                  My two thoughts:

                  • This language even with amazing documentation will probably never be usable my a majority of software/cloud engineers so you have to wonder how big this can become.
                  • Fixing nix backwards seems to me a very difficult task. Maybe it’d be possible to create a forward looking nix by making a store of software compiled to WASM.
                  1. 1

                    I could imagine someone making a tix language which is a typescript-like language (optionally typed with support for all of the random ways nix tends to be used, like JS) and javascript/json style syntax. I think that would be palatable, and could make things a lot more usable for the masses.

                    But, for me, I am interested in what it can do for me personally. And, I don’t really know of a better way to get a system that is as reproducible as what nix can do. I care a lot about this, because I really need a stable foundation upon which I can build my tooling etc. I’ve tried handling it with just regular macos/ubuntu packages, and I just had a ton of trouble.

                    It does seem to me that there is growing interest in nix. And that gives me hope. But ultimately its still a gamble; right now this works well enough for my purposes: https://github.com/joelmccracken/workstation/blob/master/flake.nix

                    1. 1

                      That’s cool but I’m not going to do home manager to myself for a handful of global tools that homebrew can install better for me.

                      I tried today to bootstrap a try out project quickly for some exploratory development. Get Kafka up and running without having to deal with all the crap and another attempt with flutter (which failed).

    3. 4

      Tomorrow is Free Comic Book Day. Last time I was in my local shop, the guy mentioned it, and I said “oh yeah I usually end up missing it” and I swear it hurt his feelings, so I’m showing up tomorrow.

    4. 4

      Starting to add discrete differential geometry support into SciLean (a scientific computation library for the Lean proof assistant: https://github.com/lecopivo/SciLean/)

      Adding LLVM introspection and user controlled code generation capabilities into the Lean proof assistant (https://github.com/bollu/lean4/tree/llvm/hargonix-collab)

      The goals are that in a couple of weeks, we should be able to write, render, run, and (in theory) prove the paper “geodesics in Heat” (https://arxiv.org/abs/1204.6216) within Lean4. Of course, this will need a lot of API (e.g. sparse matrices), but since Lean hae a robust FFI system, we should be able to get it done!

    5. 4

      I had so many plans for the weekend, but I had to drop all of them because I need to process some of the things that happened in my country this week, a couple of streets from my place. It’s going to take a while before I’m back on track.

      At least I’ve managed to catch up on sleep, and that’s a start, I guess.

    6. 3

      I’m going to celebrate my birthday by going to the art museum. And then on Sunday I’m going to make omelets for a bunch of my friends. Hard to believe I’m 53!

    7. 3

      I’ve got 3-5 more weekends till it starts getting warm enough that I’ll need the A/C system I’m working on.

    8. 3

      Gonna attempt to migrate Home Assistant and a couple other services from an RPi4 to an old Mac Mini. Should just be copying everything over and running docker compose up, right? Right?

    9. 3

      Got a 29 gallon fish tank today. I put it in a stand. Tomorrow I will put the substrate in. Can’t wait for move my fishes over from the smaller tank. They’ll be thrilled.

    10. 2

      Digging up a bush, apparently.

    11. 2

      Few things for me this weekend

      • Finishing my profit sharing system for my cryptocurrency arbitrage bot – it will allow you to set a profit percentage cut per user, track how much profit that user brought the system, and compensate them accordingly
      • Re-theming my new CBD shop and writing some more content for it
      • Maybe mixing a new CBG vape tank just to see what it’s like on its own
      • Reorganizing my other website a bit, to add some more products and add something that isn’t black or white to make it stand out a bit more

      All the while being unemployed and waiting for the one client lead I have to send me credentials to Git so I can start getting paid, it’s been a bit of a race against the clock to find something profitable, since I don’t really want a traditional job again

    12. 2

      The weather report says sunny and 70F from 11am through 6pm with steady 9-10mph wind, so I’m going to go fly a kite.

      1. 4

        Followup: flew kites. Had fun. Very relaxing. Recommended.

    13. 1

      I will be spending way too much time playing around with Wezterm and lua configs. It’s fun.

    14. 1

      I started using Emacs’ unstable version 29 and updated my configuration. I also wrote a blog entry about my experience and thoughts: https://gokmengorgen.net/blog/2023/05/configuration-updates-with-emacs-29/

    15. 1

      Building a small wooden workbench in the garage to setup electronics (and eventually 3D printing) projects/tools. My son and I have been building more and more projects lately, so we need some dedicated workspace for a power supply, soldering iron, etc.