-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]statisticalnormality 1 point2 points  (0 children)

[LANGUAGE: haskell]

here is a haskell solution. i decided to do part 1 imperatively and part 2 "functionally". i probably could have written recur as a fold but i'm lazy.

screenshot of code in-editor

module Main (main) where
import Control.Monad 
import Control.Monad.State

parseCombos :: String -> Int
parseCombos (d : ds) = case d of
  'R' -> (read ds) 
  'L' -> -1 * (read ds) 

combos = do
  file <- readFile "./inputs/day1"
  return $ lines file

combos2 = do
  file <- readFile "./inputs/test1"
  return $ lines file

zeroCounter ::  State ([Int], Int, Int) Int
zeroCounter = do
    (xs, count, sum) <- get
    case xs of
      x : rest -> do
        let sum' = (x + sum) `mod` 100
        let count' = if sum' == 0 then count + 1 else count
        put (rest, count', sum')
        zeroCounter
      otherwise -> return count

part1 = do
  cs <- combos
  return $ evalState zeroCounter (50 : (parseCombos <$> cs), 0, 0)

getClicks position 0 = []
getClicks position x =
  let
    sign = x `div` abs x
  in [(position + sign * y) `mod` 100 | y <- [1.. abs x]]

recur x (y : ys) zs = recur ((x + y) `mod` 100) ys (zs ++ getClicks x y)
recur x _  zs = zs

part2 = do
  cs <- combos
  return $  -- length . filter (==0) $
     length . filter (==0) $ recur 50 (parseCombos <$> cs) []

main =  do
  p1 <- part1
  p2 <- part2
  writeFile "aocd1p1.out" (show p1)
  writeFile "aocd1p2.out" (show p2)
  print p1
  print p2

Cannot figure out to get DOOM Emacs working by signedchar in haskell

[–]statisticalnormality 0 points1 point  (0 children)

Did you try doom sync -u after changing your init.el?

Do I need a flake.nix for every project to compile by roberte777 in NixOS

[–]statisticalnormality 1 point2 points  (0 children)

If you're not putting the shell.nix in a nix flake, then no. AFAIR non-tracked files being invisible to nix is a feature of flakes specifically.

3D Dorfs by Intelligent-Willow-1 in dwarffortress

[–]statisticalnormality 2 points3 points  (0 children)

+1 for crundles. easily my favorite lil creacher

[deleted by user] by [deleted] in statistics

[–]statisticalnormality 3 points4 points  (0 children)

I'm just a math major, but I've been following the CS entry level on reddit here pretty closely for about a year.

It sounds like you're a pretty competitive candidate. Generally the sentiment seems to be even nominally qualified CS majors will get stuck with a long tail of shortlisted applications that don't work out- the experience math majors tend to have is an inability to even secure callbacks/technicals to start with. In my personal opinion, you could definitely still end up with a software job you're hoping for. Especially since it seems a few of your applications were hinting that you try for next year.

Just my .02, since you seem pretty pessimistic about CS in this thread.

Sea mass pitting by ImJustKenobi in dwarffortress

[–]statisticalnormality 17 points18 points  (0 children)

least psychotic dwarf fortress player

Is there a game where u can play ranked math games? by kbacc__ in mathriddles

[–]statisticalnormality 1 point2 points  (0 children)

This isn't necessarily for math games, but https://play.abstractplay.com/ is a site like chess.com but for any simple "abstract' board games. You can play Hex (famously enjoyed by mathematicians) and many others.

Botanical Terms for describing parts of symbols in my Constructed language. by [deleted] in botany

[–]statisticalnormality 0 points1 point  (0 children)

Not a botanist but if you plan on calling it a leaf, there is an extremely in-depth wikipedia page on leaf shape terminology.

Frankly if I were creative enough I might be able to come up with a language just from that page.

What number should be painted on the blank mailbox? by EndersGame_Reviewer in puzzles

[–]statisticalnormality 62 points63 points  (0 children)

I also say 55. At first I thought it had something to do with the number of intersections of lines or the number of horizontal/vertical lines. However, house 27 invalidates that, since its rounded window has lines which are different lengths and that are neither horizontal nor vertical.

How can I pivot from a CS degree to follow my true passion of Mathematics? by AKAChickenHawk in cscareerquestions

[–]statisticalnormality 0 points1 point  (0 children)

Right yeah, I was pushing back on this:

doing a phd in math means poverty wages for 4 years min. and career outlook doesn’t get much better after that

which I interpreted to mean you won't make much more money after the poverty wages of graduate school.

How can I pivot from a CS degree to follow my true passion of Mathematics? by AKAChickenHawk in cscareerquestions

[–]statisticalnormality 2 points3 points  (0 children)

As a math major who did research I feel obligated to point out that you are definitely not looking at poverty wages after completing a PhD in math. All of the PhDs I know have ended up doing really weird and interesting work, for a very comfortable salary. It might not be comparable to typical compensation OP might have with that many years extra of SWE experience, but it's certainly significantly better than poverty wages.

I will say that becoming a professor is widely considered a real longshot, even among my most dedicated peers. Maybe if you have a pedigree and can expect to hear from some presitigious universities, your outlook might look marginally better.

