News for hackers. Stuff that matters.

aqrit

Re:Unearthing a 31 year old Easter egg in Ecco the Dolphin on Saturday August 15, 2026 @08:02AM (#49309895)
Not the author but:

`GetKeyState` and `LoadMenuA` are going to stand out in the disassembly.

Backtracking from `GetKeyState` is how I found a devmode in "warhammer: shadow of the horned rat". Though it is activated by a boring commandline argument.

https://www.gog.com/forum/warhammer_shadow_of_the_horned_rat...

Re:Firewood Splitting Simulator on Sunday June 14, 2026 @01:17PM (#48529855)
>Is it really that difficult?

Fiberglass handles are now standard on splitting mauls (for this reason). Rotten hearts, or driving wedges. It is easy to miss a swing by an inch or two when fatigued.

Edit: I also broke my first axe handle. The sibling comments here are wild.

_Daily_ hit pieces on Elon Musk (or Musk companies), going for something like a decade. These have petered out somewhat since he left DOGE. But they started way back before he should have had that much notoriety.
Re:Rubio stages font coup: Times New Roman ousts Calibri on Thursday December 11, 2025 @11:42AM (#46233662)
MS makes "Times New Roman" available (at no cost), but not "Calibri".
Re:Faster substring search with SIMD in Zig on Monday August 11, 2025 @04:09PM (#44868869)
`_mm_alignr_epi8` is a compile-time known shuffle that gets optimized well by LLVM [1].

If you need the exact behavior of `pshufb` you can use asm or the llvm intrinsic [2]. iirc, I once got the compiler to emit a `pshufb` for a runtime shuffle... that always guaranteed indices in the 0..15 range?

Ironically, I also wanted to try zig by doing a StreamVByte implementation, but got derailed by the lack of SSE/AVX intrinsics support.

[1] https://github.com/aqrit/sse2zig/blob/444ed8d129625ab5deec34... [2] https://github.com/aqrit/sse2zig/blob/444ed8d129625ab5deec34...

Re:How to live on $432 a month in America on Saturday May 24, 2025 @11:23AM (#44081704)
> health services in the area

Massena Hospital is a 25-bed hospital. Might have to go to Canton or Ogdensburg for a family doctor (45 minutes by car). Most things serious get referred to Syracuse or Burlington (3 hours away by car).

AFAIK, Cost[1] is "theoretically" nothing if annual income is less than the federal poverty line ($15,650 for an individuality). And might as well be free for an income up to $39,125.

[1] https://info.nystateofhealth.ny.gov/EssentialPlan

Re:How to live on $432 a month in America on Saturday May 24, 2025 @07:33AM (#44080377)
Alcoa (Aluminum Smelter, *cheap electricity*) was the major industry in the area. Massena plant now produces 85% less aluminum compared to ~15 years ago (AFAICT), leading to something of a ghost town (and cheap housing).
Limited internet connections (speed and/or data-caps). Something like Hughesnet (satellite ISP) couldn't stream more than 240p from youtube during peek times. The data-cap coerced users to do downloads between 2am to 6am.
Re:Constantly Divisionless Random Numbers on Sunday March 09, 2025 @03:45PM (#43312968)
> “regular” rejection sampling

I was thinking naive: mask off unwanted bits then reject any value above the limit.

It would seem like https://c-faq.com/lib/randrange.html would also move the multiply --or divide by constant-- out of the loop.

Re:Improving on std:count_if()'s auto-vectorization on Sunday March 09, 2025 @11:58AM (#43310304)
A optimized version would use 64-bit accumulators (`psadbw` on SSE2, or some sort of horizontal adds on NEON). The `255` max constraint is pointless.

Many programming languages/frameworks expose this operation as `reduce()`.

Re:Constantly Divisionless Random Numbers on Sunday March 09, 2025 @11:32AM (#43309954)
Why not use regular rejection sampling when `limit` is known at compile-time. Does fastrange[1] have fewer rejections due to any excess random bits[2]?

[1] https://github.com/lemire/fastrange

[2] https://github.com/swiftlang/swift/pull/39143

Re:Parsing time stamps faster with SIMD instructions on Monday July 03, 2023 @07:09AM (#36571305)
That snippet would not reject bad chars, are non-digits rejected somewhere else? A simple scalar loop that multiplies an accumulator by 10, itoa() style, would be faster.
Re:Parsing time stamps faster with SIMD instructions on Sunday July 02, 2023 @10:24PM (#36567969)
The methods in those articles could be slightly improved by picking better multipliers. https://stackoverflow.com/a/71594769
Re:Parsing time stamps faster with SIMD instructions on Sunday July 02, 2023 @09:57PM (#36567805)
There are two digits for months. A check is required per-character to prevent bad chars (e.g 0x3A) from being laundered by the multiply. The '19' comes from fact that the first digit may be only 0 or 1, while the 2nd digit maybe any value 0..9 (e.g September '0'9' October '1'0'). The second check catches bad month values between 13..19 which were not caught by looking at individual digits. Realistically, the first check may be overbuilt, it only needs to check is_digit or not, but it still has to ignore the padding bytes at the end, somehow. Now... I believe there would be a problem with the month value of '00'... because it unconditionally subtracts 1 from that field then uses it as a table index.
This was for a super optimizer.
Re:High speed Unicode routines using SIMD on Monday September 05, 2022 @01:46PM (#32727028)
One of the authors/contributors was looking into it: https://old.reddit.com/r/mainframe/comments/wevyvg/whats_the... I don't think this project was ready for a public announcement, yet.
Re:Filtering a vector with SIMD instructions (AVX-2 and AVX-512) on Thursday September 01, 2022 @03:43PM (#32681972)
The AVX2 version is using a 8 KiB table...? Even the range check is inefficient. I'd bet that the AVX2 version could be 50% faster.
related to IEEE 754 double-precision floating-point round-trips?
Any fine shows Walmart as liable. A free win for any $100mm civil lawsuit.
www.central-boiler.co.uk ?
Outdoor wood furnaces (boilers) became very popular over the last 15 years. They are cheaper than fuel oil. A traditional wood stove has to be refilled every 2 hours (or so), and is also a major fire hazard. "Wood burners" may also include pellet stoves which are also increasingly popular for similar reasons.
Re:Fast UTF-8 validation on Tuesday October 20, 2020 @08:34PM (#24843776)
The algorithm used by ClickHouse was "inspired" by https://github.com/cyb70289/utf8/ ... Which is known to be slower than this new method from simdjson.
Re:Beating C with Common Lisp on Sunday November 17, 2019 @08:29PM (#21561249)
here you go: https://github.com/expr-fi/fastlwc "Beating wc with C"
Re:Show HN: Faster UTF-8 validator on Friday November 15, 2019 @03:39PM (#21548523)
how does this differ from here: https://github.com/lemire/simdjson/pull/365
> Bone can't be eaten

Squirrels eat bones. Skeletons disappear rapidly in the wild.

Valdez has a population of 4_000
Re:Smaller and faster data compression with Zstandard on Wednesday August 31, 2016 @05:05PM (#12401470)
use slz ( http://1wt.eu/projects/libslz/ ) for web traffic and non-beefy servers.