skysight-inc/HackerNews huggingface dataset:
What is better then:

g_current_context->Something() or
g_current_context::singleton()->Something()

Because I can set in a special place g_current_context to the initial value knowing it would be safe to do so, while the singleton is going to set it, once it's first needed, and that might not be appropriate.

The problem with singleton's is that initialization is not controlled - what if the singleton is for the first time called from function that already ate too much stack, and now the initialization routine for the singleton wants more?

What if it was called from thread? Or interrupt routine? Or during time sensitive operation that needs to finish on-time (like something producing audio samples, which called every 5ms, need to finish in 2-3ms).

Or callback that needs to return as soon as possible to the caller.

How are you going to deal with it then?

It's much better to be explicit in this case, have a safe place, where no threads are created yet and initialize it, without any protection needed, and then use it as global variable.

Even better, if possible, put all these variables in page (if the OS allows) - initialize them, and then make them READONLY - to know that's not going to change.
This rant is a reply to http://justcramer.com/2012/06/02/the-cloud-is-not-for-you/ which is indeed trashing Heroku.
So, the initial people start lying in order to compete, and that's bad, but when you subsequently lie in order to compete, it's okay because you're "forced" to?
Apologies, that 3AM comment came off more dickish than I intended. Was meant to be a joke implying there is reason people don't write stories about simple, successful companies: they're boring.
You think Silicon Valley is bad? Hahaha. You should see Toronto. The distribution here is totally bimodal. The 10 to 15% that get it and the remainder that are so totally clueless it isn't even funny.

I once, when I was younger and dumber, had a self-proclaimed "angel" investor tell me that he needed to ask his wife if he could invest 25k after leading me to believe he could close a whole round himself. Of course this was 3 or 4 months after we first started talking to him.

Man, I have to stop myself or I'm going to end up being quoted in a Tech Crunch article. At least in SV lies at least have some point to them. Make more money, or initiate a relationship. Over here people don't even lie for a purpose, they do it just to try to look cool and waste other peoples time.
Meet the Amazon Kindle with 'Paperwhite' backlit display
"that it forces those of us who aren't big on bullshitting to do it anyway"

In a way similar to what some people do to attract the opposite (or, uh I guess in cases the same) sex. If there is a perceived big enough prize people will say what they have to say to win.

