Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,383 karma · joined Jan 3, 2008 (18y ago) · 8,295 submissions

mqudsi on most sites.
Submissions

comment 4y ago · link · parent

Flagged articles aren't removed or shaded differently on this alternative frontend, which is a huge waste of time.

comment 4y ago · link · parent

> For decades, researchers believed cats were domesticated in Egypt around 4,000 years ago, writes Stephanie Pappas at LiveScience. But a 9,500-year-old human burial in Cyprus that included cat bones found in 2004 upended that idea, and another study from 2014 indicates that domestic cats were bred in upper Egypt 6,000 years ago.

For comparison, estimates place dog domestication as having taken place anywhere between 29,000 and 14,000 years ago.

comment 4y ago · link · parent

Because it's hard to say "conditionally enable AVX-512 only on platforms supporting it BUT not on platforms where it actually brings performance penalties."

comment 4y ago · link · parent

> Everyone is way better off asking other party to repeat couple of words than listening for all that noise during the whole call.

I didnt understand the first three words, for Alice it was the next two, and for Bob it was the last four. How many people are going to ask to repeat?

Evolution taught us to understand over the sound of waves, crickets, rain, thunder, and more. It didn’t teach us to comprehend with half the signals masked.

comment 4y ago · link · parent

In the strictest sense, yes. But here clearly rendering is taking longer than 1/60s so it wouldn’t matter.

The compromise would be to always start rendering immediately rather than wait x ms, but if you detect that the previous rendering hasn’t completed when the next input has arrived then you can start debouncing before rendering until you catch up.

comment 4y ago · link · parent

> if any even exist

Fair point.

comment 4y ago · link · parent

I have projects lovingly maintained for a decade (and responding to genuine issues with bug fixes within days) that have under five stars. Not a good metric.

comment 4y ago · link · parent

Forget background threads. People don’t know basic programming principles. The thought of debouncing user input didn’t even occur to them.

comment 4y ago · link · parent

Thanks for linking that. I’ve heard horror stories and this is just another nail in the coffin.

comment 4y ago · link · parent

Regarding the 400 "degree" system: they're called gradians and it's part of the centesimal system of angular measures according to Wikipedia. And your French guess was right, they have their origins in the French Revolution. More here: https://en.wikipedia.org/wiki/Gradian

comment 4y ago · link · parent

Right, which makes it an effectively incorrect description. It is like if I said I wanted to change all green fruits to orange ones and you reported that as "my undertaking to change green apples to orange apples." It's the truth, but it's not the whole truth.

comment 4y ago · link · parent

No one is going to be able to seriously use and support AVX512 (or be sufficiently motivated to implement support for it in their libraries and especially applications) until Intel finally gets its act together with regards to AVX512 and decides it actually wants to commit to it being a thing.

The AVX2 rollout was (comparatively) flawless. The gains AVX512 brings over AVX2 are, for most people w/ specialty libs excluded, not worth dealing with the terrible CPU support. And Intel just keeps making the situation worse, taking one step forward and two back.

comment 4y ago · link · parent

Except you have to recreate the awesome plugins and community that exist around vim for vis. I wish they existed.

2174.

A Chinese Spy Wanted GE’s Secrets, but the US Got China’s Instead(bloomberg.com ↗)

5 points · by ComputerGuru · 4y ago · discuss

comment 4y ago · link · parent

On HN? Almost certainly more. I was wondering what PS5 could possibly mean in the context of OS dev!

comment 4y ago · link · parent

This hits close to home for me. I donated once to a friend’s campaign for local office and my personal (Gmail) email (which I don’t share with organizations I donate to) ended up on the Democratic Party mailing list and now I get daily spam with clickbait and outrage-inciting subject lines from every party-registered office holder in the country. You can unsubscribe to as many as you want, every day there’s a new PAC targeting you with their spam.

2177.

Google launches pilot program to keep political emails out of Gmail spam folder(axios.com ↗)

10 points · by ComputerGuru · 4y ago · 2 comments

2178.

New Active Directory integration features in Ubuntu(ubuntu.com ↗)

1 points · by ComputerGuru · 4y ago · discuss

comment 4y ago · link · parent

I was not talking about implementation details but semantics. I agree with what you are saying. My own implementations are user-mode unless sleeping.

comment 4y ago · link · parent

Condition variables were the POSIX equivalent to Win32’s WaitForMultipleObjects (and IOCP apis like it). Now both are available on Windows (and my library makes WFMO available on *nix/Linux/macOS).

Semaphores alone can’t mimic the same semantics (juggling between multiple, disparate locks/sync objects) without running into a possible race condition unless you have an API that can somehow wait on one of two or more semaphores to become available.

comment 4y ago · link · parent

