Please help contribute to the Reddit categorization project here

    Astrokiwi

    + friends - friends
    26,141 link karma
    322,641 comment karma
    send message redditor for

    [–] Is linear time sorting the most efficient sorting? Astrokiwi 1 points ago in algorithms

    I think you've made a graphing mistake. log(n) becomes flatter at higher n. nlogn becomes steeper at higher n - it gets steeper than linear and keeps on getting steeper. Quick graph: https://i.imgur.com/O7nfjuE.png

    [–] Is linear time sorting the most efficient sorting? Astrokiwi 2 points ago in algorithms

    If all the prefactors are equal, then nlogn becomes slower than n at about n=10, using base 10 logs. By "prefactor", I mean there's a difference between 10*n and 5*n that isn't included in big O notation.

    The mathematical idea behind big O notation is that we are looking at the limit of large n. This is why you can ignore all the prefactors and other terms, and just look at the scaling of the algorithm at large n.

    When we say "O(nlogn) is slower than O(n)", what we mean is that, even if you have a really efficient nlogn model with a low prefactor, there will always be an n big enough that the O(n) model will start to run faster.

    This is partially why we tend to use O(n2) sorting algorithms as the "base case" to sort small lists, and more advanced algorithms for larger lists. The prefactor and other terms start to matter more at low n, and you can't just trust the general trends you get from big O notation.

    [–] La grève de taxi sur l'autoroute Astrokiwi 1 points ago in Quebec

    Je pense cet utilisation de "tasser" à vouloir dire "ranger" (ou quelque chose comme ça) est Québécois aussi?

    [–] DC's films would thrive if set throughout the 1930s-80s Astrokiwi 1 points ago in fixingmovies

    I've had this thought about X-Men too. What I envisioned was something like This Is Us - a TV show set in multiple eras and jumping back and forth between them. Basically, you'd have the Silver Age, Bronze Age, and Modern Age getting revealed at the same time, but with the dates arranged so they make sense without using "comic book timing". So you'd have the Original Five having adventures in the 90s when Cyclops is like 15, then you have the Claremont era stuff with Wolverine & Storm having slightly darker adventures in the 2000s when Cyclops is like 25, and then you can have the later stuff with Jubilee, Cable etc in the 2010s when Cyclops is like 35. You could do lots of foreshadowing and red herrings and so on, and you can do the full arc of the different eras of X-Men without having to force people to sit through a show that changes feel so strongly between seasons. (And of course, because it's X-Men, there'll be some time-travel involved).

    [–] For those who self-taught themselves Python, how did you do it? Astrokiwi 1 points ago in learnpython

    Originally, as a kid in the 90s, I just wrote lots of games, using BASIC at first, then later Java, Javascript, Flash etc. That's what I would still recommend: write a text adventure, write a Sudoku puzzle with a gui, write your own take on Snake or Flappy Bird, etc.

    As an adult, I work as a researcher astrophysics, where we have to code up stuff for simulations and analysis, but we don't usually take many (if any) formal coding courses. For Python, the situation was "I have a bunch of data I'd like to plot up nicely, and numpy/matplotlib is far nicer than trying to use gnuplot or PGPLOT", so I taught myself Python as I went. However, I was getting paid to teach myself, so it's not entirely the same thing.

    [–] What type of cranks does your discipline attract? Astrokiwi 1 points ago in AskAcademia

    I posted this a few years ago.

    I think one of his ideas was that extremely high-energy gamma rays have the same mass as the rest mass of xenon or something, therefore the LHC is actually creating xenon?

    [–] What type of cranks does your discipline attract? Astrokiwi 1 points ago in AskAcademia

    oof yeah.

    If it helps, physicists don't really like Michio Kaku either.

    [–] What type of cranks does your discipline attract? Astrokiwi 1 points ago in AskAcademia

    And then they next argue that the dominance of atheism in modern academia is clear evidence that atheism is proof of intelligence.

    [–] This would have been epic if the sword had a nice enchantment Astrokiwi 14 points ago in skyrim

    Taking the sword makes you king of High Rock. You just don't notice because you never actually go to High Rock.

    [–] Does Anyone Else Have that "Aha!" Moment with a Game that didn't "Click" with them at First? Astrokiwi 1 points ago in truegaming

    Yeah, Halo isn't really as fun if you play it as a cover-based shooter. It's all about getting in close and punching the elites in the face. You're a super strong cyborg with shields, and the game is at its most fun when you play it like you're a super hero.

    [–] Does Anyone Else Have that "Aha!" Moment with a Game that didn't "Click" with them at First? Astrokiwi 1 points ago in truegaming

    Stellaris is still a bit flawed. They're constantly updating things to fix it up and make it more interesting, and it has vastly improved since the first release, but it's not quite there yet. The last update added a lot of stuff to make colony management more interesting, but unfortunately it means there's now a huge amount of micromanagement when you get a large empire. Combat is still pretty opaque, so it's not really clear what a good design for your ships or fleets should be without reading the wiki. Diplomacy is also pretty static - there's no constantly shifting alliances like in CK2.

    The first stage of exploration is quite fun though.

    [–] Strange Planet Parody Comic [OC] Astrokiwi 1 points ago in comics

    I mean, their username is Zach Morris so they might have a bit of a thing for the 90s

    [–] “In cinemas April five”. It should be “April the fifth” or “The fifth of April” Astrokiwi 17 points ago in britishproblems

    Americans say "April fifth" usually, while here people say "fifth of April". I lived in North America for like 9 years, they really don't say "April 5".

    [–] Have you ever had a dream which makes you sad after you wake up? Astrokiwi 1 points ago in AskMen

    I literally just had a dream where I was invited to speak on astronomy at a con, and I found myself in a room with all my favourite comic book artists, but I couldn't summon the courage to talk to any of them, and then I got lost in the building trying to catch up with them as they dispersed after the group photo. Tragic.

    [–] Why do black holes have such strong gravitational fields ? Astrokiwi 1 points ago in askscience

    There is no inherent limit. As long as there's material falling into it, it can grow in mass. Although black holes are so compact that it's not all that easy to get stuff into one - it's very easy to miss.

    [–] "Cancel an entire language because I cannot speak it" Astrokiwi 28 points ago in badlinguistics

    British English has 17 but they were banned in the US Constitution.

    [–] Creating a forest, and stimulating a forest fire in python. Astrokiwi 4 points ago in learnpython

    This is a common problem in designing numerical simulations! You want to update everything simultaneously and copy as little data as possible.

    The first thing you might think to do was to loop through everything once, check if each cell has a tree, and if so, check all the neighbours for fire, and then light the tree on fire if any neighbours are on fire. What you'd see if that happens is the fire immediately spreads across a quarter of the map!

    The problem is that you want to set things on fire based on their state at the start of the tick, but as you're looping through, some of the map is at it's "start" state, and some in its "done" state - it's inconsistent.

    There are a number of ways around this. You could create a copy of the whole array, and use that extra copy to check if you want to set stuff on fire in your original array. You could create another array that just marks what cells are set on fire this tick. Or you could make a list of coordinates of the cells that are getting set on fire. There are bunch of ways to attack it.

    The other thing is, as others say, it might be best to use objects & classes here, and to make your array an array of objects. Alternatively, you can use multiple parallel arrays of e.g. booleans - one for "is there a tree here?", one for "am I on fire?" etc.

    [–] Ouch oof my legs Astrokiwi 22 points ago in bonehurtingjuice

    I kinda get an End of Evangelion vibe from it somehow

    [–] What does "sleep on it funny" mean? Astrokiwi 6 points ago in EnglishLearning

    "wrong", but with a sense of "odd" or "weird" to it too.

    e.g. "my computer's running funny", "does it smell funny in here?", etc

    [–] Who is your hero? Astrokiwi 6 points ago in funny

    "That was awesome, let's do it again!" - those kids, probably

    [–] Temporarily moving to Quebec, no French Astrokiwi 24 points ago in French

    I'm an anglophone, originally from New Zealand, but after living in Halifax for a good chunk of time, I ended up working in Québec City for 3 years. So here's my take:

    You won't learn conversational French in a few months. You will have to rely on using a mixture of your own bad French and their bad English. Some people will have decent English, especially at a university, but outside of Montréal you can't count on it.

    If you really want to learn the language, you want to do it in person rather than trying to self-study. You want to actually practise the skills you'll be using. Sometimes in-person conversation can actually be easier than formal online resources though - you get to choose how complex your grammar and vocabulary is, and you co-speaker will typically adjust their speech based on your own level.

    So, I would recommend looking up what courses there are in your city. Alliance Française is a good resource in many cities, for group classes and tutoring. They often have intensive courses where you are immersed for ~2 weeks or so. But even a few hours a week of actually talking to a French speaker is better than days of just using Duolingo.

    If you want other things to help you out, you could look up the show Les Parent on Youtube. It's a Québecois sitcom where they use a lot of casual French with a Québec accent.

    The other thing is that if you're taking a course in English, you might not actually get that much of a chance to speak French anyway. Depending on your lifestyle, some people end up in a habit of going to class, and then just going home and watching Netflix in English. I worked on computers mostly, and my wife is anglophone, so there were days in Québec where my only French conversation was saying "Bonjour" to the bus driver and "Un café foncé, uh, noir s'il vous plaît" at Tim Horton's. If you're working hard in a course in English, meeting students who are taking an English-language course, and watching English-language media at home, you might end up in a little anglophone bubble anyway. It's good to try to learn French though anyway, but people do survive without it.