MeckiSpaghetti's recent activity
-
Comment on Anyone interested in trying out Kagi? in ~tech
-
Comment on I am worthless, I couldn't write a good article or draft to save my life in ~creative
MeckiSpaghetti No offense intended, but are you sure you really want to write?No offense intended, but are you sure you really want to write?
-
Comment on <deleted topic> in ~tech
MeckiSpaghetti 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.
-
Comment on Day 8: Treetop Tree House in ~comp
MeckiSpaghetti 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) }
-
Comment on Day 6: Tuning Trouble in ~comp
MeckiSpaghetti (edited )LinkRuby 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
-
Comment on Day 5: Supply Stacks in ~comp
MeckiSpaghetti (edited )LinkRuby 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
-
Comment on Day 4: Camp Cleanup in ~comp
MeckiSpaghetti 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
-
Comment on Day 3: Rucksack Reorganization in ~comp
MeckiSpaghetti (edited )LinkRuby 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
-
Comment on Day 2: Rock Paper Scissors in ~comp
MeckiSpaghetti (edited )LinkRuby 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
-
Comment on Day 1: Calorie Counting in ~comp
MeckiSpaghetti (edited )Linksolution 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 #2solution 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
-
Comment on Help me decide what technology should I use for this project in ~comp
MeckiSpaghetti You can read the serial port with a web app?? 😃You can read the serial port with a web app?? 😃
-
Comment on Rust Moderation Team resigns in ~comp
MeckiSpaghetti Why is that?Why is that?
-
Comment on AI robots take off, with Boston Dynamics. Beyond Atlas' Parkour. in ~science
MeckiSpaghetti 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.
-
Comment on <deleted topic> in ~tech
MeckiSpaghetti 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 😊
-
Comment on Star Trek: Lower Decks S02E01 - "Strange Energies" in ~tv
MeckiSpaghetti Seems to be geo-blocked, can’t access it from Europe.Seems to be geo-blocked, can’t access it from Europe.
-
Comment on Has UML died without anyone noticing? in ~comp
MeckiSpaghetti Thank you!!Thank you!!
-
Comment on Twitter and anti-intellectualism in ~humanities
MeckiSpaghetti 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 😅
-
Comment on <deleted topic> in ~tech
MeckiSpaghetti 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!
-
Comment on <deleted topic> in ~tech
MeckiSpaghetti I wish there were more details regarding battery life in the review.I wish there were more details regarding battery life in the review.
-
Comment on <deleted topic> in ~tech
MeckiSpaghetti (edited )LinkAm 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 …
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