MeckiSpaghetti's recent activity

  1. Comment on Anyone interested in trying out Kagi? in ~tech

    MeckiSpaghetti
    (edited )
    Link
    This whole thread made me quite curious. I must admit that I would love to try Kagi, too. Is there any invite left that I could ask for? Thanks in advance

    This whole thread made me quite curious. I must admit that I would love to try Kagi, too. Is there any invite left that I could ask for?

    Thanks in advance

  2. Comment on I am worthless, I couldn't write a good article or draft to save my life in ~creative

    MeckiSpaghetti
    Link
    No offense intended, but are you sure you really want to write?

    No offense intended, but are you sure you really want to write?

    6 votes
  3. Comment on <deleted topic> in ~tech

    MeckiSpaghetti
    Link Parent
    There is a chance that the internal network adapter can be disabled in the BIOS.

    There is a chance that the internal network adapter can be disabled in the BIOS.

    18 votes
  4. Comment on Day 8: Treetop Tree House in ~comp

    MeckiSpaghetti
    Link
    Ruby Part 1 def is_visible?(x, y) tree = $map[y][x] up = (0...y).map{ |i| $map[i][x] } right = (x+1...$map.first.size).map{ |i| $map[y][i] } down = (y+1...$map.size).map{ |i| $map[i][x] } left =...

    Ruby

    Part 1
    def is_visible?(x, y)
      
      tree = $map[y][x]
      up    = (0...y).map{ |i| $map[i][x] }
      right = (x+1...$map.first.size).map{ |i| $map[y][i] }
      down  = (y+1...$map.size).map{ |i| $map[i][x] }
      left  = (0...x).map{ |i| $map[y][i] }
      
      up.all?{ |e| e < tree } ||
      right.all?{ |e| e < tree } ||
      down.all?{ |e| e < tree } ||
      left.all?{ |e| e < tree } ||
      x == 0 || y == 0 ||
      x == $map.first.size-1 ||
      y == $map.size-1
    end
    
    $map = File
          .read("input.txt")
          .split
          .map{ |x| x.chars.map(&:to_i) }
    
    p (0...$map.size*$map.first.size)
        .count { |i| is_visible?(i%$map.first.size, i/$map.size) }
    
    1 vote
  5. Comment on Day 6: Tuning Trouble in ~comp

    MeckiSpaghetti
    (edited )
    Link
    Ruby Part 1 i = File.read("input.txt") i.chars.each_cons(4) do |s| if s == s.uniq p i.index(s.join)+4 break end end Part 2 i = File.read("input.txt") i.chars.each_cons(14) do |s| if s == s.uniq p...

    Ruby

    Part 1
    i = File.read("input.txt")
    
    i.chars.each_cons(4) do |s|
      if s == s.uniq
        p i.index(s.join)+4
        break
      end
    end
    
    Part 2
    i = File.read("input.txt")
    
    i.chars.each_cons(14) do |s|
      if s == s.uniq
        p i.index(s.join)+14
        break
      end
    end
    
    3 votes
  6. Comment on Day 5: Supply Stacks in ~comp

    MeckiSpaghetti
    (edited )
    Link
    Ruby Part 1 require "active_support/all" s,i = File .read("input.txt") .split("\n\n") s = s .split("\n")[..-2] .reverse .map{ |r| (1..r.size).step(4).map{ |e| r[e] } } .transpose .map{ |r|...

    Ruby

    Part 1
    require "active_support/all"
    
    s,i = File
            .read("input.txt")
            .split("\n\n")
    s = s
            .split("\n")[..-2]
            .reverse
            .map{ |r| (1..r.size).step(4).map{ |e| r[e] } }
            .transpose
            .map{ |r| r.delete_if(&:blank?) }
    
    i = i.split("\n")
    
    i.each do |line|
      a, f, t = line.scan(/\d+/).map(&:to_i) 
      a.times { s[t-1] << s[f-1].pop }
    end
    
    p s.map(&:last).join
    
    Part 2
    require "active_support/all"
    
    s,i = File
            .read("input.txt")
            .split("\n\n")
    s = s
            .split("\n")[..-2]
            .reverse
            .map{ |r| (1..r.size).step(4).map{ |e| r[e] } }
            .transpose
            .map{ |r| r.delete_if(&:blank?) }
    
    i = i.split("\n")
    
    i.each do |line|
      a, f, t = line.scan(/\d+/).map(&:to_i) 
      s[t-1] << s[f-1].pop(a)
      s[t-1].flatten!
    end
    
    p s.map(&:last).join
    
    1 vote
  7. Comment on Day 4: Camp Cleanup in ~comp

    MeckiSpaghetti
    Link
    Ruby require "active_support/all" sum = File .read("input.txt") .split(/-|,|\s/) .map(&:to_i) .each_slice(4) p1 = sum.count{ |a, b, c, d| (a..b).cover?(c..d) || (c..d).cover?(a..b) } p2 =...
    Ruby
    require "active_support/all"
    
    sum = File
          .read("input.txt")
          .split(/-|,|\s/)
          .map(&:to_i)
          .each_slice(4)
          
    p1 = sum.count{ |a, b, c, d| (a..b).cover?(c..d) || (c..d).cover?(a..b) }
    p2 = sum.count{ |a, b, c, d| (a..b).overlaps?(c..d) }
    
    p p1 # Part 1
    p p2 # Part 2
    
    1 vote
  8. Comment on Day 3: Rucksack Reorganization in ~comp

    MeckiSpaghetti
    (edited )
    Link
    Ruby Part 1 sum = File .read("input.txt") .split("\n") .map{ |l| [l[...l.size/2], l[l.size/2..]] } .map{ |a, b| a.chars & b.chars } .flatten .map{ |a| (a.ord-38) % 58 } .sum p sum Part 2 sum =...

    Ruby

    Part 1
    sum = File
             .read("input.txt")
             .split("\n")
             .map{ |l| [l[...l.size/2], l[l.size/2..]] }
             .map{ |a, b| a.chars & b.chars }
             .flatten 
             .map{ |a| (a.ord-38) % 58 }
             .sum
             
    p sum 
    
    Part 2
    sum = File
             .read("input.txt")
             .split("\n")
             .each_slice(3)
             .map{ |a, b, c| a.chars & b.chars & c.chars }
             .flatten 
             .map{ |a| (a.ord-38) % 58 }
             .sum
             
    p sum 
    
    2 votes
  9. Comment on Day 2: Rock Paper Scissors in ~comp

    MeckiSpaghetti
    (edited )
    Link
    Ruby both parts OUTCOMES = { 'A X' => [4, 3], 'A Y' => [8, 4], 'A Z' => [3, 8], 'B X' => [1, 1], 'B Y' => [5, 5], 'B Z' => [9, 9], 'C X' => [7, 2], 'C Y' => [2, 6], 'C Z' => [6, 7] } rows = File...

    Ruby

    both parts
    OUTCOMES = {
      'A X' => [4, 3],
      'A Y' => [8, 4],
      'A Z' => [3, 8],
      'B X' => [1, 1],
      'B Y' => [5, 5],
      'B Z' => [9, 9],
      'C X' => [7, 2],
      'C Y' => [2, 6],
      'C Z' => [6, 7]
    }
    
    rows = File
         .read("input.txt")
         .split("\n")
         .map(&OUTCOMES)
         
    p rows.sum(&:first) # Part 1
    p rows.sum(&:last) # Part 2
    
    3 votes
  10. Comment on Day 1: Calorie Counting in ~comp

    MeckiSpaghetti
    (edited )
    Link
    solution in Ruby Both parts s = File .read("input.txt") .split("\n\n") .map{ _1.split.map(&:to_i).sum } .sort .reverse p s.first # Part #1 p s.take(3).sum # Part #2

    solution in Ruby

    Both parts
    s = File
         .read("input.txt")
         .split("\n\n")
         .map{ _1.split.map(&:to_i).sum }
         .sort
         .reverse
    
    p s.first # Part #1
    p s.take(3).sum # Part #2
    
    1 vote
  11. Comment on Help me decide what technology should I use for this project in ~comp

    MeckiSpaghetti
    Link Parent
    You can read the serial port with a web app?? 😃

    You can read the serial port with a web app?? 😃

  12. Comment on Rust Moderation Team resigns in ~comp

  13. Comment on AI robots take off, with Boston Dynamics. Beyond Atlas' Parkour. in ~science

    MeckiSpaghetti
    Link
    I'm both fascinated and scared by what will be possible in the near future.

    I'm both fascinated and scared by what will be possible in the near future.

    3 votes
  14. Comment on <deleted topic> in ~tech

    MeckiSpaghetti
    Link Parent
    Yeah! I think people would be so much nicer to each other if everything was spoken word 😊

    Yeah!

    I think people would be so much nicer to each other if everything was spoken word 😊

    1 vote
  15. Comment on Star Trek: Lower Decks S02E01 - "Strange Energies" in ~tv

    MeckiSpaghetti
    Link
    Seems to be geo-blocked, can’t access it from Europe.

    Seems to be geo-blocked, can’t access it from Europe.

  16. Comment on Has UML died without anyone noticing? in ~comp

  17. Comment on Twitter and anti-intellectualism in ~humanities

    MeckiSpaghetti
    Link Parent
    It’s easy to overlook that many people don’t participate in (online) discourses. I’m sure there is a nice word for this kind of "bias": you only read the opinions of the people who have the...

    It’s easy to overlook that many people don’t participate in (online) discourses. I’m sure there is a nice word for this kind of "bias": you only read the opinions of the people who have the courage and ability to express themselves. It’s possible that the "mood" you perceive by reading the posts is not mirroring a real average, since you don’t see the lurkers and their honest thoughts 😅

    6 votes
  18. Comment on <deleted topic> in ~tech

    MeckiSpaghetti
    Link Parent
    Okay, the page does some lazy loading, had to scroll down and wait to "extend" the content a few times before being able to search for the word "hours". In case anyone is interested: We believe...

    Okay, the page does some lazy loading, had to scroll down and wait to "extend" the content a few times before being able to search for the word "hours". In case anyone is interested:

    We believe that battery life is the closest thing to a true Achilles' heel for the Framework laptop. In PCMark 10 Modern Office battery testing—which includes a mix of office applications, streaming video chat, and desktop idle workloads—the Framework doesn't quite hit nine hours of runtime, despite its solid 55Wh battery capacity.

    It could be worse!

    3 votes
  19. Comment on <deleted topic> in ~tech

    MeckiSpaghetti
    Link Parent
    I wish there were more details regarding battery life in the review.

    I wish there were more details regarding battery life in the review.

    2 votes
  20. Comment on <deleted topic> in ~tech

    MeckiSpaghetti
    (edited )
    Link
    Am I seeing this correctly that the air vents are at the bottom side of the device? Does anyone know if it’s used to suck in surrounding air or to blow the heat out? It seems like a questionable...

    Am I seeing this correctly that the air vents are at the bottom side of the device? Does anyone know if it’s used to suck in surrounding air or to blow the heat out?

    It seems like a questionable design choice to me, especially when having the notebook on a blanket or on a lap with clothes that might cover the vents.

    It reminds me of old Apple MacBook models which had the same problem …

    1 vote