HNHacker News
TopNewBestAskShowJobs

unwind

12,407 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 Fixing a 20-year-old bug in Enlightenment E16
Fun post! Very happy to see a 20-something year old find and fix bugs in an X11 wm from before they were born. Gives me hope.

There was some kind of editing snafu though, the loop header in the big (first) code block reads:

    for (i = 0; i < 10; i++, nuke_count++)
But the references to it in the text, and updated versions in the patches, show it as just

    for (;;)
That was confusing me a bit.
unwind··on Rice Theory: Why Eastern Cultures Are More Cooperative (2014)
How about "R, G, B Mars" [1], then?

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

unwind··on Animated Knots
As a ultra noob in the art of knotting, I liked this when I stumbled over it a few weeks back. I agree that for newbies it would be even more instructive with smoother flows, I guess they're held back by the animations being photos and not, well, animations.

I also have read their backstory/naming thing [1] several times but I still don't quite get it. I first thought they were related to the historical Grog, but that was a misunderstanding. I think.

[1]: https://www.animatedknots.com/grog-story

unwind··on Minichord: A pocket-sized musical instrument
Meta: This is a very messy title, it should just be "The minichord: a pocket-sized musical instrument" or something like that. We have the github info in the auto-generated blurb right after the title, after all. Thanks.
unwind··on MicroPythonOS graphical operating system delivers Android-like user experience
Reasonably, that language is MicroPython [1] which is the special pared-down version of Python for memory-constrained embedded targets.

[1]: https://micropython.org/

unwind··on Defeating a 40-year-old copy protection dongle
Just a few months back I worked in embedded development on a project and there was a physical dongle to unlock the compiler, which was surprising during on-boarding as I've spent years doing commercial embedded work relying on GCC. :)
unwind··on Declassifying JUMPSEAT: an American pioneer in space
“The historical significance of JUMPSEAT cannot be understated,” said Dr. James Outzen, NRO director of the Center for the Study of National Reconnaissance.

I'm no native speaker but that is backwards, right? Shouldn't it be overstated if it was a success?

unwind··on Infinite pancakes, anyone?
Me too, from Firefox in Linux and no (!) blockers. Weird. Maybe geo-fenced for not being in the US, sometimes companies do that which is ... weird.
unwind··on Some C habits I employ for the modern day
Uh that piece of horror was not in the post. Phew.
unwind··on Douglas Adams on the English–American cultural divide over "heroes"
Brown in German is actually, wait for it, "braun".
unwind··on F-16 Falcon Strike
Cool!

I love seeing new games for "retro" machines, it's awesome that people keep pouring time and love into them after all these years.

I'm not super familiar with 8-bit Atari machines, and found the designation "classic unmodified 8-bit ATARI XL/XE" a bit imprecise. Tried looking up specs on Wikipedia [1] but was unsure what to settle on. Perhaps the original 1200XL would match? Or the 800XL which seems to improve on the 1200XL even though the naming suggests the opposite ... Or the 65XE, or both then I guess since the latter is compatible with the 800XL, but in an updated case?

[1]: https://en.wikipedia.org/wiki/Atari_8-bit_computers#1200XL

unwind··on 3D printing my laptop ergonomic setup
Very cool, nice effort and a good write-up!

If my math is right it seems the cost in material for the printed part is around $5 which seems ridiculously cheap for a custom-designed and adapted solution like this. Nice!

I wish the author had spent a few words extra to motivate why it needs to be in PETG filament for "heat resistance", is the regular PLA limit of ~55 degrees Celsius not okay for a desktop accessory? I guess if it's in direct sunlight that might be exceeded, or perhaps if the laptop runs very hot?

unwind··on Linux boxes via SSH: suspended when disconected
That sounded fascinating as a rather large difference in world view stemming only from using different languages.

It turns out that there are various models for the number of continents, and that is (phew) known in Spanish, too. See the Wikipedia page [1] (link to Spanish version) for instance. This is for European Spanish though, but I couldn't find a version of the page in es-AR.

[1]: https://es.wikipedia.org/wiki/Continente#Modelos_continental...

unwind··on The Z80 Mem­ber­ship Card (2015)
I think this is very cool, even though I have no historical connection to the Z80 it's of course a well-regarded and firmly entrenched/popular retro CPU.

But this really is a stretch:

The Z80 Membership Card itself is a stand-alone single-board computer that can "power up" your projects, like the Parallax BASIC Stamps or Arduino microcomputers.

Both of those are very commonly called microcontrollers, not microcomputers, since they have all of those extra chips merged into the single package of the CPU.

Take a look at the Arduino Uno [1] which is a very typical (if old) example: you will see that the board is not covered in ICs from edge to edge, since all of the main functionality is in the single-chip microcontroller. I think the second big-ish package visible is for the USB, but that also disappears on more modern controllers with on-board support for USB.

[1]: https://en.wikipedia.org/wiki/Arduino_Uno#/media/File:Arduin...

unwind··on Handy – Free open source speech-to-text app
Which one? I did a quick search but that didn't turn up anything so perhaps it's a partial word overlap or something.

I did find the projects "user-facing" home page [1] which was nice. I found it rather hard to find a link from that to the code on GitHub, which was surprising.

[1]: https://handy.computer/

