Better HN
topnewbestaskshowjobs
Log inSign up

aqrit

44 karma · joined Aug 31, 2016 (10y ago) · 31 submissions

Submissions

comment 3mo ago · link · parent

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...

comment 5mo ago · link · parent

>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.

comment 9mo ago · link · parent

_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.

comment 11mo ago · link · parent

MS makes "Times New Roman" available (at no cost), but not "Calibri".

comment 1y ago · link · parent

`_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...

comment 1y ago · link · parent

> 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

comment 1y ago · link · parent

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).

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

> “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.

comment 1y ago · link · parent

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()`.

comment 1y ago · link · parent

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

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

The methods in those articles could be slightly improved by picking better multipliers. https://stackoverflow.com/a/71594769

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

This was for a super optimizer.

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

related to IEEE 754 double-precision floating-point round-trips?

comment 5y ago · link · parent

Any fine shows Walmart as liable. A free win for any $100mm civil lawsuit.

comment 5y ago · link · parent

https://media.ccc.de/v/35c3-9788-memsad

comment 5y ago · link · parent

www.central-boiler.co.uk ?

comment 5y ago · link · parent

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.

comment 6y ago · link · parent

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.

comment 7y ago · link · parent

here you go: https://github.com/expr-fi/fastlwc "Beating wc with C"

comment 7y ago · link · parent

how does this differ from here: https://github.com/lemire/simdjson/pull/365

comment 7y ago · link · parent

> Bone can't be eaten

Squirrels eat bones. Skeletons disappear rapidly in the wild.

comment 7y ago · link · parent

Try some of these :p https://gist.github.com/aqrit/6e73ca6ff52f72a2b121d584745f89...

comment 9y ago · link · parent

Valdez has a population of 4_000
12