Skip Navigation
Any Calendar app for windows?
  • 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.

  • "Do you know how many spells are just recycled incantations?"
  • That sounds awesome, thanks for the suggestion!

  • This is Brownie
  • Such a comfy berry nose!

  • Adobe putting spam in notification tray on Windows
  • 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.

  • Do you organize the order of your groceries in the checkout line?
  • Heavy stuff first, cold things together, fragile stuff last.

  • where to buy retired sets
  • Try Bricklink, I've purchased "old" sets there for a decent price. Be sure to check the seller's rating/reviews

  • ⚙️ - 2023 DAY 19 SOLUTIONS -⚙️
  • 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.

    Day 19, part 1+2

  • Mochi and Yami share a basket
  • Thank you too, I'll pass on your compliments to Mochi 😻

  • Mochi and Yami share a basket
  • Like this? 🙂

    the cats Yami and Mochi sleeping on a blanket

  • She fell asleep on my hand and now I'm trapped
  • This is your life now

  • 🛶 - 2023 DAY 18 SOLUTIONS -🛶
  • 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.

  • 🛶 - 2023 DAY 18 SOLUTIONS -🛶
  • 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.

  • 🛶 - 2023 DAY 18 SOLUTIONS -🛶
  • 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

    Source

  • Unison | A friendly, statically-typed, functional programming language from the future · Unison programming language
  • python-level intuitive-to-read language with static typing

    Agreed, this is exactly Nim

  • ☃️ - 2023 DAY 11 SOLUTIONS - ☃️
  • Yeah the descriptions contain a lot of story fluff, but also critical bits of information.

  • ☃️ - 2023 DAY 11 SOLUTIONS - ☃️
  • 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 ^^

    Part 1 and 2 combined

  • ☃️ - 2023 DAY 11 SOLUTIONS - ☃️
  • 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.

  • ❄️ - 2023 DAY 10 SOLUTIONS -❄️
  • 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 :)

    Part 1 & 2 combined

    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)
    
  • 🎄 - 2023 DAY 1 SOLUTIONS -🎄
  • I looked into the iterators and they are really handy, they remind me of C#'s Linq syntax.

  • voidcats @lemmy.world Zarlin @lemmy.world
    Yami joined the family
    0
    Mochi is comfy 😊

    The bed she's in is actually also called Mochi!

    12
    Mochi has a berry nose

    But is it a raspberry or a strawberry?

    4
    Mochi likes to be upside down

    She's actually laying on a laundry rack, comfy XD

    0
    zarlin Zarlin @lemmy.world
    Posts 16
    Comments 46