Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)D
Posts
0
Comments
3
Joined
2 mo. ago

  • I'm trying to come up with a good pun how ownership and safety could have prevented this but..

    use std::sync::OnceLock;

    #[derive(Debug)] struct BrainCell { in_use: bool, }

    static BRAIN_CELL: OnceLock

    <BrainCell>

    = OnceLock::new();

    fn get_brain_cell() -> &'static BrainCell { BRAIN_CELL.get_or_init(|| { println!("Allocating brain power... this might take a while."); BrainCell { in_use: true } }) }

  • "JetBrains is exploring how to make this new language a derivative from Kotlin, but Skrygan believes the derivative should be English."

    That sounds like (Visual) Basic. It looks like English but it's basically pseudo-code.

    I'm happy letting AI and my language server write all the extra annotations for Rust, i've no trouble reading them. I have much more trouble when types and usage specifiers/limiters are missing.