It makes it look like they’re just adding random noise to avoid colliding with existing syntax. Maybe they can try a UUID next time…
It makes it look like they’re just adding random noise to avoid colliding with existing syntax. Maybe they can try a UUID next time…
Yeah, I came to Rust from Scala and Kotlin, where equality is default-implemented (for case class
and data class
respectively, which is basically all we ever used), so this meme surprised me a bit.
I do actually like that you can decide a type cannot be compared, because sometimes it really just doesn’t make sense. How would you compare two HTTP clients, for example? But yeah, it certainly is a choice one can disagree with.
I find these videos give a very visual explanation and help to put you into the right mindset: http://intorust.com/
(You can skip the first two videos.)
Sort of when it clicked for me, was when I realized that your code needs to be a tree of function calls.
I mean, that’s what all code is anyways, with a main-function at the top calling other functions which call other functions. But OOP adds a layer to that, i.e. objects, and encourages to do all function calls between objects. You don’t want to do that in Rust. You kind of have to write simpler code for it to fall into place.
To make it a bit more concrete:
You will have functions which hold ownership over some data, typically because they instantiated a struct. These sit at the root of a sub-tree, where you pass access to this data down into further functions by borrowing it to them.
You don’t typically want to pass ownership all over the place, nor do you typically want to borrow (or pass references) to functions which are not part of this sub-tree.
Of course, there’s situations where this isn’t easily possible, e.g. when having two independent threads talking to each other, and then you do need Rc
or Arc
, but yeah, the vast majority of programming problems can be solved with trees of function calls.
The first iteration of the Rust compiler was written in OCaml…
It’s a survey for what the Mozilla Foundation should be focussing on. Firefox development happens at the Mozilla Corporation (which is a subsidiary of the Foundation, but operates pretty independently).
Hmm, I don’t know anything about Whoogle, but from other privacy-conscious search engines, I would expect it to work when you use that URL in your bookmark.
Three things I can imagine:
Well I,m, glad because, I, do, put a, lot of, them,.
One time, I had to hand in English homework, 1½ pages, and later got it back from the teacher with the feedback that I had only written two sentences. The first sentence spanned the whole first page, which wasn’t intentional.
You don’t want to use exceptions in normal control flow, because they’re extremely slow. Every time you throw
an exception, it has to collect a stacktrace, which is hundreds, if not thousands, of calculations, compared to a handful of calculations for returning a boolean or an enum variant.
I stopped using Reddit a few years before the whole stupidity, because the culture was fucking with my head.
Then I did the Mastodons for two years or so, with Lemmy eventually entering the mix. And then as Lemmy got more users and content, it took over as my preferred platform.
I guess, the joke is that clipped toenails sometimes catapult off so far that they might as well have launched out of orbit. You won’t find them again either way…
When I was around 3 years old, me and my not much older brother decided to walk across town, where our mum was visiting relatives.
I was missing mummy, which was technically not an emergency, for which we were supposed to phone those relatives.
We had been raised very well, you see. 🙃
I have been thinking, with how closely inspired lots of Pokémon are from real animals, that you could probably come up with a collectible card game or such, using real animals.
I mean, maybe I’m just being an old person and kids wouldn’t find that cool, but I certainly felt at some point, that I would’ve spent my time better, if I had learned about biology rather than made-up Pokémon stats…
Codeberg recently held a translation event where projects could sign up, if they wanted help. You can still look at their resources here, or I guess, you can just pick out a project and start translating over here: https://translate.codeberg.org/
Depending on your file manager, you may be able to hold Shift while triggering the delete to get a hard delete.
Shift+Del is pretty much standardized as the keyboard shortcut. And here on KDE, I can hold Shift while clicking the “Move to Trash” menu entry, too (well, it actually replaces the menu entry with one for permanent deletion, but that’s effectively the same).
It’s not getting updated anymore, unfortunately, but this is a cool webpage to get a feel for that: http://www.their.tube/
If you want it to just not recommend things, you might prefer switching to an RSS feed, or to something like NewPipe.
Problem is that none of the algorithms actually care about showing you things you like.
Ads try to sell you on things that you wouldn’t otherwise buy. Occasionally, they may just inform you about a good product that you simply didn’t know about, but there’s more money behind manipulating you into buying bad products, because it’s got a brand symbol.
And content recommendation algorithms don’t care about you either. They care about keeping you on the platform for longer, to look at more ads.
To some degree, that may mean showing you things you like. But it also means showing you things that aggravate you, that shock you. And the latter is considered more effective at keeping users engaged.
Where I live, you have to put a coin into the shopping carts and you only get it back when you return it. Is this not a thing in, uh, Portugal? Brazil? Wherever the comic author lives…?
I always hated the implementation for
.toString()
ofDuration
. It gives you a string like that:PT8H6M12.345S
(not a hash)Apparently, it’s an ISO 8601 thing, but what the hell am I supposed to do with that?
It’s not useful for outputting to end users (which is fair enough), but I don’t even want to write that into a log message.
I got so used to this just being garbage that I would automatically call
.toMillis()
and write “ms” after it.Well, and not to gush about Rust too much, but I recently learned that its debug string representation is actually really good. As in, it’s better than my Java workaround, because it’ll even do things like printing 1000ms as 1s.
And that’s just like, oh right, libraries can actually provide a better implementation than what I’ll slap down offhandedly.