@TDplay

4 Followers
33 Following
13 Posts

nerd, amateur programmer

I write software, and it sometimes works.

pronounsthey/them/their
bird sitegone forever :)
Essem Space says kids shouldn't listen to Jensen Huang - they should leave it up to what actual devs have to say

@federicomena The .cast() method on pointers doesn't seem to trigger the lint. It also comes with the added bonus that it can't accidentally cast *const into *mut.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2a1d091a7bb85e39ffc0836e2465d392

Rust Playground

A browser interface to the Rust compiler to experiment with the language

@livingcoder One thing to note is that if you use traits like `Into` and `AsRef`, you might end up with a bunch of unnecessarily duplicated code bloating up your binary size.

You can avoid this with tricks like

fn do_thing_inner(x: Foo) {
// Implementation goes here...
}

pub fn do_thing<T: Into<Foo>>(x: T) {
do_thing_inner(x.into());
}

This trick is used in the standard library, for example: https://doc.rust-lang.org/1.70.0/src/std/fs.rs.html#325-330

fs.rs - source

Source of the Rust file `library/std/src/fs.rs`.

@[email protected] @chrisdenton It installs the Rust compiler for you, but that only knows how to compile to object code - it doesn't know how to turn object code into a usable program.

I've not used Ubuntu in a few years now, but looking at the Ubuntu package list, try

$ sudo apt install gcc-mingw-w64-x86-64

@[email protected] @noboilerplate All of these options have trade-offs.

opt-level = 'z' is often slower than opt-level = 3.
lto = true and codegen-units = 1 both make compilation slower.
panic = 'abort' makes panics unrecoverable, and does not run destructors after a panic.
strip = true makes the program harder to debug.

@godpod flood kills all but 2 of every animal, then the resulting low genetic diversity eventually makes everything go extinct, the end.
12ft

Gendered Intelligence on Twitter

“The NHS consultation on new gender identity services for young people is live. Our guide can help you respond with evidence and confidence. Responding takes 20 minutes, but it could make a lifetime of change. https://t.co/UOrlFyPLIk”

Twitter
Just saying!!!
Boost
NHS England has issues new guidance which says that in young people being trans could be a "phase" and doctors could try stopping them wearing the clothes they choose to wear. You can complain. Learn more about the guidance and how to complain: https://ruthpearce.net/2022/11/23/nhs-england-proposals-put-young-people-in-danger/
NHS England proposals put young people in&nbsp;danger

Dr Ruth Pearce