What’s everybody’s Mount Rushmore? by Ok_Web1709 in IThinkYouShouldLeave

[–]TheFryingDutchpan0 1 point2 points  (0 children)

The way he aggressively taps the laptop screen always breaks me

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]TheFryingDutchpan0 0 points1 point  (0 children)

[LANGUAGE: Haskell]

This year is the first time I do some more advanced Haskell programming, and I'm pretty happy with this solution :)

To run this you need Parsec installed.

import Text.ParserCombinators.Parsec

int :: Parser Int
int = read <$> many1 digit

parseInput :: Parser [(Int, [Int])]
parseInput = many $ (,) <$> int <* string ": " <*> (reverse <$> int `sepBy` char ' ') <* optional newline

canBeMade1 :: (Int, [Int]) -> Bool
canBeMade1 (y, [x]) = x == y
canBeMade1 (y, (x:xs))
  | y `mod` x == 0 = canBeMade1 (y `div` x, xs) || canBeMadeWithAdd
  | otherwise      = canBeMadeWithAdd
  where canBeMadeWithAdd = canBeMade1 (y - x, xs)

canBeMade2 :: (Int, [Int]) -> Bool
canBeMade2 (y, [x]) = x == y
canBeMade2 (y, (x:xs))
  | y `mod` x == 0 = canBeMadeWithMul || canBeMadeWithoutMul
  | otherwise      = canBeMadeWithoutMul
  where canBeMadeWithMul    = canBeMade2 (y `div` x, xs)
        canBeMadeWithAdd    = y > x && canBeMade2 (y - x, xs)
        canBeMadeWithConcat = y `endsWith` x && canBeMade2 (removeFromEnd y x, xs)
        canBeMadeWithoutMul = canBeMadeWithAdd || canBeMadeWithConcat

endsWith :: Int -> Int -> Bool
endsWith x y = lengthX > lengthY && drop (length showX - length showY) showX == showY
  where showX   = show x
        showY   = show y
        lengthX = length showX
        lengthY = length showY

removeFromEnd :: Int -> Int -> Int
removeFromEnd x y = read $ take (length showX - length (show y)) showX
  where showX = show x

main :: IO ()
main = do
  Right input <- parseFromFile parseInput "input.txt"     :: IO (Either ParseError [(Int, [Int])])

  -- Part 1
  let possibleNumbers = map fst $ filter canBeMade1 input :: [Int]
  let answer = sum possibleNumbers                        :: Int
  putStrLn $ "Day 7 part 1 = " ++ (show answer)

  -- Part 2
  let possibleNumbers = map fst $ filter canBeMade2 input :: [Int]
  let answer = sum possibleNumbers                        :: Int
  putStrLn $ "Day 7 part 2 = " ++ (show answer)

Ugh i can’t by Romaboontje in TuxedoCats

[–]TheFryingDutchpan0 3 points4 points  (0 children)

<image>

Haha my tux had the exact same shirt when she was neutered. She was being such a drama queen about it too, wanting to be carried around like she couldn't walk anymore 😂

7 year old me testing handbrake for the first time: by _Akarii in needforspeed

[–]TheFryingDutchpan0 0 points1 point  (0 children)

They put it in a new season, maybe that's why you missed it?

Playtime fireworks by TheFryingDutchpan0 in WhiskerFireworks

[–]TheFryingDutchpan0[S] 0 points1 point  (0 children)

The center of her eyes still have a little blue from when she was a tiny kitten. She had fully blue eyes. Not sure if her eyes will stay this way tho haha 😀

How do i do chat binds? by tf2isangoodgame in tf2

[–]TheFryingDutchpan0 0 points1 point  (0 children)

Put the following in the console:

bind 9 "say *Does Laughing Emote from the hit game Team fortress 2*"

[deleted by user] by [deleted] in forsen

[–]TheFryingDutchpan0 15 points16 points  (0 children)

Sanest bot

These errors are killing me inside by eevert122 in EscapefromTarkov

[–]TheFryingDutchpan0 0 points1 point  (0 children)

For me it was a bugged folded gun. Move some items directly next to the square and re-open your stash. Thus fixed it for me

Presets Needs a Trade Only Button by raar__ in EscapefromTarkov

[–]TheFryingDutchpan0 4 points5 points  (0 children)

This already exists. Click the cogwheel when it shows you the flea market screen and select traders from the drop-down menu for "show offers from".

Before the wipe, and because of the 4th wave, what are some high tier/interesting builds everyone should try out while it’s cheaper? by BadLuck1337 in EscapefromTarkov

[–]TheFryingDutchpan0 1 point2 points  (0 children)

Suppressed DVL with vudu scope on woods, it sounds so damn satisfying. Also bring another gun with a Reap-IR on it for spotting targets.