Readit News logoReadit News
skitter commented on UK Discord users were part of a Peter Thiel-linked data collection experiment   rockpapershotgun.com/good... · Posted by u/righthand
pstuart · a month ago
Let's pretend that age verification is a valid need -- is there a way using cryptographic approaches to viably allow an end user to prove that they meet the criteria without sharing other data that they don't want third parties to have access to?
skitter · a month ago
I don't understand – what's the point of not collecting mass amounts of personal identity documents and face scans and linking them to online identities?
skitter commented on Inside Rust's std and parking_lot mutexes – who wins?   blog.cuongle.dev/p/inside... · Posted by u/signa11
pizlonator · 4 months ago
Author of the original WTF::ParkingLot here (what rust’s parking_lot is based on).

I’m surprised that this only compared to std on one platform (Linux).

The main benefit of parking lot is that it makes locks very small, which then encourages the use of fine grained locking. For example, in JavaScriptCore (ParkingLot’s first customer), we stuff a 2-bit lock into every object header - so if there is ever a need to do some locking for internal VM reasons on any object we can do that without increasing the size of the object

skitter · 4 months ago
I do the same in my toy JVM (to implement the reentrant mutex+condition variable that every Java object has), except I've got a rare deadlock somewhere because, as it turns out, writing complicated low level concurrency primitives is kinda hard :p
skitter commented on Pontevedra, Spain declares its entire urban area a "reduced traffic zone"   greeneuropeanjournal.eu/m... · Posted by u/robtherobber
anonymars · 6 months ago
What's wrong with buses?
skitter · 6 months ago
They're great, compared to cars. But while they have a relatively fast and cheap setup, over the long term light rail and trams are a lot cheaper to run and can coexist with foot & bike traffic easier since the rails make them very predictable.
skitter commented on Type-safe and user-friendly error handling in Swift 6   theswiftdev.com/2025/type... · Posted by u/TheWiggles
jlokier · 6 months ago
That's actually the same as Java, with its "checked exceptions" (aka listed in function signatures), and the RunTimeException hierachy which don't have to be listed.

In Java common errors and exceptions, like file I/O errors, have to be declared on each function signature, except everything under the RunTimeException hierachy is exempt from this requirment. In the language, RunTimeExceptions these are the messy errors like NullPointerException and ArithmeticException.

In practice, people do subclass program-specific exceptions under RunTimeException in Java, as well as wrapping existing exceptions inside a RunTimeException, for the sole purpose of not having to add them to function signatures all over the place.

skitter · 6 months ago
> for the sole purpose of not having to add them to function signatures all over the place.

I thought it was because you couldn't be fully generic over exceptions.

skitter commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
813ac4312b25c · 7 months ago
> Probably [hello NIGHTMARE !]. Who wants that? Nobody wants that.

I don't really care if you want that. Everyone should know that that's just the way slices work. Nothing more nothing less.

I really don't give a damn about that, i just know how slices behave, because I learned the language. That's what you should do when you are programming with it (professionally)

skitter · 7 months ago
The author obviously knows that too, otherwise they wouldn't have written about it. All of these issues are just how the language works, and that's the problem.
skitter commented on Itch.io: Update on NSFW Content   itch.io/updates/update-on... · Posted by u/panic
thinkingemote · 8 months ago
There is a lot of paranoia and conspiracy thinking here. Itch in the article says that the main group is Collective Shout which is against violence against women and girls: https://www.collectiveshout.org/open-letter-to-payment-proce...
skitter · 8 months ago
I do not see evidence that they are against violence against women and girls, only that they are claiming to be.
skitter commented on Fun with Futex   blog.fredrb.com/2025/06/0... · Posted by u/ingve
gpderetta · 9 months ago
Enough to be able to pack a mutex and a pointer together for example. If you are carefully packing your structs a one byte mutex is great.
skitter · 9 months ago
Yup, that's what I'm doing - storing the two bits needed for an object's monitor in the same word as its compressed class pointer. The pointer doesn't change over the lock's lifetime.
skitter commented on Fun with Futex   blog.fredrb.com/2025/06/0... · Posted by u/ingve
skitter · 9 months ago
Fun post! An alternative to using futexes to store thread queues in kernel space is to store them yourself. E.g. the parking_lot[0] Rust crate, inspired by WebKit[1], uses only one byte to store the unlocked/locked/locked_contended state, and under contention uses the address of the byte to index into a global open-addressing hash table of thread queues. You look up the object's entry, lock said entry, add the thread to the queue, unlock it, and go to sleep. Because you know that there is at most one entry per thread, you can keep the load factor very low in order to keep the mutex fast and form the thread queue out of a linked list of thread-locals. Leaking the old hash on resizing helps make resizing safe.

As a result, uncontended locks work the same as described in the blog post above; under contention, performance is similar to a futex too. But now your locks are only one byte in size, regardless of platform – while Windows allows 1-byte futexes, they're always 4 bytes on Linux and iirc Darwin doesn't quite have an equivalent api (but I might be wrong there). You also have more control over parked threads if you want to implement different fairness criteria, reliable timeouts or parking callbacks.

One drawback of this is that you can only easily use this within one process, while at least on Linux futexes can be shared between processes.

I've written a blog post[2] about using futexes to implement monitors (reëntrant mutexes with an associated condvar) in a compact way for my toy Java Virtual Machine, though I've since switched to a parking-lot-like approach.

[0]: https://github.com/amanieu/parking_lot [1]: https://webkit.org/blog/6161/locking-in-webkit [2]: https://specificprotagonist.net/jvm-futex.html

skitter commented on Veloren – Voxel action-adventure role-playing   veloren.net/... · Posted by u/tete
skitter · a year ago
If you're interested in how the mountains and rivers are generated, it's mostly based on the paper "Large Scale Terrain Generation from Tectonic Uplift and Fluvial Erosion": Each chunk rises (at a noise-based, constant rate) while erosion is applied based on the chunk's slope and the size of its catchment area.

The result is a river network as well as the central height of each chunk; based on this roads, caves and structures are laid out. The actual voxels are only determined when a player loads the area and are (usually) not persisted.

Also, for some technologies not related to worldgen: Rendering is done via wgpu, models are built in MagicaVoxel, and both client and server use an ECS (specs).

skitter commented on The Koto Programming Language   koto.dev/... · Posted by u/virtualritz
zozbot234 · a year ago
Rust itself has dynamic types via the Any trait and &dyn Any variables. They are not the default of course, but they're available should you really want them. IIRC C# works similarly, only its feature is called Dynamic instead, or something like that.
skitter · a year ago
They're rather different: In Rust types only exist at compile time; dyn Any is a normal trait object, so you can only call the trait's methods. With C#'s dynamic, you can call arbitrary methods and access any fields with type checking of those accesses being delayed until runtime, which works because types exist at runtime too.

Rust's dyn Any corresponds better to C#'s Object; dynamic exists to interface with dynamic languages and is rarely used.

u/skitter

KarmaCake day749February 5, 2020View Original