HNHacker News
TopNewBestAskShowJobs

derf_

2,803 karma · joined July 22, 2012

submissionscomments
derf_··on Time-Series Database patented by GE
Well, that is not quite true. You also need definitions for the words used in the claims, which may require reading the description to understand properly. But certainly the claims are where you start your analysis.
derf_··on Sorry to burst your bubble
"According to two new papers, the crucial variable that separates relatively harmless frenzies from disastrous ones is debt."

Also according to, like, Irving Fisher in 1933: https://fraser.stlouisfed.org/docs/meltzer/fisdeb33.pdf

"I venture the opinion, subject to correction on submission of future evidence, that, in the great booms and depressions, each of the above-named factors has played a subordinate rôle as compared with two dominant factors, namely over-indebtedness to start with and deflation following soon after; also that where any of the other factors do become conspicuous, they are often merely effects or symptoms of these two. In short, the big bad actors are debt disturbances and price-level disturbances."

derf_··on If you've nothing to hide, you've got nothing to fear
"That's the ten-word answer my staff's been looking for for two weeks. There it is. Ten-word answers can kill you in political campaigns. They're the tip of the sword.

Here's my question: What are the next ten words of your answer? Your taxes are too high? So are mine. Give me the next ten words. How are we going to do it? Give me ten after that, I'll drop out of the race right now. Every once in a while... every once in a while, there's a day with an absolute right and an absolute wrong, but those days almost always include body counts. Other than that, there aren't many unnuanced moments in leading a country that's way too big for ten words."

--President Josiah "Jed" Bartlet, The West Wing Season 4, Episode 5 (2002)

derf_··on Things Rust shipped without
What the parent said still applies in your case. You just make a wrapper function that does the cleanup. I have used this pattern many times:

  static int foo_impl(int arg, int **resource1, int **resource2) {
    *resource1 = (int *)malloc(sizeof(**resource1));
    if (*resource1 == NULL) return EXIT_FAILURE;
    /* Do something with resource1 (omitted)... */
    *resource2 = (int *)malloc(sizeof(**resource2));
    if (*resource2 == NULL) return EXIT_FAILURE;
    /* Do something with resource1 and resource2 (e.g.,
       stick them in a global hash table as key/value pairs,
       or whatever, omitted)... */
    return EXIT_SUCCESS;
  }

  int foo(int arg) {
    int *resource1;
    int *resource2;
    int ret;
    resource1 = resource2 = NULL;
    ret = foo_impl(arg, &resource1, &resource2);
    if (ret != EXIT_SUCCESS) {
      free(resource2);
      free(resource1);
    }
    return ret;
  }
The advantages are that it makes it very explicit which resources need to be cleaned up (making it easier to review to be sure you haven't forgotten one, or forgotten to initialize one, because they're in a nice list), and it's harder to screw up the control flow. You can't get out of the function without passing by the clean-up code, and you can't accidentally fall into the clean-up code without explicitly returning an error.
derf_··on The random number generator of DOOM
Any reasonable compiler will implement x%256 using bitwise arithmetic, but C semantics require that x == d*(x/d) + (x%d), which means that if x is negative (x%256) must be negative, while (x&0xff) will be positive.

This difference means that the AND is still faster than the MOD when used on signed integers, if the compiler is not smart enough to prove that the input will never be negative.

For example, with gcc 4.7.3 the resulting assembly is

  movl %edi, %edx
  sarl $31, %edx
  shrl $24, %edx
  leal (%rdi, %rdx), %eax
  andl $255, %eax
  subl %edx, %eax
I.e., six instructions instead of one. This is still faster than using a divide.
derf_··on Announcing Dolby Audio for High Performance Audio in Microsoft Edge
This isn't innovation. AC-3 is almost 20 years old, and wasn't very good even for the time (it was designed for high-bandwidth optical discs). Dolby Digital Plus is an extension whose primary purpose is to extend their patent licensing regime.

