Vertical farming: Does it really stack up? - <AUTHOR> http://www.economist.com/node/17647627?story_id=17647627 <comment><USER2> > The world's population is expected to increase to 9.1 billion by 2050 ... > Feeding all those people will mean increasing food production by 70%

According to the World Bank we're already at almost 6.8 billion people. This means we'd need to feed an extra 33% of the worlds population, meaning we'd need approximately 33% more food as our food usage already factors in losses from production, delivery, etc.

The only way you get 70% is if you made 9.1 the divisor when it is the dividend. You take where we will be 9.1, divide it by where we are 6.8 and you get how much more production we need 33% (IE 133% of present). If 9.1 is the divisor you get ~75%, more likely 70% as this will have been based off of a few year older (but likely slightly more accurate) population counts.

So, to put it simply, a whole bunch of people in the UN can't do basic math.

> Soil erosion will not be a problem because the food will be grown > hydroponically—in other words, in a solution of minerals dissolved in water.

In other words - it will taste like nothing. Ever tried a hydroponically grown tomato? Ever tried one after eating a local vine ripened or even a home grown tomato? If you have, I bet you never tasted the hydroponic tomato.

I've eaten hydroponic tomatoes over the past decade and never noticed a difference or improvement, so how long before its actually edible, and actually worth purchasing? I even frequently see the hydroponic tomatoes to be paler and more tasteless than even the cheap tomatoes imported from half way across the country that were picked weeks before ripeness.

<comment><USER3> Many people are eating for survival, not epicurean delights. I hear your complaints about lack of taste, but I don't think they invalidate the method of growing hydroponically.

<comment><USER2> I don't think they invalidate the method, no. However, we're talking about building these structures in areas where the majority of people are not eating for survival.

Vertical Farms will be built where Vertical Buildings are built - cities. Cities contain a hugely disproportionate amount of western civilizations population and even more wealth. People in cities are generally paying for higher quality food than people in rural areas, so it seems rather asinine to construct vertical farms only to export the produce out of the city into poorer areas where hydroponic crops are more likely to be purchased.

Vertical farms would be far more likely to succeed if they were producing high quality foods, not low quality foods. Sell vine ripened tomatoes picked _yesterday_ and you'll make a killing compared to the hydroponic tomatoes they would be selling. I've seen hydroponic tomatoes selling for 1/4 of the price of California vine ripened tomatoes (I live in ontario, we're the last stop, they're harvested like a month before they should be ripe). You should easily be able to make 8 times the amount selling 'harvested yesterday, vine ripened tomatoes' in a big city than you would hydroponic.

My contention isn't that vine ripened won't feed people. It's that they're planning on feeding the wrong people the wrong food which is just a market failure begging to happen. You might as well be trying to sell a Vegan some beef for how accurate they're targeting the local market.

You could get a luxury product, harvested within 10 miles of your home (beating the pants off of the 100 mile challenge) with as much freshness as farmers market produce and it's expected to be environmentally friendly, and could be made organic with far less risk of spoiling from pests and disease. _All_ of these are huge sale points and _none_ of them will be made with budget cost hydroponic crap.

If you built one of these, met all those marks, you'd be selling your produce to the local high end restaurants because your produce would be at least 2-3 days fresher.

Hydroponics is the equivalent of bottom-lineism in businesses. They're trying to reduce costs to boost profitability, rather than simply finding a way to raise the price that will keep people buying. Do you think Apple was looking at the bottom line when it decided to unibody aluminium shells? Or when they included a higher resolution screen?

Tech companies everywhere disregard the bottom line because they know people will pay for a superior product. Everyone here on HN knows people will pay for a superior product. Google had a superior product (not just technologically, but usability, etc. too) , and it nailed Yahoo that had poor search and poor usability.

Why sell an inferior product when you can sell a superior product, maximize your profit per sq ft not minimize it. Produce a tomato worth $4/lb not $0.99/lb-continuously on sale for 1/3 off. Make an eco-organic-super-fresh tomato and sell it for $8/lb and sell it to rich idiots.

</comment></comment></comment><comment><USER4> All farming essentially boils down to the conversion of energy into a form which people can eat. Grass turns sunlight into carbohydrate. Cows turn grass into meat. The bottom of the chain is sunlight, the top is us, farming sits in the middle. Our choices in farming are essentially one of how efficiently we can convert solar energy into food calories. Modern farming and food production is heavily reliant on oil to fuel tractors and make synthetic fertiliser, but the primary energy input is still sunlight.

Going vertical just spreads the same amount of light over a broader area. Your yield only increases if you use electric lighting, which is only economically viable if electricity gets very, very cheap. Using vertical sheds to farm cattle doesn't help, because the land use to house cattle is negligible compared to the land needed to grow their feed. Vertical farming doesn't help reduce soil depletion, because it depends on what we use now to amend poor soil - oil-based fertilisers. Vertical farming is a perfectly reasonable solution if we solve cold fusion, but there are a whole lot of other problems that magically disappear if we discover a limitless source of practically free energy.

Food is just a proxy for energy and any future food crisis is likewise a proxy for an energy crisis. Much as it'd be easy if we could solve it all, we can't. We've been living on millennia of stored energy and that store is coming to an end. We cannot escape the fact that we will have to dramatically reduce our energy use. Easy solutions to the problem of energy are tremendously appealing, but the laws of physics are a harsh mistress. The future of our species rests entirely upon joules, watts and kilocalories. Vertical farming is an appealing but irrational fantasy, rooted of the same fallacies as food pills and jetpacks.

<comment><USER5> "We cannot escape the fact that we will have to dramatically reduce our energy use."

I'm not sure I agree with this statement (though I like your first two paragraphs)...in the end, couldn't we replace most of our fossil fuel usage by just ramping up nuclear? I'm pretty sure there's enough supply there with breeder reactors to power our civilization long enough to invent something else.

<comment><USER4> Fission is non-renewable. We might get 50 years of economical generation with current technology, maybe more with breeder reactors. Germany spent 3.6 billion euros on the SNR-300 reactor and never got useful output from it, nor America from the 8 billion dollar Clinch River reactor. Monju at least produced power, but only for four months before it blew up. At this stage, economical breeder reactors are an entirely hypothetical proposition. The next generation of reactors in development are only around 15% more efficient than the best extant facilities.

We cannot continue to act on the hope that some future generation will fix our energy problems with a hypothetical technology. It is energy policy of the dot-com bubble. There is an outside possibility that technology might save us, but it is just that, a possibility. There is no roadmap, no plan, merely some things that might work, maybe, some day. Without such a hypothetical breakthrough, there is simply no possibility of continuing our current rate of energy production.

I highly recommend Dr David MacKay's book "Energy Without the Hot Air". In it, he surveys the production possibilities of all the currently viable technologies, gives current consumption levels of British people, and leaves the reader to decide how to make one number match the other. It is impeccably researched and available to read for free online - <http://www.inference.phy.cam.ac.uk/withouthotair/>

<comment><USER6> You can just as easily dig up ordinary LWRs from that era with that same degree of ridiculous cost overrun -- the kind of LWRs of which are cheap today and exist in the hundreds. It was not so much the particular design, SFR or LWR, but the toxic and obstructionist political climate common to both. Carter banned fuel reprocessing -- the key part of the Clinch River fuel cycle -- while that plant was being built. Wikipedia says that SNR-300 construction was interrupted for 4 years from political outrage at Three Mile Island, and a redesign ordered when it was half built.

>The next generation of reactors in development are only around 15% more efficient than the best extant facilities.

I'm not sure what figure you're referring to, but breeder reactors with full reprocessing are 200 times more efficient than LWRs.

<comment><USER4> My point is that _every_ breeder reactor ever built has been a massive boondoggle. Certainly there were political reasons behind the failure of some of them, but it remains a completely unproven technology. The technology may well work brilliantly, but we can't base the future of our civilisation on the assumption that eventually we will build a breeder that actually works. The history of nuclear technology is littered with expensive dead-ends.

Breeders might hypothetically be very efficient indeed, but the plants we are actually building or have actual plans to build are PWRs and BWRs with only marginally better efficiency.

</comment></comment></comment></comment></comment><comment><USER7> This was pointed out in the previous thread, but I'd like to remind people that the photos of gorgeous, 100-story spires in the heart of Manhattan are pure pipe dreams by architects and designers.

However, if you look at vertical farming as a series of low-rise greenhouse warehouses ringing a city, like a lightly stacked up Thanet Earth, then I think there's a strong case for them.

<http://www.thanetearth.com/>

<comment><USER8> The only way vertical farming becomes reasonable is with cheap energy, and high food costs.

Cattle actually come close to this because they don't need sunlight to grow so you can have multi story feed fed cattle farms. However, it's still cheaper to use more land than to build multi story cattle farms.

<comment><USER9> The bottom line is that it's a cute futuristic fantasy. We need to get PEOPLE off of the farm land and into vertical buildings FIRST. There are millions of acres of arable land totally wasted by people's unused front lawns and abandoned parking lots. We have to protect this precious land and not just let developers sprawl all over it in the name of cheap, discardable pseudo- communities.

<comment><USER10> > We need to get PEOPLE off of the farm land and into vertical buildings > FIRST. There are millions of acres of arable land totally wasted by people's > unused front lawns and abandoned parking lots. We have to protect this > precious land and not just let developers sprawl all over it in the name of > cheap, discardable pseudo-communities.

Why?

While suburbia may offend you, replacing suburbia with hive-living wouldn't significantly increase the amount of arable land in use.