For the record early in my career with my first company I had to sell up against IBM for a contract about 500 hundred thousand dollars. I told the buyer honestly that if they wanted to be assured of making the right decision to go with IBM because of our small size. But if they wanted a team that could (I don't remember the exact wording so instead of making it up I will leave it at just something like "work harder for you" although it was obviously more creative than that). We got the contract against IBM and their professional sales team in suits and kept it for about 7 years.
See also: "passive doping", which is when a non-doping cyclist ruins themselves physically to compete head to head with cyclists who are doping.
> Coincidence?

Yes, this could very easily be a coincidence and not at all representative of the defect manifestation rates.
"I'm pursuing a 'lifestyle' business"

Nothing at all wrong with starting small and building up from there. Don't apologize. Work 80 per week in your "lifestyle" business and you will see it grow.
I don't know. If Lenovo, Motorola and Microsoft had teamed up and said "HiDPI is the future, we're putting it on our flagship devices and making it a primary feature of Windows". If they had done that, and implemented it well (eg, most people say it's gorgeous), then they could have named it "Windows ThinkDensity MotoDisplay Technology 8" and that is more or less what we'd be calling it.

Point is, it may be something that is conceptually simple and technologically practical but if company X bets their flagship product on the tech and ends up being the driving force in the mainstream adoption of said technology, then I think they get to brand it.
Buzz was used a lot internally at Google, and was pretty handy.
It could. However, that is exceedingly unlikely if all four MBPr I could check in the Munich Apple Store exhibit the exact same problem.
Or indeed the traffic light itself.
I would think that one would want to sell even at $0.01

You definitely don't want to do that. You're going to be overwhelmed with support requests (for an e-book, even!) from the least competent potential users imaginable. Moreover, you're going to blunt the reason for writing the book in the first place, because the people best positioned to get value from the book will not do so because it is too cheap to be taken seriously as business advice.
Simple image uploader generator for Rails 3.2
Google has a lot of other patents Apple would be more worried about that Map/Reduce.

I'm not aware of any use at all of Map/Reduce in the iPhone(!)
> Window and Linux applications are not disposable, they can be launched more than once.

But when the last window is closed the application quits. What if I want to keep it running because I will switch back and open something in a minute? On Windows & Linux I have to launch the app again.

I'm not arguing for one or the other here, just illustrating that this argument is based on familiarity not one actually being better than the other. Each has pluses and minuses.
I don't have a problem with Apple inventing a term for "high enough PPI". In fact, we probably needed such a term to raise awareness about the importance of PPI. I think the problem is, Apple has the monopoly for using the term retina (they applied for a trademark which will probably be granted). As a result, Sony Xperia S has a higher PPI value than iPhone 4S but since it can't/doesn't market its display as retina, consumers may be misguided into thinking iPhone 4S has a sharper display. If we simply called them both "high-PPI displays", the consumer is more likely to become aware of the fact that retina is not a technology and it is trivial to determine which of these displays is sharper by simply comparing their PPI values.
It means those offers have been withdrawn. They are no longer an available option. (I just heard back from support.)
I’m not crying. I accept that something like this is a possibility. Fixing it, however, is not my responsibility and I will just declare the sales contract null and void if Apple continues to be unable to fix this issue. It’s quite simple and I have the right.

And it’s a damn shame, actually. In every other respect the MBPr is an awesome machine. (Also, I never had any problems with first gen Apple products. All through the last ten years Apple has been excellent in releasing pretty great first gen models.)
iOS Visual Debugger Pro 1.0b
I'm definitely not apologizing, nor am I working 80 hours a week on my 'lifestyle' business :)

The contract I'm doing right now is, by far, the best job I've ever had. My stylist remarked to me the other day that I haven't lost any more hair in between my last two visits to him. My girlfriend thinks I'm generally more relaxed and happier than she's ever seen me.
Yea or nay: clipping fingernails and toenails? (This one really sets me off for some reason.)
Just Scroll
I've been using the app for a few months. I found that most of my 'props' came from complete strangers.

Though it's also cool to see what your friends are doing and working on - the community (right now) is very supportive.

Basically - friends not required.
I don't think so. Only major thing I see is the homepage URL changed to https://wiki.mozilla.org/Labs/Ubiquity
Most lies in the startup community are shallow lies that mislead those who don't have filters or don't care enough about a particular entity to do their homework about them. It's deep lies where people attempt to mislead even those that are doing due diligence that are high risk. Shallow lies have a lower, but still significant, risk to the liars.

I think it's good to ask why someone is singling out a single person or company for shallow lies, as it might reveal a bias. Something doesn't seem quite right about that TechCrunch post.

With some shallow lies, large amounts of money is at stake. Investors will make mistakes and lose money. These shallow lies are worth paying attention to and so are those who keep getting fooled by them.
Very cool - but seems like more of a monitor than a debugger (titles are always over-sensationalized I suppose).
There is no good use for singletons.

void callback_from_read(int err)
{
#if USE_SINGLETON
if( err < 0 )
log::instance()::printf("blah... err=%d", err);
#else
if( err < 0 )
theLog->printf("blah... err=%d", err);
#endif
}

...

do_read( something, somesize, callback_from_read );

...

Now thing about it. If this read came from the I/O in some thread with limited stack, it would've wanted to initialize theLog::instance():: the first time it calls it. That function itself might want to read a file, but the underlying system does not allow a file to be reopened while it's still in the I/O callback. Even if it does, there might not be enough place on the stack, or it could be called from a thread where the stuff you are trying to do is not going to work.

Ah, and you would have to make it thread safe at this point (if the callback is in a thread), since someone might've called log::instance()::printf() from the main-thread.

Other things might happen if more locks are involved, and different thread priorities like priority inversion.

The problem is that log::instance()::printf() might do two things - INIT_LOG(), and DO_LOG() - the singleton pattern combines them into ONE, where it should've kept them separate. You might be able to reason about DO_LOG anywhere in the code, but combined with INIT_LOG becomes very hard, and even impossible.

As such singletons are introducing coupling, and reduce severely the reasoning about what the code might do.
> A global variable is more useful than singleton, since it comes with no battery, plan or pretense.

Initialization and deinitialization of globals in C++ is a trainwreck. A singleton wrapper like the one I proposed upthread gives you deterministic initialization order and doesn't impose a runtime performance penalty.

> Singleton at minimal requires thread-safety

Both Windows and POSIX have locks that can be statically initialized. In Windows,

SRWLOCK g_thing_lock = SRWLOCK_INIT;

With pthreads,

pthread_mutex_t g_thing_lock = PTHREAD_MUTEX_INITIALIZER;

Now you can serialize access to your singleton without having to do any explicit and delicate lock initialization. Of course, this isn't the only approach --- you can make the singleton itself threadsafe and have your generic singleton wrapper serialize initialization using a similar approach. TIMTOWTDI.
Kodak, Armstrong and the Moon
There's a difference between positive euphemism/spin and outright fabrications.

Also, when creating/leading you often have to preemptively believe things at the edge (or just over the edge) of plausibility, in order to have any chance to "make them true". Such statements are not 'true' in a rigorous academic or legal sense, and even have a risk of becoming completely falsified as events develop.

But at the time and in the spirit in which they were offered, they declare the speaker's honest hopes and beliefs about what's possible. Sometimes the speaker is even deceiving themself, by signalling more certainty than is warranted about uncertain outcomes.

Culturally, people should understand that implicit disclaimers apply... as when a coach tells their team, "we're going to outplay our opponent" or a commander tells their soldiers, "we're going to take this objective". The statements are aspirational, not yet literally true, and they are spoken aloud as an intentional mechanism for increasing their chances of coming true.
Well I'm not the person you were replying too nor do I think you're the only one who's consistent here.

I think it proves the system doesn't lock out newcomers. You make a goodproduct it makes money, you pay off the people who's IP you walked over.
Using a "using a true but empty metric to promote your business" is more like being creative in that the reader, if careful, should be able to spot the bullshit. The same as when you read product labels or any advertising copy.

I've seen web hosting companies refer to their hard disk space as "premium" storage or with other adjectives to make it appear as if you are getting something which is better than an ordinary seagate server grade hard drives (as if some server company is going to use consumer grade drives). Colo companies talk extensively about biometric security at their facilities (note if your stuff is that important that you care about that you should probably go onsite and verify it, right?).

So what the startups are really doing is just what ad agencies have done for decades. They are using words to sell their product in a creative way.
Look, if you're talking to investors, you're most likely making a sales pitch. Any competent salesman is going to of course emphasize the positive aspects of what he's trying to sell. If you can say, "We’re operating at X run rate" and investors are going to react positively to that, you'd be stupid not to and it doesn't make you a liar, even if Mr. O'Neill doesn't find it to be a valuable metric.

I agree that there's a fine line between making a legitimate sales pitch for your startup and lying to your investors, but the article doesn't address that point at all.
There is a line between communicating strategic and tactical goals to an employee, and micromanagement nitpicking of irrelevant trivia.

Sure, the boss is always the most important client - but nitpicking shows a lack of trust and respect to the employee and is very harmful to morale and productivity (IME).

As with all things, it's about finding the right balance.
As I age, I find all my old monitors are upgrading in place.

I think someday even a 640x480 laptop screen will someday be a 'retina' resolution for my unaided eyes.
I really hope they add "cache clear", "cache disable", "cache enable", etc.
A huge cause ause of the overly complex implementations by level designers is a direct result of problems with Kismet. For instance, I had to put together a 5 node system just to compare two bools for equality.

Additionally UnrealScript isn't really made for "scripting" particularly not for the level. For instance, the whole game/editor needs to be shutdown/reloaded to recompile scripts. In that sense it's much less script and much more virtual machine'd language with gameplay specific features.
I think it's a three part process,

1. They only name important features.
2. They give the spotlight to only one new feature at a time and they make it the cornerstone of their marketing efforts.
3. They are consistent across their entire product line.

That why almost everybody knows the word unibody. Now everyone knows the word retina.
The 'ol if you can't beat 'em, join 'em argument, eh? Look where that logic has taken our society. Look at the state of our politics.
Sprout: A Pencil with a Seed
It's not a very effective defense of Apple to say, "Yeah, Google's phones and tablets don't currently have the same central, fundamental limitation that all Apple's iOS devices do, but someday they probably will."
You might have a Samsung screen. All the screens I tested were LG screens.

The test is quite easy but you wouldn’t notice the defect just like that. Change the background to the dark grey, open up Safari, leave it in one place for two minutes, hide the window. The outline of the address bar was very clearly recognisable on all four machines I tested in the Munich Apple Store.

It’s a bit harder to see on colourful background and you need more than two minutes, but it’s definitely also visible there.

With my replacement the image retention defect also only showed up after one week of daily use.

I think it’s very likely that a large number (likely quite a few more than one percent) are affected by this problem. I think it’s exceedingly unlikely that this is not a problem with shoddy quality control.
I'm looking for an invite as well, if you wouldn't mind, thanks!
What is with the downvotes and no comment? I would love to hear your side of the argument too.
I understand your point of view, but that kind of problem is application specific. When we have to deal with these constraints, of course the use of a Singleton is dumb.

If I had to deal with these, I'll change my implementation to fit to my needs. That's all.

Maybe the term "generic" was too heavy for the use cases I described.
Why is that exceedingly unlikely? All the display units were probably from the same manufacturing batch, and may have even been among the earliest manufactured (which could have an effect on defect rates).
You cannot drive your car in 1 meter spaced convoys. In many cities jamming the navigators would cause the cars to not fit on the roads, resulting in gridlock for however long the jammers could be kept going.
RIM and Nokia are on the dinner menu.

The only question is who pays, and who eats.
I’m sorry, but selling a product with a defect like that is just unacceptable. There are no ifs and buts about that. That’s just how it is.

It would be great if they could fix this issue. I would be overjoyed. However, they seem to be unable to, now even going so far as talking the defect down.
Interesting math, 3840 × 2160 at 32 bpp (ARGB32) is just about 32MB per frame (3840 * 2160 * 4) / (1024 * 1024). At 60 fps that is 1.92GB/second of pixel churn. Perhaps I'm just getting too old but to me that is an impressive amount of data to throw around.
Inside Look: Product Marketing Manager At New Relic
Just a heads up... If you think D3, crowdsourcing, distributed systems, or the color "baby poop green" is cool; CrowdFlower is hiring engineers: http://crowdflower.com/about/jobs
I love this post, and hope it keeps coming up. Some day, developers will learn that even though they could do it as well as Heroku, given enough time and effort, it's just a lot cheaper not to!

This comes up all the time with my company. We make hosted Continous Integration (https://circleci.com), and often hear "can't I just set up Jenkins?". And the answer is the same, "you could, but ...". Run it on EC2, where your tests fail because the IO is bad? What about when three people push at once and you want to get results ASAP? Are you going to manually compile Postgres 9.1? And again when you add a second box to you cluster?

I could go on.
Could. Or not. Who knows.

As I see it this seems to be a massive issue Apple does not have under control. I mean, if it were a problem with a bad batch, why was my replacement screen also affected?

I can only work with what I have access to. And what I have access to makes the situation look very dire indeed.
Agree completely, but I think there's a world of difference between emphasizing the positive and lying. Saying "our revenue is at an annual run rate of $1mm based upon the fact that we booked $83,000 in revenue in this month" is wildly different than fabricating numbers. ARR not being a particular useful metric on its own doesn't change this.
It's kinda neat to be able to encourage random strangers. I find it nice to get an email saying "So and so gave you props for doing pushups".
Luckily, truck drivers don't just drive. For a lot of short haul trucking (and probably long haul), they have to load and unload the truck.

And fix the truck when it breaks down (if possible). And deal with problems when the wrong shipment goes to the wrong place, etc.

And protect the contents of the truck.

Driving is just one piece.
Simple Pushover site notifications in Django
All this has happened before, and all this will happen again.

Yep. The last time a global thermonuclear patent war happened, it was even uglier ( http://en.wikipedia.org/wiki/Edwin_Howard_Armstrong ).
> How many blocked apps were in the App Store?

An oxymoron?

Part of the problem with the app store is a chilling effect - people don't even try to make controversial apps if they run a large risk of being blocked.

Perhaps you could look at the number of apps in Cydia, since the primary reason to put an app on Cydia is that it does something that would be blocked in the App store. I couldn't find an actual figure but simple searches on the Cydia store show > 35,000 results. I'd say that's much higher than the number of truly malicious Android apps that made it into Google's store and lasted any length of time there.
The Generation Gap gets complicated
Regardless - You are still an (place derogatory terms here) for threatening your employees like they are little children.
OK, fine. "Patents kill new entrants who don't have multibillion-dollar war chests." Does that work better?
That's pretty cool - I hope they bring these out soon!

But, since I hate incorrect terminology, this is wrong:

4K = 3840×2160

Some TV manufacturers incorrectly use the term 4K like this, but the way it's been used for the last decade in the film industry (and is specified in standards like the DCI spec) is that 4K refers to images with a horizontal resolution of 4096 pixels [1] (the number of pixels vertically changes to accommodate different aspect ratios - the pixels are always square).

The TV industry is using 3840 because it has four times the resolution on 1080p. I don't think there are any specifications for this resolution, so there's no official term. I've heard it called QuadHD or 4xHD though.

1. There is one exception, which is 3996x2160 (1.89:1 aspect) but all the others are 4096.
> As I see it this seems to be a massive issue Apple does not have under control.

As you see it I don't see how you can claim it's massive.

> I mean, if it were a problem with a bad batch, why was my replacement screen also affected?

Maybe it was from the same batch?
This is great. The nested queries addition will be very useful.
Why do I need tons of money to be granted a patent? Or license? What hypothetical new entrant to commercial scale phone design and manufacturing doesn't have any money?
Tell HN: Downtown PA Office Space Now Available
I've got a luxury condo in downtown Palo Alto (two blocks from University Ave.) that I'm looking to turn into a startup office with desks, monitors, meeting rooms, whiteboards everywhere, even a couple beds for the late night hacking sessions. Contact me ASAP if interested.
Amazon teams with Nokia, snubs Google for maps
Introducing human.io
I'm curious as to why OP keeps insisting that current Thunderbolt ports can't support a QFHD (3840 x 2160) display.

Thunderbolt layers a few lanes of PCIe with a DisplayPort 1.2 signal. DisplayPort 1.2 supports QFHD at 30 bits/pixel and 60Hz.

Of course you'd be limited to one display per port, and I'm not sure whether that much bandwidth on the DisplayPort lanes would crowd out the PCIe traffic.

Alternatively (as anyone who bought Macs in the 90's can attest), Apple has never been particularly reluctant to introduce a new interconnect when it was convenient for them.

Obviously if they simply pixel-doubled their current 27" panel it would be far beyond Thunderbolt's capabilities, which may be where the "Thunderbolt can't support Retina resolutions" idea originated.
They might also be using them as a test market and if successful, will look into bringing it over the US. I hope so.