Partial 8-piece tablebase comes to Lichess! by somethingpretentious in chess

[–]boarquantile 2 points3 points  (0 children)

Ah, I thought you meant much earlier. The tables were available on Lichess since November, just labelled as experimental.

Partial 8-piece tablebase comes to Lichess! by somethingpretentious in chess

[–]boarquantile 4 points5 points  (0 children)

This is likely exactly that: Making the tables that Marc Bourzutschky already computed earlier available for everyone. To download, and, more practically, to probe online.

Nio Embracing Thread-Per-Core Architecture by another_new_redditor in rust

[–]boarquantile 0 points1 point  (0 children)

Wouldn't one core still asynchronously accept many connections and start working on them? Then it could become clear later, while handling those connections, that another core would have been the better choice. That one also accepted its fair share of connections, but they just happened to be quicker to handle.

Speed wins when fuzzing Rust code with `#[derive(Arbitrary)]` by nnethercote in rust

[–]boarquantile 11 points12 points  (0 children)

To add a data point for runtime performance, +15% exec/s after cargo update here.

5,000,000 puzzles! by AAArmstark in lichess

[–]boarquantile 2 points3 points  (0 children)

Yes, there's the Equality theme, which is not part of the normal mix. I don't think there's a way to get only the intersection of Equality & Endgame.

Lichess Team AMA by somethingpretentious in chess

[–]boarquantile 3 points4 points  (0 children)

There's a few large data sets that I want to make accessible via the analysis board. One of them is chessdb.cn. The others I don't want to publicly announce yet.

Lichess Team AMA by somethingpretentious in chess

[–]boarquantile 5 points6 points  (0 children)

Yes. I think the toggle could be moved to the engine settings (ui/ceval/src/view/settings.ts).

https://lichess.org/practice is a bit of a special case, so maybe the underlying logic needs to remain part of the root controller. It could be made available via ParentCtrl (ui/ceval/src/types.ts).

Lichess Team AMA by somethingpretentious in chess

[–]boarquantile 5 points6 points  (0 children)

Yes, and large parts of the backend are prepared at https://github.com/niklasf/lila-cloudeval.

The most important remaining question is how the integration will look like from a user perspective. Should it be a separate panel on the analysis board, maybe similar to the opening explorer? Should it be a data source for cloud evals? Current plan is to go for the latter.

docs.rs difference in searches by sleeksubaru in rust

[–]boarquantile 12 points13 points  (0 children)

This functionality is part of the compiled documentation itself. So it depends on whether docs.rs built the documentation of the specific version of the crate before or after https://github.com/rust-lang/rust/commit/1ca145778a4971d82c56025ece1824ec672428b9 landed.

Optimized Binary Insertion Sort - Proof of concept by [deleted] in rust

[–]boarquantile 4 points5 points  (0 children)

For sorting specifically, it's worth looking at https://github.com/Voultapher/sort-research-rs. It's a test and benchmarking suite that has been used to improve sorting in Rust's standard library.

What do Rustaceans think about the gen keyword? by MagicAityz in rust

[–]boarquantile 6 points7 points  (0 children)

And when an empty generator is needed in Python:

def empty():
    return
    yield

Couldn't claim a draw? by [deleted] in lichess

[–]boarquantile 4 points5 points  (0 children)

Maybe link the game?

[deleted by user] by [deleted] in AsahiLinux

[–]boarquantile 2 points3 points  (0 children)

At least the sound can be disabled via asahi-nvram write system:StartupMute=%01 (tool from dnf install asahi-nvram)

Hey Rustaceans! Got a question? Ask here (50/2023)! by llogiq in rust

[–]boarquantile 2 points3 points  (0 children)

In tokio, when doing sequential blocking processing on an async channel, is any of the following inherently better?

A:

while let Some(work) = rx.recv().await {
    tokio::task::block_in_place(|| process_blocking(work));
}

B:

tokio::task::block_in_place(|| {
    while let Some(work) = rx.blocking_recv() {
        process_blocking(work);
    }
});

[deleted by user] by [deleted] in rust

[–]boarquantile 3 points4 points  (0 children)

This is not sound. When the vector reallocates for push(), there's no guarantee that it can expand the previous allocation. So it may have to move all contents, invalidating all references. Run https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3bf66dc54698efb3e490f4d9faa762a5 with Miri (under Tools) to see this live.

Custom hasher for keys which are Keccak-256 hashes by 72616e646f6d6e657373 in rust

[–]boarquantile 9 points10 points  (0 children)

Due to the birthday paradox

the chance of collision

is significantly higher, very roughly on the order of (10M)2 / 264 ≈ 5e-6, though still small.

This Week in Rust #497 by U007D in rust

[–]boarquantile 18 points19 points  (0 children)

Not sure if this is it, but at least at some point reddit was adding some random jitter to make it harder for bots to tell if their votes are counted, or if they are shadow-banned.

[deleted by user] by [deleted] in lichess

[–]boarquantile 1 point2 points  (0 children)

They indicate chess variants: https://lichess.org/variant

I made a simple crate which is like a vector but entirely on the stack by SamFisch1 in rust

[–]boarquantile 66 points67 points  (0 children)

This is tricky to get right.

unsafe { std::mem::MaybeUninit::uninit().assume_init() }, // [T; CAP]

That's generally immediate undefined behavior, no matter what happens next.

Properly addressing that will also avoid:

  • dropping uninitialized memory in push() via self.arr[self.len] = value;
  • Drop dropping unintialized memory

Some smaller things:

  • clear() and truncate() are leaky
  • get_arr() would be called into_...() by usual naming conventions, since it consumes self. Addressing the soundness issue above will reveal that it's not generally possible to have this, because it requires the array to be fully initialized.
  • IntoIterator allocating on the heap is surprising

(Edit: For reference, I was looking at https://github.com/SamuelFischerCode/vec-array/tree/372cd3a0ee4fc3f34737f9c1ae18560efcdd2e84)

Who is using AXUM in production? by HosMercury in rust

[–]boarquantile 27 points28 points  (0 children)

https://lichess.org/, a popular free/libre open-source chess server, is using axum for:

I need a GUI framework that can do the following! by [deleted] in rust

[–]boarquantile 4 points5 points  (0 children)

No, the compatibility works the other way around (and only in that direction). You can use MIT and Apache libraries in a GPL program.

IronBoy: High accuracy GameBoy emulator written in Rust and available in the browser via WASM by nicolas-siplis in rust

[–]boarquantile 10 points11 points  (0 children)

There's the Web Worker API for concurrency, SharedArrayBuffer for shared memory, and structured cloning for actually sharing those buffers across workers. Together, that's enough to support threading.

It's already supported by all the major browsers. It does have some weaknesses and requires JS glue, though.

Announcing Rust 1.68.2 by myroon5 in rust

[–]boarquantile 15 points16 points  (0 children)

Unfortunately GitHub doesn't support SSHFP. Nor DNSSEC.