Search
Items tagged with: Rust
A Memory Safe Implementation of the Network Time Protocol
Folkert and the team at Tweede golf are helping us to build a memory safe NTP implementation. We asked them to share their experience in this blog post.Prossimo
Hey #Rust crate maintainers! I've written a crate metadata validator. Check if your crates need fixes:
The GNOME ♥ Rust remote hackfest starts tomorrow! Are you planning to join? Learn more or find event organizer contacts here: wiki.gnome.org/Hackfests/Rust2…
cargo careful: run your Rust code with extra careful debug checking
Did you know that the standard library is full of useful checks that users never get to see? There are plenty of debug assertions in the standard library that will do things like check that...www.ralfj.de
Do you write code for free and open source projects? Would you like to learn the basics of the Rust programming language? I’m offering to teach the basics of Rust to free and open source software programmers, for free.
liw.fi/training/rust-foss-dev/
#Rust #RustLanguage #FOSS #Training
I dont know if you know but if you know you dont know, now you know. Rustconf videos are up: youtube.com/playlist?list=PL85…
#rust
RustConf 2022
RustConf gathers Rust developers from around the world to learn and share with one another.YouTube
You can try and describe Rust syntax but I don’t think you’re going to beat “like trying to read the output of a UART with line noise.”
bunniestudios.com/blog/?p=6375
#rust
I'm experimenting with the #libreoffice SDK to write a small #nextcloud app. I'm using the #cpp API because I want to wrap it in an #Rust #HTTP backend.
It is hard to figure out how to use the API and questions on Stackoverflow are hard to align with the #libreoffice examples. For example, stackoverflow.com/q/62769483 does not really help. I guess you need to be familiar with the API before you will understand it.
@libreoffice, do you have any pointers to become more comfortable with the API?
Libreoffice API (UNO): need to change user's xTextField text
Is there any proper way to change text in the user's created xTextField using C++ UNO? These fields names are com.sun.star.text.fieldmaster.User.[FIELD NAME] I tried this before, but it didn't help:Stack Overflow
#Rust help requested. I am officially at wits end here.
Please take a look at my source file sdlstate.rs.
I'm getting a borrow checker error E0597 on line 39, indicating that tc
does not live long enough. However, looking at the sdl2 sources (via its rust-docs), I don't see how my created texture, t
, can possibly still refer to tc
, which as far as I'm aware, is the only way this error can be generated under current conditions.
error[E0597]: `tc` does not live long enough<br> --> src/sdlstate.rs:39:21<br> |<br>14 | impl<'a> SdlState<'a> {<br> | -- lifetime `'a` defined here<br>...<br>39 | let mut t = tc<br> | _____________________^<br>40 | | .create_texture(<br>41 | | Some(sdl2::pixels::PixelFormatEnum::RGBA8888),<br>42 | | sdl2::render::TextureAccess::Streaming,<br>43 | | self.width,<br>44 | | self.height,<br>45 | | )<br> | |_____________^ borrowed value does not live long enough<br>...<br>49 | self.current_texture.set(Some(t));<br> | --------------------------------- argument requires that `tc` is borrowed for `'a`<br>...<br>56 | }<br> | - `tc` dropped here while still borrowed<br><br>
Why is this happening? Why can't I re-arrange the code to prevent this from happening?
Right now, the only way this code will compile and run correctly is if I manually inject the re-paint code where I invoke f(), which utterly defeats the purpose and benefit of using closures in the first place.
In an attempt to fix this, I've tried:
- Replacing the Cell with RefCell.
- Removing Cell all-together and just using a raw Option type.
- Removing the 'a lifetime annotation.
None of these work, and almost always introduce some manner of errors on their own.
Please help. Thanks.
Now that I'm on a new instance, I'll write a new #introduction.
I am a follower of Jesus, mutualist hobbyist programmer, and sysadmin (in that order). I'm passionate about #CooperativeTechnology, #smalltech, and liberating people all around within and without technology.
I'm interested in alternative internet protocols (#Gemini), mobile Linux, real sustainability, and various computer languages (including #Rust and #Zig).
Also hosting benign.town! Join us if you'd like. 🙂
Benign.Town
A place for harmless people to freely discuss harmless topicsMastodon hosted on benign.town
Hello new followers! I've been bad at hashtags, which are crucial here for discoverability, so here's some of them.
I try to toot interesting things related to #activism about #ClimateChange / #ClimateCrisis / #EarthBreakdown, from the perspective of #degrowth / #ClimateJustice / #sustainability. I'm one tiny part of #ExtinctionRebellion.
I build #FOSS / #OpenSource / #commons and #SmallTech using #rust and will write more about that soon.
Third, occasionally #philosophy, #anticapitalism.
Heads up: phosh-osk-stub moved out of #phosh's repo and to: gitlab.gnome.org/guidog/phosh-… as it acquired more and more cruft while debugging some (now fixed) touch input related issues in #gtk 4.
Mostly mentioning it here since some distros (such as #debian) used it in the past on architectures that had trouble building #rust to fulfill session dependencies (which is not an issue anymore nowadays) so it can safely be dropped.