It's funny that the assembly of the web is not really wasm, it's vanilla javascript.
Like, both vanilla javascript and assembly are generally a compile target and most people don't write it by hand and it's hard to write by hand especially for big programs.
And svelte is I guess like C?
07.08.2025 08:57
π 4
π 0
π¬ 0
π 1
Disclaimer: I have no idea what I'm talking about, none of this is fact checked.
Trenitalia bingo, on my new blog (hand crafted with Rust, of course)
www.odilf.com/blog/trenita...
07.08.2025 08:14
π 3
π 0
π¬ 0
π 0
I was thinking Java for gluttony and Python for sloth. Also maybe PHP for greed (bc of $vars) and Js could be envy since it has basically nothing to do with java and they chose it to sound cool
this is a very fun idea π€
06.08.2025 11:43
π 6
π 0
π¬ 1
π 0
Asahi Linux
Porting Linux to Apple Silicon
Asahi linux is a thing! asahilinux.org
Works very very well, the only reason I don't daily drive it is because suspend power is not as good as macOS yet
15.07.2025 19:57
π 6
π 0
π¬ 0
π 0
It looks like sending it to the micro task queue (or whatever setTimeout sends it too, I don't exactly remember) solves it, so I guess there's some problem in doing the update on the main loop? Some sort of race condition? That's what jumps to mind at least, but who knows π€·ββοΈ
15.07.2025 07:24
π 0
π 0
π¬ 1
π 0
Vouch for typst and fletchter! I've used it and the results are nice and the code can be pretty consise
07.07.2025 13:40
π 1
π 0
π¬ 0
π 0
I have never done this and I have no idea what I'm talking about, but can't you just allocate, put the bytes you want in your allocation and transmute? I feel you could even make a constructor function that has a safe API and everything
21.06.2025 11:05
π 0
π 0
π¬ 2
π 0
I feel that if you're not confident enough to use unsafe (which you probably shouldn't be indeed!) then having an error message just in case is worth it. It's just a few bytes after all π€·
15.06.2025 18:38
π 0
π 0
π¬ 0
π 0
Oh wow I was totally thinking of `let else` π
(but in my defense, let else is a more direct substitute to unwrap that if else)
15.06.2025 18:32
π 1
π 0
π¬ 0
π 0
By "cascading messages" you mean propagation Option up the call stack?
I would say that having a possibility of your program crashing when calling a function is a worse violation of LoD, no? Saying "this function might not have something to return" doesn't break isolation, I think
15.06.2025 14:50
π 0
π 0
π¬ 0
π 0
I guess one might use unwrap for cases where it's very obvious why a panic won't occur but eh I'd rather write a reason quickly with expect. If I was really confident and didn't care about me being mistaken, maybe I'd even write an unwrap_unchecked.
imo unwrap is exclusively valid for prototyping π€·
15.06.2025 13:41
π 1
π 0
π¬ 1
π 0
Hmm, idk, I like expect to describe the reason I expect something not to be None because if that case is hit you get an informative error message of what invariabt has been broken. If you used unwrap for when you "know" it won't panic you don't have a place to record this information.
15.06.2025 13:41
π 1
π 0
π¬ 1
π 0
I've found that oftentimes when there is friction and resistance in Rust it's because something could have been arquitected better. I've also had to learn to ignore that sometimes.
In this case, I think it's best to just let the formatter do its thing π€·. Fighting it is a bit Sisyphean imo
15.06.2025 13:33
π 0
π 0
π¬ 1
π 0
...and for the second example, if you want to keep those three field acesses in one line maybe you can declare a variable. Or in your case maybe it can be a method! I think it can make sense.
15.06.2025 13:33
π 0
π 0
π¬ 1
π 0
But also weird rust formatting might be a bit of a code smell. Most likely it doesn't matter, but in your first example, the clone might be unnecessary and the unwrap should probably be removed and should return an Option instead...
15.06.2025 13:33
π 1
π 0
π¬ 2
π 0
The problem with that it's that the things in one line might look like they're grouped together when semantically they might not need to be. With the current design, either everything is one line, or every dot is in a different line. It is easy to predict and kinda helps collaboration
15.06.2025 13:33
π 1
π 0
π¬ 1
π 0
But, of course, if it's a program you run once for yourself, its totally fine to use unwrap π€·
buuut actually returning something like anyhow::Result might make the code cleaner!you only need to do ? instead of .unwrap(), and you get all the benefits above ^^
15.06.2025 13:04
π 0
π 0
π¬ 1
π 0
For instance, returning an error that bubbles up, says what went wrong exactly with a nice message (e.g.., "you've entered silly input") and is recoverable in case the program becomes bigger and you don't want the user to restart the program to try to write input again.
15.06.2025 13:04
π 0
π 0
π¬ 1
π 0
For those cases you have `expect`, where you give the reason why you expect not a None. And you could also do a match and an unreachable (or unreachable_unchecked!). Or even better, encode it in the typesystem.
unwrap is generally used for the "I can't be bothered to handle this rn" case
15.06.2025 12:57
π 1
π 0
π¬ 2
π 0
`if let` is relatively new tho. But yeah generally way better than unwrap!
15.06.2025 12:52
π 0
π 0
π¬ 1
π 0
Preferring to be short is like preferring winter. It is better in many ways, and you can use technology to go counteract the effects (e.g., high shoes/coats)... and yet most people prefer the opposite. hmm
10.06.2025 12:47
π 1
π 0
π¬ 0
π 0
Lib.rs β home for Rust crates
List of Rust libraries and applications. An unofficial experimental opinionated alternative to crates.io
In case you hadnt heard of it, lib.rs is a very nice alternative to crates.io that generally does a nicer job at finding and evaluating a crates and alternatives ^^
18.05.2025 18:48
π 4
π 1
π¬ 1
π 0
i like naersk π€
but also buildRustPackage is very much usable
crane is just⦠too much for me
16.05.2025 21:05
π 1
π 0
π¬ 1
π 0
But the real problem is when you try to package stuff. I spent way too long trying to get a relatively simple pnpm app working and, really, the best option to this day in my opinion is to search all github for similar stuff which isn't intuitive and just isn't a nice experience... (still <3 nix tho)
14.05.2025 16:07
π 2
π 0
π¬ 0
π 0
Well, a few times there are options but it's unclear what the options do unless you go look at the source (which is often pretty approachable!). Getting an entrypoint is surprisingly tricky, I had a friend switch to nixos and he knew what he wanted to write, he just didn't know _where_ to put it.
14.05.2025 16:07
π 3
π 0
π¬ 1
π 0
Next level #birdwatching
15.04.2025 17:23
π 624
π 155
π¬ 11
π 32
omg that's amazing
16.04.2025 14:36
π 0
π 0
π¬ 0
π 0
cargo-nextest
A next-generation test runner for Rust.
i think they're using nextest
nexte.st
github.com/nextest-rs/n...
16.04.2025 09:18
π 3
π 0
π¬ 1
π 0
a woman giving a thumbs up and wearing a hand knit Olga sweater by petite knit.
thanks I made it myself!
14.04.2025 12:50
π 474
π 4
π¬ 19
π 0