HNHacker News
TopNewBestAskShowJobs

anon946

233 karma · joined March 14, 2016

submissionscomments
anon946··on How the CPython compiler works
For more than a few cases in the switch:

If the case values are dense (such as just the integers from 0 to 9), the compiler will turn it into a jump table.

https://godbolt.org/z/1Khahr

If too sparse for jump table, then typically will be turned into a binary search tree.

anon946··on College students argue distance learning should cost less as schools charge more
I teach synchronously online, and the workload is pretty much the same. I think distance/online learning covers a wide variety, and I can see how it could be taught in a way that reduced the workload.

I don't disagree, though, that online education is not as good as in-person, regardless of how it's done.

anon946··on Remove first 300M lines from 700 GB file on 1TB disk
If you print the offset after a write has safely completed, then it should still work. The internal copy is idempotent, up to the number of bytes in the first 300M lines. In other words, assuming reasonable line lengths, you can safely re-do a copy operation. So if you crash, you may not have printed out the last offset, but you have recorded a recent offset. You can then just restart from that recent offset.
anon946··on Intermittent fasting works – not only for weight loss but also for heart health
For me, I don't need to exercise restraint during those 8 hours. I sate myself. It's still an overall caloric reduction, for me at least.
anon946··on I/O library 6x faster than fmt, 10x faster than stdio.h and iostream
If much of your I/O is FP, however, that will still be a significant bottleneck. FP <-> ASCII is inherently slow.
anon946··on Review of New Apple and Google Contact Tracing Protocol
In my review of the API, it seems that that information cannot be retrieved.
anon946··on Review of New Apple and Google Contact Tracing Protocol
I mean when the exposure occurred. I reviewed the API, and it seems that it only gives the date. So, if we want to try to manually vet false positives, such as through drywall, etc., it may be harder.
anon946··on Review of New Apple and Google Contact Tracing Protocol
One possible deficiency is that the time of the possible exposure is not revealed, which may make it hard for manual vetting. Only the date is revealed.

Regardless, the fact that no location is revealed will make it hard for manual resolution of false positives. On the other hand, if location was revealed, likely fewer people would opt-in, so there are both advantages and disadvantages of not using location at all.

anon946··on Review of New Apple and Google Contact Tracing Protocol
The code generation code is not on the phone. It's on the server, which is controlled by the public health authorities.
anon946··on Review of New Apple and Google Contact Tracing Protocol
One way is one-time PIN number, valid for 30 seconds. Provided by a public health authority.
anon946··on Apple, Google ban location tracking in apps using their contact-tracing system
I assume that the use model is as a way to help human contact tracing, not to replace. Admittedly, the benefit is less then, but maybe it's still worth it?
anon946··on Risky hack could double access to ventilators
Something that occurred to me was a "hot closet" of some kind that was held at a temperature high enough to accelerate deactivation of the virus without damaging the masks. Perhaps around 130 F would be the right temperature.

Advantage would be that it would not require liquids of any kind and not be labor intensive.

anon946··on Toshiba device tests cancer types from a drop of blood
Reliable quantitative tests, what Theranos was promising, are significantly more difficult than screening/classification tests.
anon946··on Tetrachromats: people who see colors invisible to most of us (2014)
Hm...with a single screen, probably not. With two screens with different output curves for each of R, G, and B; it may be possible to display a color that looks the same across the screens trichromats, but different to tetrachromats.
anon946··on Tetrachromats: people who see colors invisible to most of us (2014)
Depends on what you mean by more "color detail". Assuming that the activation curve of the 4th cone is sufficiently different, it's definitely possible to create two different spectra that a trichromat would be unable to distinguish between (regardless of how close they were or how long they stared at it) that a tetrachromat could easily distinguish between.
anon946··on Three of the Hundred Falsehoods CS Students Believe
I'm not sure what the original author meant, but main could have no arguments. Or, in freestanding context, may not even have a main.
anon946··on Berlin Brandenburg: The airport with half a million faults
Wouldn't the design have been carefully reviewed by the airport company before approval?
anon946··on WTF Is Big O Notation?
Well, it's "wrong", but there's the saying that all models are wrong, but some are useful. If time complexity analysis had to include physical distance, then it would perhaps be less wrong, but also much less useful.

That said, "time complexity" is a bit of a misnomer anyway. It's often implied, but underneath, there is a specific operation. For example, when we say that merge sort is O(N lg N), we mean in number of comparison operations.

