Squatter doesn't sit well with Airbnb host - <AUTHOR> http://www.sfgate.com/realestate/article/Squatters-don-t-sit-well-with-Airbnb-hosts-5631952.php <comment><USER2> I wrote about this exact situation and the legality's regarding it in 2012.

[http://harknesslabs.com/post/32179239260/gaming-airbnb-in- sa...](http://harknesslabs.com/post/32179239260/gaming-airbnb-in-san- francisco-courtesy-of-rent-control)

The gist of it, is that San Francisco and California's rental and rent control laws will supersede any private contract you can write. No way around it. If there was a way around it, you can bet that landlords would simply be including clauses in all new leases they say "rent control not valid here".

What I wrote in the above article amazingly still stands today. You can even find a 1bedroom in Nob Hill for a affordable 2200 a month! [https://www.airbnb.com/rooms/1605304](https://www.airbnb.com/rooms/1605304)?

There is so much education AirBnB should be doing for their hosts in CA and SF especially.

Did you know that if someone rents a airbnb listing in SF for more than 30 days, they can stay there _forever_ , so long as they keep paying rent? Yeah, no mention of that when you create a new listing on the site.

<comment><USER3> Well not exactly. If the AirBNB host is a tenant themselves, then the subtenant relationship will end when the AirBNB host vacates the property.

Not all SF landlords are opposed to their tenants rerenting the units on AirBNB. Some even deliberately rent for minimums of 30 days, to avoid running into zoning regulations against short term stays. AirBNB promised to start collecting hotel taxes in SF, but such taxes wouldn't apply in this case either.

<comment><USER2> That is not entirely accurate. If you were renting a room in a apartment (you being the master tenant) and you still resided in the apartment in another bedroom AND also showed/informed the new tenant a copy of San Francisco Rules & Regulations 6.15C- then yes, you could evict them.

Otherwise, you cant- and the tenant takes over the defacto 'lease' from you.

Costa Hawkins (which I believe you are referring to) is a landlord/owner option. You as a tenant cannot initiate it and would be shit out of luck. You might be able to get your landlord to initiate the lawsuit for you, but I doubt they want to come out of pocket on legal expenses on your behalf.

</comment></comment></comment><comment><USER4> I found a message board thread in which the Airbnb host this article is written about describes the issue and asks for advice.

[http://www.biggerpockets.com/forums/52/topics/136498-evictin...](http://www.biggerpockets.com/forums/52/topics/136498-evicting- renter-from-a-vacation-rental-property)

<comment> re-anon I'm in real estate and was able to locate the owner's condo. It's part of a HOA. The HOA's CCRs forbids leases for "transient or hotel purposes." The typical meaning of this is leases of under 30 days. The CCRs also require that permitted leases be in writing.

The sfgate article says that the owner was renting this out for $450/week to help cover her mortgage and expenses so it is probable that some of her activity was in violation of the CCRs. It also sounds like she didn't actually have a written lease with the squatter tenant who booked a 44 day reservation and therefore has tenants rights.

I am not a fan of AirBNB but AirBNB doesn't deserve blame for this. This owner thought it would be cool to become a real estate investor and she didn't know what she was doing. Now shes paying the price...

<comment><USER5> Sometimes, I think the "friendly" community of AirBnB needs to be a bit more business when dealing with squatter scumbags.

Once AirBnB couldn't collect the money, the rental should have been terminated and the host should have immediately call the cops to vacate the property well before the 30 days was up. I'm not sure why they tried to work out something with the renter. Maybe they tried to be "nice" but if some situation starts to smell fishy, handle it quickly.

<comment> re-anon You don't get it. The squatter has been in the home for 30 days. On that 30th day he has tenants rights and the owner has to go through the process. If the owner knew what she was doing or hired somebody competent to manage her property she wouldn't be in this situation. AirBNB isn't a property manager. If you don't know what you're doing you shouldn't be renting out your home as a business.

</comment></comment></comment></comment><comment><USER6> This seems to be as much a problem with eviction laws as with Airbnb.

In Ohio, the eviction process isn't exactly landlord friendly, but it doesn't require a lawyer either. And in most cases, deadbeat tenants aren't going to show up at the court date anyhow - then it's trivial to get a ruling in your favor. You'll lose out on 60-90 days of rent, but if that bankrupts you, your margins are too tight.

And Airbnb has, by far, returned me the highest margins I've ever gotten, so it's certainly worth the risk of squatters.

<comment><USER7> In San Antonio, TX I was surprised to find the shotgun-wielding landlady telling me to get out before midnight exactly the day before my rent was due... turns out she wanted to kick out a delinquent tenant in the unit with the same letter but one civic number over, but I can't blame her for taking direct action. Scared the piss out of me though! At least I got a free month out of it.

<comment><USER8> Probably was an illegal eviction however, one that she could have received criminal charges for.

<comment><USER7> Maybe (I don't know what TX law looks like) but that's not a lot of comfort once you've been shot.

</comment></comment></comment></comment><comment><USER9> I'm baffled at how people rent out houses without doing the research first.

I bet that if you asked to rent their _car_ , they'd go check it out first. Call their insurance company, find out what the legal requirements are, etc.

Yet do the same thing with an item that costs 10, 20, 30 times as much money and people's approach seems to be, hey, free money, woooooo.

Maybe it's just a case of only hearing about the rare fools.

<comment><USER10> It's because AirBNB makes becoming a landlord point-and-click simple. "It's so popular and easy! It's a big website, it must be legal!"

The moment an AirBNB site for cars comes along, you'll see it.

<comment><USER11> > The moment an AirBNB site for cars comes along, you'll see it.

[https://relayrides.com/](https://relayrides.com/)

<comment><USER12> It came along... 14 years ago when Zipcar was founded.

<comment><USER9> Not remotely similar. Zipcar owns and maintains the cars they rent.

</comment></comment></comment></comment></comment><comment><USER13> Title (article's own) makes it sound like this is some sort of trend. But unless I missed something, this is just one unfortunate host's struggles with a jerk tenant.

<comment><USER14> In that case maybe we'll change the title to use the singular instead of the plural.

<comment><USER15> I like the new title better, thanks.

</comment></comment></comment><comment><USER16> The historical solution to this (illegal tenant in an illegal short-term sublet doesn't want to move out) would be to have some vowel-suffixed friends encourage them to move out. Which isn't exactly "nice", but at least has the virtue of being nicely economically efficient.

<comment><USER17> I was thinking something similar, the AirBnb host however doesn't think of themselves as doing anything illegal so they constrain their thinking in that way. I have certainly met people over the years who exploit this in others.

</comment></comment><comment><USER18> This isn't really Airbnb's problem, though I imagine they could do a better job of showing what lengths of stay would make tenant rights' laws or other legal complications kick in.

</comment><comment><USER19> So...help me out here. The host met a stranger and rented out the apartment (even after herself seeing warning signs) in such a way that her renter has renter's rights under California law?

I'm relatively young and have never been a landlord: in the pre-Internet days, did landlords _not_ rent to people they didn't know well? Did they not have to comply to certain state laws? If we switched "Airbnb" with "Craigslist" or "San Francisco Chronicle's Classifieds Section"...would this be a story in the SF Chronicle?

<comment><USER20> Yep, media usually hypes these delinquent tenant stories though they are probably rare. Lot's of "Freeman-on-the-land" stories of squatters refusing to pay rent for 1-3 mos and landlord's can't evict them. Every story they interview some shady property management corp who insists all renter laws must be weakened.

A story the media hasn't done yet is how often traveling sex workers use Airbnb for incall. 2-3 workers will travel to different cities together and then use the apartment to turn tricks. Perfect incall solution instead of using hotels which charge extra for guests or clamp down on visitors. I'm sure there's a small minority of tenants using Airbnb to import narcotics or fraud hardware like ATM skimmers too, can always claim the previous tenant ordered the box full of drugs and you had no knowledge.

<comment><USER21> Airbnb as an address to get illegal things shipped and dropped off sounds just too easy. So easy to deny responsibility. Even just for using a courier service.

</comment></comment></comment><comment><USER22> I have very little sympathy for Airbnb landlords: they want to make a quick buck without following the laws to run a real hotel, then they don't get the legal protections of hotels.

<comment><USER23> When honest people fall victim to scam artists, I do sympathize even if they could have avoided it with better legal knowledge.

</comment></comment><comment><USER24> Sounds like the guy might be using the host's electricity to do bitcoin mining.

Super scammy. This kind of thing should be criminal.

<comment><USER25> If the tenant is supposedly blasting the aircon, with the windows open in 114 degree heat ... I'm not sure an alternate explanation is needed. (Not to mention, bitcoin mining requires a lot more than cheap-to-free electricity)

</comment></comment><comment><USER26> Do hotels have different eviction laws?

<comment><USER27> yes.

This is why many chains have separate long-term stay places and hotels. Most hotels will not let you stay long enough to be a "tenant".

</comment></comment><comment><USER28> I remember reading a story in the recent Priceonomics book about a similar tenant conflict in SF. Tl;dr, a 75-yr-old lady was thrown out into the cold, but only after months of hearings and lots of money wasted on lawyers. Why do such laws exist at all in CA? Why not just send out several warnings in advance, explaining whole situation and the available options for tenant?

These two guys are just asking for a good old ass whooping. Throw them out, then let them try and prove that they were renting the place to begin with. Whatever the premises, you could certainly make it be your words against theirs.

</comment><comment><USER29> AirBnB could just suggest to people to only rent a unit for 29 days, find another AirBnB property for 2-3 days to "break the streak" and the have the person in question return to the unit for another 29-day streak. I would imagine that all you really need to do is break the the contractual relationship into 29-day chunks with a provable different contractual relationship (another AirBnB host) for the interim between sub one month stays.

</comment><comment><USER30> Could someone explain why he is still considered a tenant even though he pays no rent or utilities at the property? I am curious as to why he can't just be considered a trespasser and removed by police.

<comment><USER31> After you are allowed to stay in a home more than 30 days you become a "tenant" and are subject to renter protection laws. I'd imagine these short term rental companies will get much stricter about 30+ stays real soon now.

<comment><USER32> Does this apply even to people I would allow to stay in my home for free? Or does this only kick in when money changes hands?

<comment><USER33> Yep, even free.

</comment></comment></comment></comment><comment><USER34> This highlights how staff who handle emails or calls needs to be part of the business plan of a b-to-c startup. Or at least an explanation of why it's OK to NOT handle customer contacts.

</comment><comment><USER35> Why can't she so 3 day pay or quit (plus eviction) and/or give 30 day notice for chronically late payments?

</comment><comment><USER36> First thought was a meth lab or grow house.

</comment><comment><USER37> obligatory educational material - [http://www.imdb.com/title/tt0100318/](http://www.imdb.com/title/tt0100318/)

</comment><comment><USER38> That first sentence is so poorly written.

</comment><comment><USER39> Similar situation with a nanny refusing to leave.

[http://time.com/2941176/nightmare-nanny- leaving/](http://time.com/2941176/nightmare-nanny-leaving/)

Like any business decision you do need to risk manage it. Extremes like this are rare, which is why it's in the news but you do need to be aware of what you're investing in and the risks involved.</comment>


Mick Jagger responds to Keith Richards: a short history of the Rolling Stones - <AUTHOR> http://www.slate.com/id/2273611/pagenum/all/

<comment><USER2> Slate.com's Mick Jagger 'response' to Keith Richards' memoir is a joke

[http://www.examiner.com/rolling-stones-in-national/slate- com...](http://www.examiner.com/rolling-stones-in-national/slate-com-s-mick- jagger-response-to-keith-richards-memoir-is-a-joke)</comment>


Sunfire, Audi en route to synthetic fuel of future - <AUTHOR> http://phys.org/news/2015-04-sunfire-audi-en-route-synthetic.html <comment><USER2> Audi has got to do something for it's brand image

Yesterday there was a bright yellow car stalled out in the middle of the highway and sure enough it was an Audi.

I see plenty of Cadillacs and Beemers stuck on the side of the road, but it is not so often to see cars dead on the middle of the road.</comment>


For sale: Trusted root SSL CA signing certificate - <AUTHOR> https://www.globalsign.com/certificate-authority-root-signing/

<comment><USER2> They aren't MITM certificates, they are cross-signs for enterprise deployments. If you run a large enterprise you might have lots of foo.corp.example.com and bar.corp.example.com hosts. A cross-sign would allow you to issue certs for these names that would be trusted by default.

It may also give you the power to issue certificates for any name or, hopefully, it will be name constrained([1]). That's up to the CA however. The CA is taking on responsibility for all certificates issued under these cross- signs when they do this. Mozilla is currently in the process of requiring that these enterprise certificates either be name constrained, or be audited at the same level as roots.

I think Symantec will sell you much the same thing: <http://www.trustico.com/material/DS_GeoRoot_0205.pdf>

This is one of the reasons that we are pushing Certificate Transparency: <http://www.imperialviolet.org/2012/11/06/certtrans.html>

[1] X.509 Name Constraints allow an intermediate or root, CA certificate to be limited to issuing certificates within a certain scope, i.e. a domain. <https://tools.ietf.org/html/rfc5280#section-188.8.131.52>

<comment><AUTHOR> But if they give you the power to issue certificates for any name, how are they not "MITM certificates"?

Also, other people in this thread have commented that the 220.127.116.11 name constrained thing isn't really implemented anywhere?

<comment><USER2> "MITM certificates" are those used for the purpose of intercepting secure traffic. Many organisations have the certificates to do that, but are under audits, and technical and legal constraints not to.

That's very different from, say, TrustWave, who issued such a certificate with full knowledge of what it would be used for.

I agree that this isn't the best of situations. Certificate Transparency is the best answer that we have, but it's going to take a while to deploy.

<comment><USER3> I think it would be more accurate to say a "MITM certificate" is any private key with the _ability_ to impersonate server and intercept SSL/TLS traffic.

There's a huge difference in security between a cryptographic-strength guarantee enforced by reliable technical mechanisms and the security provided by a civil law contract enforced by an audit regime. Also, note that the world's true Relying Parties (i.e., every web user and server operator who could potentially be MITM'd by this private key) are usually not formally acknowledged as parties to these contracts and as such have no say in their creation or even knowledge of their existence.

<comment><USER2> It's a question of terminology, but when groups like Chrome Security, Mozilla etc talk about MITM certificates and that they are forbidden, we mean those that are used for intercepting traffic.

<comment><USER3> I think this is a case where the precise terminology is critical.

The only way to know how a certificate may or may not "be used" is by looking at how the source code of all client applications to see how they will interpret it.

How many of the cases of trusted-root chained MITM seen in the wild (Iran, Turkey) were prevented by the business agreements making MITM "forbidden"?

</comment></comment></comment></comment></comment></comment><comment><USER4> _Since this comment is pegged to the top of the thread and is strictly inferior to the 'agl comment below it, I think you should downvote this one and upvote his._

I feel like I have to be misunderstanding something about this page and the attached data sheet, because it seems to be promoting a service that directly contravenes Mozilla's policies: you're not allowed to use CA=YES certificates to enable enterprise MITM tools.

Furthermore, minting certificates for a large and growing number of popular web properties --- which is something you end up doing almost immediately when you set up enterprise web proxies --- is a good way to get noticed by Google's SSL/TLS team and shitcanned from Chrome. That's a consequence of Google's certificate pinning regime, which operates incidentally as a kind of surveillance network for certificate forgery.

<comment><USER5> I think you are misunderstanding.

First off so there is no ambiguity let me say clearly that GlobalSign's policies do not allow the use of certificates that chain to our roots to be used for MiTM purposes (or other malicious use cases for that matter).

That said there are lots of reasons why a company might want or need to operate their own in house PKI and have that PKI trusted; one easy to understand case is google; though they are not our customer they operate their own in house PKI that they use to issue the many many SSL certificates their infrastructure utilizes: [https://sslcheck.x509labs.com/en_US/sslcheck?host=www.google...](https://sslcheck.x509labs.com/en_US/sslcheck?host=www.google.com#188.8.131.52-cert)

But SSL is not the only reason one might want to operate their own internal PKI that is trusted, other cases include business to consumer and business to business communication (for example S/MIME).

As for how we (and other CAs) go about ensuring trusted root deployments are not used for MiTM cases, there is the obvious contractual obligations that are accompanied by audits but we also were the first publicly trusted CA to use Name Constraints to deploy qualified subordination to these deployments (which has become a requirement now – it was not when we started).

This approach technically limits what domains these enterprise trusted root customers are trusted by mainstream clients for - see: <http://unmitigatedrisk.com/?p=24>

There are also a set of "Trusted Root" customers who are in the process of becoming trusted by browsers (which can take 3-5 years) where we will cross- certify their root enabling them to be trusted while their own key material becomes ubiquitously trusted.

I should also add that Mozila's root inclusion policy (as well as Microsoft's and the other root programs) allow for these scenarios.

I hope this helps clarify, please let me now if you have any questions.

Ryan Hurst CTO, GlobalSign email@example.com

<comment><USER4> Hey, Ryan. Thanks for clarifying. I only have one followup question.

Do any of your offerings provide customers with custody of an X.509 certificate that chains to a GlobalSign certificate that is trusted by any of IE, Mozilla, Chrome, or Safari where that X.509 certificate has CA:TRUE in its Basic Constraints?

By "custody" I mean that the private key corresponding to that certificate is held in some fashion on customer premises, regardless of the technical controls implemented in the device in which it's held.

<comment><USER5> They do and that's is specifically what this offering is about.

However our policies have always been that those entities need to meet the same requirements (operationally, etc) as we do which includes not participating MiTMs with any key material associated with that PKI.

Those customers who do have such CAs are also (normally) subject contractual restrictions to what namespaces they can issue against and they are always subject to audits where we confirm their usage is consistent with those policies.

In the very rare cases where that is not the case they are audited to meet the exact requirements we meet - we almost never do this.

It's a difficult problem as a whole, there are legitimate use cases that help secure the web and enable commerce that are best served by having publicly trusted certificates our goal as an industry is to find ways to address those needs while reducing the risk.

To that end when I joined GlobalSign a year ago (from Microsoft) one of the first things I did was started here to advocate the industries use of name constraints as a means to reduce risk for all parties involved in these scenarios.

Ryan

<comment><USER4> Thanks. I'm sorry, I knew MITM wasn't the only or most common reason enterprises wanted these certs, but wrote lazily.

Are the nameConstraints extensions on these certs marked critical? I didn't know they could even be non-critical (one RFC says they can't) but 'agl says otherwise and would know.

<comment><USER5> That's the position we start with when we engage with a customer but its dependent on the community in which they are going to communicate with. To be honest in most cases today (due to Safari) criticality is not enabled on most deployments.

<comment><USER6> As far as I'm concerned, that is in fact a MITM cert. Because you can technically MITM.

When it comes to crypto and the level of trust that the entire world puts into this, this is the only definition of "MITM cert" that matters.

<comment><USER4> You can only MITM Safari & Opera with that cert, FWIW.

<comment><USER6> You seem to think that SSL is only for browsers.

<comment><USER4> I think that to a first approximation CA trust only matters for browsers, because non-browser applications have a whole panoply of other mechanisms that they should already be using to ensure the authenticity of SSL certificates. To put it differently: people running non-browser applications tend to have more control of their destiny.

It's interesting that we bring this up, because it makes me now think that maybe the best way to jumpstart TACK is to implement it as a library that IOS programs can use.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> [https://wiki.mozilla.org/CA:Problematic_Practices#Allowing_e...](https://wiki.mozilla.org/CA:Problematic_Practices#Allowing_external_entities_to_operate_subordinate_CAs)

And from <https://wiki.mozilla.org/CA:SubordinateCA_checklist>

"Third-party private (or enterprise) subordinate CAs: This is the case where a commercial CA has enterprise customers who want to operate their own CAs for internal purposes, e.g., to issue SSL server certificates to systems running intranet applications, to issue individual SSL client certificates for employees or contractors for use in authenticating to such applications, to issue SSL certificates for pre-approved domains that are owned/controlled by the customer, and so on.

These sub-CAs are not functioning as public CAs.

For these sub-CAs we need assurance that they are not going to start functioning as public CAs. Currently the only assurances available for this case it to ensure that these third parties are required to follow practices that satisfy the Mozilla CA Certificate Policy, and that these third parties are under an acceptable audit regime.

In Bug #394919 NSS is being updated to apply dNSName constraints to the CN, in addition to the SANs.

We plan to update our policy to require CAs to constrain third-party private (or enterprise) subordinate CAs so they can only issue certificates within a specified domain. See section 126.96.36.199 of RFC 5280."

</comment><comment><USER8> A-m-a-z-i-n-g and they dare not even suggest that what they are doing may break each and every "normal" chain of trust.

Astonished, you would hope this would be sent in covert emails or just suggested to chiefs etc. but man ON THE INTERNET!

Look: we sell these FBI badges for use in your business whenever there are some policy issues... your personnel will trust the wearer!

<comment><USER8> Wrong: see above. Nowadays it would work only against Safari and another browser.

Sorry.

</comment></comment><comment><AUTHOR> Can someone explain to me why these guys are still allowed to be present in, for example, the OS X trusted key store?

<comment><USER9> If you feel uncomfortable about this trust decision made for you by OS X, I would suggest taking a peek at the entire set of trusted root certificates in /System/Library/Keychains/ (note that Keychain Viewer hides one of them from view by default, so run:

        open /System/Library/Keychains/*

from a shell).

I don't run OS X anymore, but I was not happy with what I saw at the time.

<comment><USER10> I wish there was a tool for auditing root certificates. Like point out which certs are owned by governments, reputation of companies, etc.

<comment><USER4> The problem with that idea is that the CA root store on your computer is a tiny subset of all the CA=YES certificates out there, because of intermediate chained CA certificates.

So what you really need is something that watches every CA cert your browser ever sees and then does detective work on them. Which is sort of what Moxie Marlinspike's Convergence project was doing.

</comment></comment></comment></comment><comment><USER11> Just to make sure I'm not confused. I can purchase a root certificate from this company? And this certificate will be seen as valid by the major browsers?

<comment><USER8> If I am not mistaken, that is exactly what they are claiming (albeit stressing that they are issued to be used for subdomains) but others have pointed out that that limitation is unenforceable (i.e. inexistent).

<comment><USER4> I'm one of those people and it looks like I am, for the most part, wrong about that.

<comment><USER8> Wow thanks for taking the trouble to answer: I guess I got it wrong. Somehow I would like to be able to unpost some comments.

</comment></comment></comment></comment><comment><USER12> Is this against some sort of rule? They're allowing their clients to run their own delegate CAs, this can be very convenient for sysadmins. I'm not sure what's bad about it, or what new attacks it enables.

<comment><AUTHOR> Unless I'm completely mistaken, running a delegate CA means you can MITM any SSL site on the internet.

<comment><USER12> Oh. That makes sense, thanks. Is there no way to restrict a CA cert to only be able to sign certs under a particular domain name/CN?

<comment><AUTHOR> Not that I know of (and tptacek seems to confirm the same elsewhere in this thread)

<comment><USER4> He confirmed it wrongly.

</comment></comment></comment></comment></comment><comment><USER10> This seems like the fastest way to become untrusted by every browser.

</comment><comment><USER3> Since nobody's mentioned this yet, I thought I'd bring this up:

Code signing.

<comment><USER5> Code signing is another beast all together, in 5280 (and its predecessors).

EKU is used to restrict what certificates are good for, this bug explains a behavior the majority of code signing delegation is dependent on - <https://bugzilla.mozilla.org/show_bug.cgi?id=321156>

Basically a parent ca can say, I trust you for S/MIME certificates but not for SSL or code signing -- this is a common scenario.

Additionally root programs do not delegate code signing to all roots.

Basically the ability to do code signing is rarely delegated to a root and doing so to subordinate CA outside the CAs control should be even rarer.</comment></comment>


DNC calls FBI after detecting attempt to hack its voter database - <AUTHOR> https://www.cnn.com/2018/08/22/politics/democratic-national-committee-voter-database/index.html <comment><USER2> "Update: The Democratic National Committee said late Wednesday that what it had earlier feared was the beginning of a sophisticated attempt to hack into its voter database, was, in fact, an unauthorized 'simulated phishing test.'"</comment>


First Draft of 300-Page Princeton Bitcoin Textbook [pdf] - <AUTHOR> https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf <comment><USER2> Arvind is one of my favorite profs. I look forward to reading it.

</comment><comment><USER3> Boo. No mention of the [lightning network](lightning.network).

</comment><comment><USER4> Wow. Is it really that hard to add in a table of contents?</comment>


The Power of Prolog - <AUTHOR> https://metalevel.at/prolog <comment><USER2> Thank you very much for the publicity, I greatly appreciate it!

This book has been discussed on HN about one year ago:

[https://news.ycombinator.com/item?id=14045987](https://news.ycombinator.com/item?id=14045987)

Since then, I have added the following _new_ chapters:

Prolog Business Cases: [https://www.metalevel.at/prolog/business](https://www.metalevel.at/prolog/business)

Sorting and Searching: [https://www.metalevel.at/prolog/sorting](https://www.metalevel.at/prolog/sorting)

Cryptography with Prolog: [https://www.metalevel.at/prolog/cryptography](https://www.metalevel.at/prolog/cryptography)

Engineering Aspects: [https://www.metalevel.at/prolog/engineering](https://www.metalevel.at/prolog/engineering)

Artificial Intelligence with Prolog: [https://www.metalevel.at/prolog/ai](https://www.metalevel.at/prolog/ai)

I have also made many improvements and additions to the other chapters.

Also, I have made almost everything available in a public git repository so that you can track the book's progress and view it offline:

[https://github.com/triska/the-power-of-prolog](https://github.com/triska/the- power-of-prolog)

It is my sincere hope that you find this material useful, and I welcome all suggestions and comments.

Also, thank you very much to all readers for the extremely constructive feedback that I have received in the past year. Your comments have made this work especially worthwhile.

Enjoy!

<comment><USER3> I've shared this with anyone who will let me divert the conversation to Prolog. At work we have the Haskell folks, the Lispers who move everything towards Lisp, and I'm the one who moves every conversion towards Prolog, then I send the link to this. :-D

<comment><USER4> The older Lisp folks often have a Prolog integrated in their system...

<comment><USER5> Actual Prolog. Allegro ships a fully integrated Prolog as part of their product.

<comment><USER6> Now that you say that i think both Allegro and Lispworks both have that...neat!

</comment></comment></comment></comment></comment><comment><USER7> One of the coolest things I've seen is to use Prolog with CLP(FD) to solve the 7-11 problem. The problem basically says the sum of the prices of four items is $7.11, and the product is $7.11 too (no rounding); find the prices of these four items.

This can be solved in two lines of code that gives the (unique) solution in a second. Not even my expensive Mathematica can do this!

        ?- use_module(library(clpfd)).
        true.

        ?- Vs = [A,B,C,D], Vs ins 1..711, A * B * C * D #= 711000000, A + B + C + D #= 711, A #>= B, B #>= C, C #>= D, labeling([ff, down], Vs).
        Vs = [316, 150, 125, 120],
        A = 316,
        B = 150,
        C = 125,
        D = 120 ;
        false.

Another great thing Prolog is good at is type inference. After all, type inference, in its simplest form, is just syntax-directed constraint generation and then using unification to solve constraints—exactly what Prolog gives you by default. You can write a type inference engine for simply typed lambda calculus in Prolog in 10 minutes. Google used to have a project to do type inference for Python written in Prolog, although they've since [switched away]([https://github.com/google/pytype](https://github.com/google/pytype)).

<comment><USER2> Hah! I used exactly this example to motivate the arbitrary precision CLP(FD) implementation, published as _The Finite Domain Constraint Solver of SWI- Prolog_ , FLOPS 2012, LNCS 7294:

[https://www.metalevel.at/swiclpfd.pdf](https://www.metalevel.at/swiclpfd.pdf)

The observations on type inference are also spot on. The project you mentioned was previously discussed on HN, but the page is no longer available:

[https://news.ycombinator.com/item?id=12108041](https://news.ycombinator.com/item?id=12108041)

<comment><USER7> Oh you implemented this CLP(FD) and wrote that paper! Thanks a lot! My 7-11 example is probably because I first saw it in your paper then.

</comment></comment></comment><comment><USER8> I hated this language (and I'm saying it knowingly, despite the fact that this is most definitely a Prolog loving group). I found its working model difficult for me and the ROI quite low. I wanted to make my critique a bit constructive though and, before spitting out something of my own, I decided to look if there's already anything available in this regard. I think Andre Vellino puts it quite well (or at least better than I cold) in his "Prolog's Death" blogpost[1]. I invite you to have a look at it. Leaving aside Prolog's language design decisions, logical languages in general may be for now just a bit precocious, something not meant to flourish in our time. However, the computing hardware evolves and with it getting more complex and harder to predict the imperative paradigm being better fit for the underlying physical architecture becomes less and less true with every passing day. Although I can't say I'm thrilled about it, in time the logical languages may become the better offer for the average Joe looking for quick results, something closer to what for now Python is.

[1] [https://synthese.wordpress.com/2010/08/21/prologs- death/](https://synthese.wordpress.com/2010/08/21/prologs-death/)

<comment><USER9> Quote from the link: "The most confusing thing about Prolog is that, whatever algorithm you implement with it must be on top of the built-in ones, namely depth-first search, and unification (and only using recursion rather than iteration). "

When I discovered that during my studies I decided that Prolog is not for me. First it looks neat for toy problems and then you're fighting the solver until you give up.

</comment></comment><comment><USER10> Its so nice to hear Prolog is alive and well. While at university I spent quite some time wrangling with it and grew to love it. So much problem solving smarts built into the runtime.

Here is my crowning achievement from back then in 1993 - a genetic programming simulator that evolved ants to follow pheromone trails in pure prolog.

[http://www.cs.cmu.edu/Groups/AI/areas/genetic/gp/systems/gp_...](http://www.cs.cmu.edu/Groups/AI/areas/genetic/gp/systems/gp_pl/gp.pl)

Enjoy.

<comment><USER11> Nerd.

In 2005 I used Prolog to a solved pathfinding for competive maps in CS 1.6 based off weighted examples form interviewing a 'professionals' calls, even had a plugin architecture to extend each map, though it only worked well for Dust2 before I had to present. Way more practical. Cough.

That was fun. Now I want to find the code...

</comment></comment><comment><USER12> Prolog: just say no.

(To explain the joke, one of the main problems with Prolog is that solutions which cannot be unified just emit a "no" with no further explanation, making large Prolog setups hard to debug)

<comment><USER13> I think the usual (and funnier) version of that joke is:

        Q: How many Prolog programmers does it take to change a lightbulb?
        A: no

</comment></comment><comment><USER14> This is a nice coincidence.

A few weeks back a guy at work gave away a box of old computer books, and I picked up several on Prolog and logic programming.

I've been reading through an ancient edition of "Programming Prolog", which is good, but I've had a hard time finding modern code samples. The code in the book mostly works, but I've seen some weird behavior that I suspect is due to language changes. It'll be nice to have these up-to-date examples using modern idioms.

</comment><comment><USER15> One of my favorite languages, pity that is has had even harder time than Lisp getting mainstream acceptance.

<comment><USER16> Let's face it, procedural is just plain easier to debug because you can more easily split it into digestible and dissect-able chunks: divide-and-conquer. Perhaps functional and logical CAN readily have such features, but nobody either figured how, or have not figured out how to explain how to do dissection to normal people. (This is sometimes a criticism of SQL also, but the added WITH clause helps break up big queries into multiple smaller ones.)

For example, with a procedural loop you can stick a debug statement in the middle to look at just about anything:

      while (x=foo(y,z)) {
        a = doStuff(x, z);
        console.write("x={?},y={?},z={?},a={?}", x, y, z, a);
      }

<comment><USER17> No idea why you think functional programming can't do printf debugging. Even pure languages like Haskell have `unsafePerformIO` (or wrappers like [https://hackage.haskell.org/package/base-220.127.116.11/docs/Debug...](https://hackage.haskell.org/package/base-188.8.131.52/docs/Debug- Trace.html) ).

Also functional programming heavily encourages splitting up code into digestible chunks (they're called functions ;) )

<comment><USER18> I guess humans, being the temporal creatures we are, have an easier time debugging procedural programs because they have a "story", an expected sequence of "events" (calls, reassignments, etc.), that naturally goes with the program. Functional programming inherently obscures that.

<comment><USER19> Prolog on the other hand has a very clear imperative reading, that fits alongside the declarative one. In fact, this is probably one reason why many programmers used to imperative languages find it hard to pick up Prolog and run with it - they get distracted by the imperative reading.

On the other hand, that makes it much easier to debug code, by thinking along the lines of "p/2 is called after p/4" or even "p/2 returns A that is passed to p/4" (even though strictly speaking predicates don't "return" stuff).

</comment></comment></comment></comment></comment><comment><USER20> Very good material. Prolog (or the ideas behind it) really needs a resurgence.

<comment><USER21> It's still going strong in the industrial side of things (like SCADA). You just don't hear much about it.

<comment><USER6> I've never heard of Prolog alongside SCADA. Can you be more specific? Like in a plant or what?

<comment><USER21> You know, I'm not sure where I got that from. Maybe I was confusing prolog with the ladder logic, or other languages from IEC 61131-3? I'm really not sure... but after some duckduckgoing I've come to the conclusion I was wrong in my previous statement... sorry.

<comment><USER6> No problem. Ladder logic and C I can definitely see, but SCADA would have blown my mind :)

</comment></comment></comment></comment></comment><comment><USER22> Prolog was one of hot A.I. prospects of the 1980s. It could be a way to build an expert system. Japanese fifth generation computers were supposed to,run it fast.

Then A.I. boom fizzled. Neither the first or last business cycle.

<comment><USER23> The fifth generation project didn't actually use prolog, but instead a custom prolog-like language.

However, there's still work being done adjacent to 5G using real prolog, by people who thought it was an interesting idea: [https://github.com/bitlaw- jp/the-constitution-of-japan](https://github.com/bitlaw-jp/the-constitution- of-japan)

Prolog is still used in the development of expert systems, though when those systems are shipped, they have often been rewritten in an imperative language based on a Prolog prototype.

The fifth generation project, from what I understand, died because of a dedication to custom hardware using already-obsolete fabrication tech -- mid-70s flipflops-on-IC tech over late-70s microprocessor-on-IC tech, wire wrap, etc. There was an inability or unwillingness to iterate on original committee designs. By the time it folded in 1998, everything involved looked like stone knives and bearskins. Those boxes wouldn't have been able to run it fast by 1980 standards.

</comment></comment><comment><USER24> I recall at college in 1989 our lecturer had brought in a chap who'd done an entire airline baggage management suite written in prolog (turbo prolog, to be more accurate). The demo we saw was absolutely gorgeous -- real time updates on-screen to changes in baggage locations elsewhere (in the system). This was on i386-equivalent machines, before anyone gets overly nonchalant. He explained that he'd been up against two competing tenders - one in COBOL, the other in C - both higher priced and longer delivery times.

Nonetheless, I still never really properly grokked prolog, as much as I tried. I feel my brain had already been wired away from declarative languages. Perhaps a poor cop-out.

</comment><comment><USER25> Prolog loses a lot of its magic when you realize it's just DFS the language.

<comment><USER26> C loses a lot of its magic when you realize it's just memory but with syntactic sugar.

<comment><USER2> A fun fact that may appear surprising at first: In contrast to Prolog, C is actually _not_ Turing-complete!

Here is more information:

[https://cs.stackexchange.com/questions/60965/is-c- actually-t...](https://cs.stackexchange.com/questions/60965/is-c-actually- turing-complete)

In C, you can only represent an unbounded tape if you assume the existence of an unbounded _stream_ , i.e., in a so-called _hosted_ implementation of C where unbounded streams are available. But unbounded streams cannot be implemented in freestanding C, even if unlimited memory were available!

</comment></comment></comment><comment><USER27> I imagine that there must be some system similar to prolog but with a probabilistic model of inference, for example ground rules could be sorted by statistical properties to accelerate inference. Just like machine learning trees select features for classification (perhaps using cross-entropy minimization).

Edit: I found Journal of Machine Learning Research 7 (2006) 307–342, Kernels on Prolog Proof Trees: Statistical Learning in the ILP Setting

<comment><USER23> I wrote something like this, based in part on ideas from PLN: [https://hackernoon.com/mycroft-a-predicate-logic-language- ov...](https://hackernoon.com/mycroft-a-predicate-logic-language-overview- post-mortem-e357fe80d53)

</comment></comment><comment><USER28> From my experience the hardest part is interaction with other programs and libraries. Still cannot make pipes work in [https://github.com/XVilka/r2pipe.prolog/blob/master/r2pipe.p...](https://github.com/XVilka/r2pipe.prolog/blob/master/r2pipe.pl)

<comment><USER29> What's the problem you're having with it? I think this was discussed on irc recently? This was the example I gave of using process_create which works:

        process_create('/bin/cat',
                       [],
                       [stdout(pipe(Out)),stdin(pipe(In))]),
        write(In, "hello"), nl(In), close(In),
        read_line_to_codes(Out, Codes).

<comment><USER28> Well, I need to keep both pipes open during the "session", since usual radare2 session involves hundreds of commands and their output. Opening a new pipe and process every time is a wrong way to go in my opinion.

<comment><USER29> You should be able to open the pipes at the beginning of the session, and close them after, passing the pipe variables around as needed. Prolog wouldn't be any different to other programming languages there. What errors are you getting? Maybe post to the swipl mailing list?

<comment><USER28> I will send a message to mailing list then, thanks for the suggestion.

</comment></comment></comment></comment></comment><comment><USER30> Practical logic programming in Clojure : [https://github.com/clojure/core.logic](https://github.com/clojure/core.logic)

A modern logic programming language: [https://github.com/mcsoto/cosmos](https://github.com/mcsoto/cosmos)

<comment><USER26> Core.Logic is a miniKanren implementation which is quite different from Prolog (smaller and ultimately less powerful, but cool nonetheless). Many/all miniKanren solutions also work in Prolog, but the vice-versa is not true.

</comment></comment><comment><USER31> [https://en.m.wikipedia.org/wiki/Visual_Prolog](https://en.m.wikipedia.org/wiki/Visual_Prolog)

Turbo Prolog is now known as Visual Prolog. Just for those who wondered what happened to it and might want to ude it.

</comment><comment><USER32> Prolog is crazy-making and awesome in all the right ways. For some problems, it can be _very_ concise.

[https://swish.swi-prolog.org/p/xkcd287.pl](https://swish.swi- prolog.org/p/xkcd287.pl)

</comment><comment><USER33> used prolog many years ago, how is it now? is it evolving?

it IS the language for expert systems, curious if it can be the best language for general AI developments.

Just installed prolog under ubuntu and vscode has a plugin for it, all look good, will play with this more.

</comment><comment><USER34> The core ideas behind Prolog have the feel of something discovered rather than invented, and I bet we'll see significant new forms of it yet.

My first encounter with it was while taking a _Principles of Programming Languages_ course that I hadn't been attending regularly... We had a test on Prolog four days out and I hadn't learned a bit yet. I found a couple books in the library—one of which was excellent—and was soon so absorbed by it that I learned everything I needed out of sheer interest and got a perfect score on the test.

Some six years later—the whole time not having touched Prolog or even thought about it that I can recall—I got an idea for a programming language. It would be an attempt to model 'schemas' in the human brain. Programs written in it were supposed to reflect human conceptual structure. Once you defined the concept for something, let's say a chair, you could ask it to generate instances. It was in part going to be a language designed from the ground up for procedural content generation.

There were some promising things about it (like a very concise/natural way of defining 'analogy'[0] and other aspects of thought), but ultimately, a couple years after coming up with the idea, I picked up a copy of _The Art of Prolog_ and read the first few chapters (for general edification, and so that I'd be more aware if it were applicable to something I was working on). By that point, I felt pretty convinced that my language idea would only be superficially different from Prolog, and that most of the really interesting ideas were already captured by that language.

One up side to the project was that, after coming up with a pretty detailed plan for how the runtime would work, I decided to write this 'abstract visual debugger' to help me build it (the runtime would involve loads of complex data structure interactions that prior experience taught me were much easier to wrangle if visualized). It still seems like a promising project to me, and I work on it when I get free time. Video here: [http://symbolflux.com/projects/avd](http://symbolflux.com/projects/avd)

I also still have a bunch of random notes/ideas I took down about the language idea I had. Warning—I was pretty excited and they sound a bit like that ravings of a madman: [http://symbolflux.com/IntellAgent- ideas.txt](http://symbolflux.com/IntellAgent-ideas.txt) I also wrote an ANTLR grammar for it, but that's probably not as entertaining.

[0]

      Analogy:
      +{original: Type, analogy: Type}
      -{

         Equivalence{Particularization{Generalization{original}}, analogy}
       }

Equivalence etc. are all relation constraints; the run-time would discover a value for 'analogy'. The idea is to generalize whatever the thing is ('increases generality of the attribute Types' —from my notes), fill in values of some params to particularize, and have the constraint held that the discovered analogy is Equivalent to the original (sharing the same structure, which had a definite meaning in the context of the language).</comment>


5 Things You Should Stop Doing With jQuery - <AUTHOR> http://flippinawesome.org/2013/05/06/5-things-you-should-stop-doing-with-jquery/

<comment><USER2> As far as I know, you should still use document ready. Putting javascript at the bottom does not ensure the dom is loaded before the javascript executes. Most of the time it probably is, but it's definitely not a certainty.

And not all javascript goes at the bottom, only deferable javascript belongs there. The problem caused by scripts is that they block parallel downloads. To prevent that we put as many at the bottom as is possible. But some still belong at the top if they're non-deferable; in otherwords if they should load before the dom (e.g. modernizr).

As an added fun fact: In every scenario all external CSS should load before all javascript because CSS doesn't block parallel downloads. And page display should be top priority in the load order.

</comment><comment><USER3> Ironically, the .map example is actually a bit of a waste. A better function in that case is to use .filter: .map really should be used when your resultant array is the same length as the initial array, except with different elements i.e. [1,2,3,4] to [2,4,6,8], where the same function was applied to each element. For array manipulation, it is often better to use underscore.js

Edit: I just read the bit about how grep was better than your .map usage. I still think filter is better than grep in a lot of cases, esp. when you are trying to chain methods when working with an array of (jQuery) elements

</comment><comment><USER4> The site seems to be down. Text Only Cached version: [http://webcache.googleusercontent.com/search?q=cache:flippin...](http://webcache.googleusercontent.com/search?q=cache:flippinawesome.org/2013/05/06/5-things- you-should-stop-doing-with-jquery/&strip=1)

</comment><comment><AUTHOR> Sorry. Traffic spike took down the site temporarily...coming back up now.

</comment><comment><USER4> Is there a performance penalty for using document ready? Understanding that it isn't necessary if your scripts are at the bottom of the page, does it actually hurt?</comment>


A Prehistory of the Ethereum Protocol - <AUTHOR> http://vitalik.ca/general/2017/09/14/prehistory.html <comment><USER2> The idea of smart contracts is actually older than Bitcoin, Nick Szabo wrote about it in 1997.

[http://nakamotoinstitute.org/formalizing-securing- relationsh...](http://nakamotoinstitute.org/formalizing-securing- relationships/)

Abstract: Smart contracts combine protocols with user interfaces to formalize and secure relationships over computer networks. Objectives and principles for the design of these systems are derived from legal principles, economic theory, and theories of reliable and secure protocols. Similarities and differences between smart contracts and traditional business procedures based on written contracts, controls, and static forms are discussed. By using cryptographic and other security mechanisms, we can secure many algorithmically specifiable relationships from breach by principals, and from eavesdropping or malicious interference by third parties, up to considerations of time, user interface, and completeness of the algorithmic specification. This article discusses protocols with application in important contracting areas, including credit, content rights management, payment systems, and contracts with bearer.

<comment><USER3> Was there any consensus on whether Szabo is Nakamoto? He seems to be on the short list of people who had both the brains and the talent to pull off Bitcoin.

<comment><USER4> He's just one of several candidates[1], although I think the late Hal Finney is more likely to be Satoshi.

Another theory is that the Satoshi persona was created by a group of individuals (cypherpunks) who were involved in the early Bitcoin community, including Hal Finney and Nick Szabo.

[1]: [https://en.wikipedia.org/wiki/Satoshi_Nakamoto#Possible_iden...](https://en.wikipedia.org/wiki/Satoshi_Nakamoto#Possible_identities)

<comment><USER4> And for those curious about Hal Finney, here's a fascinating post he wrote before his death: [https://bitcointalk.org/index.php?topic=155054.0](https://bitcointalk.org/index.php?topic=155054.0)

<comment><USER5> Except he didn't completely die, he was actually cryo-preserved. Although you can look at it in multiple ways.

<comment><USER6> All available evidence suggests that cryonics is likely pseudoscience in theory and certainly pseudoscience in practice. Irreversible brain damage occurs within seconds (and total brain death within minutes) of oxygen deprivation, and freezing cell tissue in water ice permanently destroys it.

<comment><USER7> We don't really know. Cryonics avoid ice formation with cryoprotectants or via vitrification. And assuming there _is_ brain damage, in theory it's still possible to recover as long as the _information_ of the brain hasn't been destroyed. It's akin to having the mainboard and the read head of a hard disk destroyed, but having the plates intact.</comment></comment></comment></comment></comment></comment></comment>


Hunter Biden Had Invested in China's Face++ - <AUTHOR> https://theintercept.com/2019/05/03/biden-son-china-business/ <comment><USER2> >For his part, Joe Biden has long served as a friendly voice for U.S.-China relations, even before his son's investment ventures. The elder Biden helped lead Democratic support to passing permanent national trade relations with China.

>In 2000 remarks in support of the vote, Biden argued that he did not "see the collapse of the American manufacturing economy" as a danger from opening up further trade with China, claiming that an economy "about the size of the Netherlands" could not become "our major economic competitor." Opening China to further trade, Biden predicted, would create "a path toward ever greater political and economic freedom" for the country's citizens.

I think that the belief that better economic development leads to better human rights and more freedom has suffered a lot of setbacks recently.</comment>


Dear Apple... Please give me picture messaging on my Iphone  - <AUTHOR>

I do not understand why Apple did not make the Iphone capable of receiving picture messaging.  Why do I need to login to viewmymessage.com to receive photos... am I the only one who DOES login and has issues 99% of the time with the page not loading correctly? <comment><USER2> i very rarely log on because its so f _(_ & annoying. and yes the pics are hard to see and usually only frustrates me more.

NYtimes ran an article about why the iPhone is not popular in Japan and one of the main reasons was lame camera, and no pic messaging.

</comment><comment><USER3> Sounds like a good candidate for a new app. After my game is finished will take a look :)

</comment><comment><USER4> MMS are a rip off anyway. Don't they cost $.25 a piece just to receive one? Considering I can receive an email with 20 pics for free, MMS is dead to me.</comment>


Julia Collins is Jeopardy's Winningest Female - <AUTHOR> https://alum.mit.edu/pages/sliceofmit/2014/05/19/mit-alumna-breaks-jeopardy-records/

<comment><USER2> Typical article that makes me shake my head thinking "why on earth is this paper highlighting _female vs male_ ".

<comment><USER3> I presume because it's an MIT alumna and without separating male/female it doesn't sound as impressive. She's won 10 games thus far, compared to Ken Jennings who won 74 straight. It's all about the presentation in most articles.

<comment><USER4> Ken Jennings is a major outlier though, even among men [1].

[1] [http://www.miamiherald.com/2014/05/17/4121297/julia- collins-...](http://www.miamiherald.com/2014/05/17/4121297/julia-collins- continues-her-jeopardy.html)

<comment><USER3> Oh, believe me I'm in no way trying to detract from her success. She'd undoubtedly run laps around me and probably everyone I've ever personally known. I only meant to provide a possible rational for the question asked.</comment></comment></comment></comment>


YC's First Indian Investment, ClearTax is TurboTax for India - <AUTHOR> http://techcrunch.com/2014/06/24/yc-backed-cleartax-tackles-indias-fast-growing-online-tax-filing-market/

<comment><USER2> I was in this space for some time. The competition is very high, buyers are not aware, the industry isn't organised and is very much dependant on whimsical tax laws, product pricing is very low, and pretty much all companies are giving away the main product for free under the disguise of special- limited-time-offer.

In retrospect, quitting it was one of the best decisions I've ever made.

</comment><comment><USER3> First Indian investment? I thought InterviewStreet was also an Indian company.

<comment><USER2> It is. Plivo and TapToLearn are two others.</comment></comment>


Show HN: Detecto – Computer vision model in 10 lines of code or less - <AUTHOR> https://github.com/alankbi/detecto <comment><USER2> Hi,

Awesome work. Something similar to what I did, though for semantic segmentation.

A small suggestion: From what I understand, you have hard-coded the Fast-RCNN predictor.

      self._model.roi_heads.box_predictor = FastRCNNPredictor(in_features, len(classes) + 1)

Having the ability to plugin users' own models would be better, I believe. This would translate to making the model class more abstract.

Well done!

<comment><AUTHOR> Thanks for the suggestion! That's a feature I definitely plan on adding sometime in the near future.

</comment></comment><comment><AUTHOR> Hey all!

I'm a university student and have been working on this project for the past month or two. I wanted to learn how to create computer vision/object detection models for my school's robotics club but found the learning curve pretty steep. With Detecto, my hope is that it makes the field more approachable to newcomers and gives people a quick and easy option for when the existing libraries are too heavy-duty.

Please let me know what you think and if you have any feedback!</comment>


Artificial intelligence: machine v man - <AUTHOR> http://www.ft.com/intl/cms/s/2/abc942cc-5fb3-11e4-8c27-00144feabdc0.html#axzz3HsQK8b70

<comment><USER2> _Strictly speaking, according to Bostrom, the kind of machine-based intelligence that is heading humanity's way wouldn't wish its makers harm. But it would be so intent on its own goals that it could end up crushing mankind without a thought, like a human stepping carelessly on an ant._

Like corporations.

What happens when computers get good at management? A network of computers may be able to outperform human managers. Even if they're not quite as smart as the smarter humans, a network of computers can coordinate better than a meeting of people. Once computer-run companies start producing better returns than human-run ones, the computer-run ones will dominate. That's basic capitalism.

This doesn't imply that the organization is entirely automated. It just means humans aren't at the top. If it produces more profits, companies will be forced by investors to take that route.

<comment><USER3> I suspect at some point in time, (left without regulation) computers and machines will even replace programmers, which is pretty much what the article is saying, that would be one of the low level steps.

It seems that people think either a utopia ensues or that's our extinction event – I don't understand why we think everything will spiral out of our control though. We still have the power – we don't have to turn it over to the robots now or ever.

<comment><USER4> >We still have the power – we don't have to turn it over to the robots now or ever.

In theory, but can we control ourselves? There are a lot of financial incentives in developing better machines and algorithms. We couldn't stop nuclear weapons or global warming, and AI is a lot more attractive and powerful than either of those to business and governments. Not to mention that nuclear weapons and global warming are harmful in a very easily understood way, whereas AI might be harmful in very strange ways. It's like a pack of wolves left alone with a poisonous steak. It's a delicious steak and the poison is somewhat beyond their understanding; some wolves even think there's no poison at all. Isolating the poison from the steak is as difficult for the wolves as making safe AI is for us.

You can imagine how incredibly valuable an AI capable of doing a programmer's work would be. It's a technology far off, but not implausible.

But as soon as we reach that point, it seems unlikely that things won't spiral out of control. Imagine a thousand highly intelligent programmers who are capable of research, think fluently in statistics, and cooperate perfectly. Additionally, these programmers can examine and modify how their own brains work, and boost their performance, remove their errors. With the press of a button, they can also create more copies of themselves.

Everything might spiral out of control.

How do you make sure things don't spiral out of control?

<comment><USER3> International laws and regulations as well as doomsday scenario planning that is surely already underway by the US government.

I would argue that we actually have stopped nuclear weapons thus far (not the proliferation, but the usage), as well as mass global terrorism, mass extinction from disease, the list goes on.

I agree that AI is a threat – I'm legitimately worried that the AI capable of doing a programmer's work isn't all that far off. I see things like Mozilla's Webmaker popping up and its obvious that the process will become more streamlined and automated as time goes on. I also don't think that all sense and reason goes out the window - we will come up with a way to solve it like we solve everything else – boring laws.

We should be more worried about the human beings that will no doubt use the new wave of machines for their own ill will. I'm sure what the NSA has right now will be laughable compared to what it will have in 10 years.

</comment></comment></comment></comment><comment><USER5> I always find it funny how the only people who think that computers will overtake humans are the ones who don't deal with them at a basic level every day.

"It will get so smart and so capable that it will destroy us" is somewhat hard to believe when you realize that these types of AI will likely be so stupid when it comes to the outside world they would trip on the power cord and stop the apocalypse themselves.

<comment><USER6> That's untrue. I program computers for a living; I am well aware of how unreliable everyday software is. But to generalise from that to "no-one will ever write an existentially dangerous AI" is wishful thinking.

<comment><USER5> Stop and think what is needed for a human army to be effective. You need everything from nuclear physicists to cooks to keep things running. Each of those people was first and foremost the results of 4 billion years of evolution which solved the hard problems of visual object detection and body calibration. Yet for each of the hundreds of thousands of such people you still needed parents to keep them from killing themselves between the age of 2-10 as a full time job and then 300 years worth of culture to get them to the point where they were useful for anything at all.

There is a world of difference between being able to build an AI that can do one thing, and an AI that can do everything a person can.

</comment></comment></comment><comment><USER7> There is an epistemological problem. If you want to program the machine to respect that men is the most important animal in this planet you can't base that only on intelligence because then the machine can deduce correctly than once they become more intelligent than us, they should occupy the throne and men would be then only an appreciate animal (a dog, a sheep, a monkey?). We need a Turing test for any program intended to program such a supercomputer, it should be necessary that the program deduce logically the Great Axiom: Men is top animal of this planet. In case the boot program is not able to proof the Great Axiom, the machine could proceed to self-destruction.

If there isn't any way to construct a logical system in which men is the more important animal of this planet, then we are doomed to be dominated by the machine, because our throne based in our intelligence should be now the justification for the machine to take the lead and take us as their dogs or sheeps.

</comment><comment><USER3> Its fun to think about terminator-like disaster scenarios, but isn't the solution as simple as: don't let the AI leak out? If we can contain humanity ending viri in labs then surely we can contain an exponentially growing and potentially humanity ending AI.

Am I missing something? Is the plan to actually create robots that can replicate and grow at exponential rates and turn it loose on the environment?

AI will be regulated just like everything else.

<comment><USER8> Read about the "AI Box experiment" \- [http://lesswrong.com/lw/up/shut_up_and_do_the_impossible/](http://lesswrong.com/lw/up/shut_up_and_do_the_impossible/)

[http://rationalwiki.org/wiki/AI- box_experiment](http://rationalwiki.org/wiki/AI-box_experiment)

<comment><USER3> Interesting – but isn't this starting with the assumption that there is a possible combination of words or actions that the AI could employ which would work on a human? What if no possible combination exists?

I feel that the bigger and more immediate threat is the misuse of AI by human beings against other human beings. Governments are already abusing it.

</comment></comment></comment><comment><USER9> "... And with the accelerating pace of technological change, it wouldn't be long before the capabilities – and goals – of the computers would far surpass human understanding."

"...In their single-mindedness, they would view their biological creators as mere collections of matter..."

These two sentences are contradictory.

</comment><comment><USER7> What I would find difficult to explain (or program) to a machine is that human right ends with certain frontiers. One meter at one side the frontier your life is abysmally important, one meter at the other side your life is of utmost importance. I wonder where the machine would put the frontier if one day they have to assess the value of our lives.

</comment><comment><USER10> David Brin (you may remember him as the author of "The Postman", but not the screenwriter of the movie) has a fantastic novel on this.[0]

[0] [http://www.amazon.com/Existence-David-Brin- ebook/dp/B0079XPM...](http://www.amazon.com/Existence-David-Brin- ebook/dp/B0079XPMQS)

</comment><comment><USER11> Wouldn't they(AI) do the same mistakes and create a superior race and so on?

AI seems like evolution to me - only if we put our DNAs in the AI, that would make everyone happy I guess?

I mean, children do not kill their parents even though they are more intelligent(evolution wise).

<comment><USER8> > I mean, children do not kill their parents even though they are more > intelligent(evolution wise).

If it comes to the issue of more power, there's plenty of this happening in history - ex: Mughal empire.</comment></comment>


Open news - <AUTHOR> http://vmanamino.github.io/open-news-digest <comment><AUTHOR> I created this app using NYTimes API and the Guardian API. Select a calendar day and then search for news published that day. Still some design problems. For example, the calendar shows days in the future for which there is no news content.

But I got the email service to work, so when you click on an article, you can enter an address and send the article info, including link.

Appreciate some feedback.</comment>


LHCb experiment reports observation of exotic pentaquark particles - <AUTHOR> http://press.web.cern.ch/press-releases/2015/07/cerns-lhcb-experiment-reports-observation-exotic-pentaquark-particles <comment><USER2> The two most interesting links from the article:

\- [http://lhcb-public.web.cern.ch/lhcb- public/Welcome.html#Pent...](http://lhcb-public.web.cern.ch/lhcb- public/Welcome.html#Penta) (LHCb website)

\- [http://arxiv.org/abs/1507.03414](http://arxiv.org/abs/1507.03414) (paper)

</comment><comment><USER3> Will this have an impact on the Standard Model? If so, does this have any ramifications on proving or disproving any particular quantum theories?

<comment><USER4> No. This is analogous to finding a new molecule in chemistry, or a new isotope in nuclear physics. None of the fundamental constituents are different, they've just been been combined in a new way. (In fairness, this combination is a lot more novel than most new molecules or isotopes.) In principle, the existence of these pentaquarks could have been definitively calculated from first principles if we had sufficient computing power, just as for all molecules, but this is infeasible.

<comment><USER5> It's more than that; the mass and properties of a pentaquark will tell us a lot about the underlying properties of the strong force. People have been trying to predict the pentaquark masses and lifetimes for many years.

Computations of low-energy strong-force interactions are significantly more difficult than electromagnetism. As far as I know, the proton binding energy has not yet been calculated with confidence, though it should happen in the next decade or two.

If the result holds up, this will count as one of LHC's major discoveries.

</comment></comment></comment><comment><USER6> A little history on previous pentaquark discoveries [http://link.springer.com/article/10.1140%2Fepjh%2Fe2012-2003...](http://link.springer.com/article/10.1140%2Fepjh%2Fe2012-20032-0)

<comment><USER7> Unfortunately, that paper is pay-walled by springer.com.

On the bright side, the author of that paper, Kenneth H. Hicks, has provided three different explanations of pentaquarks here:

[http://plato.phy.ohiou.edu/~hicks/thplus.html](http://plato.phy.ohiou.edu/~hicks/thplus.html)

They are a bit dated due to the news today, but they're helpful.

</comment></comment><comment><USER8> > "More precisely the states must be formed of two up quarks, one down quark, > one charm quark and one anti-charm quark."

It blows my mind

<comment><USER9> I find most interesting that the charm and anti-charm do not annihilate. That would not happen with non-quark particles.

<comment><USER10> They can annihilate -- but annihilation channels are OZI-suppressed because of gluon effects in e.g. charmonium (the J/psi, a famously narrow resonance, which was one of the final states of the decay that produced this signal). The same mechanism is likely in play here as well (it is an artifact of QCD) -- the idea is that hadronization can be energetically favorable to annihilation: since the gluons carry a strong charge (color), they participate in the interaction and can nucleate a light q/q-bar pair rather than requiring an additional (virtual) gluon to couple to the annihilation vertex.

(Also it does happen with non-quark particles as well! Positronium for example, is an electron-positron bound states -- we just see more stable hadron particles like this because QCD has Weird Maths).

</comment></comment></comment><comment><USER11> I think the submission should link to the actual press release: [http://press.web.cern.ch/press-releases/2015/07/cerns- lhcb-e...](http://press.web.cern.ch/press-releases/2015/07/cerns-lhcb- experiment-reports-observation-exotic-pentaquark-particles)

<comment><USER12> Ok, URL changed from [http://www.interactions.org/cms/?pid=1034868](http://www.interactions.org/cms/?pid=1034868), which is a copy of this.

</comment></comment><comment><USER13> Whatever

</comment><comment><USER14> Ingress Agents already know that as exotic matter (XM) ;-)

</comment><comment><USER15> people at cern have forgotten long ago:

"Scientists study the world as it is, engineers create the world that never has been." – Theodore von Kármán

Gell Mann and Zweig among others proposed the imaginary concept of quarks (or partons, Feynman's Dolly) to do something about all those particles that kept popping up in accelerators. There was a time, when a particle was a run-of- the-mill cookie-cutter thesis.

<comment><USER16> And before that, water was made out of "water", wood was made out of "wood", and the world was a much simpler place. Your point being?</comment></comment>


Patent Wars Aren't About Destroying the Enemy, They're About the Loot - <AUTHOR> http://www.nytimes.com/external/gigaom/2010/05/13/13gigaom-patent-wars-arent-about-destroying-the-enemy-they-62498.html <comment><USER2> The question I'm asking myself: will this system crumble under it's own cost? If looting is made easier than producing that will happen at some point.</comment>


AppShopper is Back in the App Store with 'AppShopper Social' - <AUTHOR> http://appshopper.com/blog/2013/04/21/appshopper-is-back-in-the-app-store-with-appshopper-social/

<comment><AUTHOR> We got pulled for the 2.25 rule back in December[1], but finally made enough changes and got back in the App Store.

1\. [http://appshopper.com/blog/2012/12/20/appshopper-app- removed...](http://appshopper.com/blog/2012/12/20/appshopper-app-removed-from- the-app-store-for-now/)

<comment><USER2> Congrats. Must've been a tough ride.</comment></comment>


Tesla Model S Mistaken for Kidnapper Van Thanks to "Weird" Design - <AUTHOR> https://www.fastcodesign.com/3068041/tesla-model-s-mistaken-for-kidnapper-van-thanks-to-weird-design <comment><USER2> This is a weird, seemingly openly biased article.

Tesla should make their seats more visible because someone was a moron? Someone being a moron means Tesla isn't putting users first?

Please... HN doesn't need garbage like this.

<comment><USER3> If you think a submission is inappropriate for HN, flag and move on.</comment></comment>


Ask HN: Work perks - <AUTHOR> What kind of perks/package/fringe benefits do you get at your workplace? What kind of things do you wish you had? <comment><USER2> Snacks (meh, they're not all healthy; and some of us are better than others at resisting temptation).

Someone mentioned bicycle parking; I don't use it but our building just added that.

Dog-friendly office (mixed bag, they're nice to have around but they can be loud and at least one is not fully house trained).

Decent health benefits (crucial).

Pre-tax transit benefits.

401K with employer match (after the last couple of jobs I now consider this crucial and regret not requiring it during previous searches).

Dinner and a cab home if you have to stay exceptionally late (almost never take advantage, but highly appreciated when leaving the office at 9:30pm during a snowstorm).

Volunteer day when the entire office turns out once a year to work with a local nonprofit. (Love this! And I think it does more for employee solidarity than any social event.)

Unmetered PTO that at least in some departments we're actively encouraged to take advantage of. Awesome if it makes you comfortable taking off more than a couple weeks a year. Awful if it makes you uncomfortable taking any time off.

Paid parental leave. (One of those things that should be universal and we're doing better at than most places but could still offer more.)

Flexible hours.

Summer half-day fridays (best thing ever!)

Beer fridge (with the general expectation that it'll be opened only on Friday evenings; rarely used)

Office parties (as an introvert, I loathe these, but I guess some people enjoy them).

Wish we had:

Private offices, or at least cubicles. Or noise dampening treatments for the concrete ceiling or floor. Or something.

Non-fluorescent lighting.

Health initiatives.

</comment><comment><USER3> Too many to mention I think. Food, healthy snacks, pool table, subsidized bike buying, subsidized public transport, free company bus if public transport is not your thing, free health insurance, pension contribution, share dealing schema, social committee events every month, pizza and beers every payday or last Friday of the month, free breakfast after moday's bank holidays, dentist visits, hairdresser visits, bank visits... I'm sure I forgot some.

I cannot think in anything that I wish I had.

</comment><comment><USER4> Inside bicycle parking. I don't like chaining my bike outside in any neighborhood.

A part startup I worked for (10 employees at the time) installed a shower for employees.</comment>


Training Like Tesla: Week One Review - <AUTHOR> http://thecontinentalsuper.wordpress.com/2013/04/22/training-like-tesla-week-one-review/

<comment><USER2> Hey Alec!

Zach here -- fantastic post. I'm really happy to see this catching on and more people diving in. Your write-up here is exactly the type of updates I'm going to encourage in our group discussions moving forward.

Shoot me an email if you want to be a part / want to explore the experiment with 15 others. I think you'll enjoy it! ztratar at gmail dot com

</comment><comment><USER3> this is brilliant. I would like to be part of this, do you have to be local? I well read the article now.

</comment><comment><USER3> this is just brilliant. I can't wait to read the article.</comment>


Reddit launches an "about" page to help new users understand it - <AUTHOR> http://www.reddit.com/about

<comment><USER2> That's been there for eleven and a half months.

[http://blog.reddit.com/2012/06/announcing-rabout-and- reddit-...](http://blog.reddit.com/2012/06/announcing-rabout-and-reddit- postcards.html)

<comment><AUTHOR> It's a page that drops down at the top first time you open Reddit on a device now, not just a subreddit no one will find anyway.

</comment></comment><comment><USER3> Why are so many April fool's jokes listed in the history time line?</comment>


Technical Analysis of the Top BlueHat Prize Submissions  - <AUTHOR> http://blogs.technet.com/b/srd/archive/2012/07/26/technical-analysis-of-the-top-bluehat-prize-submissions.aspx <comment><USER2> Anyone interested in buying the domain: BlueHatSecurity.Com? Serious offers only. Sorry for the spam :-(</comment>


Should We Be Rethinking Unsupervised Learning? - <AUTHOR> http://www.kdnuggets.com/2016/08/rethinking-unsupervised-learning.html <comment><USER2> some interesting ideas in this article.</comment>


The State of Wyoming Has Two Escalators - <AUTHOR> http://www.theatlantic.com/technology/archive/2013/07/the-state-of-wyoming-has-2-escalators/277891/

<comment><USER2> During tourist season here in DC I often think something along the lines of "Is this the first escalator these folks have ever seen?".

This article makes me think the answer might be "yes" more often than I'd imagined.

<comment><USER3> I know the feeling! It's so annoying when people don't know to stand to one side of escalator and they take up the whole thing. It's five times more annoying when it's an airport escalator and you just got done waiting in line for an hour and then being molested by airport security.

Move to one side people! /rant

<comment><USER4> Surely that ought to lessen the annoyance? If you've just been held up for an hour anyway, another 20 seconds doesn't make a lot of difference.

<comment><USER5> Unfortunately no, the irritation piles up until a threshold after which anything can make you snap.

</comment></comment></comment></comment><comment><USER6> So Wyoming has as many escalators as they do Senators.

<comment><USER7> Yet surely California has more than twice as many escalators than it has Representatives.</comment></comment>


Redis (consistent hashing based) sharding made easy - emre-yilmaz http://emre.github.io/redis-router/ <comment><AUTHOR> > _Q: What about data invalidation if I move servers, change the config etc._

> _A: It 's minimum. At least better than: Node = Hash(key) MOD N_

Seriously?

Redis is not just a cache. Let me repeat that. Redis is not just a cache. Lots of people use Redis as a primary data store. If Redis is your primary data store, you can't afford to have any of your keys invalidated, ever. "Minimum" might be good enough when you're talking to Memcached, but it's not enough when you're taking to Redis.

Consistent hashing has been a solved problem for a long time if you can afford to misplace a few keys from time to time, which will happen every time a node is added to or removed from the pool. There are Redis client libraries implementing consistent hashing in nearly every language, and most of them work just fine if you use Redis as a cache or if your pool size never changes. Solving this problem again isn't particularly interesting.

What really would be interesting is a server that sits between Redis nodes and clients and intelligently moves keys from one node to another in the background so that no key is ever invalidated even when the pool size changes. I believe that project is called Redis Cluster or something. That might be worth an extra TCP connection. But right now, I'm not seeing why I should prefer Redis-Router to any tried-and-true client library with built-in lossy consistent hashing.

<comment><USER2> Nowhere is it suggested that this is suitable for uses where you need durability. In fact if you are looking for a library for consistent hashing, I'd assume you'd understand the drawbacks (invalidation on resize).

Have you a point other than ranting that this isn't a unicorn? It really bothers me that this is the top comment at the moment.

<comment><AUTHOR> My point is that I don't see much reason to run a server the sole purpose of which is to perform consistent hashing. I have no complaints about using the client library as part of a Python program. _Actually, apologies to OP because I didn 't realize that this is like the first Redis client library in Python with consistent hashing built in._

But a standalone server to talk to other languages such as PHP? Why would I want to add yet another TCP connection, yet another point of failure, and yet another protocol to my software stack when PHP's very own Predis, for example, does consistent hashing just fine while talking to Redis directly? Many other languages like Ruby, Java, and C#/.NET also have Redis clients that support consistent hashing. Sorry Pythonists, everyone else has been having fun with turnkey consistent hashing for 3-4 years already.

Lossless sharding came to mind immediately as a possible benefit of a middle layer, because Redis users have been asking for something like that for ages. When someone says "Redis" and "sharding" in the same breath, I'm sure a lot of people will think "Finally, a way to distribute my larger-than-RAM dataset across multiple machines!" After all, durability is a big deal when it comes to Redis. I'm sorry if my comment came across as rude, but I was honestly quite disappointed because my expectations were probably too high.

</comment></comment></comment><comment><USER3> See also: Twitter's Twemproxy ([http://github.com/twitter/twemproxy](http://github.com/twitter/twemproxy))

<comment> emre-yilmaz another good alternative: [https://github.com/disqus/nydus](https://github.com/disqus/nydus)

</comment></comment><comment><USER4> The "abstract" text (copied from the Wikipedia page) lacks the variable names, making the text incomprehensible:

 _When a hash table is resized and consistent hashing is used, only keys need to be remapped on average, where is the number of keys [...]_

it should end "only K/n keys need to be remapped on average, where K is the number of keys [...]". Just thought I'd point this out so it could get fixed, should only take a few seconds to edit.

<comment> emre-yilmaz thanks! [https://github.com/emre/redis- router/commit/0d9307436e4c3b69...](https://github.com/emre/redis- router/commit/0d9307436e4c3b69c257943bd6df1883e742fbc7)

</comment></comment><comment><USER5> Somewhat off-topic, but just wondering: is anyone using consistent hashing for their DB masters? Every setup I've seen uses a manual sharding table.

<comment><USER6> Yes, and it works fine as long as you accept that data will need to be migrated at some point when you run out of memory and/or instances.

To put this off as long as possible, you can max out the memory in your boxes and use a large number of servers - 100s in some cases - running on those servers, hopefully with less than 1 per CPU core to maximize performance.

Then if you begin maxing out memory, you can easily split those servers onto their own hardware. My calculations showed that would allow scaling to trillions of keys without problems.

</comment></comment><comment><USER7> The TCP server example shows a different protocol than the default redis protocol. (As I could not install it correctly I couldn't try it.) If this is the case current redis client libraries cannot be used.

<comment><USER3> Hello,

Redis accepts both a structured protocol, and a simple space-separated tokens protocol (called the inline protocol) that helps sysadmins to avoid a disaster just because they lack a proper redis-cli but are in need to run a Redis command ASAP. Perhaps this proxy is also supporting both forms.

You can do that with any modern enough Redis server:

        Escape character is '^]'.
        ping
        +PONG
        set foo bar
        +OK
        get foo
        $3
        bar

<comment><USER7> I know of that simple protocol. But the responses in the example telnet session on that side return "True" and "13" where it should be "+OK" and ":13" with the redis protocol.

<comment><USER3> good point...

</comment></comment></comment></comment><comment><USER8> It seems like you've tried to support the set/store (sinterstore, sdiffstore, etc) methods across multiple instances in a non-atomic way - won't that lead to potential data loss?

<comment> emre-yilmaz Yes, these methods are dangerous to use.

I need a locking mechanism to do it safely but this will wait until I need it most likely.</comment></comment>


Ask HN: Investor? Seeking Investment? - <AUTHOR> Checking if there's interest in an investments-related thread similar to hiring/freelancing threads.
Please, start with LOOKING TO INVEST or SEEKING INVESTMENTS with optional location/geographical area of interest. Add some TAGS like ML, FINANCE, AGRICULTURE.
If seeking for an investment, describe your project or startup as much as you can without revealing the "secret sauce". List: amount you are looking for, what are you going to spend the investment on, your current team (1 man is also good!), and how do you plan to earn money.
If looking for investment opportunities, please specify area(s) of interest or specific project idea(s), how much are you willing to share, and the desired stake in the company or project. <comment><AUTHOR> SEEKING INVESTMENT | Greater Seattle Area | ML, MUSIC

Project or startup: Music streaming service with AI-generated music and lyrics

Seeking for: $200,000 investment for up to 20% stake

Spending on:

\- $180,000 for 1y salary for R&D

\- $20,000 for hardware purchase/rent for model training

Team: just myself, software engineer with ML background

Business model: streaming subscription

Some preliminary work: Google showed neural networks can be used to generate music in MIDI format ( [https://magenta.tensorflow.org/](https://magenta.tensorflow.org/) ), own project shows GPT-2 can generate song lyrics ( [http://billion.dev.losttech.software:2095/](http://billion.dev.losttech.software:2095/) , based on the initial small 117M GPT-2 release ). MIDI format supports lyrics tracks, so the two can be combined, producing karaoke-like experience. There are also singing voice synthesizers on the market, which could be used to automatically generate song recordings. Alternatively, real performers could record tracks.</comment>


Show HN: Monitoring Temperature/humidity on 433Mhz with Prometheus and Go - <AUTHOR> https://github.com/jckuester/weather-station <comment><USER2> Neat project. I created something similar but never could get the rf receiver to have any range. Any tips?

[https://timleland.com/wireless-temperature- sensor/](https://timleland.com/wireless-temperature-sensor/)</comment>


How to make your software build reproducibly [pdf] - <AUTHOR> https://reproducible.alioth.debian.org/presentations/2015-08-13-CCCamp15-outline.pdf <comment><USER2> Reproducible builds are _amazing_. Just think about it: you are assured that the binary you are using corresponds to the source code. It is one of those ideas that makes you think why wasn't this done before?

<comment><USER3> The reason it was not done before is that we did not find a solution to the "trusting trust" issue until quite recently. David Wheeler solved the problem and did his PhD dissertation on this in 2009: [http://www.dwheeler.com/trusting-trust/](http://www.dwheeler.com/trusting- trust/)

Once that was solved, reproducible builds became a lot more interesting as we no longer needed to trust the toolchain. As a result, all of the reproducible build projects mentioned in the PDF (debian, tor, bitcoin being the pioneers AFAIK) got started.

<comment><USER4> As a practical matter, how do you go about getting the trusted compiler for DDC? Does this include an audit of the source for that compiler and/or the path that the compiler source or compiler binaries take to their destination?

<comment><USER3> > As a practical matter, how do you go about getting the trusted compiler for > DDC? Does this include an audit of the source for that compiler and/or the > path that the compiler source or compiler binaries take to their > destination?

No, the important bit to realise about DDC is that you don't need a compiler you know to be trusted (otherwise, of course, there would be no point). You take two different compilers, and you just have to trust that they don't both contain the same backdoor.

The most concise description I've seen is in Bruce Schneier's writeup. Quoting him:

Suppose we have two completely independent compilers: A and T. More specifically, we have source code SA of compiler A, and executable code EA and ET. We want to determine if the binary of compiler A -- EA -- contains this trusting trust attack.

Step 1: Compile SA with EA, yielding new executable X.

Step 2: Compile SA with ET, yielding new executable Y.

Since X and Y were generated by two different compilers, they should have different binary code but be functionally equivalent. So far, so good. Now:

Step 3: Compile SA with X, yielding new executable V.

Step 4: Compile SA with Y, yielding new executable W.

Since X and Y are functionally equivalent, V and W should be bit-for-bit equivalent.

<comment><USER4> The first I'd heard of DDC was here, so I might misunderstand some parts of the concept. But Wheeler seems to state it pretty plainly in this summary:

> In the DDC technique, source code is compiled twice: once with a second > (trusted) compiler (using the source code of the compiler's parent), and > then the compiler source code is compiled using the result of the first > compilation. If the result is bit-for-bit identical with the untrusted > executable, then the source code accurately represents the executable.

I'd speculate that you need at least one of the compilers to be trusted otherwise they could both be subverted to produce X, Y that would produce matching V, W binaries with the attack still in place on both.

<comment><USER3> > I'd speculate that you need at least one of the compilers to be trusted > otherwise they could both be subverted to produce X, Y that would produce > matching V, W binaries with the attack still in place on both.

Ideally one of them is not compromised. But if both are compromised but by different backdoors, the resulting binary will not be bit-for-bit identical (as they include different backdoors). So you can still detect it, and that's really all DDC can do.

The only way to get a bit-for-bit identical binary from two compromised compilers is if they both have the same backdoor.

</comment></comment></comment></comment></comment></comment><comment><USER5> > A more radical extension to the former approach is to actually check > everything in your version control system. Everything as in the source of > every single tool. That's how it's working when you are "building the world" > on BSD-like systems. That's also how Google is doing it internally. To make > absolutely sure that everything is checked-in, you can even use "sandboxing" > mechanisms

> Google recently started open-sourcing the tool they use internally to drive > such large scale builds under the name Bazel. So despite its syntax that I > personally find hard to read, it's probably worth checking out.

Can anyone comment on the differences between Bazel and Debian's reproducible builds?

Is the "Google is doing it internally" the same as Bazel? (they are eating their dog food [1])

If it is then, does Bazel allow building from a reference VM or docker instead of building every tool and library from source?

What I'd like to know is what is worth adopting if you're in a small company (not a AmaGooFaceTwi).

[1] [https://plus.google.com/+RipRowan/posts/eVeouesvaVX](https://plus.google.com/+RipRowan/posts/eVeouesvaVX)

<comment><AUTHOR> This discussion of Bazel, by a Google Blaze user, identifies four issues for adoption of Bazel by OSS projects, [http://julipedia.meroh.net/2015/04/on- bazel-and-open-source....](http://julipedia.meroh.net/2015/04/on-bazel-and- open-source.html)

      1. Cross-project dependency tracking
      2. Software autoconfiguration
      3. It's not only about the build
      4. The Java blocker

<comment><USER6> What do you have to do to get Basel to "build" a target that its designers have never encountered? The biggest problem I have with modern build systems is that they invest a lot in building specific types of artifacts. For instance, you might be able to compile and link a C program in three or four lines. In exchange, they fail miserably to account for situations like statically linking raw binary data into an executable or facilitating the automation of a target image build. So it's usually easy to build a desktop application but not much else.

How easy would it be to automate a complete Android image build in Bazel?

</comment></comment></comment><comment><USER7> See also [http://media.ccc.de/browse/conferences/camp2015/camp2015-665...](http://media.ccc.de/browse/conferences/camp2015/camp2015-6657-how_to_make_your_software_build_reproducibly.html)

<comment><USER8> Amazing, I forgot to watch it. The security issues mentioned are ... impressive.

ps: the first minute seem silent but it's not a bug.

</comment></comment><comment><USER9> Another take of reproducible builds by Ted Unangst: [http://www.tedunangst.com/flak/post/reproducible-builds- are-...](http://www.tedunangst.com/flak/post/reproducible-builds-are-a-waste- of-time)

</comment><comment><USER10> This is really important work, hopefully it is completed as soon as possible.

It basically allows multiple reputable people to independently build the code and sign a statement that a given source code hash produces a given binary hash (and that the source code hash is the correct one for a given package), and have the presence of at least a certain amount of these signatures be verified on package installation.

This means that it will no longer be possible to backdoor Debian without changing source code by compromising the main build infrastructure.

</comment><comment><USER11> If you have any specifi cquestions, swing by #debian-reproducible on OFTC.

<comment><USER7> I did, thanks for your help - I think I'm one linker script away from a reproducible hello world.</comment></comment>


Show HN: Devmag.io – A community for developers and technologists - <AUTHOR> https://devmag.io

<comment><USER2> It wouldn't let me create an account directly and there's not enough information up front to convince me to sign in with Facebook or Google+.

</comment><comment><USER3> Damn, its pretty accurate the data it pulls from github, apparently my name is ricky ricardo and my tag is @ricky</comment>