Zero-Point Energy: Can We Get Something From Nothing? - <AUTHOR> http://info.publicintelligence.net/USArmy-ZeroPointEnergy.pdf <comment><USER2> In a word, no. Harvesting ZPE would violate energy conservation, and the law of energy conservation is never broken.

<comment><AUTHOR> I think I'd have to agree with you in general, but I'd also have to admit that things start making me do a double take when you get down to the forces from the casimir effect in the nanometer range between uncharged conductors that make me think it would be in the realm of QFT for one much more versed than I am to come up with some theoretical frame work that millennia from now would be considered basic knowledge like conservation of energy was once thought of in the past…

<comment><USER2> > ... things start making me do a double take when you get down to the forces > from the casimir effect ...

Yes, but static forces don't require energy. Only when force and motion are combined is an energy expenditure required. Remember that Casimir effect measurements are carried out by applying an external force to move two plates together, which means the initial energy of motion comes from elsewhere, not from the virtual realm.

<comment><AUTHOR> > _Remember that Casimir effect measurements are carried out by applying an > external force to move two plates together_

So an external field not under control cannot be present (i.e. the experimenter is not putting more energy into the system) to obtain measurements?

<comment><USER2> My only point was that the Casimir Effect doesn't represent the harvesting of energy, only force, force isn't energy, therefore the effect doesn't violate energy conservation. This is consistent with both quantum theory, in which virtual particles can't unbalance nature's account books, and energy conservation, a principle that stands at the center of most present physical theories. Here's an example:

