65
submitted 9 months ago* (last edited 9 months ago) by MaliciousKebab@sh.itjust.works to c/programmer_humor@programming.dev

signal-2024-02-01-19-47-41-855

you are viewing a single comment's thread
view the rest of the comments
[-] GeniusIsme@lemmy.world 2 points 9 months ago

Show the alternative, I'll have a good laugh.

[-] janAkali@lemmy.one 2 points 9 months ago* (last edited 9 months ago)

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

[-] GeniusIsme@lemmy.world 1 points 9 months ago

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.

this post was submitted on 01 Feb 2024
65 points (91.1% liked)

Programmer Humor

19503 readers
339 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS