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

2 months ago 0 0 0 0

Yes - Iโ€™ll now go check

11 months ago 1 0 0 0

See you there!

1 year 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
Advertisement

I have never heard this before, but good analogy and good reading. Thanks ๐Ÿ˜Š

1 year ago 0 0 0 0

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
Advertisement

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

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