ayebear

Joined 554d ago

https://toroban.com

Enums with data as HashMap keys

Published 193d ago

Arbitrary types can be used as HashMap keys, as long as they implement the appropriate traits which can usually be auto-derived.

0

FASTEST FIB, O(0) time

Published 328d ago

Covers all u64 sized fib numbers

0

Mandelbrot ASCII

Published 330d ago

Mandelbrot ASCII, made by chatgpt 3.5

1

Daily Rust newline fix

Published 330d ago

A macro wrapper around println that has working newlines. Please fix this issue properly @dailyrust-devs

0

Fib big numbers!

Published 330d ago

Using the num_bigint crate we can generate much larger numbers with full accuracy.

0

Fib iterator

Published 330d ago

A Fibonacci sequence iterator that can efficiently generate each number in a single operation each next() call.

1

Set unsync

Published 330d ago

Using the dark arts of unsafe rust, we can cast immutable references to mutable pointers, and bypass the need for any slow "safe" Sync objects such as mutexes.

0

Fibonacci f64 - O(1) solution

Published 339d ago

This calculates any arbitrary Fibonacci sequence number in O(1) time, without loops or recursion. Uses the absolute formula to give a best estimate result. Needs an infinite precision math library to give more accurate results.

3

Metric Clock

Published 400d ago

Prints the current time in a metric time format (100,000 seconds per day)

3

Safe multi-threaded mutating buffer without locks

Published 409d ago

This is from @ilyvion on the Rust programming language discord!

3

Unsafe multi-threaded buffer output

Published 410d ago

See C++ version: https://gist.github.com/ayebear/7ee6c64c387413a90532da8f838f32d6 Both rust and c++ versions seem to work.

1

Tokio task::spawn example

Published 411d ago

100% CPU utilization with default tokio runtime settings, just async code

1

Rust match + enum vs C++ dynamic dispatch

Published 444d ago

Idiomatic Rust version of https://en.wikipedia.org/wiki/Dynamic_dispatch#Example_in_C++

3