Got nerd sniped by an interview question and did a wildly unsafe but memory efficient solution: play.rust-lang.org?version=stab...
Can anyone spot something I missed making `remove_popped` unsound?
#rust
Got nerd sniped by an interview question and did a wildly unsafe but memory efficient solution: play.rust-lang.org?version=stab...
Can anyone spot something I missed making `remove_popped` unsound?
#rust
Yes - Iโll now go check
See you there!
Screenshot of a Rust code snippet: fn main() { for n in 1..=15 { let mut out = 0; Fib(&mut out, n); println!("Fibonacci for n={n}: {out}"); } }
committing #rustlang drop crimes
yes, `Fib` is a struct here, not a function call
Playground: play.rust-lang.org?version=stab...
I am confused ๐ talking about functional programming here?
I am looking forward to the recording of this ๐ - 1am CET is sadly not going to work for catching it live ๐
Iโm not sure itโs supposed to do that ๐๐
No, but really, Iโm impressed, confused and curious about how different terminal emulators are going to handle it ๐ค
Moved to Czechia recently, guess I should try it ๐
Uff ๐ฎโ๐จ faraway wishes for better days ahead ๐
I have never heard this before, but good analogy and good reading. Thanks ๐
Amazon doesnโt really operate where I am, but am trying to avoid buying morally questionable stuff e.g. IKEA furniture and fast fashion
That should ideally get _better_ with more MIR optimizations and cranelift backend, but yeah..
Thanks for pointing me in the direction, itโs a nice Thursday night activity scrolling through their posts ๐
๐
Poor turtles, they just want the โจspicy waterโจ ๐
๐ฎ you beat the gambling addiction
What might I be looking at?
I couldnโt agree more - I find Gos ethos quite perplexing, but this somehow matches my intuition about it ๐
I would love to pay a few dollars for reading this, but Iโm not gonna start a subscription Iโll have to cancel ๐ฎโ๐จ
Thank you, I hate it ๐
Is it a MacOS or Zed thing that Zed just correctly picked up on me using โmvโ to rename the project folder behind its back?
(Yes, this is a bad regex joke)
Not ok: #10 #100 #1000 โฆ
Ok: #1 #abawaba #a10 #10a
Oh boy I appreciate quick editor startup - thanks @zed.dev
Yes, thanks, have played with Haskell before, but probably not enough. The rest I donโt think Iโve written at all - this is perfect ๐
And cargo only strips release binaries - โcargo build โreleaseโ and thereโll be a binary in the target/release directory
Oh, itโs cargo which does binary stripping automatically - if you run strip on the binary it goes from 3.7MiB to .35MiB. If you want it smaller (enough for small micro controllers) youโll have to drop the standard library - but thatโs suddenly a lot more painful
While it is, it is tiny, the problem used to be the standard library being statically linked, but I remember they began stripping the binary automatically, so Iโm unsure why you are still seeing big binaries - Iโll be back once Iโve reproduced ๐
Which makes you a great Rustacean to follow ๐
I will definitely look into that, thanks โค๏ธ