The places that have food shortages have them because of bad governance, which hive-living won't fix.

<comment><USER7> The ecological benefits of urban density are much greater than you give it credit for. And I think a characterization of "hive-living" doesn't nearly do justice to the cultural, social, and economic benefits of a vibrant city.

<comment><USER10> > The ecological benefits of urban density are much greater than you give it > credit for.

And you know this, how? Let me suggest that you probably overstate the costs of suburbia.

> And I think a characterization of "hive-living" doesn't nearly do justice to > the cultural, social, and economic benefits of a vibrant city.

You're assuming that everyone values the things that you do in much the same way. That may be true of the other folks in your tribe, but extrapolating universality from that demonstrates my point.

<comment><USER11> Calling it a "hive" and city dwellers a "tribe" has strong negative connotations you cannot be unaware of. Be open-minded when calling for openmindedness.

<comment><USER10> There's nothing negative about "tribe".

As far as "hive" goes, it's apt. It's accurate and the connotations point out the other side of the claimed advantages.

> Be open-minded when calling for openmindedness.

I'm not calling for openmindedness. I'm pointing out cherry-picking, and a couple of other problems.

I don't care where other people choose to live. However, if they're going to argue that their choice is superior, I think that it's fair to see if their argument makes sense. What part of that do you disagree with?

Which reminds me - I'm certain that I'll see you make the same complaints when an urbanist commits my sins, right?

<comment><USER11> Of course. I grew up in the suburbs and I liked it there. I appreciate your vote of confidence.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> Previous discussion on how this stuff doesn't add up: <http://news.ycombinator.com/item?id=1701724>

It's an interesting idea for a second, until one starts to actually crunch the numbers.

</comment><comment><USER13> Here is an excellent rebuttal of the whole concept: <http://www.monbiot.com/archives/2010/08/16/towering-lunacy/>

<comment><USER14> In summation, the bottleneck is light, or, basically, energy.

This is one of the reasons it's so important for us to press on with technology and not just try to keep things the same; we need better, more cost-effective energy, such as with better nuclear power plants. If we have that, there's a lot of things like this that open up to us that can allow us to save energy in other ways. If we don't progress, though, we'll be stuck with a resource-expensive society and no way to escape from the trap.

<comment><USER15> That's not really a fair summation, if you ask me. Yes, light is the immediate bottleneck, but as Monbiot says, it requires "all the usual rules of business, economics, physics, chemistry and biology to be suspended to make way for his idea."

Even with more cost-effective energy, this is still a terrible idea.

<comment><USER7> Monbiot makes the common mistake of starting with Manhattan real estate for his rebuttal, which I think is naive enough to be considered a strawman argument.

As for lighting, the trick is to figure out how to use natural lighting for a majority of the input. Obviously, again, this is why 100-story skyscrapers aren't practical, but sub-10 story warehouses could be. Although some are investigating architectural ideas like mirrors and other hacks.

<comment><USER15> I don't think Manhattan real estate is a strawman-- the point is, in order for this concept to work, you would need to be able to buy a city block in _whatever_ metropolitan area for cheaper than you could buy enough land in the outskirts to grow an equivalent quantity, plus the transportation costs.

And sub-10-story warehouses only magnifies the problem-- then you need to buy even _more_ city blocks.

<comment><USER16> A city block in many metros is not that much money though. Think Cleveland.

</comment></comment></comment></comment></comment></comment><comment> alan-crowe The article portrays indoor agriculture as more expensive that traditional agriculture outdoors in a field. On the other hand the article claims big improvements in crop yields due to the controlled environment to add to the savings in transport costs. So the idea is looking viable right up to the time that the huge electricity bill for the grow-lights arrives.

The missing next step in the analysis is to break out the concept of penthouse farming. Penthouse farming is different from vertical framing in that penthouse farming only farms the top floor, using daylight through a glass roof. Lower floors are flats or offices as usual. If vertical farming makes any kind of sense then penthouse farming should be very profitable.

The path to vertical farming looks something like this:

o penthouse farming starts and is just about viable

o improved techniques boost yields leading to fat profits, almost enough to cover the cost of electricity for grow-lights for lower floors

o cost of electricity falls

o vertical farming profitable!

<comment><USER17> The article's last three paragraphs are about rooftop farming:

> _The immediate opportunity may simply be to take advantage of the space > available on urban rooftops_

</comment></comment><comment><USER18> Perhaps the easier and far cheaper first stop is to stop paying land owners to not farm their land.

<comment><USER19> But then they'll grow plants whose prices are boosted by subsidies, and we can't afford the extra subsidies. And of course limiting the volume of subsidized plants would be seen as a socialist takeover of farming... just imagine if the government had the nerve to tell farmers how much of a government-subsidized crop they could grow! The farmers (aka Archer Daniels Midland) would be outraged.

You know, I don't grow anything on my land but grass and a few decorative plants. Where's my government handout?

<comment><USER2> Buy an Irish Dexter (miniature) cow or a goat and I'm sure you'll be able to get a subsidy for beef/milk/wool/something. It'll also save you time as you won't have to mow the grass or trim the plants... although you may have to watch the land mines and have to wrangle the occasional goat out of a tree, but you might get to sit on your ass and get government handouts.

</comment></comment></comment><comment><USER20> I will preface these comments by saying I spent over twenty years in a previous career as a practicing agronomist.

The dirty little secret of all these vertical farming stories is that the numbers don't add up. The Sunday NYT had an article where they talked about growing corn in one of these buildings.

If I gave you the building and the land you couldn't make money growing corn. They speak of turning a crop every six weeks, I don't know of a single hybrid variety that matures in less than 78 days. Quite simply the NYT reporter didn't ask any critical questions.

Even with high value crops like lettuce and flowers it is dubious. But farming vacant urban land with hoop houses like they're starting to do in Detroit does make sense, There are security risks in an urban environment but those pale beside the costs associated with twenty stories of hydroponics.

</comment><comment><USER21> Why isn't the conversation about floating greenhouses just off the coast of a city. Transportation problems would be solved, nearly all the same benefits as mentioned in the Economist article, while you would get enough energy from the sun most of the year round.

<comment><USER22> I'm pretty sure it's because boats are a whole lot more expensive than land surface. Unless you can get a _lot_ more productivity per square foot than a field, transportation costs are still going to be low in comparison.

I don't see why this wouldn't work for high-profit produce like tomatoes or peppers, though.

<comment><USER22> Afterthought: it could work for high-end produce like _ripe_ tomatoes and things that can't be transported very far. Although there, I'd think a penthouse farm would be even better. Except that the return on a penthouse in a major city for residential use will probably remain higher than any possible use for produce even after oil tops $10. Unless the produce is a prohibited drug, in which case you still probably don't want to use the penthouse, being better off with grow lights in the subbasement.

<comment><USER23> People are already making money growing tasty, ripe hydroponically grown tomatoes in the city to sell to high-end restaurants. In New York, no less. This is only going to work for high-end produce, though.

<comment><USER22> Ha! I win, then! I always get a frisson when somebody makes money in a way I thought of. (Bastards. I mean that in the nicest possible way.)

</comment></comment></comment></comment></comment><comment><USER24> Post 'Brass Eye' can anyone ever take Vertical Farming seriously?

<http://www.youtube.com/watch?v=usTT3RuWu_g>

</comment><comment> DanI-S Why does it need to be a vertical stack? Why not stagger the floors, so they all get natural light from above, like the leaves of a plant sticking out from their stem?

<comment><USER25> Whatever staggering you do is going to be the equivalent sun-exposed area as the footprint projected on the ground right?

You might possibly get away with some kind of balcony arrangement on the southern face of the building, where all levels would get sunlight, and the rest of the building could be offices/residential/whatever. There are still going to be huge inefficiencies in planting, tending, and harvesting compared to open-field farming.

</comment></comment><comment><USER26> I don't know enough about the subject but it seems like cleverly arranged mirror arrays might alleviate a lot of the lighting issues.

<comment><USER27> Sure, but those mirrors also take up space and either increase the total footprint of the 'farm' or decrease the space that can be used for crops. Also since this is in the middle of a city you have to make sure that those mirrors don't accidentally scatter too much light to into the windows of surrounding buildings, as that will no doubt piss of the people working and living there.</comment></comment>


Apple Change Causes Scramble Among Private Messaging App Makers - <AUTHOR> https://www.theinformation.com/articles/apple-change-causes-scramble-among-private-messaging-app-makers?pu=hackernewsff2o9j&utm_source=hackernews&utm_medium=unlock <comment><USER2> This article doesn't quite explain what's going on as much as I would like, so maybe I can add some more detail.

The key problem from an app developer's point of view is that the iOS push notification API doesn't just let a server send an encrypted blob of data to a user's app, and have the app handle it locally, deciding whether it needs to display a notification to the user.

What the iOS push notification API _does_ let you do is send an encrypted notification to a user's app, and then if the user is going to see this notification, have the app locally intercept that, and decide what exactly to display. So for an encrypted messaging service, you can send the encrypted message, and have the app locally decrypt it.

The difference is that the push notification API doesn't let you send push notification data that won't be visible to the end user. So to use this API, your server needs to know that a user just received a message. It can't send out something like an encrypted blob that could be a received-message or could be a different sort of encrypted message like a read receipt, and let the app decide locally. This isn't optimal for a private messaging app - ideally the server wouldn't have to be able to distinguish your received messages from other metadata. This is similar to phone call metadata leaking, where even if someone can't eavesdrop on the content of your phone calls, you still don't want them knowing precisely when you made a phone call.

