New account since lemmyrs.org went down, other @Deebsters are available.

  • 50 Posts
  • 989 Comments
Joined 2 years ago
cake
Cake day: October 16th, 2023

help-circle





  • This is a crazy mess.

    The subject of “worse reimplementations of native features” reminds me of trying to find an event for the (2012?) Olympics. They didn’t seem to have a search, but they did have an infinite scrolling schedule page so I held down End until the page had everything and used the native search. No results, even when I tried something that I knew was at the top of the page.

    I noticed the scrollbar was acting weird and looked into it. Turns out that they were removing the parts of the page outside of the viewport and loading them back in when you scrolled.

    I suspect it’s because they were finding their bloated page was slow on some devices so put in this terrible hack, but it broke basic browser features.


  • I have mixed feeling about this one. I’m on the newsletter as a Kagi + Linux user, but I’m not sure I’ll make this my daily driver once it’s ready.

    I have diversified my tech, using self-hosted and/or open source where possible. Orion is closed-source, and from the same company I use for my search, translation, etc. I trust Kagi far more than I trust Google, but I still don’t want all my eggs in one basket.

    It’s obviously good that we’re getting alternatives in the browser market, but I don’t know how much work they’ve done outside of the UI - is this effectively a reskin of Apple Safari in the same way we have the Chromium-based browsers that are dependent on Google’s developers?

    I like that they have “native support for both Chrome and Firefox extensions”, which means I should be able to replicate my Firefox setup in Orion. I guess I’ll need to try it.



  • The UK had a history of rhyming nicknames for shortened versions, like William -> Will -> Bill, and most of those are still common in English speaking countries. Richard -> Dick, Robert -> Bob (also Hob, Dob and Nob but these didn’t survive).

    These shortened versions can then get extended: Edward -> Ed -> Ted -> Teddy, Margaret -> Meg -> Peg -> Peggy, Anne -> Nan -> Nancy

    In the middle ages it was common to make a diminutive name by adding -kin, -in, or -cock, which gave us John -> Jankin/Jenkin -> Jakin -> Jack. Also, Robert -> Robin, Henry -> Hank









  • Mild spoilers ahead, but you’re reading the solutions thread.

    I was just doing some preliminary checking of the data on my phone with Nushell (to see how much my ageing laptop would suffer) when I discovered there weren’t any non trivial cases.

    Normally I get the test data working before trying the input data, this is definitely teaching me the value of investigating the data before heading down into the code mines.

    Unfortunately I can’t get the second star yet because I missed a few days.



  • nushell

    I’m still travelling, so another phone attempt. Jet lag says sleep, so just part 1 for now:

    def part1 [filename: string] {
      mut input = open $filename | lines |
        each { parse '{index}: {children}' | update children { split row " " } | first } |
        insert paths { null }
      print $"Data loaded, ($input | length) devices"
    
      $input = explore-path $input you
      $input | where index == you | get 0.paths
    }
    
    def explore-path [devices, start: string] {
      print $"Exploring ($start)"
      let dev = $devices | where index == $start | first
      if ($dev | get paths) != null {
        print "Already explored"
        return $devices
      }
    
      # Shadow with mutable version
      mut devices = $devices
      mut paths = 0
      let is_out = $dev | get children | where ($it == out) | is-not-empty
      if $is_out {
        print $"Found an out device: ($start)"
        $paths = 1
      } else {
        for child in ($dev | get children ) {
          $devices = explore-path $devices $child
          $paths += $devices | where index == $child | get 0.paths
        }
      }
    
      # Shadow with immutable... wtf
      let paths = $paths
      print $"Setting paths for ($start) to ($paths)"
      $devices = $devices | update paths { |row| if $row.index == $start {  
    $paths } else {} }
       $devices
    }