Coca-Cola Funds Scientists Who Shift Blame for Obesity Away from Bad Diets - <AUTHOR> http://well.blogs.nytimes.com/2015/08/09/coca-cola-funds-scientists-who-shift-blame-for-obesity-away-from-bad-diets/ <comment><USER3> One 20oz (vending machine size) bottle of Coke per day is 52 lbs of sugar (well, actually high fructose corn syrup) per year. Next time you go shopping, count 10 5-lb bags of sugar. Each and every year.

Ironically, the land for Centers for Disease Control and Prevention (CDC) which is located in Atlanta, Georgia was donated by none other than The Coca Cola Company.

<comment><USER4> > Ironically, the land for Centers for Disease Control and Prevention (CDC) > which is located in Atlanta, Georgia was donated by none other than The Coca > Cola Company.

I don't think this is ironic at all. A company needs living clientele.

Also, the CDC has better epidemics to worry about than the obesity one. I frankly don't care if people want to be fat.

<comment><USER5> > Also, the CDC has better epidemics to worry about than the obesity one.

They can worry about more than one thing.

> I frankly don't care if people want to be fat.

No one cares that you don't care.

<comment><USER4> Peoples' diets are not the CDC's responsibility.

<comment><USER6> You are wrong. Here's the CDC's mission statement:

 _The Centers for Disease Control and Prevention (CDC) serves as the national focus for developing and applying disease prevention and control, environmental health, and health promotion and health education activities designed to improve the health of the people of the United States.

To accomplish its mission, CDC identifies and defines preventable health problems and maintains active surveillance of diseases through epidemiologic and laboratory investigations and data collection, analysis, and distribution; serves as the PHS lead agency in developing and implementing operational programs relating to environmental health problems, and conducts operational research aimed at developing and testing effective disease prevention, control, and health promotion programs; administers a national program to develop recommended occupational safety and health standards and to conduct research, training, and technical assistance to assure safe and healthful working conditions for every working person; develops and implements a program to sustain a strong national workforce in disease prevention and control; and conducts a national program for improving the performance of clinical laboratories.

CDC is responsible for controlling the introduction and spread of infectious diseases, and provides consultation and assistance to other nations and international agencies to assist in improving their disease prevention and control, environmental health, and health promotion activities. CDC administers the Preventive Health and Health Services Block Grant and specific preventive health categorical grant programs while providing program expertise and assistance in responding to Federal, State, local, and private organizations on matters related to disease prevention and control activities._

[http://www.cdc.gov/maso/pdf/cdcmiss.pdf](http://www.cdc.gov/maso/pdf/cdcmiss.pdf)

Poor diets are clearly related to "preventable health problems", and can be mitigated via "health promotion and health education activities", etc. This falls under the CDC's Division of Nutrition, Physical Activity, and Obesity, DNPAO. [http://www.cdc.gov/nccdphp/dnpao/division- information/aboutu...](http://www.cdc.gov/nccdphp/dnpao/division- information/aboutus/)

Here's the CDC's nutrition webpage: [http://www.cdc.gov/nutrition/](http://www.cdc.gov/nutrition/)

<comment><USER4> Yea, but you can't blame the CDC for people having bad habits. It's not their fault.

</comment></comment></comment></comment></comment></comment><comment><USER7> Things would probably work themselves out if there weren't so much in the sugar subsidy. If sugary treats and drinks were rare instead of common we probably wouldn't have as much diabetes or overweight people, myself included. I feel this kind of stuff is sadly typical of the world we live in, propaganda at its finest.

<comment><USER8> Sugar would be bad but it's even worse because it's high fructose corn syrup.

<comment><USER9> First hit on Google:

"Both controversy and confusion exist concerning fructose, sucrose, and high- fructose corn syrup (HFCS) with respect to their metabolism and health effects. These concerns have often been fueled by speculation based on limited data or animal studies. In retrospect, recent controversies arose when a scientific commentary was published suggesting a possible unique link between HFCS consumption and obesity. Since then, a broad scientific consensus has emerged that there are no metabolic or endocrine response differences between HFCS and sucrose related to obesity or any other adverse health outcome."

[http://www.ncbi.nlm.nih.gov/pubmed/23493540](http://www.ncbi.nlm.nih.gov/pubmed/23493540)

<comment><USER10> The primary author is the central driver behind his own Rippe Lifestyle Institute [[http://www.rippehealth.com/](http://www.rippehealth.com/)] who, turns out, partners directly with Coca-Cola [[http://www.rippehealth.com/partners/index.htm](http://www.rippehealth.com/partners/index.htm)], including "outreach" and "coordinat[ing] a number of symposia", which in all likelihood means paid speaking engagements. He and Coca-Cola may have honorable intentions, or he may be paid to advance their agenda. We don't know either way, but what we do know is they are connected to each other.

<comment><USER8> Hahaha, this is too funny. I was wondering if I could find some info suggesting that they are being paid off but I didn't think of looking for it on their site. Good detective work.

</comment></comment></comment></comment></comment><comment><USER11> I've always thought it would be an interesting -- but not technically difficult -- project to do a data scrape of PubMed.gov and simply count up and classify all of the studies that contain a conflict of interest disclosure...but while the scraping would be easy, I'm not sure how accurate or complete the disclosures are.

For example, from the OP:

> _Last week, the Pennington Biomedical Research Center in Louisiana announced > the findings of a large new study on exercise in children that determined > that lack of physical activity "is the biggest predictor of childhood > obesity around the world."_

> _The news release contained a disclosure: "This research was funded by The > Coca-Cola Company."_

This is the link to the press release, which contains the Coca Cola disclosure in the last line:

[https://www.pbrc.edu/news/?ArticleID=284](https://www.pbrc.edu/news/?ArticleID=284)

The press release links to the PubMed page for the study: [http://www.ncbi.nlm.nih.gov/pubmed/26173093](http://www.ncbi.nlm.nih.gov/pubmed/26173093)

...Maybe I'm missing it but I don't see the Coca-Cola disclosure in the PubMed abstract. However, the Coca-Cola mention is in the full text of the study: [http://onlinelibrary.wiley.com/enhanced/doi/10.1002/oby.2115...](http://onlinelibrary.wiley.com/enhanced/doi/10.1002/oby.21152/)

(note: this above link is visible for me because I'm on a university network. It may not work for you otherwise)

On the other hand, the full text of the study also mentions the ClinicalTrials.gov ID number: NCT01722500.

Which means it can be found here: [https://clinicaltrials.gov/ct2/show/NCT01722500](https://clinicaltrials.gov/ct2/show/NCT01722500)

So maybe the data collection approach should begin with ClincalTrials.gov, which _does_ have endpoints intended for convenient bulk data analysis: [https://clinicaltrials.gov/ct2/resources/download](https://clinicaltrials.gov/ct2/resources/download)

<comment><USER12> Disclosures basically never appear in abstracts on PubMed.

<comment><USER13> Also, it might not be so easy as just scraping the disclosures. I work at a major pharmaceutical company, and my name is on a paper, along with my affiliation. There are also non-pharma scientists on that paper. The paper contains a line stating that those two non-pharma scientists declare no conflict of interest. A scraper might dismiss that as non-industry, but more than half of the authors work in industry.

</comment></comment></comment><comment><USER14> At every turn the GEBN scientists seem to acknowledge the role of excessive caloric intake and a sedentary lifestyle, then briefly handwave the former as overhyped - a large excerpt from one of the linked GEBN "Portfolio Items" containing a bald-faced example[0]:

>Most of the focus in the popular media and in the scientific press is that they're [...]blaming sugary drinks and so on. And there's really virtually no compelling evidence that that in fact is the cause. [...]

The big problem is we don't really know the cause other than, well, too many people are eating more calories than they burn on too many days. But maybe the reason they're eating more calories than they need is because they're not burning many."

So - he does know the cause. A combination of inactivity and overconsumptiom, both of which are remediated with lifestyle changes that invert their prefixes. Why abandon the latter, simply because each is well reported?

[0]:[http://www.sharewik.com/portfolio-items/the-global-energy- ba...](http://www.sharewik.com/portfolio-items/the-global-energy-balance- getting-the-word-out/)

</comment><comment><USER15> Sad state of affairs, but nothing that surprising. They need to fight dirty to ensure they exist as a company in the future. As more people realise the connection between high-sugar diets and weight gain. Tobacco V2.

<comment><USER16> As more people realise the connection between _high calorie_ diets and weight gain.

Fixed that for you, although it should not be a novel realization.

<comment><USER15> Sugar specifically though. It is a cause of high calories due to it's effect of creating a high and then a crash making you hungry again. It is also addictive in itself.

WHO recommend getting it below 50g, ideally 25g per day. I looked on the side of some of the staple things I consumed (milk, bread etc.) and it is tough with modern processed foods to get that low.

If everyone followed the WHO recommendation then full sugar coke is out of business!

<comment><USER17> >WHO recommend getting it below 50g, ideally 25g per day.

Really? Because that is how you get into ketosis. That is not just low carb, that is ultra low carb.

I think you may be mistaken. I have been in that range and it is extremely difficult.

<comment><USER15> Just sugar, not carbohydrates in general. You can do it by avoiding refined foods, but you can still eat, for example 100g of oats which you wouldn't do on an atkins-style diet.

</comment></comment></comment></comment></comment><comment><USER18> why do they care that much? coke zero tastes fine, the energy from caffeine means you would move that much more, the fact that something sweet has filled your stomach means you're not eating something with calories in it. diet coke and coke zero are above and beyond coke's calorie-responsible choices - <USER2> they're marketed very heavily and available everywhere, even mcdonald's.

exercise is super-important, as are food calories from stuff like hamburgers and fries, that don't HAVE a diet version.

why does Coca-Cola care so much? Article would make more sense if it read "mcdonald's", but that's not what's stated - it says it's about coke.

it just doesn't make that much sense to me. where's coca cola's incentive?

(fwiw I thought I'd mention I have absolutely no disclaimer to make, no connection whatsoever with coca cola.)

<comment><USER15> Not everyone likes the taste of coke zero, and others perceive it to be harmful due to the artificial sweeteners.

<comment><USER19> > Not everyone likes the taste of coke zero

Well, there's literally no accounting for taste. Coke Zero is a fantastic tasting diet soda.

> others perceive it to be harmful due to the artificial sweeteners

These people should be ridiculed, like Jenny McCarthy is, since there's no reputable scientific or epidemiological basis for their beliefs.

<comment><USER19> Got at least 3 downvotes without a reply on this post.

Pretty good demonstration that everyone ( _EVERYONE_!) has some religious beliefs they can't stand to have someone call into question, even if they are likely the type who points out when others have the same problem.

<comment><USER20> It's best not to go to health sites to discuss IT practices and startup culture, and it's best not to go to HN to discuss health- and medicine-related stories.

Both communities are full of people who may have substantial expertise in their own fields, but who also enjoy pronouncing sweeping and groundless religious edicts in other fields that they don't actually know anything about.

</comment></comment></comment></comment></comment><comment><USER21> The calories are not what you should worry about in Coca-Cola. 1 500ml bottle (supposedly 2 servings, but really who does that?) has ~60% RDA of sugar which is just ridiculous.

I don't get why they don't just make a fizzy drink which contains at most 10-15g sugar per 500ml (and not fill it with artificial sweetener).

<comment><USER22> I cut my fruit juices with water, and if there is a soda water option on the soda fountain I'll do the same thing with sodas. I rarely drink sodas or juices which is probably more effective than my dilution efforts.

</comment></comment><comment><USER23> I mean, on the one hand, pretty much anything that legitimately gets people exercising more can't be _all_ bad. But on the other, we already have enough "science" with an agenda in the world. At least the agenda here is pretty transparent, I guess?

</comment><comment><USER24> This would be (barring outright fraud) nearly harmless if we had preregistration as a prerequisite for studies 'counting' (in meta-analyses, in discussions here, in academic rankings, etc) [http://theness.com/neurologicablog/index.php/registering- stu...](http://theness.com/neurologicablog/index.php/registering-studies- reduces-positive-outcomes/)

I suppose they could still add ridiculous interpretations (as is often the case when people's livelihood depends on their work being seen to promote a given side), but at least you could trust the data.

</comment><comment><USER25> coca cola is simply funding the merchants of doubt in this case the Global Energy Balance Network

great book: [https://en.wikipedia.org/wiki/Merchants_of_Doubt](https://en.wikipedia.org/wiki/Merchants_of_Doubt) ok doc: [http://www.imdb.com/title/tt3675568/](http://www.imdb.com/title/tt3675568/)

</comment><comment><USER26> Sweet, they should also fund this, also on the front page: "Scientists have synthesized a new compound that 'mimics' exercise."

Yay progress!

</comment><comment><USER27> I know flippant comments are not encouraged here, but this headline is probably the least surprising thing I learned this week.

<comment><USER28> A society is in trouble when people are going "that's not news" instead of enraged and looking to change it when learning about a wrongdoing.

It doesn't matter an iota if it's "surprising"...

</comment></comment><comment><USER29> "Company does thing that helps itself"

</comment><comment><USER30> Broscience

</comment><comment><USER31> Body mass is simple: calories in - calories out = calories gained.

It's silly to imagine that Coke is doing something nefarious (like Phillip Morris denying that smoking causes lung cancer, or Exxon Mobil FUD-ing solid climate science) by encouraging people to get more exercise so that they can consume what they want.

<comment><USER32> So let me get this right:

We have billions of complex chemical processes involved in all of this, and know things like "absorption rates of medicine, vitamins, and nutrients" are affected by everything from random vitamins to environmental factors to whatever else.

But body mass, that we have down 100% for-sure, and it's just that simple formula, no variables, no possibility for any other affecting factors. Sure.

<comment><USER33> It's thermodynamics dude. Your body only gets so much of its mass from the atmosphere with your lungs, the rest of it comes through food. It can't make mass.

Fat tissue is no exception. Your body is only able to make it if you give your body sufficient raw materials to make it.

Similarly, if your body is doing work, it is burning energy. Human bodies are not perpetual motion machines, they exploit energy stored in chemical bonds. You don't get that for free, you get that from the food you eat.

You do not need to fully understand every nook and cranny of a system to examine it from first principles.

<comment><USER32> This is all completely and totally irrelevant. Read my other reply. Since the digestion/other rates vary from person to person, you can't simply calculate your calories out very easily, and positing this formula as if it is useful or helpful to anyone, is silly.

What is your proposed mechanism for counting calories in and out for a given person (Note: nutrition labels will 100% fail you here, because of how they are calculating)?

<comment><USER34> Here is a proposed mechanism: count calories as they are on the label, see if you lose weight. If you do not, lower them further, still counting by the label.

It doesn't matter if they are exact for a given person so long as the labels are consistent. They are sufficiently consistent.

I'm curious - have you tried losing weight, and is this from personal experience? Because I found it trivial by just counting calories and keeping a watch on my weight. I don't doubt that sometimes the calories I absorbed were less or more than what I wrote down, but that doesn't really matter in the long run - they're sufficiently accurate.

<comment><USER32> "It doesn't matter if they are exact for a given person so long as the labels are consistent. They are sufficiently consistent."

You argue this with literally no data, and all available data says the opposite.

The people charged at the FDA with coming up with the mechanism for these labels _disagree with you_ , and have found 30-50% variance for a ton of foods.

"I'm curious - have you tried losing weight, and is this from personal experience? "

I can lose weight fine (and i'm actually at a normal BMI, FWIW :P), and i don't violate the laws of thermodynamics.

However, counting calories from labels was the most useless thing i could ever do.

I literally burned 1500+ calories in exercise a day, and ate less than 1500 calories by nutrition label calculations, and did not lose weight. I tried a variety of different foods/etc. I'm a scientific guy, i have logs of data :P I didn't cheat, kid myself, whatever.

It turns out, for various medical reasons i won't get into, i am not in the "vast majority" for whom these labels are targeted, and so the numbers on them are simply wrong by about 20-30% for me (this is factual, and was actually part of a controlled study). The out calculation was accurate enough (IE the exercise part of it). But as you can imagine, when trying to lose weight, 20-30% in variance matters _a lot_.

You can argue "i'm outside the norm", but i suspect, based on what i saw, that i am not.

<comment><USER32> and just to satisfy any curiosity, since i know 1500 calories of exercise a day sounds like a lot:

I was not fitbiting or any crazy mechanism to count getting up from the couch as exercise, or counting anything other than the actual exercise calories as "calories burned". Thus, it should have been a significant underestimate due to resting calories burned, etc.

In any case, it was running 5 miles a day, as reported by GPS, at 8:15 pace (which is roughly 120-150 calories per mile, depending who you believe, but i took the low side), and then running 1000 calories on an elliptical (which is about 1-1.5 hours at high resistance and fast pace, depending on pace).

The elliptical i used was one which slightly _underestimates_ calorie count (by about 3%, at least according to two peer-reviewed studies), unlike most, which overestimate (by about 15-20%).

<comment><USER35> While input-side variability may be a factor, if you are doing time-and- exercise-description without closer monitoring to determine your calories out, _output_ -side variability is also a likely factor here.

Also, doing that much exercise, you can maintain a calorie deficit (a real deficit of calories absorbed vs. burned) and not lose weight by gaining muscle as fast as you are losing fat (muscle has a lower stored-energy content than fat); you'd need more than just stepping on a scale to distinguish that.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER36> Diet remains the single most important factor when it comes to weight management. Two cookies can erase the calories burned from jogging for 1 hour. People routinely overestimate the calories burned from exercise and underestimate the calories that are in food, especially sugary foods. On top of that, exercise can increase your appetite, resulting in a net positive calories if you're not careful.

Exercise provides a myriad of benefits, the most important actually contributing to mental health. But if you are looking to lose weight, a proper and healthy diet should be your priority.</comment>


HTML5 Quick Learning Guide - <AUTHOR> http://freehtml5templates.com/html5-quick-learning-guide/ <comment><USER2> I hope this is a "Work in Progress". The guide only really talks about the new sectioning elements in HTML5 which is only 3% of what HTML5 actually entails.

<comment><USER3> That's probably why it's described as "This guide introduces you to just the main elements of HTML5 that you'll probably want to use right away. This guide is for those who want to get the basics figured out first, and worry about the finer details later on".</comment></comment>


Computer Topology and 3-Manifolds pg. 312 [pdf] - <AUTHOR> http://www-math.mit.edu/%7Eandyp/Figures/FIGURE2.pdf <comment> King-Aaron This is particularly abstract without any context...?

<comment><USER2> Just speculating, but I'd have to assume it has to do with VLSI design and reducing complexity of how wires are laid out on the die in order to increase efficiency.</comment></comment>


The web of names, hashes and UUIDs - <AUTHOR> https://joearms.github.io/2015/03/12/The_web_of_names.html <comment><USER3> See also Zooko's Triangle:

[http://en.wikipedia.org/wiki/Zooko%27s_triangle](http://en.wikipedia.org/wiki/Zooko%27s_triangle)

There's a long tradition of using this kind of approach in capability systems. If you do it right, you can have globally unique identifiers that are not human readable (probably, some sort of public key which is also routable), and then let humans assign local "petnames" (labels) to them in a way that is actually pretty usable, if everyone is using software designed for it.

Problems come when, say, you want to put your web address on a billboard. In an ideal world the billboard would somehow transmit the advertiser's public key to the viewer's device so that the viewer could then look them up, but obviously we don't have any particular tech for doing that. So instead we create this whole complex system by which people can register human-readable identities, which in turn requires a centralized name service (yes, DNS is centralized), certificate authorities (ugh), etc.

Similarly, whenever you tell your friend about some third-party entity (another person, company, whatever), you should be giving them the public key of that entity. But that's not really practical. We need some sort of brain implant for this. :)

<comment> vertex-four Namecoin solves Zooko's Triangle (at the cost of keeping a Bitcoin-like network running). The issue is that nobody's software supports it.

<comment><USER4> The support problem for namecoin is being solved. See: okturtles and dnschain.

</comment></comment></comment><comment><USER5> UUIDs can also be collided. Did you want some form of public key referencing that only a private key can answer, perhaps?

As already pointed out by ivoras here, magnet: links are close to exactly what you're looking for. It also reminds me of, for example, the Freenet CHK/SSK/USK system, or several other things with similar designs.

You should also not use SHA-1 hashes for uniqueness or checksumming anymore: they're too weak.

<comment><USER6> I was reminded of Freenet as well. The USK scheme for allowing content to be updated is rather clever.

</comment></comment><comment><USER7> Some of the ideas are already present in Magnet links ([http://en.wikipedia.org/wiki/Magnet_URI_scheme](http://en.wikipedia.org/wiki/Magnet_URI_scheme)).

<comment><USER8> Similar proposal for script tags [http://lists.w3.org/Archives/Public/public- webappsec/2013Feb...](http://lists.w3.org/Archives/Public/public- webappsec/2013Feb/0052.html)

This would avoid the inefficient situation we have at present, where the same jQuery script is fragmented across dozens of CDNs, causing a new request each time even when previous instances are already cached by the browser.

<comment><USER9> I would love to see maven in the browser. Have each webapp serve a pom.xml listing the libs it uses along with exact versions and be done with this hell. The browser then checks if the lib is installed, if not, it goes through the user-specified maven repositories, then through the default ones and then through the webapp-specific ones searching for the artefact. Problem solved.

<comment><USER10> The problem is not that simple. Most webapps are compiled and minimised using systems like Closure Compiler, Uglify and R.js (for AMD apps).

You almost never point directly to a dependency as a standalone file. Doing so would mean 15-30 requests per webapp and since browsers only accepts 5-6 parallel requests, it would slow down the page considerably.

</comment></comment></comment></comment><comment><USER11> _SHA1 checksums are fine for content that is immutable (doesn't change) - <USER2> what about a file whose content changes with time?_

I think we've been doing some very silly things with data over the last few decades related to the UPDATE statement.

Why not just consider all published data immutable? Look at book publishing as an analogy. There are multiple printings of a book. If there were corrections or updates they don't retroactively affect the previous printings. Why can't we look at data that is published on the Internet is the same manner?

If you want to update something you'll have to publish a brand new version. This also mirrors versioning in software libraries.

CRDTs, immutable data structures, eventually consistent data... from UI programming to big data, these are more than just eternally recurring trends. We're learning some very lasting things about how computers should deal with data.

<comment><USER12> Because computers and reality don't actually deal with immutable data? I love the reasoning powers you get from it at a code level, but it's simply not a fast way to do things in many cases. Also, many applications do not care about all (or any) interim copies of data.

With respect to web content, what are you proposing? If I got to site.com/product1data and you update the price, we certainly don't want the URL to change. In such situations, how would a versioned system add any value, and how would the UI be exposed?

<comment><USER13> [not the OP] In your example, the URL name would be a reference to an immutable document with an immutable ID. You can update the named reference to point at the new ID, but the old ID still refers to the old document.

It would also be possible to store and distribute new versions as patches to previous versions by linking between the patch set, old version, and new version.

<comment><USER12> OK, but how does that fit into how we're actually using URLs today, like how would this change the web? If you browse my product info page, I don't want you linking to a versioned document, in general. In the cases I'm thinking of off the top of my head, I'm not sure when you'd ever want people linking/copying version-specific URLs that somewhat negate the point of updating the page in the first place.

Or perhaps I don't understand "Why can't we look at data that is published on the Internet is the same manner".

<comment><USER11> The web of today is based completely on "this named thing references this other named thing". When we create links to other content we are most definitely doing so in the context of the content as it is at the time of linking, not some future state. What happens if that data is waaay different or missing? Dead links we call them.

It terms of commerce this is somewhat analogous to bait-and-switch.

In this thread I'm mainly referring digital content as an end-to-itself, not of digital content as a reference to physical products.

As for referencing physical products, be they automobiles or paintings, deriving a direct cryptographic hash isn't possible, but GUIDs are. Cars already have serial numbers. Paintings have signed certificates from experts.

If I'm on a website buying a used car I definitely want the price list to be linking to the GUID, that is, to a reference of the object itself.

</comment></comment></comment></comment></comment><comment><USER14> For those interested in a system that is using ideas presented here, check out ipfs ([http://ipfs.io](http://ipfs.io))

<comment><USER15> y'all are doing a bang-up job with IPFS, but I'd say it's always a good habit to clarify affiliation when spreading the word :)

(I was going to give your team a shout-out if you hadn't beat me to it!)

<comment><USER16> hey patcon! yep, you're right. whyrusleeping and I are both building ipfs. :)

</comment></comment></comment><comment><USER17> If you tracked the content of the changes themselves, rather than having them be implicit, you have git!

</comment><comment><USER18> The reason naming things by hash is a good idea is that you can cache them "forever", until you decide to change headers. The only benefit of a UUID over a URL is that the lack of meaning makes it less likely that people will change it later on. However, semantic naming is useful, and avoids collisions. True UUIDs require very careful use of RNGs.

</comment><comment><USER19> For modifiable content, more useful than UUIDs would be (chosen-name, content- hash) tuples that are then signed by the publishing crypto-identity.

The chosen-name can be a UUID, but doesn't have to be something so semantically-opaque. It's more likely to be a tree-namespace like traditional domain-centric URLs. The publishers-key replaces the role of the domain-name as the 'authority' portion of the URL.

(Once upon a time, I suggested 'kau:' – for Keyed AUthority – as a URI-scheme for such URLs in a location/protocol-oblivious web: [http://zgp.org/pipermail/p2p-hackers/2002-July/000719.html](http://zgp.org/pipermail/p2p-hackers/2002-July/000719.html) )

<comment><USER20> Interestingly camlistore does that:

\- First you create a "random" blob that has an identity (called a permanode), that you sign with your private key. It acts as an "anchor" you can link to.

\- Then you sign a piece of json that references the permanode and the content you wish; it effectively means "I, owner of key XXX, claim that permanode called 12345 now references value ABCD".

\- To get the content of a permanode, you search all modifications and merge them to obtain the final value

</comment></comment><comment><USER21> An alternative, peer-to-peer name resolution mechanism will be in greater demand every year. Currently, DNS records are spoofed, proxied, blocked, and whatnot by the domain name registrars because of legal threats by big money.

There should be a way for people to search a particular server by name without being in cahoots with every other party who wants to get involved in it.

</comment><comment><USER22> BTW the author is Joe Armstrong -- Erlang's inventor.

The link to the The Mess We Are In he refers to ( [https://www.youtube.com/watch?v=lKXe3HUG2l4](https://www.youtube.com/watch?v=lKXe3HUG2l4) ) is a fun and accessible talk to gave at Strange Loop conference last year.

</comment><comment><USER23> "Once we have the SHA1 name of a file we can safely request this file from any server and don't need to bother with security."

I don't understand this statement. Dispensing with encryption makes the request and returned content susceptible to passive observation. Saying that this approach is resistant to active manipulation assumes the existence of some kind of web of trust between hashed documents. At some point you're going to have to click on a hash without knowing its provenance. How do you know you're not being phished?

<comment><USER24> When you have a hash you trust locally, you can fetch a file from anywhere without caring about the source - the only thing that matters is if the file matches your hash. So the only thing you need to care about is ensuring that the hash you have is the one you really want.

<comment><USER25> Only if you assume that your hashcode can't be collided (it probably can).

<comment><USER19> If you're using a proper cryptographically-secure hash, it almost certainly _can 't_ be collided.

<comment><USER25> So I happily get file md5:d41d8cd98f00b204e9800998ecf8427e

Tomorrow everyone discovers that MD5 has been compromised by some organisation with a lot of money (obviously this happened long ago).

So the author needs to re-publish it as sha:adc83b19e793491b1c6ea0fd8b46cd9f32e592fc

And all my links are suddenly broken and I can't provide a mapping from old to new.

And then someone breaks SHA...

All I'm saying is that content-addressed hashing doesn't obviate the need for secure transport and trust.

<comment><USER19> MD5 has been known to be too weak for this purpose since 1995. So, no competent protocol-designer or publisher will have used it for this purpose for decades. SHA1 is now under enough suspicion to avoid for this purpose, but not yet proven to be compromisable.

But SHA2-256 and up, and many other hashes, are still safe for this purpose and likely to remain so for decades – and perhaps indefinitely.

So within the lifetime of an application or even a person, secure-hash-naming _does_ obviate the need for secure transport and trust. Also note that 'secure' transport and trust, if dependent on things like SSL/TLS/PKI, also relies on the collision-resistance of secure hash functions – in some cases even weaker hash functions than anyone would consider for content-naming.

(For the extremely paranoid, using pairs of hash functions that won't be broken simultaneously, and assuming some sort of reliable historical- record/secure-timestamping is possible, mappings can be robust against individual hash breaks and refreshed, relay-race-baton-style, indefinitely.)

<comment><USER26> Gojomo, that was the point of using MD5 in the example. If this system had been deployed in 1995, it would have been used MD5, and thus the problem of broken/obsolete links that the comment outlined would have applied to it after a few years. Who's to say the same thing wont happen to this system in 5 years?

<comment><USER19> There was no surprise break of MD5 – it came after plenty of warning, so even a hypothetical 1995 deployment would've had years for a gradual transition, and continuity-of-reference via correlation-mapping to a new hash.

So even that hypothetical example – with an early, old, and ultimately flawed secure hash – reveals hash-based as more robust than the alternatives.

And in practice, hash-names are as strong or stronger than the implied alternative of "trust by source" – because identification of the source is, under the covers, also reliant on secure hashes… _plus_ other systems that can independently fail.

We have experience now with how secure hash functions weaken and fail. It's happened for a few once-trusted hashes, with warning, slowly over decades. And as a result, the current recommended secure hashes are much improved – their collision-resistance could outlive everyone here.

Compare that to the rate of surprise compromises in SSL libraries or the PKI/CA infrastructure – several a year. Or the fact that SSL websites were still offering sessions bootstrapped from MD5-based PKI certificates after MD5 collisions were demonstrated.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER27> Reminds of me an experimental, hypothetical future Internet architecture called Named Data Networking: [http://named-data.net/](http://named-data.net/)

</comment><comment><USER28> Freenet does this, but with a more secure (and less flexible) alternative to UUIDs.

[https://freenetproject.org/](https://freenetproject.org/)

<comment><USER29> Yep. Freenet is basically this plus a bunch of really complicated mechanisms to create anonymity in who shoved the documents into it. If you take those bits out† then you're left with a DHT that:

1\. lets you talk about individual objects by hash-based URNs;

2\. or lets an publisher insert _versioned streams_ of objects using _document-signing with deterministic subkeying_ ‡; gives the stream as a whole a UUID-based URN; and then lets clients query for either the latest, or for any fixed version-index of a given object-stream;

3\. and which does a sort of pull-based store-and-forward of content—every node acting as a caching proxy for every other node.

I'm _really_ surprised nobody has just built this trimmed-down design and called it a "distributed object storage mesh network" or somesuch. A public instance of it would beat the Bittorrent DHT at its own game; and private instances of it would be competitive with systems like Riak CS.

\---

† Which is perfectly sensible even for Freenet itself; you could always just run your Freenet node as a Tor hidden service, now that both exist. Tor cleanly encapsulates all the problems of anonymous packet delivery away; the DHT can then just be a DHT.

‡ This is similar to Bitcoin's BIP0032 proposal, but the root keys are public keys and are available in the same object-space as the transactions. Given that you have the root public key, you can both 1. prove that all the documents were signed with keys derived from this key, and also 2. figure out what the "nonce" added to the root key to create the subkey was in each case. If the inserting client agrees to use a monotonically-increasing counter for nonces, then the subkey-signed documents are orderable once you've recovered their subkeys.

<comment><USER11> _I 'm really surprised nobody has just built this trimmed-down design and called it a "distributed object storage mesh network" or somesuch._

You mean something like this?

[http://ipfs.io/](http://ipfs.io/)

</comment></comment></comment><comment><USER4> A potential stepping stone to the web of hashes proposal here is the Subresource Integrity spec: [http://w3c.github.io/webappsec/specs/subresourceintegrity/](http://w3c.github.io/webappsec/specs/subresourceintegrity/)

The other thing in this area to watch is ipfs.

</comment><comment><USER30> XRI[1] was a nice effort to solve this issue.

[1][http://en.wikipedia.org/wiki/Extensible_resource_identifier](http://en.wikipedia.org/wiki/Extensible_resource_identifier)

</comment><comment><USER31> There is some research going on in Information Centric Networking and Named Data Networking. The basic idea is switching to a system based on content instead of hosts. The proposed solutions try to reduce traffic overhead (like replication and caching of content on switches and routers), provide better indexing and search functionalities etc.

[1]: [https://en.wikipedia.org/wiki/Information- centric_networking](https://en.wikipedia.org/wiki/Information- centric_networking)

</comment><comment><USER32> Very interesting, this could be powerful.

Things like git hashes and the bitcoin blockchain are already giving us pieces that head in this direction.

One thing I would not like to see would be total lockdown of the worldwide body of documents, where every digital creation is perfectly and irrefutably tagged and tracked back to its creator and on every step along the way. I'm not sure what all the bad consequences of this could be, but it doesn't give me a warm and fuzzy feeling.

</comment><comment><USER33> Isn't this the point of URIs? [https://tools.ietf.org/html/rfc3986](https://tools.ietf.org/html/rfc3986)

<comment><USER34> No it's the point of URNs, you can go back much further for solutions that seek to address this very issue.

<comment><USER33> Thank you

</comment></comment></comment><comment><USER35> Why not something like Bit.ly Combination of 6 Chars? 57+B Combination is a good number. For a short URL website.

For content website, something like Youtube which has combination of 11 Chars. It's pretty good. For them but surely will have a problem in future but that might be after 5+ Years. But if they add one more char, it will have more combinations.

If this is about URLs and not files. Can any one correct me if I am wrong.

<comment><USER12> Because those 6 chars need to have a backing store to map them. You cannot derive the 6 chars just from the content of a file. Whereas with a hash function, you can.

<comment><USER35> Got it. Thank you.

</comment></comment></comment><comment><USER36> Aren't these the same ideas that Rich Hickey has been talking about since his seminal 2009 talk about values, identity and state? [http://www.infoq.com/presentations/Value-Identity-State- Rich...](http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey)

Joe Armstrong's proposal seems to boil down to this:

\- Identities as UUIDs

\- State as the payload of UUID URIs

\- Values as SHA-1 URIs

</comment><comment><USER37> Regarding "the web of hashes", I wrote a chrome proof-of-concept awhile back:

[https://github.com/amoffat/hash-n-slash](https://github.com/amoffat/hash-n- slash) previous discussion: [https://news.ycombinator.com/item?id=6996398](https://news.ycombinator.com/item?id=6996398)

</comment><comment><USER38> Armstrong's concern about the ever-growing number of data objects is interesting in itself. He says Git(hub) is great and all but - paraphrasing - forks outnumber merges. At some point such systems become unwieldy unless there is systemic incentive to dedupe, merge, categorise or otherwise reduce complexity. This chimes with my view too.

</comment><comment><USER25> Tangentially related to some issues mentioned here (keeping track of articles that change over time) is the Memento protocol: [http://timetravel.mementoweb.org/](http://timetravel.mementoweb.org/)

It's a very interesting project, worth a look

</comment><comment><USER39> I've seen this done in Cloud Foundry, for these reasons.

Objects with _identity_ , like a buildpack, are given a UUID. That UUID is stable, but the hash changes on disk depending on the exact file uploaded (because you can replace buildpacks).

File paths include both UUID and hash.

</comment><comment><USER40> Gfycat[1] provides a slightly hybrid solution. Not sure that it is that effective for sharing though.

[1] [http://gfycat.com/about#links](http://gfycat.com/about#links)

</comment><comment><USER41> RIPEMD-160 would be a more appropriate hash for this. SHA-1 is no longer thought to be sufficiently secure against collisions.

Edit: If you're downvoting, please explain. This is more or less factually correct.

<comment><USER42> A member of the SHA2 (or SHA3) family would be more appropriate. RIPEMD-160 is slower and less resistant to collisions. I agree however that the use of SHA1 is problematic!

<comment><USER41> >A member of the SHA2 (or SHA3) family would be more appropriate. RIPEMD-160 is slower and less resistant to collisions.

"openssl speed" reports RIPEMD-160 being a few percent _faster_ than SHA256 on my computer.

What makes you say it's "less resistant to collisions"? I don't think there are any serious cryptanalytical attacks on RIPEMD160.

<comment><USER42> N-bit hashes have at best (N/2)-bit collision resistance (see birthday attack[1]). An 80-bit security level does not have a large enough margin of safety nowadays.

RIPEMD has a 256-bit variant, but it hasn't received enough scrutiny.

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

<comment><USER41> That's incredibly misleading.

We don't care about the likelihood of producing some random collision; we care about the likelihood of producing some _specific_ collision (which is not vulnerable to the birthday attack). [http://en.wikipedia.org/wiki/Preimage_attack](http://en.wikipedia.org/wiki/Preimage_attack)

The reason SHA-1 is considered insufficient is that it is cryptographically broken [https://marc- stevens.nl/research/papers/PhD%20Thesis%20Marc%...](https://marc- stevens.nl/research/papers/PhD%20Thesis%20Marc%20Stevens%20-%20Attacks%20on%20Hash%20Functions%20and%20Applications.pdf)

I.e. the chance of finding a collision is substantially higher than would be expected from an ideal PRF.

As far as I know, there are no serious cryptanalytical attacks on RIPEMD-160, and 160 bits is more than sufficient for cryptographically unique identifiers.

<comment><USER42> Collision resistance is critical for most applications of the OP's scheme. The OP is proposing using hashes as identifiers for immutable content. Imagine the following:

\- I publish a JavaScript library under this scheme using a hash without collision resistance.

\- Popular/important websites refer to my library as hashname://..., trusting that this refers to the version of the library that they audited.

\- I can then create a new, malicious version of the library that has the same hash and use it to infect popular sites.

Allowing collisions breaks the immutability requirement, which impacts security in many important cases.

<comment><USER43> > Allowing collisions breaks the immutability requirement, which impacts > security in many important cases.

 _All_ hashes have collisions. There are no cryptographic hashes that can promise zero collisions.

<comment><USER42> Of course; I was speaking informally. "allowing collisions" == "allowing it to be feasible to find a collision"

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER44> Guys, yes, there is a need for sorting things out, but it should go the other way around: the uuids and hashes should be abstracted into a way more user- friendly interface.</comment>


How to Make Millions of Hoverboards Almost Overnight - <AUTHOR> http://www.buzzfeed.com/josephbernstein/how-to-make-millions-of-hoverboards-almost-overnight <comment><USER2> _Call it memeufacturing. It starts when a (typically) Western company, eager to cash in on a product made popular by the social internet, contracts a Chinese factory to make it. From here, the idea spreads throughout the elaborate social networks of Chinese electronics manufacturing until the item in question is being produced by hundreds and hundreds of competitors, who subcontract and sell components to each other, even as they all make the same thing. It reaches its saturation point quickly. It moves from product to product without sentiment. And it is proof that our never-ending digital output, our tweets and Vines and Instagrams and Facebook posts, has the power to shape the lives of people on the other side of the world._

</comment><comment><USER3> Just listened to the Planet Money episode about this: [https://overcast.fm/+BP5_W92-o](https://overcast.fm/+BP5_W92-o)

Anyone getting one?

<comment><USER4> Don't have a hoverboard but I do have an electric unicycle (they're usually made at the same factories). It's fast and I use it instead of my bicycle when it isn't raining.

</comment></comment><comment><USER5> Why are these wheeled things referred to as "hoverboards"?

<comment><USER6> Same reason quadcopters are referred to drones.

<comment><USER5> Thanks, now that's going to bug me forever.</comment></comment></comment>


Amazon's Disruptive Android App Store Now Open To Developers — Full Details - <AUTHOR> http://techcrunch.com/2011/01/05/amazon-android-app-store-2/ <comment><USER2> Free for the first year, $99 fee waived. Nice. Reading through the agreement though, there are a few interesting things.

1\. You have to provide Amazon with all software that is yours on the Market 2\. You have to add Amazon specific DRM to the apps you add to Amazon and cannot use any other DRM 3\. There are privacy requirements on embedded advertising 4\. The parentheses in the agreement are not well balanced! There are a lot of missing closing )s.

So you cannot pick and choose which of your software goes on Amazon and which on the Market. The DRM means you would at the very least need 2 versions of your software if you use Google's licence server "DRM" - one with Google's technology and another version with Amazon's.

I'd say that if you go the DRM route, you'd want to use Amazon or the Market, but not both. If Amazon turns out to be more popular with paying customer this could really have an impact. Especially the "all your Apps belong to us" requirement - I think having a free-with-adverts version of an App on the Market and a paid version on Amazon is forbidden under this agreement.

Policing rogue advertising is good, though I doubt Amazon will really kick anyone off for using AdMob or any of the big players.

Also, #4 shows that the agreement was not written by a Lisp programmer. It makes reading parts of the agreement tricky.

</comment><comment><USER3> Wow..Amazon gets to set the price on your app. Developers only get to recommend. Certainly original. If this takes off it could have a significant impact on application pricing for more than just Android devices.

iTunes put it in people's heads that a song is worth $1. Amazon is working hard at saying that a book is worth $10. This is the same model - by setting the price for individual apps, Amazon is going to be setting the price for the entire industry. I'd assume Amazon would almost always price an app lower than developers would (and I doubt you'll be able to game the system by suggestion for 2x what you would have otherwise), meaning an overall downward pressure in app prices.

Would benefit users...seems impossible to tell whether it'll benefit developers (or whether other aspects of the store will compensate them, such as with increased sales).

<comment><USER4> _"Amazon gets to set the price on your app. Developers only get to recommend. Certainly original."_

This is how the vast majority of retail products work. The manufacturer suggests a retail price, but it is up to the retailer to determine what the consumer ultimately pays. Software was sold this way for several decades.

So it strikes me as more "retro" than "original". Not that it's a bad thing -- I love the idea of Amazon split-testing my pricing, because it lets me focus more on the app itself.

<comment><USER5> _The manufacturer suggests a retail price, but it is up to the retailer to determine what the consumer ultimately pays._

This is quite different because in retail the wholesale cost is negotiated between the manufacturer and retailer. Therefore, the price that the retailer chooses to sell the product at to consumers does not change how much the manufacturer makes (except indirectly, by affecting quantity sold and therefore bought from the manufacturer). Coca Cola gets the same amount of money per can if Walmart sells the cans for 20 cents each or $2 each.

In this case, Amazon essentially gets to choose not only the retail price, but the wholesale price, except that the prices are at a fixed ratio to one another and there is a price floor on the wholesale price based on the suggested retail price you gave.

<comment><USER6> Wal-mart is a bad example to use here. They actually tell companies what they are willing to pay; and everyone falls in line. Thats why some products you buy at WalMart aren't as good a quality as they are at other places. Companies make cheaper products to meet the demands of walmart.

</comment></comment></comment></comment><comment><USER7> Finally! IMHO Google's Android Market is the weakest part of the platform right now. I am fond of my Android phone but it really is a pain to find new apps. AFAICT, the only way to really do it is from the handset, which is not nearly as useful as being able to do it from my desktop machine. Hopefully the existence of Amazon's marketplace will motivate Google to get their act together. If not, maybe I'll just switch to the Amazon market.

<comment><USER8> Android has several issues and I agree that the market app sucks, so I use appbrain. Give a try if you haven't already. It gives decent recommendations and you can filter apps by hotness among other things.

<comment><USER9> I think the issue, though, is not if you (or other people on HN) use AppBrain: it's if your customers are going to be able to find your app. I doubt that a significant chunk of Android users actually use something like AppBrain, so a pre-installed Amazon Appstore might help those people.

<comment><USER8> I never implied otherwise (I agree), just spreading the word about appbrain.

</comment></comment></comment></comment><comment><USER10> No one notice that you must get all your apps through Amazon approval before you can make them available for sale elsewhere?

 _b. Timing of Deliveries. ... You will deliver future Apps within 14 days before the initial availability date you designate for the App (the "Initial Availability Date"). The Initial Availability Date must be no later than the first date you permit the App to be listed for pre-order or sale on any Similar Service. ..._

EDIT: And updates as well. So no more releasing emergency break fixes.

<comment><USER11> Wow, thanks.

</comment></comment><comment><USER12> International developers still get robbed. Coding from Europe, i should give USA 30 per cent to sell my app to European public? And that means, 30 per cent to Amazon, from what is left 30 per cent to USA, from what is left 20 per cent to my government..... ridiculous...

<comment><USER13> It's not even going to be available in Europe at launch. It'll be USA only.

</comment></comment><comment><USER14> What about free apps?

I would be OK with my $0.99 app costing $0.79 if Amazon thinks it sells more but I wouldn't want my free app to suddenly cost money.

</comment><comment><USER15> Amazon is a big player and has potential to disrupt the Android app economy. Already their pricing mechanism is set up where they WILL undercut the Android marketplace. That is why people will choose to buy and download Android apps from Amazon. They have an easy payment system that millions have purchased from. And they will work with carriers and manufacturers to get their Amazon AppStore on as many phones as possible. Overall, I think this is good for developers because more people will purchase apps. But the developers will lose control over pricing and you'll have two markets - Android marketplace at retail price and the Amazon appstore at discount price. Maybe people will download free apps from google's marketplace, and paid apps from Amazon's. Not as seamless as Apple's ecosystem, but people like a deal.

</comment><comment><USER16> Not sure this deserves the excitement of the headline. Amazon's been trolling for mobile developers for months now, and there are many other app stores doing the same.

The question is which ones will get enough traction with consumers to matter.

</comment><comment><USER17> This might actually work.

One of the main reasons why Apple's App Store took off is that 100 million customers already had an iTunes account with a credit card on file.

Amazon is one of the few other online retailers that has payment details for 100 million customers. Along with tons of retail experience, that gives it a huge advantage over Google.

The only thing that worries me is that Amazon is still very US-centric. It only has localized sites for Canada, China, France, Germany, Italy, Japan, and the United Kingdom. 8 countries is far too few. Compare that to the 91 countries where Apple has App Stores.

</comment><comment><USER18> Wonder if Amazon are also considering selling apps on AWS via this appstore?

Would easily work for EC2 images but might also work in the "platform as a service" space like the sort of thing Heroku is doing. Or just "buy a blog" e.g. wordpress can sell via the appstore and it's running on the AWS cloud.

<comment><USER19> EC2 has had an app store (called "paid AMIs") for a while. It wouldn't make sense to use the _same_ store for Android and EC2 given the platform differences.

</comment></comment><comment><USER20> "So why, aside from these pricing differences, would consumers want to use this Amazon App Store at all? There are a few answers to that question.

The first is that there are manufacturers making Android devices that decide not to partner with Google to offer the official suite of Google applications (including Android Market)."

The market is available independent of google apps, the only bar required to get the android market is to show that the device you are shipping meats API compatibility, which I assume Amazon will want to enforce as well (who wants to distribute an app to a device that has hacked android to the point of API incompatibility?).

That said, this looks cool, and at the very least this will light a fire under the asses of the android market team!

</comment><comment><USER21> Would the various "markets" inter-operate? Does the device sold with operator firmware have access to the Amazon Android Market?

<comment><USER22> Yes. As with any real computing device, you can install software from anywhere. In Android, you have to check a checkbox first, but that's all.

<comment><USER23> Not necessarily... AT&T blocks non-Market apps on their phones.

<comment><USER22> Any company whose logo is the Death Star...

</comment></comment></comment></comment><comment><USER24> So far I've spoken to a copuple of different devs who, when I asked what they thought of Amazon setting the price, said "well there's a field for me to enter 'list price', so what are you talking about?"

Are a lot of people going to miss that detail and assume that the list price they set is what it will be sold for?

<comment><USER11> Yes. Me. I have refrained from submitting my apps now for 2 reasons:

1) They say I have to get their approval 14 days before submitting new apps to Similar Services

2) 20% of "List Price" that they can set???? I'm still confused on this, and I get A LOT of sales from the Market, so I'm not interested in Amazon deciding what's best for me.

</comment></comment><comment><USER25> Interesting difference: Amazon set the price of the app, not you.

</comment><comment><USER26> Odd that they got to this before they released the Kindle SDK.

</comment><comment><USER27> Maybe Amazon can do better device targeting aside from resolution and OS version. Device name would be good...

</comment><comment><USER28> The best part is the code review. I hate the current _anything goes/permission slip_ method.

<comment><USER10> I don't think they will do a code review. They won't even have the source. I should think the'll just do basic testing as Apple does.

</comment></comment><comment><USER29> If you are guaranteed 20% of the list price, I forsee devs overpricing their apps in the Amazon store to get a higher minimum payout.

Additionally, even if the best default price is much lower, it just makes their apps look that much better when Amazon's app store says "50% off" or "86% off."

<comment><USER10> Your list price can't be more than anywhere else you sell it.

<http://news.ycombinator.com/item?id=2071795>

</comment></comment><comment><USER30> Just wait for devices with ONLY amazon store and no way to install anything outside of it. Just like at&t+motorola screwed with the back flip in similar ways.

And don't be foled, this is probably their monetization strategy, not a consequence.</comment>


Ask HN: What's wrong with our Purple Cow promo page? - <AUTHOR>

While our iOS game was in review for a week, we built (what we thought was) a Purple Cow page that would spread through twitter and techies.  The app went live over the weekend and we released the page on Tuesday (and of course contacted many people/blogs/twitter).
We were inspired by benthebodyguard.com and their use of long-scrolling and fun storyline.  We intended to take it to the next level by using WebSockets/Socket.io/Node.js to make it a multiplayer-page.  Our storyline:
1. You and the hero (Xachi) start watching the demo video
2. An enemy comes in and breaks the video into 2 pieces (using -webkit-mask-box-image for jagged edge and fallback to overflow:none for other browsers).
3. The enemy runs off with half the video.
4. You long-scroll right to chase him, but the enemy is safe inside a bubble
5. You "splash" the bubble to pop it - but it's not enough.
6. You're prompted with a link to get a friend to help you pop the bubble.
7. Your friend joins the page and you both splash the bubble together.
8. The bubble pops and you each rescue the video and scroll back left to repair it.
We got some "wow how can you do that??" comments from the first people we showed, but it hasn't spread.  Is it too complicated?  Not well-designed enough?  Not enough wow factor?
We know that "going viral" is hard - so what's your Monday-morning-quarterback analysis?
http://xachipet.com/command/ <comment><USER2> That is a pretty cool idea, but because it's not really been done before, I would imagine that it's hard to get people to follow along with actually getting a friend to help out. I didn't want to read the whole page of instructions here, so I just clicked the link and tried to figure out, but it wasn't very obvious, and I ended up coming back to try and read what was supposed to happen. It might be too complicated. It would be even better if you could forgo finding a collaborator and just go on alone. I know that seems like it would lead to less 'virality' but I personally think that's actually a big bother to a lot of people. If they go on alone, and enjoy it, then they'll start telling others.

</comment><comment><AUTHOR> <http://xachipet.com/command/></comment>


How Google calculates search result count? - <AUTHOR> http://twitpic.com/448uqz/full Is any body tell me how google calculates search result count?
In google search we always see "About 117,000,000 results (0.12 seconds)", but there is no straight way to go to "117,000,000"th result except next->next-> on page.
Another thing i observed is that, search results count are not real.
e.g. I have searched for search string "google videos", on first page i got "about 117, 000, 00o results" But when i clicked for 10th page in the search i got "Page 10 of about 468,000,000 results". How this can be possible in 2 min?? is google making fool of us as we can not navigate to last result? One more thing i had tried same search "google videos" 5 month back at that time result count was 438,000,000 see - http://twitpic.com/30o2cv/full I can not understand what magic google done in its search??? <comment><AUTHOR> can any body tell me how google calculates search result count?

In google search we always see "About 117,000,000 results (0.12 seconds)", but there is no straight way to go to "117,000,000"th result except next->next-> on page.

Another thing i observed which shows search result counts are not real.

e.g. I have searched for search string "google videos", on first page i got "about 117, 000, 00o results" But when i clicked for 10th page in the search i got "Page 10 of about 468,000,000 results".

How this can be possible in 2 min??

is google making fool of us as we can not navigate to last result?

One more thing i had tried for same search "google videos" 5 month back at that time result count was 438,000,000 see - <http://twitpic.com/30o2cv/full>

I can not understand what magic google done in its search???

</comment><comment><USER2> oh, yes.... how this can be possible</comment>


Error messages produced by Apple's MPW C compiler (2006) - <AUTHOR> https://www.cs.cmu.edu/~jasonh/personal/humor/compile.html? <comment><USER3> I never had to use the compiler back in my early Mac programming days, as I got into Mac programming starting with Lightspeed C (later THINK C). Some of my friends used MPW, though. MPW was much more expensive. I do remember having to use it years later when I was trying to compile an C library for use on the Newton. I discovered that it was pretty far from an ANSI/ISO compliant C - <USER2> example, it didn't accept the question mark (ternary) operator at all. But the MPW toolset was very cool, including the Worksheet concept. I still use the Worksheet concept in BBEdit on MacOS X and it is wonderful; I use it to handle the workflow for producing podcast episodes.</comment>


Beej's Guide to Unix Interprocess Communication - <AUTHOR> http://www.ecst.csuchico.edu/~beej/guide/ipc/

<comment><USER2> This is pretty good. But it's important to understand just how much has changed over time, and to add appropriate grains of salt.

For instance, the signals reference is showing its age. On Mac OS X (and probably other systems), the current signal mechanism _does not_ uninstall the handling function after a signal fires. Also, you could have an entire discussion on the proper use of signals within multithreaded applications, and there is no mention of threads in this tutorial (because it's dated 1997).

<comment><USER3> Some would say that if signals are the answer, the question must be wrong.

<comment><USER4> "How do you uniformly and asynchronously request that a process clean up its resources and exit, when e.g. the hardware is about to shut off?" That doesn't sound like a bad question to me.

</comment></comment></comment><comment><USER5> A much more recent version of this is available @ <http://beej.us/guide/bgipc/output/html/multipage/index.html>

</comment><comment><USER6> i used this last week! i was working out how best to coordinate access to a gpu (opencl) and decided on ipc - the shared memory messaging reduces overhead on the host, and we can have a bunch of processes running on different cores on the cpu all feeding to the gpu when appropriate. this was the best background on ipc i found.

(incidentally - does the above make sense? i am new to both gpus and ipc...)

</comment><comment><USER7> I'm up-voting in homage to nostalgia. I still remember being giddy the first time I read Beej's network programming. Oh, innocence.

<comment><USER8> I'll agree with the nostalgia, bringing me back to college. I was at Chico with him. I however don't miss HPUX, I do miss my Slackware though.

</comment></comment><comment><USER9> Wow seeing "Beej's" made me feel nostalgic.

</comment><comment><USER10> Out of date lecture notes with what looks like a bias for HP-UX. There are better sources of information.

<comment><USER11> can you provide the links to the better sources? otherwise this isnt a very useful comment.

<comment><USER10> Sorry, I was trying to be concise. I'll aim to be useful. I think the guide as it is, is not only old but incomplete and mostly points to man pages. It's saving grace is the examples, which could easily be taken from a code search.

The Stevens Unix network programming is a better source if you have it. Vendor documentation is often better too. Say you were interested in SYSV IPC:

[http://www.ibiblio.org/pub/Linux/docs/LDP/programmers- guide/...](http://www.ibiblio.org/pub/Linux/docs/LDP/programmers- guide/lpg-0.4.pdf) [http://www.advancedlinuxprogramming.com/alp-folder/alp- ch05-...](http://www.advancedlinuxprogramming.com/alp-folder/alp-ch05-ipc.pdf) <http://developers.sun.com/solaris/articles/named_pipes.html> <http://www.ibm.com/developerworks/aix/library/au-ipc/>

Working code like the APR is worth reading for portability issues, particularly with sockets. I'm sure there are many other examples.

Given all this would you really use this guide when writing code?

</comment></comment></comment><comment><USER12> SysV IPC has message queues? I didn't know that, that looks useful.

</comment><comment><USER13> I remember printing that. Thanks for the blast from the past! :)

</comment><comment><USER14> That's where I have learned what a socket was many years ago :)

</comment><comment><USER15> Wish if Beej's guides were continued. They are 'cool'.

</comment><comment><USER16> I remember _my_ first UDP packet...</comment>


Toyorm – ORM for Go - <AUTHOR> https://github.com/bigpigeon/toyorm <comment><USER2> I've come to the conclusion --- maybe wrong? --- that Go doesn't want you to do ORM this way. For awhile I thought Go didn't want you to do ORM at all (which would be problematic for me, because I think writing SQL is a huge waste of time). But now I think it just doesn't want you to use ORMs that look like Django or ActiveRecord.

Instead of defining and marking up structs and setting up hooks and configuring registries of objects and stuff, just give up on dynamic ORM and switch to codegen.

I wrote a codegen ORM in a weekend that turned out much more pleasant to use than anything like gorm, not least because everything was just plain- ol'-Golang-code. All I really needed to write was the minimal Go code to dump a schema from Postgres, and then a bunch of text/template templates for all the functions I wanted. I got associations in just a couple functions.

I would have published, but it looks like 100 people had this thought before I did. sqlboiler seems like the most mature (I didn't look that carefully). But you could seriously just write your own. If I had to do it again, I'd probably codegen something on top of Squirrel.

<comment><AUTHOR> yes, codegen have better performance than reflect

but I think text/template to generate code is not really good

it hard to read and error-prone

it is more like a powerful c-macro

I think use go/ast to implement c++ likes template is other way

<comment><USER2> Whatever works! I just wrote the functions I wanted normally, tested them, then converted them to templates.

</comment></comment></comment><comment><USER3> As far as Go ORMs go, there isn't a decent one that handles what I consider a killer feature of ORMs - relationships. I think sqlx is good enough for most, but I once inherited a project that the management wanted to rewrite off of Scala to Go. Some of the relationships were so complex that hand writing complex joins would have been challenging. Gorm came closest, but it's "eager fetching" features executes n+1 queries rather than joins.

<comment><USER4> Yes yes and yes. Unless the usecase is truly as simple as CRUD with a single model (in which case I reach for gorm), The easiest road often seems to be just using sqlx and hand-writing the inserts/updates.

<comment><USER5> What about 90% of cases being simple CRUD and 10% you just do the usual "raw SQL query"?

I've chosen this path of using only sqlx on my current work project (only me) and regret it, because so much typing..

<comment><USER6> I also work alone on a Go service and have some complex models. I used Gorm and then for complex selects broke out the raw sql. It works okay, I'm still having to bolt on things like OCC and Versioning to my models. I'm glad I used it though- it gave me a solid foundation to work off and replace the bits that don't quite work well.

</comment></comment></comment></comment><comment><USER7> Off-topic: any reason why so many Go repositories have a flat structure? Wouldn't it be nicer to organize all the *.go files?

<comment><USER8> Part of is is probably because subfolders are subpackages and relative imports don't work and absolute imports have other issues - like causing issues with forking.

<comment><USER9> > because subfolders are subpackages and relative imports don't work

Really ? Is that a bug, or by design ? If the later, what's the rationnal about it ?

<comment><USER8> IIRC the tooling is not smart enough to resolve them when you import a subpackage directly.

I was working on a go project and I had to convert all of the relative imports to absolute imports for some reason, but the exact cause escapes my memory.

</comment></comment></comment></comment><comment><USER10> It seems like it would be easier to talk to dbs if we had a way to work directly with tables in Go, but it's not clear how to do that without resorting to the empty interface. R is great at dealing with tables so maybe it could be looked to as an example.

</comment><comment><USER11> It's going to be hard to unseat GORM gorm.io/docs/query.html

<comment><AUTHOR> when you want to make complex sql,toyorm maybe word better

find the name = "tom" user and it subquery blog title = "first blog" e.g

      brick := toy.Model(&User{}).Where("=",Offsetof(User{}.Name),"tom").
    			Preload(Offsetof(User{}.Blog)).Where("=", Offsetof(Blog{}.Title), "first blog").Enter()

      brick.Find(&user)
      // raw sql
      // select id,name,data, from user where name = "tom" limit 1
      // select id,title,content,user_id from blog where user_id = @user.id and title = "first blog"

toyorm select field with Offsetof, it better when you want to refactor struct field name and you can operation main query as sub query

</comment></comment><comment><USER12> Why would I use this vs. something like Gorp? How is Toyorm differentiated?

<comment><AUTHOR> preload: data association exec/query template exec: custom exec/query this is my orm great features

</comment></comment><comment><AUTHOR> toyorm v0.3.1-alpha add join query</comment>


Ask HN: If you had a chance to do a RTW trip, what places would you visit? - <AUTHOR> I work remotely and have just finished a 2-month trip exploring the Western US. I had a blast and now I want to try a bigger trip in 2019.
I am feeling a call to go to NYC for the first time, Iceland to see Northern Lights, then EU (start from either London or Barcelona), then Egypt, then India/Nepal/Tibet, SEA, then HK, Beijing, Seoul, Japan (spend a lot of time here), Hawaii (most likely land in Honolulu to save money. Already been to Maui), San Diego, back home.
I know I can't 'see it all'. I'm okay with saving the rest of the Americas, Australia/NZ, Arctic, Antarctic for later life (I'm only 28). I also know that I'll return to EU and Asia again, so I only feel the need to see places that I feel connected to or inspired by.
I'm asking here because I'm sure many of you travel a lot or work remotely. Where better to ask than here. Reddit is hit or miss these days. <comment><USER2> My advice is not to plan it as a RTW trip.

Pick a good city at the edge of a continent (Bangkok, Cape Town, Lima) and book a one way flight. Travel slowly overland, talk to people you meet, and let your trip plan itself and evolve as you go.

Most important is to never put a date on the calendar. Dates wreck plans and make you rush past things you really should have taken the time to see right.

Chances are you'll cover a lot less ground than you expect in a year. That's fine. You can (and will, I guarantee) come back before long. Travel is addicting that way. I sometimes used to book my flight back home as a round trip back to where I'd left off.

Good luck!

Edit: I wrote a bit more about this idea a few years back:

[http://www.blogabond.com/CommentView.aspx?CommentID=8226](http://www.blogabond.com/CommentView.aspx?CommentID=8226)

... and I touched on where to go here:

[https://www.expatsoftware.com/articles/2008/05/laid-off- one-...](https://www.expatsoftware.com/articles/2008/05/laid-off-one-thing- you-absolutely-need.html)

<comment><USER3> Strongly second this advice.

</comment></comment><comment><USER3> The consensus from people I have met is to visit fewer countries but spend more time in each. I travelled extensively in my twenties and agree with this. Below the highlights for me:

\- South India in monsoon season. Its off season and only the crazies venture out. See the Temple @ Hampi, Visit Vattakanal/Kodaikanal, Palolem beach. Note you'll need at least a month to "acclimatise" to India. People who stay for shorter durations tend to hate it. People who stay for longer tend to fall in love with it.

\- The train from Shanghai to Tibet. Visiting temples in Lhasa and you can visit the (north) base camp of everest. The train journey itself is surreal.

\- The Indonesia learn-to-surf-and-party-trip. Start in Jakarta, party. Take economy train to Batukaras, learn to surf. Overland to Bali stopping at solo/surakarta for a friday-night wayang kulit performance, or Bromo via the trekking route (not the jeeps).

I have never visited any central/south African countries. However I havent met a person who has and didn't feel it was the most memorable part of their round the world trip.

</comment><comment><USER4> Your route takes in some great places. It would help if you could be more specific as to what you are looking for - great nature, culture, architecture, UNESCO world heritage sights, beach, food, people, etc.

A few things that come to mind, concentrating on AsiaPac:

* Angkor Wat in Cambodia and Borobudur in Indonesia are temples worth seeing. Luang Prabang in Laos too, though maybe a bit overrated.

* Central coast of Vietnam has several nice spots (eg Hoi An).

* I'd not spend too much time in Seoul, but consider visiting the bizarre DMZ. Why so much time in Japan?

* On the way from East Asia back to the West Coast, consider stopping by in the North Pacific: Palau (beautiful nature and great diving), Yap (manta rays and stone money), CNMI (WW II sites, such as the place where Fat Man and Little Boy were loaded on the bombers), FSM, etc. There's the Continental "Island hopper" that covers these (and only rarely undershoots the runway).

* I'd also recommend the Middle East, eg Iran, but this might not be a good time. And consider Eastern Africa.

</comment><comment><USER5> How long are you planning to spend travelling? This might be something you've already considered, but with jet lag and the general unpleasantness of airline travel you'll probably want more acclimatisation time in each new place than when you were travelling in the states.

Some places I'm personally interested in that you didn't mention include Switzerland, Israel, Taiwan and Ethiopia.

</comment><comment><USER6> What languages do you speak? Are you interested in getting off the beaten track or do you want to hit the major tourist sites?</comment>


At Silk Road trial, federal agent explains how he trapped Ulbricht - <AUTHOR> http://arstechnica.com/tech-policy/2015/01/silk-road-trial-federal-agent-explains-how-he-trapped-ulbricht/ <comment><USER2> Fascinating. This line made my eyebrows rise.

> Der-Yeghiayan didn't know who Dread Pirate Roberts was, and even after his > extensive testimony, it still isn't clear how he found out. On the stand > today, he said that an IRS investigator told him Ulbricht was the suspect.

That seems like it would be a pretty big gap in the prosecutions case.

<comment><USER3> Until they put the IRS investigator on the stand.</comment></comment>


Ask HN: Can you 'succeed' going IPv6 only? - <AUTHOR>

Can a technical product or service startup make money on a IPv6 Only stack?
Would you accept that your paying extra (like $1 to $5 extra) to use IPv4 if there was split pricing where IPv4 support was in a premium deal, or IPv6 was the only option on an introductory tier?
I'm genuinely curious how close we are to the tipping point where a company who's primary customer is highly technical types, can start thinking IPv6 first.
If this question doesn't make sense. Some background:
I'm forever pondering creating either an IAAS or SAAS type product/startup, and having dived into Docker and LXC on OpenStack, I feel closer than ever to being able to really try it!
But every time I dive in, fire up some hosts on EC2, Rackspace, Digital Ocean, Linode, wherever it may be I keep running into a snag... IP Addresses. Fees, Justifications, etc. Always a pain. It's pretty much impossible to fire up a few hundred nodes to give things a proper scale and load balancing test with public IPv4 addresses. So every time I ask myself "I wish I could just only use IPv6". And now I finally want to ask at least a subset of the people who would likely use the things I've been thinking of building, 'Is IPv6 alone, ok?' <comment><USER2> Some smaller VPS companies [1] have this model, giving each VPS public IPv6 addresses only as standard (sometimes with outbound IPv4 going through a NAT), and then charging a premium for a public IPv4.

[1] Examples: [http://vds6.net/](http://vds6.net/) [https://365networks.net/products_vps_ipv6.php](https://365networks.net/products_vps_ipv6.php) [https://www.xothost.com/node/310](https://www.xothost.com/node/310)

</comment><comment><USER3> From a guy immersed in IPv6 daily: no, it hasn't hit that sweet point of end user adoption, yet. Consumer ISPs are way behind -- at least in the US.

<comment><USER4> There's your next startup idea! Instead of a vpn-service for privacy/security, offer one to do 4-to-6 proxying.

<comment><AUTHOR> I actually figured I would have to do this kind of proxy or in the least offer a tunnel broker as part of any 'IPv6 only' service, if only for the purpose of helping potential customers actually access the service they would pay for.</comment></comment></comment>


Job guarantee - <AUTHOR> https://en.wikipedia.org/wiki/Job_guarantee <comment><USER2> This is a common economic fallacy.

"A job guarantee (JG) is an economic policy proposal aimed at providing a sustainable solution to the dual problems of inflation and unemployment." However, it is economic consensus that inflation is caused by government monetary policy (the "monetarist" view). It is also economic consensus that inflation is destructive and creates unemployment. So if government policy is creating inflation, and therefore unemployment, why would a government "job guarantee" be a sensible response? More alcohol doesn't sober a drunk man; more intervention doesn't balance an economy.

As the article correctly notes, "When inflationary expectations subside, [unemployed] people will get their jobs back." So isn't the most sensible solution to have the government stop inflating the currency? That would solve the "dual problems" without introducing a third. It would also be a fair and honest thing to do. After all, inflation is the government's way of raising revenue by cheating (it's "the hidden tax").

As a side note, it amazes me these antique economic fallacies consistently appear on HN, of all places. They are worse than nonsense, they're dangerous. When practiced, they really hurt people. Yes, they might help a few people - but they hurt far more than they help, and for far longer. Consider the government make-work programs during the Great Depression, which are now credited for dragging out that misery. Please, enough with the junk economics. There are far more fruitful government policy discussions to occupy intelligent minds - increasing efficiency, reducing deficits and debt, fighting corruption, stopping war, to name a few.

Source: Two degrees in economics.

<comment><AUTHOR> I'm OP. I posted this because I discovered this with relation to an article I read about MMT, and wanted to understand exactly what you explained, from a person with your qualifications. Your response would have been so much better had it not contained the judgmental side-note.

I think debating and dismissing old bad ideas is something that every generation needs to do, lest they reinvent it.

My personal belief is that if we stop inflation, it will eliminate the pressure for continuous "growth", because money can now be a store of wealth that no longer leaks value and therefore there will no longer be a need for continuous investment. Perhaps the pace of society can slow down and people can relax. What would your expert opinion on that be?

<comment><USER3> I feel your own response to the response would have been so much better had it not contained the judgmental opinion.

</comment></comment></comment><comment><USER4> I don't understand why it is so difficult to kill bad ideas. You can't just magic your way to full employment, the economy does not work that way.

"Public sector employment subsidies tend to have negligible or even negative impacts at all horizons."[0]

[0]: [http://ftp.iza.org/dp9236.pdf](http://ftp.iza.org/dp9236.pdf)

<comment><USER5> Communism/Socialism/central planning is making a comeback. It is though every generation must personally re-learn all the painful lessons of history. Quite distressing.

<comment><USER6> The WPA and it's role in coming out of the depression are also lessons from history that people need to re-learn. Everything in moderation.

</comment></comment></comment><comment><USER7> Unemployed people should not be given a guaranteed job. They should be paid to pursue further education and qualify themselves for a job that's actually useful.

<comment><USER8> Surely there are many "actually useful" jobs that don't require further education?

<comment><USER9> If we removed the food stamps and other benefits given to low pay workers and their employers I doubt.

Just about anything worth doing needs an education of some kind. There are some that don't really need much/any education (sales, etc) but those usually need a certain kind of personality to be effective at. And the few that truly anyone could do without any education and are paying enough to be productive to the society (not funded by tax payer money through various benefits) are very rare.

<comment><USER10> Who would sweep floors then?

I see three possibilities. (1) Well-paid cleaners, because cleaning will become necessarily expensive. (2) Workers that do other, much more productive things 95% of the time. (3) Machines.

I assume that the list above is sorted by increased probability, on a 5-year horizon.

</comment></comment></comment></comment><comment><USER11> (Based on my experience) the best form of job guarantee is another 10-20 employers willing to hire me.

</comment><comment><USER12> How productive is a worker you can't fire?

<comment><USER13> Maybe they are only paid if they are productive?

</comment></comment><comment><USER14> Shouldn't we all be working towards automation and no jobs for people? The end goal of capitalism is full unemployment not full employment. All people should not expect any work to do themselves but rather expect work to be done automatically.

<comment><USER15> Agreed, but what happens to all the unemployed people who don't own capital? The end goal IMO should be communism, not capitalism, e.g.: [https://www.theguardian.com/sustainable- business/2015/mar/18...](https://www.theguardian.com/sustainable- business/2015/mar/18/fully-automated-luxury-communism-robots-employment)

</comment></comment><comment><USER16> sounds great, until automation takes over and there aren't any jobs in government that can productively done by humans

<comment><USER17> Absolutely. It'll happen just after the paperless office happens.

<comment><USER18> You say that, but the average office has significantly reduced its paper usage over the last two decades.

</comment></comment></comment><comment><USER13> The military's always hiring.

<comment><USER19> Only if you're young and healthy.

</comment></comment><comment><USER20> After all, people are less likely to bite the hand that feeds them.</comment>


Japan's Chicano Subculture - <AUTHOR> https://www.nytimes.com/video/style/100000005806771/japan-chicano-culture.html <comment><USER2> Mind==blown.

Grew up in a Mexican neighborhood close to where the Zoot Suit Riots happened. The memory was still hot in post WWII Southern Cal.

This article ignores Chicano racism and only barely (thank heavens) touches on cultural appropriation, which this is exactly. There were regular low rider parades in my hood and it was a little scary, but also lots of fun. I was sure the art styles would disappear but they've endured amazingly well. Also taggers are way better these days.</comment>


What do you use for storing sensitive client details? - <AUTHOR>

If you're a web development company or similar and have a good number of clients, you probably have a good number of sensitive details you keep on file (logins for ftp, ssh, domain, email, analytics etc)<p>My question is what do people use to store these securely while making them accessible to a development team? <comment><USER2> In my CRM it has notes. The notes are crypted in the browser with the scjs.js (Stanford JavaScript crypto lib) before being saved. I have to enter a pass phrase to open each note.</comment>


Discovering drag and drop with JWt and JRuby - <AUTHOR> http://blog.elevat.eu/2012/04/discovering-drag-and-drop-with-jwt-and-jruby/

<comment><AUTHOR> Constructive criticism is welcome!</comment>


Ten Brilliant Curated Resources for you to learn code and entrepreneurship - <AUTHOR> http://www.code-love.com/2014/08/11/ten-curated-resources-learn-code-entrepreneurship/

<comment><USER2> Someone else who greets visitors with a pop-up that pleads with them to subscribe.

FFS let me read that article first! All you've done is make it significantly less likely that I'll even bother to read this first item.

Trust me - I won't subscribe without reading the first article, and all you're doing is stopping me dead in the acquisition arc.</comment>


NHS bitchslapped by ICO on data security - <AUTHOR> http://www.theregister.co.uk/2011/07/01/nhs_data_failure/

<comment><USER2> Did anyone else read ICO as ICQ?</comment>


Twelve-Factor Applications with Consul - <AUTHOR> http://www.hashicorp.com/blog/twelve-factor-consul.html

<comment><USER2> I am curious as to how this sort of setup would work for processes that take a bit to load - such as when building an in-memory index. In my case, I have several services that take ~30s+ to start, and as such do a rolling restart. envconsul would just sigterm an entire tier, causing outages.

<comment><USER3> envconsul is a fairly simple UNIX tool. Instead of executing your application directly with it, you can put a rolling restart script on it to do this sort of thing. This answer is a bit of a cop out, but it is something that works today. Example:

        envconsul -reload prefix bin/restart-wrapper bin/rails server

We have more advanced orchestration features planned in the future, but we're not ready to discuss them yet.</comment></comment>


Tools for Accelerating Python - <AUTHOR> http://amundblog.blogspot.com/2008/11/tools-for-accelerating-python.html

<comment><USER2> After 2 years building an algorithmically intensive desktop app in Python that ships on 3 platforms, my strongest recommendation is to avoid all of these fancy environments that change the way Python is used or internally works, including Stackless, Twisted, SWIG, Psyco, Pyrex, and so on. In my experience they tend to 1) introducing subtle bugs and 2) make traditional debugging more difficult.

Generally very little of the code needs the burden of any complication beyond "real" Python. Where you specifically need more performance tuning, and you are sure that a different data structure or caching doesn't solve it, and it's not one of the many situations someone else has already made a C module for, I suggest using "real" C, in the standard, well documented, debugged and maintained approach: write a Python module in C using the Python/C API.

<comment><USER3> There is a difference between doing hardcore data crunching in Python and tweaking performance slightly. If you are doing lots of networking and are not using twisted or stackless then you are an idiot. Psyco can sometimes lead to a significant speedup just by adding a couple of lines of code; this speedup may indicate the need for further tweaking of your data structures or codebase, but sometimes it just works faster using psyco. If you have a couple of hotspots that need speeding up then Pyrex and Cython are good tools to drop down into C for a particular function and they are both very good tools (along with the ctypes modules that is now included in the standard library) for writing interfaces to existing C libraries. Using the "real" C/Python API should be a last resort if you have no other option, but not the first tool you reach for...

</comment></comment><comment><USER4> There is no silver bullet. It's a nice looking list but pretty useless, it says that you made an original mistake choosing Python, now grab a different technology and rewrite it.</comment>


Show HN: Docs2Book – Distribute your Google Documents in a whole new way - <AUTHOR> https://docs2book.com/ <comment><AUTHOR> I've created the Docs2Book because I wanted to share my resume to recruiters without burden. And I've saw that huge E-Book distribution so broken so Docs2Book is just to solve in that space.

You create e-book in Google Docs and using Docs2Book to distribute to your audience.

Feedback welcome.

<comment><USER2> May want to proof read your site... "Distribute your e-book in a hole new way." :)

<comment><AUTHOR> Hey saw that too. I don't know how I missed. Changing now...</comment></comment></comment>


Elon Musk: Correcting The Record About My Divorce - <AUTHOR> http://www.businessinsider.com/correcting-the-record-about-my-divorce-2010-7 <comment><USER2> I really wondered about the sneering claims that he had a $200K/month lifestyle.

$170K/month went to lawyers (in California the wealthier spouse pays for both, he says) and $20K/month before taxes to keep his ex-wife in the lifestyle she was accustomed to. Leaving $10K/month to run two metal bending companies (Tesla and SpaceX); logging 500 hours in the air last year in his "private jet" is not exactly a luxury either (after all 40 hours/week times 50 weeks is 2,000 hours).

<comment><USER3> _$170K/month went to lawyers (in California the wealthier spouse pays for both, he says_

Wow, that's awful.

Here's a question: What's to stop states from competing on divorce laws? In the old days, people used to fly to Reno to get divorced, right? Why doesn't Nevada declare that a man can divorce his wife, _in absentia_ , leaving her with (say) nothing more than whatever her personal assets were before she entered the marriage (plus 5% per annum in interest)? They could throw in a five-day residence requirement and $100 worth of slot machine credit while they were at it.

Meanwhile, Delaware could make a similarly female-biased divorce law, and fighting couples could have a race to see who could file the papers in their state of choice first.

<comment><USER4> "Female-biased"? Really? What a creepy thing to say.

<comment><USER5> The man is advocating anarchic divorce laws and your main complaint is about his verbage?

<comment><USER4> I have no snarky response to that point.

</comment></comment></comment></comment></comment><comment><USER6> This is a very difficult issue to try to remain impartial on, since I'm a man and an entrepreneur myself, and Elon Musk has been an inspiration for many years.

I'm really trying though... but the fact that his ex-wife is trying to get a share of his companies - just shows that she is trying to hurt him where it hurts the most: by hurting his baby.

<comment><USER7> Hopefully his actual children are more important than his allegorical children.</comment></comment>