You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extern{fnputchar(x:usize);}// links to putchar() in libc.fnmain(){let x = trueasusize;// x = 1let y = x + x + x;// y = 3let z = (y << x + y) + x;// z = 49for c in z..=z + y {// loop c from 49 (z) to 52 (z + y)unsafe{putchar(c);}// write c to stdout. extern functions are unsafe}}
My dumbass at 1am forgot true existed and I ended up shaving off about 20 characters.
I highly doubt this can get any smaller without a different approach. x could have been reused by making it mutable but that wouldn't affect the character count.
The text was updated successfully, but these errors were encountered:
My dumbass at 1am forgot
true
existed and I ended up shaving off about 20 characters.I highly doubt this can get any smaller without a different approach.
x
could have been reused by making it mutable but that wouldn't affect the character count.The text was updated successfully, but these errors were encountered: