Dreamise – Dream Giveaway Platform - <AUTHOR> http://erlibird.com/go/dreamise

<comment><USER2> You do realize that these types of titles just back fire on you. People would click the link, realize within 3 seconds that they were "rickrolled" and they close your page without even assesing if they might be interested in the info listed.</comment>


GitHub shuts off access to Aurelia repository, citing trade sanctions - <AUTHOR> https://twitter.com/eisenbergeffect/status/1240671036292485121 <comment><USER2> Hi HN, I'm the CEO of GitHub. Flagging this account was obviously a terrible mistake, and I apologize to anyone who was affected by it. We're investigating why it occurred and will make changes to make sure it doesn't happen again. I am glad that we restored access to the account in less than an hour after Aurelia filed their appeal.

For context on why any account flagging is ever necessary, unfortunately, every company in the world is required to comply with US sanctions if they do any business at all in the United States, e.g. serving US-based customers. This includes even interacting with US banking infrastructure. So being headquartered somewhere else doesn't help; you have to comply. And US sanctions as written do not allow us to provide commercial services or services which could be used commercially to sanctioned countries.

We are taking the broadest possible interpretation of US sanctions law to allow as much access to GitHub as possible and we are, as far as I know, the only major vendor to offer public repo access in US-sanctioned countries like Iran, Syria, and Cuba. I'm proud that we are taking this strong position to ensure developers everywhere can participate in open source.

I wish we could also offer access to private repos and still comply with government requirements. We have been advocating and will continue to advocate for broader developer access with the various government agencies involved.

<comment><USER3> Do you believe that trade regulations such as ITAR apply to publicly-available open source software? I do not¹, and it appears that your employees do not believe this either. GitHub is currently hosting multiple GPS implementations² that are clearly against this line in your ToS, in addition to also being against ITAR by not implementing speed limits for missiles:

"GitHub may not be used for purposes prohibited under applicable export control laws, including purposes related to the development, production, or use of […] long range missiles or unmanned aerial vehicles."

I think you should probably make a blog post explaining GitHub's stance on this issue.

