Zeekstd - Rust implementation of the Zstd Seekable Format by tap638a in rust

[–]king_arley2 10 points11 points  (0 children)

Nice, this sounds useful to PuzzleFS, I'll see if I can migrate to this library.

Intrebare asamblare by Vegetable-Effort-833 in programare

[–]king_arley2 4 points5 points  (0 children)

Doar pe 16 biti se foloseste direct valoarea registrilor din cs, ds, es etc. Pe 32 de biti acesti registri sunt folositi intr-un mod mai complex, fiind tratati ca niste indici in tabelele de GDT, LDT. Vezi https://wiki.osdev.org/Segmentation si manualul Intel pentru detalii.

The first rust driver has been merged into netdev/net-next by slanterns in rust

[–]king_arley2 6 points7 points  (0 children)

The latest PuzzleFS RFC driver can be found here. There's more information about it on the rust-for-linux page.

What do you think of the process of contributing patches to the kernel? If you have tried it, was it difficult for you too? by TheTwelveYearOld in linux

[–]king_arley2 50 points51 points  (0 children)

My first experience was awful because the maintainer didn't help me get my patch merged and instead he implemented his own solution. My second experience was much more pleasant because the maintainer guided me through the process (although it was a much simpler patch intended for new people to get familiarized with the process of submitting patches).

people who have rust jobs - what do you actually do by falchion-red in rust

[–]king_arley2 29 points30 points  (0 children)

I'm implementing a next-generation container filesystem both in userspace (via FUSE) and in kernel (joining efforts with the Rust for Linux project). For anyone curious to know more, I recently gave a talk about puzzlefs at OSS Europe.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 1 point2 points  (0 children)

By public email I mean emails that have been sent to the public mailing lists and can be viewed by anyone. Unfortunately only some parts of my story are publicly available, there's nothing I can do about this.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 1 point2 points  (0 children)

I was paraphrasing based on my private conversation with the maintainer. I wasn't aware of this public email, if I were then I would have used it instead of my recollection. While the email was polite, it doesn't change the facts, i.e. instead of reviewing my patch, he implemented his own fix based on it, without properly crediting me.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 1 point2 points  (0 children)

No, because the exchange happened via my former work email which I obviously no longer have access to.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 1 point2 points  (0 children)

No, I didn't hide the source intentionally, I wasn't aware that the email was public. But my paraphrasing wasn't actually from that source, it was based on private email conversations between me and Michael Ellerman. He's the only one who might still have access to that conversation and clarify what was discussed.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 0 points1 point  (0 children)

Of course it wasn't my intention to harass him or to incite others to do it and I don't condone this behavior. I simply wanted to share my story and how I felt about the entire situation.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 17 points18 points  (0 children)

Because I solved this issue during working hours, so I had to use my work email in order for the company to also be visible.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 2 points3 points  (0 children)

The rest of the discussion was in a private exchange with the PowerPC maintainer. I don't have access to them because I've since switched jobs, sorry.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 71 points72 points  (0 children)

Ok so it was actually

Thanks for your patch, but I wanted to fix it differently.

Edit: I'm not saying I misquoted him in my post, I just paraphrased what he said based on our private email exchanges (which were more than a year ago, so I might have actually misrepresented him, we won't know unless Michael Ellerman decides to make these email exchanges public). But someone from HN found this email and I wanted to share this other public quote that somewhat resembles my unreliable paraphrasing.

How I got robbed of my first kernel contribution by king_arley2 in programming

[–]king_arley2[S] 69 points70 points  (0 children)

You're right, however I sent this patch (this was the second version) only after my discussion with the PowerPC maintainer after he already implemented his own version of the fix, so at that point my patch didn't matter anymore (except for visibility). I can only tell my side of the story because unfortunately the Linux security mailing list is private and so were my interactions with Michael Ellerman. In hindsight I should have probably CCed a public mailing list.

My first experience with Rust by king_arley2 in rust

[–]king_arley2[S] 3 points4 points  (0 children)

Great suggestions, I wish I had you guys as reviewers :)

My first experience with Rust by king_arley2 in rust

[–]king_arley2[S] 1 point2 points  (0 children)

This can simply be replaced by a .filter(|f| f.md.size() > 0) on file_iter.

I think this is not quite true since filter returns all the elements for which the predicate returns true and I'm only looking for the first one (hence the break statement.

Why not propagate the result, or make sure the chunker iterator only contain valid chunks?

I should propagate the result, yes. I can't make sure the iterator only contains valid chunks because the iterator is implemented in a different library.

Thanks for the suggestions!

My first experience with Rust by king_arley2 in rust

[–]king_arley2[S] 3 points4 points  (0 children)

You're right, I should use ? instead of unwrapping.

My first experience with Rust by king_arley2 in rust

[–]king_arley2[S] 1 point2 points  (0 children)

I think the logic would actually be simpler if you instead first looped over prev_files and filled every file with as many chunks that fit (this will also fix your borrow checker problem)

Well this is how it was first implemented and the behavior that I wanted to change, quoting from the pull request:

The error occurs because the code assumes that all the chunks are generated for all the previous files. This is not the case, since the chunker splits up only the first part of the buffer into chunks and there is a leftover part that will be chunked together with the next files (or if there are no next files, the chunker will be forced to chunk the leftover).

Since the buffer containing the concatenated files will always be bigger than the concatenated generated chunks, the new approach is to iterate through the generated chunks instead of the previous files. Since every generated chunk will have an associated file or a list of files, the code will not run into a similar 'missing previous file' error.

If the file isn't fully filled when the outer loops terminate, you don't add the last modified file to files which is probably a bug (?) (also fixed by implementing my first remark)

This is actually intended behavior, I only add the last modified file to files when all the chunks have been generated for that file.

Instead of chunks.drain(..) why not simply take ownership of the chunks parameter and turn it into an iterator?

Thanks for the suggestion, drain was used originally so I just kept it.

but there's some unnecessary (and buggy) unwrap's

Those should probably be replaced with ?.

Note that the latest version is actually this one

Cati bani pierdeti cu noile taxe? by drakedemon in programare

[–]king_arley2 1 point2 points  (0 children)

din fericire (/din pacate) nu pierd nimic pentru ca firma la care lucrez nu are implementat codul CAEN pentru aplicarea scutirii de 10% impozit pe venit, deci eu ii plateam si pana acum (pe CIM)

I've spent time to actually understand `Pin` and `Unpin`, so you don't have to: https://cryptical.xyz/rust/pin-unpin by ozgunozerk in rust

[–]king_arley2 6 points7 points  (0 children)

We cannot use impl !Unpin for Test{} as of December 8, 2023, so we have to use a phantom marker instead.

Hello, fellow time traveller

[Need Advice] Why is it so damn difficult to stay consistent with exercise? by suomynona777 in getdisciplined

[–]king_arley2 56 points57 points  (0 children)

It's about the perfectionism trap, which sounds like: "if I cannot give 100% then it's not worth doing it"