News for hackers. Stuff that matters.
Re:Show HN: Catfs – Cache AnyThing Filesystem Written in Rust by khc on Friday July 21, 2017 @05:43PM (#14823920)
For 1: https://users.rust-lang.org/t/conflicting-lifetime/11887

Or any time you want to use thread and closure. I know I am joining the threads before the references go away but it's not possible to express that. There's scoped threadpools but sometimes it's at a higher level than scope.

2: Can't get the return value for close(). readdir doesn't return the offset. I ended up wrapping libc myself: https://github.com/kahing/catfs/blob/master/src/catfs/rlibc....

I guess wrt string, it's extra frustrating because on unix, OsStr is really CStr but I get former (from command line) and often need latter for interacting with libc. Also when you learn Rust you first learn about str and String even though in my case I actually want to avoid them. Admittedly that's probably rare. Having every type duplicated (a ref type and a storage type) also increases the complexity.

Re:Show HN: Catfs – Cache AnyThing Filesystem Written in Rust by mmstick on Saturday July 22, 2017 @11:48AM (#14827744)
You should use crossbeam for #1. And as for strings, I wouldn't think of them as duplicate types any more than u32 and &u32 are duplicate types. They are semantically the same. Referencing a boxed type returns the reference type.
Re:Show HN: Catfs – Cache AnyThing Filesystem Written in Rust by khc on Saturday July 22, 2017 @12:46PM (#14828010)
What does crossbeam have to do with #1? I already mentioned scoped thread pools.
Re:Show HN: Catfs – Cache AnyThing Filesystem Written in Rust by steveklabnik on Saturday July 22, 2017 @04:15PM (#14829110)
Thanks! Always interested in learning about pain points.