andre's recent activity

  1. Comment on Short (< 1 hour) 2-player games to play during lunch in ~games.tabletop

  2. Comment on Yeti just released their own re-branded Butter Pat 12" cast iron skillet priced at $400 in ~food

    andre
    Link Parent
    Yeah, I think the most common method is with a handheld orbital sander with 60-80 grit. I've never personally done it though, so I'd do some Googling first.

    Yeah, I think the most common method is with a handheld orbital sander with 60-80 grit. I've never personally done it though, so I'd do some Googling first.

    3 votes
  3. Comment on Yeti just released their own re-branded Butter Pat 12" cast iron skillet priced at $400 in ~food

    andre
    Link Parent
    Modern Lodge pans are cast in sand molds, which leaves a rough texture on the inside. Antique cast iron (and higher end cast iron) is machined down to a smooth surface, which makes it easier to...

    Modern Lodge pans are cast in sand molds, which leaves a rough texture on the inside. Antique cast iron (and higher end cast iron) is machined down to a smooth surface, which makes it easier to season and ultimately results in a more non-stick surface.

    3 votes
  4. Comment on Any cocktail enthusiasts/mixologists here? Feel free to share or workshop some good cocktail recipes! in ~food

    andre
    Link
    In our current times, AKA the Great Chartreuse Shortage of 2023, I've been making cocktails with other amaros. This is probably the one I end up making the most. It's a tweak on a Midnight Stinger...

    In our current times, AKA the Great Chartreuse Shortage of 2023, I've been making cocktails with other amaros. This is probably the one I end up making the most. It's a tweak on a Midnight Stinger that splits the Fernet with Benedictine.

    1oz Bourbon
    .5oz Fernet
    .5oz Benedictine
    .5oz Simple Syrup
    .75oz Lemon Juice
    A couple of drops of saline solution

    Shake, serve up with a Luxardo cherry.

    2 votes
  5. Comment on Volvo’s next EV is here, and it’s affordable—the $34,950 EX30 in ~transport

    andre
    Link Parent
    I really wish this vehicle had buttons.

    I really wish this vehicle had buttons.

    4 votes
  6. Comment on What do you all think about HBO's The Last of Us show? - S1E1 Discussion in ~tv

    andre
    Link Parent
    Oh rad! Thanks for letting me know.

    Oh rad! Thanks for letting me know.

    1 vote
  7. Comment on What do you all think about HBO's The Last of Us show? - S1E1 Discussion in ~tv

    andre
    Link Parent
    Definitely. I play a lot of PC games, but have less than zero interest in consoles, for many reasons. I've heard nothing but good things about the game, and I'm happy there's a TV adaptation as...

    Definitely. I play a lot of PC games, but have less than zero interest in consoles, for many reasons. I've heard nothing but good things about the game, and I'm happy there's a TV adaptation as I'd otherwise never experience it.

    1 vote
  8. Comment on Max Verstappen bests Lewis Hamilton to claim first career world F1 championship in ~sports.motorsports

    andre
    Link
    Lewis deserved the race win, Max deserved WDC.

    Lewis deserved the race win, Max deserved WDC.

    3 votes
  9. Comment on Al Jazeera to launch rightwing media platform targeting US conservatives in ~news

    andre
    Link
    I thought this was an Onion article at first, but sure enough... I can't see it taking off though - as soon as a righty realizes Rightly is owned by Al Jazeera, their hate of brown people will...

    I thought this was an Onion article at first, but sure enough... I can't see it taking off though - as soon as a righty realizes Rightly is owned by Al Jazeera, their hate of brown people will make them change the channel.

    7 votes
  10. Comment on Need a laptop for school, budget $2000, details inside in ~tech

    andre
    Link Parent
    As a counterpoint, when going to UT for computer science in the 2000s, I'd estimate a full 65% of students and 90% of faculty had MacBooks. (As a side note, despite tempest's resistance to Macs,...

    As a counterpoint, when going to UT for computer science in the 2000s, I'd estimate a full 65% of students and 90% of faculty had MacBooks.

    (As a side note, despite tempest's resistance to Macs, I'm going to join stu2b50 and recommend an M1 Air - I can't imagine picking that and ending up disappointed)

    9 votes
  11. Comment on US President Donald Trump revokes rule preventing White House staff from lobbying in ~news

    andre
    Link Parent
    That would require politicians to put the prosperity of the country above their donors.

    That would require politicians to put the prosperity of the country above their donors.

    1 vote
  12. Comment on Are software engineers "engineers"? in ~comp

    andre
    Link Parent
    I have a Bachelor of Arts in Computer Science from UT Austin - it actually used to be in both schools, with some of the non-CS elective classes being the differentiating factor.

    I have a Bachelor of Arts in Computer Science from UT Austin - it actually used to be in both schools, with some of the non-CS elective classes being the differentiating factor.

    1 vote
  13. Comment on The scary power of the companies that finally shut Trump up in ~tech

    andre
    Link Parent
    I agree: they're taking action based on a high level, long-term business strategy. Unless I misunderstood this entire thread, skybrian was arguing that we should give Twitter/Facebook the benefit...

    I agree: they're taking action based on a high level, long-term business strategy.

    Unless I misunderstood this entire thread, skybrian was arguing that we should give Twitter/Facebook the benefit of the doubt that they acted for the benefit of society instead of on a business calculus (which, ultimately, is a decision of what will create the most profit), which struck me as naive.

    8 votes
  14. Comment on The scary power of the companies that finally shut Trump up in ~tech

    andre
    Link Parent
    If you don't think that Twitter and Facebook have spent substantial resources over the last four years attempting to asses the financial risk/reward of (de)platforming Trump, I don't think our...

    If you don't think that Twitter and Facebook have spent substantial resources over the last four years attempting to asses the financial risk/reward of (de)platforming Trump, I don't think our dialogue will be productive.

    He wasn't banned because Dorsey and Zuck suddenly grew consciences - these are corporations beholden to their stockholders and governmental regulations, and the calculus shifted such that banning him was the right business move.

    My default thought pattern is that all of these people are greedy assholes, and whereas you need evidence that the decision was based on finances, I need evidence that it wasn't. Neither of us has this, so it's speculation all around.

    11 votes
  15. Comment on The scary power of the companies that finally shut Trump up in ~tech

    andre
    Link Parent
    I agree that it's good to be cautious, but let's not be naive either.

    I agree that it's good to be cautious, but let's not be naive either.

    7 votes
  16. Comment on Donald Trump response to yesterday violent roitious insurrection at the Capitol in ~news

    andre
    Link Parent
    I liked Sam Harris' take on Twitter:

    I liked Sam Harris' take on Twitter:

    This Boston Dynamics Trump robot is amazing.

    8 votes
  17. Comment on Day 8: Handheld Halting in ~comp

    andre
    Link Parent
    I didn't need to add anything special for part 2 - if you were stopping execution when you saw an instruction twice (from part 1), you shouldn't have hit any infinite loops. I actually thought the...

    I didn't need to add anything special for part 2 - if you were stopping execution when you saw an instruction twice (from part 1), you shouldn't have hit any infinite loops. I actually thought the problem was well structured to have you implement that part first.

    5 votes
  18. Comment on Day 8: Handheld Halting in ~comp

    andre
    Link
    JavaScript Parts 1 + 2 function parseInput(input) { let lines = input.split('\n').map(l => { const [, instr, param] = l.match(/(.*) (.*)/) return { instr, param: Number(param) } }) return lines }...

    JavaScript

    Parts 1 + 2
    function parseInput(input) {
      let lines = input.split('\n').map(l => {
        const [, instr, param] = l.match(/(.*) (.*)/)
        return { instr, param: Number(param) }
      })
    
      return lines
    }
    
    function run(prog) {
      let ptr = 0
      let acc = 0
      let seen = []
    
      while (true) {
        if (!prog[ptr]) return { halts: true, acc }
        if (seen[ptr]) return { halts: false, acc }
    
        const { instr, param } = prog[ptr]
        seen[ptr] = true
    
        if (instr === 'jmp') {
          ptr += param
        }
    
        if (instr === 'acc') {
          acc += param
          ptr++
        }
    
        if (instr === 'nop') {
          ptr++
        }
      }
    }
    
    export function solvePart1(input) {
      let prog = parseInput(input)
      return run(prog).acc
    }
    
    export function solvePart2(input) {
      let prog = parseInput(input)
    
      for (let i = 0; i < prog.length; i++) {
        let { instr, param } = prog[i]
    
        if (instr.match(/(nop|jmp)/)) {
          const progCopy = [...prog]
          progCopy[i] = {
            instr: instr === 'nop' ? 'jmp' : 'nop',
            param,
          }
    
          const result = run(progCopy)
          if (result.halts) return result.acc
        }
      }
    }
    
    2 votes
  19. Comment on Day 7: Handy Haversacks in ~comp

    andre
    Link
    I was really unhappy with my original solution, so this is a refactored solution after thinking about it more clearly and taking some inspiration from Sophie Alpert. JS Parts 1+2 function...

    I was really unhappy with my original solution, so this is a refactored solution after thinking about it more clearly and taking some inspiration from Sophie Alpert.

    JS

    Parts 1+2
    function parseInput(input) {
      const contains = {}
      const containedIn = {}
    
      input.split('\n').forEach(line => {
        let [, color, children] = line.match(/(.*) bags contain (.*)/)
    
        contains[color] = []
        for (let [, num, type] of children.matchAll(/(\d+) (.+?) bags?[,.]/g)) {
          contains[color].push({ num: Number(num), type })
          ;(containedIn[type] || (containedIn[type] = [])).push(color)
        }
      })
    
      return { contains, containedIn }
    }
    
    export function solvePart1(input) {
      let { containedIn } = parseInput(input)
    
      function containers(color, set = new Set()) {
        containedIn[color]?.forEach(c => {
          set.add(c)
          containers(c, set)
        })
        return set
      }
    
      return containers('shiny gold').size
    }
    
    export function solvePart2(input) {
      let { contains } = parseInput(input)
    
      function sumBags(root) {
        return 1 + _.sum(contains[root].map(c => c.num * sumBags(c.type)))
      }
    
      return sumBags('shiny gold') - 1
    }
    
    3 votes
  20. Comment on Day 5: Binary Boarding in ~comp

    andre
    Link
    JavaScript My initial implementation was a typical binary search and then straightforward id calculation. After reading some of the answers here and realizing it's just a binary number, here's a...

    JavaScript

    My initial implementation was a typical binary search and then straightforward id calculation. After reading some of the answers here and realizing it's just a binary number, here's a more interesting solution:

    Parts 1 + 2
    export function solvePart1(input) {
      input = input.split('\n')
      return _.max(
        input.map(seat => {
          return parseInt(seat.replace(/(F|L)/g, 0).replace(/(B|R)/g, 1), 2)
        }),
      )
    }
    
    export function solvePart2(input) {
      input = input.split('\n')
    
      const ids = input
        .map(seat => {
          return parseInt(seat.replace(/(F|L)/g, 0).replace(/(B|R)/g, 1), 2)
        })
        .sort((a, b) => a - b) // Array.sort() is lexicographical in JS, lol
    
      for (let i = 0; i < ids.length; i++) {
        if (ids[i] !== ids[0] + i) {
          return ids[0] + i
        }
      }
    }
    
    1 vote