Innovation would have been using Opus (full disclosure: I'm one of the authors of Opus).

derf_··on Models for adaptive arithmetic coding
This is also essentially what we do in Daala, as proposed here back in 2012: https://tools.ietf.org/html/draft-terriberry-codingtools-02#...

The only difference is we don't use rANS (which didn't exist when we started), we use a different arithmetic coding technique that does not require divisions, that also handles probabilities that don't sum to a power of two, so even the traditional frequency count style of models work fine.

Glad to see others are recognizing that this is a good idea.

derf_··on Mozilla overhauls Firefox smartphone plan to focus on quality, not cost
You're confusing strategy with the objective that strategy was intended to achieve. The real reason for Firefox OS was because

a) everything is moving to mobile, and

b) every mobile OS ships its own browser which is not Firefox.

We know from Netscape how hard it is to stay relevant against that kind of pressure, and there isn't even a way to cry "Anti-trust!" because none of these players are monopolies. They just all behave the same way.

derf_··on Mozilla overhauls Firefox smartphone plan to focus on quality, not cost
The battery on Firefox OS phones is already phenomenal (e.g., a week or more between recharges). Of course, the trick is not screwing that up when you add the other things.
derf_··on MapQuest still exists
I thought Classic had finally been removed for good?

When I went to get directions a few weeks back and they told me that

a) I couldn't use Classic anymore, and

b) the new UI only had a drop-down for arrival time with half-hour increments, instead of letting me type a precise time (trains often arrive a couple minutes after the hour), and

c) they removed the option for getting public transit directions at all (that had been there and working in Classic for years),

I said three strikes and you're out and switched to Yahoo.

derf_··on Senate Blocks Patriot Act Extension
> only 5 out of 180 FISA orders were authorized by 215

If you have a statute that you believe allows you to surveil the entire population, how many orders does that require? As opposed to ones that require some standard of suspicion for an individual or group.

I don't mean to imply there aren't other programs or theories of authority, but that this statistics tells you exactly nothing about the importance of a particular provision.

derf_··on Why should I have written ZeroMQ in C, not C++ (2012)
These and many other pitfalls are all discussed in detail in the C++ FQA Lite:

http://yosefk.com/c++fqa/exceptions.html#fqa-17.1

http://yosefk.com/c++fqa/ctors.html#fqa-10.17

http://yosefk.com/c++fqa/exceptions.html#fqa-17.3

The FQA helped my crystallize a lot of the reasons I hated C++. Even if you like C++, it's a good idea to understand the FQA's arguments, for the same reason people play devil's advocate.

derf_··on Snowden Sees Some Victories, from a Distance
Would this be the same population polled in 2010 when 41% of them could not name the vice president of the United States in an open-ended (not multiple choice) question? [0] Or last September when 64% of them could not name the three branches of government? [1] (35% could not name a single one)

My favorite poll is this one: http://www.pewinternet.org/2015/03/16/americans-privacy-stra...

Buried near the bottom is, "60% believe it is acceptable to monitor the communications of American leaders."

Raise your hand if you think it's good for a healthy democracy for the executive branch to monitor the private communications of congresspeople, senators, and federal judges?

[0] http://www.pewforum.org/2010/09/28/u-s-religious-knowledge-s...

[1] http://www.annenbergpublicpolicycenter.org/americans-know-su...

derf_··on Six Men Spent 520 Days Locked in a Room to See If We Could Live on Mars
> but information is one of the only things that is free to transport over planets

The marginal cost in terms of power may be very small (compared to a rocket), but the infrastructure costs are enormous, and as a result you're severely capacity-constrained.

Current link to Mars Odyssey from DSS 35 in Canberra is 14.22 kbps (roughly equivalent to a modem from 1991).

derf_··on Focus on specifics when interviewing
This is definitely a problem. I don't think it's a sign of dim intelligence, or even not paying attention. It may be a sign of nervousness, or simply of being an introvert (like myself). They may still be very good people. Part your job as an interviewer is to draw them out enough for you to figure that out.

They may not understand what you're looking for in their answers. Did you tell them when you asked? It was obvious to you, but it may not be obvious to them.