[1]: [https://www.unr.edu/sponsored-projects/compliance/export- con...](https://www.unr.edu/sponsored-projects/compliance/export- controls/publicly-available)

[2]: One of which is [https://github.com/gnss-sdr/gnss- sdr](https://github.com/gnss-sdr/gnss-sdr). This repository does not implement ITAR-required GPS speed limits. Even if it was ITAR-compliant, the limits could easily be removed as it is open source software.

\</comment></comment><comment></comment><comment></comment><comment></comment><comment>----

Update: GitHub has updated their ToS to remove this line. It was present on July 27, 2019. The issue still stands with this current statement from their ToS ( [https://help.github.com/en/github/site-policy/github-and- tra...](https://help.github.com/en/github/site-policy/github-and-trade- controls)), which forbids ITAR-regulated software:

"Users are responsible for ensuring that the content they develop and share on GitHub.com complies with the U.S. export control laws, including the EAR and the U.S. International Traffic in Arms Regulations (ITAR). The cloud-hosted service offering available at GitHub.com has not been designed to host data subject to the ITAR and does not currently offer the ability to restrict repository access by country."

<comment><USER4> ITAR undeniably applies to software.

Whether it's open source or not is irrelevant. ITAR software cannot legally live on GitHub.com in any case -- it doesn't matter if the repos are public or private. [But a GitHub Enterprise install (self-hosted version only) can be compliant.]

I'm confused by your request for the company's stance, since it's not something up for debate... there is no room for them to take a stance on complying with the law. It's not up to GitHub at all.

<comment><USER3> Are you sure about that? Publicly-available open source software can be exempt from ITAR according to this page: [https://www.unr.edu/sponsored- projects/compliance/export-con...](https://www.unr.edu/sponsored- projects/compliance/export-controls/publicly-available)

<comment><USER4> If it's publicly available open source, it can't contain ITAR.

If there is existing open source that doesn't contain ITAR, then that's fine because it's beyond the scope of ITAR, so ITAR doesn't apply to that scenario. [Maybe this is the case you're mentioning?]

If it is ITAR, it can't possibly be publicly available open source. [How could it be possible to have publicly-available open source software that is also restricted to being only shared with U.S. citizens?]

Of course an ITAR project could pull in publicly available open source (e.g., dependencies), but that doesn't sounds like what's being discussed here.

<comment><USER5> This is just word games.

We can sensibly speak of tech that "would be" an ITAR violation to deliver "if it were not" open source. This is exactly the scenario under discussion. It seems very clear from the linked page that, e.g., GPS code that is released as free/open is, in fact, _not_ restricted by ITAR.

</comment></comment></comment></comment></comment><comment><USER6> GitHub has corrected the issue, restoring our organization access and web site. They have reported that the org was flagged as part of an automated process. The flagging occurred because we have two external contributors from Iran (non GH org members). They told me that there should have been a warning and they are investigating why that didn't happen. The CEO of GitHub also reached out personally to try to speedily rectify the situation.

<comment><USER7> Well, this sounds bad.

A few months ago GitHub banned access of Iranian developers (and devs who live in a few other countries) to private repositories and gists and now, with actions like this, even if it's by accident, they are threatening our chance of collaboration to public open-source repos because maintainers would be afraid that if they accept our contribution they may face consequences.

<comment><USER8> > maintainers would be afraid that if they accept our contribution they may > face consequences

But that isn't a result of GitHub's actions, if anything they are trying to protect maintainers by blocking Iranian contributions.

Sanctions are 1) implemented at a federal government level and 2) intended to make it almost impossible for the sanctioned country to get anything done. It's like not letting your kid take their Switch or iPhone with them to timeout. Yeah it sucks and makes everything awful, but that is exactly the point.

<comment><USER9> > But that isn't a result of GitHub's actions, if anything they are trying to > protect maintainers by blocking Iranian contributions.

By blocking the repository of the maintainers? Is that like "I'm just trying to keep you safe. I'm going to kill you so nobody can murder you"?

<comment><USER10> No, but by blocking Iranian contributions, as you cited in your content.

Blocking the repository isn't protecting maintainers, but this comment thread is about GitHub blocking contributions from Iran as well.

</comment></comment></comment></comment></comment><comment><USER11> This is pure speculation, but it seems that GitHub's ownership by Microsoft causes them to be significantly more strict with the types of content that they are comfortable hosting. Expect this to continue as they expand up and down the stack; once their npm acquisition closes you'll see this there too.

I think this should be a wake-up call to anyone staking their open source project on GitHub — if I let someone from a US sanctioned country contribute to my repo will I be banned? Hopefully mindshare moves to alternatives in due time.

<comment><USER12> This seems peculiar since Rob Eisenberg (author of that tweet and lead of Aurelia) _works for Microsoft_.

<comment><USER13> Makes sense if you think of them as separate companies (which is how they are run)

<comment><USER14> [https://nouhailler.tumblr.com/image/21516226342](https://nouhailler.tumblr.com/image/21516226342)

<comment><USER13> Maybe >5 years ago, culture has changed under Satya :)

</comment></comment></comment></comment></comment><comment><USER15> What frustrates me about these kind of things is how impersonal they are. How many orgs/users does GitHub sanction a day? Too many for it to be able to email the users and ask clarifying questions? Or even have a human dig in and double check what the algorithm says.

Basic human interaction would seemingly solve 99% of false account lockouts and takedowns. Even basic heuristics like this org has a repo with 11,000 stars, it isn't a new user that just signed up yesterday, we need to look into this deeper.

<comment><USER16> In a world in which online presence is an essential attribute of... commerce, professionalism, etc., deplatforming cannot be allowed to be so trivial to effect and difficult (in many cases impossible) to challenge. At some point human rights have got to include sufficient due process to deal with accidental or unjust deplatforming.

<comment><USER17> It's an interesting thought, but at the moment at least, things are still too fluid to really nail down how that would work. What is a "platform?" What is "deplatforming?" If Github kicks me off and I can migrate easily to GitLab, have I been "deplatformed?" Is it morally correct to tie Github's hands from locking someone's account if they're using their git repo to host CP?

We're getting there, but pulling it off is going to require a level of international cooperation that is rarely seen (and tends to give a few key players a lot of power; if we do this, I hope everyone's excited to be living under the US's notion of what morality looks like. Or Europe's. or China's).

<comment><USER16> > If Github kicks me off and I can migrate easily to GitLab, have I been > "deplatformed?"

Most definitely you have. Especially if the reason and process used by GH is likely to also be in use at GL.

> Is it morally correct to tie Github's hands from locking someone's account > if they're using their git repo to host CP?

The relevant question is: is it constitutional. In the U.S. I believe the answer would be a solid "yes" as to a Federal statute that adds due process protections for this, no different than with the many many Federal and State laws and regulations that have created civil justice recourse for specific kinds of torts.

Morality is a different issue, and it's much too easy to flip your question on its head: is it moral to deplatform people if doing so damages their ability to earn a living?

Indeed, there's no need to frame this as a moral question, and it's arguably foolish to do so. It is and should be only a question of policy, politics, and constitutional law.

Regarding politics, mine is a political argument.

Regarding policy, I think it's a good idea to give "little people" some minimal protections from "big people". This is quite standard around the world. There are going to be policy details to debate, but writ large, this is a no-brainer.

I already address the very likely U.S. consitutionality of such a policy.

> We're getting there, but pulling it off is going to require a level of > international cooperation that is rarely seen (and tends to give a few key > players a lot of power; if we do this, I hope everyone's excited to be > living under the US's notion of what morality looks like. Or Europe's. or > China's).

No. This can be done in each country w/o internaltional cooperation. Granted, GH might pull out of France, say, if they don't like French laws, and so on. But U.S. business will not leave the U.S. over this.

<comment><USER17> > Indeed, there's no need to frame this as a moral question, and it's arguably > foolish to do so. It is and should be only a question of policy, politics, > and constitutional law.

Morality drives the shaping of all three of those things, so framing it as a question of morality is unavoidable if one wants to do something other than the status quo (which is "A private service provider may choose to do business with or refrain from doing business with anyone for any reason that hasn't already been carved out by previous civil rights legislation"). I believe you immediately demonstrated this fact by stating as "policy" something that is a moral stance ("little people" deserve some minimal protections from "big people"). And we may do well to remember that the KKK is also "little people", as are neo-Nazis (and society has a vested interest in keeping both groups "little people").

All people should be treated equally as people in the eyes of the law, i.e. with empathy for their humanity. But when you divide groups into "little" and "big" by political belief, sometimes you do, in fact, find situations where the majority should suppress the minority (because the minority's belief is anti-human, and political beliefs are malleable).

</comment></comment></comment></comment></comment><comment><USER18> Let's take a moment and appreciate the copy and paste support response "If a user or organization believes that they have been flagged in error, then that user or organization owner has the opportunity to appeal the flag by providing verification information to GitHub. Please see our FAQ for the appeals request form." [https://twitter.com/GitHubHelp/status/1240682163193942018](https://twitter.com/GitHubHelp/status/1240682163193942018)

Is that an official GH account? It's old and the answers look legitimate but that one is certainly a really off-putting reaction.

<comment><USER19> It doesn't seem off-putting to me. The form is there for a reason. Filling it out is literally easier than explaining everything to a support person on Twitter point-by-point. If you want help, you can spend 60 seconds and fill out a damn web form.

<comment><USER20> "60 seconds and fill out a damn web form" that demands you submit a government-issued photo ID and selfie? Hell no.

</comment></comment></comment><comment><USER21> Have black hat people figured out what triggers this yet?

Looks like a new attack, where you make a few contributions to a project, then start proxying your logins through Iran for a while till everything you touch shuts down.

</comment><comment><USER22> Sanctions for online services are one of the worst things about working in this industry. Being forced to implement and maintain technical solutions to block access to every day citizens of certain regions because some guys in suits decided these are second tier humans is demoralizing as hell.

How are people supposed to rise up and depose or vote for less tyranical governments if they cannot access information, or use services that'll boost their businesses in the global market? Having had to implement things like this myself in the past, I just feel like puking when I do it.

And don't think about just ignoring these, as soon as you get bigger than tiny, your bank will threaten to freeze all your accounts and stop doing business with you if for some reason you let some Crimean or Iranian get onto your service and pay you for it.

What exactly is the plan? Are we expecting that individuals who disagree with their regimes would leave their country and their families? It just feels like cold blooded retribution with no care for the regular every day population.

<comment><USER23> >What exactly is the plan? Are we expecting that individuals who disagree with their regimes would leave their country and their families? It just feels like cold blooded retribution with no care for the regular every day population.

That it will impact the country economically and hopefully result in the Government changing coarse or for the People of the country to not want to live in a shitty place with a poor economy.

I find sanctions vastly better than the alternative at that level, which would be some sort of blockade or other military intervention.

<comment><USER24> That sounds good in theory, but in reality you end up with worse outcomes than doing nothing:

a) The target country just allows their citizens to feel the brunt of the sanctions while the ruling class hoards resources for themselves.

b) The target country starts a propaganda campaign to blame the sanction- issuer for all their problems, which the citizens mostly believe.

So ultimately you end up with regular-Joe citizens in the target country having a worse quality of life, while also being led to believe that _your_ country is the evil one.

Another poster hit the nail on the head: the politicians in the sanction- issuing country need to be seen as _doing something_ by their populace, regardless of what the result of that something is.

<comment><USER25> > The target country starts a propaganda campaign to blame the sanction-issuer > for all their problems, which the citizens mostly believe

Because it's at least partly true. They _are_ the ones issuing the sanctions.

<comment><USER24> Heh, an excellent point. Obviously the sanctioner's goal is for the sanctionee's citizens to understand _why_ the sanctions are in place, and ultimately blame their own government, but that can be a hard sell, even without a propaganda campaign.

</comment></comment></comment></comment></comment><comment><USER26> Without even delving on the perverse sanctions part, it should never be forgotten that the _whole point_ of git is that it's a distributed source control system. Grab your source and move it elsewhere. Heck, even an old forked gitlab community instance should work.

Github is good for the exposure, but it's their house, and so their rules apply, not ours. Don't rely on them to always be OK with you staying.

<comment><USER27> Every time something like this happens someone has to make this argument. This isn't just about the source, it's all the other tools like pull requests that Github provides. Git is only one part of Github.

<comment><USER26> Merge requests have been a gitlab feature since forever though. Like issues, and webhooks

<comment><USER28> Code search, access permissions, code owners, 3rd party integrations?

<comment><USER26> If you tried looking it up yourself instead of making me feed you info in what totally looks like bad faith that would be awesome.

<comment><USER17> FWIW, I have attempted to look it up myself, and unlike Github, GitLab doesn't appear to allow me a transparent view into their offerings in action without signing up to start my free trial. Which is a lot more engagement than Github requires of someone just trying to discover capabilities.

<comment><USER29> [https://about.gitlab.com/features/](https://about.gitlab.com/features/)

From what it looks like, the free trial is similar to GitHub's paid account but you can use the extra tools for free for the duration of the trial. Seems as transparent as GitHub.

Never used GitLab outside of running it myself but I think hosting OS software on GitLab.com is free.

<comment><USER30> There's also the feature comparison chart: [https://about.gitlab.com/pricing/gitlab-com/feature- comparis...](https://about.gitlab.com/pricing/gitlab-com/feature-comparison/)

You don't even need the trial. Just press "Register" to get the standard login page for GitLab.com. From there you can sign in with GitHub (or make an account) and explore the platform for yourself.

The trial is just for the paid subscriptions. The normal, free account has access to all of the platform's Gold features as long as the repos in question are public (or internal, just not private).

> Yes! As part of GitLab's commitment to open source, Gold project-level > features are available for free to public projects on GitLab.com. Gold > group-level features, however, still require a subscription, for reasons > explained here[0]. For organizations interested in free Gold features for > groups, we also offer free Gold and Ultimate to educational institutions and > open source projects[1].

Note that public repos inside a public group _do_ have access to Gold level features. It's just the _group_ level features that are restricted.

[0] [https://about.gitlab.com/handbook/product/#gitlabcom- subscri...](https://about.gitlab.com/handbook/product/#gitlabcom-subscription- scope-and-tiers)

[1] [https://about.gitlab.com/blog/2018/06/05/gitlab-ultimate- and...](https://about.gitlab.com/blog/2018/06/05/gitlab-ultimate-and-gold- free-for-education-and-open-source/)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER31> WTH? GitHub is owned by Microsoft. Rob Eisenberg, who posted that tweet, works for Microsoft.

There's so much about this I don't get, not least of which is the fact that despite what the headline suggests, along with the amount of bile still being spewed on this thread, Aurelia is back up and running, as are all its repos: [https://aurelia.io/](https://aurelia.io/), [https://github.com/aurelia](https://github.com/aurelia).

So, yes, GitHub properly effed up here, but they do at least appear to have backpedalled and fixed the problem quickly.

<comment><USER32> It got fixed quickly because of the very high profile nature of the project. What happens when it's one of our projects, and we aren't some bigwig at Github's parent company to complain?

</comment></comment><comment><USER33> Seems that Github has automated some repository banning actions.

3 days ago, the author of a repo got removed his account without reason and hours later got his account reactivated ([https://news.ycombinator.com/item?id=22593595](https://news.ycombinator.com/item?id=22593595)), after posting to hackernews.

As we see, the Aurelia repository were also removed, and hours later reactivated.

What caught my attention is that the banned user is from Russia and that Aurelia repository has got developers from Iran.

Is this a sign of Github country discrimination? Or is this a sign of Machine learning bias?

<comment><USER34> >Is this a sign of Github country discrimination?

It's a sign that Github strictly follows US sanctions which currently impact Crimea and Iran. They literally say in the messages for these closures that it's due to sanctions.

</comment></comment><comment><USER35> I can empathize that GitHub has to abide by laws more stringently now that it's part of Microsoft but oh boy does it's automatic flagging system need work.

One day I was randomly permanently banned because a hacker starred some of my public repos from hacked accounts (only ~6 stars btw). I had no involvement whatsoever, it was likely an attempt by the hacker to dilute the target of the repos they were trying to star. It took me ~2 weeks to appeal and they still blamed me for hacking even though the IPs of those accounts were different. My ban was eventually lifted but I doubt their system works nearly as well as it should.

</comment><comment><USER36> It looks to be restored: [https://twitter.com/EisenbergEffect/status/12407000629397913...](https://twitter.com/EisenbergEffect/status/1240700062939791362?s=20)

<comment><USER37> I guess it was a mistake.

</comment></comment><comment><USER38> What a debacle. If GitHub believes this is necessary to comply with sanctions, they should provide a "rather than shut me down, please block contributions that GitHub would consider sanctioned" switch.

<comment><USER39> Can't speak for others, but I for one wouldn't want this switch, and would be offended by it. I would defend people's rights to contribute to open source regardless of their nationalities by taking my project elsewhere.

<comment><USER40> Then you'd probably still want this switch, but expect to be notified of the block. Then you could move in an orderly fashion.

</comment></comment></comment><comment><USER41> So disgusting their response: "If a user"

Addressing someone in the third person is about a far from empathy as one could get. Clearly, the signal is strong to begin the exodus from Github as soon as practical.

They can no longer be trusted, and are no longer developer friendly.

</comment><comment><USER42> What is Aurelia? Why would it be sanctioned?

<comment><USER43> It looks like a JS frontend framework. I've never used it. I have no idea why it would be sanctioned. Bizarrely Aurelia 1.0 at [https://github.com/aurelia/framework](https://github.com/aurelia/framework) has a banner across its top indicating trade sanctions, but the new version Aurelia 2.0 doesn't [https://github.com/aurelia/aurelia](https://github.com/aurelia/aurelia).

Aurelia's developers suspect it's because they have contributors from sanctioned countries. That's the first I've ever heard of such a thing. [https://twitter.com/AureliaEffect/status/1240664151753551873](https://twitter.com/AureliaEffect/status/1240664151753551873)

EDIT: And the banner is gone... Just when I was going to save some screenshots.

<comment><USER44> My first question is: how does Github know that certain committers are from sanctioned countries? Do they have Github profiles showing they're from sanctioned countries?

Given the number of huge FOSS projects on Github, it's feasible to imagine that many major repos have code contributed by people from sanctioned countries.

I have no idea what their motive is, but it smells really political to me. I could see Github's argument if they violated labor laws by hiring or contracting with individuals illegally, but that doesn't sound like what happened here.

<comment><USER45> > how does Github know that certain committers are from sanctioned countries? > Do they have Github profiles showing they're from sanctioned countries?

Even if not in their profiles, you can pretty reliably detect a user's country from their IP address.

</comment></comment></comment></comment><comment><USER46> And I just finished setting up gitea([https://gitea.io/en- us/](https://gitea.io/en-us/)) on my server and mirrored all my repos. An elegant piece of software, setup was straightforward and took less than an hour.

</comment><comment><USER47> What am I missing? Seems fine to me: [https://github.com/aurelia/framework](https://github.com/aurelia/framework)

<comment><USER44> Github just reversed their decision.

</comment></comment><comment><USER48> If people just used git the way it was intended, as a decentralized protocol for editing and sending patches by email, we wouldn't have this issue. See [https://git-send-email.io](https://git-send-email.io)

</comment><comment><USER49> This looks like a terrible but honest mistake. The repo is already back, after something like an hour and a half. The . io website is not back yet, but I suspect that takes a moment to get back running.

<comment><USER50> It doesn't matter if it's an honest mistake, this sort of action alongside the canned HR response is completely unacceptable. Honest mistakes don't exempt your actions from being disgusting.

<comment><USER49> An action that is an honest mistake isn't disgusting; it is simply a mistake. We all make mistakes. Anyone who makes no mistakes is not doing anything useful.

What matters is doing the right thing _after_ the mistake is discovered. I agree that the canned HR response wasn't acceptable, but that is not all that happened. GitHub quickly restored the project - and that was the most important issue. In addition, GitHub has now posted an apology, and has also said that they will try to figure out how to prevent its recurrence in the future.

THAT is exactly the right way to handle a mistake: fix the problem, say sorry, and try to prevent its recurrence. Good show. I am actually _impressed_ with GitHub's response to this!!

I get the impression that part of your complaint is that "flagging" itself is disgusting. If that's the case, your ire is completely misdirected. This is required by US law for anyone doing business in the US. If you don't like it, that's fine; complain to the US Congress, who create the US laws. GitHub is simply doing what it _must_ do. In the US, and in most of the western world, the rule of law is still a thing (and a good thing it is!). Please point your disagreement at those who are responsible for it.

<comment><USER9> > What matters is doing the right thing after the mistake is discovered.

They didn't. They only did "the right thing" after it went viral on HN.

They did the same thing a few days ago to another developer, and only after it went viral on HN did they do the right thing. They were very aware that a) their flagging process is broken and b) their support process is non-existant unless you make your complaint go viral. The canned response is part of their strategy to filter out everyone that isn't large enough and they'll just ignore those complaints.

> This is required by US law for anyone doing business in the US.

It's required to do it automatically and wrong? I have some serious doubts.

</comment></comment></comment></comment><comment><USER51> Weirdest part of this is that the Lead Developer at Aurelia and the guy who posted this on twitter works at Microsoft which again is weird now that Github is part of Microsoft.

</comment><comment><USER52> And they've just bought npm!

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

</comment><comment><USER53> Note: sanctions against Iran are preventing them from buying medical supplies. Millions could die there from COVID-19.

<comment><USER54> My relatives live in Iran. Sanctions devasted the people's lives, not the government!

</comment></comment><comment><USER55> Are there any European hosted (and owned by a European company) alternatives to GitHub or GitLab?

<comment><USER56> Not european, but the non-US ones I know of are

\- [https://gitea.com/](https://gitea.com/) by the gitea project is hosted in China by a Chinese company. It's probably the safest one to use.

\- [https://bitbucket.org/](https://bitbucket.org/) by Atlassian is probably hosted in the US but is owned by a company headquartered in Australia.

Personally, I don't think searching for alternatives in other jurisdictions is the right way to tackle this issue. With the way things are devolving in terms of hosting reliability (i.e. getting automatically banned by big tech for vague reasons) and US laws that overstep their boundaries, the best way is to host mirrors across as many services and networks as possible and switch your workflow (incl. issues) to a mail-based one.

</comment></comment><comment><USER57> time to migrate and redeploy, perhaps reface things and setup a new repository.

the trade sanctions thing is about this repository involving paid service:

[https://github.com/aurelia/aurelia](https://github.com/aurelia/aurelia)

"Due to U.S. trade controls law restrictions, paid GitHub organization services have been restricted. For free organization accounts, you may have access to free GitHub public repository services (such as access to GitHub Pages and public repositories used for open source projects) for personal communications only, and not for commercial purposes. "

so it looks like its not the most stable place to make money.

</comment><comment><USER58> This is laughable. What trade sanctions would apply to a JS frontend framework? Insane.

</comment><comment><USER59> I thought this was about the music education software by the same name

</comment><comment><USER60> Since when is it Github's job to lock others repos at all?

</comment><comment><USER61> Read the whole Twitter thread and all comments here and I still don't understand what trade sanctions are applicable here.

<comment><USER62> Probably none, and some automatic thing triggered in error.

</comment></comment><comment><USER63> Github was cool when git was new years back - but these days, and especially given how git inherently is not centralized, it is not very clear to me why we all cling to github. With a little work, all that it offers can be done without any help of a centralized server/corporation.

</comment><comment><USER64> It's been removed from AUR packages as well, [https://lists.archlinux.org/pipermail/aur- requests/2020-Marc...](https://lists.archlinux.org/pipermail/aur- requests/2020-March/038625.html)

</comment><comment><USER65> Does any license in particular effect the trade sanctions? MIT for example in my eyes would be the most lax, does that mean that it does not apply for trade sanctions ?

Open source based on government sanctions kinda feels like some oxymoron.

</comment><comment><USER66> It's back [https://twitter.com/EisenbergEffect/status/12407052563898900...](https://twitter.com/EisenbergEffect/status/1240705256389890048)

</comment><comment><USER67> The funniest thing to me is that the twitter account complaining is a Microsoft employee and Github is owned by Microsoft but the only way he could complain and be heard is via twitter? Amazing!

</comment><comment><USER68> TIL about Aurelia - the streisand effect in full force :)

</comment><comment><USER69> I had never heard of this framework until this happened, but now I am going to check it out. Probably a very good bit of accidental publicity

</comment><comment><USER70> Would having a decentralized repository be a good idea (one that is not subject to this kind of corporate/political issue)?

</comment><comment><USER71> And in that moment Hacker News was enlightened.

</comment><comment><USER72> Are there any hints on what other countries/regions might be getting on that sanctions list soon?

</comment><comment><USER73> GitLab CEO here, thanks Nat for doing everything you can do to keep open source accessible around the world. We have to comply with the same restrictions and respect greatly that GitHub is taking the broadest possible interpretation of US sanctions law to help users.

</comment><comment><USER74> I wonder what their timeline for fixing a mistake like this is when it's just some plebe.

I bet it aint an hour.

</comment><comment><USER75> Isn't this a first amendment violation? Are we not on board with the notion that code is speech, and that the constitution applies to everyone, not just US citizens?

With those things in mind, I don't understand how the Iranian peoples' free speech rights can be infringed just because their speech is in the form of code.

<comment><USER27> That's not how the First Amendment works. It applies to the government, not private businesses.

<comment><USER76> I think that's not right, because the reason the company is doing the censoring is to comply with sanctions imposed by the government. If the US says you can't host content praising Iran, and GitHub takes it down to comply, that's a 1st Amendment violation.

However, code seems to be in a strange place, neither clearly speech nor clearly not-speech.

<comment><USER75> I argue code is absolutely protected speech. The government ran away[1] from a recent case that would've settled the matter conclusively.

[1] [https://www.pbs.org/wgbh/nova/article/is-code-free- speech/](https://www.pbs.org/wgbh/nova/article/is-code-free-speech/)</comment></comment></comment></comment>


Adblock Plus Is Launching an Ad Exchange - <AUTHOR> http://www.wsj.com/articles/adblock-plus-is-launching-an-ad-exchange-1473768022 <comment><AUTHOR> So AdBlock plus now sells advertisements.

I have no problem watching ads on legitimate sites and generally I'm avoiding sites with many ads even if the content is legit.

I understand that some ads must exist for good known reasons, but the way that adblock tries to monetize the whole thing, is something I don't like.</comment>


The Engineering Behind Twitter's New Search Experience - <AUTHOR> http://engineering.twitter.com/2011/05/engineering-behind-twitters-new-search.html <comment><USER2> good stuff</comment>


140 Gbps consumer broadband satellite launches - <AUTHOR> http://www.bbc.co.uk/news/science-environment-15358121?

<comment><USER2> This satellite looks awesome, but it's basically being put into service by the satellite ISP WildBlue, which ViaSat bought in late '09. My parents live in a rural area and rely on WildBlue for their internet (they have a dish on the roof), so really this headline was deceiving for me. Why? you wont get 140Gbps of internet speed - WildBlue gives you satellite internet in 7,10,12Gb (etc) TOTAL bandwidth per month. So they will break bandwidth up from this satellite to handle traffic for another 30+ million customers, which is pretty huge, but you definitely wont be getting some super-rapid internet service, unless somehow they change their pricing.

Other drawbacks from WildBlue or satellite internet (in case you're thinking about signing up): \- Limited (low) monthly total bandwidth caps = no online movies, Netflix, or even working online more than 3-4 hours daily. \- high latency, meaning VoIP services like Skype absolutely don't work. No online telephone calls, etc. \- Pretty costly at around $40/month for just 7Gb of total bandwidth. But there aren't many other options in rural areas.</comment>


Ask HN: Building a streaming website - <AUTHOR> Noob programmer here. Any advice on how to build a simple streaming site (think Twitch.Tv)?<p>I'm new to web development and would love to build my skill set by working on a video hosting website. <comment><USER2> maybe not quite, but some interesting sites:

obsproject.com tvheadend.org linuxtv.org

<comment><AUTHOR> Thanks!</comment></comment>


NetSuite to file IPO (Ellison to make $500M) - <AUTHOR> http://www.marketwatch.com/news/story/story.aspx?guid=%7B5C8D133C%2DD17B%2D42F3%2D881F%2D35FBDC10386F%7D&siteid=rss <comment><USER2> The problem with Netsuite and Salesforce.com is their business model. For instance, until last year Netsuite's sales-and-marketing expenses exceeded its revenue. In the most recent quarter, netsuite spent 78% of it's revenue on sales,marketing, and administrative expenses. And it still lost money.

So, Netsuite's customers aren't paying for software with a side of salespeople, they're paying for salespeople with a side of software.

If Netsuite and Salesforce.com's financial statements are the rubric by which we can judge the SaaS business, then it seems that SaaS is an inferior business model to traditional packaged software.

Someone needs to fix the SaaS business model to mitigate the sales-and- marketing expenses.

</comment><comment><USER3> This is the sort of unsexy startup more hackers ought to think of starting.

</comment><comment><AUTHOR> This is good news for the enterprise side of the web software business. Now there are fewer reasons for wimpy CIOs to avoid using on-demand software suites, if both CRM (Salesforce) and ERP (NetSuite) are online.</comment>


Why is it faster to process a sorted array than an unsorted array? (2012) - <AUTHOR> https://stackoverflow.com/questions/11227809/why-is-it-faster-to-process-a-sorted-array-than-an-unsorted-array?m=1 <comment><USER2> By far the most interesting part of this post is the update with newer compilers. Intel's compiler, in particular, makes an awesome optimization.

Edit: The update is not new, either. Just the part that I found interesting. Apologies for any confusion.

<comment><USER3> The update with the newer compilers was done back in 2012. There have only been minor changes since then. (Not to say that it isn't interesting, but so that people don't go to the post expecting new content and get disappointed)

<comment><USER2> I updated to make this clearer at the top level. Thanks!

</comment></comment></comment><comment><USER4> The question I have, which I do not see answered after a quick glance of the top responses, is: What is the total time of sorting + good branch prediction loop, versus not sorting and bad branch prediction loop? Does the good branch prediction save more time than it cost to sort the array, on modern processors? What about old processors with shorter pipelines?

<comment><USER5> I feel like branch prediction is only a small part of the performance boost. If I do the same in python 2500 times for an array of size 40k, I get 0.00183519964218 vs 0.00163079910278 or ~11% boost.

I imagine the 6x factor probably is because the optimizer unfolds the array/loop structure.

edit: sorting the array increases the time by about 4x if you include the sort time, so its not worth it

<comment><USER6> You can't use the Python implementation to get insight into what's happening with a C++ implementation, because the overhead of operations in Python may mask a real effect that can be seen in C++.

<comment><USER5> not directly, but information is information. I am also more skeptical that branching alone would result in a 6x increase in run time.

We know optimizes unfold loops as well as arrays. it doesnt take a profound leap in logic that the optimizer may have unfolded everything and realized certain code was not going to change the state of the program, thus removed it. Maybe it didnt, but then again maybe it did.

<comment><USER6> > information is information

It's information, but not worthwhile information.

> It doesnt take a profound leap in logic that the optimizer may have unfolded > everything and realized certain code was not going to change the state of > the program, thus removed it. Maybe it didnt, but then again maybe it did.

Prove it. This article has had a ton of traffic. If you see the thing that everyone missed, a lot of people will be very impressed with you.

</comment></comment></comment></comment></comment><comment><USER7> The update at the very end is pretty awesome. Basically saying, some compilers will optimize this for you now so there's no difference.

It would be interesting to see how Clang/LLVM do...

</comment><comment><USER8> I had a surprise with sorting in JavaScript a few days ago, details also on SO.[0]

TL;DR: Chrome uses quick sort and we managed to hit its worst case by pre- ordering the input alphabetically on the server side.

[0] [https://stackoverflow.com/questions/46228556/how-is-array- so...](https://stackoverflow.com/questions/46228556/how-is-array-sort- performance-affected-by-the-initial-ordering-of-the-input)

</comment><comment><USER9> Needs a "(2012)" at the end of the title. Also I'm not sure when cmov changed to 1 cycle latency, but it might effect some of the tangential topics here.

</comment><comment><USER10> It appears to me here that it is trivial for a compiler to use a conditional instruction (instead of a branch) here. As a result, I'm very surprised that it didn't. Any idea why this is the case?

<comment><USER11> Correctly predicted conditional branches are faster than conditional instructions, because they add fewer dependenies. The programmer usually has better knowledge of whether the branch is going to be 50/50 or somewhat predictable, and is thus better suited to make that choice.

[http://yarchive.net/comp/linux/cmov.html](http://yarchive.net/comp/linux/cmov.html)

<comment><USER12> While that post is technically correct (conditional moves have high latency because you can't dispatch the instruction until the conditional variable has been evaluated), they're still good in many cases because there's _also_ no immediate dependency on the output of the conditional move. You might end up with 10 conditional moves in your reservation stations, but that's fine if all you're doing is summing up the results. You don't actually act on that sum until the end of your loop, so it's OK if it takes a few cycles after the loop to flush all those pending conditional moves out of the reservation stations.

<comment><USER9> Cmov is 1 cycle latency now. Cant remember when there change occurred but AF's info should point the way.

<comment><USER13> The issue isn't the `cmov` itself, which is extremely forgiving nowadays (4 per cycle!), but the fact the `cmov` introduces a dependency on both inputs and the condition. A predicted branch introduces a dependency on _only_ the predicted input: the other input is never calculated and the condition is checked after-the-fact.

</comment></comment></comment></comment></comment><comment><USER14> This is a fabulous explanation that I think a novice programmer could readily grasp.

<comment><USER15> Agreed. StackOverflow could make a lovely book with these kind of high quality answers. Stuff's gold.

</comment></comment><comment><USER16> I'm currently taking an OMS CS course in High Performance Computer Architecture and recently completed the branch prediction lesson. It is a free course on Udacity. Here's the source: [https://www.udacity.com/course/high- performance-computer-arc...](https://www.udacity.com/course/high-performance- computer-architecture--ud007)

Lesson 3 covers pipelines and lesson 4 covers branches. Milos does a great job of explaining "How It Works" for something that is really a hidden layer under the CPU.

<comment><USER17> Thanks for sharing, this course looks interesting. Cheers.

</comment></comment><comment><USER18> This is a re-occuring duplicate, last posted 3 months ago, then twice again a year ago. Should be tagged [dupe].

</comment><comment><USER19> Some of the suggested ways to avoid the branch are bit manipulation (which is not necessarily portable) and the ternary operator (which seems hardly different from an if-else, though maybe the compiler usually treats it differently). It seems like another way would be sum += data[c] * (data[c] >= 128); which adds 0 when the condition is false.

<comment> mark-r Many processors have an instruction that will select between two operands depending on a condition. That can be faster than a branch. Although a sufficiently intelligent compiler would be able to determine that the instruction could be used in an if/else situation.

</comment></comment><comment><USER20> My immediate reaction would be to think of the entropy of the information in the array. Sorted sounds like energy was spent to put more information into that array. Intuitively, the lower entropy of a sorted array should help us predict and make better decisions along the way of searching for things in the array. Completely unsorted arrays give us less information to work with: the lack of order certainly can't help us make decisions!

</comment><comment><USER21> Read a little further down to WiSaGaN's answer. There's an excellent discussion of the optimizations afforded by the cmovge instruction that is typically generated for the C ternary operator and how its implementation in the CPU pipeline allows it to avoid the branch misprediction penalty.

He references a textbook as well "Computer Systems: A Programmer's Perspective (2nd Edition)". Just bought a copy.

<comment><USER16> See this also for a case against CMOV predicates: [http://yarchive.net/comp/linux/cmov.html](http://yarchive.net/comp/linux/cmov.html)

</comment></comment><comment><USER22> After its sorted you could add a break condition when the array is less than 128 that way it would make it faster.

<comment><USER23> This is just a simple example for this kind of situation.

Of course, you could make it faster by removing everything under 128 from the array before starting the loop, but it's not really the point here.

</comment></comment><comment><USER24> When I look at the code, I'm under the impression that will generate always the same output because the random seed is fixed (besides the timer). Given current tech, could a compiler see that and just reduce the computation to a simple value ?

<comment><USER25> Sort of. If rand() wasn't built into the standard, it would be impossible because you could override it at link-time with another function that connects to your database or something. And the linker runs after the compiler.

But because it's built-in, the compiler might be able to infer more about it, just like it reduces:

printf("x");

to

putchar('x');

</comment></comment><comment><USER26> (2012)

<comment><USER27> Does this time this was posted really have any relevant bearing on the content here?

<comment><USER28> Among other things, for people to whom the title sounds familiar it gives them a hint that it's the same article they remember, not something brand new.

<comment><USER29> I was quite certain that this was the famous post with the railroad junction picture before I followed the link. This was submitted 3 times already (but only sortof gained traction once):

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

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

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

I am not against resubmissions, but if it is an older post the year should be in the title.

</comment></comment></comment></comment><comment><USER30> Technically the branch prediction benefit comes from partitioning the array around the critical value 128. Sorting is not necessary. Partitioning may be faster.

</comment><comment><USER31> It's simple.

Cache, baby! Cache!

To fill in the blanks: Computers, CPU, RAM, and other Storage devices are well optimized for sequential reading and writing.

</comment><comment><USER32> Imagine that as an interview question!

<comment><USER33> Yep, the best interview questions are ones you yourself would fail before 2017.09.15 but would pass after 2017.09.15 based on having read a HN article.

This interview question is great for three reasons:

1\. It identifies that someone is you.

2\. It separates the bad-coder you (before 2017.09.15) from the good-coder you (after 2017.09.15). This means that it is immune from generating a false positive on a poor candidate due to time travel.

3\. It identifies cultural fit: the person reads the same news articles you do. If you waste time reading random hacker news articles, you're going to want to hire people who do the same. _Especially_ ones who were around and not too busy on exactly 2017.09.15! It easily weeds out people who were on vacation on that date, for example.

What I especially like about this is that it has nothing to do with anyone's code. (After all, anyone who works at a level that low can answer it very easily without having read this stack overflow question, so it's a strictly orthogonal puzzle: it's only hard for people who don't need it!)

You should go ahead and add this to your list of interview questions! In fact, why not make it the only one?

(It also avoids the fuss of having to come up with questions in any way related to the work that a candidate will be doing, which, in case the above sarcastic comment wasn't clear, is what you should actually be doing.)

<comment> mark-r OK, we get your point. But consider that there are jobs where this stuff is actually important, and it's useful to have working knowledge. If you were actually going to ask this in an interview, you would obviously want to ask something different but along the same lines, just in case the candidate was familiar with this post. But that goes for many interview questions.

<comment><USER33> For the jobs where this is actually important, this isn't a good interview question - it's not subtle/deep enough. (There are many deeper questions for those jobs - this one is a basic intro level question for a job such as that one.) The reason I enumerated so many ways this is wrong isn't to be funnier: it's because I really want people to stop doing this.

</comment></comment></comment></comment><comment><USER34> Compare with Hash

</comment><comment><USER35> Excellent answers

</comment><comment><USER36> Imagine if words in your dictionary wasn't sorted and you will have your answer.

<comment><USER37> Why would you care, if you were reading them sequentially, like the code here is doing?</comment></comment>


NeuroEvolution – Flappy Bird - <AUTHOR> https://xviniette.github.io/FlappyLearning/ <comment><USER2> This is one of these fantastic "all that is done with so little code?!" moments.

Amazing that this can be done in 300 lines of perfectly readable JS without any libraries. And the author apparently wrote it in 2 days. Great intro to genetic algorithms and reinforcement learning. Universities should teach like that.

Edit: Somebody has asked about the big picture how the thing works:

You use a neuronal network to decide at each step to flap the birds wings or not. That is the only output. The input is only the birds height (y-position) and the height of the next hole. ([https://en.wikipedia.org/wiki/Feedforward_neural_network](https://en.wikipedia.org/wiki/Feedforward_neural_network))

The question now is how to find the correct weights for the net.

That net is not trained in a traditional supervised way like with gradient descent (which would be more complicated). Instead it uses a genetic algorithms to find new weights for neuronal networks of future generations. That is use some of the best individuals. Some randomly generated ones and some created by breeding from existing individuals. ([https://en.wikipedia.org/wiki/Genetic_algorithm](https://en.wikipedia.org/wiki/Genetic_algorithm))

And that's basically it in this case.

<comment><USER3> These are the exactly gems that I am constantly in search of, and thrilled every time I come across one.

This is going to turn out to be a rant, but sometimes it feels like there's a culture of solving problems by a philosophy of "let's throw more money at it, more technology at it, more people, more unnecessary abstraction layers, complexity and bloat - it's bound to be solved eventually". And with enough fire power, it usually is - but at what cost... I'm not sure what the source of the problem is though, and it's not only with code. Many times I struggle to understand certain concepts via professional literature, and when I finally understand them, I'm puzzled as to why they are taught in a way that if I didn't know better, I'd assume a deliberate attempt to confuse the reader instead of making the learning simple, intuitive and fun.

Exactly the same applies to code I've had to refactor and sometimes rewrite over the years. Obviously, some of it has to do with trying to get a product out in crazy schedules which requires making compromises, but I can tell the difference between compromise and "I don't really care" attitude, and I'm talking about the latter. It's a pity though - not only for the one that has to sort out and sometimes clean up the mess, but also for the one that creates it. Things are so much more fun where you care and are passionate about what you do, that I'm sorry for those who are missing out on it.

End of rant. Not sure it belongs here but had to get it out of my system :-)

<comment><USER4> Sounds like you are noting that brute force is a very effective technique. Combined with explaining being a tough skill.

It is seductive to want things to be elegant. It is costly to wait for the elegant solution.

<comment><USER3> If that's all it was then I wouldn't bother to bring it up. What I'm saying is that more focus on the beauty of a solution (e.g robustness, scalability, flexibility, _simplicity_ ) can be a more financially sound solution in the long run than brute force. Of course, I'm not holding my breath for this to become the norm since using brute force to "get what we want now" is popular because it gets fast results (and this not limited to the software industry) - I'm just suggesting the real costs come later.

As for explaining being a tough skill - what I find in common with the previous point is the lack of stress on keeping things as simple and obvious as possible. If you truly understand something, you should be able to convey that understanding assuming you really want to - it just takes investment, usually by asking yourself why it is obvious to you, then putting yourself in the other party's shoes and then finding the shortest and clearest path to bring them from where they are to where you are. In my experience it's not a tough skill - just requires introspection into your own understanding and not assuming anything about what the other person understands.

<comment><USER4> I was not trying to dismiss what you said. If anything, I was condensing it into my understanding.

The basis is not that brute force is better. The essence is most of us are not seeking an elegant solution to a problem. We are seeking a solution to a problem. Often, just getting that answer is all that matters. Finding a more concise way to get it is something I fully agree that someone should be trying to do. And, in the long term, it is a huge boon if it is found. For most tasks, though, the original solution is all that was needed.

</comment></comment></comment></comment></comment><comment><USER5> Interestingly, the updates are done on the basis of only 2 external inputs [1]: the height of the bird in the screen and height of the aperture in the next pipe. Using only these two parameters the neural network decides whether to flap or not.

I would had expected at least also the horizontal distance from the next pipe...

[1] [https://github.com/xviniette/FlappyLearning/blob/gh- pages/ga...](https://github.com/xviniette/FlappyLearning/blob/gh- pages/game.js#L147-L150)

<comment><USER6> Wow, that's really unexpected.

This isn't my field, but given the simplicity of the inputs and network, and the way commenters are seeing the demo achieve perfect play after anything between 2 and 200 generations, it makes me wonder if this isn't more of a brute-force search than actual learning?

That is, it smells like there's a "correct" set of neuron values - where any genome within some tolerance of those values wins forever, and any other genome dies quickly. If that's the case, the system can't really evolve towards a solution, can it? It would just cycle randomly through lots of genomes that die immediately, until by pure chance one lives forever. I only tried the demo a few times but that's what it looked like it was doing.

<comment><USER7> "All" evolutionary algorithms are basically a local search with smart heuristics. Where a local search is a brute-force where you move in small directions based on feedback on where you are in the solution space.

<comment><USER6> I understand how the algorithms work. What I'm suggesting is that the demo seems to behave like a hill-climbing algorithm that's been unleashed on a terrain that's flat everywhere except the solution.

<comment><USER7> Ah, I see what you mean now. Yeah, the problem space seems a bit simple. I never see any "learning" before it suddenly achieves perfect play.

</comment></comment></comment></comment></comment><comment><USER8> At generation 83, a single bird emerged that successfully navigated through several hundred columns (current score 100000+) and showed no signs of failing.

It took a few dozen generations to find versions that would make it through a few columns if those columns had gaps without too much vertical distance between them. Somewhere in generation 60-70, I could see versions figuring out how to transition between heights, but failing by overshooting, or not accounting for gravity on the far side of the gap. But once it figured out how to transition between distant heights, it had something that kept working.

GIF of the successful bird: [https://imgur.com/a/A0li8](https://imgur.com/a/A0li8)

<comment><USER9> took 230 generations for me to do anything then it just went from dying within the first 3 pipes to mastering it within 4 generations

<comment><USER10> On my first run, 2 individuals learnt(?) perfect play in 3 generations.

<comment><USER11> On my second run, 3 individuals seemed to have learned perfect play by gen 8, but after successfully navigating through dozens of pipes, two of them died and one continued indefinitely.

</comment></comment></comment></comment><comment><USER12> This reminds me of a section (I think it might be the beginning) of "Surely you're Joking, Mr. Feynman" where he recounts fixing radios as a youngster, and the outrage of a client of his that he at times would just sit and stare at the radio. Apparently the guy went around town telling people about this incredible thing he had witnessed -- this kid he knew fixed radios "by thinking."

For every incredibly complicated algorithm designed to solve some really huge problem and deployed at massive scales, there are another thousand little problems at a far lower scale. I did a project at a school once using a GA to automatically create class rosters based on gender balance, student social networks, and grade distribution. This used to be a two-week long guidance counselor project at the school. Now they press a button.

Everyone in this forum clearly understands the impact that software is having on the world. But nevertheless, I still think we underestimate the impact that a more computationally literate society with more readily available computing power can have. I think examples like this excellently written piece of code highlight that.

Here is one -- admittedly very bright -- person who can from the comfort of his browser come up with such a fascinating and ingenious solution to this computational problem. Yes, it is being used for flappy bird, but this would easily extend to maybe a whole set of domain of problems that he/his company/his community could be facing. Yes, it is flappy bird, but this alone could serve as the motivation for an incredible course in a high-school dealing with topics from coding to the theory of evolution. "The Evolution of Cooperation" had a similar effect on me -- Axelrod uses nothing but very elementary Algebra to make such a strong and insightful argument that got me thinking like nothing ever had before.

Here's hoping we make this kind of "play", and this sort of thinking, as widespread as possible in society.

</comment><comment><USER13> When I first watched it, nothing changed for about 200 generations (thanks for the x5 speed up). I wanted to comment on that, but decided to reload first. Now my 12th generation is flapping for a good two minutes while im writing this comment.

It seems only the second time there was machine learning involved.

<comment><USER14> Evolution is generally characterized by 'punctuated equilibrium', it sounds like you just started on a plateau.

</comment></comment><comment><USER15> Can anyone give me insight on where the code learning is? I cloned the repository and after a quick glance I don't see where the "meat" is.

<comment><USER16> It is a using a genetic algorithm so learning lies in the mutation and crossover of chromosomes as well as selection of the fittest individuals.

[https://github.com/xviniette/FlappyLearning/blob/gh- pages/Ne...](https://github.com/xviniette/FlappyLearning/blob/gh- pages/Neuroevolution.js#L172)

<comment><USER17> It's also using a simple neural network, which is the target of the genetic algorithm, if I understood it right. I haven't seen this combination often - does that make sense in general, or is this just interesting as in playing around with those concepts?

<comment><USER18> it's a pretty standard procedure to train NNs through GAs but usually not very efficient (e.g. compared to backtracking).

in some cases you might lack an easy way to calculate a fitness score out of the NN performance, which is needed to run the GA.

i tried training a simple NN with a stupid hill climber some time ago but quickly hit a roadblock even with very few neurons because of local minima ... or maybe bugs.

i guess for more complicated problems the pure GA training method might just not be "cost effective" (i.e. time/quality tradeoff).

<comment><USER7> > _it 's a pretty standard procedure to train NNs through GAs but usually not > very efficient (e.g. compared to backtracking)._

Different applications, though. Backtracking in the normal sense needs input and expected output (e.g. lots of training data), while GA/EA learns to solve it without explicit wrong/correct actions, just the score at the end.

</comment></comment></comment></comment></comment><comment><USER19> Hmmm.. I made the pipes move up and down and now the neural network isn't doing so well :P

I've added "vertical velocity of next pipe" and "distance until next pipe" as inputs as well as upped the hidden layer neurons to 4 - anyone have any other ideas to improve its performance?

</comment><comment><USER20> As somebody who's never looked into this kind of task before, I couldn't believe it was powered by a ~300 line file and not some massive library.

Really awesome.

</comment><comment><USER21> Ahh yes, this is very interesting although I agree with many of the posters here that the model is probably too simplistic even for demo purposes.

For programmers there are even more striking examples of AI out there, complete with code, documentation and explanations.

Check this out:

[http://www.primaryobjects.com/2013/01/27/using-artificial- in...](http://www.primaryobjects.com/2013/01/27/using-artificial-intelligence- to-write-self-modifying-improving-programs/)

In me this sparked a months long fascination with genetic algorithms solving programming puzzles with a few sets of 'initial memory states' and 'desired memory states'.

The articles start with very simplistic generated programs, and end with a sophisticated model able to generate guess-the-number games using loops, conditionals and handling input from users.

</comment><comment><USER22> Generation 7 produced a perfect result here. I think the underlying problem is just too easy, really.

</comment><comment><USER23> This is really cool! I am at generation 17 and it shows already no signs of failing.

</comment><comment><USER24> This is really cool, and I'm nowhere near smart enough to understand fully how it works, but I'm wondering. Is the "computer" blind in this case? It doesn't seem to understand, even after 50~ runs, that it needs to aim for the opening. It seems to simply go after luck, hoping that some line up. And if it lines up a few times, it will get further, so it is learning something, but still not seeing the change the next time.

Edit: Seeing the new comments here, it seems like it only starts learning after you refresh once or twice. Very cool!

</comment><comment><USER25> Hit 1M points, 73 generations! Little guy just keeps on going. [http://imgur.com/a/HFwRC](http://imgur.com/a/HFwRC)

</comment><comment><USER26> Where can i learn more about NeuroEvolution or similar algorithms?

It's amazing this fits in thos LoC, but i don't see the total picture.. Any books you can recommend?

<comment><USER2> The big pictures in this case is:

You use a neuronal network to decide at each step to flap the birds wings or not. That is the only output. The input is only the birds height (y-position) and the height of the next hole. ([https://en.wikipedia.org/wiki/Feedforward_neural_network](https://en.wikipedia.org/wiki/Feedforward_neural_network))

The question now is how to find the correct weights for the net.

That net is not trained in a traditional supervised way like with gradient descent (which would be more complicated). Instead it uses a genetic algorithms to find new weights for neuronal networks of future generations. ([https://en.wikipedia.org/wiki/Genetic_algorithm](https://en.wikipedia.org/wiki/Genetic_algorithm))

And that's basically it in this case.

</comment></comment><comment><USER27> I got a perfect evolution... on generation 1. Sooo I guess who needs genetics when you're born perfect?

(Naturally I came to the comments because I thought this was BS)

</comment><comment><USER28> I accidentally left this open in another tab for several hours and it got to over 550k score on generation 35. That was fun to see!

<comment><USER29> Here on generation 33 the games started to have more duration, more than 100k score. Curious.

EDIT: actually generation 33 is still happening, even on "5x" mode, 260k points and counting. Looks like it totally got how the game works.

</comment></comment><comment><USER30> The first time I ran it, it seemed to have "learnt" perfectly after 4 generation ... Now im at 16 still no luck.

</comment><comment><USER31> For fun, try replacing the setTimeout usage in game.js with calls to setImmediate[+]. My gen 57 birdie (x4) is increasing its score by approx 2,000 points/sec.

[+] [https://github.com/YuzuJS/setImmediate/](https://github.com/YuzuJS/setImmediate/)

</comment><comment><USER32> awesome! if anyone is interested in this, i wanted to show around my similar neuro-evolution toy, pond: [http://maxbittker.github.io/pond/](http://maxbittker.github.io/pond/)

these agents live in a world where they're trying to find and eat food

</comment><comment><USER33> Cool. 16 generations and that's it!

</comment><comment><USER31> Exercise: can you find in the Neural Network Zoo the closest match for the Machine Learning code that powers this demo?

[http://www.asimovinstitute.org/neural-network- zoo/](http://www.asimovinstitute.org/neural-network-zoo/)

</comment><comment><USER34> My 3rd generation flappy bird seems to be invincible.

[http://i.imgur.com/Zz82dp4.png](http://i.imgur.com/Zz82dp4.png)

Will update when/if it dies.

EDIT: How lucky did I just get? Still going at 100k+

</comment><comment><USER35> Gen 37 on Chromium

Not worked on FF, maybe it has to do with my plugins/privacy settings.

</comment><comment><USER36> Watched this for a solid three minutes and flappy birds never made it past the third column. Painful.

Edit: generation 25 got 10k points and was continuing onward when I stopped. Beautiful.

</comment><comment><USER26> I've i'm not mistaking, the deciding factor should be how many pipes it past.

But here it is: "should it flap the wings or not"

What's the difference? Is this a better way?

</comment><comment><USER37> When I closed it (played some games, then checked on it after about 1.5 hours), it was generation 22, Alive 2/50, Score 561,000.

</comment><comment><USER26> Any implementation/advise on how to speed up the algorithm by doing on or 2 supervised learnings or how to implement this?

</comment><comment><USER38> We need another genetic network that will play against successful birds, posing gates in a way that will kill them.

Robot wars, all that!!!

</comment><comment><USER39> Wow, this was so cool. Generation 17, two birds, 18K points, still going. I wan't to learn machine learning now...

</comment><comment><USER40> Has anyone tried on Firefox? I'm running FF49 and in gen 50 it has less than 400 max score.

</comment><comment><USER41> Generation 48. What about you guys?

<comment><USER42> Generation 10, which was weird, but got to 70k points before I closed it. I wonder why mine was so much lower, sheer luck?

<comment><USER43> Yep. A good metaphor for evolution in vivo.

</comment></comment></comment><comment><USER44> Does it still learn if there is only 1 bird left in the simulation?

</comment><comment><USER45> haha, generation 3 and already at score > 10000

one lone hero

</comment><comment><USER36> Can this be used on, say, Mario Bros?

<comment><USER46> You mean this script? Or machine learning in general? If the later then it has already been done: [https://www.youtube.com/watch?v=qv6UVOQ0F44](https://www.youtube.com/watch?v=qv6UVOQ0F44) (great educational video)

<comment><USER29> looking at the author's github profile he did a lib to abstract the artificial intelligence and used in some other games.

</comment></comment></comment><comment><USER47> didn't have the original flappy bird a randomized tube placement?

</comment><comment><USER48> Fantastic post

</comment><comment><USER49> Together as one, only the strong will survive.</comment>


Living in SF on no budget - <AUTHOR> Hi everyone,<p>I'll be moving to SF next month for the hack reactor course, I wish to get ideas on how to live in SF very cheap on no income. I'm willing to volunteer at startups, work on side projects for little cash. Any ideas will be welcomed. <comment><USER2> What are your skills?

<comment><AUTHOR> I"m a C/C++, Java, Go developer. I'm moving to learn JS during the hack reactor.</comment></comment>


Ask HN: How are you changing the world with your startup? - <AUTHOR>

Just curious. Feeling kind of disillusioned with all these headlines about things that don't really matter for the sake of human progress. Anyone can answer this question, even if you are just at the idea stage.<p>BTW: I'm not saying startups don't do anything for progress, just seeing so many startups doing something just to make a buck before the 'bubble' that everyone is concerned about. <comment><USER3> Our startup, www.getaround.com , is trying to tackle the challenge of the spread (and inefficiency) of the automobile.

The concept is called peer-to-peer car sharing, and is kind of a mix of Zipcar and eBay. We let car owners put their cars up for rent when the cars are normally sitting idle.

We've created our own in-house hardware that allows for unlocking/tracking/monitoring of cars via smartphone or the web, and negotiated a custom insurance policy that lets us insure each vehicle in our system with a $1 million policy.

The entire platform is designed to allow complete control of your car. Owners set the price they want to charge/hour. They can choose to offer special daily pricing or weekly.

It's been pretty interesting so far.

<comment><USER4> Great idea, like giving a community powered twist to the car-share companies out there. This could be especially great for people who lost jobs & no longer need to commute... why not generate income from the otherwise idle car?

Best of luck!

</comment></comment><comment><USER5> I think almost all startups do social welfare by providing employment and paying their taxs. Some startups go further and have a bigger impact, be it with innovation, streamlining some conventional processes (e.g. cutting out the middle-man, e-commerce etc.), or by discovering a new paradigm in environmental science, human communication, entertainment etc.

</comment><comment><USER4> Our goal is helping the unemployed and the underemployed make ends meet with jobs ranging from full-time to just a few hours. I'm also designing for users to interact directly, creating local and truly small scale jobs. Lots more to it, but the primary theme is helping people find work of all kinds, not just Monster/freelancer-type stuff.

Of course as a non-technical founder I've been relying on a few project manager friends for input but will soon need to hire someone well versed in back-end architecture and site flow/design to consult during the hacker hiring phase as we get underway. I know what I need (I've wireframed most of the site already) but not what skills are needed to actually code it. Sigh.

On a "making the world a better place for our team" level, we're setting up shop down in Venice Beach. Yay quality of life.

<comment><AUTHOR> great ambition, you will realize it in time. Best of luck!

</comment></comment><comment><USER6> We are in early Beta, and noticed that our USP is not getting through very well, instead we took notice that our solution offers a way to decrease the use of ads on the internet.

So we are thinking to change our USP to something like:

"The End of Advertising" For web publishers: Make money without ads. For businesses: Drive quality traffic for life, and improve your search engine rankings without writing a single ad.

<http://publishedin.com>

What do you think?

<comment><AUTHOR> impressive. Content is definitely better than ads. It educates the customer while allowing them to speak freely. Best of luck to you and your team!

</comment></comment><comment><USER7> Our startup is <http://redditgifts.com> \- we are hoping to inspire people to be kind and think about the giving before the receiving. We hope to expand our project to other charitable (if even between 2 people) avenues. In our first year of operation we have proven that this works, can scale and can provide revenue as well as good will!

<comment><USER8> Do you have permission (in writing) to use the "reddit" trademark? If not, they could pull the rug out of underneath you in about 10 minutes.

<comment><USER7> Hey, yes I do.

</comment></comment></comment><comment><USER9> I'm helping to put college students and grads into jobs and internships that they never would have found without <http://www.onedayonejob.com/> and <http://www.onedayoneinternship.com/>

</comment><comment><USER10> My startup <http://brainracer.com> is very early-stage, but we're tackling the difficult problem of keeping young kids interested in math.

The math education system (especially in the US) tends to be soul-crushing, and it focuses more on repetition rather than intuition. Our first app is guilty of being a little bit repetitive also, but it uses social game mechanics and spaced repetition to make learning arithmetic as painless as possible. Hopefully, it will validate the idea of social math games and create some cashflow. I'm already looking forwarding to the next game we'll build on the iPad -- because of the touch UI, I think it's a perfect medium for exploratory learning.

<comment><AUTHOR> great idea! Science and math are where this generation is so far behind, it's just sad how much this is going to hurt us until we fix this.

</comment></comment><comment><USER11> Making social life easier- Explore Twitter, Facebook at quick glance with my startup.

Let's meet Dawg, your new friend. Simple application making social life easier than ever before. Now you can seamlessly connect your social life at Facebook and Twitter in one place. Get updates on the go, and glance over them - <USER2> if you get disconnected from the Internet! Dawg helps you stay social with your tweets, updates, photos and videos in a single application. Let's gear up to explore your social network easy way with Dawg.

More details: <http://bit.ly/fnfLOb> Download app from : <http://bit.ly/gakCmT>

<comment><USER12> Sounds more meta than changing the world, sorry. Twitter and FB are the ones making social life easier.

</comment></comment><comment><USER13> If by startup we mean "runs off of venture capital", and by "my startup" we mean "place where I work", then I'll answer: High efficiency heat engines. The current focus of our technology is turning sunlight into electricity, but there is lots of potential in other areas like residential heating and cooling.

<http://infiniacorp.com/>

</comment><comment><USER14> Enabling anyone with a smartphone - whether an individual in New York, or a village in Nigeria, to earn revenue based on geo-location.

<comment><USER12> How?

<comment><USER14> By enabling the buying and selling of information in real-time with human translation and complete anonymity.

</comment></comment></comment><comment><USER15> Our startup, lightpointsecurity.com is building software to make it virtually impossible to be exposed to malware while web browsing.

</comment><comment><USER16> We're soon launching an alternate reality role playing game to inspire players to make positive changes in their lives and help create a better world. <http://childrenofthestars.com>

<comment><AUTHOR> great idea, this could be a really big deal. best of luck!

</comment></comment><comment><USER17> Our startup is helping people buy and sell with video. People can enjoy watching video listings without leaving the comfort of their homes. <http://www.123exchanges.com>

</comment><comment><USER18> We're trying to build a way to help everyone do everything.

Also, we're hiring.

<comment><AUTHOR> cool. why so secretive?

<comment><USER18> Less stealth, more vague. We're building a series prototypes to explore how to use social software to help people get stuff done. Useful networking?

<comment><AUTHOR> ok. makes sense. best of luck to you!

</comment></comment></comment></comment><comment><USER19> We're working to solve a problem that virtually all businesses face and doesn't have a _real_ solution.

Other than that, I'm in stealth mode, sorry. :)

</comment><comment><USER20> Our start up will effectively change the future of Social Online Dating. We'll be taking the current outdated approach to Online Dating/Matchmaking and upgrading it to keep up with current social market trends.

We're currently developing Beta, feel free to take a look at our landing page and offer any feedback,

<http://www.sowink.com>

</comment><comment><USER21> At ParkGrades.com, we're making it easier than ever to find a great nearby park, no matter where you may be.</comment>


Apple's Incredible Efficient Growth - <AUTHOR> http://www.businessinsider.com/apple-and-efficiently-growing-its-future-2010-5?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+typepad%2Falleyinsider%2Fsilicon_alley_insider+%28Silicon+Alley+Insider%29 <comment><USER2> One reason that Apple is able to so much with such a small R&D investment is that Apple doesn't develop much technology.

As an example on the other end of the spectrum, Intel develops a LOT of technology -- though a lot of that R&D, IIRC around half, is dedicated to the fabrication side of things.

The difference is that companies like Microsoft and Intel create technology, and companies like Apple put it to use and convince people to buy it.

Microsoft is funny about technology R&D though. Not in a good way. It's probably related to having someone with the imagination of a bacterium running the show while the person responsible for the company's rise to dominance is off trying to save the world or something. :)</comment>


Miami High-Rise Will Be Ready for High-Flying Cars - <AUTHOR> https://miami.cbslocal.com/2019/02/20/miami-high-rise-flying-cars-paramount-world-center/ <comment><USER2> But will it be ready for rising water levels? This may sound like whataboutism but I'm genuinely curious about how real estate investors who usually do think long term, are preparing for the inevitable drastic change in landscape coming in the next 10-30 years.

<comment><AUTHOR> The only way in and out of the high-rise one day could be the roof. They are planning ahead.</comment></comment>


One thing I hate about web apps... - <AUTHOR> http://www.youtube.com/watch?v=GByYd9Oh7qw

<comment><USER2> preventing selection happen during mouse events is pretty easy

preventing them during key events, that can be very very hard</comment>


Avoiding meat and dairy is 'single biggest way' to reduce your impact on Earth - <AUTHOR> Avoiding meat and dairy is 'single biggest way' to reduce your impact on Earth<p>https://www.theguardian.com/environment/2018/may/31/avoiding-meat-and-dairy-is-single-biggest-way-to-reduce-your-impact-on-earth?CMP=Share_AndroidApp_Submit_to_HN <comment><USER2> Maybe submit this again with a clickable-link title like every other story? Not sure what, but something went very wrong, maybe that URL is a clue.</comment>


One year ago we launched an app and were featured in Business Insider - <AUTHOR> http://www.businessinsider.com/this-toyko-startup-thinks-its-fixed-the-major-flaw-in-dating-apps-like-tinder-and-apple-just-named-it-a-best-new-app-after-its-us-launch-2016-3 <comment><USER2> I actually saw Dine recently and was genuinely enraged by it. It looked very much like bribing people to meet up. Or, to put it another way, it looked like men competing on how expensive of a restaurant they chose instead of just personality.

On a more personal note, I never have (and never will) go on a first date for dinner. You usually know if you like someone in the first few minutes, and it's not worth sitting through a whole (and, if you're male, probably expensive) meal.

(And yes, I know my comments are assuming the man pays. I don't agree with that tradition, but it's very widespread and impossible to avoid when dating.)

<comment><AUTHOR> It seems like your idea on what Dine's concept is warped. If you live in a big city what do first dates mostly consist of? Getting a drink, getting lunch, getting dinner, getting ice cream, getting coffee. It was only natural to make an app that allows people to seamlessly do what they were going to do any way on other apps or in real life. Men don't have to pay on Dine. Paying for a first date is not mandatory and most millennials are pretty on board for that. You stated how you wouldn't go to dinner on a fist date, but on Dine you have the option to meet up at bars or cafes. Literally could be anymore, for example a cocktail bar or just your local pub. Some people complain about paying for dates but a coffee is like what, $4-5 at most?</comment></comment>


My First BillG Review - <AUTHOR> http://www.joelonsoftware.com/items/2006/06/16.html

<comment><USER2> One note on this -- I just took a look and there are only five layers between an present day Excel PM and Steve Ballmer, rather than the 11 or 12 layers he posits.

<comment><USER3> Source?

<comment><USER4> I can validate this. I was an intern in '06 and routinely spelunked the org chart. I recall seeing up to 11 or 12 layers from bottom to top. I was 8 or 9 from Ballmer myself, if you regard my mentor as my immediate superior.

</comment></comment></comment><comment><USER5> I had a BillG review a few years earlier, when he came to my high school to review student work in the new math/science building that he and Paul Allen funded.

I demoed (one-on-one!) an RPG that I made in Hypercard on a Mac Plus. ;) To his credit, Bill asked some good questions and seemed to understand the Mac/Hypercard paradigm pretty well.

</comment><comment><USER6> Joel was a fun read back then.

<comment><USER7> I suppose that's the reason he decided to stop blogging.

</comment></comment><comment><USER8> 4 years old?

Are there really people here who don't know how to click through Spolsky's archives?

<comment><USER9> I don't understand all the down votes. This article, for instance, links from the Joel On Software home page. There's no reason to post it here.

<comment><USER10> It's an answer to the thread about Mark Zuckerberg still writing code, where TechCrunch asked if Bill Gates still coded 5 years after Microsoft was founded. That's why it was (re)posted.</comment></comment></comment>


Ask HN: Will flutter take over the UI world? - <AUTHOR> <comment><USER2> It's a good addition to the UI World with lot of advantages, but...

\- It's not revolutionary just different (with pros/cons)

\- Lot of 3rd party libraries are not available

\- Google Analytics is by default enabled (which spreads the Google Data claw)

Maybe I'm getting old, but for me it's not worth the time learning a new framework when the current market offers a lot of good, well documented and community supported options.

</comment><comment><USER3> What's "flutter"?

<comment><USER4> Flutter is Dart's React.

<comment><USER3> It doesn't seem so revolutionary from what I've read.</comment></comment></comment>


Toshiba's algorithm realizes world's fastest, largest combinatorial optimization - <AUTHOR> https://m.phys.org/news/2019-04-toshiba-breakthrough-algorithm-world-fastest.html <comment><USER2> Juicy quotes:

"the development of an algorithm that delivers the world's fastest and largest-scale performance, and an approximately 10-fold improvement over current methods"

"Toshiba will use the Simulated Bifurcation Algorithm to build a service platform able to quickly solve diverse social and business problems, aiming for commercialization in 2019."

</comment><comment><USER3> Excerpt: "The Simulated Bifurcation Algorithm harnesses bifurcation phenomena, adiabatic processes, and ergodic processes in classical mechanics to rapidly find highly accurate solutions."

I love it!</comment>


Timeline: Web Widget for Visualizing Temporal Data - <AUTHOR> http://www.simile-widgets.org/timeline/

<comment><USER2> Nice. It could do with something to disable accidental text-selection (see "user-select" css property)</comment>