HN user

Contero

62 karma
Posts0
Comments27
View on HN
No posts found.

Yeah re-reading the wording now I think you're right. It's this part that throws me off:

could determine that, in the absence of any undefined behavior

"could determine that" based on the code example shown

vs

"could determine that" based on static analysis performed on some preceding code

It would have been a lot easier to wrap my head around if it were an example where cond could be 0 or 4 or something along those lines. It would really underscore the compiler's desire to reuse the cond as the index.

Consider the following example:

  if (cond) {
    A[1] = X;
  } else {
    A[0] = X;
  }
> A total license implementation could determine that, in the absence of any undefined behavior, the condition cond must have value 0 or 1.

If undefined behavior occurred somewhere in the integer arithmetic of cond, then cond could end up evaluating to a value other than 0 or 1

I don't even follow this very first example. Neither C nor C++ have any requirement that their condition statements be given 0 or 1.

In C:

the first substatement is executed if the expression compares unequal to 0.

In C++:

The value of a condition that is an expression is the value of the expression, contextually converted to bool

Where conversion to bool is defined as:

A zero value, null pointer value, or null member pointer value is converted to false; any other value is converted to true

I'm sure such a thing could occur if cond had a boolean type but contained uninitialized data. That would be similar to the situation talked about in this link: https://markshroyer.com/2012/06/c-both-true-and-false/

Against Empathy 12 years ago

I found it odd that the author seems to think that empathy for the individual is somehow at odds with caring for the many, instead of being closely correlated. As if removing empathy would somehow get people to care more about each other, rather than less.

What I think wikipedia needs more than anything is a new way to propose an edit without actually committing it, and to be able to solicit feedback or have others fix it for you before having it finally approved and submitted. It needs to be something where an inexperienced editor can make a good edit proposal without having to be completely versed in wikipedia's editing policies.

Talk pages are a horrendous way to implement this. Making an edit proposal should be extremely new-user friendly.

I think a proposal and dialog format would do a much better job at absorbing new content than what happens currently, which seems to be a revert if you run afoul of any editing policy.

Making self-driving cars safer than people-driven cars is trivial. The hard thing will be handling the tidal wave of FUD when the inevitable happens and someone dies as a result of one. Google or Nissan or whoever will need a mountain of good PR and safety statistics to be able to push it back. That alone is enough reason to motivate the creation of "hyper-efficient safety mechanisms".

I think an interesting implication of this is that people may feel satisfied having purchased something useless that seems to have enough "stuff" in it.

I think the idea is that if the manufacturer was the only one selling, that they could inflate their prices higher than what the middleman overhead would be since they're the only one offering that product.

Why he thinks competition between brands isn't enough to counteract this I have no idea.

I really think Android should add another layer of protection here, similar to the "This app wants to use your location" prompt in iOS. I'd like to be able to install an app that might need to access my phonebook in some use case but be able to deny it when it attempts to access that information when I don't want it to.

For example, I'd want to be able to use the facebook app and many users might even want to have it scan their address books in order to find friends. However, if the app attempts to read my address book when I'm just checking someone's status update that is clearly not okay and I want to be able to block it.

The free pass to pillage my phone upon installation doesn't sit well with me.

If the author wants us to discuss the point he should get to it faster rather than droning on about apple stock and product pipelines.

300 words isn't so much that it's cumbersome to read, but it definitely primed me to think that his point was somehow specific to apple and investing when it wasn't at all. I'm not surprised that people have decided to nitpick it.

I think Machinarium is a good example of how you can preserve the fun frustration of adventure games without pushing people to cheat. They would allow you to play a mini-game in order to reveal some extra hints which would push you in the right direction enough to figure out the rest on your own.

In Monkey Island I would sometimes get annoyed and google for what to do out of angry frustration. It was easy for me to throw my hands up and say "I don't give a shit any more, time to move on!" Lots of times the solutions made zero sense to me. In Machinarium I still got a sense of frustration and puzzlement, but I would try to forego the hints out of pride for as long as I could which made for a much more enjoyable experience.

