Posts
3566
Following
214
Followers
361
Linux kernel maintainer. Compilers and virtualization at Parity Technologies.
@dngrs OK fair enough. I rarely have anything with multiple owners. That is a good example I think thanks! I get that.

Cell types are still totally alien topic but maybe that will uncover some day :-)
1
1
0
@FSMaxB I.e. I can put that then to RwLock<Foo> field in a struct. I tested and it worked! It might be also that I sometimes have redone some of e.g. cell functionality with PhantomData, i.e. I'm using "atoms" instead of "molecules" and thus I might be blind for the need perhaps... Still would be nice to see e.g. a presentation that would actually nail these (not a Rustbro Youtube tutorial video crap but something more in-depth).
1
0
0

@FSMaxB Nah I tested and I could ignore both and instead do:

        let foo = RwLock::new(unsafe { &mut *foo_raw.as_mut_ptr().cast::<Foo>() });

:-) If I have a Drop trait for Foo it’s pretty much what it needs to be.

2
0
0

dtrace.conf(24) is going virtual! We're one month away from the un-conference and are opening the virtual ticket booth for this free event, with optional add-ons for event t-shirts and an on-site social in Emeryville after the event. Bring your topics and prepare to discuss! https://dtraceconf24.eventbrite.com

0
2
0
@brauner @corbet @kernellogger @jann I'm doing most of my new code outside kernel and doing mostly fixes and reviews inside kernel ATM. The current cycle gives me opportunity to downscale and upscale my own contribution, not a lot but just enough.

Putting the release cycle too tight would make at first the life more difficult for independent kernel maintainers like me.

I've also noticed that the current window is great for big features, which need to fly for few weeks to get somewhat decent release quality. I might put a feature to Linus in the first PR and notice some actual problem at rc5/rc6. This would be a risk factor too.
0
0
1

Jarkko Sakkinen

Edited 1 month ago
@FSMaxB LOL I often use this search to find out what I might want to use from Rust library: https://doc.rust-lang.org/stable/std/?search=from_raw :D

I tend to end up to doing something in the edge of what Rust mm understands internally so having that tools is always value in robustness.
0
0
0
@FSMaxB

I regularly use Lazy from https://docs.rs/spin/latest/spin/lazy/struct.Lazy.html to do lazy initialization so I guess I've missed the std options.

I can actually think of one possible use case for Arc that would stick and I might need to do that. If I understand these primitives correctly Box and Arc have different ways on how they die:

1. Box: drop + free
2. Arc: drop

So for e.g. syscall reserved resource you might want to use Arc inside struct instead of Box. Both have a nice helper "from_raw" for raw memory.
3
0
0
@SeanOMik And also: I don't think there is much to agree on with me as I don't understand what they actually are. So going specifics with one cell type is not really the answer here, neither is how much you happen to use them. I.e. not a popularity vote...
0
0
0
@SeanOMik I rarely use Arc, and rather end up using e.g. RwLock or something. It does not end up to be the best option often in the end. So yeah have to admit that it is also fuzzy... And I really just don't get so far any of the cell types. I can admit that I don't understand them :-)
2
1
0
I still use e.g. PhantomData and it took less than 30 minutes to fully grab it (when I discovered it in 2022).
0
0
0

Jarkko Sakkinen

Edited 1 month ago
{Ref,Unsafe,Once,}Cell is one of the more confusing parts for me in Rust and I almost never end up using them because I don't really know what they are good at.

Also, have to admit that the use of Arc is rare and the use of Rc is never.

#rust #rustlang
4
1
4

8️⃣ Here's the 8th post highlighting key new features of the upcoming v257 release of systemd.

A longer time ago systemd introduced JSON based user records as an extension of classic UNIX `struct passwd`. These records can be provided via Varlink IPC or via drop-in files. The much richer set of account settings is documented here:

https://systemd.io/USER_RECORD/

1
7
2
@lari Sillä näyttäisi olevan samanlaiset Eccon kengät kuin mulla. En voinut olla spottaamatta :-)
0
0
1
OK, good because I've been wondering this sometimes.

I also wonder if customer service knows this:

1. https://amazonforum.my.site.com/s/question/0D56Q0000DFHPH0SQP/audiobook-no-longer-running-in-kindle-app
2. https://uk.amazonforum.com/s/question/0D56Q0000B7awIkSQI/unable-to-download-audiobook-title-on-kindle-paperwhite-and-kindle-app

Bunch of hits can be found where it is not clearly stated that "no it does not and will not work on the Kindle device." At most you have to be able to read it in-between the lines. I had my first Kindle device in 2010 or 2011 and I have faint memory that it could at least text-to-speech books but have not been able to find that option either in my current Kindle...
0
0
0
@lkundrak @oleksandr there is Windows version of mc but with FMs i prefer ”designed for OS” because RW of files is sensitive and corner case mined activity.
0
0
0
@lkundrak @oleksandr if have to touch win totalcmd is still the king 😀 ugly and useful
1
0
0

Jarkko Sakkinen

Edited 1 month ago
My recommended list of crates for baremetal, firmware and no_std alike programming:

- https://github.com/rcore-os/buddy_system_allocator
- https://github.com/Lokathor/tinyvec
- https://github.com/google/zerocopy/
- https://github.com/rust-embedded/heapless
- https://github.com/KokaKiwi/rust-hex
- https://github.com/de-vri-es/serial2-rs
- https://github.com/m4b/goblin
- https://github.com/gimli-rs/gimli

This is a list of crates, which I've actually used and found them useful over time. I've not done kernel code (yet) in Rus. Instead I've worked on two bytecode (with JIT) hosts, i.e. Enarx (wasm) and now with PolkaVM (previously wasm but I'm working on riscv32emac derivative which is the next generation). And right, I'm implemented a crate for zmodem (see zmodem2) ;-)

The crate that I'm not yet sure because have not been able to do yet stuff that I'd want to do with it is:

https://github.com/rust-vmm/vm-memory

I.e. use it for special mapping but with no VMM involved (my uses cases actually involve both with and without VM containers). So looking into that over time. E.g. Paolo is involved with this so I expect it to be quality, and rather contribute than look for other option.

#rust #rustlang #baremetal
0
4
5
@vbabka yep well company IT never really works :D with AI enhancements it will be IT not working now with AI and machine learning! (whoopee)

So... cannot really blame SUSE :D And I'm still open for getting bugzilla access :---)
0
0
0
It's impossible to back off after seeing this video (do not watch it): https://www.youtube.com/watch?v=M65R-t89fE4
0
0
0
In case you don't know what Ultrasatan is: https://lotharek.pl/productdetail.php?id=48
1
0
0
Show older