HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Tobu

no profile record

comments

Tobu
·в прошлом месяце·discuss
Is there a list of CMD builtins somewhere?
Tobu
·в прошлом месяце·discuss
In the case of find and sort, the command invoked also depends on argument sniffing, with a fallback through the registry when that is indecisive: https://github.com/microsoft/coreutils/blob/main/src/nthelpe...
Tobu
·в прошлом году·discuss
The method is called `CoherentAllocation::into_parts`. And it takes self by value, which means the struct is consumed (this is implied by the into_ prefix). Of course you would either reconstruct the allocation or free the allocation yourself after this.

See Vec::into_raw_parts or Box::into_raw for an stdlib analogy.
Tobu
·в прошлом году·discuss
> will they abdicate their power

Yeah, no. This is a coup and they are all in. They would not be this blatant about taking control illegally and fast if they expected to leave any institutions to still enforce the law against them.
Tobu
·2 года назад·discuss
Looks like the Steam team moved to control spawning and do execvpe.

I would like to see at least in-process environment modification discouraged. Rust is dealing with the issue by considering getenv unsafe when coming through C, but getting rid of the read side is much harder than the write side.
Tobu
·2 года назад·discuss
It is possible to check for setenv/unsetenv/putenv with nm -D, and a quick sample of my ~/.cargo/bin/* shows far too many programs using those. Yeah they could be single threaded, but who can guarantee they will remain so? Come to think of it listing symbols could detect pthread_create as well.

I'd be interested in a way to do static binary analysis to get from those symbols to a call tree, as well.

I don't see a way to check for **environ usage though, the compiler could turn this one into anything.
Tobu
·2 года назад·discuss
There's a proof of concept here: https://sinrega.org/2024-03-06-enabling-containers-gpu-macos...
Tobu
·2 года назад·discuss
There was indeed sabotage, in the form of dismantling and not replacing hundreds of working mail sorting machines in an election year: https://www.forbes.com/sites/andrewsolender/2020/08/19/repor... https://truthout.org/articles/usps-sorting-machines-are-stil... https://www.ajc.com/news/postal-service-tells-judge-mail-sor... https://edition.cnn.com/2020/09/09/politics/usps-removed-711...

I don't know how he hasn't been removed after this.
Tobu
·2 года назад·discuss
I've had my own bad experiences with Btrfs (it doesn't behave well when close to full), and my intuition is that Facebook's use of it is in a limited operational domain. It works well for their use case (uploaded media I think?), combined with the way they manage and provision clusters. Letting random users loose on it uncovers a variety of failure modes and fixes are slow to come.

On the other hand, while I haven't used it for /, dipping my toes in bcachefs with recoverable data has been a pleasant experience. Compression, encryption, checksumming, deduplication, easy filesystem resizing, SSD acceleration, ease of adding devices… it's good to have it all in one place.
Tobu
·2 года назад·discuss
fclones for example covers it well for any filesystem with reflinks:

https://lib.rs/crates/fclones

fclones group |fclones dedupe
Tobu
·2 года назад·discuss
> Error handling on CRC read error > 2 or more copies of file, CRC on error, read other copy, data returned to userspace, does not correct bad copy

That's been implemented; in Linux 6.11 bcachefs will correct errors on read. See

> - Self healing on read IO/checksum error

in https://lore.kernel.org/linux-bcachefs/73rweeabpoypzqwyxa7hl...

Making it possible to scrub from userspace by walking and reading everything (tar -c /mnt/bcachefs >/dev/null).
Tobu
·2 года назад·discuss
The Into<SpanArithmetic> argument feels a little too magical. Since you are not constrained by a trait, I would prefer something like

    Span::add_with_reference(&self, other: &Span, reference: impl Into<SpanRelativeTo>)
Tobu
·2 года назад·discuss
The other actress wasn't the only one involved in the production; she provided input but OpenAI building a voice model would involve a lot of data and input. They had to have a model of her ready to go when they asked her for permission immediately before launching; possibly they had one that had been built from her, and another legal-approved that they had converged to be close to the first one but that didn't include her as a direct source.
Tobu
·2 года назад·discuss
Emergency braking feels more like shoving the wheel forward than shifting oneself behind the wheel. You ignore balance for a while, get yourself into a sitting position fast, the system can right itself (or not) after you've bled enough speed.
Tobu
·2 года назад·discuss
Adept -> Guru is the logical association
Tobu
·3 года назад·discuss
There are two level of pointers: the environment block points to an array of pointers to C strings, this higher-level pointer can be updated and the previous one freed, which is a problem when it is being iterated on (which getenv does). The C strings themselves aren't freed by glibc, though some applications do modify them in place.
Tobu
·3 года назад·discuss
Who doesn't? libc itself calls getenv when getting system time: https://news.ycombinator.com/item?id=38344224

You may have a mutex on getenv/setenv, like the Rust stdlib does, but when libc doesn't look at that mutex, even on the read side, you run into UB.

So the next step is never calling into seemingly innocent libc functions in safe code (which you have to enforce on your dependencies as well), implementing safe alternatives to a good chunk of libc (and making sure your dependencies use those), to cordon off anything that looks at the environment. This makes a good chunk of POSIX functionality useless.
Tobu
·3 года назад·discuss
kernel developers are free to factor in common functionality, calling into it library style, without making it into an externally visible layer. IIRC fs encryption and case insensitivity are often done that way, and I think I'd count the page cache and bios as larger library-style components as well (as opposed to the VFS layer which is more in a framework style).
Tobu
·3 года назад·discuss
Of course bcachefs can cache data; that was the main draw of bcache as well.

Quoting an example from https://bcachefs.org/GettingStarted/

    bcachefs format /dev/sd[ab]1 \
        --foreground_target /dev/sda1 \
        --promote_target /dev/sda1 \
        --background_target /dev/sdb1
    mount -t bcachefs /dev/sda1:/dev/sdb1 /mnt
This will configure the filesystem so that writes will be buffered to /dev/sda1 before being written back to /dev/sdb1 in the background, and that hot data will be promoted to /dev/sda1 for faster access.

    bcachefs format --help

    --promote_target=(target)
        Device or label to promote data to on read
Tobu
·3 года назад·discuss
I think the word they were looking for is "fragmented".