mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#rustlang

103 Beiträge85 Beteiligte8 Beiträge heute
Antwortete Rust Weekly 🦀

@rust_discussions
"... it's clear to me that using Rust allows me to write more correct code and makes me happier compared to dealing with C++."

This is actually the reason I got in to #rustlang . I needed to interact with some specific hardware using some C-libraries. Thinking "there must be a better language for this than C/C++" I wrapped the lib using rust and bindgen. And I was right, there was a better language than C/C++ for that.

Fellow Rustaceans, what/how should the lifetimes look for an upward arg? I'm trying to make an HTTP and return a reader. Or should I use an out parameter for scenarios like this instead?

```rust
use ureq::BodyReader;
pub fn fetch_feed(channel_id: String) -> anyhow::Result<&'_ BodyReader<'_>> {
let url = format!("youtube.com/feeds/videos.xml?c{channel_id}");
let res = ureq::get(url).call()?;
Ok(&res.into_body().as_reader())
}
```

Antwortete im Thread

@sabik @dequbed @eniko @pixel

Totally agree! Unit tests and usage of #LLMs in that area are a bad combo (both for implementation and tests).

However, I'd like to give you some "food for thought":
What if the LLM was generating code against a (human written) #proof?

See this blog post, where they've written a proof with #Kani, a model checker in #Rust and let the #LLM generate the implementation until the proof passes:

model-checking.github.io/kani-

Kani Rust Verifier Blog · Writing Code with ChatGPT? Improve it with Kani.Kani is a verification tool that can help you prove properties about your Rust code. To learn more about Kani, check out the Kani tutorial and our previous blog posts.

I'm finally confident enough to release my `binge` static binary installer to the general public. It served me well for a good two months now and with pre-built binaries uploaded for each release it's not even a hassle to get started.

In a nutshell, it installs static binaries scraped from GitHub release pages and subsequently updates them on demand. I used to use `cargo binstall` or bespoke scripts but each have their own little downsides.

github.com/matze/binge/release

Fixed

Release tarballs.

Full Changelog
0.1.1...0.1.2
GitHubRelease 0.1.2 · matze/bingeFixed Release tarballs. Full Changelog 0.1.1...0.1.2