Skip to content

Instantly share code, notes, and snippets.

Hi, everyone! Super happy to reach out to you! As a Rustacean, I’ll be grateful for your advice. Due to the war in Ukraine, I’m working on becoming a junior Rust software engineer ASAP. As an anti-corruption activist, I have to relocate from Russia. Because of the war, I’ve lost my family & my livelihood.

But I’m not here to tell a sob story, I’m here to ask the practical questions. I could start my new career as a JavaScript front end guy, but JS doesn't suit my personality, while Rust does. With Rust, I’ll love my work, but with JS — less so.

Unless it’s impossible to go from 0 to a Rust junior job in 1-2 years or faster, I would do everything to choose Rust over JS.

Questions:

  1. Which Blockchain ecosystem should I choose? NEAR? Solana? Polkadot (Ink)? Cosmos? Holochain? Priority #1 is — in which ecosystem I’ll meet the kindest&smartest colleagues? Priority #2 is — which ecosystem has the best learning resources for beginners? (Though, if there’s no great learning resources, but there’s a feasible path
@TotalVerb
TotalVerb / go_defer.jl
Last active August 5, 2018 01:22
Go's defer with Julia macros
using MacroTools
symbolsof(ex::Symbol) = [ex]
symbolsof(ex::Expr) = ex.head == :line ? Symbol[] : vcat([symbolsof(x) for x in ex.args]...)
symbolsof(ex) = Symbol[]
reflect(ex) = Expr(:(=), ex, ex)
protected(ex) = Expr(:let, Expr(:function, :(), ex), map(reflect, symbolsof(ex))...)

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns                     on recent CPU
L2 cache reference ........................... 7 ns                     14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns                     20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs