Skip to content

Instantly share code, notes, and snippets.

View pro465's full-sized avatar
😃
enjoying getting Rusty

Proloy Mishra pro465

😃
enjoying getting Rusty
View GitHub Profile
@rexim
rexim / main.rs
Last active April 3, 2024 19:40
The Most Memory Safe Buffer Overflow in Rust!
// The Most Memory Safe Buffer Overflow in Rust!
//
// Consider all the code below under Public Domain
//
// How to build:
// $ rustc main.rs
//
// Wrong password:
// $ printf "hello\n" | ./main
//
@Sinthorion
Sinthorion / adv.txt
Created October 16, 2018 13:33
Minimal complete solution to the game Lost Kingdom (Brainfuck version, long room descriptions)
y
n
t1
s
e
s
s
t3
n
s

Rust Optimization Tips (or, Why Rust Is Faster Than Python)

If you're looking to write fast code in Rust, good news! Rust makes it really easy to write really fast code. The focus on zero-cost abstractions, the lack of implicit boxing and the lifetime system that means memory is managed statically means that even naïve code is often faster than the equivalent in most other languages out there, and certainly faster than naïve code in any equivalently-safe language. Maybe, though, like most programmers you've spent your whole programming career safely insulated from having to think about any of this, and now you want to dig a little deeper and find out the real reason that