▲ 74 ▼ [2025 Day 5] It always be like that (programming.dev) submitted 7 months ago by Gobbel2000@programming.dev to c/advent_of_code@programming.dev 5 comments fedilink hide all child comments
[–] hades@programming.dev 9 points 7 months ago (1 child) it all fit in int64 tho, so could be worse permalink fedilink source hideshow 2 child comments replies: [–] cabhan@discuss.tchncs.de 2 points 7 months ago (2 children) I always have this thought. I'm doing it in Rust, so I check if there are negative numbers: if not, use usize. But I'm always terrified there will be an overflow somewhere. If I were using Kotlin or Java, I might always use BigInteger just out of fear. permalink fedilink source parent hideshow 4 child comments replies: [–] hades@programming.dev 1 point 7 months ago That’s a very interesting thought! I was thinking of writing my own Rust data type that would automatically upgrade to big integer, similarly to the int type in Python. permalink fedilink source parent [–] GiantTree@feddit.org 1 point 7 months ago I am doing AOC in Kotlin. Longs are fine. I haven't encountered a puzzle that required ULong or BigInteger. permalink fedilink source parent
[–] cabhan@discuss.tchncs.de 2 points 7 months ago (2 children) I always have this thought. I'm doing it in Rust, so I check if there are negative numbers: if not, use usize. But I'm always terrified there will be an overflow somewhere. If I were using Kotlin or Java, I might always use BigInteger just out of fear. permalink fedilink source parent hideshow 4 child comments replies: [–] hades@programming.dev 1 point 7 months ago That’s a very interesting thought! I was thinking of writing my own Rust data type that would automatically upgrade to big integer, similarly to the int type in Python. permalink fedilink source parent [–] GiantTree@feddit.org 1 point 7 months ago I am doing AOC in Kotlin. Longs are fine. I haven't encountered a puzzle that required ULong or BigInteger. permalink fedilink source parent
[–] hades@programming.dev 1 point 7 months ago That’s a very interesting thought! I was thinking of writing my own Rust data type that would automatically upgrade to big integer, similarly to the int type in Python. permalink fedilink source parent
[–] GiantTree@feddit.org 1 point 7 months ago I am doing AOC in Kotlin. Longs are fine. I haven't encountered a puzzle that required ULong or BigInteger. permalink fedilink source parent