HNHacker News
TopNewBestAskShowJobs

unwind

12,395 karma · joined March 23, 2009

Bearded hacker from Sweden. Learned M68k assembly on the Amiga in the late 80s. Compiling C on a 7 MHz CPU was slow. Working as a contracting software developer since almost 10 years, enjoying visiting various parts of the software world.

I hang out a lot on Stack Overflow: http://stackoverflow.com/users/28169/unwind, mainly answering questions about C. I love C.

submissionscomments
unwind··on The Asus gaming laptop ACPI firmware bug
Yeah, sorry, that was a bit unclear. I just meant that the article went as far as propose rather clearly what is needed to fix the issue ("don't sleep() in an interrupt service routine").
unwind··on The Asus gaming laptop ACPI firmware bug
This is an amazing discovery, article, and fix proposal. Fantastic work, very impressive and also very instructive on how things work on modern PCs and how far you can actually dig to get at stuff that is "supposed" to be hidden.

As someone who has written embedded firmware for many years (not for PCs), I can only dream of an end user being this capable to discover a bug. I want to live in the world where Asus immediately send an e-mail offering some kind of short-term contracting work to fly in and talk to their firmware people for a few days and get $FIVE_FIGURES or something, and leave with an updated laptop running their new production BIOS.

Obviously this bug has gone un-fixed for four years so that is not the world we're in. That makes me sad. :|

Edit: s/fix/fix proposal/.

unwind··on GNU Midnight Commander
I never used MC (not very much into TUIs) but ages ago I wrote a graphical file manager in the same vein. For me the inspiration came from Directory Opus [1] on the Amiga, which was just awesome.

When GTK+ was released in the late 90s, combining my love of C programming with a newfound home in Linux and GTK+'s ability to make complicated graphical interfaces resulted in a dual-pane file manager. It was a great project.

[1]: https://en.wikipedia.org/wiki/Directory_Opus

unwind··on Asciinema CLI 3.0 rewritten in Rust, adds live streaming, upgrades file format
* ... Compiz [...] the thing that got me to ditch Windows for Linux [...] *

I thought that was the role of Enlightenment [1] but I guess I'm just old. :)

[1]: https://www.enlightenment.org/

unwind··on Betty Crocker broke recipes by shrinking boxes
Sure they do, but nobody seems to have posted it yet.

The exact box in the article (it had a link!) has the following ingredients listed:

Enriched Flour Bleached (wheat flour, niacin, iron, thiamin mononitrate, riboflavin, folic acid), Sugar, Corn Syrup, Cocoa Processed with Alkali, Leavening (baking soda, monocalcium phosphate, sodium aluminum phosphate). Contains 2% or less of: Modified Corn Starch, Palm Oil, Corn Starch, Propylene Glycol Mono and Diesters, Monoglycerides, Salt, Dicalcium Phosphate, Sodium Stearoyl Lactylate, Xanthan Gum, Cellulose Gum, Carob Powder, Artificial Flavor.

Now I've been interested in cooking for 30+ years, and do all of our home cooking and baking, and there's no way I would believe that I can substitute typical from-scratch/pantry ingredients and get the same result.

unwind··on Betty Crocker broke recipes by shrinking boxes
Yeah, it's like people who spend time around campfires and have watched American media are all going "let's make s'mores" [1], and then they realize that "graham crackers" [2] are a mystery ingredient that nobody knows anything about.

Digestives [3] are the typical substitution in my experience, but again nobody knows how close they're getting. They look thicker, to me ...

[1]: https://en.wikipedia.org/wiki/S%27more

[2]: https://en.wikipedia.org/wiki/Graham_cracker

[3]: https://en.wikipedia.org/wiki/Digestive_biscuit

unwind··on Betty Crocker broke recipes by shrinking boxes
I'd say (from northern Europe) that 500 g [1] is a standard pack of butter, even though they've also added the smaller "half packs" of 250 g. For professional use, there's also the full kilogram. Whoa that has got to be expensive these days.

[1]: https://www.arla.se/produkter/svenskt-smor/

unwind··on Classic GTK1 GUI Library
Without further detail, that's not very helpful.

GTK doesn't implement garbage collection, you need to clean up by destroying widgets and other resources that you have created. Of course, the operating system will free all resources used by your process when it ends, so that kind of final cleanup is often omitted (and even more so in example code).

unwind··on A Web Framework for Zig
The "-ig" suffix corresponds roughly to English's "-ish", I would say. As a native speaker of neither German nor English, though.
unwind··on Removing yellow stains from fabric with blue light
*nm, as in nanometers.
unwind··on Things you can do with a debugger but not with print debugging
I haven't touched GPU programming in ... uh ... decades, but is print debugging readily available for shaders? That was surprising, but glad to hear it! :)
unwind··on Hot Chips 2025: Session 1 – CPUs
Meta: This seems to need a "(video)" tag.
unwind··on Tesla market share in US drops to lowest since 2017
Way over here in tiny little Sweden, I've multiple times seen Teslas with custom stickers saying "I got this before Elon went crazy" or something similar on the trunk.

The situation might be different here though since there has been a rather long-running and high-profile conflict between Tesla and the unions, on top of all the other madness.

unwind··on Deluxe Paint on the Commodore Amiga
They did not mean a circle drawn by a circle tool, but instead freehand drawing curved shapes.
unwind··on No adblocker detected
This is a very nice idea, nicely presented too.

Bug report: There's a typo in the actual popup as shown to me, it says "extention". Consistently enough, the typo is present in the code snippet in the article:

    if (!document.cookie.includes("notice-shown")) {
        document.getElementById("ad-note-hidden").id = 'ad-note';
        document.getElementById("ad-note-content-wrapper").innerHTML = "No adblocker detected. " + 
        "Consider using an extention like <a href=https://ublockorigin.com/>uBlock Origin</a> to save time and bandwidth." +
        " <u onclick=hide()>Click here to close.</u>";
    }
