Python too.
Website | Codeberg | GitHub | Altes Profil | Noch älteres Profil
Verantwortlich für @kaenguru@feddit.org & @titelregel@feddit.org.
- 0 Posts
- 19 Comments
this
is commonly used with a similar meaning toself
in cases whereself
can’t be used because it is a reserved keyword.Example:
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<St1::Item>> { let this = self.project(); this.inner.poll_next(cx) }
https://github.com/rust-lang/futures-rs/blob/master/futures-util/src/stream/select.rs#L113-L116
I do run into them even though I use Rust for ~3 years now, but only in non-obvious cases, e. g. when all references to the borrowed data are dropped before the end of the function.
Rust would be some borrow checker compile error like
borrowed data escapes outside of associated function
argument requires that `'1` must outlive `'static`
d_k_bo@feddit.orgto [Closed] Moved to !fedigrow@lemmy.zip@lemm.ee•bad stonks :(English12·4 months agosoon™
d_k_bo@feddit.orgto Programmer Humor@programming.dev•Python needs an actual default function7·4 months agoFree standing functions in Java?! This can’t be true.
d_k_bo@feddit.orgto Programmer Humor@programming.dev•Python needs an actual default function385·4 months agoStill better than having to create a new class just to implement
public static void main(String[] args) {}
Relevant Fireship video: https://youtu.be/m4-HM_sCvtQ
d_k_bo@feddit.orgto Programmer Humor@programming.dev•Why do AI company logos look like buttholes?4·6 months agoThe toilet then sends the data it collects to a cloud server.
What could go wrong.
As others mentioned, running a minecraft server by itself is pretty easy. If you want additional features like a Web UI, multiple servers at the same time etc. you might take a look at Crafty Controller.
Just one more line bro. One more line will fix it.
I just think they don’t understand how copyright and licenses work. If you create a work, you own the copyright. If you license it to someone (even when using a restrictive CC license) you are granting them rights that they hadn’t before. It doesn’t get more restrictive than just not licensing your comment.
d_k_bo@feddit.orgto Programmer Humor@programming.dev•I want a programming language that supports German style composite words7·8 months agoThere are some local differences in math notation, e.g.
.
vs.,
as a decimal separator,•
vs.×
for multiplication,:
vs÷
for division et cetera.
d_k_bo@feddit.orgto Programmer Humor@programming.dev•I want a programming language that supports German style composite words68·8 months agohttps://github.com/michidk/rost
Aren’t you müde from writing Rust programs in English? Do you like saying “scheiße” a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some German touch to your programs?
rost (German for Rust) is here to save your day, as it allows you to write Rust programs in German, using German keywords, German function names, German idioms.
d_k_bo@feddit.orgto Selfhosted@lemmy.world•Setting Up a Self-Hosted GitHub runner for CI/CDEnglish14·8 months agoThis, but Forgejo instead of Gitea.
d_k_bo@feddit.orgto Selfhosted@lemmy.world•how much power does your system need?English181·9 months agoIt’s the other way around. 0.1 kWh means 0.1 kW times 1 h. So if your device draws 0.1 kW (100 W) of power for an hour, it consumes 0.1 kWh of energy. If your
devicefactory draws 360 000 W for a second, it consumes the same amount of 0.1 kWh of energy.
d_k_bo@feddit.orgto Selfhosted@lemmy.world•Pinepods 0.7.2 - The rust based self-hosted podcast platform, complete with Podcasting 2.0 features!English2·9 months agoI’m likely to rebuild the backend in Go
Why bother with another language? Rust offers multiple great backend options. Using the same language for both ends might allow reusing some parts.
AntennaPod supports Android Auto: https://antennapod.org/documentation/playback/android-auto