Threads for stsievert

    1. 4

      Why does this work?

      1. 13

        The graph is the colored directed graph with vertices 0, 1, 2, 3, 4, 5, 6 and the following rules

        • the white vertex is 0, all others are black
        • the black arrows connect k to (k+1)%7
        • the white arrows connect k to (10*k)%7

        So each vertex has two outgoing arrows, one black, one white.

        If you know the remainder of n modulo 7, this graph allows you to read off the remainders of n+1 and 10*n by following the black and white arrows emanating from the vertex n%7. An integer is divisible if and only if its remainder modulo 7 is 0.

        In the example given on the page, you calculate the remainder of 325 as follows:

        325 = ((3 *10 + 2) *10 + 5 = ((0+1+1+1) *10 +1+1) *10 +1+1+1+1+1.

        Start on the white vertex, follow three times a black arrow, then once a white arrow, twice a black arrow, once a white arrow then five times a black arrow and you land on vertex 3 = 325%7.

        1. 3

          What makes 7 special? Could I construct a similar graph for 5 or 11?

          1. 5

            There’s nothing special about 7 here. Except that it’s the first number for which all divisibility tests in base 10 are kinda tricky, so it’s neat that you can visualize one such test in a planar graph.

            You can define similar graphs G(b,m) for every base b>=2 and every modulus m>=1: the set of vertices is {0,...,m-1} and k is connected to (k+1)%m and (b*k)%m for each vertex k. Thus, the graph in the post is G(10,7).

            The author lists the planar graphs for small values of b and m in this comment.

    2. 3

      I use Gollum, which uses git for its database and it’s the same wiki GitHub uses.

      I use it, or used it. It supports Markdown editing, creation/editing in wiki, file upload (well, I’m 90%).

      1. 1

        Any particular reason for not using it anymore?

    3. 1

      Most readers will be familiar with -x = ~x + 1 = ~(x - 1).

      Ah. I thought that said “–x = –x+1” instead of “–x = ~x + 1”.

    4. 1

      So, Jeffery Tucker may indeed be the sort of zealot who can blithely reduce all human values to the relative pricing of goods and services. He may even be wrong. But this little rant does a lousy job of presenting a counter-argument. If there’s ever really any evidence that ISPs are conspiring to censor or manipulate traffic content, won’t we just see increased consumer VPN use? And if they’re not conspiring, wouldn’t competition work against any individual would-be ISP censor? What exactly do we suppose they stand to gain by doing that, anyway?

      If we want to get upset about censorship and manipulation, we should be talking about Facebook and Google, not Comcast and Verizon. In my world anyway, what sucks about the latter pair (both before and after 2015) is their shitty service, bandwidth caps, and too-high prices.

      I probably shouldn’t fan the flames… but here are a couple of counter-counter-argument pieces I find much more convincing, despite their tinge of economic absolutism:

      1. 5

        I agree that platform providers are more directly interfering with speech. (e.g., Google’s Content ID system interferes with fair use on YouTube.)

        However, we do have evidence of ISPs manipulating traffic in favor of their own preferred content and services, cf.

        From the perspective of the FCC, Net Neutrality is about classifying ISPs as common carriers. Currently, ISPs like Comcast provide a bundle of services and Title II prevents them from giving priority to, say, their own video-on-demand service over Netflix.

      2. 4

        And if they’re not conspiring, wouldn’t competition work against any individual would-be ISP censor?

        There is hardly competition. If you have two choices, consider yourself lucky because as of June 2015, only 24% had two broadband ISPs. As of June 2016, FCC reports showed three-quarters of the US still lacked high-speed broadband choice.

      3. 2

        we should be talking about Facebook and Google

        Huh, I never considered that angle. They do control the content we see in a much more obvious way.

        Also, this article tries to ignore the cost of providing the internet and make it on principle. An article with cold hard numbers (not airy ideals) is an interview with Ajit Pai at

        1. 3

          Those whose sensibilities are offended by “airy ideals” are welcome to dive down into the nitty gritty of why Ajit Pai is basically one of the most dishonest people there is in this “debate”.

          Here are a few links to support that statement:

        2. 2

          ignore the cost of providing the internet

          U-Haul charges you $n/day, which covers the cost of providing the truck. U-Haul doesn’t charge you more if you fill the truck with your massive MGM DVD collection than if you fill it with furniture. Once you pay for your 402 cubic feet, the capacity is yours to use as you please.

          ISPs charge you to access the internet, which covers their cost of providing the internet. ISPs charge Netflix to access the internet, which also covers their cost of providing the internet. Once you and Netflix pay for your GBs, the capacity should be yours to use as you please.

          However, the ISPs decided they wanted to charge Netflix for your wanting to access Netflix on the internet which you and Netflix had already paid for. Netflix didn’t want to, so ISPs blocked/throttled access to Netflix… until Netflix paid to stop the bleeding. Net Neutrality stops that bullshit.

    5. 5

      Exceptional. I’m a PhD student.

      1. 11

        Abhorrent. I’m a PhD student.

        1. 2

          When I was a mere undergrad writing my honors thesis, my work-life balance was without the slightest doubt abhorrent. Every waking moment, and many sleeping ones, were devoted to it. One imagines a doctoral dissertation to be even more extreme, though I suppose the increased scale and scope limits the maximum possible intensity.

          Of course, the upside to a thesis (as opposed to a job) is that it has an end date, and once I slept off the hangover from getting incredibly smashed after the submission deadline, I got to enjoy a month and a half of effective vacation before graduation.

          1. 1

            My point in stating my “exceptional” is that it is possible. I did work a few Saturdays on my thesis, but in comparison to the years it took, they were to rare to drop to “average”. It is possible to get a PhD working 9 to 5. If you are a PhD student under a culture of intense pressure, let me tell you that it does not have to be that way.

    6. 3

      A good character wise movement plugin is com-seek:

      It’s like f/F, but finds two characters, not one.

    7. 1

      having to physically grab the notebooks can be problematic

      The notebooks are also not searchable

      An iPad can address these limitations. I seem to remember notability doing handwriting recognition to text, and all notes could be in the cloud.

      1. 1

        I use a Surface and it’s fantastic. One of the killer features is that you can customize the swipes.

      2. 1

        That’s a good idea! However handwriting to text in my experience is always a bit buggy, and it doesn’t deal well with schemas. How was your experience with this?

    8. 4

      “In addition, Pytorch is quickly developing popularity amongst top AI researchers. Torch users, although nursing RSI injuries from writing Lua code to perform simple string operations, simply aren’t deserting in droves to Tensorflow – they are switching to Pytorch.”

      Needs citation.

      1. 4

        I don’t know anything about the second, but I can confirm that PyTorch is quickly developing popularity within the AI research community, especially in NLP.

        source: I work at an AI research institute

        1. 1

          I can also confirm. I’m a grad student studying ML and my group is switching to PyTorch. Plus, I’m recommending it to people I meet, something I didn’t do with Tensorflow.

      2. 1

        Here’s a citation. The CAT bytecode operation and table.concat are JIT compiled in LuaJIT 2.1, which is the version Torch uses by default.

        So, either these people are using a 2+ year old version of LuaJIT, or their code is bad.

    9. 3

      The points they outline are exactly why I want this technology.

      1. 4

        I think it’s because colors can encode other information. In this case, when I see these colors I know I’m at the prompt, which is useful to distguish from other text. Plus, the different colors in the prompt encode different things (current directory is color1, etc).

    10. 34

      The top reply by the developer at GitLab mentioned an interesting quote:

      If an intern can crash your company one their first day, your company has failed.

    11. 5

      If anything it should be performance. Optimization risks being conflated with its mathematical/compsci connotation.

      1. 4

        This also avoids making a judgment call on how to spell optimi[sz]ation.

        1. 1

          optimißation obvs

      2. 2

        I’m a grad student studying optimization… and I clicked on this link to see if it was related. I vote for ‘performance’

    12. 1

      If x is a global optimum for f, then grad(f, x)=0. I use this to test; it doesn’t require the implementation of f.

    13. 2

      The lack of an iOS client turned me away from Syncthing. I went with the (paid) Resilio Sync instead, formerly Bittorent Sync.

      1. 1

        I haven’t used Syncthing, but there is an iOS client nowadays:

    14. 1

      This almost fits my use case. I’m not so interested in interactive documents, but interactive widgets. A good example is

      This relies on ipywidgets-unsupported, but there’s interesting work with jupyter/ipywidgets. In the 6.1 release they’ll support the same thing as above with easy generation!

    15. 2

      I work in ML, and this case is common. But the other case (“after some time thinking and reformulating, this problem is simple”) is also common.

    16. 2

      166MB of memory … computers have 8GB of memory anyways

      Hell, the printer client I’ve installed for work has a memory leak and eats up 1.3GB of RAM. 166MB is modest.

    17. 1

      Some weirdness with the site certificate. The issue with linear separability and perceptrons is cool and I hadn’t known about it.

      1. 1

        yeah it’s hosted on github pages but using a custom domain

        1. 1

          So is my site but I don’t have any site certificate issues.

    18. 8

      Sorry this happened. As a US resident, I didn’t realize how crazy it can be entering or leaving the United States until I did so for the first time. The US was by far the hardest country to get into for me (even though I’m a citizen). It’s a shame that interactions with customs is such a mixed bag, and I worry that it is actually going to get worse for the time being.

      1. 3

        I cross the border every single day (not a citizen), and have only ever been brought in once. But I also don’t do anything that would be considered suspicious by anyone.?

        1. 11

          “I don’t mind <blank> because I have nothing to hide” is a slippery slope.

          1. 6

            I don’t think that @zzing is making that argument.

    19. 8

      I’m honestly really curious as to what the problem is here. It clearly escaped internal testing, but even more interestingly it’s nondeterministic! Laptops with terrible battery life are a dime a dozen, but how often do you get a device with bad battery life sometimes, but great the rest of the time? Not even “some units have bad battery life” or “the device has bad battery life when doing X”.

      The symptoms are bizarre enough that there’s got to be some interesting bug behind it all.

      1. 5

        I’m honestly really curious as to what the problem is here. It clearly escaped internal testing, but even more interestingly it’s nondeterministic!

        No, it didn’t escape internal testing, their testing methodology is simply crap.

      2. 1

        I think they said it only happens when using Safari, as they got better results with Chrome. That might be the culprit.

        1. 3

          John Gruber

          Once our official testing was done, we experimented by conducting the same battery tests using a Chrome browser, rather than Safari. For this exercise, we ran two trials on each of the laptops, and found battery life to be consistently high on all six runs. That’s not enough data for us to draw a conclusion, and in any case a test using Chrome wouldn’t affect our ratings, since we only use the default browser to calculate our scores for all laptops. But it’s something that a MacBook Pro owner might choose to try.

          This is crazy too. Whatever the benefits of Chrome are, everyone knows it’s an energy hog. There is no way that using Chrome should result in better (and more consistent) battery life than Safari.

          I would want to see more complete tests.