I'm curious what exactly it is about pointers that makes them so hard to understand.

Many new programmers seem to warm up to Java "references" just fine, and they have mostly the same semantics of C pointers.

Maybe it's because passing by value is conceptually harder to grasp than passing by reference, and in C you must understand both in order to use pointers?

The causation could easily be backwards. Who wants to marry a depressed, unsatisfied drinker?

> Isn't it generally sound to assume causation until the position can be falsified?

Not really, no. Would you assume causation in the case of cereal consumption typically increasing 30% on the first Tuesday after a heavy rainfall? There are many similarly insane correlations that you wouldn't be so quick to assume causation about. It's biased to assume causation (based solely on statistics) when you want it to make intuitive sense.

The language of Vim 13 years ago

On the contrary, I think people who are already comfortable with vim have a harder time identifying the pains of learning it.

There are many problems that started out as pains but are second nature to us now, so we don't think to optimize them.

I remember spending a ridiculous amount of time trying to figure out link and include paths to add a new library in visual studio when I was a new programmer. Doing so now is so easy I hardly need to think about it, but in reality it hasn't gotten any easier. I am simply familiar with the process.

Really, installing a new library should be as straightforward as installing an extension in a web browser. There is little essential complexity there, and yet this process has not become easier (in C/C++) for decades.

Anyone who knows enough about how to solve the problem has already groked it and isn't interested in solving it anymore. This is the problem I see with wanting an improved vim from someone who is already a vim expert. The problems they have with vim are disjoint from the problems a new programmer would have with vim.

What I will say is that if you are going to create a new editor, by the time you are done you should have become an expert in all the major text editors. You're absolutely right that any new editor should have seriously considered the features available in vim and emacs and others. However I have no problem with someone who isn't an expert getting inspiration to create their own editor out of their frustrations with vim. Many great things were stared in similar ways by people who weren't experts (yet).

You reminded me of a sort-of relevant part from Richard III that I enjoyed:

BUCKINGHAM:

And when mine oratory grew to an end

I bid them that did love their country's good

Cry 'God save Richard, England's royal king!'

RICHARD:

Ah! and did they so?

BUCKINGHAM:

No, so God help me, they spake not a word;

But, like dumb statues or breathing stones,

Gazed each on other, and look'd deadly pale.

I don't get it. Nearly that exact scenario played out with John Lasseter and Disney/Pixar. I don't see why it would be unreasonable here.

Access denied 14 years ago

Why is it idiotic?

I see more value in having Disney pay an appropriately large amount of money to keep their IP than I see in making sure that their specific content gets into the public domain.

Who cares about steamboat willy if Disney is going to fight tooth and nail over it? It's everything else that will expire into the public domain that I care about.

Linux 3.7 released 14 years ago

It sounds like it would allow a client to send data (HTTP request) before the server has acknowledged that the TCP connection is open.

Google maps allows you to find things you didn't know existed in the first place. I've often found myself spinning the globe and zooming down onto a remote island's beaches just to see what it looks like on another part of the world. Being able to zoom down even farther to actually see the coral reefs is a natural extension of that. It's about discovery.

It doesn't matter that information about X is available if you can't find out that X exists in the first place.

> 2. People will write it the "bad" way anyway.

People will write bad code in every programming language you give them. I don't see that as a justification for limiting the expressiveness of a language. If you take that line of reasoning too far you end up with Java.

You're over engineering this I think. The "hash" only needs to be an internal account id that can be plugged into Blizzard's database to get your account info. No encryption is necessary. There is no way to get a mapping of internal code to account info without their database.

What I don't understand is why the screenshot would contain your literal realm id, and not a hash that only Blizzard could understand.

As long as Blizzard is the only party that can glean meaningful information from these watermarks I see no problem with it.

I'm a technical user who spends a lot of time using Linux, and it gets out of my way for doing development quite well.

Of course, that's because I exclusively connect to Linux machines through an ssh terminal on my Win7 workstation. I've personally abandoned all hope for using Linux as a desktop OS. I live in the terminal on Linux because that's where the design actually lives. Anything GUI related is an afterthought.