Once I get a few of these answers, I try to ask questions that require more background explanation to respond to. This requires some thinking on your part. If you've seen a project like theirs before, you can ask them how they solved some of the problems that you ran into on your own project. "Did you consider X? What would happen if..." If you are actively engaged and thinking, people will respond to that, much more than if you ask very open-ended questions like, "Tell me about X."

derf_··on Focus on specifics when interviewing
I don't think the point is to make them tell you what awesome things they have already accomplished. Maybe they've accomplished nothing. But they've probably got some experience on their resume, or you wouldn't be talking to them. Maybe that's only class projects, but that's enough.

The point is to get them to talk about something they have spent hundreds of hours thinking about. Something on which they are the experts. They should be able to go into detail and tell you what they found interesting. Both of those things are very informative.

derf_··on Why so many Dutch people work part time
> there's nothing the management can do

On the contrary. Walmart's policy to date has been to simply close the store:

http://www.commondreams.org/headlines05/0210-13.htm

They got in trouble for that one, so now they at least pretend to have other excuses:

http://www.cbsnews.com/news/union-walmart-shut-5-stores-over...

derf_··on Why the ruling against NSA’s phone records program could have huge implications
This might be a reasonable argument if there was any direct evidence that all of the billions spent on "collecting it all" had lead to the actual discovery of any plots that would not have been found by other means. But, as with "enhanced interrogation", I am not aware of any credible evidence to that effect, despite the incredible incentive for the government to manufacture some. We knew about the 9/11 attackers before their attack, but failed to put that information to good use.

Trying to know everything does not work. Targeted, traditional police investigation works. Money diverted from the latter to the former is wasted and reduces safety.

derf_··on Did I ever mention that I fucking hate the fucking web
Greasemonkey script to restore direct links: https://gist.github.com/astanin/3782408

It was worth it to me to install Greasemonkey for this script alone.

derf_··on Yellen cites 'potential dangers' in U.S. stock valuations
> How is the money wasted given the large production and downward price pressure on energy?

The latter is exactly what causes the former to be wasted. If demand drops (or even merely does not rise as quickly as expected), then the price drops. If you were relying on high prices when you made your decision to invest more money to increase capacity, then what previously looked like a good idea may now be a bad one.

When your break-even price is $60 to $65/barrel and prices fall below that, your net return is negative. But the best part is you don't even get to stop producing. The costs for most oil sources must be paid largely up-front, and your marginal cost may be only $20 to $30/barrel. So when oil drops to $50/barrel, you can choose between continuing to produce at a loss of $10 to $15/barrel over the life of the well, or stop producing and suffer a much, much larger loss. That keeps supply high and prices low.

One oil source that does not have large up-front costs is fracking. Or, more exactly, fracking sites only last 18 months or so before production slows to a trickle, so you have a much smaller time horizon to recoup up-front costs. So the amount of fracking will very likely decline quickly. But viewed from an economy-wide standpoint, there was still plenty of malinvestment here: drilling equipment rental, trucking, rail, etc., require large capital outlays but carried high prices when oil prices and thus demand was high. As demand drops, they may not be worth the amount invested in them.

derf_··on Mixed Signals: Why People Misunderstand Each Other
> It makes your culture a horrible place to be, but it doesn't keep humans from breeding successfully.

I remember a Maori exhibit at the Auckland War Memorial Museum. The gist was, they had these never-ending violence cycles based on perceived points of honor, but as you say they weren't a huge deal because their weapons weren't very good and most conflicts had few fatalities. Then they got guns from the Europeans and suddenly had an actual problem. At this point, some of the chiefs converted to Christianity for, according to the museum, the sole reason that it let them 'turn the other cheek' without losing honor (and thus their leadership position).

I remember only a small amount from the rest of the museum, but that bit was fascinating.

derf_··on Big companies are stopping Congress from fixing the patent system
We could call it the "Defensive Patent License", if it's not already taken [0].

[0] http://www.defensivepatentlicense.org/

derf_··on Google Patent Purchase Promotion
> non­exclusive, non­transferable, non­assignable (including by operation of law or otherwise), non­sublicensable

