HackerTrans
TopNewTrendsCommentsPastAskShowJobs

CodesInChaos

3,761 karmajoined 14 lat temu

comments

CodesInChaos
·12 godzin temu·discuss
> The moment it does you'll be able to tell because Bitcoin will crash to 0.

The "workaround" for PoW is running the PoW computation on hardware that's better suited for the task. Bitcoin mining has been using ASIC for many years now.

Let's say a legitimate user is willing to wait for one minute on a budget phone. Then your PoW is limited to what that phone can compute in one minute. But on the attacker's specialized hardware this computation only costs fractions of a penny, so they are barely hindered by it.

The SHA256 based PoW scheme has a very heavy ASIC advantage. People have tried to design PoW scheme that minimize the custom hardware advantage, but I'm not sure if they managed to close the gap far enough to make PoW feasible for this application.
CodesInChaos
·12 godzin temu·discuss
How much does routing traffic though residential proxies cost?
CodesInChaos
·3 dni temu·discuss
I wonder what the "unknown" 25% are.
CodesInChaos
·4 dni temu·discuss
I like keeping the number of stateful systems minimal, since those are the most annoying from a reliability perspective. In practice I use one database and object storage (S3). If that database is postgres is secondary.
CodesInChaos
·5 dni temu·discuss
The primary thing it checks for is panics. (bounds|overflow|DBZ) are just examples where Rust panics (for overflows rust doesn't always panic, while Kani always fails).

You aren't testing your application code directly, but writing a test function. That test function can include any assertion you want in the end, which causes a panic, failing the verification. Similarly you want to add assumptions in the test function for pre-conditions, so parameter verification assertions in the application won't fail the verification.

Example from the tutorial:

    #[cfg(kani)]
    #[kani::proof]
    fn verify_success() {
        let x: u32 = kani::any();
        // estimate_size rejects x >= 4096, so this prevents failure from argument verification panicking
        kani::assume(x < 4096);
        let y = estimate_size(x);
        assert!(y < 10);
    }
https://model-checking.github.io/kani/tutorial-first-steps.h...
CodesInChaos
·5 dni temu·discuss
The limiter itself should be able to ensure consistency via pessimistic row level locking, even at lower isolation levels.

What I don't want is long running unrelated transactions keeping old tuples alive just it case they're needed. My third suggestion where transactions attempting to read old versions fail is probably better than the first two where isolation gets silently downgraded, since it avoid that problem.
CodesInChaos
·5 dni temu·discuss
I'd love the ability to mark a table as "read committed" to prevent long running transactions from keeping old versions of a tuple alive, or even "read uncommitted" to enable in-place updates. Or perhaps instead of downgrading isolation, those serializable/snapshot transactions could simply fail when reading a value from such a table that was modified after they started.

An example of a table that would benefit from this would be rate-limits / concurrency-limits, which are commonly implemented using Redis instead of Postgres.
CodesInChaos
·5 dni temu·discuss
In this example I used the hyphen for comedic effect. But this is a actual sentence I wrote in an older post:

> What's the competition in the gaming-capable pre-built mini-PC category
CodesInChaos
·5 dni temu·discuss
That would be pointless, since a consumer always buys a license, not the software itself.
CodesInChaos
·5 dni temu·discuss
> In a snake-eating-its-own-tail irony, a 2023 analysis found that between 33% and 46% of workers on the platform were using large language models to complete their tasks,

I assume AI use by workers has risen to the point where it renders Mechanical Turk pointless.
CodesInChaos
·5 dni temu·discuss
The Actually Indian kind?
CodesInChaos
·5 dni temu·discuss
I have an over-hyphenated writing-style as well. Probably my Germanness.
CodesInChaos
·5 dni temu·discuss
Modern cloudflare in a nutshell.
CodesInChaos
·6 dni temu·discuss
Apparently Defender of the Crown will get a remaster next month:

https://www.gog.com/en/game/defender_of_the_crown_the_legend...

https://store.steampowered.com/app/4208140/Defender_of_the_C...
CodesInChaos
·6 dni temu·discuss
I like the Rust approach of adding operations like `algebraic_add` instead of supporting a compiler flag. This avoids undefined behaviour and keeps the complications from optimizations localized to code using these.

https://doc.rust-lang.org/std/primitive.f32.html#algebraic-o...

> Algebraic operators of the form a.algebraic_*(b) allow the compiler to optimize floating point operations using all the usual algebraic properties of real numbers – despite the fact that those properties do not hold on floating point numbers. This can give a great performance boost since it may unlock vectorization.

> The exact set of optimizations is unspecified but typically allows combining operations, rearranging series of operations based on mathematical properties, converting between division and reciprocal multiplication, and disregarding the sign of zero. This means that the results of elementary operations may have undefined precision, and “non-mathematical” values such as NaN, +/-Inf, or -0.0 may behave in unexpected ways, but these operations will never cause undefined behavior.

> Because of the unpredictable nature of compiler optimizations, the same inputs may produce different results even within a single program run. Unsafe code must not rely on any property of the return value for soundness. However, implementations will generally do their best to pick a reasonable tradeoff between performance and accuracy of the result.
CodesInChaos
·8 dni temu·discuss
And because we typically know enough about a person to tell if the opinion they expressed is consistent with their believes.
CodesInChaos
·8 dni temu·discuss
I regularly get reddit comments downvoted by people who don't recognize it's obviously satire.

Sometimes somebody else comments "why is this getting downvoted, it's satire", and that stops or reverses the influx of downvotes.
CodesInChaos
·8 dni temu·discuss
What were they unhappy about? Do you have a link to further information?
CodesInChaos
·9 dni temu·discuss
That's what I generally choose. You don't need to worry about distributed system semantics, if you choose to not make the system distributed.

However the way Postgres keeps around obsolete rows (deleted or modified) until they're vacuumed can cause problems for high throughput queues. So for those systems the complexity might be worth it. But I bet 90% of the time the choice to use a separate queue is premature optimization. And hopefully OrioleDB (undo based storage engine for postgres) will avoid most of these pitfalls reducing the need for separate queues even further.
CodesInChaos
·9 dni temu·discuss
Really weird decision. Though it was added to GOG about 3 weeks after that article was written.

And GOG has its share of slop (e.g. a dozen Whale Rock Games which have obviously fake reviews).