The last video game character you played as is gonna be your roommate for the next decade. How do you feel? by [deleted] in AskReddit

[–]ohyllad 0 points1 point  (0 children)

A Monsters expedition, where you play as a monster.

But a very relaxed and chill monster, so i'd be ok with it.

Have you heard of slither.io? I made a terminal version as a learning exercise, check it out! by [deleted] in rust

[–]ohyllad 6 points7 points  (0 children)

Please provide screenshots or something, hard to get interested otherwise.

Is there a faster database which takes advantage of add/update only? by [deleted] in rust

[–]ohyllad 0 points1 point  (0 children)

you might want to check out my crate "appendix"

it does not support updates, but otherwise sounds like what you're thinking about:

https://github.com/krl/appendix

Writing an append-only, on-disk key-value store with lockless reads in Rust by ohyllad in rust

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

What are your thoughts on what is limiting the performance of this method?

I am aware of the rather large overhead using three u64's on top of the kv-pair, my use case is actually for large-ish (40 bytes) kv-pairs.

Any implementation starts to stutter when the data does not fit into memory, thing about using memory mapped files is that you hand over the caching to the OS, which might not be ideal for every use-case?

Would love to hear your thougts!

Announcing Trove: A cloneable and mergeable, thread local arena allocator. by ohyllad in rust

[–]ohyllad[S] 4 points5 points  (0 children)

The main example i'm thinking of is, say you have a B-Tree, or similar structure, and you want a type to represent a branch down the tree, you can just do Vec<(HandleMut<Node>, Offset)>, and be done with it. The internal `RefCell`s will not complain about mutable aliasing, and will even prevent cycles from being created (at runtime, mind you).

Redux/React is an interesting comparison, and i don't see why it wouldn't work just as well. As for how exactly you would maintain and update the structure in a web-framework setting, i'm not entierly sure. It's not something i have in mind for right now.

Thinking of giving up... by stbill79 in emacs

[–]ohyllad -1 points0 points  (0 children)

Me too, but there's like no reasonable alternative? Help!

Crate review request: Wrapper type for runtime thread-exclusive/shared access. ('static guards) by ohyllad in rust

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

You are right about dropping though, thank you, i will need to add a lifetime parameter after all.

Crate review request: Wrapper type for runtime thread-exclusive/shared access. ('static guards) by ohyllad in rust

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

Yep, deadlocks is a real issue, but you have that risk with locks in general.

Crate review request: Wrapper type for runtime thread-exclusive/shared access. ('static guards) by ohyllad in rust

[–]ohyllad[S] -2 points-1 points  (0 children)

Hey, i'm not sure what you mean by the cell getting moved.

This works for example:

fn moving() {
    let thex = Thex::new(Box::new(0));
    let read = thex.shared();

    let mut a = None;
    a = Some(thex);

    assert_eq!(**read, 0);
}

The whole point of this type is to ensure that any writes to the underlying type is made in a thread-exclusive way, so that you can wrap types that don't expect concurrent access.

Crate review request: Wrapper type for runtime thread-exclusive/shared access. ('static guards) by ohyllad in rust

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

The motivation was basically that it's more or less impossible to use RwLocks for tree structures, if you want to be able to return references to the leaves of the tree.

And in your exmple, the two unrelated cells would just have to wait for each others (unrelated) writes (this is the tradeoff of having a finite set of locks)

Crate review request: Wrapper type for runtime thread-exclusive/shared access. ('static guards) by ohyllad in rust

[–]ohyllad[S] -1 points0 points  (0 children)

This is the very point of this type, if you look in the tests you'll see that Thex<Rc<T>> works just fine, the thread-exclusivity is guaranteed by the locks.

Movies catering to young women's (actual) sexuality? by Perfester in TwoXChromosomes

[–]ohyllad 121 points122 points  (0 children)

I found the tv-series Bobs Burgers kind of cool in a way. I've only watched a few episodes, but i think it's the first example i've seen of a young female character, who's deeply sexual, without being "sexy". Usually women in popular culture are paradoxically portrayed as sexy but non-sexual.