[-] arendjr@programming.dev 8 points 2 months ago

I used Elixir for a project in 2024, though I was not the lead on the backend part, so my exposure was limited. Still got a nice taste of it, and have to say I was positively impressed.

The Erlang VM is kind of amazing in the capabilities that it offers, and integrating with external languages was also easier than I thought it would be (we had a Rust core that we needed to link in).

As for Elixir specifically: the language is nice, but its Achilles heel is definitely that it’s dynamically typed. For this reason I would suggest having a look at GLEAM, even though I have no personal experience with that and don’t know how mature it is.

[-] arendjr@programming.dev 8 points 3 months ago

Heh, the name wasn’t chosen to reach a huge audience anyway. If I get too many users, I might lose my zen over trying to support them 😂

But I’m happy to have a few folks along who don’t mind building their IDE from source.

[-] arendjr@programming.dev 8 points 8 months ago

I have it on reliable authority that women like boobs too. Source: am married

[-] arendjr@programming.dev 8 points 8 months ago

Can’t we just teach them to be nice boys? Sometimes easier said than done, I know.

[-] arendjr@programming.dev 8 points 10 months ago* (last edited 10 months ago)

It’s possible yes, but the nice thing is that we know we are not merely talking about “advanced people with vastly superior technology” here. The proof implies that technology within our own universe would never be able to simulate our own universe, no matter how advanced or superior.

So if our universe is a “simulation” at least it wouldn’t be an algorithmic one that fits our understanding. Indeed we still cannot rule out that our universe exists within another, but such a universe would need a higher order reality with truths that are fundamentally beyond our understanding. Sure, you could call it a “simulation” still, but if it doesn’t fit our understanding of a simulation it might as well be called “God” or “spirituality”, because the truth is, we wouldn’t understand a thing of it, and we might as well acknowledge that.

[-] arendjr@programming.dev 9 points 10 months ago

I’m agreeing with you, but I don’t think the phrases have to be condescending, smug or detached?

They surely point to a disagreement, but can’t they be used from such a position in a genuine capacity without implying the person is being condescending or smug about it?

Of course it’s easy to see how when those things are said to you, they may be perceived as smug or condescending, because the other person doesn’t want to agree with you. But that doesn’t necessarily make them so.

Not a native English speaker though, so genuinely curious about the nuances here.

[-] arendjr@programming.dev 8 points 1 year ago

I dunno, I have a Framework laptop and had a keyboard issue with it. It still worked, but one of the keys didn’t register well. So they sent me a new keyboard and I sent them back the old one after I’d swapped it. Not a single day was I without my laptop, which sounds quite unlikely compared to other laptop brands and the support you get (or not) with those. No buyer’s remorse here.

[-] arendjr@programming.dev 8 points 2 years ago

Would you have a link to that? I know there are many third-party garbage collectors for Rust, but if there’s something semi-official being proposed or prototyped I’d be most curious :)

[-] arendjr@programming.dev 8 points 2 years ago

Does the Rust compiler use their std sort algorithms, or does it already use specialized ones? If the former, it would be a great side-effect if the compiler itself receives additional speed ups because of this.

[-] arendjr@programming.dev 9 points 2 years ago

Couple of weeks ago there was a post here calling for more content to be posted in this sub, so I figured you might appreciate the content. As a project, Biome is also helping a lot of web developers become interested in Rust, since many of our contributors make their first-time Rust contributions there.

32

I just had a random thought: a common pattern in Rust is to things such as:

let vec_a: Vec<String> = /* ... */;
let vec_b: Vec<String> = vec_a.into_iter().filter(some_filter).collect();

Usually, we need to be aware of the fact that Iterator::collect() allocates for the container we are collecting into. But in the snippet above, we've consumed a container of the same type. And since Rust has full ownership of the vector, in theory the memory allocated by vec_a could be reused to store the collected results of vec_b, meaning everything could be done in-place and no additional allocation is necessary.

It's a highly specific optimization though, so I wonder if such a thing has been implemented in the Rust compiler. Anybody who has an idea about this?

10

Just a progress update on a fun open-source project I'm involved with. Biome.js is a web toolchain written in Rust, and it provides a great excuse to play around with parsing technologies and other fun challenges :)

243
submitted 2 years ago* (last edited 2 years ago) by arendjr@programming.dev to c/rust@programming.dev

Slide with text: “Rust teams at Google are as productive as ones using Go, and more than twice as productive as teams using C++.”

In small print it says the data is collected over 2022 and 2023.

144
[-] arendjr@programming.dev 8 points 2 years ago

Ahh, that's good to know! Thanks, together with @taladar@sh.itjust.works fix that resolves it :+1:

11

I have a fun one, where the compiler says I have an unused lifetime parameter, except it's clearly used. It feels almost like a compiler error, though I'm probably overlooking something? Who can see the mistake?

main.rs

trait Context<'a> {
    fn name(&'a self) -> &'a str;
}

type Func<'a, C: Context<'a>> = dyn Fn(C);

pub struct BuiltInFunction<'a, C: Context<'a>> {
    pub(crate) func: Box<Func<'a, C>>,
}
error[E0392]: parameter `'a` is never used
 --> src/main.rs:7:28
  |
7 | pub struct BuiltInFunction<'a, C: Context<'a>> {
  |                            ^^ unused parameter
  |
  = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`

For more information about this error, try `rustc --explain E0392`.
error: could not compile `lifetime-test` (bin "lifetime-test") due to 1 previous error
[-] arendjr@programming.dev 9 points 2 years ago

Great stuff! Good to see that a few of those changes wouldn’t apply to just the Rust compiler, but other Rust programs as well.

21

As part of my Sudoku Pi project, I’ve been experimenting with improving the Bevy UI experience. I’ve collected most of my thoughts on this topic in this post.

6

I wrote a post about how our Operational Transfomation (OT) algorithm works at Fiberplane. OT is an algorithm that enables real-time collaboration, and I also built and designed our implementation. So if you have any questions, I'd be happy to answer them!

view more: ‹ prev next ›

arendjr

0 post score
0 comment score
joined 2 years ago