HNHacker News
TopNewBestAskShowJobs

gpderetta

13,796 karma · joined February 28, 2014

submissionscomments
gpderetta··on Personal Computer by Perplexity
Isn't the CEO taking themselves out of the equation in this demo?
gpderetta··on Iran-backed hackers claim wiper attack on medtech firm Stryker
> Can we get a flag feature?

there is one already, and you would know if you weren't a new account complaining about "What happened to this site" after a comment from a 20yo account.

gpderetta··on The dead Internet is not a theory anymore
signal/noise
gpderetta··on What I Always Wanted to Know about Second Class Values
> all local state needs to be copied

all local live state. The idea is that most objects are ephemeral and will be orphaned before there is a need to be collected.

gpderetta··on What I Always Wanted to Know about Second Class Values
to be clear, C++ doesn't allocate lambdas on the heap. The allocation is under user control like for any other type.
gpderetta··on Two Years of Emacs Solo
"a weapon from a more civilized age".
gpderetta··on Two Years of Emacs Solo
Pretty much yes. I switched to eglot from emacs-lsp because of some frequent random errors ("document not added") that required me to frequently kill clangd; might be a PEBCAK problem, but went away with eglot.

Everything mostly worked out of the box.

gpderetta··on Lisp-style C++ template meta programming
> This is not something you would use in production

Ages ago in C++98/03 era, cons based lists were the only way to do type lists or tuples, so solutions like these did see some production use (and yes, it did kill compile time).

Of course these days variadics have made these solutions obsolete.

gpderetta··on My “grand vision” for Rust
you mean better than ever?
gpderetta··on Async Programming Is Just Inject Time
> Your CPU doesn’t know or care what functions are [...]

Well, most architectures do not use plain jumps with implicit arguments for function calls, but have explicit call/ret or branch-with-link instructions. Even those that used jumps had branch hints. The reason is that the microarchitecture must know about call/ret pairs to be able to predict the return path as the generic dynamic predictor is just not good enough for such a common path.

Reduced prediction performance compared normal calls is actually a concern for some coroutine and async code.

> in C we don’t have any dynamic lookup inside functions—every dynamic jump comes from an explicit conditional statement

function pointers.

gpderetta··on Show HN: I made a zero-copy coroutine tracer to find my scheduler's lost wakeups
Very nice. I might steal some ideas.

A small comment after a cursory look: the signaling in CoroTracer.h:162 is susceptible of missed wakeups; you would need a #StoreLoad fence between the slot .seq store and the sleeping flag load (and for the load to be an acquire). The traces probably needs a mirror change.

As the load is relaxed, I assume you are not worried by missed wakeups and it is ok if the tracer is woken up by a latter trace. Of course there might not be a latter trace and you would need a timeout on the sleep.

gpderetta··on Process-Based Concurrency: Why Beam and OTP Keep Being Right
My understanding is that BEAM/OTP is not related to CSP, but to the Actor model (although IIRC Hewitt disagreed).
gpderetta··on Iran's Ayatollah Ali Khamenei is killed in Israeli strike, ending 36-year rule
The Board of Peace admission price is $1B apparently.
gpderetta··on The United States and Israel have launched a major attack on Iran
> Israel is the largest American aircraft carrier in the world that cannot be sunk,

Airstrip one is disappointed.

gpderetta··on The United States and Israel have launched a major attack on Iran
epolanski didn't mention US?
gpderetta··on The United States and Israel have launched a major attack on Iran
> Iran has petrol

More than taking control of Iranian petrol, this is probably more an attempt at cutting off China access to it (and also generally eliminating one of their allies), same as for the Venezuelan invasion.

gpderetta··on The United States and Israel have launched a major attack on Iran
I don't think parent is presenting an excuse. They are suggesting that generational trauma is one cause of conflict.
gpderetta··on The United States and Israel have launched a major attack on Iran
surely you mean the coveted FIFA Peace Prize!
gpderetta··on Read Locks Are Not Your Friends
You need a way to cleanup after that though. Either GC or, for non-GC languages, some deferred reclamation method like hazard pointers or RCU.
gpderetta··on Read Locks Are Not Your Friends
mostly yes.
gpderetta··on Read Locks Are Not Your Friends
the behaviour is quite typical for any MESI style cache coherence system (i.e. most if not all of them).

A specific microarchitecture might alleviate this a bit with lower latency cross-core communication, but the solution (using a single naive RW lock to protect the cache) is inherently non-scalable.

gpderetta··on The Age Verification Trap: Verifying age undermines everyone's data protection
Ideally the law would require websites (and apps) to provide some signed age requirement token to the client (plus possibly classification) instead of the reverse. Similarly OS and web clients should be required to provide locked down modes where the maxium age and/or classification could be selected. As a parent I would the be able to setup my child device however I wish without loss of privacy.

Is it bypassable by a sufficiently determined child? Yes, but so it is the current age verification nonsense.

gpderetta··on Understanding Std:Shared_mutex from C++17
> it's impossible to support the same API as you're used to with std::shared_mutex

If I understand the problem correctly, the standard library could specialize the scoped lock objects for the shared mutex, online allocate the waiter object in the lock (so it will be in the stack) and use an internal dedicated API.

It might be harder (but not impossible) to interoperate threads using direct lock calls with threads using the scoped API.

In any case it is a moot point, as I don't think any std library does it nor will never do as it would probably be ABI breaking.

gpderetta··on Defer available in gcc and clang
Of course not! Those that would have, already did!
gpderetta··on Defer available in gcc and clang
RAII also composes.
gpderetta··on Interlock (Engineering)
> In modern days, most cars have an anti-theft feature that restricts the turning of the steering wheel if the key is not inserted in the ignition

This needs updating:

> In the past, most cars had an anti-theft feature that restricted the turning of the steering wheel if the key was not inserted in the ignition. These days, for convenience, is enough that the key has been in the vicinity of the car in the recent past.

gpderetta··on Why vampires live forever
Time to break the Masquerade it seems.
gpderetta··on Europe's $24T Breakup with Visa and Mastercard Has Begun
I somehow doubt that parent is British or has any clue about life in UK.
gpderetta··on Europe's $24T Breakup with Visa and Mastercard Has Begun
In UK, consumer protection for Credit Cards is guaranteed by law (Section 75 of the Consumer Credit Act), but not for Debit Cards (that's contractual).
gpderetta··on Why E cores make Apple silicon fast
Oh. Apple won this and the last few rounds for sure. They definitely picked the right microarchitecture and delivered masterfully.

Early on personally I had doubts they could scale their CPU to high end desktop performance, but obviously it hasn't been an issue.

My nitpick was purely about using clock per cycle as a performance metric, which is as much nonsense as comparing GHz: AFAIK Apple cpus still top at 4.5 GHz, while the AMD/Intel reach 6Ghz, so obviously the architectures are optimized for different target frequencies (which makes sense: the power costs of a high GHz design are astronomical).

And as an microarchitecture nerd I'm definitely interested in how they can implement such a wide architecture, but wide-ness per-se is not a target.

← PreviousPage 8 of 34Next →