What's everyone working on this week (47/2018)?


#1

New week, new Rust! What are you folks up to?


#2

I’ve been integrating new types (thank god for macros) into orion, which have become a major usability improvement. Both in preventing misuse but also for things like random generation of keys. With std it’ll be a matter of just calling a generate() function on a given key type, without the user having to know what key-sizes are recommended, etc.

I have also been reworking the high-level API, after some feedback, so it feels much more like libsodium now. And lastly I’ve been working on improving the already public types, so as to keep more in line with the Rust API guidelines. I’ll probably spend most of this week testing and polishing the documentation. All this will be included in the v0.10 release, which I aim to get done mid/late this week.


#3

Last week I wrote an experimental crate for guaranteeing deadlock free mutexes. https://github.com/thezoq2/undeadlock


#4

I’m decently “functional” on my term project for my CS Seminar, which is an implementation of A Wait-Free Hash Map (Laborde).

(“Functional” as in I have a single-threaded test that a insert followed by get gives the value back, and that get doesn’t conjure values out of nowhere, but I’m missing the two other “major” operations of update and delete. (They’re next to be implemented.))

I’m not sure exactly how much of the std HashMap API I’ll be able to replicate, but a decent amount should be possible within the timeframe of the rest of the semester. The original paper also seems to assume perfect hashing unless I’ve sorely misunderstood (which would be fun), so I’m actually not sure what happens in case of a hash collision.

TL;DR this was interesting academically but I unfortunately won’t be able to recommend it practically :slightly_frowning_face:
Maybe I’ll feel inclined to revisit it at some point and actually try to write it like I’m writing Rust and not translating obtuse pseudocode algorithms.

The bounds I ended up with are pretty interesting:

pub struct HashMap<K, V, B = RandomState>
where
    K: Hash + Eq + Clone,
    V: Clone,
    for<'a> &'a V: PartialEq,
    B: BuildHasher,

though I could remove the Clone bound since it’s only used for attempted entry, and just forget it if the attempted entry fails…

(The actual items end up behind an Arc because they need to be atomically swappable so this was a decent solution to giving out references to it when it could then be deleted out of the hashmap from right underneath you)


#5

Just added an OrthographicCamera:


#6

I’ve been without internet for a week, so I’ve mainly been tinkering with my 2D game engine offline. Actually starting to feel vaguely usable now :slight_smile:

Next job is to get everything rendering to a framebuffer so I can do stuff like screen scaling - I’m almost there with it, but I’ve noticed the changes have started making me drop like a second’s worth of frames at random intervals, so I need to figure out what on earth is going on with that…


#7

Moving on from the bezier curves library to more UI oriented things for FlowBetween. I’m adding some extra functionality to the file manager displayed at the start of a session to bring it up to a minimal level of usefulness. It looks like this at the moment:

image

Last week I added the header and the colour scheme, as well as the ability to drag files around. I want to get re-ordering, renaming and deleting files to work so the whole thing is less of an implementation of the memory game.


#8

I wrote a SPIR-V reflection and manipulation crate, intended for Vulkan applications! https://github.com/gwihlidal/spirv-reflect-rs


#9

I’ve implemented a memory leak free version of Sodium FRP in rust (functional reactive programming). It uses a GC algorithm involving a reference counter + cycle detection under the hood.

The documentation is still incomplete, and this project would benefit greatly once trait impl specialization becomes a stable feature.


#10

I am implementing anonymous enum and checked-exception like error-handling in rust.

Just finished: project link


#11

I’m try to create my fist API in Rust with Actix and diesel: https://github.com/dancespiele/listing_people_api_actix
but I’m blocked with this issue How can I get the properties of `std::boxed::Box<dyn futures::Future<Error=actix_web::Error, Item=actix_web::Json<enpoints::people::model::CreatePerson>>>?


#12

Just added an EnvironmentCamera:


#13

I’ve spent the week trying to get Rust to build on DragonFlyBSD. It mostly works, and it’s already in ports, but there are crates which break on dfly (particularly nix). So I’ve been hoping to improve this support.

Over the weekend, I’ll work on implementing a function pearl (Probabilistic Functional Programming in Haskell in Rust. We’ll see how this goes.


#14

Posted a little dev update for my game: