@MaliciousKebab to Programmer [email protected]English • edit-25 months agoWhat could go wrong trying to solve AoC in Rust?imagemessage-square17arrow-up172arrow-down17
arrow-up165arrow-down1imageWhat could go wrong trying to solve AoC in Rust?@MaliciousKebab to Programmer [email protected]English • edit-25 months agomessage-square17
minus-square@[email protected]linkfedilink2•5 months agoShow the alternative, I’ll have a good laugh.
minus-squarejanAkalilinkfedilinkEnglish2•edit-25 months agoIt’s Nim, but I have no idea why you can’t do this in Rust: var seeds = lines[0].split(": ")[1].splitWhitespace().mapIt(it.parseInt) Full solution: https://codeberg.org/Archargelod/aoc23-nim/src/branch/master/day_05/solution.nim
minus-square@[email protected]linkfedilink1•5 months agoAhh, it is the same thing. Rust example surely has some cruft, but mostly for the better. I’m sure not all of it is needed.
Show the alternative, I’ll have a good laugh.
It’s Nim, but I have no idea why you can’t do this in Rust:
var seeds = lines[0].split(": ")[1].splitWhitespace().mapIt(it.parseInt)
Full solution: https://codeberg.org/Archargelod/aoc23-nim/src/branch/master/day_05/solution.nim
Ahh, it is the same thing. Rust example surely has some cruft, but mostly for the better. I’m sure not all of it is needed.