Skip to main content

Unanswered Questions

158 questions with no upvoted or accepted answers
15 votes
0 answers
264 views

Download files in parallel

This module has a ensure_downloaded function which takes a slice of Urls. It downloads all of the urls to a local downloads ...
9 votes
1 answer
386 views

Metropolis Monte Carlo Sampler in Rust

the following is an implementation of the standard Metropolis Hastings Monte Carlo sampler. You can read more about it here. At the end I am going to give you a link to the Rust playground, so you ...
6 votes
0 answers
266 views

All pairs/Cartesian multiplication of iterators in rust

crustaceans! This is my attempt at creating an all_pairs operation for rust iterators. The code has to generate a new iterator which, when iterated, produces all ...
6 votes
0 answers
107 views

Chapter 8 Challenge: Add employee names to a department

The boring but exciting challenge: Using a HashMap and HashSet, create a text interface to allow a user to add employee names ...
6 votes
0 answers
167 views

Efficiently generate distinct subsets which sum to a particular value

Related: Find all distinct subsets that sum to a given number This code is supposed to efficiently generate all subsets of a list such that the subset's values sum to a particular target value. For ...
6 votes
0 answers
179 views

Simple-ish Rust implementation of 'cat'

I've seen some other implementations of cat (even in Rust) on this site, but none attempted to completely implement the GNU cat CLI as far as I can tell. This version that I am developing is complete (...
6 votes
0 answers
304 views

Generating integer partitions

I've tried to implement integer partition algorithm as described in blogpost below (author implemented it in Python): Generating integer partitions I'm still trying to learn best practices in ...
6 votes
0 answers
200 views

Character-based transitions (part of a lexer)

As part of my prep for the Code Review community-challenge (which looks like it will be Write your own programming language), I've been working on an LL(1) lexer generator in Rust. Yes, lexer ...
5 votes
0 answers
43 views

Procedural macro to derive de/serialization trait from/to little endian bytes

I wrote a trait library that allows the de-/serialization of data structures from/to little endian bytes 1. For it I now wrote my first procedural macro 2 to be able to derive the traits ...
5 votes
0 answers
56 views

after initial r*view here is a rewrite of my c++ timerqueue ported to rust

Purpose. Provides a background task queue so that code can ask for a function to be run at a specified point in the future. They indicate what to run (a closure) and when to run it (also a name just ...
5 votes
0 answers
478 views

recursive-file-watcher in rust

hello guys i made a file watcher in rust using notify crate that watches a directory and if it detects file changes it will copy all of the files within the directory to another directory,i wanted you ...
5 votes
0 answers
294 views

almostIncreasingSequence

This is assignment from codesignal: Given a sequence of integers as an array, determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the ...
5 votes
0 answers
180 views

Tetris clone in Rust using specs

In order to get a hang of the ECS paradigm of game making, I decided to try my hand at making a clone of Tetris. I am using the specs crate for Rust in order to ...
5 votes
0 answers
946 views

A multithreaded, growable vector with immutable elements, which has wait-free reads

Disclaimer for future readers: We experimented around with a similar approach at HASH. The linked Pull Request is working. I wrote a small vector with a few lines of unsafe Rust. The idea is to have ...
5 votes
0 answers
238 views

Drawing the Mandelbrot with multiple threads in rust

The code below draws the mandelbrot set for { z | z∈ ℂ, -2.2 ≤ Re(z) ≤ 0.6, -1.4 ≤ Im(z) ≤ 1.4} into a 300×300px png image. For each pixel, if the sequence {zi} is found to ...

15 30 50 per page
1
2 3 4 5
11