ansuz / RIIR

why not Rewrite It In Rust
https://transitiontech.ca/random/RIIR
641 stars 6 forks source link

rewrite my relationship with my girlfriend in rust #52

Closed pepsipu closed 4 years ago

pepsipu commented 4 years ago

right now it's buggy, unreliable, and crashes often

if rust can't fix this nothing can

SOF3 commented 4 years ago

Alice: My love for you lives for eternity. Bob: error: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements: Bob: first, the lifetime of love cannot outlive 'a (the lifespan of Alice) Bob: but, the lifetime must be valid for 'eternity

A relationship like this is reliable, not buggy and does not crash often indeed.

pepsipu commented 4 years ago

thanks @SOF3! I'll implement this right away

porky11 commented 4 years ago

Rust doesn't have the 'eternity lifetime yet, but 'static should do about the same, as long as you never stop running the program

pepsipu commented 4 years ago

@porky11 is there a way to end the lifetime of a variable prematurely? i did end up rewriting my relationship in rust but i'm not sure if i want to keep it in scope...

progval commented 4 years ago

https://doc.rust-lang.org/std/mem/fn.drop.html

ansuz commented 4 years ago

I regret creating this repository.