Risto Viitanen's Avatar

Risto Viitanen

@dilaz.bsky.social

My super powers include writing AND reading regex. Into software hacks, being lazy and Information security. Uses tabs when coding. Creator of the original Norppalivebot ❤️ our future AI overlords

88 Followers  |  119 Following  |  31 Posts  |  Joined: 17.11.2023  |  1.6078

Latest posts by dilaz.bsky.social on Bluesky

Jep, just avasin ton pääsivun ja huomasin 😅

13.05.2025 08:29 — 👍 2    🔁 0    💬 0    📌 0
Lumilapio-piirros norppalivessä

Lumilapio-piirros norppalivessä

Lumilapio-piirros norppalivessä

Lumilapio-piirros norppalivessä

Ruksi norppalivessä

Ruksi norppalivessä

Lumilapio-piirros norppalivessä

Lumilapio-piirros norppalivessä

#norppalive­ssä näköjään tapahtuu tänää jotain, näyttäis 5min välein tulevan joku kuva ruutuun­­­

13.05.2025 06:58 — 👍 3    🔁 0    💬 1    📌 0
Norppaliven kivikko, missä yksi kivi on merkattu "Norppa (88%)"

Norppaliven kivikko, missä yksi kivi on merkattu "Norppa (88%)"

Miten joka #norppalive­ssä on tommonen norpan muotonen kivi?!

02.05.2025 18:55 — 👍 4    🔁 1    💬 0    📌 0
Picture of a cat cleaning himself with a label "norppa 0.93"

Picture of a cat cleaning himself with a label "norppa 0.93"

Bonus Norb

01.02.2025 17:55 — 👍 5    🔁 0    💬 0    📌 0
Video thumbnail

First test run of this newly trained YOLOv11n-model detecting norppas (or saimaa ringed seals) seems to be working pretty well

#norppalive

01.02.2025 17:54 — 👍 5    🔁 1    💬 1    📌 0
Taulu, jossa on norppa kivellä ja norpan ympärillä punainen laatikko, jonka päällä lukee "norppa 0.87"

Taulu, jossa on norppa kivellä ja norpan ympärillä punainen laatikko, jonka päällä lukee "norppa 0.87"

Uutta norppabottia kouluttaessa, kun tutkii vanhoja hakemistoja, löytyy välillä aarteita

25.01.2025 09:43 — 👍 1    🔁 0    💬 0    📌 0

#AdventOfCode day 16 done and it was pretty quick with the help of pathfinding-crate, which felt a bit like cheating

For some reason the last test fails, but I still got the correct solution

github.com/Dilaz/advent...

17.12.2024 18:52 — 👍 1    🔁 0    💬 0    📌 0

Day 15 of #adventofcode done.

Starting to take a bit too long to solve these puzzles so I might have to give up soon 😅

github.com/Dilaz/advent...

17.12.2024 16:35 — 👍 2    🔁 0    💬 0    📌 0

Day 14 of #AdventOfCode was pretty.. different. I think I got a bit lucky and guessed how the part 2 works, but it's not super fast solution, takes about 75ms to run

github.com/Dilaz/advent...

15.12.2024 20:47 — 👍 1    🔁 0    💬 0    📌 0

Oh, totally forgot about Rayon again; day 12 part 2 is now 7.5ms

15.12.2024 19:05 — 👍 0    🔁 0    💬 0    📌 0

Had a few busy days, but here are solutions for day 12 & 13 of #adventofcode

Day 12 part 2 is my slowest solution, it takes around 17ms to run but I think day 13 part 2 is one of the faster ones (51µs) if you don't count parsing the data (47µs)

github.com/Dilaz/advent...
github.com/Dilaz/advent...

15.12.2024 18:50 — 👍 2    🔁 0    💬 1    📌 0

I have to admit that copilot did the most of the "manual" work 😅

13.12.2024 09:58 — 👍 0    🔁 0    💬 0    📌 0
Day 11 - Advent of Code 2024

I've completed "Plutonian Pebbles" - Day 11 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/11

I tried "cached" crate, but it messed up my benchmarks, so I made my own cache.

github.com/Dilaz/advent...

11.12.2024 15:24 — 👍 4    🔁 0    💬 1    📌 0
Hours watched: 18000, distinct days visited: 347

Hours watched: 18000, distinct days visited: 347

