Memory for Nothing: Why Vec<usize> is (probably) a bad idea
Every now and then one has to index something - and what's
better than a
Vec<usize>
?
Hi, I'm Patryk - a software developer who likes to throw algorithms at stuff and see what happens!
I work as a Senior Rust Developer at Fudo Security; in my spare time I'm implementing kartoffels, improving AVR support in Rust and committing to nixpkgs.
pwychowaniec [@at@] pm.me
(if you use GPG,
here's my signature)
Since a Nix derivation can be anything, from a text file up to a directory tree, then what's stopping us from implementing a static site generator using Nix? Certainly not the police!
Every now and then one has to index something - and what's
better than a
Vec<usize>
?
Memory allocators are great, I love allocating memory! But they can be a great source of pain as well - this is a story of how I lost one week catching a memory leak in a core Rust application at work.
My Learning to Fly series, a beginner-friendly Rust tutorial combining evolution, neural network and genetic algorithm, got an upgrade!
GPUs are known for their abilities of generating pretty images pretty fast - in this talk we'll see what makes GPUs different from CPUs and we'll see how you can code them in Rust.
Older version of my Trace Me a River
talk.
Even though Rust strives for simplicity, it's got a couple of surprising corners and edge cases.
In this talk I'm going to show you what makes
impl Drop
super-special, what's the difference
between using Self
and the type's name, what's the
deal with #[derive]
and trait bounds, and many
others things that I've stumbled upon.
Since I spent most of my days looking at a text editor, I've had the chance of going through lots of programs, plugins, IDEs and ideas - some better, some worse.
In this talk I'm going to show you what I've learned and how a typical day in my editor looks like. I'll also show you lots of tricks that make working with code, Git and filesystem easier, less error-prone and more comfortable.
Even though Rust strives for simplicity, it's got a couple of surprising corners and edge cases.
In this talk I'm going to show you the difference between
.filter_map()
and .flat_map()
, what's
the deal with const FOO: AtomicUsize
and many
others things that I've stumbled upon.
ChatGPT is all the hype now, but the math behind it is pretty complex - can we create something simpler, possibly under 200 lines of code?
Together with a friend we've created a game for GitHub's Game Off 2022 which utilizes software ray-tracing - in this talk we're going through our game's internals, describing its most curious & cursed internals.
Have you ever wanted to create your own programming language?
In this live-coding session I'll show you what is an abstract syntax tree and how, based on it, you can create a relatively fast, unsafe-free virtual machine that executes your own code.
AVRs are charming microcontrollers which can survive more than 300 days on a single AA battery, lying on anything - from cold ice to sizzling stones.
They can communicate with both high-level machines such as computers and low-level peripherals like humidity meters, which makes them neat, satisfying MCUs to play with -- and they can be programmed in Rust!
This is the last part of the Learning to Fly series in which we're coding a simulation of evolution using neural network and genetic algorithm.
This is the third part of the Learning to Fly series in which we're coding a simulation of evolution using neural network and genetic algorithm.
This is the second part of the Learning to Fly series in which we're coding a simulation of evolution using neural network and genetic algorithm.
In this series we'll create a simulation of evolution using neural network and genetic algorithm. I'm going to introduce you to how a basic neural network and genetic algorithm works, then we'll implement both in Rust and compile our application to WebAssembly.
Why does the code below compile?
Graphviz is a software that renders graphs, Factorio is a game in which you build and maintain factories; let’s explore how both can complement each other.