Rust’s synchronization types are built on the semantics of shared objects, with the synchronization object owning the data access to which is channeled exclusively via the synchronization type.

Events and signals aren’t intended to be used off you’re trying to share ownership of memory or data - you should use the std types in that case. They’re for signaling between threads or for building your own synchronization objects atop of. For example, an auto reset event can be used in lieu of a one-bit channel (sort of like Mpmc<()>) and manual reset events can be used to implement the same in broadcast mode, much more efficiently than the channel crates. A common usage is to block until an event is available or a shutdown has been requested - in lieu of manually polling an AtomicBool and aborting if it is true, making your code more responsive (no delay between polls) and more efficient (no repeated polling, no busy waits, etc). They can be used to signal state transitions or readiness, which doesn’t have anything to “own”, for example, the rsevents-extra crate [0] implements a countdown event (event becomes available when n outstanding tasks have finished in parallel threads) or a semaphore (restricting concurrency to a region of code, not limiting access to a variable or object).

[0]: https://github.com/neosmart/rsevents-extra

comment 4y ago · link · parent

I maintain my own FOSS threads signals/events libraries in C++ [0] and in rust [1] (atop of parking lot as a futex shoe-in) and I disagree. This has nothing to do with the language and everything to do with the semantics of the locks. Writing concurrency primitives is HARD and the more functionality your API exposes, the more room there is for nuanced bugs in how everything interplays with everything else.

[0]: https://github.com/neosmart/pevents

[1]: https://github.com/neosmart/rsevents

comment 4y ago · link · parent

It would have been nice to get some commitments from the bigger Phabricator users before going public, so I could read this and see oh projects x, y, and z are going to be using Phorge! But maybe they wouldn't until they see what kind of project it's going to turn out to be..

comment 4y ago · link · parent

It doesn't matter if its trash so long as its fungible trash at a profitable price. i.e. the situation is OK for now but as soon as the market adjusts to the glut of GPU miners suddenly minting no-name coins no one really wants (and the novelty wears off) those prices are going to drop like a rock.

Most of these coins only have value as scams that you could prop up then cash out by exchanging for BTC or ETH; so long as the "new coin of the day" hype train exists there will be a way to make money off of GPU mining. I guess there will always be suckers in this unregulated market.

comment 4y ago · link · parent

It doesn't have to be stolen, it could have simply "fallen off the back of a truck." /s

(This actually doesn't happen as much as it used to twenty years ago with step-by-step inventory checkins made possible w/ RFID chips and barcodes combined with mobile network connections).

comment 4y ago · link · parent

This is where financial lawyers come in handy and you learn why companies are selling a $4000 product for $1500 with a coupon code that is plastered all over their site and auto-applied to your cart on checkout instead of just reducing the price (even if still showing the old price with a strikethrough). They're forbidden from selling the product for less than MSRP or some ratio thereof, but the coupon applies a discount to your total order (without discounting the product itself) so it flies. Or so I've been told.

comment 4y ago · link · parent

Did they restore your buy box after you rectified the situation?

comment 4y ago · link · parent

Yet that happens all the time. I've heard stories of companies going bankrupt after retail giant X learned competitor Y was selling their product for less, in breach of their contract (feel free to replace "contract" with Amazon ToS).

comment 4y ago · link · parent

Several years back, frustrated by this same problem and underlying constraints, I spent a weekend writing a machine-aided cost minification algorithm (aka what most startups call "advanced ML") that used LAB and LUV to try and pick 2x8 colors (the eight colors in dark/bright configurations) where the cost was defined as

a) how far apart each of the color pairs was from one another (hue only),

b) how far apart each dark/bright color in a pair were from one another,

c) how high the contrast against a specific background color (provided as a parameter),

d) how far the perceived brightness of any "bright" color differed from the rest of the "bright" colors,

e) how far the perceived brightness of any "dark" color differed from the rest of the "dark" colors,

f) how far each of the 8 base colors strayed from a range that could passably be called the de facto colors mapped to each of the palette members (e.g. cyan, blue, black, white, etc) so that TUI apps using colors not to distinguish but to draw (expecting "blue" to be a shade of blue) would not be thrown off.

Unfortunately I never found the results to be pleasing to the eye. I also think there was something wrong in either the math of the individual cost function factors themselves or the weights assigned to each factor because I didn't feel like the results were properly spaced out or representative of what even a local minima what look like if the math was all correct. I didn't really want to put more time into it than I already had, but I'm convinced that it's possible to generate a fixed set of 2x8 colors that meet these conditions for any given background color (at least one for a black or dark grey background and another palette for a white or off-white background).

comment 4y ago · link · parent

Thanks for the explanation, Khaled! I have some reading to do! Beautiful work, thanks for releasing these fonts and for sharing this info.
1
727374
277