nick

joined 1 year ago
MODERATOR OF
[–] [email protected] 2 points 5 months ago* (last edited 5 months ago)

I'm running on 0.19.3 without any issues on Linux arm64. I built my own docker image though.

[–] [email protected] 6 points 5 months ago

The web is built on hot linking hypermedia. It is more fragile obviously, but it distributes the bandwidth and storage load. If nobody hotlinked, then small forum admins/Lemmy admins/etc. have considerably more cost to bear.

[–] [email protected] 1 points 5 months ago* (last edited 5 months ago)

Rust is roughly similar to C in most of these benchmarks and beats it in a few: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust.html

Arguably when LLVM gets a bit better, Rust can be even faster than C because rust can be optimised in more places safely than C code can. The issue is that LLVM wasn't written with that in mind, so some performance is left on the table.

[–] [email protected] 1 points 5 months ago (2 children)

Go, Java, and Nim (in most cases) are all memory safe but are generally slower than C or C++ due to the ways they achieve memory safety.

Rust's memory safety approach is zero-cost performance wise, which makes it practical for low level, high throughput, and low latency applications.

[–] [email protected] 6 points 6 months ago* (last edited 6 months ago) (1 children)

That flag exists, it's called unsafe for if you need to tell the borrow checker to trust you or unwrap if you don't want to deal with handling errors on most ADTs.

You can always cast anything to an unmanaged pointer type and use it in unsafe code.

[–] [email protected] 13 points 6 months ago (5 children)

A crash is different to a SEGFAULT. I'd be very surprised to see a safe rust program segfault unless it was actively exploiting a compiler bug.

[–] [email protected] 5 points 6 months ago

As a compiler developer this speaks to me on a deep level lol

[–] [email protected] 4 points 9 months ago

Wellington needs more karaoke spots

[–] [email protected] 8 points 9 months ago* (last edited 9 months ago)

You need everyone else in the EU to agree to remove them. Poland and Hungary sort of protect each other from EU consequences.

[–] [email protected] 2 points 9 months ago
((a, b) => a ?? b)();
[–] [email protected] 5 points 9 months ago (3 children)
const fn = (a, b) => a ?? b
[–] [email protected] 2 points 9 months ago

They're both free software licences (i.e. you can get the source code for for BSD licenced software and GPL licenced software that you're using at no extra charge and modify it as you please). The GPL licence has an additional restriction for developers that says if you use any GPL code in your codebase, your entire codebase must also be GPL or some other compatible open source licence.

This means that if I made some code parses a file format and another developer includes that code in their program to support that file format, they're now forced to licence their whole codebase with a similar licence to the GPL. If it was BSD then they would only have to mention that they used my BSD licenced code and include a copy of that licence. A user would then be able to go and see my original code that was used, but not the rest of that application's code or any modifications that the application author made to my code. Because the GPL is too restrictive for most developers here, there's a version of the GPL called the LGPL which is often used for code meant to be used by other programs which is closer to the BSD licence but additionally requires that if they modify your code, they must also share that modified code.

I usually use a licence in the middle called the MPL (Mozilla Public Licence), which is similar to the LGPL but has a few things I prefer and has the advantage for me of not being connected to the FSF and GNU project.

181
rule is so me frfr (campfyre.nickwebster.dev)
 
 
 

I was getting close to hitting the end of my free object storage so there was time pressure involved haha.

Seems to work but I haven't tested it too much. Currently running on my instance.

 

I swear that SEO has gotten so good that Google has just been broken

 
17
Coco (campfyre.nickwebster.dev)
 
 

Stargazing in anticipation of Matariki

 

Really well made video from a pretty small channel

 

cross-posted from: https://campfyre.nickwebster.dev/post/2876

My favourite part of Wellington

 

My favourite part of Wellington

view more: ‹ prev next ›