Readit News logoReadit News
krukah commented on Understanding Rust Closures   antoine.vandecreme.net/bl... · Posted by u/avandecreme
andy_xor_andrew · 2 months ago
if I'm not mistaken (and I very well may be!) my primary confusion with closures comes from the fact that: the trait they implement (FnOnce / Fn / FnMut) depends entirely upon what happens inside the closure.

It will automatically implement the most general, relaxed version (FnMut I think?) and only restrict itself further to FnOnce and Fn based on what you do inside the closure.

So, it can be tricky to know what's going on, and making a code change can change the contract of the closure and therefore where and how it can be used.

(I invite rust experts to correct me if any of the above is mistaken - I always forget the order of precedence for FnOnce/Fn/FnMut and which implies which)

krukah · 2 months ago
Easiest mnemonic to remember precedence is simply ordering by the length of their names.

FnOnce

FnMut

Fn

krukah commented on Terrence Malick's Disciples   yalereview.org/article/bi... · Posted by u/prismatic
krukah · 3 months ago
Tree Of Life is nothing short of a masterpiece IMO. Influential on me personally as my first exposure to how much editing and structure (or lack thereof) build directorial style. It left an impression on me to feel so much for a film that explicitly says so little.

Obligatory mention of that iconic low-angle shot of The Mother floating gracefully across the plains. One of the best of all time.

Loading parent story...

Loading comment...

krukah commented on Ask HN: Who is hiring? (November 2025)    · Posted by u/whoishiring
krukah · 4 months ago
Novig | Multiple Roles | New York | Onsite | Full-time

Novig is rebuilding sports betting from first principles as a prediction market exchange. Legacy sportsbooks are extractive middlemen with misaligned incentives, dark patterns, and predatory mechanics. We're creating the alternative: a transparent exchange where users trade against each other at fair odds.

We're building core infrastructure around order routing, risk management, data pipelines, low-latency networking, and market integrity at scale. We write Rust extensively. We believe correctness, performance, and expressive code are necessities rather than luxuries. Ideal candidates care deeply about infrastructure, security, and performance. It certainly won't hurt to also care about prediction markets, traditional markets, or well-designed distributed systems.

Tech stack: Rust, Node, PostgreSQL, Kafka, Linux, distributed systems.

jobs@novig.co | https://job-boards.greenhouse.io/novig/jobs/4588745006

krukah commented on Uncertain<T>   nshipster.com/uncertainty... · Posted by u/samtheprogram
krukah · 6 months ago
Monads are really undefeated. This particular application feels to me akin to wavefunction evolution? Density matrices as probability monads over Hilbert space, with unitary evolution as bind, measurement/collapse as pure/return. I guess everything just seems to rhyme under a category theory lens.

Loading parent story...

Loading comment...

krukah commented on Peacock feathers can be lasers   science.org/content/artic... · Posted by u/ohjeez
krukah · 7 months ago
Yesterday was Pigeons As Hard Drives, today is Peacocks As Lasers.

I look forward to what tomorrow brings.

Loading parent story...

Loading comment...

krukah commented on Numbering should start at zero (1982)   cs.utexas.edu/~EWD/transc... · Posted by u/checkyoursudo
krukah · a year ago
Whenever I explain to someone when or why to use 0-indexing, I like to say:

Start from 0 if you are counting boundaries (fenceposts, memory addresses)

Start from 1 if you are counting spaces (pages in a book, ordinals)

Floors are a case where both make intuitive sense, which is maybe how we ended up with European vs American floor numbering.

u/krukah

KarmaCake day132March 21, 2022
About
co-founder & cto @ novig obsessively curious
View Original