anon946··on WTF Is Big O Notation?
Yes, but my point is that, as written, there is no dependency on N. Thus, O(1).
anon946··on WTF Is Big O Notation?
Well, as written, it is 'O(1)'. Or did you mean to put N instead of 1000?
anon946··on WTF Is Big O Notation?
Not only is 'O(n)' the same as 'O(n) + x', but also the same as 'c*O(n)', where c is a constant.
anon946··on ‘A toxic culture of overwork’: The graduate student mental health crisis
I assume that you are mainly discussing undergrad education. In that case, the way to pressure universities to be accountable is by not going to such universities, as you imply in your first paragraph: "Their goal is to get the university more money and more students". So don't go to such universities. They will lose students. Losing undergrad students won't directly impact research funding, but it will have an impact at any public university.
anon946··on Best Deep Learning Books
Intuitive descriptions using words have a place, and I do wish there were more of that. However, if you favor words over math notation, at some point you still have to call it something. What would you call it?
anon946··on Physics Nobel won by laser wizardry – laureates include first woman in 55 years
Agreed.
anon946··on Physics Nobel won by laser wizardry – laureates include first woman in 55 years
Not in my department, but I have no idea how representative it is.
anon946··on Physics Nobel won by laser wizardry – laureates include first woman in 55 years
I have no idea either, but it's probably worth pointing out that, for better or worse, promotion to full will entail a certain degree of bean counting. Thus, there are a number of perfectly respectable ways to not meet those metrics. For example, someone who decides to tackle a very hard problem with very high risk of failure is likely to look less productive on paper.
anon946··on As Flow of Foreign Students Wanes, U.S. Universities Feel the Sting
I can't say for California, but in NYS, out-of-state students are money-makers for the university. In other words, reducing out-of-state students would increase in-state tuition, or result in facilities/services being cut.
anon946··on “One Damn Slide After Another”: PowerPoint at Every Occasion for Speech (2016)
I think one point that sometimes gets overlooked is that there are different types of presentations. For example, a set of slides that are designed to accompany lectures for a course on partial differential equations should be very different from a set of slides designed to pitch a business idea, especially if the lecture slides are intended to also serve as notes/textbook.
anon946··on “One Damn Slide After Another”: PowerPoint at Every Occasion for Speech (2016)
I think this very fact may be part of the issue. The slides may serve multiple purposes: (1) Notes for the presenter, (2) visuals, text for the viewer, and (3) a document for the person who found it via Google. They thus end up being a compromise at all of them.

In the ideal world, there would be three separate documents for the above, but PowerPoint is good enough at all of them that we tend to just create a single document that does all three.

anon946··on Debunking the Java Performance Myth
Any decent C/C++ compiler will give the same code. For example, this:

    int f1(int n) {
        int sum = 0;
        for (int i = 0; i < n; i++) {
            int x = i + i;
            sum = x - i;
        }
        return sum;
    }

    int f2(int n) {
        int sum = 0;
        int x;
        for (int i = 0; i < n; i++) {
            x = i + i;
            sum = x - i;
        }
        return sum;
    }
when compiled with 'gcc -O -S' gives:

            .file       "loop.c"
            .text
            .globl      f1
            .type       f1, @function
    f1:
    .LFB0:
            .cfi_startproc
            testl       %edi, %edi
            jle .L4
            movl        $0, %eax
    .L3:
            addl        $1, %eax
            cmpl        %eax, %edi
            jne .L3
            subl        $1, %eax
            ret
    .L4:
            movl        $0, %eax
            ret
            .cfi_endproc
    .LFE0:
            .size       f1, .-f1
            .globl      f2
            .type       f2, @function
    f2:
    .LFB1:
            .cfi_startproc
            testl       %edi, %edi
            jle .L9
            movl        $0, %eax
    .L8:
            addl        $1, %eax
            cmpl        %eax, %edi
            jne .L8
            subl        $1, %eax
            ret
    .L9:
            movl        $0, %eax
            ret
            .cfi_endproc
    .LFE1:
            .size       f2, .-f2
            .ident      "GCC: (GNU) 7.2.0"
            .section    .note.GNU-stack,"",@progbits
Even when compiled without optimization, the generated assembly was the same, though it was messier so I don't show it.
← PreviousPage 3 of 4Next →