Advertisement · 728 × 90

Posts by Erik Funder

Rust Playground A browser interface to the Rust compiler to experiment with the language

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

1 month ago 0 0 0 0

Yes - I’ll now go check

11 months ago 1 0 0 0

See you there!

11 months ago 0 0 0 0
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}");
    }
}

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...

1 year ago 37 4 6 3

I am confused 😅 talking about functional programming here?

1 year ago 1 0 1 0

I am looking forward to the recording of this 😊 - 1am CET is sadly not going to work for catching it live 😌

1 year ago 3 0 1 0

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 🤔

1 year ago 1 0 0 0

Moved to Czechia recently, guess I should try it 😁

1 year ago 1 0 0 0

Uff 😮‍💨 faraway wishes for better days ahead 😔

1 year ago 0 0 0 0

I have never heard this before, but good analogy and good reading. Thanks 😊

1 year ago 0 0 0 0
Advertisement

Amazon doesn’t really operate where I am, but am trying to avoid buying morally questionable stuff e.g. IKEA furniture and fast fashion

1 year ago 1 0 0 0

That should ideally get _better_ with more MIR optimizations and cranelift backend, but yeah..

1 year ago 0 0 0 0

Thanks for pointing me in the direction, it’s a nice Thursday night activity scrolling through their posts 😊

1 year ago 1 0 0 0

😂

1 year ago 5 1 0 0

Poor turtles, they just want the ✨spicy water✨ 😂

1 year ago 0 0 0 0

😮 you beat the gambling addiction

1 year ago 1 0 0 0

What might I be looking at?

1 year ago 0 0 1 0

I couldn’t agree more - I find Gos ethos quite perplexing, but this somehow matches my intuition about it 😅

1 year ago 2 0 0 0
Advertisement

I would love to pay a few dollars for reading this, but I’m not gonna start a subscription I’ll have to cancel 😮‍💨

1 year ago 1 0 1 0

Thank you, I hate it 😅

1 year ago 0 0 0 0

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?

1 year ago 0 0 0 0

(Yes, this is a bad regex joke)

1 year ago 1 0 0 0

Not ok: #10 #100 #1000 …
Ok: #1 #abawaba #a10 #10a

1 year ago 1 0 1 0

Oh boy I appreciate quick editor startup - thanks @zed.dev

1 year ago 2 0 0 0

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 😊

1 year ago 2 0 0 0

And cargo only strips release binaries - ‘cargo build —release’ and there’ll be a binary in the target/release directory

1 year ago 2 0 0 0

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

1 year ago 2 0 2 0

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 😁

1 year ago 2 0 1 0
Advertisement

Which makes you a great Rustacean to follow 😌

1 year ago 3 0 0 0

I will definitely look into that, thanks ❤️

1 year ago 1 0 1 0