What's everyone working on this week (14/2017)?


#1

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


What's everyone working on this week (13/2017)?
#2

Setting up a secret blog and writing the first content.


#3

Got a simple C#-interop sample that can read from or write into and reserve space in a Rust Vec. That should be enough to read a hyper request body and write a hyper response body. Next I’ll start thinking about how one could poll a C# Task as a Rust Future, probably just a wrapper in C# that writes success/failure to a shared struct in Rust when it’s done.

I’ve also picked my async sample for elastic again, which should be ready to merge after a bit of polish.


#4

Extracting the shared concurrent testing & benchmarking code of my lock-free primitives into a separate crate.

After that, I would also like to resurrect some ideas related to task scheduling that I had a couple of years ago, back when I was playing with an OS project. Essentially, it’s about giving your OS scheduler more metadata so that it can take better decisions:

  • Separate soft real-time (on-the-fly audio/video processing, UI interactions…), foreground (“simultaneous” application execution) and background (invisible and unobtrusive) tasks. They have very different scheduling requirements, and should not be all handled in the same way.
  • Decouple tasks from threads even further than TBB/HPX/Rayon, which allow a single user-mode thread to process multiple tasks, by allowing a single task to spread across multiple threads. This would immensely clean up work delegation across processes (e.g. IO requests).

#5

Preparing a presentation for the Seattle rust meetup about the almost-finished redesign of rental and the issues and motivations surrounding self-borrowing structs in general.


#6

Started writing books for my projects using Spongedown. A modified version of mdbook and markdown - the code is here


#7

Publish a couple of “save me from my standard library” utils:

One liner to read a text file (PR to existing rust-file):

extern crate file;

fn main()  {
    let string = file::get_text("hello.txt").unwrap();
    println!("Text: {}", string)
}

A small utility to measure execution time of a block of code when you can’t extract it into a microbenchmark:

elapsed

extern crate elapsed;
use elapsed::measure_time;

fn main() {
    let (elapsed, sum) = measure_time(|| {
        (0..10_000).sum::<u64>()
    });
    println!("elapsed = {}", elapsed);
    println!("sum = {}", sum);

    // Prints
    // elapsed = 227.81 μs
    // sum = 49995000
}

#8

I started playing with Rust 2 weeks ago. I’m almost through the book, and I’ve started writing a simple JSON parser as my first project.

Really excited to be working with the language and community. After years of Python and JavaScript, Rust seems like a completely different world!


#9

Found some free time this weekend and released v0.12.0 of uom (automatic type-safe zero-cost dimensional analysis)! I marked a number of issues to add new quantities or units help wanted in case anyone wants to contribute.

This week my goal is to add better testing. Not quite sure how to go about verifying conversion factors without duplicating them in test cases.


#10

Had a chance to take some more time on lichen scripting DSL. Implemented multiline syntax with brackets, a final next-node command in if-statements, string formatting from the super environment variables, and convenience method quoted-symbol which both generates the truth-binding and uses it in one line. Syntax looks like a bit like this:

root
    has_weight some_weight < 5.0
    some_comp:all [has_weight '!some_item]  # reference some_item from env and auto-bind value as bool
    if some_comp \"looks like you are `some_weight kgs heavy, `name\"  # format with super-environment using backtick
;

Need to write more tests for logic evalutations, and then I want to find a better way to implement the interface between the script and Rust data. Right now it’s manually done


#11

I’m still plodding along with my Rust port of PBRT, a physically-based raytracer: https://bitbucket.org/abusch/rustracer

I’ve been fixing bits and bobs while mustering the courage to finish support for PBRT’s scene file format. The lexer is done, and the parser is in progress. I’ve been using combine for this.


#12

I published a crate for easy caching/memoization of functions. cached provides a macro for defining functions that wrap a unique cache instance. It was heavily inspired by python’s decorators!

There are several built-in caches available, but any custom cache that implements cached::Cached can be used instead.


#13

This was obviously the Rust Community Blog.


#14

Working through Rust by Example. Great way to learn. I am always tempted to start adding more code to the examples.
Hey, I am only here because I just could not pass up this great handle but who knows what might come of it in time. :wink:


#15

The rust-by-example people are really happy with example contributions!
The team has so many other obligations in the rust community that the examples don’t always get the love they deserve.

I have my own threading example in the queue, because I thought we could use a better one.
So, if you’re playing with the examples, and think you can do better/more-challenging/more-up-to-date, feel free to open a pull request!

So yeah, that’s one of the things I was working on this week. I’m also hoping my fix for quick-links in crate headers will be accepted for crates.io (sorry for breaking it, logged-in people!), and I’m teaching a co-worker of mine how to Rust