unwind··on The demo scene is dying, but that's alright
That is fantastic, except the trees are clearly not pines [1]. It's ... Scrolling Spruces [2]!

[1]: https://en.wikipedia.org/wiki/Pine

[2]: https://en.wikipedia.org/wiki/Spruce

unwind··on Creative Technology: The Sound Blaster
Interesting!

The first image which looks like some kind of music-making hardware ("instrument") looked a lot like the OP-1 by Teenage Engineering [1]. That would be an interesting partnership, right?

[1]: https://teenage.engineering/products/op-1

unwind··on io_uring is faster than mmap
I can bite (softly) on part of that, since there is C code in the post. :)

This:

    size_t count = 0;
    /// ... code to actually count elided ...
    printf("Found %ld 10s\n", count);
is wrong, since `count` has type `size_t` you should print it using `%zu` which is the dedicated purpose-built formatting code for `size_t` values. Also passing an unsigned value to `%d` which is for (signed) `int` is wrong, too.

The (C17 draft) standard says "If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined" so this is not intended as pointless language-lawyering, it's just that it can be important to get silly details like this right in C.

unwind··on Framework Making Printers
Uh, that little X post doesn't actually say "we're developing a printer".

It's probably just trying to complain about printers (a computer-user pastime probably about as old as ... printers) in a humorous way.

unwind··on Reverse engineering Solos smart glasses
Very interesting! Seems like a Bluetooth-connected display is kind of rare.

This part:

The one thing I’m left scratching my head over is the length field. If I have 0x20 bytes of image data to send over, I actually need to put 0x10 into that field.

Made me think the protocol simply assumes at least 2 bytes will always be used, so it transmits the length using the unit of 16-bit "words" instead of bytes. That would not be unheard of, and is kind of smart even.

unwind··on Eels are fish
It's right there in the intro section:

Longfin eels are long-lived, migrating to the Pacific Ocean near Tonga to breed at the end of their lives. They are good climbers as juveniles and so are found in streams and lakes a long way inland.

unwind··on Take something you don’t like and try to like it
How to know that an article about licorice is from the US: they include the "black" qualifier. As if there were any other kind! To me (Swedish) the normal/expected qualifier is "sweet" (yes please) or "salty" (oh yes indeed thank you very much).

The concept of "red licorice" [1] is simply ... foreign. :) It's also fun and interesting as a word/food, since it focuses on the texture of a food and re-uses the word, even though the word is tightly coupled to the flavor.

[1]: https://en.wikipedia.org/wiki/Liquorice_(confectionery)#Red_...

unwind··on The day Return became Enter (2023)
Wow, throwback to running MacScheme (I think) on the university's Macs in a computer lab in the mid-90s. It interpreted main keyboard Return differently from numpad Enter, which to me (coming from the Amiga) was very confusing.

If I recall correctly, only Return caused an evaluation attempt, while Enter merely added a line break for readability.

unwind··on The ABC Programming Language
Meta: this might benefit from a "(1987)" in the title, to clarify it's not a(nother) new language.
unwind··on The Qweremin
So very typical for a Linus Åkesson post to drop lots of super-technical advanced "neo-retro" projects, then end it with going to a copy party and accidentally bumping into Rob Hubbard and Mahoney. He is really living the life.
unwind··on "Special register groups" invaded computer dictionaries for decades (2019)
It looks like Wikipedia [1] has a better explanation of the actual misunderstanding, the page you linked wasn't very clear to me (Italian "canali" corresponds to English "channel", not English "canal").

[1]: https://en.wikipedia.org/wiki/Martian_canals#Supposed_%22dis...

unwind··on Fenster: Most minimal cross-platform GUI library
There is at least two bugs in the blog post, here:

Next simple task would be to fill the complete framebuffer with a solid colour:

    memset(f->buf, rgb, f->width*f->height*sizeoof(uint32_t));
The first is the obvious typo around `sizeof`, which I didn't even see at first (edit: this).

The second is that code will only work for 8-bit colors, i.e. only the 8 (technically CHAR_BIT, "a byte") least-significant bits of `rgb` will be used. This is a quirk of the `memset()` standard C function, which has the prototype:

    void *memset(void s[.n], int c, size_t n);
but then the man page [1] says:

The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c.

[1]: https://man7.org/linux/man-pages/man3/memset.3.html

unwind··on What if every city had a London Overground?
If you're not familiar with the drilling rigs [1] used for this kind of tunneling, they're pretty cool (in my opinion) even compared to TBMs. They really wield those drills, it looks awesome. :)

[1]: https://www.epiroc.com/en-uk/products/drill-rigs/face-drill-...

unwind··on The Unix-Haters Handbook (1994) [pdf]
Really? VOJY could easily be a modern company, couldn't it? The .dot was parked though ... :)
unwind··on Control shopping cart wheels with your phone (2021)
Larger stores in Sweden also use the coin system, even though as in the Netherlands it feels like use is declining in favor of just unlocked carts.

My favorite part of the system in larger stores is that to handle people not carrying cash (Sweden is pretty long-gone in this regard), you can usually go inside the store to get a free plastic token that fits the reader.

That always made me chuckle, since the entire point of the system is that you're supposed to be incentivized to return the cart to get your money back, so by replacing your money with a free plastic token that they hand out from a basket, they did .. something to the overall system design.

Still fun as an example of how the customer's overall experience is more important than the point of an entire security system, I think.

← PreviousPage 5 of 34Next →