That does no one any good except the seller. For any seller, this kind of thing is table-stakes (no one wants to sell someone a gun pointed at their head).

But if the seller is specifically concerned about their patent being used offensively on others (which I suspect was the original commenter's concern), then this provision is useless.

derf_··on Looking Up Symptoms Online? These Companies Are Tracking You
Not a class of searches, but a feature: DDG does not have an equivalent of Google's time-based searches (e.g., last 24 hours, last week, etc.).
derf_··on Japan maglev train breaks world speed record again
I found it more stressful. The biggest place where delays are caused at an airport is at security, so when I arrive at an airport, this is the first thing I want to take care of, and cannot relax until I've passed through it.

To be told I cannot go through security until a few moments before the flight departs (because it is not even open, or the gate not even assigned) means that anything that does go wrong will cause me to miss my flight.

Not to mention the expense of having screening apparatus at every gate seems a little inefficient. It means everyone on the flight tries to cram through the one line at the same time, whereas if it were in advance, it could be spread out in time and over more lines.

derf_··on VP9: Faster, better, buffer-free YouTube videos
Because they're already done.

Windows: https://bugzilla.mozilla.org/show_bug.cgi?id=922314

Android: https://bugzilla.mozilla.org/show_bug.cgi?id=986381

Linux supports HW decoding via gstreamer, if you have gstreamer set up to use your hardware (this can take some work).

derf_··on VP9: Faster, better, buffer-free YouTube videos
> and encoding speed

Table VI. Encoding Run Times for Equal PSNR_{YUV}, HEVC vs. VP9 (in %): 735.2

I.e., HM is over 7x slower than VP9's slowest settings. VP9 speeds have improved dramatically since then, and it is now being used real-time (Google is working on adding it to WebRTC), while still demonstrating significant quality improvements over prior generations.

See also https://news.ycombinator.com/item?id=9329580 w.r.t. the quality aspect.

derf_··on VP9: Faster, better, buffer-free YouTube videos
> With that said, I have to ask why these groups are interested in 10-bit when I'm essentially certain they cannot view in 10-bit.

The H.264 prediction loop includes some inherent rounding biases and noise injection. Using 10-bit instead of 8-bit reduces the injected noise by 12 dB, which makes a noticeable difference in quality-per-(encoded)-bit, even when the source and display are both 8-bit. I spent some time talking with Google engineers early on in the VP9 design process, and they commented that they had done some experiments, but did not see similar gains by using higher bit depths with VP9. I don't know if that's still true with the final VP9 design, though.

derf_··on VP9: Faster, better, buffer-free YouTube videos
See also http://iphome.hhi.de/marpe/download/Performance_HEVC_VP9_X26...

Both of those are much older encoders, of course (nearly 2 years old in the case of the PCS paper), and some of the settings they used were questionable, e.g., what HEVC calls "constant QP" actually varies the quantizer based on the frame type, while VP9 really uses the same quantizer, which can make a big difference on metrics. Talking to the authors at PCS, they re-ran results later with more relaxed QP settings, and VP9 got somewhat better, but still didn't catch up with HEVC (on metrics).

Keep in mind all of these results are from people who have spent significant time working in MPEG/ITU/JVT/JCTVC, and may have some inherent biases. Google's own results looked much better: http://ieeexplore.ieee.org/iel7/6729645/6737661/06737765.pdf... (sorry for the paywall, I'm not aware of a free version available online, tl/dr: 30.38% better rate than H.264, 2.49% worse than HEVC), but obviously come with their own set of biases.

I don't know how to explain the discrepancies in the two sets of results, but they at least demonstrate the magnitude of the differences you can obtain by varying how you do the testing.

derf_··on An Update on Microsoft’s Approach to Do Not Track
> At worst someone on a blog publishes a rant about how you're ignoring it

At worst the federal government decides the line the advertising industry has been feeding them about being able to regulate themselves is just that, a line, and decides perhaps consumers need some protections backed by force of law.

That's the only thing that ever had a chance of making advertisers take DNT seriously.

← PreviousPage 13 of 17Next →