At first, I thought this was a screenshot from Lemmy and thought what the hell. Then I saw that it’s Reddit and all my questions got answered. ¯\_(ツ)_/¯
At first, I thought this was a screenshot from Lemmy and thought what the hell. Then I saw that it’s Reddit and all my questions got answered. ¯\_(ツ)_/¯
That Lemmy guide uses mdBook: https://rust-lang.github.io/mdBook/
It originates from the Rust ecosystem, but it’s basically language agnostic.
You basically provide it Markdown files in a certain file structure and then it does the rest. Really easy to use.
Maybe because political left vs. right?
I don’t know a thing about cats, but I would’ve expected there to be more diseases in the city, with all the humans, car exhaust, trash etc…
At first I thought, they’re releasing this news now to drown out the Concord news, but 30 year anniversary, maybe they did have this planned a little longer. 🙃
Well, apparently that’s only 5.8% of trips:
About 47% of the trips replaced a public transit, carpool, walking or cycling trip. An additional 5.8% of trips represented “induced travel,” meaning the person would not have made the trip were an Uber or Lyft unavailable.
I guess, maybe the remaining 47.2% are taxi rides which got replaced by Uber/Lyft?
I tried something like that once. Basically, I was trying to create an API with which sysadmins could script deployments. That involves lots of strings, so I was hoping I could avoid the String
vs. &str
split by making everything &'static str
.
And yeah, the problem is that this only really works within one function. If you need to pass a parameter into a function, that function either accepts a &'static
reference which makes it impossible to call this function with an owned type or non-static reference, or you make it accept any reference, but then everything below that function has normal borrowing semantics again.
I guess, with the former you could Box::leak()
to pass an owned type or non-static reference, with the downside of all your APIs being weird.
Or maybe your prototyping just happens at the top and you’re fine with making individual functions accept non-static references. I guess, you’ll still have to try it.
Since you’re already at the bargaining stage of grief programming, maybe you’re aware, but Rc
and Arc
are the closest you can get to a GC-like feel. These do reference counting, so unlike GC, they can’t easily deal with cyclic references, but aside from that, same thing.
Unfortunately, they do still have the same problem with passing them as parameters…
Blocking a community is possible from the context menu in the community overview page (tap on the community name):
Blocking an instance (which is a whole server with multiple communities) is possible via the web interface, but I don’t think, it’s possible in Jerboa yet.
Yeah, I don’t think that can happen without splitting the whole ecosystem in half. Garbage collection requires a runtime, and tons of the code semantics are also just different between the two, particularly with asynchronous code.
I also imagine that many people wouldn’t just leave their particular program in the GC version, but never even bother to learn the ownership/borrowing semantics, even though those largely stop being painful after a few months.
But yeah, I actually don’t think it’s too bad to have individual parts of the ecosystem using their own memory management strategies.
The two examples that I can think of are ECS for gamedev and signals/reactivity for UI frameworks. Which is what is used in C++ or JavaScript, Kotlin, too. You’d probably still want to use these strategies, even if you’ve got garbage collection available…
How many bugs you encounter is unfortunately not a good metric, because devs will compensate by just thinking harder. The goal is rather to not need to think as hard, which increases productivity and helps out your team members (including your future self).
It took me a few months of working in an immutable-by-default language before I had the epiphany that everything is exactly like it’s written down in code (so long as it’s not marked as mutable). I don’t need to look at each variable and think about whether it might get changed somewhere down the line. A whole section of my brain just switched off that day.
As the other person said, there’s also nothing stopping you from using mutability, it’s just not the default, because most variables simply don’t get mutated, even in C code.
But I would even go so far that Rust is actually making mutability fashionable again. It has introduced various new concepts in this regard, which you won’t know from other languages.
For example, you can opt a variable into mutability, make your changes and then opt out of it again.
And if a function wants to modify one of its parameters, you have to explicitly pass a mutable reference, which is visible both in the function signature and where you’re calling the function.
But perhaps most importantly, it blocks you from mutating variables that you’ve passed into a different thread (unless you wrap the value in a mutex or similar).
In most of the immutable languages up until this point, the immutability was achieved by always copying memory when you want to change it, which is insanely inefficient. Rust doesn’t need this, by instead requiring that you follow its ownership/borrowing rules.
Edit:
I also don’t know what you heard, but this is for example written in Rust: https://bevyengine.org/examples/3d-rendering/bloom-3d/
The code is right below. It uses lots of mutability…
It’s the “Entity-Component-System architecture”, consisting out of:
It’s kind of a competing strategy to OOP. It offers better performance and better flexibility, at the cost of being somewhat more abstract and maybe not quite as intuitive. But yeah, those former two advantages make it very popular for simulations / gamedev. Any major game engine has an ECS architecture under the hood, or at least something similar to it.
Right. 😅
Apparently, we’re on different pages in this regard, but to me these are less functional language features and more just modern language features.
In my not-so-humble opinion, it was never a good idea to make everything mutable by default. It adds so much mental overhead to try to keep track of where your state could be getting modified, especially in multi-threaded scenarios.
We just didn’t have the type system expertise and compiler technology to enforce it without runtime overhead. Now that we have that, I don’t think any full-fledged programming language should be released with everything mutable by default.
The cool kids in systems programming are using Rust now. I have no idea if game devs are using it.
It’s not fully there yet for production use, but there is certainly interest:
One thing to note about Rust for gamedev is that it enforces correctness to a degree which makes it cumbersome for prototyping.
Using it with an ECS already alleviates a lot of that pain (by sidestepping Rust’s memory management). And I do imagine, much like in C++, that more and more abstractions will be built on top of it to eventually make it very nice to use.
But yeah, Rust isn’t as clear-cut of an upgrade yet, as it is in some other fields.
Yeah, it’s got some features typically found in functional languages, like first-class functions (being able to pass around functions like values) and various list functions, e.g. .map()
, .filter()
etc., but the basic control flow is very much imperative.
The picture seems to be from Australia, I’m from Germany, so uh, no idea about the USA. 🙃
And yes, that can be a normal situation, but if we recognize that it’s a joke, we can still see the resemblance and find that humorous.
What’s the other half? People using a ride-sharing service, even though they could take their own car, just for a laugh? People foregoing use of their private jet?
It’s mainly funny, because all the women look bored out of their mind. It makes it look like they’re letting Greg blather on, even though none of his points are novel to them. And Greg has such a massive ego that he doesn’t notice no one is listening to him.
Obviously, yes, Greg probably is just a person without ego talking normally. But him being the only dude in the picture and the only one talking, the mansplaining interpretation is a little too close for comfort, which makes it funny.
I’m too dumb to understand the paper, but it doesn’t feel unlikely that this is a misinterpretation.
What I’ve figured out:
What I can’t quite figure out:
The actual quote from the paper is:
Of the 6.38B sentences in our 2.19B translation tuples, 3.63B (57.1%) are in multi-way parallel (3+ languages) tuples
And “multi-way parallel” means translated into multiple languages:
The more languages a sentence has been translated into (“Multi-way Parallelism”)
But yeah, no idea, what their “translation tuples” actually contain. They seem to do some deduplication of sentences, too. In general, it very much feels like just quoting those 57.1% without any of the context, is just a massive oversimplification.
It’s a slang word to mean the outfit or accessories. I believe, it started out regionally, but it’s been popular with the current teenager generation.
Hmm, I think, you can download one of the .tar.gz files from here: https://github.com/rust-lang/mdBook/releases
Unpack it and then just run the executable that’s inside.
And yes, images are absolutely possible.
You can just place the image file in the file structure and then in your Markdown file, you can use this syntax:
![Optional description for sight-impaired users](relative/path/to/image.png)
I usually create an “images” sub-folder next to the Markdown file, then it’s just:
![](images/something.png)