Why is NaN not equal to NaN? - <AUTHOR> http://stackoverflow.com/questions/1565164/what-is-the-rationale-for-all-comparisons-returning-false-for-ieee754-nan-values/1573715#1573715 <comment><USER2> The comments on this point to another question of which this is an exact duplicate. Interested parties should definitely read the top answer there, as it was written by a member of the IEEE-754 committee.

[http://stackoverflow.com/a/1573715/203705](http://stackoverflow.com/a/1573715/203705)

<comment><USER3> Hey, that's my answer! /wave

Strangely, I was just adding some more material to this answer as I've never really been completely satisfied with it; then I flip over to hacker news and there it is. Anyway, if anyone has other IEEE-754 questions, I'll try to answer.

<comment><USER4> Wow, I never would have guessed that a significant reason was historical, so that x != x could provide a robust way to detect NaN without requiring a special API. Is there a similar test for infinity?

<comment><USER5> That reasoning is incorrect. If they had chosen NaN == NaN, then the test for NaN could be simply x == NaN...

The other reason mentioned is also unconvincing. Surely preserving the law x==x is more important than the law x==y <=> x-y==0.

Then we have:

> Regarding your comment "that doesn't mean that the correct answer is false", > this is wrong. The predicate (y < x) asks whether y is less than x. If y is > NaN, then it is not less than any floating-point value x, so the answer is > necessarily false.

Clearly this reasoning is incorrect for the simple reason that the same reasoning can lead to the opposite conclusion. If y is NaN then we can't say that y < x is definitely true but neither can we say that y < x is definitely false.

Here is my argument for why NaN == NaN should be true. The == operator for floats should rarely be used. If you want to know whether two floats can be considered the same, then you should always use some other condition like |x-y| < epsilon, and NOT x == y. The reason is that floating point arithmetic is inexact, so even a slight roundoff error will make x == y false. So if its job is _not_ to test whether two floats are the same _numerically_ then what is the job for the == operator? Its job is to test whether x and y are precisely the same _float_. The x == y operator should not pretend to work on the abstraction that x and y are kinda-sorta real numbers, because such an operator is useless anyway because the criterion for that needs to be application specific. It should compare floats while admitting that we are comparing floats which can take on the value +infinity -infinity +0 -0 and NaN, and we are not comparing real numbers which do not have those values. That's why NaN == NaN should be true.

<comment><USER3> > If they had chosen NaN == NaN, then the test for NaN could be simply x == > NaN

Not in languages that didn't have a name for NaN it wouldn't.

> you should always use some other condition like |x-y| < epsilon, and NOT x > == y.

This is a popular myth, but it is false. There are circumstances in which exact equality comparisons in floating-point are perfectly appropriate.

> Its job is to test whether x and y are precisely the same float.

No; if it were we would have +0 != -0. You're looking for totalOrder(x,y) or a related predicate.

<comment><USER5> > Not in languages that didn't have a name for NaN it wouldn't.

...then use NaN = 0/0.

> This is a popular myth, but it is false. There are circumstances in which > exact equality comparisons in floating-point are perfectly appropriate.

Can you give an example where == is appropriate, but where you want NaN == NaN to be false?

> No; if it were we would have +0 != -0. You're looking for totalOrder(x,y) or > a related predicate.

Exactly, +0 == -0 should be false too. totalOrder(x,y) is what == should have been (or at least the equality part of it).

p.s. An arguably more serious issue with IEEE floats is rounding modes. The round up/round down modes are tantalizingly close to providing the ability to do ironclad approximate real arithmetic in the sense that you could give upper/lower bounds on the exact value. The problem is that the rounding modes only involve giving an upper/lower bound on the output given an _exact_ input, rather than an upper/lower bound on the output given an upper/lower bound on the input. So it's not compositional which means you can't guarantee anything.

<comment><USER6> > ...then use NaN = 0/0.

Many languages throw an error when you divide by zero. As far as I can tell, if x != x didn't work you would have to resort to bizarre contortions like `x == float("NaN")` for such tests in Python (the problems: there are no NaN or Infinity constants and division by 0 throws).

Also, since you expect == to do bit equality on floats, you will be distinguishing between the huge number of representation of NaN, so NaN = 0/0 isn't valid even if there is a NaN constant (and which one would it be?).

<comment><USER7> X/0.0 is safe, and will always return NaN, no matter the language -- as long as 0.0 is a representation of an IEEE754 floating-point value, and as long as the expression "X/0.0" is interpreted as coercing X into a floating-point value in order to do fpdiv(X, 0.0) -- then safely returning Infinity here (or NaN in the case of 0/0.0) is required of the FPU in order for it to be considered IEEE754-compliant.

On the other hand, X/0 ( _integer_ division-by-zero, where X is not a floating-point value either) usually does cause an exception. In fact, in bare-metal ASM without a trap-handler interrupt set up, it halts the processor entirely.

<comment><USER8> > On the other hand, X/0 (integer division-by-zero, where X is not a floating- > point value either) usually does cause an exception.

That's true for x86, but not for most other architectures.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> This is what I would expect from the underlying mathematics. NaN roughly means the output of a function is undefined, and it does not make sense to say functions are equal at some value just because they are both undefined for that value.

For example, it's probably more sensible to say that 2x/x != 3x/x for all values of x, rather than 2x/x != 3x/x for all x except 0, wherein both functions are undefined and therefore equal to each other.

<comment><USER10> I agree it really doesn't make sense to say two NaNs are definitely equal, but it doesn't seem necessarily true that they aren't equal, either. Semantically, I would say NaN == NaN should return undefined (assuming JS here). Of course, it would be weird for == not to return true or false, so in practice that probably isn't a good idea. So I agree with you false is the least bad option.

<comment><USER11> Why wouldn't NaN==NaN return a NaN value, which also has the following property:

-> Can't be used as a branching conditional.

Think about it: if (NaN) { a; } else { b; }

The pedantically-correct answer would be to execute neither, but that wouldn't be very helpful (however fun debugging that might have been).

The pragmatically-correct answer, imho, would be to throw an error. Would I rather have a; or b; executed, when I can't trust the conditional value? Neither, by the time the NaN has hit branching code, it's time it escalated into an error.

edit: I may have reinvented "Maybe" [https://news.ycombinator.com/item?id=7747284](https://news.ycombinator.com/item?id=7747284)

<comment><USER10> I thought about that, but I like undefined better. Part of the reason is NaN is of type number[0], and I think a number makes less as a return value for a conditional statement than a general non-value (e.g. undefined or null). Also, if someone asked me to evaluate the equality of karamozov's equations at 0, I'd literally say "that's undefined." So the JS undefined value seemed perfect to me (perfect as in the most elegant, not necessarily the most practical).

For some reason I hadn't thought about it till you mentioned it, but I do like the idea of throwing an exception when a nonsensical comparison of NaNs happen. Of course that would be inimical to the way JS normally operates.

I don't think what you're getting at is exactly Maybe. You're able to easily programmatically determine whether a Maybe has a value, whereas the equality of NaNs is basically unknowable.

0 - Talking in JS again, although it's similar for Java and other languages.

<comment><USER11> > You can ignore invalid data for as long as you want, but you can also draw > lines and say "it can't have been ignored if flow gets to here". (from > comment I linked above)

I was talking about this property of Maybe. I was thinking that assigning a NaN value to a boolean should probably be "fine" (no exception), but _using that when branching_ would mean that this carried-forward-error (which the NaN represents, effectively) is just about to go beyond "infecting" just data, to affecting code flow. So, throw.

</comment></comment></comment></comment></comment><comment><USER12> The following is my take:

It seems like the desired result is to make it determinable when a NaN value is produced in a language that doesn't have an is_nan function (such as an assembly language lacking such a predicate) so that a simple boolean statement does the trick, for example:

def is_nan(val): return not (val == val)

This absolutely bizarre statement of non-identity gives us a surefire test. It is from the perspective of higher level languages that the non-identity of NaN with itself seems bizarre.

<comment><USER13> If NaN == NaN, we'd still have that test, it would just read

def is_nan(val): return (val == NaN)

It's true that it can't just give NaN or you'd be stuck.

</comment></comment><comment><USER14> There's the obvious warning that one shall not compare floating point numbers for equality...

But then, it's indeed quite surprizing. It get worse on pure tanguages where the expressions (0 / 0) and (0 / 0) are equal before evaluation, but different afterwards. Also, it trashes hash tables.

Yet, NANs being different is the sanest mathematical definition. Maybe people should have opted for the ugliest choice because of real world concerns (it wouldn't be the first time), but this time, they didn't.

</comment><comment><USER15> Some of the links I posted to stack overflow; the top-voted answer there (as of this writing) was wildly incorrect, claiming it to be a mistake. It is not.

Any invalid calculation produces NaN as opposed to raising an exception/signal because that would be non-portable (especially in the early 80s). The goal was that a correct algorithm on one platform or in one language would translate and be correct somewhere else. Further, some algorithms depend on being able to probe a function to find its bounds, requiring them to be able to locate the out of bounds condition without halting execution; doing that in a safe, portable way is actually quite hard unless you do it in software as part of the spec, hence NaN.

If NaN==NaN, then (NaN/NaN)==1, etc etc and you still end up in a world of nonsense as far as naive algebra is concerned. This is just some of my fellow programmers whining and crying about having to think about floating point, the same sort of complaining I hear about Unicode (and full of just as much self- sure awful advice that produces wildly incorrect results for everything except the complainer's specific use case).

[http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.ht...](http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html)

[http://www.eecs.berkeley.edu/~wkahan/ieee754status/754story....](http://www.eecs.berkeley.edu/~wkahan/ieee754status/754story.html)

[http://cnx.org/content/m32770/latest/](http://cnx.org/content/m32770/latest/)

<comment><USER16> It's not just "having to think about floating-point"\--it's that a number of other things break. Easy function memoization doesn't work with NaNs because NaN!=NaN, so the function arguments look different, so the saved memoized value is never used.

</comment></comment><comment><USER17> NaN == NaN should return NaB, Not a Boolean.

<comment><USER18> Yes, and if you try and branch based on that value, the CPU will jump to "Not an Address" and execute the instruction "Not an Opcode" over and over.

</comment></comment><comment><USER19> The comments give reason to believe this isn't the cause, but my first instinct was that NaN cannot be equal to NaN as it isn't clear what the object represents. As Mike C states in his answer: "Another way to look at it is that NaN just gives you information about what something ISN'T, not what it is."

But is this an effective way of looking at the question? In reality what you're trying to do is not compare a NaN to another NaN, you're actually attempting to check if both objects are NaN. This hurts my brain.

</comment><comment><USER20> I like the fact that NaN taints other numbers - early failure is better, than trying to hide it.

      #include <math.h>
      #include <stdio.h>

      int main(int argc, const char* argv[] )
      {
      	double nan = 0.0 / 0.0;
      	double x = 1.0;
      	double y = nan + x;
      	printf( "nan=%f\n", nan );
      	printf( "  x=%f\n", x );
      	printf( "  y=%f\n", y );
      	return 0;
      }

      /* Should print (gcc):
         nan=nan
           x=1.000000
           y=nan
      */

<comment><USER13> I _dislike_ the fact that NaN taints other numbers - for precisely the same reason.

Much better, in terms of early failure, would be signalling NaN or something like...

        ...

        maybenan_double maybe_nan = 0.0 / 0.0;
        double x = 1.0;
        if(is_nan(maybe_nan)) {
            fprintf(stderr, "maybe_nan is NaN\n");
            return 1;
        }

        double not_nan = from_maybenan(maybe_nan);

        double y = not_nan + x;

        ...

Of course, there are other dimensions in which this is _not_ better, but I don't like silent propagation if it might stretch over a lot of code.

</comment></comment><comment><USER21> As a C/C++ and graphics programmer, I love NaN. It allows saving space by not having to carry an extra is_valid boolean for uninitialized values or regions of data that are masked.

For textures, they are great as they don't interpolate w/ nearby neighbors and properly discard fragments & vertices without the aforementioned cost of an extra boolean attribute.

</comment><comment><USER22> That was a very interesting read. I always thought NaN != NaN was because it's a class of values (there are many binary representations that are NaN, as it just requires an all-ones exponent and a mantissa that isn't all-zeroes) but I guess I was considering it too simplistically.

</comment><comment><USER23> This might actually explain a very intermittent bug that I spent some hours on and never solved. A sort that would never terminate, and the best I could come up with was that for reasons I couldn't understand the comparison function was returning false when an item was compared to itself ... TIL.

</comment><comment><USER24> On the subject of Not A Number, is it a good time to recall Gary Bernhardt's excellent "Wat" piece?

[http://www.youtube.com/watch?v=HAw2jU4de2A](http://www.youtube.com/watch?v=HAw2jU4de2A)

</comment><comment><USER25> Not a number just tells you what something isn't, not what it is. A NaN could be a string, or a potato, or an airplane, or the prime minister of Djibouti. Is a potato equal to an airplane?

</comment><comment><USER26> A very good post.

Most here don't remember the totally sad state of floating point before this came to be.

</comment><comment><USER27> Before you join this discussion -- read the third answer posted, it is the "most correct" one.

</comment><comment><USER28> also anyone who works in SQL should know why NULL != NULL and NULL = NULL come back as ? and never true

</comment><comment><USER29> tldr: cause !red !== !blue

</comment><comment><USER30> log(-1) -> exception 1/0 -> exception Problem solved. WTF is NaN even a thing??

<comment><USER31> Throwing exceptions for everything isn't a catch-all solution for writing better software—take a look at the Ariane rocket failure, which was caused by bounded numeric types throwing exceptions aggressively. Some modern programming styles tend to avoid enthusiastic non-local returns anyway in favor of things like monadic composition, such as Maybe in Haskell (which is more like NaN than it is like an exception).

The nice thing about NaN is that you can just do a calculation as normal, and check for NaN at the very end. This means you don't have to do an expensive test/branch after every arithmetic or other numeric operation. The hardware is much, _much_ easier to design if you don't have to make it branch, and the code is much faster without the compiler inserting branches. People who work with floating point numbers every day care very deeply about performance.

If you don't care as much about performance, why not write your code in a language that does throw exceptions? Python, for example.

Those of us that _do_ use numerics love NaN, love signed zeros, and can live with NaN ≠ NaN even though it's kind of dumb.

<comment><USER13> Maybe is more like NaN than an exception, but the nice thing about it as opposed to NaN is that you can isolate the particular failure. Sure, I can check for NaN in my doubles, but my types can't make sure I've checked for it by point X. Running a huge program to solve a problem, and getting back NaN with no explanation, is horrendously obnoxious.

<comment><USER31> Hm, I have the opposite experience. Being able to ignore invalid data every once in a while trumps having a hundred hours of computation cut short by an unexpected exception bringing the whole thing down.

<comment><USER13> That's why Maybe (without fromJust!) is so nice. You can ignore invalid data for as long as you want, but you can also draw lines and say "it can't have been ignored if flow gets to here". I'm certainly not arguing in favor of exceptions!

Edited to add: That said, I'd rather that 100 hours of computation be cut short than take longer and be equally useless...</comment></comment></comment></comment></comment>


Multivitamin, mineral supplement linked to less-severe illness symptoms - <AUTHOR> https://www.sciencedaily.com/releases/2020/08/200818094048.htm <comment><USER2> Surprise! An institute named after a megadose vitamin-C whackadoodle is pushing the idea that large doses vitamin C reduces illness duration. I'm shocked.

I mean, it's possible, but what a junk study.

</comment><comment><USER3> Please spare us from reports of studies with few subjects (n < 50), based on subjective self-report, and with results reported that were unintended by the study's design.

It's just p-hacking or random chance and a news outlet's way of generating clicks for itself. These findings are made public, and then almost always quietly disappear into the churn of other scientific ideas of dubious validity.

If only the follow-up, larger (n >> 50) study that later is conducted that reports negative results was as widely reported and disseminated.</comment>


EbSynth brings art to life with 2D motion capture - <AUTHOR> https://www.ebsynth.com <comment><USER2> this is super cool! style transfer for animation?</comment>


C4: An opensource creative coding framework for iOS - <AUTHOR> http://c4ios.com <comment><USER2> Hey all, I'm the creator of C4. Last week we released a new version of C4 (it's entirely Swift).

Questions / comments / feedback of any kind would be great, and will only help us make the project stronger.

<comment><USER3> Are you planning on selling this in the UK? I think you're violating a trademark owned by Channel 4.

[https://www.ipo.gov.uk/tmcase/Results/4/EU009749805](https://www.ipo.gov.uk/tmcase/Results/4/EU009749805)

<comment><USER2> C4 is a community-driven open-source project, that has been made through the work of volunteers. We aren't selling the core api in any market. It also has an MIT license so it is free to use for anyone, including in commercial works.

<comment><USER3> The law will catch anyone who tries to sell services related to the registered trademark.

</comment></comment></comment></comment><comment><USER4> > Faster and better.

Got the the site - got a frozen page with the above tagline against gray background for few seconds, then a very choppy video started to play. Couldn't make it past the second pageful, because the page had a massive lag scrolling and it was ultimately unusable.

Perhaps have a lighter version with just the content and no bells or whistles?

<comment><USER5> This put me off too, although only Firefox has responsiveness issues.

</comment></comment><comment><USER6> The fade between the 3 background vids in the jumbotron of that landing page works really well in Chrome. I've not seen it done like that before, nice work.

<comment><USER5> And awfully in Firefox, full UI lag.

I know Firefox's implementation makes this its fault, but come on, it doesn't hurt to test the home page in it.

<comment><USER2> Thanks for the heads up. Will get on fixing that.

</comment></comment></comment><comment><USER7> How can they be copyright 2016 when it's not 2016 yet?

<comment><USER2> Typo. Fixed.

</comment></comment><comment><USER8> I'm not sure I get the joke involving:

let bananaName = "Jimmy".banana

<comment><USER9> It's from the official swift tutorial when they talk about extensions.

</comment></comment><comment><USER10> Looks pretty neat. I'm not interested in iOS per say, but I have a Macbook, iMac and I'm looking at making animation, interactive stuff on those devices.

After looking at your c4's different github repos, it appears you've started some c4 stuff for OS X as well. I'd be interested in this framework if some resources went into the OS X side as well.

<comment><USER2> Good digging. We started working on the OSX branch recently. We have a slack channel you can join to ask questions / keep in touch about our progress on that branch.

Everyone is welcome to join: [https://join-c4.herokuapp.com](https://join-c4.herokuapp.com)

<comment><USER10> Cool! I'll definitely jump on the channel if I have any questions.

</comment></comment></comment><comment><USER11> Main copy font should be darker/heavier. I bet Museo Sans of that weight and copy is readable on a Macbook Pro. On this notebook its readability leaves something to be desired.</comment>


Staying Public - <AUTHOR> https://www.tesla.com/blog/staying-public <comment><USER2> Musk still has an "only I can do it" mindset. The guy is working himself too hard, not getting enough sleep, and making bad decisions. As CEO, he should not be trying to fix an assembly line. His job is to build a team to do that, give them enough authority to do the job, get out of their way, and check up on them occasionally.

Here's Tesla's top management, according to Tesla.[1] There's Musk. There's a chief financial officer. And there's a chief technical officer who's a battery electric powertrain expert. Where's the chief operating officer?

There's a VP for manufacturing, Gilbert Passim. But check out his Linkedin page.[2] He's listed as running Tesla's various operations other than direct vehicle production. When he was hired by Tesla in 2010, he was relocated from Pleasanton to southern California. There must be a plant manager and a head of manufacturing engineering, but they seem to be far enough down that they have zero Google visibility.

It looks like Musk set this up so that there's him, and then there's a bunch of people who report to him, none of whom has full authority over manufacturing. It's not working.

[1] [http://ir.tesla.com/corporate- governance/management](http://ir.tesla.com/corporate-governance/management) [2] [https://www.linkedin.com/in/gilbert- passin-74a36117](https://www.linkedin.com/in/gilbert-passin-74a36117)

<comment><USER3> But it seems to be working, right? Tesla has been hitting their goals, and the stock price has been going up.

Musk's bizarre behavior is concerning, but his organization structure seemed to be working.

<comment><USER4> "Tesla has been hitting their goals"

My impression from reading HN articles over the last couple years has been the exact opposite, the Model 3 being the prime example of that.

<comment><USER5> Yeah, plenty of people on HN love to repeat that. Check out how Tesla has been doing with their most recent Model 3 production target, which was announced at the end of 2017:

[https://www.bloomberg.com/graphics/2018-tesla- tracker/](https://www.bloomberg.com/graphics/2018-tesla-tracker/)

Here we are, 8 months later, how would you say they are doing?

<comment><USER4> Key point there is " _most recent_ production target". Tesla has been constantly revising its production targets as it fails to achieve prior targets.

For example, in 2016 [1] Tesla set a target of 100,000 Model 3s produced in 2017 and 400,000 in 2018. End of 2018 is getting close, and Tesla's at less than 30% of the _2017_ target, let alone 2018.

After that particular failure to achieve production goals, the stated goal for Q3 2017 was revised to 1,500 new cars built [2]. Tesla built 237 instead.

In other words: yeah, Tesla might look like it's "on target" now, but only because it shifted the goalposts after having been very much off target for more than a year now. There are hundreds of thousands of customers still waiting for their cars because of how thoroughly Tesla missed its original production goals.

Tesla's on the right track now, but only after a _very_ rocky road getting there.

\--

[1]: [https://www.reuters.com/article/us-tesla-suppliers- idUSKCN0Y...](https://www.reuters.com/article/us-tesla-suppliers- idUSKCN0YB0CA)

[2]: [https://www.bloomberg.com/news/articles/2017-10-02/tesla- sal...](https://www.bloomberg.com/news/articles/2017-10-02/tesla-sales-climb- as-model-3-stokes-demand-in-pricier-offerings)

</comment></comment></comment></comment></comment><comment><USER6> To understand the hilarity of this statement you really want to have read the last 3 Matt Levine posts about the saga of Musk's "plan" to take Tesla "private" while retaining the majority of its existing retail shareholders. I think Bloomberg has paywalled Levine now; he's worth it (I mean, he is in supremely excellent form discussing Musk's "going private" plan), but I subscribe to him via email and get them free. Maybe someone here has a link to them; they are fantastic.

<comment><USER7> Sorry, but I have a hard time praising a writer for throwing shade at the most prolific maker in our lifetime.

<comment><USER8> Keep in mind a lot of makers, inventors, etc. are not very good at the CEO job.

It's probably unlikely that Jony Ive (a truly brilliant designer) would have any business trying to run Apple.

James Dyson, a great maker, isn't the CEO of Dyson (and hasn't been since 2001). He's the chief engineer. (see the nice article below that he wrote describing how he had to bring in outside operators once they hit scale [1])

Neither Nikola Tesla nor Edison demonstrated good skill at running businesses. Musk is not a greater maker than those two.

You don't want John Carmack running id Software's day to day operations, nor do you want Shigeru Miyamoto running Nintendo. At that level, you want to aggressively focus on what you're best at.

Even Henry Ford, who was a decently skilled business operator, was still not the best available option for running the day to day operations of his own company at scale. It's crazy hard to run an extremely large business well, and the level of skill it demands is every bit as rare as the maker-type talent.

I happen to agree with this Bloomberg article. What Musk needs is Alan Mulally or the equivalent (a Gwynne Shotwell if you will; an extremely difficult challenge, given the requirement that the person be compatible with Musk):

[https://www.bloomberg.com/view/articles/2018-08-23/how- elon-...](https://www.bloomberg.com/view/articles/2018-08-23/how-elon-musk- can-save-tesla-hire-alan-mulally-ford-s-savior)

[1] [https://www.inc.com/magazine/201203/burt-helm/how-i-did- it-j...](https://www.inc.com/magazine/201203/burt-helm/how-i-did-it-james- dyson.html)

<comment><USER7> Elon has a pretty good track record of CEOing SpaceX (12 years) and Tesla (15 years), two of the most impressive and impactful companies of our generation.

<comment><USER9> Tesla has never had a profitable year, yet the company's voting structure requires almost 90% of shareholders outside of Musk to vote to ever oust him. He has even more control of SpaceX, having majority ownership and a super- majority of voting shares. It's virtually impossible to unseat him as CEO, so pointing out that he's CEO doesn't really establish anything about his quality at holding that position.

<comment><USER7> That seems like an odd way to evaluate a CEO. I would evaluate more on what the company is able to achieve (yes, I understand Tesla's lack of profitability).

<comment><USER6> That's a non-sequitur answer. He's refuting your claim that you can evaluate Musk's ability from his tenure at those two companies, because both are structured such that he can retain control regardless of his performance. He's not providing you with a rubric for evaluating CEOs, but rather pointing out how your own rubric is flawed.

<comment><USER7> I don't understand. How is his retaining control based on the structure of voting rights related to his job performance?

<comment><USER9> Good question. You're the one that implied he must be a good CEO because he had been one for so long, which is silly if he can't be fired.

"Elon has a pretty good track record of CEOing SpaceX (12 years) and Tesla (15 years)"

<comment><USER7> I'm saying he's a good CEO because has been a fantastic one for 15+ years at 2 world-changing companies. He's made shareholders 10s of billions of $$ so obviously would not be fired.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> > That said, my belief that there is more than enough funding to take Tesla > private was reinforced during this process.

Is this some kind of threat or positioning towards actors somewhere? Is this like someone in a relationship saying, "I know I be with someone else if I wanted to, but this is working out for now."?

What's the point of all of this, besides saying that Tesla has lots of funding options?

<comment><USER11> I understood this comment as Elon reaffirming to his shareholders that he was not _trying_ to defraud them, and that there actually was adequate funding to take Tesla private. This could also be part of a preemptive legal defense against the SEC in case Elon is formally investigated / questioned. However I feel that the SEC would be more interested in the specific wording of the "funding secured" tweet, which was blatantly false in light of Tesla's previous post [1] (For those who aren't following along: Elon basically only had a verbal offer to take Tesla private from Saudi investors, not anything in writing).

It's also worth mentioning that the idea of breaking long-term financial news for a Fortune 500 company via _Twitter_ of all places is highly unorthodox and suspect in its own right, so I doubt this comment would have much effect in practice.

[1] [https://www.tesla.com/blog/update-taking-Tesla- private](https://www.tesla.com/blog/update-taking-Tesla-private)

<comment><USER12> > It's also worth mentioning that the idea of breaking long-term financial > news for a Fortune 500 company via Twitter of all places is highly > unorthodox and suspect in its own right, so I doubt this comment would have > much effect in practice.

Elon can't have this both ways, though. Tesla has disclosed that it will use social media for financially material announcements, and Elon has embraced this. It can't be legitimate most of the time and illegitimate when it makes for a convenient defense.

Personally, I don't think Elon's intention was to defraud -- I think he was impulsive and careless, and I expect the SEC will reach the same conclusion. But I think if he's going to use Twitter to talk about such things, his tweets need to carry the same weight as an equivalent SEC filing.

<comment><USER13> > _But I think if he 's going to use Twitter to talk about such things, his > tweets need to carry the same weight as an equivalent SEC filing._

A tweet is not an SEC filing and it can never be one. It's 140 characters typed on your phone. It is not reviewed by corporate counsel. It is not reviewed at all.

I'm going to step out on a limb and say this is an important mode of communication. I like having this window into Musk's operations.

But a tweet is just a tweet. It's never the whole story. Here we are dissecting two single words, and some people are saying jail a man.

I say no two words on Twitter can jail a man. Fine him a million dollars a word if you have to.

<comment><USER14> > I say no two words on Twitter can jail a man. Fine him a million dollars a > word if you have to.

By convention, with two words you're 1/3 of the way to a hanging.

</comment></comment></comment></comment></comment><comment><USER15> Elon needs a vacation. Any employee would've been fired for this kind of behavior.

<comment><USER13> I agree, both true. But it would be a terrible shame if Tesla lost Elon.

His is a tremendous asset, even though he doesn't always make the best choices.

</comment></comment><comment><USER16> The SEC will _definitely_ not be amused.

</comment><comment><USER17> There is not a shred of apology for his tweet that caused havoc on Wall Street - but big and small investors were totally taken aback.

<comment><USER18> It's a lot of trouble to go through to get people to forget you called some Thai firefighter a pedo on Twitter...

</comment></comment><comment><USER19> Love that this was posted at 11PM EST on a Friday. Almost like they wanted it to go unnoticed :D

<comment><USER20> This is the responsible thing to do, and what he should have done with the original "announcement". If you announce it after market close on a Friday, there's plenty of time for traders and institutions to chew on it before the opening bell Monday.

</comment></comment><comment><USER21> I am surprised this did not remain on the front page long enough.

</comment><comment><USER22> Any particular reason this thread is getting pushed off the front page? It has twice as many votes as something else above it that is 5x older.

</comment><comment><USER23> Is it normal for a public company to be so beholden to the whims of its CEO?

<comment><USER24> Fairly often, especially for founding CEOs since so much of the company tends to be tied to the founders. And generally when a founder CEO is ousted there's two reasons: 1) there's an incredible amount of bad press (think of Uber and Travis or Papa John's John Schnatter) or 2) the board/investors think that they need to replace the founder with an experienced CEO (think Google). Here, only the first applies.

<comment><USER25> Elon Musk wasn't/isn't the founder of Tesla ...

<comment><USER24> Well crap. Thanks for pointing that out.

</comment></comment></comment></comment><comment><USER26> $TSLAQ it is.

[https://news.ycombinator.com/item?id=17836641](https://news.ycombinator.com/item?id=17836641)

<comment><USER27> I saw that comment before, and I disagree with it. I don't care what some sample of their first pass yield is as long as it's improving and that it hits or exceeds industry norms before they go bankrupt. The mere fact that they have a bad FPY is more indictative of how fast they are scrambling to get this production line going, but if they catch the errors before the cars go out the door then it's simply an expense they'd damn well be reducing as time goes on. Tesla has had shaky launches on every other platform they've released but now they manufacture the S and X platforms effectively. If they can get past the rough period with the Model 3 they will have three high demand platforms they are producing in volume. That's something I believe they can do, which is why I'm a shareholder.

<comment><USER26> "they will have three high demand platforms they are producing in volume."

This is false. S & X sales are flat/slightly decreasing - [http://carsalesbase.com/us-car-sales-data/tesla/tesla- model-...](http://carsalesbase.com/us-car-sales-data/tesla/tesla-model-s/)

Tesla is in awful financial shape - [https://seekingalpha.com/article/4195452-bulls-may- noticed-t...](https://seekingalpha.com/article/4195452-bulls-may-noticed- teslas-growth-story-dead)

Tesla is on the verge of bankruptcy.

<comment><USER28> Main issue seems to be quality of Model 3s and

> Tesla's pitch for several years has been that the company will grow to 1 > million unit in sales in 2020. With a potential future China factory not > producing any meaningful quantities of cars until 2021, investors need to > downgrade the growth prognosis from 1M cars in 2020 to 600K cars in 2021.

</comment></comment></comment></comment><comment><USER29> Knock a bunch of shorts over and take a slap on the wrist, wonder if this was a calculated business move?

<comment><USER16> Any outcome of an _SEC investigation_ isn't a slap on the wrist, and that's not even counting civil investor lawsuits.

<comment><USER29> [https://www.cornerstone.com/GetAttachment/2cd97eeb-1a32-4b51...](https://www.cornerstone.com/GetAttachment/2cd97eeb-1a32-4b51-83ba-7c5624e77318/Securities- Lawsuits-Settlement-Statistics-for-10b.pdf)

<comment><USER16> I'm not sure why you linked a _1997_ PDF.

<comment><USER29> To give you an idea of what a 10b-5 violation looks like. I assure you, there isn't a cost of living increase for SEC violations since 97, this is precedent and having spent the day trying to understand if I'd make this business move, I still hold firm that a 10b-5 violation won't run more than $20-50mill very worst case. a wrist slap.

<comment><USER13> How much does that work out to per word?

<comment><USER29> Depends on how much you value getting 1.3bill in shorts off your back (and into court, I'd suppose)

</comment></comment></comment></comment></comment></comment></comment><comment><USER30> What does this mean for the stock price? Sell off?

</comment><comment><USER31> The Tesla episode on Dirty Money is going to be lit.

</comment><comment><USER32> Many opine that Musk deserves punishment at the hand of the SEC. I disagree, profoundly. His post appears to have been ill-considered, may have been wishful thinking, was possibly driven by spite, and/or even written under the influence of drugs. So what? the government has no constitutional power to threaten or punish people for what they say nor for what they think apart from what they say, except for a few extremely limited instances such as a direct threat of force or libel.

The SEC embodies the modern drift of the administrative state at its worst; its many regulations are not laws passed by Congress, which is the only branch empowered to write legislation. One of the most famous and often used SEC rules is Rule 10b-5, which "prohibits fraud in securities transactions as well as insider trading." Fraud is a form of crime, but trading on one's knowledge involves neither force nor fraud and is simply a manifestation of our basic rights to talk and trade, regardless of what others may or may not know.

The proper rule of markets since Roman time is "Caveat Emptor"; don't rely on nor seek to control or punish the morass of conversations at the local inn or at Twitter. Many thoughtful economists and political philosophers suggest that by and large all of the federal securities laws (originated as part of the New Deal in the 1930s) should be abolished. It may be worth considering, when one small online comment becomes fodder for public calls to have the government severely punish a CEO.

<comment><USER33> He is the CEO and made a materially false statement, while the market was open and investors who believed him bought at a high of $380 based on a promise of a buyout at $420, only to have it plummet days later. The odds are pretty good that it will dip further when markets open Monday.

Actions have consequences.</comment></comment>


Was Einstein really a poor student? - <AUTHOR> http://skeptics.stackexchange.com/questions/956/was-einstein-really-a-poor-student <comment><USER2> This has a few roots:

* It's said he didn't speak till he was (I forget) ~8. I'd believe it - speech develops at different times, and I doubt it has any reflection on adult intelligence.

* He joked that his math wasn't very good. That makes him modest, not a bad student.

* He didn't know how to do the math for non-Euclidian, to develop general relativity (though he did have a vague idea that he needed a curved space, and what it meant, and he vaguely remembered doing it at uni - which shows he wasn't too ignorant), and had a friend help him get up to speed.

* He was probably not the sharpest mathematician in the room, once he was famous enough that every room he walked into would quickly become crowded with the sharpest mathematicians in the world.

* He may not have really liked school, but he obviously liked learning.

Most importantly, everyone likes to think that you can succeed without trying.

<comment><USER3> _He was probably not the sharpest mathematician in the room, once he was famous enough that every room he walked into would quickly become crowded with the sharpest mathematicians in the world._

This, I can't help thinking, would be a good problem to have :)

</comment></comment><comment><USER4> Here is Einstein's certificate for the year 1879 (he was 10):

[http://www.scienceblogs.de/frischer-wind/einsteins- zeugnis.j...](http://www.scienceblogs.de/frischer-wind/einsteins-zeugnis.jpg)

Long story short, he obtained the best score (6) in the three mathematical topics (algebra, geometry and descriptive geometry) and in physics.

I guess one of the reasons the myth has endured so long may be that it makes for such a great story. A sort of intellectual rags-to-riches, so to speak.

Edit: corrected the physics score.

<comment><USER5> I was a top student (always perfect score) up until I was 11

After that I was still a great student, but not the top and not straight As. I still liked math.

By the end of high school, I was extremely dis-interested in math and specially in calculus. It all seemed like arbitrary pointless rules. (I blame the teachers and the curriculum).

<comment><USER6> How do we change this?

<comment><USER7> _How do we change this?_

Here are some suggestions for improving the mathematics education of pupils who show early advanced abilities in mathematics:

[http://www.artofproblemsolving.com/Resources/articles.php?pa...](http://www.artofproblemsolving.com/Resources/articles.php?page=calculustrap)

[http://www.artofproblemsolving.com/Resources/articles.php?pa...](http://www.artofproblemsolving.com/Resources/articles.php?page=problemsolving)

[http://www.artofproblemsolving.com/Resources/articles.php?pa...](http://www.artofproblemsolving.com/Resources/articles.php?page=discretemath)

[http://www.artofproblemsolving.com/Resources/articles.php?pa...](http://www.artofproblemsolving.com/Resources/articles.php?page=learning)

[http://www.artofproblemsolving.com/Resources/articles.php?pa...](http://www.artofproblemsolving.com/Resources/articles.php?page=stupidquestions)

(Summary of the advice linked above is make sure students learn mathematics beyond the standard school curriculum, which is not designed for the top students, and make sure the top students have a chance to meet one another and to challenge themselves with difficult problems that they can discuss afterwards. The site that provides those links provides many of the opportunities necessary, largely for free.)

Here is commentary by a Fields medalist on what successful mathematics education looks like over the long haul:

<http://arxiv.org/PS_cache/math/pdf/0503/0503081v1.pdf>

(Summary of Thurston's advice is emphasize connectedness of mathematics and deep understanding over racing through the standard curriculum.)

</comment></comment></comment></comment><comment><USER8> I don't know whether he was a "good" or "bad" student. He was certainly a disinterested one, as there wasn't great overlap between what he thought about and what they were trying to teach. He must have been an effective one, however, as he picked up the information needed to solve problems in many fields, expand physics, and have a "typically European scientist" level of culture.

For those in science, most dream of having a career that can compare to his 1905.

<comment><USER9> _Most_? You can think of an exception?

<comment><USER8> Some do science to teach, and many do science to cure a particular problem. The first set is probably orthogonal, but while most people won't equate a successful drug launched to market as 1905-like, those trying to cure a disease would disagree.

Different strokes for different folks. Hell, some probably do science for the bucks, as being an academic with the hot med/bio topic can result in serious coin.

</comment></comment></comment><comment><USER10> The story that I have always heard is not that he got bad grades, but that he was a "poor student" in a more general sense, that he was extremely disinterested. I remember hearing claims that his teachers complained to his parents: "he just sits at the back and smiles."

</comment><comment><USER11> I'm reminded of what was probably my favorite single Calvin and Hobbes strip: "You know how Einstein got bad grades as a kid? Well, mine are even worse!"

</comment><comment><USER7> Albert Einstein (1879-1955), co-winner of the 1921 Nobel Prize in physics, wrote this statement about his own schooling, in an autobiographical essay he wrote for the introductory material of a book about his role as a philosopher of science:

". . . I worked most of the time in the physical laboratory [at the Polytechnic Institute of Zürich], fascinated by the direct contact with experience. The balance of the time I used in the main in order to study at home the works of Kirchoff, Helmholtz, Hertz, etc. . . . In [physics], however, I soon learned to scent out that which was able to lead to fundamentals and to turn aside from everything else, from the multitude of things which clutter up the mind and divert it from the essential. The hitch in this was, of course, the fact that one had to cram all this stuff into one's mind for the examinations, whether one liked it or not. This coercion had such a deterring effect [upon me] that, after I had passed the final examination, I found the consideration of any scientific problems distasteful to me for an entire year. In justice I must add, moreover, that in Switzerland we had to suffer far less under such coercion, which smothers every truly scientific impulse, than is the case in many another locality. There were altogether only two examinations; aside from these, one could just about do as one pleased. This was especially the case if one had a friend, as did I, who attended the lectures regularly and who worked over their content conscientiously. This gave one freedom in the choice of pursuits until a few months before the examination, a freedom which I enjoyed to a great extent and have gladly taken into the bargain the bad conscience connected with it as by far the lesser evil. It is, in fact, nothing short of a miracle that the modern methods of instruction have not yet entirely strangled the holy curiosity of inquiry; for this delicate little plant, aside from stimulation, stands mainly in need of freedom; without this it goes to wreck and ruin without fail. It is a very grave mistake to think that the enjoyment of seeing and searching can be promoted by means of coercion and a sense of duty. To the contrary, I believe it would be possible to rob even a healthy beast of prey of its voraciousness, if it were possible, with the aid of a whip, to force the beast to devour continuously, even when not hungry, especially if the food, handed out under such coercion, were to be selected accordingly."

"Autobiographical Notes," in _Albert Einstein: Philosopher-Scientist,_ Paul Schilpp, ed. (1951), pp. 17-19 © 1951 by the Library of Living Philosophers, Inc.

<http://learninfreedom.org/Nobel_hates_school.html>

John Kemeny, who was Einstein's assistant at the Institute for Advanced Study, commented on Einstein's pattern of developed abilities that "Einstein did not need help in physics. But contrary to popular belief, Einstein did need help in mathematics. By which I do not mean that he wasn't good at mathematics. He was very good at it, but he was not an up-to-date research level mathematician. His assistants were mathematicians for two reasons. First of all, in just ordinary calculations, anybody makes mistakes. There were many long calculations, deriving one formula from another to solve a differential equation. They go on forever. Any number of times we got the wrong answer. Sometimes one of us got the wrong answer, sometimes the other. The calculations were long enough that if you got the same answer at the end, you were confident. So he needed an assistant for that, and, frankly, I was more up-to-date in mathematics than he was."

<http://scidiv.bellevuecollege.edu/math/Kemeny.html>

<comment><USER12> I fact he was the sole-winner of the Nobel Prize in Physics for 1921

<comment><USER7> <http://nobelprize.org/nobel_prizes/physics/laureates/1921/>

Yes. Awarded a year later, which may be the detail I was remembering.

</comment></comment></comment><comment> brown9-2 Is it common in the Swiss school system for students to take classes in four different languages (German, English, French, Italian), or did Einstein attend a special/elite school?

<comment><USER13> It wouldn't surprise me since French, Italian and German are three of the four official languages of Switzerland. (I don't know whether that was the case in 1897 but those three languages were definitely all spoken in Switzerland in 1897.)

Today students in Swiss secondary education have to learn at least two non- native languages (besides their native language), one of those two has to be one of the official Swiss languages. Einstein only learned one more language, that doesn't seem extraordinary.

It would be nice if someone from Switzerland could shed some more light on this. The situation in, for example, Germany is as follows: If you want to continue on to university learning two languages is standard, learning a third language is optional but possible pretty much everywhere. The four available languages in my school were English, French, Latin [0] and Spanish and you could pick up to three of those. (Only certain combinations were possible, English was always the first foreign language and you had to take it.)

[0] I still hate myself for picking Latin. It's beyond useless.

<comment><USER14> You are correct.

I am from the French-speaking part of Switzerland, I started learning German in kindergarten (though those lessons were mostly useless until 7th grade). By 9th grade I had French, German, English and two options : Latin and Ancient Greek. (All students were required to stay from 8AM to 4PM at school, those who didn't study ancient languages just sat in a room guarded by a teacher whose task was to make sure they did not talk to each other too much).

In High School it was a bit different, you had to choose between German and Italian (Two of the four official languages) and between English and Ancient Greek (Yes, some people actually pick Ancient Greek) and an option, which spans from Math, Biology/Chemistry or Psychology to Latin, Spanish or Italian.

None of these choices actually restrict what you can study later in college.

</comment></comment></comment><comment><USER15> When I hear about geniuses that lived, most of the time I hear about how awesome their memory was ... which worries me, as I can't even remember the names of people I meet without effort and this would mean that I may never be good enough for anything, so why bother?

But Einstein wasn't one of those people. His IQ may have been great, but he wasn't one of those people that could recite all U.S. states or presidents at age 6.

What I like about Einstein is that he worked hard for his whole life. Whatever disability he may have had regarding his memory, he compensated multiple times by being persistent and obsessed with his work.

<comment><USER16> You might also like to look at Grothendieck. He wrote how he felt like a plodding turtle compared to his peers. Hilbert also must've seemed slow.

Of course, when people write stories on mental feats, they'll choose a more showoffy person who can do well on the tests that people remember from childhood. That means fewer stories about people taking time to think about things in their own way.

(What horrors would result if a schoolchild got it into her head that maybe she should just take a day off from school and lie in a hammock and think? That kind of crazy thinking gets you Clojure. (<http://clojure.blip.tv/file/4457042/)>)

<comment><USER16> (I checked Grothendieck's quote after I got home. It wasn't "plodding turtle" but rather "dumb ox.")

</comment></comment></comment><comment><USER17> If you're not talented at math when you're younger, there's practically no hope for you to be good at it later. Given that Einstein did a good bit of math for the physics he was involved with, you can be pretty confident he was sharp when he was younger.

</comment><comment><USER18> I seem to recall he had trouble getting into university... which I guess is supported by him being a patent examiner, instead of a student.

<comment><USER18> No, it was that he had trouble getting a teaching post: <http://en.wikipedia.org/wiki/Albert_Einstein#Patent_office></comment></comment>


Google Code University - <AUTHOR> http://code.google.com/intl/ja/edu/languages/index.html

<comment><USER2> The general (not just "languages" section) site being <http://code.google.com/intl/en/edu/>

</comment><comment><USER3> This isn't exactly the same thing, but for anyone interested in the tech/science side of photography (optics, human color vision, silicon sensors, algorithms converting raw camera data to usable images, &c. &c.), I recommend Dick Lyon's series of "Photographic Technology" lectures at google, a couple dozen hours of material:

<http://www.dicklyon.com/phototech/>

</comment><comment><USER4> Thanks for alerting me to this. There's also a lot of great stuff available from the 'iTunes University' - whole video lecture series from Stanford among others. You can also access most of the support material through the Stanford website. It's awfully generous of them!

</comment><comment><USER5> "New Features in the Next C++ Standard" doesn't work (deleted by user), anyone got working link?

</comment><comment><USER6> I also really like <http://proglit.com/core-units/>

More geared toward beginners, it covers basic programming concepts, C, Javascript, Java, Clojure, etc.

</comment><comment><USER7> No functional programming languages? (Except for the bit in Python.)</comment>


A startup's "Why we use Lisp" story - <AUTHOR> http://article.gmane.org/gmane.lisp.lispworks.general/9675 <comment><USER3> Lisp is a beautiful language but I think the biggest problem with it is its proponents failing to explain the merits. I'm sorry, this post would have probably made a bit more sense 15 years ago, but definitely not now.

> (a) Very fast development that is enabled by CL (e.g., _everything_ from > hash tables to string-operators to memory management is automatically > included - there is nothing that is not included).

Name a modern mainstream language that doesn't have these things.

> (b) Excellent programming environments - e.g., parentheses-savvy editor.

You haven't seen XCode, Delphi or MS Visual Studio, where, for example, you can jump to the definition of a symbol with "one click", allow interactive step-by-step debugging with variable watch, disassembly, stack trace, etc - <USER2> shouldn't really name all the things that are possible in a typical modern IDE. And I don't know any text editor which is not paren-savvy.

> (c) Excellent compiler, especially with declarations, enables very fast > code.

A compiler which doesn't "enable very fast code" has no place under the sun nowadays.

> (d) Excellent system stability with no random crashes at all.

Very exciting, although GC-based languages (i.e. those usually lacking pointers) should not crash at all, or if they do crash that's a shame. Stability and robustness of your compiler and your runtime system shouldn't really be mentioned as a merit. If it doesn't meet stability standards, it shouldn't be released.

> (e) Macros and all that.

Finally getting to the point and you say "and all that"? Btw, "all that" includes unification of code and data - something no other language provides, let's say, idiomatically. This is an amazing feature, and in fact Lisp macros are Lisp macros thanks to just that - unification of code and data and symbolic nature of the language.

Memory footprint: megabytes do matter because of the CPU cache. A 30,000 LOC program should take a few megabytes at most and fit a modern CPU cache entirely. Compared to a 50MB program the performance gain can be enormous.

<comment><USER4> "You haven't seen XCode, Delphi or MS Visual Studio, where, for example, you can jump to the definition of a symbol with "one click""

That's an old feature. It used to be called "ctags" and even console-based text editors support it.

"Finally getting to the point and you say "and all that"? Btw, "all that" includes unification of code and data - something no other language provides, let's say, idiomatically. This is an amazing feature, and in fact Lisp macros are Lisp macros thanks to just that - unification of code and data and symbolic nature of the language."

Lisp's problem seems to be that, until you know how to use macros and code/data unification, you can't be easily convinced of their merits. It takes a considerable commitment to learn Lisp before you can reach that level, though.

<comment><USER5> Yeah, Slime does this and without ctags, I believe most lisps keep track of the location of definitions in source.

But what's a definition? Slime does this for defun/defvar etc, but not for things defined with, say, hunchentoot's define-easy-handler. Can you tell your IDE to take me to that location in a single keystroke? Maybe Slime supports adding definition types, I have no idea. Or maybe it throws up its hands because of the potential naming conflicts.

All this makes you wonder whether Lisp is too powerful for any IDE to keep up.

<comment><USER6> LispWorks does that. You can add your own ways to record source locations of your definition forms.

[http://www.lispworks.com/documentation/lw60/LW/html/lw-60.ht...](http://www.lispworks.com/documentation/lw60/LW/html/lw-60.htm)

</comment></comment></comment></comment><comment><USER7> This is the key point:

 _I started programming in LISP way back in 1971 on a Univac 1108 mainframe and also implemented a 68000-based Lisp system (~50K lines of real-time assembly) for mobile-robotics use in 1983 - and so know my way around the language._

All Lisp (or Smalltalk, or...) success stories I've read hinge on someone with an enormous amount of experience with the language. I'd argue that someone with that much experience could get the job done in (almost) any language. I'm surprised that someone with that much experience would put it down to language choice rather than deep knowledge of the problem domain.

<comment><USER8> That is close to saying that all languages are equivalent given the same amount of experience. I don't buy that. For a specific task some languages may be better suited / more productive than other languages, even given equivalent levels of experience.

I don't believe in a global linear scale of language power ("the blub theory"), but I do believe that some language may be better than others for a specific task given specific constraints.

E.g. if I have equivalent levels of experience in C++ and Python, I'm pretty sure I can write small webapp quicker in Python. OTOH if the languages are very similar, like Python and Ruby, the level of experience is much more important that the relative strengths and weaknesses of the languages.

Of course, it is seldom that you get that kind of fair comparison between two languages - usually everyone has a favorite language they know better than any other.

<comment><USER9> In some place I read that differences in languages could account for at most 30% of improvements in speed of development. This is an epsilon if compared to differences between programmers.

Another issue is that, if you are talking about small-to-medium sized applications then clearly there is a difference in languages. For example, it is pretty clear that writing a script is easier in perl than in C, or writing a medium sized expert system is easier in LISP than in Pascal.

However, if you consider large scale applications (100k+ LOC), then I don't believe there is any difference between writing in C, C++, Java, or Common LISP, as long as the programmer(s) have deep experience with the used language.

Just notice that the language is not going to solve the large-scale problem by itself. As long as such language has tools for creating abstractions, the code will have about the same complexity no matter what. If that complexity will be encapsulated in simple concepts (structs and functions) or higher level concepts (closures and continuation) depends on the taste of the developers and the language used.

<comment> loup-vaillant 30% is an understatement. Think of the productivity gain when you go from assembly to C. Now, consider the fact (I do mean _fact_ ) that the jump from assembly to C and the jump from C to LISP are comparable.

The choice of abstraction _do_ matter. If you use weak ones, your productivity is taking a serious hit: your program will be bigger, more complex, and have more errors (squared).

C++ abstractions, for instance, are incredibly weak. Take the function abstraction, which isn't even complete: you have no way to write anonymous functions the way you write literal integers[1]. Higher level concepts, as you call them, aren't more complicated than the "simple" ones. Often, they are just less familiar and more consistent.

[1]: Anonymous functions should actually be called "literal functions":

        (fun x -> 7 x + 42) -- a literal function
        357                 -- a literal integer
        2 + 3               -- expression which yields a integer
        f . g               -- expression which yields a function

Nothing "high order" about that. This is just acknowledging that functions are mathematical objects like any other.

<comment><USER10> Funny, I went to a talk today on statistical methods for opinion analysis, and in the annotated corpus presented, the only opinion word that was used more often in a subjective frame than an objective frame is the word "fact".

</comment></comment></comment></comment></comment><comment><USER11> >(d) Excellent system stability with no random crashes at all.

This is interesting, considering one of the main reasons Reddit switched from Lisp to Python was because it was crashing often.

<comment><USER6> that was another Lisp implementation

</comment></comment><comment><USER12> I don't understand why a Lisp hacker wouldn't match parens properly when ending a parenthetical statement with a smiley:

      (commentless, of course :)

Hasn't he seen xkcd: <http://xkcd.com/541/> ?

<comment><USER13> If you do it the double-chinned XKCD way, it messes up your auto-balancing text editor.

<comment> loup-vaillant …which you obviously use to write your e-mails.

<comment><USER14> Apparently you don't know anyone who spends 90% of their working time in emacs.

<comment> loup-vaillant I do. :-(whoops, I don't : he uses the _other_ editor).

</comment></comment></comment></comment></comment><comment><USER15> Seems to me this discussion is missing one of the main points of the original post: a massive plug for an unfairly under-appreciated book:

      > "Let Over Lambda"
      > (which is really quite scary to read - I can't say that I understand
      > 100% of it - maybe 60% and I am very happy with that level of
      > comprehension) -- you end up with an enormously powerful set of
      > programming tools unlike anything else out there.

I really like this book too and recommend it.

<http://letoverlambda.com/index.cl/toc>

</comment><comment><USER16> A friend of mine keeps asking me to dump Lisp and "Get modern" with C#, and I try to explain why I prefer Lisp, but he won't accept it.

It was Paul Graham's essay that encouraged me to try Lisp in 2005.

<comment><USER17> I'm just dreading the day that Microsoft decides that C# isn't modern enough and they want to sell a whole bunch of seats of Visual Studio (insert new name here)

<comment><USER18> They release new versions of Visual Studio every few years, and C# is updated almost as regularly. C# / .net 4.0 will be released this year (as will Visual Studio 2010).

The differences between C# 1.0 and 4.0 are _enormous_. Microsoft isn't shy about making changes to the language.

</comment></comment></comment><comment><USER19> "Excellent system stability with no random crashes at all"

This holds for pretty much any language you care to use.

<comment><USER20> People keep saying that, and I can understand where they are coming from, but this isn't the case. Just yesterday, I managed to segfault python 2.6.something. I have no idea why (I really should have figured it out) but my hypothesis is that I freaked out the parser. It was vanilla python code; it should never segfault. I have had the same experience with the JVM: I once segfaulted the parser by incorporating a static string that was hundreds of lines long. Curiously, Eclipse "compiled" it just fine.

Sometimes environments have bugs. If you need an underlying runtime that simply will not crash, using something tried and true may be at the top of your priority list. That might be overkill for most projects, but I can see a guy who wants something so robust he knows its his fault when it breaks.

<comment><USER19> So based on your experience (as a comp sci student, I'm assuming, based on your other comment), Python and the JVM are both 'crashy', but you don't happen to remember exactly why?

Reminds me of a bunch of compiler bugs I found back in the day. Strangely the longer I program, the fewer of these compiler bugs I seem to be able to find.

<comment><USER20> I am going to defend myself. Then, I am going blow my argument out of the water.

Backstory: I am a fifth year comp sci student. I have worked part-time as an SDE for most of my college career. The python crash I referenced earlier was in class, the java problem at work. I have written an optimizing compiler before (C subset to LLVM to SPARC MIPS), so I hope that you will at least agree that I am not a complete moron in this area.

Java story, more detail: To make a really long story short: I wanted to move a really really long stored procedure (~2k LOC) into a JDBC query. Don't ask why, it was a very scary legacy issue. So I copy and paste the stored procedure into one long const string in eclipse, and it compiles just fine. I run our ant script against it, and it explodes with a stack overflow (IIRC). The solution that I found was simply to replace newlines with \n" + (newline). No stack overflow on compilation anymore. From this I could only assume that I had fubared the compiler (which would have been a reasonable way to fubar, being as I was trying to create an absolutely massive const string directly).

Now we could quibble over whether this even counts as a crash in the sense we were talking about, but the underlying premise is: you never want to have to work around your tools. As computer scientists we do it a lot, but it is never fun and its worse when something goes down in production because the tool crapped out. Theoretically, a VM or OS should never fail and bring the entire system down. A compiler should never outright crash.

Now to debunk my own defense: I just sat down for about an hour and did everything I could to reproduce the bug in JDK 1.5.6 (the original JDK I broke it on). Well, go figure, I can't get it to break in the hypothetical way I wanted to. I might one day do exactly what I did with the stored procedure, but setting that _particular_ environment up again would take quite some time.

In conclusion, you can assume I was an idiot because I can't show you the code. I would in your shoes. :)

P.S. This all assumes you are using tools given to you by the platform itself. Using JNI to dereference a NULL doesn't count. :D

<comment><USER21> That's not a 'random crash.' The compiler ran out of memory trying to compile your file. Stack space is not infinite, a typical Java VM comes with some default which can also be reconfigured. After running out of memory, the compiler told you what the error condition was and exited.

<comment><USER6> Why not extend the stack at runtime?

LispWorks:

        CL-USER 101 > (defun foo (n) (unless (zerop n) (cons n (foo (1- n)))))
        FOO

        CL-USER 102 > (foo 1000)

        Stack overflow (stack size 15998).
          1 (continue) Extend stack by 50%.
          2 Extend stack by 300%.
          3 (abort) Return to level 0.
          4 Return to top loop level 0.

        Type :b for backtrace or :c <option number> to proceed.
        Type :bug-form "<subject>" for a bug report template or :? for other options.

         CL-USER 103 : 1 >

Now use restart 1 or 2.

</comment></comment></comment></comment></comment></comment><comment><USER22> Apparently iRobot also uses Lisp in an embedded context.

<comment><USER23> iRobot used to do embedded Lisp (back when they called themselves IS Robotics), but I haven't heard anything indicating that they still are. See <http://lemonodor.com/archives/2004/08/l_mars_venus.html>

They had L, their Lisp dialect, and Mars, the macro layer for doing robotics in L.

The paper "L - A Common Lisp for Embedded Systems" is available at <http://www.cs.cmu.edu/~chuck/pubpg/luv95.pdf>

<comment><USER22> The last I heard Rod Brooks said all the pacbots software was written in Lisp.</comment></comment></comment>


Tim Armstrong's Secret Project Is To Turn AOL Into A Low-Cost Content Machine - <AUTHOR> http://www.techcrunch.com/2009/10/24/tim-armstrongs-secret-project-is-to-turn-aol-into-a-low-cost-content-machine/ <comment><USER2> Hmmm.... interesting idea. :-P</comment>


JUP - Javascript Markup - <AUTHOR> http://github.com/h4xit/JUP

<comment><USER2> Just typing out loud here: I usually just define a function called Tag which returns a jquery handle to said tag i.e.

      function tag(name) {
        return $('<' + name +'></' + name + '>');
      }

      tag('div').append(
        tag('ul').append(
          tag('li').html('a'),
          tag('li').html('b')))

which would become:

      ['div',
         ['ul',
            ['li', 'a'],
            ['li', 'b']]]

That seems substantially nicer to look at - but lacks the ability to easily add event handlers etc. that I get w/ the jquery approach. There is no reason it could not be inter-operable though:

      ['div', tag('span').html('click me').click(function(){alert('clicked')})];

</comment><comment><USER3> Awesome. If functions are allowed as data, evaluated as they're encountered, this has great potential.

</comment><comment><USER4> jquery-haml is a very similar project whose syntax is based on Haml: <http://github.com/creationix/jquery-haml>.

I'm working on a templating extension to it, which'll be at <http://github.com/Sidnicious/jquery-haml-templater>.

</comment><comment><USER5> Looks ideal if you need a lot of DOM with dynamically generated structure.

</comment><comment><USER6> Could be powerful using node.js and a server side DOM implementation</comment>


Super-resolution from a single image - <AUTHOR> http://www.wisdom.weizmann.ac.il/~vision/SingleImageSR.html <comment><USER2> I was skeptical of the bottom line of the eye chart image. characters are 3x3 pixels. The o should translate to a dot. there is no hole.

Their explanation for it:

"The lines of letters have been recovered quite well due to the existence of cross-scale patch recurrence in those image areas. However, the small digits on the left margin of the image could not be recovered, since their patches recurrence occurs only within the same (input) scale. Thus their resulting unified SR constraints reduce to the "classical" SR constraints (imposed on multiple patches within the input image). The resulting resolution of the digits is better than the bicubic interpolation, but suffers from the inherent limits of classical SR [3, 14]."

So it's guessing based on the larger characters. Neat.

Here's their last line:

DKN?MULJSPAVMRA?C?OVZO

Here's the actual:

DKNTWULJSPXVMRAHCFOYZG

(from what I can read.)

( [http://1.bp.blogspot.com/-VgvutrSWaFk/T4VI-2tDH2I/AAAAAAAAAX...](http://1.bp.blogspot.com/-VgvutrSWaFk/T4VI-2tDH2I/AAAAAAAAAXY/tx60XCDeAxI/s1600/reading+glasses+eye+chart.jpg) )

This could probably help ocr.

Other than this, I think Genuine Fractals and BenVista PhotoZoom give similar results.

<comment><USER3> So where are the '?' coming from? I think I have to call shenanigans / database, there aren't any in the image, or even any shapes like it. But then, I'm not sure what they're implying with this paragraph (this is the whole paragraph, my additions not italicized):

> _Fig. 6_ [the eye chart] _compares our unified SR result against ground > truth. In Fig. 7_ [baby with hat] _we compare our method to results from > [11,13] and [9]. Note that our results are comparable, even though we do not > use any external database of low-res/highres pairs of patches [11, 13], nor > a parametric learned edge model [9]. Other examples with more comparisons to > other methods can be found in the paper's website._

<comment><USER2> I added the ? when I could not read it. Normal SR can only do so much with a 3x3 pixel blur.

But their bottom line is mostly correct because their process also uses larger versions of the same pattern to replace the smaller ones.

So, there was not a much larger T, so it made a little fuzzball instead. So I wrote "?".

<comment><USER3> There are '?' characters in the paper's PDF as well, page 7.

</comment></comment></comment></comment><comment><USER4> Dear Mr. Glasner, Bagon, and Irani (authors of the super-resolution paper):

Please apply this technique to resolve a historically important question about the assassination of President John F. Kennedy by identifying the license plate number of the car immediately behind the bus:

[http://i754.photobucket.com/albums/xx183/twsxpress/Forum2/Ye...](http://i754.photobucket.com/albums/xx183/twsxpress/Forum2/Yellow_Transit_Van.png)

[http://i754.photobucket.com/albums/xx183/twsxpress/Forum2/mu...](http://i754.photobucket.com/albums/xx183/twsxpress/Forum2/murry1240.jpg)

Better resolution photos should be available since the ones I've seen printed in books are better than these. And there are plenty of photos of Texas license plates from 1963 with which to seed your algorithm.

The reason this is interesting is because Roger Craig, a Deputy Sheriff in Dallas, after he witnessed the assassination said that he saw Lee Harvey Oswald run from the Texas School Book Depository and get into Nash Rambler station wagon driven by a another man.

These photos show a Nash Rambler station wagon that was indeed passing the Depository just after the assassination. If motor vehicle records still exist for 1963, then its owner can be identified.

The key point is that the existence of a person picking up Oswald after the assassination would strongly indicate the possibility that he was not acting alone.

I'll readily grant that this isn't likely to settle the issue, but I think it still would be amazing if the super-resolution approach was able to generate _new information_ about a topic that no one expects to ever see new information about.

<comment><AUTHOR> I'm not an expert on this algorithm, but I'm quite sure that the algorithm does not recover information which exists in the image; rather, it invents information which categorically does _not_ exist. Since both the natural world and many built objects are quasi-fractal in nature (repeating windows in a building, leaves on a plant, etc.), the information which it invents often happens to be correct. For non-fractal items like license plates, however, there's no chance that it would produce a useful result.

I'm pretty sure that if you seeded the algorithm with images of many other Texas license plates, and then asked it to sharpen this image, what you'd get would simply be the super-resolution sum of all the other Texas license plates. It would show you something that _looked_ intelligible, but actually had absolutely nothing to do with the original image. That would do more to confuse the issue than to shed light on it.

The other point is that I'm not sure how well this would actually work on _blurry_ images, or whether (as a super-resolution technique) it's very specialised for working on _pixelated_ images.

That said, if it can work on blurry images too, then it would be a fun and interesting exercise to see what other historical images could yield insight (or confusion) with this kind of enhancement.

<comment><USER5> There was a hack a little while ago where someone demonstrated reading digits from a pixelated image, with no more information than the font used. That's _precisely_ what would happen here.

<comment><USER6> The hack you're referring to works because the input space is very small and well-defined, and the blur filter that's being applied is perfectly predictable. There's no truly random noise involved.

If instead you printed the document out and blurred it with a wet sponge, it would be much harder to reverse, because the real world is much noisier.

Similarly, an analog photo at the limit of its resolution is full of real noise that's hard to remove.

</comment></comment></comment></comment><comment><USER7> I'd be curious to know at what magnification this breaks down, if any. For instance, most of the images have been enlarged by about 3x or 4x. What happens when you blow them up to, say, 20x? It seems like this algorithm does some sort of vectorization -- because look at how crisp the lines are -- which would suggest to me that it scale well. But maybe I'm wrong.

<comment><USER8> it could just be emphasizing edges. The very first picture of the baby had a rather overemphasized edge around his face, and yet it doesn't look like a vector.

</comment></comment><comment><USER9> Some of these images are in uncanny-valley territory for me. The bicubic images just look resized to me, but super-resolution images look real but "wrong". Given how much more "real" they still look than many computer graphics (especially realtime), I guess we won't leave uncanny valley behind us anytime soon.

<comment><USER10> thank you for saying the same thing I was thinking. It's pretty neat when you consider the title of the paper, but the actual results just seem wrong. Not really sure why!

</comment></comment><comment><USER11> So this means that CSI's "enhance" is actually more possible than reputed.

<comment><USER12> This doesn't actually add information, it just creates a magnified image that looks nicer than bicubic.

<comment><USER13> It's a shame that hamburglar is hellbanned because his comment is insightful. In some sense, isn't this algorithm "inventing" detail? If you're lucky the detail corresponds closely to what should be there, but sometimes it doesn't and thus it can't be relied upon.

<comment><USER14> For those without showdead one, hamburglar's comment:

 _Yeah, and in fact the fact that it looks crisper can be misleading. You can't rely on a detail that a method like this infers from the low resolution image. Look at the green tiles on the kitchen floor in the 6th example. The "Our SR Result" image looks fantastic, but it's obvious that it's false, because the tiles end up misshapen and unevenly spaced. You really wouldn't want to convict someone of murder based on this type of enhancement._

<comment><USER11> I can't reply to him directly, so I'll do it here. You wouldn't want to convict someone of murder, no. But you could certainly use it to generate leads.

<comment><USER15> The scary thing comes when people stare using it to convict someone of murder. CSI has trained us to do things like that :/

</comment></comment></comment></comment></comment></comment><comment><USER16> I'm a little late to the party, but super-resolution is a topic of interest in computer vision, and this approach is one of many that have been recently proposed. At a high level, I should say that the field is still searching for the right approach, and there is by no means a consensus that this method (or more generally, this philosophy) is the right one.

As a general rule of thumb, the performance shown in example figures of a computer vision paper should be taken as best cases (and in some papers, as outliers), and even the "failures" shown are often not the worst or most typical. Similarly, quantitative results are generally as optimistic as possible, arrived at through "graduate student descent" of the parameter space.

So I think we are still quite far from a super-resolution method that is truly practical OR effective.

Some specific points about this paper:

\- This research group has a long history of exploring methods based on exploiting self-similarity in images for various tasks (super-resolution, denoising, segmentation, etc.), and although they have shown remarkable progress on this front, it is generally agreed that using more than just a single image would improve results drastically for just about any task.

\- The use of more-than-exhaustive self-similarity search is EXTREMELY expensive, however, and that's why runtime is often not mentioned in these papers. It's not uncommon for processing times to be on the order of DAYS, for a single tiny VGA image. (I don't remember whether they quote a number in this paper or not, but it's certainly not faster than a few hours per image, unless you start using some hacks.)

\- As others have commented, this method is not actually extracting new information from the image, but rather "hallucinating" information based on similar parts of the image. There is certainly reasonable justification for its use as a prior, but it's not clear whether it's optimal, or even close to it.

\- My gut feeling is that super resolution methods will find much more application in compression-related areas rather than CSI-esque forensics. For example, JPEG compression is roughly 30%. But downsample an image by 2x in each direction and your compression ratio is already 25%. So if you can downsample images a few times and then use super-resolution to "hallucinate" a high-resolution version, that's probably good enough for the vast majority of common images (e.g., facebook photos), where users aren't very sensitive to quantitative "correctness". And of course with mobile adoption happening much faster than mobile bandwidth is increasing, this becomes an ideal application domain.

<comment><USER17> > "graduate student descent" of the parameter space

 _that_ is a wonderful phrase :) going to keep it in mind :)

</comment></comment><comment><USER18> <http://en.wikipedia.org/wiki/Super-resolution>

Implementation in Python: <http://mentat.za.net/supreme/>

<comment><USER19> How do I use the Python Implementation?

<comment><USER5> Looks like [http://mentat.za.net/supreme/doc/api/supreme.resolve.html#so...](http://mentat.za.net/supreme/doc/api/supreme.resolve.html#solve) might help.

</comment></comment></comment><comment><USER20> Maybe Apple can take this algorithm and use it as the scaling algorithm for low res images on retina displays.

<comment><USER21> This algorithm is likely very slow. In fact, the authors didn't mention runtime at all.

<comment><USER12> Yes, there are other high performance candidates that work well with line art. <http://en.wikipedia.org/wiki/Hq3x>

<comment><USER22> Depixelizing Pixel Art may work even better for some types of images: <http://research.microsoft.com/en-us/um/people/kopf/pixelart/> "The algorithm extracts a smooth, resolution-independent vector representation from the image, which enables magnifying the results by an arbitrary amount without image degradation."

</comment></comment></comment></comment><comment><USER23> The first application that comes to my mind is improving the quality of photos in real estate listings. Half the time it looks like they were taken by a camera phone circa 1995 by someone who was skipping from room to room.

</comment><comment><USER24> I just noticed that this is from a 2009 paper. Has this method made its way into any products by now?

<comment><USER25> Techniques like this have been used in some high-end sensor applications since (at least) the 1990s. It was an option for increasing discrimination resolution via DSP that could not practically be accomplished via higher resolution sensors due to things like space constraints given the technology of the time. It is probably less useful today due to ongoing miniaturization of imaging sensors.

<comment><USER26> > It is probably less useful today due to ongoing miniaturization of imaging > sensors.

Not really. Dig into concepts called _sparsity_ and _compressed sensing_ , which are quite similar algorithms (not really the algorithms, but the underlying ideas).

I can't find the authors' original website, only this old wired article from 2010: <http://www.wired.com/magazine/2010/02/ff_algorithm/2/>

So especially with the ongoing miniaturization of imaging sensors, which will allow you to take even bigger and bigger pictures, there are issues these algorithms could solve, unless SD cards get really cheap really fast I guess.

<comment><USER25> I meant less useful for the purposes which such algorithms were originally designed for two decades ago. They original use cases were discrimination, not making prettier pictures. I am quite familiar with compressive sampling.

</comment></comment></comment></comment><comment><USER27> This should be integrated into web browsers. Seems like it would particularly benefit people with high-density displays.

</comment><comment><USER28> Are there any decent photoshop plugins that will achieve a similar result to this? Would love to have this in my workflow.

<comment><USER29> PhotoAcute does super-resolution very well: <http://www.photoacute.com/>

</comment></comment><comment><USER30> The subjective effect reminds me strongly of 2xSaI and hqnx upscaling filters, although of course those only work well for pixel art.

</comment><comment><USER8> Is there any information on how computationally expensive this is?

<comment><USER31> As I understand, the complexity is not much worse than O(A * K), where A is upscaled image area and K is approximate KNN lookup time in a dataset of all tiles for all scales.

The question is, how fast is KNN on such high-dimensional data.

</comment></comment><comment><USER32> It is the principle of NL-means denoising: since an image is redundant, you use informations about shapes that are similar and are present at different scales in the image to guess the shape of the zoomed version of the smallest ones by using the (more thorough) content of the bigger ones

</comment><comment><USER33> Applying this on satellite images with much more data available could yield interesting results. Anyone interested to test this method with google satellite images ?

</comment><comment><USER34> Is there a BSD/LGPL licensed c/c++/ implementation? I'd love to try it out in some public domain satellite imagery to see the results

</comment><comment><USER35> The server is already slow, so if it stops working I think this coral cache version should still load. [http://www.wisdom.weizmann.ac.il.nyud.net/~vision/SingleImag...](http://www.wisdom.weizmann.ac.il.nyud.net/~vision/SingleImageSR.html)

</comment><comment><USER36> I am impressed. Still, I suspect all the images shown on the webpage closely follow the frequency spectrum of natural images. Different methods will do better under different frequency spectrums.

</comment><comment><USER37> In the context of computer vision, this paper is pretty "old". Since then people have more focused on denoising, though.

</comment><comment><USER38> <http://www.youtube.com/watch?v=Vxq9yj2pVWk>

</comment><comment><USER39> Interesting how these super-resolution approaches are slowly inching onto AI/machine learning territory.

</comment><comment><USER40> It looks like contrasting lines are almost vectorized then expanded?

</comment><comment><USER41> Are there any implementations of this available?

</comment><comment><USER42> i wonder whether this kind of method can be as fast as the older ones?

</comment><comment> guard-of-terra The problem with these: Every half a year we hear about new revolutionary image transformation. Today it's super-resolution, last year it was low-res PC games graphics interpolation, year before that - filter that could resize images by one direction (e.g. width) while preserving proportions and throwing away less interesting parts. The image will become 2x narrower and you'll hardly notice.

Sadly, this is usually first and last time we see the technology in question. They do not seem to produce any impact that could increase our quality of life. They just sit on some dusty shelves somewhere.

<comment><USER43> Do you have sources for each those, especially the uni-directional resizing? They sound quite interesting.

<comment><USER44> The technique is called Seam Carving: <https://en.wikipedia.org/wiki/Seam_carving>

It effectively eliminates the least interesting line when performing a resize, allowing you, for example, to resize a skyline by eliminating the uninteresting smaller buildings and gaps.

<comment><USER8> There's even an iOS app called Liquid Scale that will do this right on your iPhone.

<http://www.savoysoftware.com/liquidscale/>

There may be others but I haven't run across them.

</comment></comment></comment></comment><comment><USER45> Just a comment to the authors, my I suggest that the example magnified photos default to displaying your SR algorithm instead of NN interpolation.

<comment><USER46> I personally liked how the examples seamed to start with worst-cast and progress toward their new possibly "best case" method.

What do you think is gained by starting with the new result?

<comment><USER45> Since the paper is about the new method, one assumes the examples show the new method's results. The first impression, is that the new method isn't very effective.

</comment></comment></comment><comment><USER47> I claim bullshit. The theoretically optimal algorithm is, and has been known to be for 40+ years, sinc interpolation. Gimp does this (Lanczos approximation). Comparing to bicubic leaves aliasing relics and looks bad. I'd be very interested in seeing the algorithm compared to something that's not a pure known strawman.

(In CS terms, this is akin to comparing your algorithm to something using a bubble sort, and ignoring the invention of n log n sorting algorithms)

<comment><USER48> I don't know anything about this area of specialty, but I thought it important to point out that Huffman compression was also proven to be theoretically optimal, and then along came arithmetic compression. I only mean to say that you should be very precise about what the proof of optimality actually showed.

And, with that, I'm bracing myself to get schooled.

 _Edit: This reminds me of the Iterated Fractal Systems proprietary lossy image compression algorithm they tried to commercialize in the 90s. It was able to decompress to a larger scale image that introduced synthetic detail that was often convincing to the eye. Notice how this article talks about different scales._

<comment><USER47> That wasn't my point. You can do better than theoretically optimal -- indeed, their results, in many cases, do look better than sinc. Theoretically optimal makes assumptions that the source image is, in some ways, random, in a way that the real world doesn't conform to. If you know there are hard edges, you can do better.

The point is that they should be comparing to sinc. They're comparing to a known-stupid algorithm to make themselves look better than they are.</comment></comment></comment>


Though shalt not advertise - <AUTHOR> http://www.victusspiritus.com/2011/04/01/though-shalt-not-advertise/ <comment><USER2> Thou shalt not rely on spelling correctors.</comment>


5 years ago today, Google acquired Android Inc. - <AUTHOR> http://www.businessweek.com/technology/content/aug2005/tc20050817_0949_tc024.htm

<comment><USER2> Interesting anecdote about the Android acquisition: Larry and Sergey bought the company without telling Eric Schmidt about it[1]. Google moved into the mobile market on a whim.

Google's strategy seem a lot more planned and methodical from the outside.

[1] From a Schmidt press conference last year: _"Android purchase, he didn't even notice Larry and Sergey bought it."_ \- [http://searchengineland.com/live-blogging-sergey-brin- eric-s...](http://searchengineland.com/live-blogging-sergey-brin-eric-schmidt- talking-search-with-the-press-27380)

<comment><USER3> For some reason, that doesn't really surprise me. I mean, GMail was basically a whim, and I kinda got that same feeling when Wave came out. The Android acquisition could just be considered like a 20% project, but scaled to the CEO level.

</comment></comment><comment><USER4> Doesn't seem like it was that long ago. Interesting that over time people started to believe Google itself created Android, when it's actually closer to being a hiptop successor.

<comment><USER5> What does it mean for "Google itself" to have created Android? The product they acquired was fairly different from what's out there today. To me, this is a good example of a very successful talent acquisition.

<comment><USER6> More evolved? Yes. Using a different monetization strategy? Yes.

But different? I don't think so. The technological foundation of Android (linux for the kernel, small C library and functionality-rich runtime for a custom VM supporting Java-ish programming language) is the same today as it was 5 years ago and is just an evolution of what Sidekick did in 2002. Sure, they made lots of technical progress, added bunch of APIs, polished the UI, changed the business model, but technology is the same, just improved (like you would expect after 5 years).

<comment><USER7> Think of what Microsoft had had at hand when they acquired Danger/Sidekick, and where they would be today if they didn't decide to rewrite the whole thing.

Rewrites of religion motivated or language motivated don't end up well often. Luckily Google didn't decide to rewrite Android just because some people don't like Java.

<comment><USER8> But they like Java.

</comment></comment></comment></comment></comment><comment><USER9> I think this is the only acquisition they have made that makes sense in retrospect.

<comment><USER10> Google Maps and Google Earth were great acquisitions.

<comment><USER9> Forgot about those. Don't know if Earth added anything of value but Maps, certainly. Still not a great track record overall, though.

<comment><USER11> All it takes is a few out of the many!</comment></comment></comment></comment>


Ask HN: what sources should I read ? - <AUTHOR>

Hi,<p>I'm trying to become a better C programmer so I began to read the 4.4bsd source code. Are there other interesting sources to read ? <comment><USER2> I'm assuming you have a FreeBSD box handy. If not then you should :-)

If you're just getting started with unix and C I'd say start with /usr/src/bin and /usr/src/usr.bin since there are plenty of easy things there like cat, date, etc.

Next I'd head over to /usr/src/lib/libc, do a grep for "Chris Torek". Everything he writes is good. Learning low level details about how libc works on whatever platform you're on is always a good thing if you're doing any real C programming.

After that it's a matter of taste. Find something that interests you and read that (e.g. if you like kernel stuff head over to /usr/src/sys).

</comment><comment><USER3> "Code reading requires its own set of skills, and the ability to determine which technique to use when is crucial. In this indispensable book, Diomidis Spinellis uses more than 600 real-world examples to show you how to identify good (and bad) code: how to read it, what to look for, and how to use this knowledge to improve your own code.

Fact: If you make a habit of reading good code, you will write better code yourself."

Check out this next time you are in the bookstore:

<http://www.spinellis.gr/codereading/></comment>