HNHacker News
TopNewBestAskShowJobs

aqrit

44 karma · joined August 31, 2016

submissionscomments
aqrit··on Unearthing a 31 year old Easter egg in Ecco the Dolphin
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...

aqrit··on Firewood Splitting Simulator
>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.

aqrit··on An AI agent published a hit piece on me – more things have happened
_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.
aqrit··on Rubio stages font coup: Times New Roman ousts Calibri
MS makes "Times New Roman" available (at no cost), but not "Calibri".
aqrit··on Faster substring search with SIMD in Zig
`_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...

aqrit··on How to live on $432 a month in America
> 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

aqrit··on How to live on $432 a month in America
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).
aqrit··on YouTube DRM added on ALL videos with TV (TVHTML5) clients
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.
aqrit··on Constantly Divisionless Random Numbers
> “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.

aqrit··on Improving on std:count_if()'s auto-vectorization
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()`.

aqrit··on Constantly Divisionless Random Numbers
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

aqrit··on Parsing time stamps faster with SIMD instructions
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.
aqrit··on Parsing time stamps faster with SIMD instructions
The methods in those articles could be slightly improved by picking better multipliers. https://stackoverflow.com/a/71594769
aqrit··on Parsing time stamps faster with SIMD instructions
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.
aqrit··on Basic SAT model of x86 instructions using Z3, autogenerated from Intel docs
This was for a super optimizer.
aqrit··on High speed Unicode routines using SIMD
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.
aqrit··on Filtering a vector with SIMD instructions (AVX-2 and AVX-512)
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.
aqrit··on Converting integers to decimal strings faster with AVX-512
related to IEEE 754 double-precision floating-point round-trips?
aqrit··on Walmart has stopped fighting the $7k fine for a worker's death in 2008 (2015)
Any fine shows Walmart as liable. A free win for any $100mm civil lawsuit.
aqrit··on No sane compiler would optimize atomics (2015)
https://media.ccc.de/v/35c3-9788-memsad
aqrit··on Avoid using wood burning stoves if possible, warn health experts
www.central-boiler.co.uk ?
aqrit··on Avoid using wood burning stoves if possible, warn health experts
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.
aqrit··on Fast UTF-8 validation
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.
aqrit··on Beating C with Common Lisp
here you go: https://github.com/expr-fi/fastlwc "Beating wc with C"
aqrit··on Show HN: Faster UTF-8 validator
how does this differ from here: https://github.com/lemire/simdjson/pull/365
aqrit··on Google Maps shows sunken car where missing man’s body was found
> Bone can't be eaten

Squirrels eat bones. Skeletons disappear rapidly in the wild.

aqrit··on AVX512 VBMI – remove spaces from text
Try some of these :p https://gist.github.com/aqrit/6e73ca6ff52f72a2b121d584745f89...
aqrit··on How to Clear a Path Through 60 Feet of Snow, Japanese Style
Valdez has a population of 4_000
aqrit··on Smaller and faster data compression with Zstandard
use slz ( http://1wt.eu/projects/libslz/ ) for web traffic and non-beefy servers.