zarlin 6 days ago • 100%
Wow they indeed look very similar! Moosy is handsome, and also has white socks 😻
zarlin 2 weeks ago • 92%
Maybe mermaid fits your use case?
zarlin 1 month ago • 100%
I prefer a delayed game over an unfinished one, so good that they take the time they need
zarlin 1 month ago • 99%
zarlin 1 month ago • 96%
Cold tapwater + sodastream. You can filter your tapwater if needed in your area.
zarlin 2 months ago • 100%
In programming we use a rubber ducky for this
zarlin 2 months ago • 100%
Such a beautiful floof!
zarlin 2 months ago • 100%
Usually same as our compound letter "ij", similar but not quite how you'd prononuce the word "eye". Less commonly it's pronounced as "i-grec" (greek i) or "ypsilon".
https://en.wikipedia.org/wiki/Noctilucent_cloud Shot with a Sony a6000 with a Sigma 30mm prime lens
zarlin 3 months ago • 96%
That's called R&D, Research and Development. As long as you learn from a failure, it is progress towards success.
zarlin 3 months ago • 100%
Relevant XKCD: https://xkcd.com/435/
zarlin 3 months ago • 100%
Awesome! It looks sturdy! On the store version the bed is held in place with velcro, with one side stapled to the wood. This works well to keep the bed in place.
zarlin 3 months ago • 100%
If you do decide to make it yourself, I'm curious to see the result^^
zarlin 3 months ago • 100%
It's not actually DIY, though it could have been. This is the store link with more pictures and specs: https://www.zooplus.nl/shop/katten/krabpaal_krabmeubels/natural_paradise/wandmeubels/537547
zarlin 3 months ago • 100%
Mochi had a lazy Sunday morning~
zarlin 4 months ago • 100%
Relevant xkcd: https://xkcd.com/1473/
zarlin 4 months ago • 85%
I use OneCalendar, it works with a lot of email/calendar hosts, looks good, and is very responsive.
Alternatively, Thunderbird has a calendar feature built-in.
(Edit) failed to see which community this was, OneCalendar is sadly not open source.
zarlin 4 months ago • 100%
That sounds awesome, thanks for the suggestion!
zarlin 4 months ago • 100%
Reminds me of this gem: https://lizengland.com/blog/2014/04/the-door-problem/
zarlin 5 months ago • 100%
Tenacious D - Tribute
zarlin 6 months ago • 100%
Had that issue too, search in Start for "Default Apps", then scroll to the bottom and click "Choose default application by file type". Then scroll to .pdf
and choose Sumatra. The settings window may crash for some reason, but for me the file association did seem to stick after that.
zarlin 6 months ago • 100%
Heavy stuff first, cold things together, fragile stuff last.
zarlin 6 months ago • 100%
zarlin 9 months ago • 100%
Nim
I optimized Part1 by directly referencing workflows between each rule (instead of doing a table lookup between them), in expectation of part 2 needing increased performance. But that turned out to not be needed 😋
I had to dig through my dusty statistics knowledge for part 2, and decided to try out Mermaid.js to create a little graph of the sample input to help visualize the solution.
After that it was pretty straightforward.
zarlin 9 months ago • 100%
Thank you too, I'll pass on your compliments to Mochi 😻
zarlin 9 months ago • 87%
This is your life now
zarlin 9 months ago • 100%
This was actually something I learned for my job, it was nice to be able to apply it here.
I like your commitment to wheel-reinvention, it can be a lot more fun than going for an existing or 'intended' approach.
zarlin 9 months ago • 100%
Good job on persevering with this one. Your approach for part 2 sounds quite viable, it is very similar to the Ear clipping method for triangulating a polygon.
zarlin 9 months ago • 100%
Nim
Decided to go for a polygon approach for part 1 using the Shoelace formula to calculate the area. This meant part 2 only resulted in larger values, no additional computation.
Code runs in <1ms for part 1 and 2 combined
zarlin 9 months ago • 100%
python-level intuitive-to-read language with static typing
Agreed, this is exactly Nim
zarlin 9 months ago • 100%
Fork is great!
zarlin 9 months ago • 100%
Yeah the descriptions contain a lot of story fluff, but also critical bits of information.
zarlin 9 months ago • 100%
Nim
Happy I decided to not actually expand anything. Manhattan distance and counting the number of empty rows and columns was plenty. Also made part 2 an added oneliner :) It's still pretty inefficient iterating over the grid multiple times to gather the galaxies and empty rows, runtime is about 17ms
I could also extract and re-use my 2D Coord and Grid classes from day 10, and learned more about Nim in the process ^^
zarlin 9 months ago • 100%
Yepp, this one got me as well! I found the discrepancy when testing against the sample through, which showed the result for a factor 100 (which needed to be 99). Knowing the correct outcome made debugging a lot easier.
I always make sure my solution passes all the samples before trying the full input.
zarlin 9 months ago • 100%
Nim
This was a great challenge, it was complex enough to get me to explore more of the Nim language, mainly (ref) types, iterators, operators, inlining.
I first parse the input to Tiles stored in a grid. I use a 1D seq for fast tile access, in combination with a 2D Coord type. From the tile "shapes" I get the connection directions to other tiles based on the lookup table shapeConnections
. The start tile's connections are resolved based on how the neighbouring tiles connect.
Part 1 is solved by traversing the tiles branching out from the start tile in a sort of pathfinding-inspired way. Along the way I count the distance from start, a non-negative distance means the tile has already been traversed. The highest distance is tracked, once the open tiles run our this is the solution to part 1.
Part 2 directly builds on the path found in Part 1. Since the path is a closed loop that doesn't self-intersect, I decided to use the raycast algorithm for finding if a point lies inside a polygon. For each tile in the grid that is not a path tile, I iterate towards the right side of the grid. If the number of times the "ray" crosses the path is odd, the point lies inside the path. Adding all these points up give the solution for Part 2.
Initially it ran quite slow (~8s), but I improved it by caching the tile connections (instead of looking them up based on the symbol), and by ditching the "closed" tiles list I had before which kept track of all the path tiles, and switched to checking the tile distance instead. This and some other tweaks brought the execution speed down to ~7ms, which seems like a nice result :)
::: spoiler Condensed version:
proc solve*(input:string):array[2, int]=
let lines = input.readFile.strip.splitLines.filterIt(it.len != 0)
# build grid
var grid = Grid(width:lines[0].len, height:lines.len)
for line in lines:
grid.tiles.add(line.mapIt(Tile(shape:it)))
# resolve tile connections
for t in grid.tiles:
t.connections = shapeConnections[t.shape]
# find start coordinates and resolve connections for it
let startCoords = grid.find('S')
let startTile = grid[startCoords]
startTile.connections = startCoords.findConnections(grid)
startTile.distance = 0
# Traverse both ends of path from start
var open: Deque[Coord]
open.addLast(startCoords)
while open.len != 0:
let c = open.popFirst # current coordinate
let ct = grid[c] # tile at c
#find and add connected neighbour nodes
for d in ct.connections:
let n = c+d
let nt = grid[n]
# if not already on found path and not in open tiles
if nt.distance == -1 and not (n in open):
nt.distance = ct.distance + 1
result[0] = max(result[0], nt.distance)
open.addLast(n)
# Part 2
for c in grid:
let ct = grid[c]
#path tiles are never counted
if ct.distance >= 0:
continue
# search from tile to end of row
var enclosed = false
for sx in c.x.. 0):
enclosed = not enclosed
result[1] += ord(enclosed)
:::
zarlin 10 months ago • 100%
I looked into the iterators and they are really handy, they remind me of C#'s Linq syntax.
*"I had every reason to hate you for what you've done. And I have every reason to love you for who you are."* A Recall of Overwatch agents to active duty can only mean trouble. For veteran Jesse McCree, that trouble is personal and not something he would like to deal with any time soon. So he runs. While running from the ghosts of his past, both imagined and real, he crashes head-first into Fate in the form of a terrifying and breathtakingly gorgeous assassin. Perhaps McCree might come to like trouble, after all.