HackerLangs
TopNewTrendsCommentsPastAskShowJobs

CodesInChaos

3,760 karmajoined 14 yıl önce

comments

CodesInChaos
·3 gün önce·discuss
I wonder what the "unknown" 25% are.
CodesInChaos
·4 gün önce·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
·4 gün önce·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
·4 gün önce·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 gün önce·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 gün önce·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 gün önce·discuss
That would be pointless, since a consumer always buys a license, not the software itself.
CodesInChaos
·5 gün önce·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 gün önce·discuss
The Actually Indian kind?
CodesInChaos
·5 gün önce·discuss
I have an over-hyphenated writing-style as well. Probably my Germanness.
CodesInChaos
·5 gün önce·discuss
Modern cloudflare in a nutshell.
CodesInChaos
·5 gün önce·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 gün önce·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
·7 gün önce·discuss
And because we typically know enough about a person to tell if the opinion they expressed is consistent with their believes.
CodesInChaos
·7 gün önce·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 gün önce·discuss
What were they unhappy about? Do you have a link to further information?
CodesInChaos
·8 gün önce·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
·8 gün önce·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).
CodesInChaos
·8 gün önce·discuss
I have a hard time believing that GOG rejected a Zachtronics game. They're popular, high quality, and a good match for the GOG audience. An GOG already sells several of them (I own SHENZHEN I/O and Spacechem on GOG).
CodesInChaos
·9 gün önce·discuss
I don't have to re-enter my boot password after Sleep, so obviously the encryption key is still in memory.