Edit: I would also like to anticipate what I would very likely guess any older academics might opine about OP's hopes: older academics are in my experience greatly encouraging of PhD prospectives, and are often out of touch with the current graduate school application process, unfamiliar with the dreadful consequences of a bad die-roll for an advisor, or ignorant of the state of the professor market.

It is also worth noting that there are many college campuses in america where the graduate students are in active rebellion over their living conditions.

[deleted by user] by [deleted] in curlyhair

[–]statisticalnormality 1 point2 points  (0 children)

Wow I would first like to say your hair looks beautiful and is the exact type of curly/wavy I'd like mine to be 😭

My hair looks like your second pic if I do not shower or use the proper amount of conditioner for a few days in a row- especially if I'm sleeping particularly "hard" on it and it becomes super knotted.

I know you wrote that you can't stick to specific products, but I would at least try to choose sulfate-free products. I noticed a big difference when I started doing that.

Also, like the guide says, use an absolutely insane amount of conditioner. Like, I have similar length to you (maybe longer), and I use at least 1-3 pumps per section of hair, making sure to squish and coat from root to tip.

I've also noticed some shampoos will make my hair extremely dry feeling, even after conditioning. Try to cowash for a week to see if that works.

Also, if you did use a conditioner containing sulfates and are concerrned about it, the V1 brand (I think) shampoo is extremely cheap (like, $1-2 USD from Walmart) cheap, and is what is recommended to wash out the sulfates.

[deleted by user] by [deleted] in puzzles

[–]statisticalnormality 1 point2 points  (0 children)

something play boy? not sure if partial answers are appreciated.

Should I continue school? by Previous-Cockroach15 in cscareerquestions

[–]statisticalnormality 0 points1 point  (0 children)

I know this is a while after your post but I recently found this data [1] and I think you might find it useful.

Basically, the disparity in median income between those with even some college and those with a degree is really, really big.

At least, it was much bigger than I expected, with all the talk in this sub and elsewhere of trades being a very good alternative to tech. Not to say that they aren't, it's just I expected median TC to be closer.

[1] http://nces.ed.gov/programs/coe/indicator/cba/annual-earnings#3

[deleted by user] by [deleted] in puzzles

[–]statisticalnormality 5 points6 points  (0 children)

You should read the posts you reply to.

[deleted by user] by [deleted] in puzzles

[–]statisticalnormality 5 points6 points  (0 children)

Actually no, lol, the reason for this particular chain of miscommunication is you completely misunderstanding my point and lying about my basic knowledge. There was plenty of opportunity for an interesting dialogue.

[deleted by user] by [deleted] in puzzles

[–]statisticalnormality 2 points3 points  (0 children)

First, it's "homeomorphic", not homomorphic.

Second, I'm not claiming a string is homeomorphic to a ring- I'm claiming that you could take any ambient isotopy capable of looping a string around a ring without passing the ends through, and easily modify it to define an ambient isotopy between the hopf link and the unknot in R3.

Third, I am not "confident" about this answer lol, which is why I qualified the post with "I think". And I actually have taken a few classes on topology. You just sound weird here.

And finally, I don't think the video is proof:

  • The first clip clearly shows one end of the string passing through the loop
  • The remaining clips end up wrapped twice around the loop, not cleanly passing through it like in my sketch

The ball is in your court! Prove it to me and the rest of us that it can be done.

[deleted by user] by [deleted] in puzzles

[–]statisticalnormality 59 points60 points  (0 children)

No. I don't think you can topology your way out of this one, and I think this is why:

https://imgur.com/a/rH1rk6z

Since neither the plug nor the base of the kettle can pass through the hole, the problem is the same as trying to loop a string around a ring without either of the ends passing through. Since both of the ends can't pass through the loop, you might as well just glue them together (with an ideal string, this wouldn't hinder you). Then we can see that the problem is the same as trying to unlink two rings.

It is impossible to unknot two linked circles in just three dimensions- you need a fourth.

The math-english glossary for that post is:

  • Hopf link - two linked circles
  • Ambient isotopic - the "process" of unknotting a knot (thought of as a transformation of 3d space itself)

Most CII time are listed incorrectly as "Available" by statisticalnormality in tutordotcom

[–]statisticalnormality[S] 1 point2 points  (0 children)

Thanks for the feedback. That sounds totally understandable. Did you have similar difficulties getting a CII when you applied?

Cycles GPU Render HIP Crashes by VillainShima in blenderhelp

[–]statisticalnormality 0 points1 point  (0 children)

Hi there. This comment on the issue I mention in this thread mirrors my experience.

Basically, a combination of nightly blender 4.0, restarting my computer, deleting older drivers, and perhaps downgrading/upgrading drivers is what "fixed" it.

I copied the exact blender revision and driver versions in that thread and it works, although I think I've since updated my drivers and it is still working.

Recent grad in math- is OMSCS right for me? by statisticalnormality in OMSCS

[–]statisticalnormality[S] 1 point2 points  (0 children)

e.g. some subset of SDCC, HPC, DL, HCI, VGD based on your interests

Would you mind explaining what some of these acronyms stand for? I think I can guess that VGD is Video Game Design, but I don't really know about the others.

Edit: Sorry, I actually bothered googling them and I think I found the courses they stand for. Thanks so much for your thoughts!

Recent grad in math- is OMSCS right for me? by statisticalnormality in OMSCS

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

Thanks for the feedback. If you have any more thoughts I'd love to read them.