Another busy year, apparently I've been watching Twitch about 52 hours per day on average!

#twitchrecap

10.12.2024 15:40 — 👍 1    🔁 0    💬 0    📌 0
Preview
Quickselect - Wikipedia

If you want a fun exercise with day 5 part 2, you can actually use quick select instead and just find out what is the middle number without sorting the whole list

en.wikipedia.org/wiki/Quickse...

10.12.2024 15:05 — 👍 1    🔁 0    💬 1    📌 0

Day 10 of #adventofcode was easier than 9. Actually due to my lazy solution, part 2 is faster than part 1. The only difference is that part 1 needs to get the unique routes and part 2 just counts them all (261µs vs. 187µs)

github.com/Dilaz/advent...

10.12.2024 13:54 — 👍 5    🔁 0    💬 0    📌 0

Finally got #adventofcode day 9 part 2 working, I have no idea why it was so hard for my brain.

Also changed things a bit in the project and I'll try to fix up the rest of the days to the same format to have a separate lib, main & benchmarks for each day

github.com/Dilaz/advent...

10.12.2024 12:26 — 👍 1    🔁 0    💬 0    📌 0

Back to microseconds in #adventofcode day 8
Spent way too many hours debugging too low result on part 1 and the issue was, that I needed '0'..='9' instead '0'..'9', which left out 9.
You get a warning for that by adding:
`"rust-analyzer.check.command": "clippy"`
to VSCode

github.com/Dilaz/advent...

08.12.2024 17:32 — 👍 3    🔁 0    💬 0    📌 0

Turns out my silly little optimization which caused so much trouble only skips 16/850 lines, which makes pretty much no difference

07.12.2024 17:52 — 👍 0    🔁 0    💬 0    📌 0

Pretty happy with #adventofcode day 7 solution. Had some issues getting the correct answer due to a premature optimization, which I didn't think through:
Who would have known that x + 1 is larger than x * 1?

But now part 1 runs in 1.8ms and part 2 in 5.8ms

github.com/Dilaz/advent...

07.12.2024 15:01 — 👍 2    🔁 0    💬 1    📌 0

#adventofcode day 6 done! Managed to optimize part 2 from 2.5s runtime to 125ms with the help of Rayon lib & other stuff, but I'm sure there's still something I could do to make it faster

github.com/Dilaz/advent...

06.12.2024 13:06 — 👍 1    🔁 0    💬 0    📌 0

Day 5 of #adventofcode done and it's at least less hacky than they day4 solution

github.com/Dilaz/advent...

05.12.2024 11:58 — 👍 1    🔁 0    💬 0    📌 0

Day 4 of #adventofcode is my laziest solution so far since I really dislike these kind of tasks, but at least it works and it is ⚡Blazingly fast⚡

github.com/Dilaz/advent...

04.12.2024 09:51 — 👍 3    🔁 0    💬 1    📌 0

Made a lazy regex solution for #adventofcode day 3 and then a faster/more optimized one with nom.

It's not like the regex solution was slow or anything, but the run time dropped from 0.004s to 0.001s

github.com/Dilaz/advent...
github.com/Dilaz/advent...

03.12.2024 17:02 — 👍 1    🔁 0    💬 0    📌 0

Never mind, it's 7x faster when I added Rayon optimization to the higher level loop

02.12.2024 10:49 — 👍 0    🔁 0    💬 0    📌 0

#adventofcode day 2 done and almost got to use the Rayon lib, but it just got slower with that 😅

github.com/Dilaz/advent...

02.12.2024 09:49 — 👍 1    🔁 0    💬 1    📌 0

Day 1 done in Advent of Code, let's see if I can manage to solve the first 10 puzzles this year

github.com/Dilaz/advent...

01.12.2024 10:44 — 👍 0    🔁 0    💬 0    📌 0

Jos oisit Dyykkis, sul ois kasa ilmasia poppareita

14.05.2024 09:51 — 👍 1    🔁 0    💬 1    📌 0

Tarkotit varmaan Näässtadia tai Meri-Mansee

29.11.2023 20:13 — 👍 0    🔁 0    💬 1    📌 0

I guess I'll try to move all my bots (@norppalivebot.bsky.social and others) to Bluesky and in the future, some new bots I've been thinking about doing

28.11.2023 14:00 — 👍 0    🔁 0    💬 0    📌 0

@dilaz is following 20 prominent accounts