So one weird thing about iOS is that the VOIP APIs did give you ways to silently send an encrypted blob of data from a server to an app. This functionality would be logical in the push notification API, but the push notification API didn't support it and the VOIP API did, so developers started using the VOIP API for it.

It makes sense that Apple wouldn't want the VOIP API used in this way. But secure messaging apps have a legitimate reason to silently transfer encrypted data from server to application. Making this impossible will weaken the privacy that apps like Signal can offer, not improve it, because Signal will have to know a little bit more about your messaging behavior in order to send you push notifications.

<comment><USER3> I am a developer of a messaging app downloaded so far by 5 million users around the world. I was very concerned about this news and looked into it.

Apple is simply doing away with silent push notifications through the VoIP API. Apps can still register an extension that will process arbitrary push notifications that result in a visible notification to the user.

If the application needs to silently send something to the app, it can do so with background modes, such as sending a push notification via PushKit with content-available: 1. The OS then schedules when the download may happen. If the download doesn't happen before the app is started, the app can simply send a request at that time and download it, just like any other content-available thing.

There is no legitimate use I can think of for silently sending data using VoIP push except when you're on a call and you want to send WebRTC type data (eg say someone joined the call).

But here is the kicker: PushKit notifications are reputed to be delivered on a lower priority basis than VoIP notifications. And that's the big thing. Apple can simply slow them down to make FB messages arrive slower than iMessage for example.

<comment><USER4> Could Apple have slowed down VoIP notifications before, to negatively affect FB messages vs iMessage?

<comment><USER5> While I don't work on this at Apple, I've never once heard of anything being designed to punish a competitor like that.

</comment></comment></comment></comment><comment><USER6> Note that the intended replacement API has been available for three years:

