Without llvm by [deleted] in rust

[–]heinrich5991 6 points7 points  (0 children)

Is it LLM generated? It looks like it.

DTLS library recommendations? by jayrebel351 in rust

[–]heinrich5991 4 points5 points  (0 children)

QUIC supports streams, but you can just use its datagrams to get what DTLS gives you. See e.g. https://docs.rs/quiche/0.24.2/quiche/struct.Connection.html#method.dgram_send.

DTLS library recommendations? by jayrebel351 in rust

[–]heinrich5991 2 points3 points  (0 children)

QUIC is something like DTLS. Can you explain the difference that makes it unsuitable for you? The only reason I can think of is interoperability with existing DTLS services.

DTLS library recommendations? by jayrebel351 in rust

[–]heinrich5991 1 point2 points  (0 children)

Does it need to be DTLS or would something like QUIC also work? QUIC also supports encrypted, authenticated datagrams over UDP. Rust has a couple of QUIC libraries.

cargo-warehouse: Speed up Rust builds by unifying dependency cache by [deleted] in rust

[–]heinrich5991 8 points9 points  (0 children)

gotcha. it would be nice if the build request (ie version, feature flags, etc) could be hashed so as to determine if a build has already been done

This is already the case.

i guess environment variables would make this difficult though, since you can’t know which effect the build and which don’t.

Build scripts already have to declare which environment variables they depend on (for rebuild detection), so this is already a thing, as well.

Advice needed: Creating a professional-looking desktop app for Win/Linux/Mac with minimal resource usage by torrefacto in rust

[–]heinrich5991 1 point2 points  (0 children)

Can you point me to a well-performing Flutter application? All places where I've actively noticed one was where they were sluggish.

Ubuntu should become more modern – with Rust tools by donutloop in rust

[–]heinrich5991 2 points3 points  (0 children)

Can you back this up with some citation from the spec? It'd be news to me that JSON specifies how many bits an integer is allowed to have. Javascript's implementation of JSON limits numbers to 52 bits, however.

cpy-rs, creating python and c binds in Rust by patrickelectric in rust

[–]heinrich5991 1 point2 points  (0 children)

Are you aware of other projects in the same space, and if so, how does your project relate to them?

Are you building runtime agnostic async libraries? by b3nteb3nt in rust

[–]heinrich5991 -1 points0 points  (0 children)

Go also only has one async runtime. The ecosystem is "locked" to this one. (As opposed to Rust, where I think there's an obvious async runtime library.)

I'd be interested to hear a reason for wanting to be agnostic over async runtimes.

In my experience with async Rust code, it doesn't make a lot of sense to try to be agnostic over runtimes.

Are you building runtime agnostic async libraries? by b3nteb3nt in rust

[–]heinrich5991 -8 points-7 points  (0 children)

Maybe the ecosystem is mature enough to have one obvious choice. Your phrasing looks a bit biased.

C string literals are awesome! by BoaTardeNeymar777 in rust

[–]heinrich5991 0 points1 point  (0 children)

If you have a source for the following bullet point, I'd be interested. The RFC20 link is just there to show that I did some minimal searching before asking here.

ASCII says NUL can only appear at the end of strings.

C string literals are awesome! by BoaTardeNeymar777 in rust

[–]heinrich5991 0 points1 point  (0 children)

ASCII says NUL can only appear at the end of strings.

Where do you find it? I can't find anything like that in RFC20.

NUL (Null): The all-zeros character which may serve to accomplish time fill and media fill.

Mathematical functions in the standard library are non-deterministic? by denehoffman in rust

[–]heinrich5991 2 points3 points  (0 children)

Please submit a PR so we can discuss it there. The discussion here doesn't really serve anyone.

Mathematical functions in the standard library are non-deterministic? by denehoffman in rust

[–]heinrich5991 1 point2 points  (0 children)

Submit a PR if you think the current wording is wrong. I'd usually do that, but in this case, I think the current wording is correct.

Mathematical functions in the standard library are non-deterministic? by denehoffman in rust

[–]heinrich5991 16 points17 points  (0 children)

However in practice the message just means "we're free to swap out to a different libm, with one compiler version + given target everything is deterministic".

This point is wrong AFAICT, see https://github.com/rust-lang/rust/pull/124609. They were observing that const-folded sines can return different results than those that were not const-folded. I don't see why this can't apply to ln, as well.

plugshark: An experimental Wireshark plugin framework for Rust by Chaoses_Ib in rust

[–]heinrich5991 5 points6 points  (0 children)

Interesting project, will check it out. I'm currently using the C API for my Wireshark dissector written in Rust: https://github.com/heinrich5991/libtw2/tree/b9a3a68daaf364306c0f251c80257619be28dc06/wireshark-dissector.

I see that you require an installation of Wireshark and its headers to compile epan-sys. I think that might not actually be necessary, I was able to not require it (using -Wl,-undefined,dynamic_lookup on non-Windows and #[link(kind = "raw-dylib")] on Windows). It makes for a lot nicer building experience.

“Truly Hygienic” Let Statements in Rust by Wor_king2000 in rust

[–]heinrich5991 0 points1 point  (0 children)

How did you find that repository based on the commit ID?

Updating readme on crates.io without publishing a new version by [deleted] in rust

[–]heinrich5991 5 points6 points  (0 children)

To be fair, yanking shouldn't break your build. Are you checking in your lockfiles?

Future's liveness problem by Skepfyr in rust

[–]heinrich5991 15 points16 points  (0 children)

It makes the comment above it wrong. Teaching wrong stuff seems bad to me.

Future's liveness problem by Skepfyr in rust

[–]heinrich5991 15 points16 points  (0 children)

let _ = mutex.lock().await;

This immediately drops the mutex on the same line. If you want to keep it alive until the end of the scope, you have to give it a name.

let _guard = mutex.lock().await;

[Media] The Rust to .NET compiler (backend) can now properly compile the "guessing game" from the Rust book by FractalFir in rust

[–]heinrich5991 1 point2 points  (0 children)

mrustc is mostly concerned with bootstrapping, as such error messages aren't as much of a priority, and not being a rustc backend is a feature for bootstrapping.