Posts by hjvt@hachyderm.io
(DIR) Post #ARGRLt3FwBKqvCuPRo by hjvt@hachyderm.io
2023-01-03T11:11:20Z
0 likes, 0 repeats
@moffintosh ```unsafe fn main() { let a = "Hello world from Rust!\n\0"; let b = a as *const str; let c = b as *const i8; printf(c);}```This is a bit contrived. I'd use a b"byte string literal\n\0".as_ptr() rather than casting a str to a slice of bytes.
(DIR) Post #AVJERB29cMomFz7ce0 by hjvt@hachyderm.io
2023-05-04T10:59:09Z
0 likes, 0 repeats
@boilingsteam so, uhh, what's Gemini?
(DIR) Post #AZ1ukUYKIMvOBHBgdE by hjvt@hachyderm.io
2023-08-23T17:56:24Z
0 likes, 0 repeats
@hn50 @fasterthanlime allow me to nit for a moment> // using `x` after that line only refers to the second `x`,> // the first `x` no longer exists.This isn't true, is it. Shadowing a variable doesn't drop it, except for some NLL fuckery, so the first x still exists, it just isn't accessible.
(DIR) Post #AkYhJvUkMl2nyPf9SC by hjvt@hachyderm.io
2024-08-02T13:54:53Z
0 likes, 0 repeats
@SuperDicqBrowsers were a mistake