[https://developer.apple.com/documentation/usernotifications/...](https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension)

According to Moxie, it does have a downside. Notifications must be marked as either displaying an alert or as silent. Silent notifications are invisible to the user, but can be read by the app; Signal uses them for things like typing indicators and read receipts. With the new API, if a notification is marked as displaying an alert, the notification extension gets a chance to modify (i.e. decrypt) the content, but the end result must be an alert of some sort. If it's marked as silent, the notification extension doesn't run at all: after all, the data isn't used for anything until the app asks for it, which can only happen if the app is actively running, so the app can just handle decryption itself. And if notification extensions were allowed to trigger on silent notifications, app developers could send meaningless notifications to keep their apps running in the background without the user's awareness – the same issue Apple is trying to address by cracking down on PushKit.

The problem is that the flag for whether a notification is silent or not is visible to Apple's server, whereas Signal wants to keep even that one bit of information hidden behind its end-to-end encryption.

[https://twitter.com/moxie/status/1159127482143875072](https://twitter.com/moxie/status/1159127482143875072)

<comment><USER7> But why is it a problem that the app must be running to decrypt the silent notification? The user doesn't know about it and won't know about it until the app is opened, but then the app is already open and can process the notifications.

As a user I really would not care if the 'read receipt' or 'is typing' notification is unavailable to an app while I'm not using it anyway. And when I'm using it, I don't see a problem with the app having to process some notifications in a different thread and update the UI accordingly.

<comment><USER8> The complaint is that that the server now needs to know the difference between the types of messages passing through it.

<comment><USER7> Well yes, but that's only the case if the app insists on communicating this type of data using the background push api.

</comment></comment></comment></comment><comment><USER9> This article is terrible. The change mentioned in the headline isn't explained until the fifth paragraph and beyond.

> Apple's change involves an API called PushKit, which was originally designed > to be used in apps that let people make online phone calls using voice over > internet protocol. .... Over time, many apps began using the tool for > purposes other than Internet phone calls, including encrypted messaging apps > that found it was the best method for decrypting messages in the background > on iPhones. .... But app developers could also use PushKit to collect > information about the location of users and other sensitive data, which > concerned Apple. .... With iOS 13....the company is finally cutting off > developers from using PushKit for any purposes other than internet phone > calls.

<comment><USER10> Wow, and to think of all the times I've held myself back colouring within the app guidelines. Meanwhile other app developers are abusing the apis to no end.

<comment><USER11> Well sure, but on the other hand now all your stuff isn't broken. Give and take, I think.

<comment><USER12> Had a similar situation once. Apple announced a rule change that impacted our business. We talked to them and realized we had to suck it up. We spent 6 months completely redesigning our app to fit in with the new guidelines. Meanwhile we found out our competitors spend 6 months doing nothing but complaining to Apple. Apple reneged on the change. We lost 6 months dev time trying to comply with the new rules in good faith, our competitors spend those 6 months doing their regular work on new features.

<comment><USER13> Working the refs works way more often than people think.

</comment></comment></comment></comment></comment><comment><USER14> It's pretty weird how the article doesn't even bother to mention that Apple has an official API for doing encrypted notifications, and I really have no idea why these apps are abusing the VOIP stuff instead of using the actual encrypted notification feature. The article quotes someone as claiming APNS isn't reliable, but with zero evidence, and it seems pretty darn reliable for all of the non-encrypted apps using it.

<comment><USER2> In Apple's API you can send an encrypted message and have the app decrypt it. But you can't send an encrypted blob of data and have the app decide whether that blob of data was a message to be shown to the user, or a different sort of data like a read receipt. So the server needs to be able to differentiate the types of data packets sent from user to user, in order to use Apple's notification API, which is less private.

<comment><USER7> And that would be a problem if having 'is typing...' and 'was read' notifications had to be pushed realtime to an app that was in the background. What is the point of those notifications arriving in the app when the user isn't using it.

<comment><USER15> The sender of these notifications doesn't know that the user has closed the app. What this means is that the message send from the sender through the server now has to include whether this is a message or a non-message, which has to be a flag in plaintext.

<comment><USER7> But why use background notifications for this type of data in the first place?

</comment></comment></comment></comment></comment><comment><USER16> The title is (inadvertantly?) misleading, since the aforementioned private messaging app makers are only inconvenienced because they were knowingly misusing an API for which an incomplete API existed.

So, as Apple updates APIs, they're having to repay their own knowingly- incurred technical debt to stop using what was the only thing working, a workaround, before.

</comment><comment><USER17> Hm. I think I'm already seeing SMS/VOIP apps show bugs that are trying to comply with the changes. Google Voice app keeps showing last missed call notification every time I open the app. (I have the app set to do calls over circuit switched instead of data). I also noticed there was a recent move on T-Mobile digits to move to data calling in their app on iOS.

It's definitely causing problems _now_ on 12.4.1 because it's a behavior shift that app developers have to get done before 13 drops.

Apple forum thread on behavior: [https://forums.developer.apple.com/thread/118607](https://forums.developer.apple.com/thread/118607)

</comment><comment><USER18> Previously on this same topic, 29 days ago: [https://news.ycombinator.com/item?id=20629567](https://news.ycombinator.com/item?id=20629567)

</comment><comment><USER19> Innovation is often about using things in ways that were never intended. This often conflicts with the ability to police other people's behavior.

Maybe the resolution in this case would be requiring notification decryption to be open source with a verified compile, so Apple (and users) can see what the code does?

Users need privacy, code doesn't.

<comment><USER20> People were using APIs in a way that wasn't intended, so Apple built APIs for the new use case. Seems like a pretty good way to handle the problem, without requiring a bunch of people to verify code.

</comment></comment><comment><USER21> I'm not an expert here, but if the problem is battery life (?), then surely the apps that abuse this will be outed by the users who will, by definition, see the battery getting drained faster.

Apple, how about a battery-energy per app usage display so the users can detect apps that call home/abuse battery usage, and then they can remove them? Is this something that already exists? I would suspect not, as then apple's own apps may get outed! The user could set an energy usage threshold and be told/warned that an app is misbehaving.

<comment><USER22> I don't understand the cynicism; That feature already exists. It's under Settings > Battery. And users really don't care. Facebook uses a ton of battery and people keep using their app.

<comment><USER21> The article says "Apps that exploited PushKit could drain iPhone batteries, Apple said." and "The basis for doing this is battery savings"

</comment></comment></comment><comment><USER23> Apple removed the ability of app developers to use the (somewhat) reliable way to deliver events to apps without alerting the user.

There's API that lets an app to decrypt visible notifications, but it's incredibly limited (it will crash if the process uses more than 5 MB if RAM, if I remember correctly). This presents unique challenges as the app's code also takes up RAM.

There's also an old API that enables developers to silently wake up the app in background, but it's highly unreliable (it won't work more than 3-5 times per hour or so). This one can still be used for tracking.

</comment><comment><USER24> The notification are for signaling. The message notification can be distinct and encrypted using standard push notifications. If the problem is with metadata around the conversation (like typing indication, etc), they still can be encrypted on the server but with a cleartext flag associated with them to tell if the content should be pushed or not.

<comment><USER25> You do not want any kind of cleartext alerts on read receipts or typing notifications. Most people also don't want apple to know what type of data is transmitted to your app.

</comment></comment><comment><USER25> In short: apple is breaking the only reliable way to deliver notifications. We're making an xmpp app and this breaks everything: regular silent notifications provided by apple work like shit.

We even added honest working VoIP calls to an app to have legal access to working background notifications, and now they pull it away.

<comment><USER18> What non-UI-resulting notifications does your app need to deliver that, as a user, will negatively affect the quality of my experience when not delivered through the VOIP method?

Why, as a developer, did you find that non-VOIP Background Data Refresh failed to meet your needs for creating a viable user experience - and what needs did it fail for?

<comment><USER25> There is a lot of traffic in xmpp that is not message. Like, delivery / read receipts, carbon copies, etc. It's often fully encrypted and a server doesn't even know the contents and if it should or not be showing anything for this event: it just has to tell an app to wake up, fetch messages, let it decide what to do.

With this change, we're left with 2 notification methods: one that always presents a notification banner (resulting in EXTREMELY BAD user experience - banner on every read receipt, on every your own message sent from every device, etc), or one that is extremely unreliable: it is delivered badly if a user is low on battery, and never delivered if a user swipes an app away.

<comment><USER18> So, I'm going to translate this because it will sound different in another phrasing. This will sound judgmental, but I want to present the contrasting view that Apple likely holds here, rather than a sympathetic ear (as many others have provided that service already). No insult or harm is meant, and I have made no effort to look up what your app does, so this isn't personal at all. Here goes.

You're willfully circumventing iOS guidelines regarding Background App Refresh in order to provide an experience that breaks two enforced behaviors that Apple imposes on all apps.

First, in low battery mode, iOS reduces the frequency of non-alert notifications in order to conserve power by reducing cellular traffic frequency, often to the point of batching to once a minute or more. By overcoming this behavior with the VOIP framework, you bypass the intentional battery life protections Apple has built into the operating system.

Second, iOS enforces that no invisible background refreshes may occur once apps are force quit%, unless and until they are reopened. You willfully are circumventing this restriction that was put into place to respect user intentions to "quit" an app by using the VOIP framework to perform background activity even after your app is quit.

Both of these actions are taken with the express intent of breaking the constraints that the Background App Refresh system places on all iOS apps, in order to deliver an experience that has no "Fetching latest changes" delay when the app is next opened, either during low power mode or after a force quit.

Apple had the right to terminate your app from the App Store altogether in response to this violation of their background app refresh guidelines, as they make clear that their guidelines are not the sole and exclusive definition of the boundaries of acceptable behavior, and are generally unfriendly towards those who exercise loopholes to the detriment of their designed experience.

For whatever^ reason, Apple instead gave everyone three months warning that this Background App Refresh loophole is being closed. The VOIP system is meant to carry real-time communications that require the user to be immediately notified, visually and/or audibly, and abusing it for non-visible notifications is no longer permissible. Fortunately, the existing notification system that everyone used prior to the VOIP loophole still works just as it always has, and so the apps will have no trouble reverting to compliant methods.

This will not only restore behaviors that users expect from low power mode and force quitting apps, but will also ensure that the critical and significant battery performance gains of low power mode's reduction in background app refresh update intervals are restored to all iOS devices afflicted by apps using the VOIP hack today.

I hope this helps explain why "delivered badly" may be considered a better outcome than "delivered ignoring low power mode and force quit". I assume you disagree with Apple's choice to restrict background app refresh behaviors, and this led you to implement the VOIP mechanism, but unfortunately that time is over. I hope your users and app are able adapt readily and without fuss to the return of the power-saving pre-VOIP paradigm+ for silent background refreshes.

% Nomorobo sends a _visible_ push notification if you haven't fetched updated rules in a while, offering to reopen the app and start a refresh if you tap the notification. I rarely see it, but I'm grateful for it every time.

^ Facebook.app using this same approach

\+ Mail.app demonstrates this paradigm effectively, reducing fetch times to "essentially never" in low power mode if you don't have notifications configured. It takes a good minute or so sometimes for it to download my Mail after I wake up and check it, but my phone also only uses 5% battery overnight, ensuring that my phone's alarm clock goes off even when I can't find a charger. I'm very grateful that Mail.app makes me wait for my mail instead of checking silently in the background and draining my battery, and that in a nutshell is why low power mode is worth a 'poor' user experience.

<comment><USER25> TLDR: you know nothing.

Longer explanation: You do not know how XMPP works. XMPP is a federated protocol that requires a persistent connection between a client and a server. XMPP consist of multiple independent servers. Client developers and server owners are usually different parties.

To send a push notification to JabberChat app some XMPP server (say, xmpp.org ) must post a notification update to appserver hosted by JabberChat owners (say, jabberchat.org), because only they can send push notifications to an app. If you insist, like Apple, to transmit only 'meaningful' updates, appserver owners will be able to snoop on all passing traffic. That is not desireble bordering not acceptable.

So, XMPP naturally devised a way that only 'content available' notification is transmitted to an appserver, which relays it to a client via APNS/FCM. A client application then wakes up, connects directly to its own server (which is likely INDEPENDENT from app developer!), fetches data and acts accordingly. Now this capability to reliably fetch data without Apple / appserver intermeddling is crippled, which introduces lots of privacy risks.

See XEP-0357 for more details.

You see, instant chat messages are exactly that kind of real-time communications that requires a user to be immediately notified. The only viable way to provide real-time notifications without violating user privacy were these VoIP notifications, and apple just killed these.

All your logic applies only to centralised client-app architecture, and totally not applies to any federated one.

Also, Apple's restrictions are honestly dumb. Smartphone is a computer and one should not restrict how a user wants to use that computer. If a user needs background tasks, just let them do it, only alert them about power usage and let them decide if they need this app or not.

<comment><USER18> I am sad to hear that didReceive(_:withContentHandler:) is not sufficient for you to implement end-to-end encryption of the content of user-visible push notifications using an encryption key exchanged prior to APN delivery. I hope someday Apple extends their support for preprocessing received display notifications to users to ensure that the intermediary only knows the receiver's destination address at most.

[https://developer.apple.com/documentation/usernotifications/...](https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications)

</comment></comment></comment></comment></comment></comment><comment><USER26> If you were building an app that needs to do something like this in the background today, what is the recommended approach if you're on a platform like React-Native? Can JS even be reliably executed in the background?

<comment><USER2> For the vast majority of cases it's better to just use the Apple push notification API and not try to keep a background process running constantly.

<comment><USER26> What if you need to decrypt the payload?

</comment></comment></comment><comment><USER27> Or Apple could make a better messaging and notification system that's similar to pushkit but without the supposed "sensitive data", or just fork pushkit to have a "low permission" version of it.

<comment><USER28> They already have: [https://developer.apple.com/documentation/usernotifications/...](https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension)

</comment></comment><comment><USER29> My wife and I use Life360 every day for giving us notifications whenever we leave work, arrive at home, arrive at our kid's school, etc.

We use these tracking notifications for all sorts of things. For example, my wife won't start prepping dinner until she gets the notification that I've left work.

I will be very annoyed if Apple's changes break tools like Life360. I opted into the tracking for a reason. I don't need Apple making privacy decisions for me. I'm more than capable of making the decision myself.

<comment><USER30> I also used Life360 to geofence my kids and get notifications when they leave school and return home. It actually caught my son running away from school one time, and when the guidance counselor couldn't find him, I was able to locate him outside the school wandering around the streets.

<comment><USER31> Not a parent, but a recent kid, and I'd hate my parents having that kind of control over me. Though I guess I'd just turn off the phone. Which then makes me even more unreachable than if the tracking had never been instituted in the first place.

<comment><USER32> Running away from school is pretty serious. When I was a kid, I'd expect some serious repercussions from my father if I did such a thing. The phone just made the consequences arrive sooner, but it's not the root of the issue. And the commenter didn't give us nearly enough information to judge them, so let's not.

<comment><USER26> It doesn't sound like anyone is judging here. And I agree, I would hate being tracked on my phone. I don't share my location permanently with anyone. That just seems odd for adults to do. I was a kid before all of this was possible, but I've seen the tracking relatives have on their kids and it abhors me.

</comment></comment></comment></comment></comment><comment> Blinks- It seems like a user side configurable app permission such as "allow this application to use PushKit for non VOIP related functions" would take care of this without breaking functionality. However if the author of this article is correct it seems like this is more a jab at Facebook messenger than anything.

<comment><USER33> _" allow this application to use PushKit for non VOIP related functions"_

The number of users who would understand that phrase and find it useful in making a decision is roughly .000000001%. Maybe.

<comment><USER34> Nitpick: I'd think it's significantly more than that, not because the number of users is large, but because .000000001% is mindbogglingly small. Remove a few zeros!

<comment><USER35> I don't think they were going for an accurate number. I actually think the hyperbole helps make the point they're making in this case.</comment></comment></comment></comment>


Show HN: Planntt, simple desktop ToDo application where your data is yours - <AUTHOR> http://planntt.com/ <comment><USER2> No screenshot :( P.S. As alternative, currently using GTD Everdo which support also Linux desktop, [https://everdo.net/](https://everdo.net/)

<comment><AUTHOR> screenshot added; cool stuff you did with everdo :) thanks for sharing the link.

</comment></comment><comment><USER3> Since there aren't any screenshots, I'll share one:

[https://i.imgur.com/cu78es0.png](https://i.imgur.com/cu78es0.png)

It's an Electron app.

<comment><AUTHOR> thanks Tim; I've added a screenshot now to the site as well.

</comment></comment><comment><USER4> No Linux support

<comment><AUTHOR> I had some issues with shared libraries; will give this a 2nd look.

<comment><AUTHOR> Linux download link added.</comment></comment></comment>


Cassandra: Two Data Centers and Great Performance - <AUTHOR> http://www.dataversity.net/archives/6641

<comment><USER2> Great introductory video to cassandra.</comment>


Ask HN: Thoughts on what's plaguing the Obamacare site? - <AUTHOR>

<comment><USER2> The government took way too long to get started "bending metal", it had the inexperienced/no experience on this scale HHS Centers for Medicare and Medicaid Services government bureaucrats be the integrator for this 50+? contractor effort, per the NYT " _In the last 10 months alone, government documents show, officials modified hardware and software requirements for the exchange seven times._ " ([https://news.ycombinator.com/item?id=6583327](https://news.ycombinator.com/item?id=6583327)), those changes continued through the last week before the launch, and full testing obviously was delayed until that last week. Underlying their inexperience, evidently CMMS didn't see a need for bottleneck monitors, given that we've heard of them being put in place post-launch.

And refused to listen to the people waving red flags started no later than spring of this year, when one of these bureaucrats changed his goal/desire from a "First World" website to one that wasn't "Third World"....

So the customer completely screwed up, including launching when the techies told them it couldn't possibly work. Add to that the usual inefficiencies of contracting, plus government contracting, I can't see how this project ever had the slightest chance of success. Especially with them now talking about a " _tech 'surge'_", obviously no one in authority has even bothered to read _The Mythical Man Month_ "; I just don't see these people as being used to the hard constraints of the real world.

Subsequently, as related in that NYT article, CMMS appears to be quietly panicking (we've heard that independently: [https://news.ycombinator.com/item?id=6572467](https://news.ycombinator.com/item?id=6572467)), and maybe not so quietly when per the NYT article they proposed 3 days after launch to through away the current identity system. Per that article, they have been consumed with working with the White House and hopes to have a plan for the contractors ready by Thursday; decisiveness is not part of their vocabulary.

So as things stand now, I wouldn't expect anything really working in 2014. I expect serious changes as this drags on for months, who know knows about 2014, but as for now....</comment>


Ask HN: Why don't major browsers ship with jQuery? - <AUTHOR>

I go to thinking about this topic after reading this on the front page: https://news.ycombinator.com/item?id=7152068<p>They ship with javascript... and a minified jQuery build is just a few more kB of code. <comment><USER2> Besides what others posted, it would mean major browsers would now have to support jQuery, and I don't see why they would want to. For example if Microsoft has a fix, but the owners of main branch don't agree with it, it means Microsoft will now have to keep fixing future versions of jQuery.

</comment><comment><USER3> According to wikipedia: "Used by over 80% of the 10,000 most visited websites, jQuery is the most popular JavaScript library in use today."

Despite it being ubiquitous, it is still an open source javascript library. Just a guess here but, different applications use different versions and I'd imagine relying on one version supplied by the browser could cause issues for developers using JQuery especially if their application depends on an older version of the library.

</comment><comment><USER4> There is just no need to.

It's small, so the overhead of fetching it is minimal. Once fetched it can be cached practically indefinitely and re-used by any sites that uses the same CDN, while still making live updates possible.

Bundling it would only provide a stale version, add bloat and open up a floodgate for other inclusions.

</comment><comment><USER5> fwiw: This is purely an opinion/speculation.

I would imagine that it's has to do with JavaScript being a language that conforms to a standard (ECMA-262 specification and ISO/IEC 16262). jQuery is a library that sits on top of JavaScript - that is, it's just more JavaScript that makes things all ready available in JavaScript a little easier for developers to work with. jQuery also, to my knowledge, does not adhere to any standard.

jQuery is also updated periodically, which can potentially introduce different behaviors. If jQuery shipped with the browser, then a website might behave differently based on what version of jQuery was coupled with the browser. I know that standards, like JavaScript, are also updated and can introduce discrepancies, but with a standard you have a little more concreteness.</comment>


UK Pirate Party registered as politcal party - <AUTHOR> http://www.pirateparty.org.uk/blog/2009/aug/11/party-registered/

<comment><USER2> I personally sympathize with most - but not all - points that the pirate parties of Sweden and the UK make, but I can't help it that I think that the name they've chosen ('pirate') is one of the worst names they could have picked.

Traditionally politics is a game of words, if you enter the game with one leg tied to the other it is not going to help at all.

Being a 'vertical' (single issue) is hard enough, to add a voluntary stigmatization to that does not help.

Piracy is uniformly seen as negative, the 'opposition' (MPAA/RIAA) are the real pirates here, but they actually get the moral high ground for free this way.

<comment><USER3> I agree with your point, but consider the 'Hacker' in 'Hacker News', that has very negative connotations in mainstream language (thanks, media industry!), but the type of smart, gets-things-done people who use this site can see through the language at the values behind it.

Exactly the kind of smart, gets-things-done types who can make a difference in politics, I'd imagine.

<comment><AUTHOR> Yes, I imagine that the people who will vote for a party with the policies the Pirate Party has will not be the ones who would be put off by "Pirate" in the name.

<comment><USER4> But that's the question, isn't it? Could they attract more "mainstream" voters if their rhetoric were not based upon preaching to the choir?

<comment><AUTHOR> I doubt it. I think they just want to get enough votes to make the mainstream sit up and listen.

</comment></comment></comment></comment></comment><comment><USER5> For what it's worth, I signed up, and registered as a member (that costs £10). That's not only for the file-sharing aspects of things, but also some of their other declared aims:

• End the excessive surveillance, profiling, tracking and monitoring of innocent people by Government and big businesses.

• Ensure that everyone has real freedom of speech and real freedom to enjoy and participate in our shared culture.

I whole-heartedly support those goals and am disgusted by the fact that the "mainstream" parties don't even pay them lip service.

</comment><comment><USER6> It's worth reading Richard Stallman's piece about how the Pirate Party's position on copyright is damaging for the Free Software movement: <http://www.gnu.org/philosophy/pirate-party.html>

<comment><AUTHOR> Since the Pirate Party's proposals are never going to be enacted in law (or at least not without allowing a great deal of time for various interest groups to comment) I don't see that this will be a practical issue.

It is interesting, though, to read Stallman reiterating that copyleft depends on strong copyright!

</comment></comment><comment><AUTHOR> See also this Q&A:

[http://www.pcpro.co.uk/news/interviews/350728/q-a-why-the- uk...](http://www.pcpro.co.uk/news/interviews/350728/q-a-why-the-uk-needs-the- pirate-party)

<comment><USER7> >Q How do you respond to the counter argument that research costs are huge and patents help companies protect their investment?

>A We're not trying to stifle innovation, what we're trying to do is set a legal framework that says 'okay, you can take a picture from the road, but pointing a camera at my bedroom window, that's not such a good idea'. Google Street View's a really good example of this. People were up in arms, saying 'no this shouldn't happen, yes it should happen'. We want to see laws in place before it happens, rather than after, so everybody knows where they stand.

That doesn't answer the question at all. I hope this doesn't become a trend with them.

<comment><USER8> They are politicians, nonanswers are part of the game.

</comment></comment></comment><comment><USER6> It's sad that their FAQ only addresses the 'pirate' part of their name. [http://www.pirateparty.org.uk/wiki/index.php5?title=Policies...](http://www.pirateparty.org.uk/wiki/index.php5?title=Policies_FAQ)</comment>


Ask HN: What do you use for online backup? - <AUTHOR>

<comment><USER2> I'm quite happy with CrashPlan [0]. Though I fortunately didn't need it a single time in the 2 years I've been using it, I've heard good words from friends. The downside is that it's an ugly-as-hell Java app, which is an upside at the same time, since it's running basically everywhere.

[0] [http://www.code42.com/crashplan/](http://www.code42.com/crashplan/)

</comment><comment><USER3> BackBlaze -- I have a 2009 MBP and my wife has a cheap 2008 Dell laptop and it runs poorly on them (takes a lot of resources), so I don't run it continuously (just nightly). Other people I know rave about it though.

The price and service is otherwise great. I pay the annual plan, so $100/yr for two unlimited backups.

</comment><comment><USER4> A combination of services. Dropbox & Google Drive for documents and relatively small-sized files, Bitbucket for code, and Amazon Glacier for the rest.</comment>


Remind HN: STS-134, Space Shuttle Endevour's last launch is at 8:56AM ET - <AUTHOR> http://www.nasa.gov/mission_pages/shuttle/main/index.html

<comment><USER2> <http://www.youtube.com/watch?v=4Jb12mzrgEM>

We've been working on a project to capture the last flights of the Space Shuttle Program. It's meant a lot of time out with the bugs, heat, sun, gators and ever present pad security folks.

Once the sound hits, the maniacal laughter you hear is me!

Now we wait a couple of hours to see how our cameras faired. We're at the media center 3.2 miles from the Orbiter, our cameras are at 500-600 feet... I feel for them.

<comment><USER3> That must sound incredible in person. Even the youtube version is amazing.

<comment><USER4> I'm about 45 miles south of the launch pad. We watched it go up this morning and came in once it had disappeared into the sky (far higher than this video as we had a clearer view). Once we came back in and I sat down at my desk, the sound finally hit us, some 3.4 minutes after take off. It was still powerful enough to feel. I couldn't imagine being that close to one.

</comment></comment></comment><comment><USER5> First HN read of the day. Turned on Nasa TV in the background while I'm working. Perfect. Thanks for the heads up.

<comment><USER6> Same - perfect way to start the day.

</comment></comment><comment><AUTHOR> I'm in Florida, but across the state in overcast conditions so I'm having to stick to NASA TV. Ustream is carrying it in HD this morning:

<http://www.ustream.tv/nasahdtv>

<comment><USER7> I'm right across the river. I wanted to see one go in person before the end.

<comment><AUTHOR> You're in for a show. I've caught a bunch over the years and never been disappointed (except for a scrub).

<comment><USER7> It was a pretty awesome 6 seconds before it reached the clouds. The sound is something else though.

</comment></comment></comment></comment><comment><USER8> _"Celebrate Space! A mix of ambient and experimental music mixed with the historical sounds of the space program. And when a space shuttle mission is happening, we mix it in live from launch to landing."_

<http://somafm.com/missioncontrol/>

</comment><comment><USER9> Pretty vehicle. Impractical, but pretty.

<comment><USER10> Most practical thing we have currently to deliver large payloads and a decent crew of astronauts.

<comment><USER9> Hopefully not for long. <http://en.wikipedia.org/wiki/SpaceX#Falcon_X>

</comment></comment></comment><comment><USER11> I was fortunate enough to see a midnight shuttle launch from across the lake at Titusville. It's one of the most amazing things I've ever seen.

</comment><comment><USER12> Thanks for sharing.

It is fun to watch a piece of history in the making. Very interesting.

</comment><comment><USER13> I would love to see one in person, but it's really been difficult with the delays. If the President can't manage to pull it off...

</comment><comment><USER14> I remember watching the very first space shuttle launch in England with our group of exchange students. They were very upset that the "bloody yanks" were going to pull a major space undertaking like this off.

At the time it was fun to see how worked up they were but I'm glad this big waste of money is finally coming to an end. The cost of putting humans in space (and where the shuttle goes isn't really what I consider "space") is just too high.

<comment><USER15> The NASA budget is a mere drop in the bucket compared to the defense budget and entitlement programs. In my opinion, I don't think it's getting enough funding. The future of the human race is among the stars.

<comment><USER14> Agree about the defense budget, makes me mad every time I think about it. Entitlements is a management problem but the size of "defense" is just insanity.

<comment><USER16> As a percentage of GDP, it is only about 5%, granted everyone else is around 2.5%, but if you look at the numbers for example, in world war 2, we were spending about 40% of the GDP.

In actuality we could spend like this perfectly easily and support 'entitlements', we just have to raise taxes...

</comment></comment></comment></comment><comment><USER17> Watching it via Roku on NASA TV.</comment>


C Preprocessor Hell - <AUTHOR> http://jacquesmattheij.com/C+Preprocessor+Hell

<comment><USER2> I don't know why people don't seem to think of this when confronted with the limitations of the standard C preprocessor, but Perl or Lisp both make excellent C preprocessors.

You aren't required to only use the C source code transformation tools that a default install of GCC provides.

<comment><USER3> Using external programs to generate code nontrivially increases the required complexity of your build system, and unless you're targeting Linux only, it isn't really given that users will already have perl installed, much less a lisp interpreter.

<comment><USER4> _nontrivially increases the required complexity of your build system._

No it doesn't. It only requires a single rule in your Makefile. Something like:

        %.c: %.cpre preprocess.pl; ./preprocess.pl <$^ >$@

<comment><USER5> As was already stated: _it isn't really given that users will already have perl installed_.

The usual workaround for such situations is to add the preprocessed files into source control as well, so they are available when a user is building the code. However, this ends up even more ugly.

<comment><USER4> None of that has to do with build system complexity.

</comment></comment></comment></comment></comment><comment><USER5> The code in the article is actually less horrible than I expected from the title. However, it seems like a situation which could be more elegantly solved with X-Macros (<http://drdobbs.com/cpp/184401387>), provided that you consider X-Macros elegant.

 _X-Macros: you have a header file consisting of lines in the form of "FOO(name, type, defvalue);" and include it several times with different definitions for FOO._

<comment><USER6> I don't particularly like include files in the middle of structs, but it looks like X macros might work.

Thanks for the tip, I'll have a look at them to see if there is a way around that so that it would work from a 'top' included file as well.

The project I'm working on has a single 'master include' file and I'd hate to break that convention.

</comment></comment><comment><USER7> Why not just make an internal API function? In my experience with high performance, multiplatform C, macro usage is usually the last thing we do. Macros are absolutely horrendous to debug, and tends to lead to less readable code. They're useful to alias specific platform implementations to a standard interface, or for tiny functions that absolutely need to be inlined for performance.

In this specific case, it might make more sense to have the programmer tell you how many arguments to expect and work with it that way, rather than going through this chain of macros. C doesn't allow function arguments to change dynamically, so that might be a slightly better approach. It would be easier to understand, but a bit harder to maintain code that uses it.

</comment><comment><USER8> The ## in front of __VA_ARGS__ is a gcc extension.

<comment><USER9> It's in 184.108.40.206 of the C standard.

</comment></comment><comment><USER10> "Lisp programmers should stop reading right now because they'll likely suffer severe injury of the jaw muscles as they laugh themselves silly at how hard it is to do some things in C."

Naive question: in Lisp, how would you set the byte at address 0xDEADBEEF to 0x42?

<comment><USER11> There are some who would suggest that allowing you to commit segment violations is not generally a desirable language feature.

<comment><USER12> Except when 0xDEADBEEF happens to be the memory address overlaying the custom hardware registers, and setting it to 0x42 turns the blinky light on. There are some cases where manipulating static memory locations is not only a good thing, but the only way to do something (at least for embedded programming). Not saying that your point is invalid, btw.

<comment><USER13> wild guess:

      (overlay 'light #on)

overlay being a macro to access a predefined ffi setup.

</dream></comment></comment></comment></comment>


BERT and Ernie: Scaling your Ruby site with Erlang - <AUTHOR> http://rubyconf.org/talks/148-bert-and-ernie-scaling-your-ruby-site-with-erlang <comment><USER2> There are some other really interesting looking talks at RubyConf this year also: <http://rubyconf.org/pages/program>. I only wish that it hadn't sold out so quickly.

</comment><comment><USER3> I think the problem with solutions like these it usually comes down throwing down money at more development (Erlang is hard) or throwing down money on more servers (delayed_job, Amazon SQS, etc.).

I usually prefer money on servers since it's faster to develop for my team. But I guess for the functionally gifted, this is a great solution.

<comment><USER4> I wouldn't say Erlang is a "hard" language, especially once you understand it. Sure, there aren't a whole hell of a lot of people that are proficient in it, but I think that's just because it's a little obscure. To someone with a little experience with functional programming, Erlang should make a lot of sense.

<comment><USER5> Agreed. I'm learning it now, and while there are some new ideas in the concurrency model, it doesn't strike me as hard to learn or use the way (say) Haskell and C++ are. There's a fairly small number of core elements, and the language design as a whole strongly encourages you to make things loudly crash when anything is wrong, rather than passing on corrupt data. That helps _immensely_ with debugging...

Also, I found that a lot of concepts from Prolog carry over nicely. Erlang was initially implemented in Prolog, and that's where it gets pattern matching and immutable variables from. (Along with several stylistic / syntactic quirks.)

</comment></comment></comment><comment><USER4> Why would you choose an approach like this instead of using tmm1-amqp + rabbitmq? A message queue seems like it would work well, and is the logical step up from delayed_job.

<comment><USER6> You could use BERT with amqp, as it's just a data format (like JSON). Ernie and BERT-RPC are libraries which build on that.

<comment><USER4> Ok, but why did you decide to build something rather than use an approach like I described? Is it because you needed synchronous requests, not all of them were async?

<comment><USER6> Definitely needed fast synchronous requests. I know you can fake this in RabbitMQ but am not sure why we didn't go with it... guess you'll have to wait for Tom's presentation :)

</comment></comment></comment></comment><comment><USER7> Not really understanding why a bizarre homebrew solution was better than Thrift...?</comment>


Ask HN: Will using Creative Commons text in your site affect your rights? - <AUTHOR>

For example, you have a website that is made up of mostly your own original text, some explicitly commercial (and therefore limited) licensed photos, and then you go and add blocks of text to the site in various places that are adjacent to the other content, and that text was licensed under the Creative Commons license (http://creativecommons.org/licenses/by-sa/3.0/legalcode). Is your whole site, or any portion of the site that was not originally taken from a Creative Commons licensed source now free for the taking? Or is it only the case that any modifications to the text that you used are free to be used by others? Does the entire site constitute a derivative work? Where are the lines drawn? <comment><USER2> You are correct. If you have more questions do not hesitate to contact Creative Commons. As a former CC Netherlands team member I can assure you they are very willing in answering your questions. Do not forget that there are also some CC mailinglists on which you may find answers as well.

<comment><AUTHOR> Thanks. In my case the ShareAlike feature made it impossible to use the content. Oh well, glad I was careful to read the license thoroughly.

</comment></comment><comment><AUTHOR> Answering my own question, it seems if the user of the CCL is using the "ShareAlike" version, the answer is yes, your entire work must be released under the same license.</comment>


My Dad's Friendship with Charles Barkley - <AUTHOR> http://www.wbur.org/onlyagame/2018/12/14/lin-wang-charles-barkley <comment><USER2> Beautiful story.</comment>


28-Key Mechanical Keyboard - <AUTHOR> https://github.com/PyrooL/Alpha <comment><USER2> I don't get the obsession with custom keyboard with ever fewer keys. If I designed one, if anything it would have at least a few _more_ modifier keys that a standard keyboard.

<comment><USER3> I don't get why most keyboards available in stores have a numpad. I never use it, and it takes up valuable space on my desk. I wonder how many people actually use the numpad section of a keyboard on a daily basis.

<comment><USER4> I use it all the time for entering IP addresses, numbers in a spreadsheet, and doing quick math in a calculator.

My current keyboard doesn't have one (it shipped faster and that was more important to me at the time), and I really miss it, and I'm thinking of getting a separate 10-key. I thought it wouldn't miss it that much, but I use numbers frequently enough that it's noticeable.

I wish keyboards had removable 10-keys so I could save space on my desk until I need it. Likewise for page-up (etc) and arrow keys.

<comment><USER5> > I wish keyboards had removable 10-keys so I could save space on my desk > until I need it.

There are separate numpads, i.e. USB keyboards that are only the numpad. My brothers are civil engineers, and they use these when working with AutoCAD on a notebook since AutoCAD apparently puts a lot of stuff on numpad keys.

<comment><USER6> I have only tried a few of those so far, but I have had a hard time finding one that is heavy enough to not slide around. I also like it to be a similar key press feel to my regular keyboard. So I do wish they would sell them to match keyboards.

</comment></comment></comment></comment></comment><comment><USER7> The layout and default keymap[0] show this is really a very QWERTY-specific design.

I love small keyboards and am a Dvorak[1] fan, so tolerating such a layout will require some creative thinking.

I've purchased a PCB from SpaceCat Designs[2] and am keen on creating a Dvorak-centric keymap that chords the top two rows like the gBoards[3] Georgi[4], with the bottom rows dedicated as modifiers. Probably will give it a shot using the new F10 flat key profile from SP[5].

[0] [https://github.com/PyrooL/qmk_firmware/blob/master/keyboards...](https://github.com/PyrooL/qmk_firmware/blob/master/keyboards/alpha/keymaps/default/keymap.c)

[1] [https://en.m.wikipedia.org/wiki/Dvorak_keyboard_layout](https://en.m.wikipedia.org/wiki/Dvorak_keyboard_layout)

[2] [https://spacecat.design/products/alpha28-pcbs](https://spacecat.design/products/alpha28-pcbs)

[3] [https://www.gboards.ca/](https://www.gboards.ca/)

[4] [https://github.com/qmk/qmk_firmware/blob/master/keyboards/ge...](https://github.com/qmk/qmk_firmware/blob/master/keyboards/georgi/readme.md)

[5] [https://pimpmykeyboard.com/flat-keys/](https://pimpmykeyboard.com/flat- keys/)

<comment><USER8> Dvorak in da house! Been down since 2003 after stumbling onto this article [https://ma.tt/2003/08/on-the-dvorak-keyboard- layout/](https://ma.tt/2003/08/on-the-dvorak-keyboard-layout/)

Discovered WordPress that day too and the rest is aoeuidhistory

<comment><USER7> Wow! That is much longer than me - only since 2016.

I had no idea the creator of Wordpress used Dvorak too.

For me the gateway was the Dymaxion map in this XKCD comic: [https://xkcd.com/977/](https://xkcd.com/977/)

<comment><USER8> Bro! Shoes with toes I'm dying -- he's got me nailed

</comment></comment></comment></comment><comment><USER9> Why stop there? Do you really need K, Q, Z, or X? H's are mostly silent and E/I are basically the same letter!

<comment><USER10> 22 keys: [https://en.wikipedia.org/wiki/Stenotype](https://en.wikipedia.org/wiki/Stenotype)

</comment></comment><comment><USER11> Hi all! I'm the one who designed Alpha. Not sure if I need to do anything to verify my identity, but in the meanwhile feel free to ask me anything about this project! :)

<comment><USER12> I'm not sure if you contribute directly to the development of qmk firmware also, but I must say it has been a tremendous pleasure to use. I do assume though that your project contributes to the increased visibility of the firmware and of these types of keyboards in general.

I have an Ergodox. I literally dropped a tear when I've received it and realized what a piece of junk[1] this classic keyboard that I've used over the years actually is.

So thank you and all you guys who make these things possible and put all your love into making typing fun again!

[https://www.youtube.com/watch?v=nruu84U0lF0](https://www.youtube.com/watch?v=nruu84U0lF0)

<comment><USER11> I don't contribute directly to QMK development, although firmware I've written for my boards obviously gets merged into the codebase. It is indeed a gift to the community, and it makes me happy to think that my project brought someone new to the light! And believe me when I say that I had so much fun making it and bringing it to the community (despite what my memes making fun of Alpha might say)

</comment></comment></comment><comment><USER13> Tsk! PC users keep trying to reduce key counts while Apple is decades ahead with the MacBook Wheel.

<comment><USER14> For anyone who missed the announcement, here is the MacBook Wheel:

[https://www.theonion.com/apple-introduces-revolutionary- new-...](https://www.theonion.com/apple-introduces-revolutionary-new-laptop- with-no-keybo-1819594761)

I wouldn't say it is "decades" ahead, though. Lenovo just announced the competing ThinkPad X1 Fold:

[https://news.lenovo.com/pressroom/press-releases/worlds- firs...](https://news.lenovo.com/pressroom/press-releases/worlds-first- foldable-pc-thinkpad-x1-fold-ushers-in-a-new-era-of-mobile-computing/)

</comment></comment><comment><USER15> iwouldneverbeabletopracticallyusethiskeyboard

ithasnospacebarorpunctuationcharacters

notevenashiftkey

itonlyhasanenterkey

Edit: the button with the red dot on it (which I thought was Enter) is a Fn key that you use to access different "layers" \- [https://github.com/PyrooL/Alpha/tree/master/keymap](https://github.com/PyrooL/Alpha/tree/master/keymap)

Nope. I prefer CISC keyboards over RISC keyboards: they require fewer discrete mnemonics to accomplish real-world goals (in this case typing a single character).

<comment><USER16> It's not quite a function key, it (appears) to be more of a mode switch, with 3-4 possible modes. And there's another "home mode" button to go back to the text lines. So, as I understand it, red->space->home

</comment></comment><comment><USER17> Pffff. What is this, amateur hour? 20 keys or bust! [https://www.gboards.ca/product/butter-stick-limited- edition](https://www.gboards.ca/product/butter-stick-limited-edition) :P

<comment><USER18> 20 keys? Is this some kind of joke? Here's the real deal: [https://news.ycombinator.com/item?id=15375892](https://news.ycombinator.com/item?id=15375892)

<comment><USER19> Wow... and I thought 8 keys would be cool!

That's plenty for anyone who knows their ASCII chart. Ergonomics should be through the roof as all 4 fingers on both hands would get a relatively equal workout. (With perhaps the left pinky finger representing the top bit as an exception... but that could be the 'fn' key)

[https://www.sciencebuddies.org/science-fair- projects/referen...](https://www.sciencebuddies.org/science-fair- projects/references/ascii-table)

</comment></comment></comment><comment><USER20> I switched to a Drop ALT keyboard about 6 months ago which has 67 keys and I love it. Sometimes I forget how to do things like tilde which is annoying but I figure it out.

I've been looking at some tiny orthlinear (like the Drop Planck) but I am too put off by having to relearn so much. Maybe in the summer when I have more time! Very interesting though.

</comment><comment><USER21> > With 10mm standoffs this is a snug fit, and it is impossible with the > standoffs at full length. Reflow your solder if it climbed up the wire

I've never soldered anything before, and I have _no idea_ what this means - does anyone know of a good beginners guide to this kind of soldering?

<comment><USER22> If you add a lot of solder to a joint, it will wick and the excess will climb along metal using surface tension.

You can cut through the solder when cutting the tops of the header pins off, but it's bad to stress the solder itself like this so you need to reheat it with the soldering iron so it relaxes from the physical stress of cutting.

</comment></comment><comment><USER17> On the general subject, I highly recommend the Dactyl Manuform

<comment><USER17> [https://github.com/abstracthat/dactyl- manuform](https://github.com/abstracthat/dactyl-manuform) [https://www.diykeyboards.com/products/cases/product/76-dacty...](https://www.diykeyboards.com/products/cases/product/76-dactyl- manuform)

</comment></comment><comment><USER23> If anyone's using modifiers on alpha keys with QMK, let me know what sort of setup works for you. Right now I have ctrls under both pinky fingers (A and S since I'm using dvorac), and it kinda works but but I'm not 100% happy with it. Either I get unintended ctrl-modified presses while typing normal text, or a crtl-modified combo does not register because I do it too quick.

<comment><USER24> Have you tried IGNORE_MOD_TAP_INTERRUPT?

[https://beta.docs.qmk.fm/features/feature_advanced_keycodes#...](https://beta.docs.qmk.fm/features/feature_advanced_keycodes#ignore- mod-tap-interrupt)

Basically, it makes it so that if you want to use A + L for Ctl + L you have to:

Press A

Press L

Release L

Release A

Anything else will send As and Ls.

I ran Alt under my pinkies, Ctl under my ring fingers, Shift under my middle fingers, and Win under my index fingers for a long time. It worked well most of the time.

<comment><USER23> Yep, I've played with these options. MOD_TAP_INTERRUPT is enabled (and arguably should be the default, because the defaults don't make sense). It helps but doesn't fix my issue.

</comment></comment></comment><comment><USER25> I like smaller profile keyboards (I use a 60% and an ergodox clone), but I don't think I could ever use this few keys comfortably. Maybe with some creative QMK layers and triggers on the alphas, but anything less than a 40% and it's got to be more of a pain than it's worth IMO

</comment><comment><USER3> How expensive is it to manufacture the PCB in 1x quantity? It's about 192x60mm, and it has 2 layers.

<comment><USER26> [https://pcbshopper.com/?Width=192&Height=60&Units=mm&Layers=...](https://pcbshopper.com/?Width=192&Height=60&Units=mm&Layers=2&Quantity=1&GetPrices)

;)

<comment><USER3> That's pretty cool, thanks! :)

</comment></comment></comment><comment><USER3> Not suitable for Vim users, because it lacks an Escape key.

<comment><USER23> jk stands for ESC

<comment><USER27> JK for :, UI or WE for escape.

Escape never seemed so painful!

<comment><USER28> That would mean you can't type words like "quick" or "we", right? Or are you somehow detecting the keys simultaneously down and typing in staccato?

<comment><USER23> You just need a short enough timeout. Short enough that it's requiring essentially simultaneous keypress, and trying to type a word so fast would result in ew instead of we half the time.

</comment></comment></comment></comment></comment><comment><USER29> Which full sized or battleship sized (even bigger) keyboard which is readily available, do you recommend?

<comment><USER30> In my opinion, for full sized keyboards the RealForce 104UW is as good as it gets. I use the 88 key variant and it's a joy to type on, is _extremely_ well built and very heavy.

[https://www.keyboardco.com/keyboard/usa-topre- realforce-104u...](https://www.keyboardco.com/keyboard/usa-topre- realforce-104uw-variable-black-on-beige-keyboard.asp)

<comment><USER29> For the record the best ones I could imagine are:

[https://youtu.be/N8FXw_QelQc](https://youtu.be/N8FXw_QelQc)

[https://youtu.be/e-5DDDd3Qzw](https://youtu.be/e-5DDDd3Qzw)

<comment><USER30> Haha I've never heard of a keyboard with user accounts before. Amazing but terribly impractical.

</comment></comment></comment></comment><comment><USER31> I can't see how anyone who can touch type would want to use this</comment>


Review: Roku Netflix Set Top Box is Just Shy of Totally Amazing - <AUTHOR> http://blog.wired.com/gadgets/2008/05/review-roku-net.html

<comment><USER2> For the last few weeks, I've been watching streaming Netflix movies on a 100 inch screen. The quality is better than expected, although your mileage may vary depending on how big a pipe you have. I just pull up Netflix in a browser, choose my movie, and put it on full screen mode.

The Roku $100 price is amazing. If I hooked it up to my DLP projector, the video quality would be similar to my current setup since it's mainly bandwidth-dependent.

</comment><comment><USER3> If only they had a bigger selection of downloadable content, I could ditch my cable...

Also, I'd rather not stream in (potentially HD) video. My internet connection is flaky enough as is. It /will/ die during the movie.</comment>


Launching Radish, a new monitoring and analysis service for Redis - <AUTHOR> http://robots.thoughtbot.com/post/6037147900/radish-dig-deep-into-redis

<comment><USER2> Seems like a very good service!

One comment though: there are very few details on radishapp.com explaining how Radish works. The blog post describes a bit more: there is a daemon running besides Redis that sends statistics to Radish.

A little 'About' page on radishapp.com, with the most important information from the blog post, plus a list of supported platforms (does the daemon run only on Linux, or on all platforms where Redis runs?), would be very nice.

<comment><AUTHOR> I'm working on a technical walkthrough that goes in depth on this...basically the daemon connects to your Redis instance, generates summaries of data, and spits it out to Radish over HTTPS.

The daemon works on Linux (we've tried Gentoo, RHEL, and Debian), and OSX.

If you have any other questions, head over to <http://support.radishapp.com> and I'll help you out!

</comment></comment><comment><USER3> Looks very cool - I've been relying on hacky MONITOR hacks for ages. Is this the first for-profit redis service out there? - been wondering when that ecosystem would start to develop.

btw: If you're interested in extending redis in new and exciting ways check out redis-extend on github: <http://github.com/mkrecny/redis-extend></comment>


10 Points of Unsolicited Advice for Tech Writers - <AUTHOR> http://thefrailestthing.com/2014/03/30/10-points-of-unsolicited-advice-for-technology-writers/

<comment><USER2> Are you the author?

I love the "Do not deify technology or assign salvific powers to Technology". I think you could write a whole blog post on that subject alone.

Agile alone has been overpromised by so many people (consultants), and deifying technology or practices is guaranteed to damage the community that forms around it.

Funny thing is, I'm saying this as (basically) an Agile consultant. It's not my full-time thing, but I started the Agile team at my company years ago, and I've advised lots of folks on how they can solve their problems using techniques that are under the "Agile" umbrella. There's good stuff in the Agile school of thought.

Agile (and nearly everything else) is not a magic wand, and can never be one.

The problem comes in when someone sells you a magic wand, and it turns out to just be a really good walking stick.</comment>


The calculus of caffeine consumption - <AUTHOR> http://arvindn.livejournal.com/57651.html

<comment><USER2> Intriguing headline and interesting content, but where's the calculus? I mean, not in terms of rates of changes and piecemeal and aggregated effects, but it was really all quite fuzzy.

Enjoyable nonetheless. Is it possible to get some sources? In particular, 2-3 weeks for tolerance build up, and 5 days to "adenosine normality"? 5 days is a surprisingly small figure, and I would guess there is a rebound effect if it's just a short relapse. No expert here though, but coffee is my buddy so I want to care :)

Actually, would it also be possible to get a source regarding the attentional fluctuation throughout the day?

<comment><AUTHOR> Calculus is a pretty general term; the study of rates of change is a _particular_ calculus. It's certainly the most common one, and so it is properly referred to as _The Calculus_.

All the numbers I reported are from papers on pubmed and stuff, most of which are linked to from the wikipedia article. I spent several hours reading and re-reading papers; I didn't cite them because my normal blog audience doesn't care. But yeah, you can verify everything by starting out on <http://en.wikipedia.org/wiki/Caffeine>

Attention fluctuation -- look up biphasic sleep, or studies on the effectiveness of napping.

<comment><USER2> I'm looking through the sources and can't find a paper on tolerance buildup times nor rebound effects after abstinence. Alas, I only have access to abstracts right now :(

As for polyphasic sleep and napping, it is known that energy levels fluctuate cyclically throughout the day with two peaks, but I'm surprised that you plotted it with a sinusoidal curve that would suggest constant periods and surprisingly, constant amplitudes... of course, without axes the graphs don't say much of anything, but it's still a surprising presentation. You could justify it as being for a general audience, but it has significant risk of creating misconceptions, and weakens this article quite a bit.

By the way, one of the papers finds "Caffeine consumption for 4 weeks also significantly reduced hippocampal neurogenesis compared to controls." Which is not happy news for me.

</comment></comment></comment><comment><USER3> "Clearly, an idea that advances the state of the art is unlikely to occur except when attention level peaks."

I'm not at all sure this is true. Tales of apple tress, baths and monkeys (or was it snakes?) chasing tails come to mind. In my own personal experience I've had some of my best ideas in the shower or on the bus going home.

<comment><USER4> I could be wrong, but I think you might be confusing attentiveness with focus. I don't believe the author is saying that the best ideas are guaranteed to occur when you are at a peak focus on the problem, but rather when your mind is most attentive, in general.

That is simply my interpretation, though.

</comment></comment><comment><USER5> Anecdotal ramblings, spotty biochemistry, and a few fuzz charts. Edward Tufte would make a poignant chart describing the aneurysm he'd get from reading this.

That being said, I anecdotally agree with the thesis: Drink coffee to improve your natural strengths instead of trying to BigPharma more hours into the day.

</comment><comment><USER6> Also remember that for the purposes of using caffeine to enhance productivity, the worst thing you can do is chug three cups in the morning. Instead, you want to drink your dose as slowly as possible throughout the period of time you want to be stimulated.

</comment><comment><USER7> pseudoscience is the worst kind of "science".

its amazing how graphs and pretty rhetoric trick uneducated readers.

see: current HN post #1 -- <http://news.ycombinator.com/item?id=366857>

<comment><AUTHOR> What? Pseudoscience is junk that claims to be science. If I claimed that were science, I would have tried to get it published instead of writing a blog post.

I wrote the article a year and a half ago, and I've been living by it for 3-4 years now. It's worked out amazingly well. I wrote it in order to share my experience and thinking with other people.

Got a problem with that?

As for references, see my comment above.

<comment><USER7> hmm... correct.

my apologies, offense not intended, though looking back I can see that wasn't the nicest post by me. You didn't claim it was science and you're right it shouldn't be critiqued as such.

i AM a scientist by training, so sometimes the stuff i see on the internet people try to pass off as science perturbs me. i wrote that hastily after a quick read of the article and i confess i was out of line.

And you know what? I don't have a problem with it, and even if someone does, you should tell 'em to screw off. Worse than bad science, is when one person tries to prevent others from the act of content/idea creation. naysayers provide no value and you're right to be annoyed by my response. my initial response to your article wasn't intended to be in that spirit, so my bad, guy.

keep it up.

<comment><AUTHOR> no worries.

i'm a scientist as well, look up my profile :)

<comment><USER7> since we've already established that i was out of line, i just thought i'd revisit this topic of pseudoscience vs science since:<http://www.joelonsoftware.com/items/2008/11/18.html>

currently (as of Nov 19, 7:40am CST) is the number one ranked post on HN.

I think it reflects both of our sentiments.

Incidentally, I went to UT Austin as well.</comment></comment></comment></comment></comment>