Made this leather sheath for my railway spike multi-tool (it's a bad hammer, a bad pry bar and a bad bottle opener).

Having a camera phone is such a boon when working on electronics. I was shortening the USB lead on this mouse and took a photo to remind me what order the wires were in.

Then I dropped the mouse off the table and bits of rotary encoder and spring came loose and I had no idea how they should go back.

Good thing I _just_ took a photo and was able to piece it all back together!

Getting back into the habit of writing small utilities for myself -- rather than relearn the syntax for thinkfan I wrote my own fan controller for my current main Linux laptop -- a Thinkpad X131e


Now I can build it for my preference (fan at max to cool the machine down, and then off the rest of the time) and I can enjoy a little C practice while I do it.

@m455 if(fd < 0) { /* Better handle my errors! */ write(2, "Segmentation fault\n", 19); exit(11); }

@kingcons Yes, on the computers. The days of hideous Windows color schemes and custom cursors. My son renaming the Recycle Bin to "Benny Bin" on his computer and generally messing with every default fills me with pride, hope and nostalgia.

@kingcons To be clear, I do not miss 96Kbps. I suppose one could just turn their router on and off but it's just not a commonplace experience any more

@kingcons I miss dial-up, a little. The demarcation between being online and offline which made going online an event and not a state of being.

The "family computer" as a concept, maybe.

@m455 Well I guess the real way to do it is something like cloud.google.com/run/docs/quic but the RAW and buggy way is to follow my implementation. I just assumes one read() is enough! It doesn't allocate members for accept! It uses `r` after a call to `move()` despite violating the C++ spec! 👊

Lunchtime project: github.com/insom/http/ statically linked "web server" in C++ under 700KiB running on Cloud Run. I'm using almost no C++ features so this could probably be even smaller if it was plain C.

I used GitHub's container registry but it looks like Cloud Run wants to deploy from their Google Container Registry (of course). Oh, well.

This was meant to be a reply to @m455 but I have forgotten how to Mastodon. Sorry. Also funny that you mention it looks like Java because Java's `Map<String,Integer>` syntax is borrowed from C++ and implemented totally differently, but I also used it first in Java so I know what you mean. It's familiar but different.

Show thread

I might go to hell for comparing C++ templates to Lisp macros, but the line `class sorter : binary_function<product,product,bool> {` is basically mapping `first_argument_type` and `second_argument_type` to `product`, and the result_type to `bool`. So it returns a boolean, depending on if the first parameter's second part is bigger than the second parameter's second part.

`pair<string,int> = make_pair("hi", 10)` is just like a `("hi" . 10)` in Scheme.

So I followed this tutorial on how to write a text editor in C:


I called mine Ceditor and the little endorphin kick I got when it compiles was waaaay more satisfying than moving images and text around a website using CSS + JS.

So I'm learning C instead. Via books. Because it makes me feel good doing this. And I'm old and books are good.

I'm also going to be using my editor to write C as well. Something something dogfooding something something #smalltech

Been an absentee admin and just caught up with the local timeline and luckily nothing at all happened that I should have taken action on. Phew. Good job everyone!

Told my kids that Cake were early investors in Google and that’s why YouTube Music recommends their back catalogue so much. Diversifying away from weed and brass instruments. In a world where Mark Wahlberg owns car dealerships in Columbus, Ohio, this is totally feasible.

Show older
Tiny Tilde Website

ttw is the unofficial Mastodon instance of tilde.town. We're only smol, but we're friendly. Please don't be a dick.