For Centuries, Know-It-Alls Carried Beautiful Miniature Almanacs - <AUTHOR> https://www.atlasobscura.com/articles/miniature-almanacs <comment><USER2> This article reminded me of Alan Kay's essay _Our Human Condition "From Space"_ [1], which starts with a discussion of pocket globes:

My favorite examples of early science, and a wonderful general metaphor for what science does, are the attempts at highly accurate map-making started by the Greeks, then lost for a thousand years, and then taken up again starting in the 15th century. By the end of the 1700s, people delighted in being able to buy a pocket globe of "The World As Seen From Space". 200 years later, we went out into space, looked back at the world, took pictures of it, and saw just what the 18th century map makers had already found out.

[1] [http://www.vpri.org/pdf/m2003001_human_cond.pdf](http://www.vpri.org/pdf/m2003001_human_cond.pdf)

</comment><comment><USER3> Reminds me of the Pocket Reference. [https://en.wikipedia.org/wiki/Pocket_Ref](https://en.wikipedia.org/wiki/Pocket_Ref)

<comment><USER4> Pears Cyclopaedia is one i grew up with. It was a tiny book with ~1000 tissue paper thin pages that seemed to always have everything i needed. From logarithmic tables and maths/physics functions to a periodic table.

I went to school before wikipedia and this book helped a lot.

[https://en.wikipedia.org/wiki/Pears%27_Cyclopaedia](https://en.wikipedia.org/wiki/Pears%27_Cyclopaedia)

<comment><USER5> I have a copy of this from the turn of the century (last century) which says (in paraphrase) _Physics: some recent developments from physicists such as Dr Einstein & Prof. Bohr suggest there may be further changes in our understanding of this field_ -It's pre quantum mechanics classical physics admitting its on the cusp of a significant change..

</comment></comment></comment><comment><USER6> > Smartphones are equally as portable, too—but it's hard to argue that they're > even half as lovely.

Actually, why not? You could find an endearing custom printed case, and to an extent personalize the software in a lovely and unique way.

Is the problem that they're not rare/irreproducible enough to be a collector's item? If so, will we eventually see collectors obsess over out of production phones?

<comment><USER7> Just bad writing, just like when people automatically say "the old times were better" without even analyzing if it's true

</comment></comment><comment><USER8> Here is a modern version of Know-it-all, instead of looking things up, the answer looks for you.

It works by adding a monetary incentive to any type of question you might encounter, for example:

We all look up answers on our phones, but what are some questions which you have not been able to look up and wish you can get answers to? Answer with Obyte and earn up to 34,196 bytes: [https://particiate.net?#@208](https://particiate.net?#@208)

<comment><USER9> Last comment was four years ago...

</comment></comment><comment><USER10> I've always preferred the Junior Woodchucks Guidebook.

</comment><comment><USER11> Looks like an ancient version of the PDG review booklet

[http://pdg.lbl.gov/index.html](http://pdg.lbl.gov/index.html)

</comment><comment><USER12> And now-a-days we have a smartphone and Wikipedia</comment>


The Forgotten History of Small Nuclear Reactors - <AUTHOR> http://spectrum.ieee.org/energy/nuclear/the-forgotten-history-of-small-nuclear-reactors <comment><USER2> Interesting article.

The nuclear industry does indeed have a selective memory, and much of this interesting legacy is nearly lost.

But perhaps most rightly so. You cannot compare the designs of today with the reactors of the 1950s any more than you can compare the computers of 2015 with those of 1960.

The cost numbers are also dramatically incorrect because you are comparing apples to oranges. Wind and solar may produce a kw cheaply, but for correct pricing, storage that can fully levelize their production over a full day, a full week needs to be accounted for, and it frankly simply does not exist. The truth is that levelizer, with fracking's cheap prices, is natural gas. So for every solar and wind plant you have the same size of natural gas plant, regularly turning on and off. The other part not included in the price is carbon and emissions costs externalities. Natural gas is effectively "coal lite" and biomass burns more dirty than coal.

Let's restart this article/conversation with at least some correct bases.</comment>


Pursera.com - The intelligent product search engine - <AUTHOR> https://pursera.com/blog.php#Pursera.com – The intelligent product search engine

<comment><USER2> that's a site for sore eyes

<comment><AUTHOR> Thank you PaulHoule!</comment></comment>


GoBackup - A simple tool for backup your databases, files to cloud storages - <AUTHOR> https://github.com/huacnlee/gobackup <comment><USER2> Very good solution, convenient and practical.

</comment><comment><USER3> Easy to use

</comment><comment><USER4> so nice</comment>


Filling the void left by Kiva's 2012 acquisition by Amazon - <AUTHOR> http://robohub.org/filling-the-void-left-by-kivas-2012-acquisition-by-amazon/ <comment><USER2> Note: the title should say "Kiva Systems", the microfinance 501 org "Kiva" was not purchased by amazon.

<comment><USER3> Thank you, I felt really confused when I saw the title but as usual, I read comments here before clicking the link.

</comment></comment><comment><USER4> Biased here! But the only option on their list of alternatives that are drop- in replacements for the Kiva System with great updates for next-gen system seems like Otto ([http://www.ottomotors.com/vehicles](http://www.ottomotors.com/vehicles)). Great improvement by removing the need for infrastructure changes (all cartography is onboard and centrally maintained).

<comment><USER5> That's not strictly true. The Locus system isn't a Kiva drop-in, it's a next- gen system as well.

<comment><USER4> Locus seems to be missing the big heavy lifter that Otto has?

<comment><USER5> They're just targeting different markets. Otto is largely targeting manufacturing, Locus is targeting e-commerce and fulfillment more. The morphology of the robots follows from that.

</comment></comment></comment></comment><comment><USER6> RoboCV ([http://robocv.com/](http://robocv.com/)), a pretty good Russian company is missing from the list. These are the same guys who were participants of Google Lunar X Prize but aborted midway due to lack of funding.

</comment><comment><USER7> Amazon also got some cool robotic know-how when it acquired Quidsi (aka Diapers.com, Soap.com, etc): [https://www.youtube.com/watch?v=A6NK0zexl4s](https://www.youtube.com/watch?v=A6NK0zexl4s)

<comment><USER8> Interestingly, the video you posted basically explains how they're using Kiva robots.</comment></comment>


Purdue Pharma files for bankruptcy with $10B plan to settle claims - <AUTHOR> https://www.bloomberg.com/news/articles/2019-09-16/purdue-pharma-seeks-bankruptcy-to-short-circuit-opioid-suits-k0luhox6 <comment><USER2> If anyone doesn't know what's going on here exactly.

The Sackler Family – A Secretive Billion Dollar Opioid Empire \- [https://www.youtube.com/watch?v=zGcKURD_osM](https://www.youtube.com/watch?v=zGcKURD_osM)

</comment><comment><USER3> I have a high level question; a lot of want to legalize drugs. Ending the war on drugs and all that. This is a drug that was legal and a lot of people got on it and now we're angry. Why? I don't like that people got hurt. I also recognize that bad drugs are bad. But I can't find a way out of "tell people drugs are bad and they have to make their own choices." Is the problem here the doctors told them the bad drugs were good drugs?

<comment><USER4> OxyContin isn't a bad drug, it's a highly addictive drug and the company knew it was highly addictive & not only didn't do enough due diligence to make sure prescribers didn't over prescribe it but also intentionally encourage that behavior which has led to an epidemic.

However, food for thought on that same subject is the over prescribing of amoxicillin and other similar class of drugs for viruses. The doctor is operating a business and his/her clients want a solution to their problem, so they write a script as they want to keep their customer happy and it "can't be too bad".

There's a case to be made that a certain amount of immediate gratification expected on the part of the consumer is a large contributing factor to overprescribing in general.

However, in this case, Purdue was very much in the wrong and should not have been encouraging over prescription of a highly addictive drug.

<comment><USER5> Yeah. I think the underlying story is that doctors used to be more apprehensive about prescribing opioid painkillers, and when they did they prescribed lortabs or something like that for acute cases and they wouldn't put refills on or rewrite the scripts when asked. Then, along comes Purdue with a claim that OxyContin, because of its unique formulation, is a big addiction concern and is safe to prescribe for chronic pain. Then they (and a couple other manufacturers) basically conducted a successful campaign to convince doctors that undertreatment of chronic pain was widespread and they were basically letting their patients suffer, strongly suggesting that this may be considered malpractice in the future if they do not start prescribing more opioids. This campaign was very smart and even reached the doctors who refuse to take incentives from drug manufacturers. Essentially, in the way that Pfizer created a new category of concern in the mind of patients with Viagra, Purdue did the same in the mind of doctors with OxyContin.

Lo and behold, people are addicted to OxyContin, some start looking for more immediate-relase formulations of opioids because they don't feel right even on 80mg Oxy tablets, and hundreds of thousands who otherwise would have been alive with chronic pain are now dead of overdose. Meanwhile, research is showing that opioids are not very good for chronic pain and other approaches, usually multimodal approaches, are better, including NSAIDs, gaba-ergic drugs like gabapentin and pregabalin, ketamine, physical therapy, psychological retraining, meditation, acupuncture, etc.

<comment><USER6> > Then they (and a couple other manufacturers) basically conducted a > successful campaign to convince doctors that undertreatment of chronic pain > was widespread and they were basically letting their patients suffer, > strongly suggesting that this may be considered malpractice in the future if > they do not start prescribing more opioids.

That was/is the position of the IOM though. Was Purdue involved with convincing the IOM to adopt that position?

<comment><USER5> Yes, when ideas become fashionable, they become the conventional wisdom.

</comment></comment></comment></comment></comment><comment><USER7> Looks like they got a golden escape hatch.

Sounds like this arm of the company will end up controlled by a government trust. The best outcome would probably be the government running the operation at break even, lowering costs, and heavily regulating how much product it could give to hospitals.

<comment><USER8> Pierce the veil and go after the family.

<comment><USER9> After all they are responsible for thousands of deaths. And they knew it. I don't know why they aren't in jail already.

<comment><USER10> That's because of the "limited" of private limited.

(Under capitalism) many costs of having PtLds are externalized.

<comment><USER11> is that inherent? i haven't read Capital, but this doesn't seem so much of an inherent problem with capitalism than it seems like a very dumb implementation liability protection.

<comment><USER12> What do you suggest instead?

The possibility to bankrupt a company without losing more than you put into the venture is in my eyes a feature of capitalism, not a bug.

<comment><USER13> It's a feature when it's good faith efforts. It's very clearly a bug when it's used to evade no end of abuse, illegality and fraud, or to avoid paying the pollution cleanup.

There probably _needs_ to be some exceptional way in law to pierce the shell of limited liability and go after officers, perhaps even claw back from investors and shareholders.

<comment><USER14> Limited liability only protects the _capital_ of the _shareholders_ , it doesn't protect the management of the company against criminal prosecution.

(In practice, however, managers are only rarely put in jail, both because it's notoriously difficult to prove white-collar crime (except in few cases, like insider trading, which are the pursued with extra vigor), and because CEOs are generally rich and well connected... but the problem there is corruption, not some inherent feature/bug of the idea of limited liability company.)

<comment><USER13> Perhaps I could have expressed it better. I meant to go for the financials. There are countless cases where the factory or mine has declined and instead of cleaning it up, as promised, they shutter the company. Then there's the countless cases where the company is doing something illegal. Take the proceeds back.

We take money earned from theft and drug dealing, we take the stolen car from the person who innocently bought it. There's an offence of receiving stolen property. We don't take the millions from the execs who made millions pushing pharmaceuticals illegally, or the nuclear plant CEO and shareholder that has now, by dint of closure, given the job of decommissioning to the state - i.e. all of us. Once in a blue moon there's a criminal prosecution, but they just about always manage to stay wealthy.

We need to rethink the limits of limited liability as it's become a convenient shield to hide all sorts of unethical, shitty and outright illegal behaviour behind.

<comment><USER15> I have always thought there should be a law that funds for things like mine clearup and pensions should be paid as the debt is incurred, and locked up so there's no way for the company to get at it.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> One naive question - why are doctors who overperscribed opiates still allowed to practice medicine?

<comment><USER17> We spent the better part of decade catching and locking up doctors who prescribed opioids out of guidelines, so much so that doctors are now terrified of prescribing them to people who legitimately need them.

The problem is that the prescribing guidelines, which were written by the pharmaceutical companies themselves, described a regimen that would get pretty much anyone physically addicted to their product.

So you had doctors acting in good faith, prescribing medications only when indicated and following their manufacturer's prescribing guidelines, inadvertently creating new addicts where the manufacturer's literature said there would be none.

Not only that, but we spent several decades treating chronic pain patients with opioids, such that they are completely dependent on that class of drugs to manage their condition. Only very recently have prescribing guidelines adjusted to reflect the reality that opioids are not a good treatment for chronic pain. When those pain patients are driven off of their opioid prescriptions, even if their doctor is well-meaning, some of them turn to heroin/fentanyl to manage their pain.

<comment><USER18> Shouldn't the FDA be checking whether the guidelines written by the pharmaceutical companies are safe?

<comment><USER19> The guidelines are almost always on the conservative side of safe because people who died as a result of taking the medication the manufacturer recommended way turn into slam dunk lawsuits. Part of the reason the opioid problem flew under the radar is because people got hooked and weren't dying until they OD'd so it never came back to bite the manufacturer. What are the odds of another opioid type situation? What else could the FDA do with those resources?

</comment></comment></comment></comment><comment><USER20> Seems like an abuse of the limited liability. Does the US have a way to set that aside? I know other countries do

<comment><USER21> The US indeed has this concept, known as "piercing the corporate veil".

Excess payments to ownership (especially if you think the company is about to face a huge liability) is a classic example of one of the justifications for a judge to do just that: make the owners personally liable rather than just the company.

<comment><USER22> The smart way is to pay yourself 10% dividends every year into your own holding companies from the start. Sounds like that's what they did.

Don't store your gold next to a nuclear reactor and all.

</comment></comment></comment><comment><USER23> Are the other manufacturers of oxycontin being sued too? I know that Purdue tried to underplay their role, but from the best #s I've seen they've only sold 20% of the market.

[https://www.statnews.com/2019/09/09/purdue-pharma-data- downp...](https://www.statnews.com/2019/09/09/purdue-pharma-data-downplay-its- role-in-opioid-epidemic/)

<comment><USER22> That's 20% of the whole opioid pill market, not just oxycontin.

As far as I know, generic manufacturers of off-patent drugs usually aren't sued.

On the one side, they don't actively promote/market their products to prescribers or patients, but I'd still think they share some blame by manufacturing it.

<comment><USER24> > but I'd still think they share some blame by manufacturing it

Nah. Opioids are an essential medication. The problem is not that OxyContin exists, it's the creation of irregular demand for it through the actions that Purdue Pharma are having to settle for.

<comment><USER22> It's a question of what extent, if any, vendor liability exists.

</comment></comment></comment></comment><comment><USER25> With the Sackler family funneling out money prior to this, is there any chance a judge would refuse the bankruptcy?

<comment><USER26> Last I heard the transfers were several years ago

<comment><USER27> Recently in the news: [https://www.nytimes.com/2019/09/13/health/sacklers- purdue-op...](https://www.nytimes.com/2019/09/13/health/sacklers-purdue- opioids.html)

<comment><USER28> People keep misreading this, or maybe just looking at the headline and getting the wrong impression.

The news in that piece is that NY discovered the transfers at all. The transfers themselves are a decade old. The payments to the Sacklers from Purdue are from 2008-2016 but the lawsuits only date to 2018. All of this is _in the article_ if you read it.

I.e., no self-payments after lawsuits became material threat.

<comment><USER29> "Sackler was involved in 137 wire transfers totaling nearly $20 million, and some of those transfers occurred as recently as 2018, the filing indicates."

Who's misreading what now?

<comment><USER28> mcbain's comment that I am replying to, [https://news.ycombinator.com/item?id=20981242](https://news.ycombinator.com/item?id=20981242) , is referring to the NYTimes story on $1B in transfers.

Those substantial transfers ($1B) were a decade ago.

The sentence you quote does not appear in the NYTimes piece and is, in comparison, peanuts. I do not have access to the Bloomberg piece for full context, but the sentence you quote does not say the movements were self- payments from Purdue rather than just personal transfers between personal accounts. It also does not say all $20M was in 2018; there could be a $1k wire in 2018 for all we know from the single sentence.

</comment></comment></comment></comment></comment></comment><comment><USER30> The amazing thing is when I was in legitimate pain in the hospital I couldn't get more than Tylenol. After I was released I drove by a pain clinic and I guarantee I could have scored some oxy that day. I didn't but it's nuts when people that need medication can't get a few pills.

Dont get me started on testorone or ADHD medication hypocrisy.

<comment><USER10> Just accept that the system is broken and get 'm on the most free market we currently have: the market of stuff that is merely illegal.

</comment></comment><comment><USER31> I am legal expert but I have a logical question.

Shouldn't they look at the fund the company had on the "day that the lawsuit started".

Where ever they funneled the money, I am sure they are just look at the bank statement.

</comment><comment><USER32> Without criminal charges, there's no justice.

</comment><comment><USER33> The Sacklers are running around free, enjoying their wealth, while El Chapo is in jail.

</comment><comment><USER34> Go To Jail, Go Directly To Jail, Do Not Pass Go. Do Not Collect $200B.

</comment><comment><USER22> SO what does this mean for non-US litigants, or future non-US litigants?

<comment><USER35> Well according to the WSJ, what's left of Purdue after the bankruptcy will be owned by a trust who's only purpose is to repay the litigants. So I imagine they'll just be part of that.

Also not all US based litigants are part of the settlement that is being worked out. There are also individuals who are being personally sued that aren't part of this as well.

<comment><USER36> I guess they'll have to flog even more pills in order to pay the litigants...

</comment></comment></comment><comment><USER37> Recommended read: Dopesick from Beth Macy. For a non-American, it reads like a horror script.

</comment><comment><USER38> Are any of the Sackler family going to face real consequences for this?

</comment><comment><USER39> It's ok, they've already moved all their billions away.

Their fortune is safe.

</comment><comment><USER40> How can this be legal?

<comment><USER41> Bankruptcy? What do you propose as an alternative when liabilities exceed assets?

<comment><USER8> Piercing the veil. This is not a lemonade stand going under. Here, "Liabilities" correspond to dead bodies. In the thousands.

<comment><USER42> What law permits this now; or are you proposing a new law? If so, how would it work?

<comment><USER21> [https://www.law.cornell.edu/wex/piercing_the_corporate_veil](https://www.law.cornell.edu/wex/piercing_the_corporate_veil)

> "Piercing the corporate veil" refers to a situation in which courts put > aside limited liability and hold a corporation's shareholders or directors > personally liable for the corporation's actions or debts.

</comment></comment></comment></comment></comment><comment><USER43> Great now all the opioid production and prescriptions and thus addiction will stop! Oh wait...

<comment><USER36> Most opiod deaths are from fentanyl. Most fentanyl comes from China, not perscription medication.

<comment><USER44> 75% of opioid/opiate addicts started with pills.

Source: [https://www.ncbi.nlm.nih.gov/pubmed/24871348](https://www.ncbi.nlm.nih.gov/pubmed/24871348)

<comment><USER28> True, but I added a little more nuance here: [https://news.ycombinator.com/item?id=20981382](https://news.ycombinator.com/item?id=20981382)

<comment><USER45> Those conversion rates are not low.

<comment><USER28> They're not zero, but single digit percent times single digit percent is generally considered a small percent. The math works out to 0.32-0.72% _total_ , taking either the low end of both ranges or the high end of both. I think anyone should agree that in an absolute mathematical sense, 0.3-0.7% is a "low percent."

In this specific context? Sure, it's subjective and reasonable people can disagree.</comment></comment></comment></comment></comment></comment>


Guy Sneezes While in a Tesla – Experts Claim Autopilot Might Have Been Engaged - <AUTHOR> https://globalnews.ca/news/4205423/tesla-autopilot-rear-ends-parked-truck/amp/ <comment><AUTHOR> In other news, an employee at Tesla has left their desk to use the washroom for the 5th time since this morning.</comment>


NeoPG – an opiniated fork of GnuPG 2 - <AUTHOR> https://neopg.io <comment><USER3> The switch to C++ is incredibly poorly justified. I don't care how much safer you think it is (and it really isn't), the language is way more complicated and error-prone and rewriting the code is ALWAYS going to introduce many, many bugs than would be found by simply maintaining the code. This guy also switched on -fpermissive as part of the process, which disables warnings which are there for a reason! This guy has also done a lot of lovely things like committing half-assed changes to master (the build breaks more often than it passes!) which have clearly undergone no review.

Anyone this person convinces to use and contribute his fork are going to take time and money (yes, money - the guy put up a Patreon campaign and BountySource page) away from GnuPG, which sorely needs it, as we all hopefully remember. Please do not use this, and I hope the authors give it up.

<comment><USER4> Hi, I'm "this guy". Thanks for pointing out -fpermissive, which was needed during the conversion for the legacy code. Since then I fixed all the warnings, so I can remove the flag ([https://github.com/das- labor/neopg/commit/5359aab7885628554c...](https://github.com/das- labor/neopg/commit/5359aab7885628554cd1c4418f574ed5b2d27e71)).

I would love to do code review, but I need a second developer for that!

Thank you for your interest and taking the time to write down your criticism.

</comment></comment><comment><USER5> > C++ is the better C

Oh no it isn't. It does have more features, and for some fields, sure it is better (user interfaces, simulations).

However, this is security software we are talking about. C++ introduces more complexity as the spec is an order of magnitude bigger than, say, C99. More complex language spec, more complex tooling, lots of places for bugs to hide. It can help with classic buffer overflows and the like, sure. But it introduces its own set of issues.

>Many of these issues are well-known or can be easily researched. They have been documented many times, and can be avoided.

Right. The issues can be avoided. You just need to not make mistakes, right?

Also, this is worrying:

> Converting the legacy code base (490,000 lines of code) to C++ was a > straightforward, mechanical task that took only a couple of hours

So we are good? The fact that it compiles (and maybe even works) doesn't automatically validates it as a secure rewrite (and it is a rewrite, no matter how similar the common language set is). The stakes are just much higher for something like GPG.

I do wish this project good luck, though.

<comment><USER6> > Converting the legacy code base (490,000 lines of code) to C++ was a > straightforward, mechanical task that took only a couple of hours

That sounds like they haven't actually _converted_ it to C++ so much as _compiled it as_ C++.

That means they're probably still using raw owning pointers and no RAII, which means you get none of the safety benefits of C++ (which do exist, so long as you use modern C++ practices like smart pointers, and containers instead of C-style arrays).

</comment></comment><comment><USER7> I'm glad that folks are starting to take an interest into improving GnuPG (and PGP in general). I've been working on an SKS replacement[0] in Rust and I've had to dive into the OpenPGP message format, pgpdump, GnuPG, etc. and it's definitely a bit of a mess.

0: [https://github.com/srct/sks-rs/](https://github.com/srct/sks-rs/)

</comment><comment><USER8> Hmmm, I don't think converting a 500k codebase in C to C++ has a meaningful cost/benefit ratio, especially for security critical code like this. It might be justified to do in something like Rust, but at that point I think it's better to move on from GPG entirely. The OpenPGP standard itself is showing its age (eg. no perfect forward secrecy) and is extremely complicated. I think GPG should be left as-is, and the community gradually move to something simpler, like OpenBSD's signify[0].

[0] [https://www.openbsd.org/papers/bsdcan- signify.html](https://www.openbsd.org/papers/bsdcan-signify.html)

</comment><comment><USER9> Writing a competent, simple replacement for GnuPG, yet PGP fully compatible, is one of the things I plan to do on the long road, thus I think neopg is a good idea, except the fact that they decided to use C++. I know that type safety is one of the considerations, but OOP always results in ambiguous unnecessarily complex code, and for me that defeats the purpose of simplicity. Nevertheless, the GnuPG codebase is a mess.

<comment><USER10> They explicitly address the "Why C++?" question here: [https://neopg.io/blog/cplusplus/](https://neopg.io/blog/cplusplus/)

Choice quote:

 _There are many programming languages, and I believe in picking the right tool for the job. In the case of NeoPG, the priorities were:

\- Support for strong cryptography.

\- Compatibility with C application developers.

\- Convert legacy code quickly.

\- Tool support for QA.

Everything else is, at this point, a secondary concern. The Sequoia Project uses Rust, and I envy that. But the first thing they had to do was to wrap an existing C crypto library (they choose libnettle), because there is no high quality crypto library for Rust yet. That is their challenge.

My challenge will be to stay focussed on the parts of C++ that are actually helpful, and not get bogged down by the rest._

<comment><USER11> > wrap an existing C crypto library

I know it's mostly semantics but calling C from C++ still requires some wrapping(extern "C", integrating build system, etc).

I've found with bindgen unless there's some crazy macro shenanigans going on it's actually quicker for me to integrate C libraries into Rust then wrangling CMake/Make/etc. The C FFI is very much a first-class citizen in Rust.

Even doubly so if we're talking about a cross-platform library.

<comment><USER4> NeoPG uses Botan, which is a crypto library written in C++. I recommend reading its source code and comparing it with, for example, libgcrypt.

<comment><USER12> Is most of the removed code functionality that is now in the crypto library used, Botan?

A blog post on the decision to use an external library might be good. Is there a reason to think that the library will be better maintained than code with similar functionality in GPG?

Great work by the way! Thank you!

</comment></comment></comment></comment></comment><comment><USER13> Should the NeoPG project mention why GPGME wasn't a suitable compromise?

I understand the author wants to clean up the core and the API, but if there's already a project that cleans up the API isn't that good enough? Especially considering the standard it implements-- PGP-- is still quite complicated.

<comment><USER14> Not exactly related to NeoPG, but GPGME in general: Doesn't GPGME assume that the user already has GnuPG 2.x installed and running on their system?

This might just be a misconception I have, but I always thought you couldn't make a batteries-included, self-contained, works-out-of-the-box app if you used GPGME. You'd first have to tell the user to go get a GnuPG implementation from somewhere.

I'd be super happy to be wrong on this.

</comment></comment><comment><USER15> Glad someone is working on this!

One of the reasons we built PGP signing capabilities into Krypton [0] is to make it easy for anyone to sign their Git commits/tags. Almost nobody uses this awesome feature of Git. We even ended up implementing parts of the OpenPGP spec in Swift [1].

0: [https://krypt.co/docs/start/code- signing.html](https://krypt.co/docs/start/code-signing.html)

1: [https://github.com/kryptco/swift-pgp](https://github.com/kryptco/swift- pgp)

</comment><comment><USER16> [https://github.com/das- labor/neopg/blob/master/license.txt](https://github.com/das- labor/neopg/blob/master/license.txt)

It may be opinionated but not well thought of a fork.

How is possible to take GPL 3.0 code, say how it is "more restricted", miss to mention the point of what would happen if it is not, and to claim that any additional code to the project shall be licensed under the BSD type of the license.

The author has some serious misunderstands about licensing issues.

</comment><comment><USER17> I did see this during day 4 of 32C3's Lightning talks. Found the link with time-index here: [https://media.ccc.de/v/34c3-9258-lightning_talks_day_4#t=284...](https://media.ccc.de/v/34c3-9258-lightning_talks_day_4#t=2845)

Starts about 47:25 in if the time-index doesn't work for you.

</comment><comment><USER18> Sounds great. I always wondered why GPG was so complex.

<comment><USER19> GPG is not that complex, but PGP concept, keys structures and workflows - <USER2> are really hard. And this project has to implement all those hard elements too.

<comment><USER20> OpenPGP is kind of like git - if you understand the underlying concepts (in case of OpenPGP this is RFC 4880) then it is simple. GPG is very old and created in different times so it has many quirks at the implementation and UI level but I find the encoding and structures quite simple (there are some weird choices of course).

I wonder what do you think is complex? Trust model maybe? Different kinds of signatures? Negotiating algorithms to use?

<comment><USER21> > I wonder what do you think is complex?

For me it culminates in the way gpg feels really opinionated about key management (with keyrings). Way too often (in relative terms) I end up creating a temp dir, setting GPGHOME, then setting some permissions to quiet up gpg, then importing the keys, then actually doing the thing I wanted, and finally cleaning up[1]. I have no doubt the keyring design works wonderfully for gpgs author(s), but for a tool that should really be more generic than that it feels less ideal.

gpg being as monolithic as it is probably is the fundamental problem here which, in addition to making it unnecessarily cumbersome to use in some cases, also makes it more difficult to learn piecewise (imo).

[1] For one example, see my comment here: [https://github.com/keybase/keybase- issues/issues/2230#issuec...](https://github.com/keybase/keybase- issues/issues/2230#issuecomment-239637659) That operation should be basically "curl ..|gpg-key --to-ssh", but instead it exploded into 10 line bash script, complete with parsing gpg output with grep/awk.

<comment><USER22> Note that, per the blurb at hand, NeoPG is intentionally even more monolithic.

</comment></comment></comment></comment></comment><comment><USER23> Nice! I like the idea from the descriptions on the first page</comment>


Boosted Boards' Battery Fault Analysis - <AUTHOR> https://boostedboards.com/battery-investigation-update/ <comment><USER2> Boosted Boards' Battery Blunder Breakdown</comment>


Is Hubspot's @biz Twitter campaign deceptive? How should startups use Twitter? - <AUTHOR> http://www.xconomy.com/boston/2009/04/17/bostons-biz-twitter-fit/

<comment><USER2> To quote Heather Champ of Flickr, "i am so done with social media marketers. y'all are peeing in the pool."

<http://twitter.com/hchamp/status/1318999408>

</comment><comment><USER3> Boston's "social media scene" is kinda lame. Too many talkers, not enough builders.

</comment><comment><USER4> Anyone actually going? I'm not normally a fan of these things (and this one is particularly lame) but our startup is in the building...

<comment><USER5> Might I ask what made this one particularly lame. Lame, I understand, but _particularly_ lame? It was a Friday afternoon thing with beer, food, and decent conversation. [disclaimer: I'm a founder @HubSpot, the company that hosted the event]

Also, for the record, @biz did show up for the event.

In any case, don't mean to sound defensive, just trying to learn.

<comment><USER4> Actually, the event itself was fine, and I enjoyed it and the people I met. I didn't like how it felt like a big publicity stunt that the twitter community was being asked to support.</comment></comment></comment>


The Rise of Coffee Shaming - <AUTHOR> https://www.theatlantic.com/health/archive/2019/07/coffee-financial-advice/594244/ <comment><USER3> My biggest issue with coffee culture isn't the amount people spend on it, it's that most coffee drinkers who frequent places like Starbucks don't actually drink coffee - they drink coffee-flavored milk and sugar. So it's not just expensive, it's also quite unhealthy. Ex. a tall caramel frap has twice as many calories as a can of coke.

<comment><USER4> Secretly, that's actually what bothers everyone else, too.

People aren't stupid. Everyone knows that unless you are dirt poor, kicking a ~$100/mo habit in isolation doesn't do much, because personal finance is more complicated than that. Likewise, kicking a coffee habit won't necessarily make you much healthier, especially if you partake in many of the habits people don't generally find terribly detestable that are equally poor, like sucking down a liter of coke each day, overeating nearly every meal, hardly exercising, or drinking booze after work.

But humans are humans, and boy does the smug superiority of telling the entitled millennial that their bank accounts are empty because of the lattes and not the surprise medical bills, crushing student loans, car insurance, high rents, etc. seem to appeal to personal finance gurus.

<comment><USER5> You'd have to have about $50K to perpetually make $100/month risk-free, so if you say $100/month is insignificant, it sounds to me like you're saying a lump sum of $50K is also insignificant.

Also, even if you're going to drink coffee at retail prices, you can have the kind that's under $2 rather than close to $5 (I'm not even aware of where to get that where I live).

<comment><USER4> No, I didn't say a lump sump of $50K is insignificant, nor imply it. In fact a careful reading reveals that I say nothing at all about lump sums of $50K. That is because a lump sum of $50K is a lump sum of $50K and what we are discussing is a recurring expense of around $100/mo. Those are two different values with different units.

You are reading your own comparison backwards to make this point. I'm sure $50K can make you $100/mo in perpetuity. Saving $100/mo does not give you a lump sum of $50K. It gives you $100/mo.

Viewing it another way, At $100/mo, that'll take 42 years and 8 months to save $50K. If we're talking about a higher yield account, let's charitably assume 2.0%, you could probably get it down to around 30 years.

Personal finance and health are both things that need to be viewed holistically. They're lifestyles changes. Having good overall posture is more important than individual decisions, and honestly, making more money trumps basically anything you could ever do to 'hack' your finances. You may as well spend less time hacking your finance and more time growing your career. Or hell, more time working on your health, something that you don't get any second chances to fix later on.

And let's not forget. The conditions that folks were making long-term investments in in the past are not the current conditions. The human race is facing seemingly-unprecedented existential threats and no doubt that is going to affect someone's willingness to make long term investments.

And, you know, even if everything else ends up fine, you could always just get hit by a bus tomorrow. So while you should certainly give a shit about your overall financial and medical health, maybe living in fear of spending $100/mo on something you enjoy isn't the best balance to life, realistically.

I'll just take the fucking coffee.

<comment><USER5> "That is because a lump sum of $50K is a lump sum of $50K and what we are discussing is a recurring expense of around $100/mo. Those are two different values with different units."

If you _feel_ like they are different, that's not something to debate.

But people trade one for the other all day, every day. You mentioned student loans. If you have a loan, you got a lump sum up front in exchange for a series of payments, so why are you saying you'd have to wait 40 years?

</comment></comment></comment></comment></comment><comment><USER6> > That misdirection is useful for people in power, including self-help gurus > who want to sell books. (Orman didn't respond to a request for comment.)

You always see reporters give the "I'm going to report one watmy or the other, dont you want to share your side?" argument when asking for comment, but I cant recall ever seeing such a perfect example of "I told you so!"

Anyway, this article touches on a big problem with boomer <-> millenial relations: the boomers normalized the idea of finance as morality. That is, having money shows you are "worthy" \- hard work WILL give you success, and therefore success means moralvalue, and poverty indicates some failing (laziness, etc).

Millenials are not as well off, so either this pardigm is being applied (and millenials judged as the source of their own problems) or the paradigm itself is being judged (and boomers end up looking hypocritical and smug).

This is the problem with equating morality and finance systems. You cant criticize a financial decision without it also being a moral judgment, which at a minimum makes it much harder to evaluate intelligently. The truth lies in the middle, at some point, along various axis, but because of the moral judgements it is hard to find exactly where.

I'm curious to see how many passing judgement about coffee are comparing to the consumption of beer and cigarettes of their own youth, versus comparing to some platonic ideal of purchasing.

<comment><USER7> I don't think this is a generational or age thing strictly speaking. There are several confounding variables or you could say non-orthogonal axes.

There's a "human nature" axis that interacts with the money axis. People, no matter the age, tend to take credit for their successes a lot more than their failures. For example if you have a lot of money, you'll overstate the hard work that went into it, and understate all the good luck you had. Meanwhile if you have no money, you'll overstate all the bad luck (including blaming the system, and I'm not saying the system doesn't suck) and understate any faults or foibles of yours. To the extent that this becomes your paradigm, you'll also use it to judge other people. So the richer person (who thinks they got rich through hard work) sees a poor person and assumes they're poor because they didn't work hard. And the poor person (who thinks they're poor because of luck), will see someone rich and assume they got rich through luck. (Hopefully it's obvious this paragraph is less a "truth" than a trend or tendency.)

Moving on, there's a political axis that interacts with the money axis. People on the Republican side tend to espouse a belief in self-reliance while the Democratic side talks more about helping each other. (Notice that I say "espouse" and "talk about," cleverly avoiding having to talk about what their policies actually accomplish.)

There's a power axis that quite obviously interacts with the money axis - <USER2> people become rich they use money to get more power, and as they become powerful they use power to get richer.

Finally (and here's where the age correlation comes in), older people tend to be richer because they've had more time to make money. And older people _right now_ I suspect tend to be richer than older people at other times in history, because they reaped the benefits of industrialization and the fossil-fuel boom.

</comment></comment><comment><USER8> When did saying you don't like something become shaming?

Said: "Hey if you are tight on money and you are spending $1200 a year on an optional purchase, you may find it benefits you to not buy that thing"

Response: "what are you saying that I don't deserve to be happy? That I'm not worthy of drinking coffee?"

Thus the outrage machine slowly grudges forward.

I've personally come to associate a high impulse to outrage more closely with low general intelligence and poor emotional stability than any other thing I could judge a person on.

</comment><comment><USER9> Coffee prices in London are absurd. A normal Latte costs on average £3.5 ($4.35 at the current low rate).

I bought a Sage Oracle espresso machine for home which comes at £1300 and order weekly 250g of specialty beans which cost £8. I drink two cups of coffee every single day, which means that I consume on average 730 coffees a year. My wife also drinks at least one coffee a day, which makes a total of 1095 coffees which we drink in a single year.

The coffee machine is super expensive, but has a two year manufacturer's warranty, which means we will get at least two years use of it.

£1300 / (2 x 365) = £1.78 per day

We brew on average 3 coffees a day: £1.78 / 3 = £0.59

A bag of 250g coffee beans lasts us a bit more than one week or roughly 25-30 cups depending on the grind: £8 / 25 = £0.32

In the absolute worst case scenario, if our machine breaks beyond repair after only two years of use, we still end up drinking every day some of the best Central and South American Organic coffee, freshly roasted in the UK and brewed in a top coffee machine to perfection for less than a £1 per cup.

The coffee is better than from any shops I've had in London, is right at my fingertip at home and more healthy due to the special organic beans which we order.

Drinking coffee at home in my garden or at my breakfast table is also a lot more enjoyable than sipping it through an un-recycable paper cup in the rush of the city.

In comparison, if we were to buy £3.5 coffees every day, we'd be spending £2737 more every year.

Long story short: If you are a coffee lover, then buy yourself a fancy expensive espresso machine and go on a two week holiday to Colombia or Peru or somewhere with the monies which you save by not buying some shit overpriced dirty water from Starbucks and the likes.

<comment><USER10> And if spending £1300 up front seems absurd, then a french press and grinder combination can easily be acquired for under $100. It takes more interaction than an espresso machine, but the overall time is comparable to waiting in line behind 2-3 people and getting a coffee.

I'm spoiled with good coffee at work, but I still average 2-3 cups over a weekend, and one of my roommates works from home. I do get coffee out every couple of weeks for the atmosphere.

<comment><USER11> Or as I've heard... Mr Coffee's are coming back into style these days.. aka Automated pour over..

</comment></comment></comment><comment><USER12> I don't think that buying coffee is necessarily a recipe for disaster financially, but if you are strapped for cash and have a $100/month latte habit then I think you should probably address that.

I'm all for spending money on things that bring value to your life, but I think if people cut the latte habit they would see it doesn't provide a ton of benefit. It's more valuable to occasionally enjoy a latte than have one every morning.

<comment><USER13> $100/month is no joke. That's enough to buy a new iPhone X or a Macbook Air every year.

Edit: Obligatory MMM [https://www.mrmoneymustache.com/2011/08/01/a-millionaire- is-...](https://www.mrmoneymustache.com/2011/08/01/a-millionaire-is-made-ten- bucks-at-a-time/)

<comment><USER14> I've always found this line of reasoning funny - "if you don't drink a latte everyday you can save $1800 a year!" but I've always seen it as "for only $1800 a year you can have a latte a day!"

</comment></comment></comment><comment><USER15> Shaming what people spend on coffee smacks of the similar out-of-touch critique that millennials can't buy homes because they spend their money on frivolities like avocado toast. I like the authors concluding point that what this is really about is the constant need for these gurus to be producing content. On the other hand, some coffee shaming isn't all bad since the coffee industry is an unmitigated environmental disaster and individuals should be thinking about the impact of their consumption on more than their wallets: [https://www.salon.com/2018/10/05/our-coffee-addiction-is- des...](https://www.salon.com/2018/10/05/our-coffee-addiction-is-destroying- the-environment_partner/)

</comment><comment><USER11> I bet that as millenials age, they will consume more coffee at home rather then when out and about. I use to like going to Starbucks etc... but now mostly I brew at home which is a function of age and family. Just like I use to go to bars too, but that is a rare occasion these days. The other thing millenials could do would be to hedge their coffee habit.. so buy stock in Starbucks! That way when Starbucks in China takes off or Starbuck in the USA introduces boba you'll catch some of the upside.

</comment><comment><USER16> Well it is low-value, discretionary consumption, not an essential asset or expenditure.

Bring your own coffee cup filled with water, and you'll still fit right in, save the environment, save money and cut caffeine and calories.

I think the best move, IMO, is to cut socially-reinforced patterns of frivolous consumption: dining out, coffee, expensive new gadgets/vehicles, transportation rental services, movies, drinking out. Bring your own or opt- out most of the time.

</comment><comment><USER17> Don't talk to me about finances until I have had my coffee ;)

</comment><comment><USER18> I'm not a millennial, but you can have my coffee when you pry it from my cold, dead hands. And anybody who has an issue with my coffee consumption is (not so) politely invited to go fuck yourself. Your "coffee shaming" means nothing to me.</comment>


AnyGrids – JavaScript tool for visualizing any business data - <AUTHOR> https://anygrids.com/ <comment><USER2> As the page doesn't make the licence immediately clear: this is not Free software.

From the licence text on GitHub [0]:

> 1.1 AnyGrids is provided free of charge and may be used by you for any legal > purpose. Despite no charge for the product, there are a number of conditions > for using this tool.

> 1.2 Your data file should not exceed 1MB.

[0] [https://github.com/AnyGrids/AnyGrids/blob/master/LICENSE.md](https://github.com/AnyGrids/AnyGrids/blob/master/LICENSE.md)

<comment><AUTHOR> Thanks so much for the comment! I removed it (1.2) from the license.

<comment><USER2> That's a step in the right direction, but it's still not Free software. Section 2.3 clearly breaches Freedom 1. [0]

If you're serious about this project and want it to be adopted by Free / Open Source software projects, you should use a standard Free and Open Source software licence like the GPL or the MIT licence. It's a bad idea to roll your own non-standard licence, even if its terms are reasonable, and even if it meets the requirements for qualifying as a Free Software licence and an Open Source licence. [1] [2] [3]

[0] [https://www.gnu.org/philosophy/free- sw.en.html](https://www.gnu.org/philosophy/free-sw.en.html)

[1] [https://ben.balter.com/2016/08/01/why-you-shouldnt-write- you...](https://ben.balter.com/2016/08/01/why-you-shouldnt-write-your-own- open-source-license/)

[2] [https://www.gnu.org/licenses/license- list.html](https://www.gnu.org/licenses/license-list.html)

[3] [https://web.archive.org/web/20110428141712/http://opensource...](https://web.archive.org/web/20110428141712/http://opensource.org/licenses/alphabetical)

</comment></comment></comment><comment><USER3> What benefits does AnyGrids give over existing, feature-rich, table libraries?

Notably (in order of populairty) * Handsontable, handsontable.com * SlickGrid * Clusterize.js * ui-grid , ui-grid.info * DataTables, datatables.net * ng- table, ng-table.com * jqGrid * FancyGrid * BackGrid.js, backgridjs.com * Recline.js * ag-grid, ag-grid.com

<comment><AUTHOR> Thank you for your comment. I will write a review article comparing these libraries and my project.

</comment></comment><comment><AUTHOR> AnyGrids is a free JavaScript grid library with charts integration. It has features: paging, sorting, total row, child rows, integration with charts (custom bar, linear, pie sparklines)

<comment><USER2> I take it you're associated with the project then? What's your role?

<comment><AUTHOR> Yes i'm a developer</comment></comment></comment>


The Emperor's New Music: The high stakes of popular music in ancient China - <AUTHOR> https://www.laphamsquarterly.org/music/emperors-new-music <comment><USER2> So what do our popular melodies say about the mood of the people? Is the music you listen to in your headphones while you write code analogous to the songs of peasants in the field?

<comment><USER3> I don't think it's analogous. While the music you listen to can offer an insight into your mood and state of mind, practically all music we listen to today is composed by artists, and none originates from everyday people. There are no songs from secretaries or bakers or cashiers or programmers lamenting or celebrating life.

In contrast to our popular music that is created by a small number of (often the same) people and distributed commercially (forced on the populace), slave music seems to be analogous to what is described in the article. It originated directly from affected people and helps them to vent, gather hope and strength and let's them dream.

I wonder what future historians will say about our music. In my opinion, popular music is crafted to create superficial desires that can't be fulfilled and lead to more consumption because of feelings of inadequacy.

<comment><USER4> Artists and everyday people are mutually exclusive? I think there's a lot of music created by ordinary people - it's what you might call the "long tail" of the distribution, people who survive on "day jobs" and don't make platinum records but continue to make music. And things like Youtube have made it easier for someone ordinary to reach people with their music.</comment></comment></comment>


Type-checking a Dynamic Language - <AUTHOR> http://journal.stuffwithstuff.com/2010/08/31/type-checking-a-dynamic-language/ <comment><USER2> Lately I've been following an approach that I suppose you could call "strict duck-checking in danger zones." I define a very lightweight "contract checker" and drop it into the beginning of methods that make a lot of assumptions about their arguments. For example, in a ruby app that wants certain keys in the dictionary you give to it:

        class MethodContractException < StandardError
        end

        class Expecter

            def initialize(suspect)
                @suspect = suspect
            end

            def has_all_keys(keys)
                missing_keys = keys.reject { |key| @suspect.has_key? key }

                if !missing_keys.empty?
                    raise MethodContractException, "Method contract violated: "\
                       "#{@suspect.keys.inspect} should contain "\
                       "#{missing_keys.inspect}."
                end

                true
            end

        end

        def expect(suspect)
            Expecter.new(suspect)
        end

        class Widget

            REQUIRED_SPECS = [:splines, :cogs, :thingamabobs]

            def reticulate(dct_spec)
                expect(dct_spec).has_all_keys(REQUIRED_SPECS)

                @dct_spec = dct_spec
                process(dct_spec)
            end

        end

Though, it may be better to encapsulate this kind of contract by creating a WidgetSpec class that demands each spec in the form of arguments to its constructor, and simply checking that the argument supplied to Widget::reticulate() is an instance of WidgetSpec. That is probably one of the few instances where instance checking is sensible; in other situations, using respond_to?() is preferable, because we are only concerned as to whether the object we are given can :quack, not that it is an instance of a Duck.

For everything else, I try to follow Joel Spolsky's advice on making wrong code look wrong: <http://www.joelonsoftware.com/articles/Wrong.html></comment>


NASA to pay more for less cargo delivery to the space station - <AUTHOR> https://arstechnica.com/science/2018/04/nasa-to-pay-more-for-less-cargo-delivery-to-the-space-station/ <comment><USER2> > This suggests the company either under-bid on the first round of supply > contracts or failed to achieve some of the cost savings it had hoped to > achieve.

What a let-down.</comment>


Graphs, Brains, & Gremlin - What Graphs and Brains Have in Common - <AUTHOR> http://markorodriguez.com/2011/07/14/graphs-brains-and-gremlin/

<comment><AUTHOR> This is timely -- the question, "Are Graphs the Primary Data Structure in Nature?" came up on Quora a few days ago ([http://www.quora.com/Are-graphs- the-primary-data-structure-f...](http://www.quora.com/Are-graphs-the-primary- data-structure-found-in-nature)).</comment>


Reverse Engineering Firmware : Linksys WAG120N - <AUTHOR> http://www.devttys0.com/2011/05/reverse-engineering-firmware-linksys-wag120n/ <comment><USER2> I use GOLEM, a disassembler that allowed annotating the resulting source (adding lables and comments) and re-running the disassembler for ever-more- informative disassembly. It was also script-based so it could disassemble any machine code (if you were patient enough to write up all the patterns). It could also recognize complex sequences and produce pseudo-instructions e.g. Loop, TestAndBranch etc.

Anyway, not really related, this article is about detecting linux's signature and identifying the kernel, but it brings back old times.

<comment><USER3> Do you have a link to GOLEM? Google didn't give me anything useful.

<comment><USER2> Internal project at company. I'll see if I can get a copy somehow.

</comment></comment></comment><comment><USER4> Relatedly: is there a good home wireless router on the market today? Hardware & firmware revs have made googling for an answer somewhat difficult: I figure here I'm likely to find a good replacement for my less-than-stellar WRT54G.

<comment><USER5> What is wrong with your WRT54G? I have a WRT54GL with DD-WRT on it and have had no problems.

<comment><USER6> I have purchased no less than five (possibly six) of them over the last eight years. After the third device failure, it ceases to be an anecdote and starts to become a trend. I would guess that the median lifespan of a WRT54G is likely on the order of 18-24 months.

<comment><USER7> Perhaps I was lucky but I have not had these problems. I have a wrt54g v2 from many years ago still chugging along happily. However, as others have mentioned there are modern routers with a sub $100 price that give you much more bang for your buck. Wrt54's were great for their time but I would consider them a bit dated if you are looking to purchase a router today.

</comment></comment></comment></comment><comment><USER8> This is really neat.

I'd be also interested in the reverse: modding the firmware, packing it up and flashing it onto the device.</comment>


Calculating the intersection area of 3 or more circles - <AUTHOR> http://www.benfrederickson.com/calculating-the-intersection-of-3-or-more-circles/ <comment><USER2> Author here. I wrote this post a while back, but never submitted to HN. Its one of those posts that I wasn't sure if it would really resonate with anyone (like my most recent one on venn diagram layout algorithms).

Anyways, If you have any questions ask away =).

<comment><USER3> I notice that when you're trying to calculate whether a point (p) is in a circle (c) you use euclidean distance:

      Math.sqrt((p.x - c.x) ^ 2 + (p.y - c.y) ^ 2) > c.radius

If you're doing this test many, many times (especially as in a Monte Carlo simulation), it'd be more efficient to use distanceSquared:

      (p.x - c.x) ^ 2 + (p.y - c.y) ^ 2 > c.radius ^ 2

Not having to calculate square roots will cut the compute time drastically.

<comment><USER2> good point! I actually used this technique recently, to speed up a numerical optimization for laying out venn diagrams: [http://www.benfrederickson.com/better-venn- diagrams/](http://www.benfrederickson.com/better-venn-diagrams/)

I didn't think of it when I was writing this post though =(

</comment></comment></comment><comment><USER4> there is a lesson here. think about the problem before researching it.

i've seen a lot of terrible algorithms come from people reading papers which provide solutions that are worse than they could come up with themselves. they may even assume that the bad algorithm must have some purpose to its badness... like its being done for a complicated reason they didn't think of.

The truth is that a paper might not even be written for practical implementation, but to tick some academic boxes.

reinventing wheels is bad, but copying bad wheels is considerably worse.

</comment><comment><USER5> I actually appreciate this post, for showing that people other than myself also over-think solutions. When most of my software development work deals with managing code complexity, vs actual algorithmic work, I often feel silly when I spend too long working on a problem with a simple solution. Luckily, analysis and learning is part of the job description!

</comment><comment><USER6> The method used here is quite obvious for a good-at-maths primary school student.

<comment><USER7> Agreed, though only in retrospect for me. When I first saw the problem—before I looked at any of the solutions—I found myself quickly mired down thinking about how to formulate an integral to calculate the area.

The polygon-plus-border-segments method requires no calculus. [http://www.mathopenref.com/segmentarea.html](http://www.mathopenref.com/segmentarea.html)

<comment><USER2> Once I figured out the solution, I was kicking myself for not figuring it our earlier =)

I think I went wrong in 2 ways. My first attempt was to solve using calculus, and though I came up with a solution for the 2 circle case - I totally failed at finding the integral for 3+ circles.

My bigger mistake was to google for papers after I failed initially. I looked for other peoples venn diagram solutions, and found that they were using approximation techniques to calculate. Since the people writing these papers have a much better math pedigree than I do, it made me think I should use an approximation too.

While I did waste a bit of extra time on this, most of the time was spent in writing javascript code. Since the whole point of the venn diagram library in the first place was to learn javascript, I can't really say it was a total waste. Also I used the quad tree estimate to verify the exact solution.

<comment><USER8> In your defense, the quadtree method is more easily generalizeable to general figures :)

But indeed I believe there's a very good generalization of the intersection method (the exact one). If you have a general curve and an algebraic description, you can find the intersections roughly using something akin to the quadtree method and then use something like Newton's method to find the precise intersections. It's root finding essentially (basic numerical analysis), you can find very general and good methods on wiki. And then once you have the intersections, you only have to compute some internal polygons and then calculate some integrals. Again, this integrals can be calculated using standard methods like Runge-Kutta. Altogether this gives a very general method with much faster convergence and lower memory (quadratic convergence versus linear convergence for quadtree, provided your boundary satisfies some not too strict conditions).

</comment></comment></comment></comment><comment><USER9> Great post! Am I the only one whom, when seeing such "simple" problems, thinks "Thank goodness I didn't have to answer this in an interview, on a white board."

</comment><comment><USER10> This is just out of the top of my head so could be wrong but isnt't there a simple analytic solution by using Riemann sums:

Pick any point in the intersection A (can be on border too). Divide the interval from 0 to 2pi into many small chunks of length delta-theta.

1/2 * Sum for n from 0 to 2pi in delta-theta chunks of min(distance from A to each circle in n angle direction)*delta-theta should be the area of intersection.</comment>


The Raspberry Pi 4 launch site runs on a Pi 4 cluster - <AUTHOR> https://arstechnica.com/information-technology/2019/06/the-raspberry-pi-4-launch-site-runs-on-a-pi-4-cluster/ <comment><USER2> Now that is dogfooding</comment>


My Internet Life...Organized - <AUTHOR> http://mdoerneman.posterous.com/my-internet-lifeorganized

<comment><USER2> I like to hear about how others are organizing stuff like this, because parts of my internet life are anything but organized. I've got the 'stuff to check later' links strewn over a dozen places, including a wiki, pastebin, tumblr and a bunch of other sites I don't remember.

I am pretty happy with my 'regularly used sites' organization though. I don't like having that in the cloud, since the cloud can sometimes be not accessible. I just have as my homepage a hand coded, nicely formatted link page with an embedded Google search box. I always have the source for that page open in Notepad++, so it's real quick to add new stuff there. I also have a script which copies it into my Dropbox dir, so I just run that and my changes are available on all my other computers.</comment>


Open sourcing Terratest: tools for testing infrastructure code - <AUTHOR> https://blog.gruntwork.io/open-sourcing-terratest-a-swiss-army-knife-for-testing-infrastructure-code-5d883336fcd5 <comment><USER2> I'm one of the creators of Terratest. Happy to answer questions.

The main question I've seen so far seems to be how Terratest compares with various "spec" tools (e.g., inspec, serverspec). Most of the spec tools focus on checking the properties of a single server or resource. For example, is httpd installed and running? Terratest is largely for end-to-end, acceptance style testing, where you deploy your real infrastructure, in a real environment (e.g., AWS), and test the infrastructure actually works as expected.

For example, let's say you wanted to test a module for running Vault ([https://github.com/hashicorp/terraform-aws- vault](https://github.com/hashicorp/terraform-aws-vault)), which is a distributed secret store. With a spec tool, you might test a single Vault node to check that Vault is installed and the process is running. With Terratest, you'd check that the whole Vault cluster deployed correctly, bootstrapped itself (including auto-discovery of the other nodes), that you can initialize the cluster, unseal it store data, retrieve data, and so on.

</comment><comment><USER3> I use Packer and Terraform extensively for my consulting company. I appreciate the work on trying to make Terraform/Packer testable, but I wish this tool was Golang agnostic and written in HCL or a markup language.

The biggest concern with Terraform is that small changes (ex: changing Terraform variable names) often causes rebuilds of large chunks of resources, which when in production is scary and sometimes cannot be applied without downtime. Point being, not sure testing (expected results) is the core problem. The problem is confidence destroying and editing resources will not produce unexpected downtime (modifying ELB's, RDS, IAM, or security group's) are examples.

</comment><comment><USER4> It's weird to think of infrastructure/deploy automation in terms of "testing". Yes, you are always testing things, but not always in the "func test" sort of way. There's automation testing, and there's testing of automation, and there's tests that are part of automation. Terratest seems to be the second, but it's the third one I think is most useful.

If you build your infrastructure/deploy automation correctly, you should be able to redeploy your full stack all the time, and when it succeeds, throw traffic at it, and if you don't detect any anomalies, make that the new production service. On the detection of anomalies you simply move the traffic back to the previously deployed incarnation (or re-deploy the old incarnation, if necessary). For sufficiently large systems this gets more complicated as you can't just duplicate your resources, but the smaller pieces that have actually changed can be shifted around.

The idea of a "rollback" is really just "return to a previously known good state", but it's misleading. It was previously good _before now_. Now things have changed, and it might not still be good. So just as much as you can test newly deployed changes before you make it the production service, you should probably also test the _previously deployed changes_ to make sure they will work again if pressed back into service. So, regression testing for infrastructure, I guess. (You'd do this if you were building a physical product like a network appliance to make sure your old appliances still work with newer software releases, but we rarely think of software-derived infrastructure this way)

</comment><comment><USER5> How does this compare to severspec [https://serverspec.org](https://serverspec.org) and inspec [https://www.inspec.io](https://www.inspec.io)

Also i would hate to be on a team who is scared to change their code, be it infrastructure or application code!

If you are scared to change your infra code then you probably are not following true infrastructure as code practises.

<comment><USER6> I think the fear of changing infrastructure code is usually not rooted in bad practices, but rather immature tools and practices.

Speaking from experience, it's really hard to get infrastructure as code deployments as bulletproof as application deployments, because you're so dependant on the toolchain, and its interaction with the provider (AWS, Azure, etc).

And in some cases, it's impossible to actually do a clean infrastructure deployment without some manual steps, which leaves you wondering what new changes might need manual steps as well. 'Which problems have I not encountered yet?'

<comment><USER5> I read "scared" as literally "a state of panic".

I'm not sure I agree the dependency on the toolchain & provider, I am always able to read what API does (vendor side) and how it has been implemented (tool side) and make a educated decision. Caveat, I do not use bleeding edge features of any cloud provider and unless engineering requires - I do not use PaaS features of cloud providers - which i find have roughest edges for infra- as-code.

Secondly I think that part of that issue is maybe that the wrong toolchain is being used. eg: Trying to use HCL (hashicorp configuration language - used in Terraform) as if its turning complete. (and i've seen this before)

I've not run into an issue where manual steps are required to cleanly deploy infrastructure which I can not automate away. I can agree on dependency chains, where you may need to run your infrastructure deployment in sequence so that eg your network is up, before you provision instances.

All this being said, I mirror my production environment in staging. So 99% issues are found there.

I think we are mostly on the same page, I just took "scared" more literally than you.

</comment></comment></comment><comment><USER7> The missing piece in all of this is the possibility of a clean rollback. If all infrastructure could be described "as code" and is version controlled in Git or something you could roll back. That doesn't take into account the omnipresent state in databases and so on. I have yet to see a system or environment that doesn't save state in databases or similar systems.

<comment><USER8> Well, we are moving towards more statelessness in infrastructure, meaning the state is only stored in databases and the rest of the infrastructure does not (or should not) contain any state. So you can have immutable servers which you can replace and upgrade/downgrade at will with much less worry about state.

You still need to care about the databases but it is much more confined.

</comment></comment><comment><USER7> also related: Testinfra [https://testinfra.readthedocs.io/en/latest/](https://testinfra.readthedocs.io/en/latest/)

</comment><comment><USER9> How does this tool compare to Test Kitchen [1] generally, and kitchen- terraform [2] specifically?

[1]: [https://kitchen.ci](https://kitchen.ci)

[2]: [https://github.com/newcontext-oss/kitchen- terraform](https://github.com/newcontext-oss/kitchen-terraform)</comment>


A Map of Human History, Hidden in DNA - <AUTHOR> https://www.quantamagazine.org/20170420-map-human-history-hidden-in-dna-john-novembre-interview/ <comment> a-smith Actually and Factually there are blood tests now that can identify each of the many virus's a individual has been subjected to. Of those 40yrs and older Americans, many of those recorded would be those the USA Gov Bioweapons tests across many USA Metro areas would show up as well, confirming yes you were hit and infected by those USA Gov bioweapons tests that went on for nearly 20yrs subjecting all American citizens to various bioweapons sprays, cultures and virus's.</comment>


New York Gov. Cuomo Orders All Nonessential Workers in State to Stay Home - <AUTHOR> https://www.wsj.com/articles/new-york-gov-cuomo-orders-all-nonessential-workers-in-state-to-stay-home-11584718223 <comment><USER2> Comments moved to [https://news.ycombinator.com/item?id=22638558](https://news.ycombinator.com/item?id=22638558), which was posted a bit later but which has a non-paywalled article and possibly a bit more info.

</comment><comment><USER3> It would sure be nice if we remember that convenience store workers, bus drivers, and grocery store clerks are considered "essential". These jobs are commonly paid at or near the minimum wage, but they're out today exposing themselves to the public. Even if they're given hazard pay today (and many probably won't be), when all is said and done they'll be back out there during the next flu season.

At least in New York they'll be earning $15 an hour for it. That's $30,000 a year, if they can get the hours -- and many won't be given 40 hours per week in order to avoid having to give them health care insurance. How many of these people will end up becoming sick, and then have to pay for any care they get out of that $30k?

I'm skeptical that anybody will in fact remember this. People will go back to trying to push the stock market higher and fight minimum wage increases to ensure higher profits. But I hope somebody starts printing up "Essential" buttons to hand out to these workers -- and then wear them on the job for the future so that people remember.

</comment><comment><USER4> Our national priority needs to be on testing for people who have developed an immunity:

[https://twitter.com/NAChristakis/status/1240689935557865472](https://twitter.com/NAChristakis/status/1240689935557865472)

Who can then go on and socialise and operate the economy as usual.

We need to take advantage of the fact that this virus is so mild for the vast majority of the working-age population.

Combine that with isolation of the elderly, and we could reopen the schools, at least for the youngest children, so that more people can go to work.

Alternative (and yes this is a bit tongue-in-cheek) transfer the entire elderly population of the USA to Florida, and completely isolate the state. Flood it with ventilators and healthcare professionals. Let the rest of the country operate as usual and treat the unlucky few who need hospitalisation.

We need some big, bold, active national measures instead of just taking the easy road of printing money for banks and forcing all businesses into closure and all workers into home unemployment.</comment>


Confession booth: what your bikini waxer is really thinking - <AUTHOR> https://www.bbc.co.uk/bbcthree/article/2b2f79e8-c253-4d1b-9a87-44fe460e5b16 <comment><USER2> "I've had to cultivate a tougher skin" \- love that bit.

<comment><AUTHOR> Yes, an interesting choice of words in the context of the article. However, it's pretty amazing how humans can adapt and learn to find a way to take any situation and turn it into some sort of normality. bikini waxing being one...</comment></comment>


Java's Mysterious Interrupt - <AUTHOR> https://carlmastrangelo.com/blog/javas-mysterious-interrupt <comment><USER2> For an embarrassing amount of time, I didn't even realize Java interrupt() could only interrupt blocking operations. I guess I thought they were like hardware interrupts, capable of just showing up anywhere without the program's cooperation.

<comment><USER3> Way back in the day this used to exist in Thread.stop(), which would kill threads in a hilariously indiscriminate manner. Long since deprecated: [https://docs.oracle.com/javase/8/docs/technotes/guides/concu...](https://docs.oracle.com/javase/8/docs/technotes/guides/concurrency/threadPrimitiveDeprecation.html)

<comment><USER4> It's strange to deprecate something when you still can get exactly the same behavior by grabbing the thread's PID and then shelling out with a `kill -9`.

<comment><USER5> How do you get a thread's PID in Java/on the JVM?

Regardless, the deprecation serves as prominent warning that the programmer is about to shoot themselves in the foot.

(I'm actually more surprised that stop() hasn't been removed after all this time.)

<comment><USER6> There are narrow and unsafe uses of the no-arg Thread.stop() overload so it remains in the platform, although deprecated. There is an overload Thread.stop(Throwable) that is deprecated "for removal". It's been a no-op for several releases and the API will eventually be removed entirely.

</comment></comment></comment></comment></comment><comment><USER7> It's more like thread cancellation than an interrupt.

Few languages do cancellation well. Either it doesn't work right, or it does something overly elaborate like LISP breaks.

<comment><USER8> I actually like the way it is (or can be) done in Haskell: since polling an "interrupted" status would be a side effect, instead they turn the problem on its head: you can throw an _async_ exception _to_ the task you want to interrupt, given its ID, and it behaves essentially as if the code it was just executing has thrown a synchronous exception.

Sounds spooky, and it does require writing code in an exception-safe way, but that's generally easy: pure code is largely exception-safe by nature, and impure code can use "bracket" ("finally", "mask", "ResourceT", &c.) to acquire & release resources—and should already be using these functions anyway to handle regular synchronous exceptions. Async exceptions are _very_ useful for killing a task that's using too much time/memory, or initiating a graceful shutdown.

</comment></comment><comment><USER9> Making InterruptedException a _checked_ exception was a _mind-boggling_ stupid design mistake that should have been immediately corrected but unfortunately never was. I always wince when writing scalable, long-running concurrent Java code. You need to interrupt and handle interrupts when tasks are hung, but you then need either litter up all your Java interfaces or do lots of exception detection juggling.

<comment><USER10> Well, nowadays all checked exceptions are considered to be a mistake.

<comment><USER11> It's explicit and encourages the consumer to handle errors correctly. The negatives seem to be cosmentic arguments.

<comment><USER12> Forcing the programmer to add handlers for exceptions he may not even want to handle (sometimes it's okay to pass it up the call stack) just creates a mess in the source code. It's fine as a suppressible compiler warning, but not as a compiler error.

<comment><USER13> Well, in modern languages, the same concepts are all coming back.

Go has its product types for errors, and Rust uses sum types.

As result you end up with basically the same code as with exceptions, just even more verbose.

</comment></comment></comment></comment></comment><comment><USER14> As another surprising thing, calling interrupted() actually clears the interrupted bit. If it's true, you pretty much have to throw InterruptedException. Otherwise, you have to re set the bit, and exit quietly.

<comment><USER15> > calling isInterrupted() actually clears the interrupted bit.

Thats incorrect. Calling Thread#interrupted[0] clears the interrupt status and returns true if the current thread was interrupted. Thread#isInterrupted()[1] only returns the value of the interrupt status on the thread receiving the method call. The interrupt status is unaffected by that method call.

[0] [https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.h...](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#interrupted--)

[1] [https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.h...](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#isInterrupted--)

<comment><USER14> You are right, editted.

<comment><USER16> As the article itself says, you're unlikely to write correct code if you use these language features. :)</comment></comment></comment></comment>


Ask HN: Who are your favorite video tutorial creators? - <AUTHOR> <comment><AUTHOR> By this question I mean tutorials that are so well made that you'll watch them even if you don't immediately need the information.

Personally I'm willing to watch almost any video created by Sebastian Lague (especially his coding adventures) and to some degree the Blender Guru channel as well.

</comment><comment><USER2> Ben Eater makes fantastic electronics videos on YouTube.</comment>


What's Really In Vaccines? - <AUTHOR> http://www.foodmatters.tv/articles-1/whats-really-in-vaccines

<comment><USER2> What a load of rubbish.

Like most ignorant ant-vaccine pieces it fails to list any reputable sources for its information; And I use the word information very loosely here.

Why does it not list any? Because you will be hard pressed to find a quality peer-reviewed report that doesn't contradict the picture this site has painted.

This post needs to be deleted with extreme prejudice as it's misleading and serves no real purpose other than to misinform the ignorant.

<comment><USER3> I thought your comment was too aggressive. I like to have a nice civilized discussion here in HN. Then I RTFA and now I have to agree with you. Flagged.

Just a token paragraph:

> _Antibiotics - Chemicals that promote superbugs, which are deadly > antibiotic-resistant strains of bacteria that are killing tens of thousands > of Americans every year._</comment></comment>


Human Echolocation Allows People to See Without Using Their Eyes (2013) - <AUTHOR> http://www.smithsonianmag.com/science-nature/how-human-echolocation-allows-people-to-see-without-using-their-eyes-1916013/?no-ist <comment><USER2> Saw Daniel Kish give a lecture a few months ago, and this amazing ability is a lot more accessible than it sounds. Kish uses both passive and active sonar (based on dental clicks), but the passive sonar is a lot easier to wrap your head around. Even for people with sight, the difference between a large, echo-y room and a small room is immediately apparent. The differences between a voice spoken in front of a hard table and a soft pillow are also very distinct. And if you make an even tone in front of a wall and in front of a corner, the differences are quite apparent as well. Apparently corners are so acoustically distinct that you can hear them from quite a distance away.

It's not a foolproof method; he uses a cane because it's difficult to hear objects below knee level. But he thinks many more people can learn to "hear the walls" (if we don't ridicule people for it).</comment>


Possible commercial opportunities to offer services in VR/AR – per roleplayer - <AUTHOR> http://www.immersiveauthority.com/immersive-technology-role-players-services-offered-target-market/

<comment><AUTHOR> Hi. I'd like to get in on the VR / AR bandwagon and I'm looking at where I could fit in on the value chain. Potentially from a consultancy perspective...

I've started drawing up list of what services I think each role player in the ecosystem can offer to specific target segments</comment>