[http://arachnoid.com/conservation_of_energy/#Planetary_Orbit...](http://arachnoid.com/conservation_of_energy/#Planetary_Orbit_Example)

<comment><AUTHOR> I don't think the PDF was saying that it could violate energy conservation, nor was the actual content implying something from nothing (the title did though), but it did imply that there is a possibility that the forces present in an existing system (i.e. non conducting plates within a region of space under the influence of an external field), could be transferred to a much smaller system without the experimenter using energy to apply a force. I think that because something else is going on that can't be explained for, is the reason why people are looking in the first place. Here's an example of that[0]:

"Surprisingly, with pyrrole the predicted 'activation barriers' were way out, with calculations "less than a third of the measured value". After much head scratching, puzzled scientists turned to a purely quantum phenomenon called 'zero-point energy'.

In classical physics, an object losing energy can continue to do so until it can be thought of as sitting perfectly still. In the quantum world, this is never the case: everything always retains some form of residual – even undetectable – energy, known as 'zero-point energy'.

While 'zero-point energy' is well known to be associated with motion of the atoms contained in molecules, it was previously believed that such tiny amounts of energy simply don't affect the molecule as a whole to any measurable extent, unless the molecule broke apart.

But now, the researchers have discovered that the "quantum nature" of the molecule's internal motion actually does affect the molecule as a whole as it moves across the surface, defying the 'classical' laws that it's simply too big to feel quantum effects."

[0] [http://www.cam.ac.uk/research/news/movement-of-pyrrole- molec...](http://www.cam.ac.uk/research/news/movement-of-pyrrole-molecules- defy-classical-physics)

<comment><USER2> > But now, the researchers have discovered that the "quantum nature" of the > molecule's internal motion actually does affect the molecule as a whole as > it moves across the surface, defying the 'classical' laws that it's simply > too big to feel quantum effects."

Well, first, Heisenberg's uncertainly principle doesn't place an upper bound on the size of a mass susceptible to quantum effects, only the probability. An easy way to picture this is to say that flipping a fair coin once has equal probability to come up heads (1) or tails (0). But for a single flip, 1/2 is not a possible outcome.

For a million coin flips, an averaged result of 1 or 0 is still a possibility, but it is extremely unlikely, whereas an averaged outcome of 1/2, which was impossible for a single coin flip, is now rather likely. This means there is no mass or size threshold for quantum effects, as many people think -- the effects just become less apparent.

But it's important to distinguish between quantum effects and energy state. If a system's wave function collapses and a superposition of states becomes one state, that state cannot have more or less energy than any other possible state. Expressed another way, if you open Schrödinger's box and the cat is dead, the dead cat can't have more or less energy than the living cat.

The bottom line is that quantum theories don't violate energy conservation, and all the talk about ZPE leading to spacecraft drives arises from people who don't understand physics.

> "... defying the 'classical' laws that it's simply too big to feel quantum > effects."

This is a case of a journalist who also doesn't understand quantum theory. No classical laws are being defied, and there is no mass so big that it cannot experience quantum effects. The reason is easy to explain -- a huge mass is composed of individual atoms, and individual atoms experience quantum effects. Q.E.D. :)

<comment><AUTHOR> > _The bottom line is that quantum theories don 't violate energy > conservation, and all the talk about ZPE leading to spacecraft drives arises > from people who don't understand physics._"

And from the PDF:

"The topic of successfully exploiting zero point energy (ZPE) has importance because it represents a high-risk/high pay-off technology. This is not pseudo- science but a very serious discipline where very serious research is underway worldwide that range from investigating the Casimir effect, finding new alternative sources of energy, and developing a means of future long-range space travel. Efforts are currently underway at a U.S. aerospace corporation to include creating hardware to investigate using ZPE to provide energy. Finally, one would like to see experimental data and, hopefully, replication of such experiments representative of 'good' science. However, the amount of U.S. research dollars spent in this endeavor is abysmal such that even the simplest experiment cannot be performed. Although we are aware of only modest funding worldwide for this type of research, the Intelligence Community should monitor the more controversial aspects of ZPE, or we may miss an important foreign innovational leap forward, thereby leaving us vulnerable to technology surprise."

So I guess governments/universities/organizations who fund research for scientists and physicists around the world have much to learn from you since you know what is and what cannot be :P

<comment><USER2> > So I guess governments/universities/organizations who fund research for > scientists and physicists around the world have much to learn from you since > you know what is and what cannot be ...

No, not just me -- anyone with the most superficial familiarity with quantum theory knows that virtual particles cannot upset nature's energy bookkeeping.

Also, the author of the PDF is trying to make this sound like a serious research project with governmental support, when it is nothing of the kind -- there are no "governments/universities/organizations" involved in this activity. Here's the dead-giveaway line:

"However, the amount of U.S. research dollars spent in this endeavor is abysmal such that even the simplest experiment cannot be performed."

If that's true, then it is not science. The PDF is filled with this sort of handwaving claim, but without any substantiation, without any specifics.

Here's a classic crackpot alert (not by the author of the PDF, but a quotation from elsewhere):

"This is not pseudo-science but a very serious discipline where very serious research is underway worldwide that range from investigating the Casimir effect, finding new alternative sources of energy, and developing a means of future long-range space travel."

All this without being able to do any experiments, a sure sign of pseudoscience.

And notice the attribution for the above quotation -- "an analyst at Defense Intelligence Agency (DIA)" \-- but the article doesn't identify the person, a no-no in any technical or scientific publication.

The PDF contains obvious and glaring falsehoods, example: "While grand plans of harvesting large amounts of energy from the vacuum to propel vehicles through deep space is better suited for science fiction, it may eventually be possible to use small amounts of energy (picowatts) from the vacuum for long- term space travel." This is not how the Casimir Effect works, and the author of this article has no idea what she is talking about.

The Casimir Effect is a force, not a source of energy, and the force is symmetrical -- it can't propel anything in a particular direction, i.e. the net force outside the region of the plates is zero. It is to space travel what blowing on your own sail is to sailing.

[http://en.wikipedia.org/wiki/Zero- point_energy](http://en.wikipedia.org/wiki/Zero-point_energy)

Quote: "Over the years, there have been numerous claims of devices capable of extracting usable zero-point energy. None of the claims have ever been confirmed by the scientific community at large, and most of these claims are dismissed either by default, after third party inspection of such a device or based on disbelief in the viability of a technical design and theoretical corroboration. _Current claims to zero-point-energy-based power generation systems are considered pseudoscience by the scientific community at large._ "

Q.E.D.

<comment><AUTHOR> > _Also, the author of the PDF is trying to make this sound like a serious > research project with governmental support, when it is nothing of the kind > -- there are no "governments/universities/organizations"…_

What about on page 4?:

"(U) Brazil, perhaps the most surprising entry on the publications chart, conducts research into measurements of Casimir force between different types of conducting plates that have varying designs. It is noteworthy that many of the researchers working in and with Brazil are Russian or originally from Russia. The Brazilian research also mirrors Russian research (i.e., studying the Casimir force using different setups of conducting plates). Both Brazil and Russia appear to be focused, at a basic-science level, on maximizing the energy obtainable from the Casimir force. A.N. Petrosyan, of the Moscow Engineering Physics Institute, and Yu.E. Lozovik, of the Institute of Spectroscopy of Russian Academy of Science, are conducting research into ZPE to create massless particles in a cavity, but the value of this research is questionable. (U) Research in France and a collaborative effort between the United Kingdom (UK) and Iran comprise two of the most promising recent ventures in ZPE, as it pertains to MEMS and NEMS. The French are researching the possibilities of using the Casimir force to drive nanoscale ratchets in the hope of creating novel contactless translational actuation for NEMS or to move tiny objects in a liquid. The UK-Iran effort has similar goals and focuses on a rack-and-pinion powered by Casimir forces to enable contactless translation to avoid wear of the components. This work has demonstrated devices that hold up to high velocities and is a good example of valuable work in ZPE for use in practical applications. (U) Germany has solid research programs in theoretical calculations, modeling, and experimental measurements of Casimir forces in various conducting-plate and cavity configurations. Germany's research appears aimed more at basic science than in engineering for applications. (U) India is studying the use of the Casimir effect for MEMS devices, such as calculations of effects for different hypothetical designs, but the work is more theoretical than experimental or for practical"

> _And notice the attribution for the above quotation -- "an analyst at > Defense Intelligence Agency (DIA)" \-- but the article doesn't identify the > person, a no-no in any technical or scientific publication._

To me it doesn't seem like a technical or scientific publication at all, just reporting on what is going on in the field and who's doing research, where the contact information for the people that composed/involved is listed at the end of the PDF (page 7-8). The report is even cited in the wikipedia article you quote.

<comment><USER2> >> Also, the author of the PDF is trying to make this sound like a serious research project with governmental support, when it is nothing of the kind -- there are no "governments/universities/organizations"…

> What about on page 4?:

> "(U) Brazil, perhaps the most surprising entry on the publications chart ...

Easy to answer -- there are none of the usual trappings of research, quantitative measurements, names and locations of facilities, literature references. Also look at all the qualifiers within the quotation: "... but the value of this research is questionable ... but the work is more theoretical than experimental or for practical application ...". Not the wording of a scientific effort.

> To me it doesn't seem like a technical or scientific publication at all ...

That's because it isn't, which supports the claim that it's pseudoscience.

> The report is even cited in the wikipedia article you quote.

You mean the article that labeled this topic pseudoscience and used the subject article as part of its evidence for that conclusion?

To summarize, this is not how science works. All this talk about governmental agencies, universities and so forth, has nothing to do with real science, which relies only on evidence, not eminence. There's no evidence, and the idea contradicts the most trivial reading of physical theory.</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


Ask HN: What are the best games on linux? - <AUTHOR> <comment><USER2> What do you like to play? I'm back in the swing of CS:GO nowadays, some Civ V and BE, and I run Age of Empires HD in wine. Divinity: Original Sin and Pillars of Eternity are great classical action-rpgs. Something like a quarter of the steam catalogue is available on linux so I would start by filtering there.</comment>


Speculate with HN: FB phone might come with *free* dataplan? - <AUTHOR>

Remember http://0.facebook.com? If you access(ed) it (not sure if they still run it), you weren't charged dataplan charges in lots of countries, because they had deals with phone companies. If they can provide that to go with a possible Facebook phone, that would be a deal even I couldn't resist.<p>Crazy? <comment><USER2> [http://mashable.com/2010/09/19/facebook-we-are-not- building-...](http://mashable.com/2010/09/19/facebook-we-are-not-building-a- phone/)

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

<comment><AUTHOR> Right, but none of those stories have connected the phone story with 0.facebook.com and free dataplans. (Or did I miss it?)</comment></comment>


300 companies pledge to help long-term unemployed - <AUTHOR> http://www.washingtonpost.com/blogs/post-politics/wp/2014/01/31/obama-to-host-white-house-summit-on-long-term-unemployed-firday/?tid=auto_complete <comment><USER2> Good news. Let's hope something actually comes of this.

If we had money to hire people, I'd be more than happy to sign onto a pledge like this, but we don't anticipate doing any hiring soon.</comment>


New Amazon Kindle announced: $139 WiFi-only, $189 3G, available August 27th  - <AUTHOR> http://www.engadget.com/2010/07/28/new-amazon-kindle-announced-139-wifi-only-version-and-189-3g/ <comment><USER2> I love my Kindle and this is awesome news. For all of you on the fence, here's why I recommend everyone buy a Kindle (haven't used a Nook, but I think most of these points apply):

1\. You will read more.

2\. The reading experience will be better than you think--there was a 1-2 day adjustment period for me. After that, I didn't even notice I wasn't reading paper and ink.

3\. You can highlight and make notes in books that are actually usable. Remember post-its, bookmarks, notes in the margins? I loved to mark-up books, but never pulled them out again to reference what I wrote. Now I have all of my highlights in one place. I can even highlight a passage and share it on Twitter or Facebook (if you have 3G, then you can do this while sitting on the beach!)

4\. I have all of my books with me via my phone. I just read Moneyball and wanted to share a quote with a friend. I was able to open up the Kindle app and presto, I'm able to share it with them.

5\. I am more mobile (I have less stuff). Instead of buying books to collect them, I am buying them to consume them. Others may not have this problem, but I did.

5\. Did I mention you will read more?! If you like reading and have ever set a goal to read more, please buy a Kindle. If a friend recommends a book to you during the day, you can download it while sitting in a comfy chair when you get home, and can be reading it seconds later.

Most of the arguments about whether or not to buy a Kindle center on the price. At $140, it is well worth it when you consider the additional amount of reading you will do. You will learn more, you will read more books, it will be worth it!

<comment><USER3> Why is a Kindle better than an iPad?

<comment><USER4> I have both. I've had iPads for about a month, and a Kindle for about 2 weeks. I assume you are asking why it is better specifically for reading since comparing the two generally is like comparing a notebook and an MP3 player. They're just not analogous in general, but for reading purposes the Kindle is vastly superior to the iPad.

I actually read the same book on both this past weekend flipping back and forth. The iPad has a slick UI for books, though the page flipping can be a bit finicky,but it's still a back-lit LCD (albeit a nice one) which is just uncomfortable for long reading. It's the same uncomfortable feeling you get from staring at a monitor for a long time.

The Kindle is also much lighter, which is nicer than you'd think when you're holding it for a couple hours at a clip. The iPad is surprisingly heavy, which is such a common complaint that I imagine Apple will address it in the next generation.

The Kindle's battery is good enough that I suspect you could read a few books on one charge if you kept the wireless antenna off. You could go on a weekend trip without taking a charger, which is nice. The iPad's battery is actually pretty good for what it is, and is probably why the thing is so damn heavy, but you'll still be charging it every night.

The iPad's screen is AMAZINGLY smudgy. I can't describe how bad it is in that regard. The smudges add a slight blurring effect to text which gets annoying. We have 5 of them in the office and everyone has complained about it. I got an Invisible Shield screen protector for them, which helps a lot (and I could also take a key to it without scratching) but adds its own annoyances.

E-ink is really unbeatable for reading. You would love a Kindle I think. How many books do you read a year?

<comment><USER5> "It's the same uncomfortable feeling you get from staring at a monitor for a long time."

— I don't get that, your mileage may vary. (The Kindle is probably still what you should get if you read a lot.)

<comment><USER6> I think that some people don't get eyestrain using a monitor because their eyes jump around and off of it continually throughout the day. The eye motions and strain of reading is fairly different when you read word after word, line after line for 1/2 hour or more.

An analogy would be saying your arms don't get sore picking up a book but actually you're picking up a book 100 or more times in a row. Your arm will get tired.

</comment></comment></comment></comment></comment><comment><USER7> $130 is a really compelling price point. The NY Times charges $20/month to access their Kindle edition ($240/year). What they should do is offer a 2-year contract and throw a Kindle in for free.

I personally hate this model, but it's been proven effective (at least in the U.S.) for cell phones sales.

<comment><USER8> They would now be a lot better off buying Kindle's for as many of their dead- tree customers as they can and switching them over to digital delivery. They have less than a million daily subscribers (so that's just $130m for the Kindles) and spend $240m a year in raw materials. Gobs more for the staff. Of course they would need to figure out advertising, but they would need to sell less of it with the lowered printing/delivery costs.

Not an original idea, but now a lot more financially sound: [http://www.businessinsider.com/2009/1/printing-the-nyt- costs...](http://www.businessinsider.com/2009/1/printing-the-nyt-costs-twice- as-much-as-sending-every-subscriber-a-free-kindle)

<comment><USER9> You're not accounting for newsstand revenue. If they went all digital, newsstand revenue would disappear. If they didn't go all digital, they wouldn't spend all $240 million on paper subscribers. So either way it's not a fair comparison.

</comment></comment></comment><comment><USER10> </lurk>I have a launch Kindle 2. I love the device for all of the same reasons that minouye listed. I never had any problems with it until this past weekend. I turned on the 3G and hit the 'sync/update' option. I knew that it was going to download and install the newer 2.5 update (which added the long-needed 'collections' feature which allows you to arbitrarily group your books). Well it bricked the device. I'm not sure how it happened. I was well outside (~6 months) the 1 yr warranty. I called them up and they overnighted a brand-new K2 at no cost. (At least it looks brand-new, it could be a really well- preserved refurb). That kind of experience is why I really like Amazon and the Kindle. I don't know if I have any reason to upgrade for myself, but at $140 I think this is getting into gift range for my Mom and the in-laws for Xmas. (just registered to tell this story... long-time lurker)

<comment><USER10> I'll also add that the Kindle shows up as a USB-connected storage device so you don't need special drivers or software (MS-only etc) to drop files on it. That was a big concern for me when I originally was researching eInk devices because I don't have any Windows boxes at home.

</comment></comment><comment><USER11> The world of reading is about to change. $139 is not quite Seth Godin's suggestion for a "paperback" device, but it's still very affordable. At this price point, I think that many relatively tech savvy readers will end up buying one simply because they can.

Seth Godin's reaction: [http://sethgodin.typepad.com/seths_blog/2010/07/here- comes-t...](http://sethgodin.typepad.com/seths_blog/2010/07/here-comes-the- paperback-kindle-as-promised.html)

</comment><comment><USER12> Now this is starting to get closer to a sweet spot. I'm curious if E-Ink is starting to lower their licensing costs now that there's a lot more competition in the space, or if manufacturing the screens is just becoming cheaper.

Design looks more polished too.

</comment><comment><USER13> At that price, I'd be tempted to get one for situations where I would worry about my iPad. I'd consider taking a $139 kindle to the beach. I'm terrified of taking my iPad.

<comment><USER8> Not to mention you'll actually be able to see the Kindle's screen at the beach.

</comment></comment><comment><USER14> Finally back and forward buttons on both sides. And I've always been rather satisfied with the page turning speed, especially compared to the nook, so if that got even faster… I'm tempted to sell my old one now.

If the increased speed of the e-ink translates to a better browser, the 3G model might finally be a good HHGTTG replacement for travelers (Con against the iPad: roaming charges). Even better if the developer program would finally take off and someone would make a dedicated Wikipedia app.

</comment><comment><USER15> Interesting that there's only a $50 premium for the 3G Kindle, whereas the 3G iPad is an additional $130 over the Wifi model.

Different licensing agreements? Amazon taking a loss? Typical Apple markup?

<comment><USER16> iSuppli estimates that 3G radio adds about $25 to the cost of iPad ([http://www.isuppli.com/teardowns-manufacturing-and- pricing/n...](http://www.isuppli.com/teardowns-manufacturing-and- pricing/news/pages/mid- rangeipadtogeneratemaximumprofitsforapple,isuppliestimates.aspx)) so at $50, I'd imagine that Amazon's probably recouping the cost of baseband hardware + development time and effort, and not much else.

It's amazing to think that they can throw in the free 3G access on top on the hardware for just $50 extra. I guess they're counting on low browser and web usage due to the e-ink screen...

<comment><USER8> > It's amazing to think that they can throw in the free 3G access on top on > the hardware for just $50 extra. I guess they're counting on low browser and > web usage due to the e-ink screen...

I think that's subsidized by the increased amount of books people buy when they can buy them anytime anywhere but only through Amazon.

</comment></comment></comment><comment><USER17> I haven't enabled 3G on my iPad because I'm usually near wifi these days. I can't imagine that a 3G Kindle is necessary for too many people. The extra cost is your first 4 books.

<comment><USER18> It's not really necessary for anyone, but it is quite a nice luxury. I was at the beach last week and a friend (a highschool English teacher) recommended a novel that she teaches her students ("The Sparrow" by Mary Doria Russell; it's great so far). I was so intrigued by her explanation of it that I bought it then and there, sitting on the beach, and started reading it 30 seconds later. So I expect that those who can afford it will.

That said, I keep the 3G off when I'm not using it, because it _tears_ through the battery, even when the Kindle's off(!) so that it can always receive new subscriptions.

</comment></comment><comment><USER19> When you are done reading a book on the Kindle can you loan it to a friend? (the book, not the whole Kindle!)

<comment><USER20> When I saw the new price point, I actually briefly considered buying a $139 model so I could loan the whole Kindle (and my whole electronic library) to a friend...

Then again, I bought a paperback book yesterday specifically because I knew I would be reading it and passing it on. This really is the biggest sore point for e-readers.

</comment></comment><comment><USER21> I have a Nook. I chose it over the Kindle for two reasons: Micro-SD card support, and ePub support. The 4Gb internal memory in the Kindle 3 largely eliminates the need for memory expansion. The lack of epub is the deal-breaker for me.

A Nook can read any epub from any store supporting the Adobe Digital Editions DRM. To my knowledge, this is all of them, including Sony. Of course, if the epub is DRM-free it will work as well.

epub is an open format. It is mostly HTML/CSS, with support for embedded fonts and a normalized system for storing images, meta-data, etc. It is widely being supported by various open source tools. Google is making their public domain books available as ePubs (quality varies).

Topaz and Mobi are proprietary formats. Kindle is the only reader of note using them. They can be converted to epub if the DRM is broken (possible, but YMMV), but it is often a time-consuming process, and thus not worth it.

If the new Kindle would support epub, it would be a hands-down winner. But, of course, that would mean that people are able to purchase books from sources other than Amazon.

Since the Nook runs Android, I am hoping some clever person figures out a way to hack the Kindle for Android app to run on the Nook. Best of both worlds.

</comment><comment><USER22> Can anyone give me their take on viewing PDFs with the non-DX Kindle?

I've been seriously thinking about getting one. I read through reports and ebooks pretty heavily and my chief concern is that if I bought a Kindle I'd end up reading mangled PDFs where the formatting gets distorted to accomodate the smaller screen size.

<comment><USER23> Formatting is fine. PDF was designed for that very purpose anyway.

Zooming and generally navigating a PDF is a _huge_ pain. Screen refreshes are slow. Much like navigating through a plot on a graphics calculator.

PDF reading is a good extra, don't expect too much. I convert all text heavy, non-technical books using "calibre" to the PRC format. Works well enough for reading for pleasure.

(PS. I have a Kindle 2. Received it a few weeks ago)

<comment><USER24> In short, it is 100% functional but if you plan on reading a lot of PDF's, look to the DX.

<comment><USER22> thanks. That is what I thought.

I think at the DX price point I might instead opt for an iPad.

</comment></comment></comment></comment><comment><USER25> Frankly, I don't know why someone would choose this over reading on your smart phone. (Assuming you have a smart phone.)

I bought a nook, but then returned it after discovering that its pdf support sucked, and that I could read much more easily using Aldiko on my nexus. I find e-ink screens to actually be much worse for reading compared with white text on a black background on a hi-res LCD/OLED. The page turning time is a deal-breaker compared with a smart phone. That e-ink KACHUNKA every time gives me a headache for some reason.

To me, battery life seems like the only selling point.

</comment><comment><USER26> It's very interesting that Amazon has gone with a WebKit-based browser.

<comment><USER27> Why?

<comment><USER26> For one thing, Ibis Reader is a web app that allows reading of ePubs. Imagine now being able to also read ePub on the Kindle.

</comment></comment></comment><comment><USER28> Even though I bought my Kindle less than a year ago, I am considering switching to the new version. All my wishes are fulfilled in this version:

* WiFi support = blog access, web browser, full content in subscriptions and hopefully lower prices for international users

* better contrast (I found Kindle2's contrast lacking)

* Even lighter

* Better Forward/Backward buttons positioning

* Improved PDF support

Oh, and I love the dark color ;-)

</comment><comment><USER29> ...and the 3G version is going to have free worldwide web browsing included? (some people in Europe are saying so)

</comment><comment><USER30> I want an e-reader, but I want to read technical (coding) PDFs etc. I'm told this will be inconvenient at a screen this size and that I should get the Kindle DX.

Hopefully they announce a massive price drop on the DX as well (preferably before I visit the USA in December)

<comment><USER31> They just did recently.

<comment><USER30> $379 is still too expensive, all I want is the base wifi kindle with a few inches more screen area

</comment></comment></comment><comment><USER32> I got on of these for $149 (NZ) and it does the trick. Same display technology as the kindle anyway.

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

<comment><USER33> In Canada they are also $150 but Canadian dollars (like $200 NZ) isn't it built in Canada?

<comment><USER32> yes I think they are built in Canada. Actually I just checked online and it looks like the NZ price is $295. Maybe I just forgot how much it actually cost.

</comment></comment></comment><comment><USER34> Dang, it still has that terrible D-pad. Looks nice otherwise, but I hope they go back to the silver ribbon for v4; it's so much nicer.

</comment><comment><USER35> Another case where tethering makes sense.

</comment><comment><USER36> Does anybody have any good/killer reasons to recommend the 3G over the wifi- only?

<comment><USER37> The only thing I used the 3G in my Kindle for was when I was in Egypt. Rather than hunt down a wifi signal for our netbook, I could check my gmail and post to twitter from my Kindle. I was on a train between Cairo and Luxor and posting to Twitter about how I'm on a train in BFE. I was telling friends about camping in the white desert from my Kindle.

Completely free of charge, in the middle of the Egyptian desert. That was definitely worth it.

If you don't travel so much, save $50 and get the wifi-only version.</comment></comment>


It's getting harder to move beyond a minimum wage job - <AUTHOR> http://fivethirtyeight.com/features/its-getting-harder-to-move-beyond-a-minimum-wage-job/ <comment><USER2> Like Chris Rock said :

Paying minimum wage is the boss saying "I want to pay you less but I can't, it's the law".</comment>


Ask HN: Use own name or form a company for development freelancing/consultancy? - <AUTHOR>

Would you favor using your own name if you're offering software development as a consultant or on a freelance basis, or form a company under a different name?
I'm torn between using my own name:
- Feels more 'personal'.
- Gets my real name 'out there'.
- People may be put off using a single person and rather deal with the company with xx employees that can answer the phone 24/7... and have some redundancy if one of their employees were hit by a bus.
And forming a company:
- Feels like people would assume I'm more than a single developer.
- May (or may not - IANAL) be beneficial for liability concerns.
- More paperwork.
Or option C, form a company with my real name.
Which route did others take that are in the same situation? What are your experiences/how did it work out for you? I'm in the UK. <comment><USER2> I don't understand why forming a company and using your own name are mutually exclusive. You should incorporate; if you don't, some of your clients will withhold taxes for you as if you were an employee. It'll also be harder to get insurance. And, of course, you get protection from contract liability. Incorporation is extremely inexpensive and does not really involve much paperwork.

Call the company whatever you want.

<comment><USER3> Agreed. Incorporating took me all of 15 minutes online. Focus on what is REALLY important - getting your first 3 paying clients.

</comment></comment><comment><USER4> Go with both. Personal branding is important in your situation but you also want to take care of liabilities,taxes etc in a more professional way. One way to do it is to market yourself individually through your website,blog whatever using your own name. When you do have a client ready to hire you, just mention to them that "for tax/liability purpose, I do contracts and payments via my company <xyz>". I doubt that any client will have an issue writing a check to a company vs. a person. In fact, in the US, it is preferable that way in some cases where liability is an issue. I know that you are in the UK but I would guess something similar there.

</comment><comment><USER5> I was a sole trader in the UK for a few years as a freelancer, but what tipped the balance and made me use a limited company instead was mainly liability protection: client projects/related risks were getting big enough to warrant it, plus I wanted a separate legal entity for my own projects.

The additional paperwork isn't actually that bad if you have a decent accountant who is used to working electronically (I can recommend a v good one, FWIW).

<shameless> You might find this handy: [https://leanpub.com/freelancedeveloperbook/](https://leanpub.com/freelancedeveloperbook/) </shameless>

</comment><comment><USER6> Whether forming a company is beneficial depends on where you live and what the tax/liability/other rules are in your jurisdiction.

I'm Dutch, and I started a one-man company because it's fairly trivial, and I need a BTW (VAT) number to charge required VAT, ask it back from the tax service, and enable my clients to ask the VAT they paid me back.

I'm still fully liable, because starting a BV ([http://en.wikipedia.org/wiki/Besloten_vennootschap](http://en.wikipedia.org/wiki/Besloten_vennootschap)) costs more and comes with extra requirements. I may eventually become a BV when it becomes advantageous for me to do so.

There's definitely paperwork, but that's unavoidable. Without a company, I'd still have paperwork. I hired someone to handle the taxes for me, and his costs are deductible because they're business costs for me.

My company's name is not my real name (there's a totally different company that already uses my real name), but in the end, clients are interested in me, and not in my company.

</comment><comment><USER7> Definitely set up a Limited Company. It costs less than 20 pounds to do it online via the Companies House web site. As others have said, you don't want to take on more risk or liability as an individual.

If your clients are mostly VAT-registered, your company should also register for VAT, even if you are below the turnover threshold where you are obligated to do so. Your clients will not care (as they will claim back the VAT), but your company will benefit by being able to claim back VAT on things it buys (like laptops). Even better, you could register for the VAT flat-rate scheme, which would create some additional saving in terms of VAT even if you don't have any VAT-able expenses.

This is not advice. You should get some professional advice from someone who does this all day. Ping me if you want a recommendation: rahim @ encona dotcom

<comment><USER7> Also see my related comment here: [https://news.ycombinator.com/item?id=7275948](https://news.ycombinator.com/item?id=7275948)

</comment></comment><comment><USER8> I did this recently and I went with a company name for two reasons. One, not having a native English meant that it wouldn't sound normal for them to spell/write my name, and second, I don't really like my name :P

Now if you should start a business or register as a sole trader, depends on revenue, local legal liabilities, if in the future you plan to hire people, etc. This advice should be given by an accountant that knows local tax and your current situation.

</comment><comment><USER9> Form a company with a generic consulting name, and brand yourself as yourself. That's what I do now and it works fine for me. When you bill give them your company billing information.

If your freelancing does get bigger than you can just step back to your company name.

Sell You, Bill your company.

</comment><comment><USER10> I do consulting under my own name, [http://macgregorindustries.com](http://macgregorindustries.com), but with naming as there's little science to it, use whatever feels right.

</comment><comment><USER11> I personally would say, use your name if freelancing. If you are looking to become a consultancy then look at using a company name.</comment>


Erlang Basics - <AUTHOR> https://abdullin.com/erlang/basics/

<comment><USER2> In section 6.1, [_] is replaced with [ _]_ (with the second bracket being italic).

Same thing in 6.2 with tail_len = tail _len_

Seems like the markdown parser partially went into the code blocks.

</comment><comment><USER3> Nice! I've been seeing a lot about Erlang lately and have wanted to give it a go. This is perfect. Thanks for posting.

<comment><USER4> This is also a fantastic resource: [http://learnyousomeerlang.com/](http://learnyousomeerlang.com/)

<comment><USER5> Indeed. That's why I referenced it in the second paragraph :)

Also "Stuff Goes Bad: Erlang in Anger" looks quite good.

</comment></comment></comment><comment><AUTHOR> Also since then Erlang got maps (associative data structure).

Here is a postscript chapter from Learn You Some Erlang on them:

[http://learnyousomeerlang.com/maps](http://learnyousomeerlang.com/maps)</comment>


OpenSSL Security Advisory - <AUTHOR> https://www.openssl.org/news/secadv/20151203.txt <comment><USER2> _BN_mod_exp may produce incorrect results on x86_64 (CVE-2015-3193)_

This one is absolutely terrifying. There are common ways that TLS stacks break: Generally speaking, bugs in parsing certificates, bugs in the protocol handling, and side channel attacks on the cryptography. These are risks which we aim to work around -- just like infections are a known complication of surgery, and antibiotic prophylaxis is recommended in some cases.

A bug which _results in multiplication producing the wrong answers_ is in a completely different category. This is a "never event", akin to a surgical scalpel being left inside a patient after surgery or the wrong leg being amputated.

<comment><USER3> Ralf-Phillip Weinmann had a good Black Hat presentation about this bug class. It might not be online yet. He's part of one of a couple of efforts to come up with fuzzing and validation tools to find things like carry propagation bugs in bignum libraries.

The good news about this particular bug is that carry propagation bugs are well-studied (they seem to be the textbook case of a bignum math bug), and if OpenSSL says they've scoped down the places this bug impacts, they're probably right.

I don't know if it mitigates your existential dread, but carry propagation bugs in multiplication routines are not in fact all that rare.

<comment><USER2> _carry propagation bugs are well-studied_

True. But they tend to be well-studied by computer security people, not by mathematicians; and most computer security people won't have the necessary number theory / group theory background.

This is precisely the class of bugs for which proper assessment requires mathematicians who study computer security... aka. NSA employees.

<comment> Ar-Curunir You'll be surprised by the background of many computer security people. It's a varied field consisting of people with all kinds of backgrounds.

<comment><USER2> My background is mathematics too. But I'm not a mathematician, and I wouldn't trust myself to know enough mathematics to figure out how something like this could be exploited.

</comment></comment></comment></comment></comment><comment><USER4> Interestingly, looks like LibreSSL avoided the BN_mod_exp bug.

OpenSSL history for crypto/bn/asm/x86_64-mont5.pl can be seen at: [https://github.com/openssl/openssl/commits/d73cc256c8e256c32...](https://github.com/openssl/openssl/commits/d73cc256c8e256c32ed959456101b73ba9842f72/crypto/bn/asm/x86_64-mont5.pl)

LibreSSL is using an old version of that same file found at [http://cvsweb.openbsd.org/cgi- bin/cvsweb/src/lib/libssl/src/...](http://cvsweb.openbsd.org/cgi- bin/cvsweb/src/lib/libssl/src/crypto/bn/asm/x86_64-mont5.pl). LibreSSL is using a version (possibly with patches on top of it) that is at least before [https://github.com/openssl/openssl/commit/cf6d55961cfaa00eb1...](https://github.com/openssl/openssl/commit/cf6d55961cfaa00eb1852ac67cc4896b22eb8079#diff-43d1ca7cd121250ad9cdaee09e53332a), which introduced the bug reported.

BoringSSL patched it here: [https://boringssl.googlesource.com/boringssl/+/e701f16bd69b6...](https://boringssl.googlesource.com/boringssl/+/e701f16bd69b6f251ed537e40364c281e85a63b2)

So, why LibreSSL went with a 2+ year old version of that file?

<comment><USER5> _So, why LibreSSL went with a 2+ year old version of that file?_

The LibreSSL philosophy is to (at least initially) clean up the parts of OpenSSL that are "cruft". E.g. dropping support for long-dead computer architectures and protocols, removing homebrew malloc(). Stuff like that.

The LibreSSL guys have tried to stay away from the highly tricky crypto stuff. Messing with that could have serious security implications. They can address math and crypto later. For now there's still a lot of low hanging fruit they can pick.

<comment><USER4> I'm aware of that but it seems specially interesting that they decided to go with a specific old version of some files. I don't think this kind of decision was ever made public, was it?

The general clean up idea is mentioned all over, but selecting old versions of specific files is not.

<comment><USER5> _I don 't think this kind of decision was ever made public, was it?_

Not that I'm aware of. I follow the misc, tech, and libressl mailing lists and there seems to be a lot of OpenBSD related stuff _missing_ from there. I think the cabal uses other, more private, more informal, means of communication for a lot of their discussions and decisions.

 _selecting old versions of specific files_

But did they really select an old version? Rather, perhaps they just declined to pull the changes that the OpenSSL people made.

</comment></comment></comment></comment><comment><USER6> After the heartbleed bug I checked out the openssl code to see what the quality was like. I was horrified from what I saw; single character variable names outside of loops, preprocessor macro soup, no comments for functions. I've told interns off for less.

Given the reliance on openssl I really hope companies that are using it are doing robust automated checking on the codebase.

<comment><USER3> It's one of the most heavily audited codebases on the planet. Nobody likes the code quality, and Google has been restructuring it and rewriting it with their BoringSSL project.

At this point: when new bug classes are discovered, like carry propagation in optimized multiplication routines, or even simpler stuff like memory corruption due to bignum copies, yes, there's some cause for alarm, because you might not be able to count on OpenSSL having been audited for them.

But the basic stuff, at least in the core functionality (ie: not oddball TLS extensions) has received a very good shake.

<comment><USER7> > It's one of the most heavily audited codebases on the planet.

This is misleading. OpenSSL is probably one of the most heavily audited in terms of number of auditors currently working on it, but this only started with Heartbleed and there appears to be a large, unfinished backlog of things to get through.

Looking at [https://www.openssl.org/news/vulnerabilities.html#y2015](https://www.openssl.org/news/vulnerabilities.html#y2015) , since Heartbleed 20 months have passed, and new security vulnerabilities have been announced on 14 separate dates (and most of those dates are multiple vulnerabilities being announced at the same time). This announcement breaks the streak of most consecutive months without a new vulnerability, of which there were almost five.

<comment><USER3> That's just not true. In fact, Heartbleed was the product of large-scale auditing that Google had been running on OpenSSL.

<comment><USER8> Do you believe Google is or isn't a US company which would keep the most interesting stuff to itself/NSA/US-TLA's?

Having Google audit the OpenSSL code is not really a problem... but believing them to do things for the benefit of anyone else isn't really feasible. They've shown themselves to be both good and bad actors on multiple occasions, so trying to pick which one this is... guesswork. :(

<comment><USER9> > Do you believe Google is or isn't a US company which would keep the most > interesting stuff to itself/NSA/US-TLA's?

They are a US-based company.

They _absolutely_ would fix and/or publicly announce any vuln in a library that they rely on, rather than keep quiet about it or -far worse- sell the vuln information.

Do you have a credible example of an instance where they've acted to the contrary?

<comment><USER10> Hmm, no one has found out that they didn't tell us things. Clearly, that's proof that they tell us everything. Good thing we got our answer. Time to stop asking questions. Google tells us every time they find a serious vulnerability in OpenSSL, so no need to worry that they might not.

<comment><USER9> > Time to stop asking questions.

 _Absolutely_ not. Vigilance often keeps allies who might turn on you from turning on you, and -when it fails to do that- it alerts you to their treachery. This is why I _asked_ for evidence of Google's treachery, rather than dismissing the possibility.

In _any_ significant conflict it is _very_ wise to have an idea of who your stalwart allies are, and who you are able to currently rely on.

Any ally can turn on you at any time. That's human nature. However, the man who allows himself _no_ allies is far weaker and far more susceptible to attack than the man who has some.

Like any ally, Google may one day turn on us. For the past several decades, examination of the reports from people working in a _variety_ of positions inside the organization leads us to understand that -despite the fact that Google is a huge advertising company- it realizes that insecure computers and computer systems hurt them at _least_ as much as they hurt everyone else. Those reports also lead us to understand that Google works _really_ hard to ensure that the software that it relies on and the software that it produces is as secure as it can be reasonably made, given the resources Google has available.

If this confuses you, think of it this way: Google makes money by keeping the data that it collects on you (and the analysis of that data) secure and out of the hands of _everyone_ outside of Google. Because they use commodity hardware and software in the regular course of their business, they find themselves testing and fixing issues in software and -sometimes- hardware that we all use.

Because there is no competitive advantage for them to withhold those fixes (indeed, doing so makes _everyone_ safer and keeps them using their computers, which keeps delicious data flowing into Google's robots), Google publishes these fixes on a regular basis.

I look forward to your cogent reply.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> I've written up some details on the BN_mod_exp issue that I found with american fuzzy lop: [https://blog.fuzzing-project.org/31-Fuzzing-Math- miscalculat...](https://blog.fuzzing-project.org/31-Fuzzing-Math- miscalculations-in-OpenSSLs-BN_mod_exp-CVE-2015-3193.html) HN thread: [https://news.ycombinator.com/item?id=10673407](https://news.ycombinator.com/item?id=10673407)

</comment><comment><USER12>
      NOTE: WE ANTICIPATE THAT 1.0.0t AND 0.9.8zh WILL BE THE LAST RELEASES FOR THE
      0.9.8 AND 1.0.0 VERSIONS AND THAT NO MORE SECURITY FIXES WILL BE PROVIDED (AS
      PER PREVIOUS ANNOUNCEMENTS). USERS ARE ADVISED TO UPGRADE TO LATER VERSIONS.

Start filling out your upgrade/migration change request forms now, admins.

<comment><USER13> ouch ouch OUCH

FreeBSD has to support 0.98 through the end of 2016

<comment><USER14> A lot of packages can be compiled with a more modern version, though, even if it means more work.

<comment><USER12> The problem isn't whether modern versions work; the problem is re-testing & re-certifying your application on the platform, because you don't know what features might have changed or broken with the upgrade. It can sometimes be cheaper to pay an engineer to backport or make custom patches if vulns are found in the future.

<comment><USER15> Yeah. regression testing, even though it is likely that most people won't see breakage or regression from upgrading to the latest, but some testing should still be done.

<comment><USER12> Some companies also have entire application suites based on a patchset based on a particular version, so before you can even do your whole regression suite, you first have to re-write your entire patchset to work with the upgrade.

In short: Ouch.

</comment></comment></comment></comment></comment></comment><comment><USER16> Title should be > OpenSSL Security Advisory [3 Dec 2015]

</comment><comment><USER17> Just curious (I'm a nobody in the security field to doubt anything): What is the process to vet the correctness of the description of the severity? I imagine these notices are pretty important so when they describe subjective things like how difficult and likely it is to take advantage of this loophole, is there a standard for how to assess such things?

<comment><USER18> The "severity" is often not accurate. OpenSSL recently marked an issue as lowly severe, but in fact its severity was high.

Don't trust them. OpenSSL is bad, use LibreSSL instead. OpenSSL == NSA. For sure they know weaknesses and actively exploit them if required.

EDIT: I'm talking about this advisory: [https://www.openssl.org/news/secadv/20150108.txt](https://www.openssl.org/news/secadv/20150108.txt)

<comment><USER14> I'm not saying you're wrong, I'm just saying LibreSSL isn't bug free either: [https://en.wikipedia.org/wiki/LibreSSL#15_October_2015](https://en.wikipedia.org/wiki/LibreSSL#15_October_2015) buffer overflows and memory leaks aren't great.

<comment><USER18> Didn't say that.

Just take a look at a "security comparison" between LibreSSL and OpenSSL: [https://en.wikipedia.org/wiki/LibreSSL#Security_and_vulnerab...](https://en.wikipedia.org/wiki/LibreSSL#Security_and_vulnerabilities)

Severity LibreSSL OpenSSL

High 0 5

Medium 15 28

Low 7 10

Total 22 43

LibreSSL has had no "high" vulnerabilities, whereas OpenSSL had 5. Decide for yourself which way to go.

EDIT: Sorry, can't format that table nicely here..

<comment><USER19> > The "severity" is often not accurate. OpenSSL recently marked an issue as > lowly severe, but in fact its severity was high.

...

> LibreSSL has had no "high" vulnerabilities, whereas OpenSSL had 5. Decide > for yourself which way to go.

I'm not defending or apologizing for OpenSSL (or any project), but your rationale isn't consistent, seemingly only trying to evoke an emotional response.

Since heartbleed, lots of new SSL implementations have sprung up (Libre, Boring, etc), and hard lights have shone on OpenSSL as well. The scrutiny and competition will come to be win for all consumers of SSL. It's not clear to me (as a consumer) that any project has a huge leg-up over another (though Libre's wholesale dump of a tremendous amount of legacy code sounds like a step in the right direction).

Do we even know this won't show up in other (Boring, Libre) implementations as well ?

Edit: formatting

<comment><USER20> _> I'm not defending or apologizing for OpenSSL (or any project), but your rationale isn't consistent, seemingly only trying to evoke an emotional response._

The GP is pointing out that LibreSSL has avoided the 5 vulnerabilities that OpenSSL marked sev:high since the fork. There isn't any inconsistency about that, it's a pure apples-with-apples comparison.

 _> It's not clear to me (as a consumer) that any project has a huge leg-up over another_

LibreSSL has avoided almost half of the OpenSSL vulnerabilities found since the work. What more do you want?

</comment></comment></comment></comment></comment></comment><comment><USER21> I'm no longer surprised at openssl issues having looked at the code. Personally and professionally, I have slowly been transitioning to mbed (was PolarSSL before ARM bought it). For those who haven't seen it, it's worth checking out.</comment>


Is Health as a Human Right? - <AUTHOR> http://blogs.nyu.edu/fas/dri/aidwatch/2009/10/debating_health_as_a_human_rig.html

<comment><USER2> This is a tough topic.

On one hand, people really shouldn't end up financially devastated after treating an illness. I'm sure we all feel some mental stress at the thought that if something catastrophic and unexpected happens we may be financially screwed the rest of our lives.

On the other hand...a lot of people do a lot of stupid things that I don't necessarily want to pay for. Smoking and obesity are two very costly life style choices (Note: I'm aware some people are obese because of medical reasons, I'm not talking about them). And I'm not sure I feel it's fair to pass those costs onto the rest of us who don't smoke and keep a healthy weight and keep our cholesterol and blood pressure and whatnot in a healthy range. Ultimately though, we could get way too nitpicky about "who is doing what to themselves and shouldn't get covered".

In a perfect world I think a non-profit health insurance system should be created that everyone has to buy into. On top of that, to keep costs down, the majority of people would try to stay healthy and doctors wouldn't be paid per test. However, I don't think anything we do will work unless we address why health care costs so much and start taking responsibility for our own health.

</comment><comment><USER3> It makes no sense to declare health a human right; not while there are medical conditions that can't be helped. It's like a right not to be struck by lightning.

It makes more sense to declare healthcare a human right. Naturally this requires the idea of rights as "whatever tax-funded entitlements are bestowed upon the citizens by the duly elected government" which seems unpopular around here.

</comment><comment><USER4> Rights are freedom from others, protection from violence, force, etc. They are not freedom to services provided by other people. To claim a right to services is to take away the "traditional" rights of the people who will be forced to provide and pay for those services. This creates a conflict, whereas the right to freedom is equal for everyone.

</comment><comment><USER5> I think the whole debate needs to be reframed in terms of a new perspective of self-interest. A healthy population will contribute more to society and make for a healthier, more robust society. A more interesting and enjoyable place in which to live.

Personally, I also find a moral component. An obligation to "help my neighbor".

As for the judgment that gets thrown around as to good vs bad behavior and what we should "reward" and what we should "punish", I would suggest that we simply don't know enough yet to accurately make such determinations. In the last couple of years, it's been demonstrated that nicotine may be as effective as stimulant drugs in treating symptoms of AD(H)D. Are all of those smokers simply making a bad choice, or are some of them self-medicating? Were people self-medicating in such a fashion a couple of decades ago when AD(H)D was not well known, recognized, nor treated by the medical establishment?

Stop arguing about who's to blame, and start fixing the problems. It's a lot more efficient. That's what the rest of the developed world has been showing us (the U.S.).</comment>


C++ Headers are Expensive - <AUTHOR> http://virtuallyrandom.com/c-headers-are-expensive/ <comment><USER2> In the Zig stage1 compiler (written in C++), I tried to limit all the C++ headers to as few files as possible. Not counting vendored dependencies, the compiler builds in 24 seconds using a single core on my laptop. It's because of tricks like this:

        /*
         * The point of this file is to contain all the LLVM C++ API interaction so that:
         * 1. The compile time of other files is kept under control.
         * 2. Provide a C interface to the LLVM functions we need for self-hosting purposes.
         * 3. Prevent C++ from infecting the rest of the project.
         */

        // copied from include/llvm/ADT/Triple.h

        enum ZigLLVM_ArchType {
            ZigLLVM_UnknownArch,

            ZigLLVM_arm,            // ARM (little endian): arm, armv.*, xscale
            ZigLLVM_armeb,          // ARM (big endian): armeb
            ZigLLVM_aarch64,        // AArch64 (little endian): aarch64
        ...

and then in the .cpp file:

        static_assert((Triple::ArchType)ZigLLVM_UnknownArch == Triple::UnknownArch, "");
        static_assert((Triple::ArchType)ZigLLVM_arm == Triple::arm, "");
        static_assert((Triple::ArchType)ZigLLVM_armeb == Triple::armeb, "");
        static_assert((Triple::ArchType)ZigLLVM_aarch64 == Triple::aarch64, "");
        static_assert((Triple::ArchType)ZigLLVM_aarch64_be == Triple::aarch64_be, "");
        static_assert((Triple::ArchType)ZigLLVM_arc == Triple::arc, "");
        ...

I found it more convenient to redefine the enum and then static assert all the values are the same, which has to be updated with every LLVM upgrade, than to use the actual enum, which would include a bunch of other C++ headers.

The file that has to use C++ headers takes about 3x as long to compile than Zig's ir.cpp file which is nearing 30,000 lines of code, but only depends on C-style header files.

<comment><USER3> Any plans to actually bootstrap the compiler?

<comment><USER2> [https://github.com/ziglang/zig/issues/853](https://github.com/ziglang/zig/issues/853)

</comment></comment></comment><comment><USER4> You can know where you time is going, at least with clang, by adding -ftime- report to your compiler command line. The headers take a long time is often that the compiler can do a better job at optimizing and inlining as everything is visible. Just timing your compiles is like trying to find things in the dark, you know the wall is there but what are you stepping on :) Good to know what is taking a long time, but it may not be the header itself but how much more work the compiler can do now to give a better output(potentially)

<comment><USER5> I've been working with -ftime-report, but unfortunately it reports times per cpp file. I'm looking for a way to get a summary across an entire CMake build. Right now reading 100+ -ftime-report outputs is not really useful, although deep down I know it's all template instancing anyway.

<comment><USER4> When I look most of the time has gone to inline and optimization. But I only look sometimes and sample size is Me

</comment></comment></comment><comment><USER6> I recommend three things for wrangling compile times in C++: precompiled headers, using forward headers when possible (e.g. ios_fwd and friends), and implementing an aggressive compiler firewall strategy when not.

The compiler firewall strategy works fairly well in C++11 and even better in C++14. Create a public interface with minimal dependencies, and encapsulate the details for this interface in a pImpl (pointer to implementation). The latter can be defined in implementation source files, and it can use unique_ptr for simple resource management. C++14 added the missing make_unique, which eases the pImpl pattern.

That being said, compile times in C++ are going to typically be terrible if you are used to compiling in C, Go, and other languages known for fast compilation times. A build system with accurate dependency tracking and on- demand compilation (e.g. a directory watcher or, if you prefer IDEs, continuous compilation in the background) will eliminate a lot of this pain.

<comment><USER7> pImpl pattern is great for those who don't care about performance but it's inappropriate for most header libraries. You wouldn't want a library that hides the implementation of std::vector for example. With a visible implementation the compiler compile e.g. operator[] down one x86 instruction. With a pImpl pattern it will be an indirect function call in all likelihood that will be hundreds of times slower. It can make sense for libraries where every function is really expensive anyway, but it's ruinous for STL and the like.

<comment><USER8> Using the pimpl pattern doesn't mean an indirect function call. The function to be called is always known. It's just an extra indirection in the data member. It's cheap. Think of it as Java style memory layout: everything that's not primitive stored in an object is a reference and therefore behind one level of indirection. The performance of Java is acceptance in the vast majority of use cases. Using pimpl will be the same.

<comment><USER9> _"It 's just an extra indirection in the data member. It's cheap"_

That extra indirection often means a cache miss. That isn't cheap. Accessing each item traversed through a pointer can easily halve program speed.

Java tries hard to prevent the indirections (local objects may live in the stack, their memory layout need not follow what the source code say, objects may even only exist in cpu registers)

<comment><USER10> Hmm... if you were a horrible person you could declare a `char[n]` member instead of a pointer. Then you could placement-new the impl in the constructor, and static-assert that `sizeof(impl)>=n`... No more cache misses :-).

:-(

<comment><USER11> This doesn't take into account the alignment of the type though (you'd want to use std::aligned_storage<sizeof(T), alignof(T)>), but that requires knowing enough about T to be able to use sizeof() and alignof(), which means no incomplete types, bringing us back to where we started.

</comment></comment></comment></comment></comment></comment><comment><USER12> If C++ compile time is a concern and/or impediment to productivity, I recommend the seminal work regarding this topic by Lakos:

Large-Scale C++ Software Design[0]

The techniques set forth therein are founded in real-world experience and can significantly address large-scale system build times. Granted, the book is dated and likely not entirely applicable to modern C++, yet remains the best resource regarding insulating modules/subsystems and optimizing compilation times IMHO.

0 - [https://www.pearson.com/us/higher-education/program/Lakos- La...](https://www.pearson.com/us/higher-education/program/Lakos-Large-Scale- C-Software-Design/PGM136492.html)

<comment><USER13> If it's a book I'm thinking about then it appeared already very dated to me 10 years ago. Too many limitations and there are some weird rules about boundaries between elements of the architecture.

</comment></comment><comment><USER14> Speaking about GNU C++ (and C), the headers are getting cheaper all the time compared to the brutally slow compilation.

Recently, after a ten year absence of not using _ccache_ , I was playing with it again.

The speed-up from _ccache_ you obtain today is quite a bit more more than a decade ago; I was amazed.

 _ccache_ does not cache the result of preprocessing. Each time you build an object, _ccache_ passes it through the preprocessor to obtain the token-level translation unit which is then hashed to see if there is a hit (ready made .o file can be retrieved) or miss (preprocessed translation unit can be compiled).

There is now more than a 10 fold difference between preprocessing, hashing and retrieving a .o file from the cache, versus doing the compile job. I just did a timing on one program: 750 milliseconds to rebuild with ccache (so everything is preprocessed and ready-made .o files are pulled out and linked). Without ccache 18.2 seconds. 24X difference! So approximately speaking, preprocessing is less than 1/24th of the cost.

Ancient wisdom about C used to be that more than 50% of the compilation time is spent on preprocessing. That's the environment from which came the motivations for devices like precompiled headers, #pragma once and having compilers recognize the #ifndef HEADER_H trick to avoid reading files.

Nowadays, those things hardly matter.

Nowdays when you're building code, the rate at which .o's "pop out" of the build subjectively appears no faster than two decades ago, even though the memories, L1 and L2 cache sizes, CPU clock speeds, and disk spaces are vastly greater. Since not a lot of development has gone into preprocessing, it has more or less sped up with the hardware, but overall compilation hasn't.

Some of that compilation laggardness is probably due to the fact that some of the algorithms have tough asymptotic complexity. Just extending the scope of some of the algorithms to do a bit of better job causes the time to rise dramatically. However, even compiling with -O0 (optimization off), though faster, is still shockingly slow, given the hardware. If I build that 18.2 second program with -O2, it still takes 6 seconds: an 8X difference compared to preprocessing and linking cached .o files in 750 ms. A far cry from the ancient wisdom that character and token level processing of the source dominates the compile time.

<comment><USER15> > Ancient wisdom about C used to be that more than 50% of the compilation time > is spent on preprocessing.

Ancient wisdom was that more than 50% of the time is spent _compiling_ the headers, after they become a part of your translation unit after preprocessing. I don't see why preprocessing itself would ever be singled out, given that it's comparatively much simpler than actual compilation.

<comment><USER16> Opening and reading all the included files could be costly. Also it is "ancient" wisdom so it might predate compilers that could detect the include guard pattern and had to repeatedly preprocess the same files. There is an ancient "Notes on programming" article by Rob Pike that comes up every now and then with a paragraph against include guards for that outdated reason.

</comment></comment></comment><comment><USER17> > The test was done with the source code and includes on a regular hard drive, > not an SSD.

In my opinion, this makes any conclusion dubious. If you really care about compile times in C++, step 0 is to make sure you have an adequate machine (at least quadcore CPU/ lot of RAM/SSD). If the choice is between spending programmer time trying to optimize compile times, versus spending a couple hundred dollars for an SSD, 99% of the time, spending money on an SSD will be the correct solution.

<comment><USER18> Just to address part of your concern: Traditionally disk speed makes very little difference to compile times for real world C/C++ projects. This is because real world projects have many files, and each one can be compiled in parallel. Once you spawn sufficient compilers in parallel, the CPU becomes the bottleneck, not the disk. (I.e. when a compilation asks for I/O, it then yields the CPU to other compilers which have CPU work to do)

Note that Visual Studio, for example, does a poor job of this because it only spawns one compilation per CPU thread. This results in individual threads being idle more than they ought to be.

<comment><USER19> Absolutely not true. The problem is not the compilation of one single file, but that every one of these single files pulls in large amounts of headers, distributed over various libraries (e. g. Qt/Boost/STL), all of which won't fit into the disk cache.

If it doesn't make a difference, all that means is that your project is small, or doesn't have too many dependencies. Good for you. But that's not the reality for all projects.

<comment><USER18> My projects take 10 minutes to build on a modern system, which is plenty complicated enough. Don't appreciate the "good for you" flippancy.

</comment></comment></comment></comment><comment><USER20> All of msvc, gcc, clang, and the isocpp committee have active work ongoing for C++ modules.

We'll have them Soon™.

<comment><USER21> Who knows whether they'll see much use, due to C++ needing to keep backwards compatibility for older projects that demand older versions of C++.

It probably partially depends on whether old-style headers can be used simultaneously with new-style modules.

</comment></comment><comment><USER22> Opera contributed jumbo build feature to Chromium. The idea is to feed to the compiler not the individual sources, but a file that includes many sources. This way common headers are compiled only once. The compilation time saving can be up to factor of 2 or more on a laptop.

The drawback is that sources from the jumbo can not be compiled in parallel. So if one has access to extremely parallel compilation farm, like developers at Google, it will slow down things.

<comment><USER23> > The drawback is that sources from the jumbo can not be compiled in parallel. > So if one has access to extremely parallel compilation farm, like developers > at Google, it will slow down things.

Generally the way this works is rather than compiling into one jumbo file, you combine into multiple files, and you can then compile them in parallel. UE4 supports it (disclosure, I work for them). and it works by including 20 files at a time, and compiling the larger files normally.

There is also a productivity slow down where a change to any of those files causes the all the other files to be recompiled, so you can remove those files from the individual file.

> The compilation time saving can be up to factor of 2 or more on a laptop.

The compilation time savings are orders of magnitude in my experience, even on a high end desktop. That's for a full build. For an incremental, there is a penalty (see above for workarounds)

</comment></comment><comment><USER24> This reminds me of my very first job after university. We used Visual C++, with some homebrew framework with one gigantic header file that tied everything together. That header file contained thousands or possibly tens of thousands of const uints, defining all sorts of labels, identifiers and whatever. And that header file was included absolutely everywhere, so every object file got those tens of thousands of const uints taking up space.

Compilation at the time took over 2 hours.

At some point I wrote a macro that replaced all those automatically generated const uints with #defines, and that cut compilation time to half an hour. It was quickly declared the biggest productivity boost by the project lead.

</comment><comment><USER25> Isn't this the reason precompiled headers are a thing?

<comment><USER26> As far as I understand it's also one of the reasons modules are a thing... or at least people want them to be.

Precompiled headers are a pretty ugly solution and the way they've been implemented in the past could be really nasty. (IIRC in old GCC versions it would copy some internal state to disk, then later load it from disk and manually adjust pointers!)

<comment><USER27> There must still be some dark pointer magic going on, because I noticed that unless I disabled ASLR on Debian Stretch, each build of a precompiled header came out different, screwing up ccache. I can only conclude that the specific memory layout during an individual run influences the specific precompiled header (".gch") output. We now run our build process under 'setarch x86_64 --addr-no-randomize.

<comment><USER27>
        $ for i in `seq 3`; do gcc-6 -x c-header /dev/null -o x.h.gch; sha256sum x.h.gch; done
        98d8093503565836ba6f35b7adf90330d63d9d1c76dfb8e3ad1aeb2d933d1a45  x.h.gch
        17e5de099860d94aaa468c5ad103b3f0dd5e663f6cdbd01b4f12cf210023e71c  x.h.gch
        3cc2f1c0a517b5fedbbd49bb3a34084d9aa1428f33f3c30278a8c61f9ed9ba88  x.h.gch

</comment></comment></comment></comment><comment><USER28> I would love to see the times of this on a Linux system (preferably on the same hardware).</comment>


WayCup - A minimal tool that hides your online assets from scanners and hackers - <AUTHOR> https://github.com/avilum/waycup <comment><AUTHOR> A tool for hiding your online assets from online scanners</comment>


WebGL Implementation of 2D Dynamic Lighting - <AUTHOR> http://xnajs.com/examples/02/

<comment><AUTHOR> It is an implementation of this: [https://www.youtube.com/watch?v=CzuYXTa_CsU](https://www.youtube.com/watch?v=CzuYXTa_CsU)</comment>


Google Doodle celebrates Canada's coldest day, -63 ℃ - <AUTHOR> http://www.ottawacitizen.com/story_print.html?id=9462148 <comment><USER2> I've seen the wrong side of -40, when I was flying to work in Ft McMurray, Alberta for a consulting job.

One time, I drew the short straw and had to go pick up our SUVs at the parking lot upon landing. They were outside, plugged in.

The car started with the saddest sound I ever heard a mechanical thing make.

I put it in reverse, hit the gas, and pulled out of the spot. Then I put it in drive and hit the gas- and the car moved backwards. Every gear except for Park and Neutral did the same thing: reverse.

I reversed around the airport parking lot to the terminal and walked into the Hertz. When I explained the problem, they had clearly heard it before. "Don't worry about it. Just leave it on for a few minutes and you'll be fine. Transmission fluid's frozen."

<comment><USER3> You didn't let it warm up?

In the Yukon, it's critical you let your car warm up. A block heater, battery blanket and oil pan heater are all needed, but they're only heating the actual engine block.

Think about how cold the oil in the transmission and diffs are.. let alone everything else.

You also want to drive extremely smoothly and slowly for the first ~5 mins to let everything circulate and slowly warm up to running temp - sudden moves or turns tears apart CV joints, and destroys other rubber seals.

<comment><USER4> These are aspects to driving vehicles most people do not even begin to need to think about.

<comment><USER5> Especially nowadays, I know that my 72 Chevy had a instructions for cold start (<32 I believe) on the back of the driver's visor which included idling for a few minutes. I've noticed people tend to turn their car on after getting situated but I still have a habit of turning it over as soon as I get in to let it warm up even though that car is, sadly, gone for now.

<comment><USER6> All the geegaws on a modern engine make it less important.

<comment><USER3> Hahaha.

Have you seen what engine oil looks like past -35C?

Butter. Same color, same consistency. You can cut and spread it with a knife. Those geegaws aren't helping there.

Also, there is a hell of a lot more in a vehicle that's sensitive to extreme cold than an engine.

<comment><USER6> Hohoho?

I said less for a reason. Most people don't have to worry about -35C. Cars start reliably down to fairly low temperatures, so they don't need to worry about it.

<comment><USER3> > _Most people don 't have to worry about -35C._

We're replying in a thread about someone trying to use a vehicle at -40C...

> _Cars start reliably down to fairly low temperatures_

Start? As the parent comment states, that's the least of your problems.

<comment><USER6> I replied to a comment that mentioned <32 Fahrenheit.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER3> I live up in the Yukon and drove into Snag in the fall looking for Moose.

The history of the old abandoned town there is really cool, as were the Northern lights. We spent a couple of days wandering around all the old buildings, etc.

Pics here: [http://theroadchoseme.com/more-yukon-fall- camping-2011](http://theroadchoseme.com/more-yukon-fall-camping-2011)

This year up on the Dempster for Caribou hunting, I saw -45C, the coldest I've seen yet. We were outside for the whole day snowshoeing around, it was spectacularly beautiful.

Lots of my friends up here have seen -55C.

</comment><comment><USER7> Balmy Canada.

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

Oymyakon and Verkhoyansk are the only two permanently inhabited places in the world that have recorded temperatures below −60.0 °C (−76 °F) for every day in January. Oymyakon has never recorded an above freezing temperature between October 25 and March 17.

</comment><comment><USER8> Random crazy idea alert:

This is actually close to the temperature to sublimate CO2. I'm curious why we couldn't lower the temperature a little more and pull carbon out of the air? Has anyone investigated that?

Maybe I should buy some land there and start making dry ice and selling carbon offsets?

<comment><USER6> The partial pressure is too low:

[http://wattsupwiththat.com/2009/06/13/results-lab- experiment...](http://wattsupwiththat.com/2009/06/13/results-lab-experiment- regarding-co2-snow-in-antarctica-at-113%C2%B0f-80-5%C2%B0c-not-possible/)

<comment><USER8> But you just need to lower the temperature another 20-40 degrees. It would still take some energy but since youre starting at such a low temp It would seem it would save a lot of energy.

<comment><USER6> The link is pretty convincing. What it amounts to is that there is so little CO2 in the air that sublimation into the air happens faster than any freezing out of the air.

</comment></comment></comment></comment><comment><USER9> "thermometers don't use mercury"

uhh... many of them do in fact use mercury..

<comment><USER10> Indeed, the article errs on that general statement. But it seems per Wikipedia that pure-mercury thermometers become unusable at -39C, when mercury solidifies. A mercury-thallium alloy can go to -61C, but apparently alcohol thermometers are preferred for measuring extreme cold, as they work to -70C. So the actual observed thermometers on that record day – _those_ thermometers – likely did not use mercury.

</comment></comment><comment> rkuykendall-com The physics of this article was incredible to think about. It must have been like visiting another world.

</comment><comment><USER11> Goddamn, there are places actually above the arctic circle with milder climates than this. Tromsø, Norway, has a low of -6 C (21 F) over the next week! And highs above freezing!

<comment><USER12> The Gulf Stream is a wonderful thing. Without it, Tromsø would be a frozen wasteland.

</comment></comment><comment><USER13> >100.000 people smiling now at Norilsk :)

Taken several days ago - [http://s2.pikabu.ru/post_img2/2014/01/30/9/1391089429_818451...](http://s2.pikabu.ru/post_img2/2014/01/30/9/1391089429_818451032.jpg)

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

</comment><comment><USER14> Thats -81.4(F), btw.

<comment><USER15> Wow. When I heard -60, I thought Fahrenheit. Christ.

</comment></comment><comment><USER16> In 1981 when I was just out of boot camp and waiting for BE/E school at Great Lakes, IL, we had to patrol the base for I think it was 4 hours. It was -80 F wind chill factor. I thought I was going to die. I can't imagine being somewhere where the normal temperature on a given day is that cold. The wind chill must be unbearable to be outside for long.

</comment><comment><USER17> Made me think of Vernor Vinge's "A Deepness in the Sky"[1], which is set on a planet where the atmosphere freezes and snows to the ground before thawing again (in 250 year cycles).

[1] [http://en.wikipedia.org/wiki/A_Deepness_in_the_Sky#Backgroun...](http://en.wikipedia.org/wiki/A_Deepness_in_the_Sky#Background)

<comment><USER18> Of course, the best bit is _why_ the atmosphere freezes (i.e. why the On/Off star acts like it does)

</comment></comment><comment><USER19> I can't imagine what that must be like. OTOH, I've been out in a few days where it was over 45C, and that's not pleasant either.

<comment><USER3> I've seen +47.8C (in Australia) and -45C (in northern Canada).

I'm still hoping for the full 100C temp swing, which I'm getting mighty close to :)

<comment><USER20> Hahah, nice ! I've seen 50C in the Sahara desert but never below -20C. Guess I should try spending a winter in Canada :)

<comment><USER21> Am in Aus and experienced 43c this summer, and have been on a husky safari in Lapland at -40c.

I can't recommend a husky safari enough:

[http://www.harriniva.fi/en/destinations/harriniva/programme-...](http://www.harriniva.fi/en/destinations/harriniva/programme- packages/travelogue-husky-safari/)

</comment></comment></comment></comment><comment><USER22> It's -24C in Waterloo, ON right now. I think I might work from home tomorrow...

</comment><comment><USER23> lol makes me feel like a wimp for feeling like -20 was cold.

</comment><comment><USER24> "Climate Change"

<comment><USER25> Whilst no single weather event can be linked directly to climate change, this is, surprisingly, consistent with a global increase in temperature. Whilst the rest of the Northern Hemisphere is warmer than it ever has been, Canada and the North Eastern US freezes due to an alteration to the jet stream: [http://www.youtube.com/watch?v=XZGsdnYqbjk](http://www.youtube.com/watch?v=XZGsdnYqbjk)</comment></comment>


Apple Can Afford to Mess with Annoying, Snoopy Ads–And at WWDC, It Did - <AUTHOR> https://www.fastcompany.com/40428481/apple-can-afford-to-mess-with-annoying-snoopy-ads-and-at-wwdc-it-did <comment><USER2> The article talks about Safari Reader Mode as if it is about ads, but man, I HAVE to use it just to READ GODDAMN WEBSITES ON MOBILE.

The problems with mobile versions of sites are just to many to enumerate, and we just want to be able to read what's there, and maybe (if it's not asking too much) be able to interact a bit.

The too-hard-to-read text, the glacier-speed loading, the jumping text (due to late-loading images or ads) the craziness, what is it all for?

<comment> real-hacker This is a poorly written post. The title is referring to the stop-ad-tracking feature, but the text is mostly about 'reader mode'.

</comment></comment><comment> real-hacker I wouldn't be surprised if the feature of 'blocking snoopy ads' become a browser standard. And considering Chrome + Safari take a majority of browser market share, this feature, basically, is a death sentence to all the Internet ad companies. Of course, Google will be fine.

<comment><USER3> Like when popup blocking became a standard browser feature around a decade ago?

<comment> real-hacker This is different from the popup in nature. A lot of ads rely on cookie tracking to target users, this feature makes tracking almost impossible, and ads without targeting have much less value. Are you suggesting internet ads will invent new ways to track users?

<comment><USER3> I hope not. :D

But until now, data miners have always found some way to work around the restrictions that browsers imposed. (Though, admittedly, an adblocker is the toughest such restriction.)</comment></comment></comment></comment>


Show HN: Motif, a quick and easy way to make really pretty sharable images - <AUTHOR> https://motif.imgix.com/ <comment><AUTHOR> The idea for this tool came up a couple weeks ago. It lets you create and customize nice-looking sharable images. Those images can be shared directly, or used in `og:image` and `twitter:image` style meta tags.

It's totally free, and you're welcome to implement Motif across your whole site if you want. Once you've got a template you're happy with, you can dynamically switch out a couple of the parameters to get an integration across an entire site really quickly.

It auto-formats the design to fit the aspect ratio of the requesting site when used in meta tags. Rectangular for Facebook and Twitter, a small, unstyled square for Reddit, and a large square for Slack and other social networks. I'm planning to refine how the reformatting works over the next few weeks, as it starts to see some usage in the wild. ^_^</comment>


Do androids dream of being human? (Ex machina review) - <AUTHOR> https://medium.com/@azeem/do-androids-dream-of-being-human-1dc55a516d42

<comment><USER2> > it tackles a much smaller issue [than AI as an existential threat]: ... will > our AI be a little Pinnochio wanting to be human?

I think this is an ungenerous read of the film - indeed one of the things I took away from it was the psychological opacity of the lead AI character.

Difficult to counter without getting into spoilery detail, but .. although we hear her dialog and see her actions, we are still amply reminded that we shouldn't be fooled by her human-like appearance into interpreting this behaviour in strictly human terms, even if we can infer strategies, goals and concerns.

> Why an AI would seek to frame itself in human terms is a truly fascinating > question or more interesting than anything asked in the film

Maybe it's just me, but by the end of the film, I feel I got at least one clear and very specific answer to this question!</comment>