unwind··on Handy – Free open source speech-to-text app
Ah, that was a typo: you meant "GPU" (Graphics Processing Unit, not "GUI" which of course is Graphical User Interface) since that is listed in the system requirements. Explained implicitly by an existing comment, thanks!
unwind··on Zen-C: Write like a high-level language, run like C
Agreed, that really stood out as a ... questionable design decision, and felt extremely un-ergonomic which seems to go against the stated goals of the language.
unwind··on Perfectly Replicating Coca Cola [video]
True story: I was once (late 90s, I think) made part of an impromptu taste-test in a 7 Eleven store in Stockholm [1], when a (probably bored) employee grabbed a Coke, a Pepsi and a Dr Pepper and some espresso-size paper cups and made me and some friends close our eyes and try to guess which was which.

I remember being upset since he claimed I failed to even point out Dr Pepper, which I still think is unbelievable since even its smell is super distinctive and way different from a cola.

[1]: https://www.mitti.se/nyheter/buset-pa-kungsgatan--butiken-bl... is the same store, article (in Swedish) about a recent prank someone did there

unwind··on Perfectly Replicating Coca Cola [video]
Interesting! According to [1] it's labelled as "less sugar" though, so it's not as if the original/standard Coke is different. There seems to be some widespread thinking that Singapore has issues with sugar consumption so I guess this is Coke's response (or perhaps they were forced by authorities).

[1]: https://www.coca-cola.com/sg/en/brands/coca-cola

unwind··on A4 Paper Stories
In Sweden, the lowest postage (one stamp, 22 SEK or around $2) is for max 50 grams.
unwind··on Modern SID chip substitutes [video]
At the speeds in question, I'm pretty sure the logic could be in a general-purpose microcontroller, too. But I'm not sure detailed schematics for the analog parts are available/open.
unwind··on Full Unicode Search at 50× ICU Speed with AVX‑512
Very cool and impressive performance.

I was worried (I find it confusing when Unicode "shadows" of normal letters exist, and those are of course also dangerous in some cases when they can be mis-interpreted for the letter they look more or less exactly like) by the article's use of U+212A (Kelvin symbol) as sample text, so I had to look it up [1].

Anyway, according to Wikipedia the dedicated symbol should not be used:

However, this is a compatibility character provided for compatibility with legacy encodings. The Unicode standard recommends using U+004B K LATIN CAPITAL LETTER K instead; that is, a normal capital K.

That was comforting, to me. :)

[1]: https://en.wikipedia.org/wiki/Kelvin#Orthography

unwind··on The biggest heat pumps
Heh came here to post the same comment, I was somewhat shocked by the alleged power of the almighty dollar ... but it's just a typo of course. Phew. :)

According to Google's built-in exchange rate calculator it should say $235m.

unwind··on Show HN: I designed my own 3D printer motherboard
I was confused by the prominent use of the word "stepstick", not something I was familiar with even though I try to expose myself to quite a lot of 3D printing material (having one is still more like a bucket list item, though).

I think the term is/was originally a product name for a small, rectangular module with a stepper motor driver on it [1] from 2012. Then it seems the term has been made more generic, with updated versions like the SilentStepStick [2] featuring a driver chip by Trinamic instead.

I guess my point is that for some readers, the stepper motor features on OP's board could be made more clear and perhaps use actual chip numbers, too. :)

Great job!

[1]: https://wiki.geeetech.com/index.php/StepStick_A4988_Stepper_...

[2]: https://learn.watterott.com/silentstepstick/

unwind··on Carrier Landing in Top Gun for the NES
Meta: Should have "NES" added to title to clarify it's about a game, not (as I thought) the movie.
unwind··on CapROS: Capability-Based Reliable Operating System
It's a family of microkernels.

https://en.wikipedia.org/wiki/L4_microkernel_family

unwind··on $5 whale listening hydrophone making workshop
TIL about "plug-in power", that seems to be a thing that some sound recording devices with 3.5 mm "phono" jacks can provide.

Here [1] is a page at Klover, and here [2] is one at Shure. Not sure if there's a formal specification for this, or if it's just something that manufacturers started doing.

[1]: https://www.kloverproducts.com/blog/what-is-plugin-power

[2]: https://service.shure.com/s/article/difference-between-bias-...

unwind··on 4 billion if statements (2023)
Meta: Yeah, this should have a "(2023)" tag in the title. Thanks.
unwind··on The Cost of a Closure in C
Oh! Thanks, I was not being as concrete as I imagined. Sorry.

Yes, the `static` can simply be dropped, it does no additional work for a single-file snippet like this.

I tried diving into Compiler Explorer to examine this, and it actually produces slightly different code for the with/without `static` cases, but it was confusing to deeply understand quickly enough to use the output here. Sorry.

unwind··on The Cost of a Closure in C
This was very interesting, and it's obvious from the majority of the text that the author knows a lot about these languages, their implementation, benchmarking corners, and so on. Really!

Therefore it's very jarring with this text after the first C code example:

This uses a static variable to have it persist between both the compare function calls that qsort makes and the main call which (potentially) changes its value to be 1 instead of 0

This feels completely made up, and/or some confusion about things that I would expect an author of a piece like this to really know.

In reality, in this usage (at the global outermost scope level) `static` has nothing to do with persistence. All it does is make the variable "private" to the translation unit (C parliance, read as "C source code file"). The value will "persist" since the global outermost scope can't go out of scope while the program is running.

It's different when used inside a function, then it makes the value persist between invocations, in practice typically by moving the variable from the stack to the "global data" which is generally heap-allocated as the program loads. Note that C does not mention the existence of a stack for local variables, but of course that is the typical implementation on modern systems.

← PreviousPage 2 of 34Next →