Introducing SIMD.js - <AUTHOR> https://hacks.mozilla.org/2014/10/introducing-simd-js/ <comment><USER2> Contrary to popular opinion, I think this is actually a terrible idea. By doing this, we are basically adding SIMD to the JS 'virtual machine'. IMO, we shouldn't standardize on API for things which are so low level and this is really like an implementation detail in the virtual machine.

I would suggest two alternate approaches:

1\. First come with a standard SIMD specification across CPUs. In some ways like the GL specification (for GPU) or even the webrtc stuff (for p2p connections). Once you have done that, define a JS API.

2\. Identify proper use cases. The example are quite bogus currently. They show a mandelbrot. Well, all this is done in the GPU. Image manipulation is done best with css level filters. Once we identify the use cases, we can them maybe add APIs to specifically address them if it's important for the web in general.

In it's current form, this is really a 'because we can' API. Where does this end? What if we just expose raw socket and networking API instead of a webrtc style API? What about pixel manipulation of images?

Also see: [http://www.mail-archive.com/webkit- email@example.com/msg2...](http://www.mail-archive.com/webkit- firstname.lastname@example.com/msg25237.html). The apple guys are saying they can do all this even without the API.

<comment><USER3> I'm also not so sure about this. I admit to having limited compiler design experience, but the WebKit FTL guys do, and they seem to be saying that many things that can be done with SIMD primitives can be done better with automatic vectorization, since you can specialize code for the specific processor it's being executed on. On top of that, it's easier for the programmer if they can write ordinary code and get SIMD performance.

Are there cases where algorithms simply cannot be expressed in a way that automatic vectorization could transform them into SIMD instructions? Or is this just a way to avoid implementing automatic vectorization in JavaScript engines?

<comment><USER4> Autovectorization has been an area of intense compiler effort for a decade or more and by and large the primary customers of it (games, video codecs, etc.) prefer the intrinsics. It's perceived as too unreliable and brittle to be relied upon, and it's easy to see why: given a choice between having to think about what the compiler's alias analysis, overflow analysis, loop trip count analysis, etc. will do and just writing an intrinsic and calling it a day, programmers will choose the latter.

This applies regardless of how good the autovectorization really is: it's in a weird catch-22 kind of space where adding more and more features to your autovectorizer can actually _reduce_ its perceived reliability, by making the answer to "will this vectorize?" harder and harder for a programmer to answer at a glance. <xmmintrin.h> has a lot of problems, but it's _reliable_ , and at the end of the day that's what history has shown that game devs and video codec authors want.

<comment><USER3> I appreciate that autovectorization is hard to do well. However, I think the world of JS is different from the world of C/C++. JS optimization is already pretty unpredictable, since the language is dynamic (both in terms of typing and e.g. object memory layout, with the exception of typed arrays); JS primitives are farther from the metal; the optimizations that JS engines perform are implementation-specific, rarely well-documented and always in flux; and it's difficult to see what machine code actually runs for a given JS function. SIMD instructions may make some sense for JS as a compiler target, but they seem to make less sense for JS as a language that doesn't have integers or 32-bit floating point numbers. On top of that, most users of vectorization are targeting a specific architecture or even CPU, whereas JS code is meant to run anywhere. It doesn't seem like there's been much work to alter the language or tools to make it easier for programmers to reason about other sources of unpredictability, so why so much emphasis on SIMD?

I'll admit some ignorance here, but it also seems to me that a JIT may also have some advantages WRT autovectorization as compared with a static compiler, since you can collect runtime information about aliasing and loop trip count before choosing to vectorize. But if the point is to make performance easier to reason about, why not start with the rest of the language before worrying about vectorization?

<comment><USER5> > It doesn't seem like there's been much work to alter the language or tools > to make it easier for programmers to reason about other sources of > unpredictability, so why so much emphasis on SIMD?

But there certainly have been such efforts! Standards bodies have added features like Typed Arrays, Math.fround, etc., and work is ongoing on Classes, Typed Objects, and Modules. All of those things make performance more predictable.

There are also better devtools all the time, which help you understand performance issues better.

And there is also asm.js which aims to make a certain type of JavaScript extremely predictable.

A final point - the unpredictability you mention is exactly why a SIMD API is needed. JavaScript is more unpredictable than C and C#, but even those have added SIMD APIs, because even in their predictable worlds, autovectorization wasn't good enough.

</comment></comment></comment></comment></comment><comment><USER6> Oh. Dear. God. JavaScript is going to become the x86 of our time, i.e., the historically awful patchwork of kludges that gets passed onto each generation to kludge anew which also runs the entire world. JavaScript: we don't have integers, but, dammit, we have vector instructions. FML.

Maybe it's not too late to take up painting.

<comment><USER7> >SIMD.js is originally derived from the Dart SIMD specification

I am so ungodly sick of Google pushing DART technologies everywhere. I really am starting to think their strategy is embrace, enhance, exterminate.

<comment><USER4> If you don't like Dart, then you should actually be in favor of this move. It negates what was previously an advantage of Dart over JavaScript.

</comment></comment></comment><comment><USER8> Now I'm just waiting for int64.js, which should appear when ES7 value objects come along [http://www.slideshare.net/BrendanEich/value- objects2](http://www.slideshare.net/BrendanEich/value-objects2)

<comment><USER9> Same here. I'm also looking forward to asm.js being a target for JVM, CLR and other garbage collected languages through Typed Objects. [https://wiki.mozilla.org/Javascript:SpiderMonkey:OdinMonkey#...](https://wiki.mozilla.org/Javascript:SpiderMonkey:OdinMonkey#Proposed_future_JS_features_that_would_be_useful_to_asm.js)

Also, am hoping 'JavaScript Shared Memory, Atomics, and Locks' gets accepted by TC-39. [https://docs.google.com/document/d/1NDGA_gZJ7M7w1Bh8S0AoDyEq...](https://docs.google.com/document/d/1NDGA_gZJ7M7w1Bh8S0AoDyEqwDdRh4uSoTPSNn77PFk/edit?usp=sharing&pli=1)

</comment></comment><comment><USER10> What we really need is to spread WebCL - [https://www.khronos.org/registry/webcl/specs/1.0.0/](https://www.khronos.org/registry/webcl/specs/1.0.0/)

1\. It is already standardized language and API. There exist a lot of code for WebCL.

2\. WebCL engines can run on CPU, they can use all CPU cores, SIMD etc., while still being a part of web browser (no special drivers required). It will give us much better performance, than asm.js, SIMD.js, Google's Native Client or any other "unstandardizible" things.

<comment><USER11> WebCL is DOA: [https://bugzilla.mozilla.org/show_bug.cgi?id=664147#c30](https://bugzilla.mozilla.org/show_bug.cgi?id=664147#c30)

<comment><USER10> Well that's what Microsoft said about Android in 2008. No wonder that Firefox is loosing popularity, when they refuse to innovate.

<comment><USER11> I'm taking my crayons and going home!

</comment></comment></comment></comment><comment><USER12> Neat, looks like JS is getting SIMD speedups because of fixed type objects.

Would really love to see the speedup on fixed tuple transforms and convolution algorithms.

When I saw JS speed wars originally, I started writing an adobe curve apply algorithm in JS, to apply .acv curves live using Canvas, but essentially hit CPU & shelved it.

[https://github.com/t3rmin4t0r/io.dine/blob/master/lib/iodine...](https://github.com/t3rmin4t0r/io.dine/blob/master/lib/iodine.js#L46)

[http://notmysock.org/code/iodine/](http://notmysock.org/code/iodine/)

I want to rewrite it using something like the newly introduced float32x4, assuming I can read out the images int o RGBA tuples.

Something like a blur would actually be possible once this is fast.

<comment><USER13> That applycurve function has what appears to be a gather, which is unfortunately outside of where we expect to be with the initial iteration of SIMD.js, as there isn't widespread CPU SIMD hardware support for it yet. However, the brighten function immediately above it, for example, is supported by features in the SIMD.js spec today.

</comment></comment><comment><USER14> It's official, Javascript is the new Assembly. I'll wait for the new Python, I never liked low level languages.

<comment><USER15> I liked the "original" assembly more, at least it was designed for helping _humans_ to write and read code.

EDIT: That said, this is good news, in a sense.

<comment><USER16> You make me wonder which assembly you're talking about. x86-64 feels heavy with legacy designs, many ways to get the same result, common pitfalls regarding memory management, and some surprising very specific gems to make some things fast… such as SIMD.

(I know little about other instruction sets.)

<comment><USER15> I'm just talking about design goals - the original assembly was introduced so that people wouldn't have to remember the numeric instructions of the processor. The instruction sets have been legacy even before that, with slight improvements occasionally, but at least the target audience was people in the beginning. With asm.js the target has been compilers to begin with. With most assembly dialects the instructions have a clear purpose, where as with asm.js you have arcane rules on what makes what stay as an integer, etc., enough so that I think most of the group of sane people would prefer writing against traditional assembly dialects than asm.js.

Maybe that's a good thing, at least then the goal is that people who care about performance don't write JS. But I'd prefer to just have the compile target as numbers then since you can't read the result anyway.

</comment></comment></comment></comment><comment><USER17> And this is why we need to simply switch to LLVM. It gives us a sane bytecode, allows any language, allows real pre-browser optimization, etc. Mozilla's moving that direction with Rust and Servo. Google has already experimented with it via pnacl, and webkit/apple already actively compiles JS to llvm.

For backward compatibility, just use and extend emscripten. As a bonus, this would allow the DOM interface to be reworked so we can get it right.

<comment><USER18> Well LLVM heavily relies on not having forward compatibility (new versions spew out LLVM IR that can't be used by older versions) and backward compatibility is merely an afterthought.

<comment><USER19> Khronos Group standardized LLVM IR 3.2 as SPIR(Standard Portable Intermediate Representation). It is an existence proof that standardizing LLVM IR is possible.

[https://www.khronos.org/spir/](https://www.khronos.org/spir/)

<comment><USER18> I actually work a bit with SPIR. They standardized a subset of LLVM IR 3.2 as SPIR 1.2

SPIR 2.0 on the other hand already is based off LLVM IR 3.4

</comment></comment></comment></comment><comment><USER20> Where are the Bytex16 types? Or the Wordx8 types? Who the hell is using floats for every data value?

<comment><USER21> They're coming. The initial code for them is written; it's just waiting for a few other things to get checked in first.

Also, quite a lot of people use floats for every data value.

</comment></comment><comment><USER22> Neat! Is anyone playing with js crypto and this new stuff?</comment>


America Hates Its Gifted Kids - <AUTHOR> http://europe.newsweek.com/america-hates-its-gifted-kids-226327?rm=eu <comment><USER2> 16 January 2014, published before the latest revision of the statute about federal funding for primary and secondary education.</comment>


Ask HN: Why did Google release their mapReduce algorithm/cluster setup? - <AUTHOR>

I was just wondering why Google, back in 04, released their map-reduce white paper. They didn't have to. Was it released simply out of good will? Was it done to fend off antitrust litigation? Were other companies already doing the same thing, so it wouldn't matter if it was released? I think they believed that the amount of information that was revealed in the paper wasn't low level or in-depth enough to cause any real damage to Google, even if it were implemented(Yahoo's hadoop). Or am I missing something completely? <comment><USER2> To engender the feeling that Google is a factory for big new ideas, making it the place every top-flight developer wants to work, and the tech company that everyone talks about when innovation is the subject. I'd say it's paid for itself, and I'd also suggest that it hasn't hurt them. Google has as much of the search market as ever, as far as I know, and the only dents have been due to non-technical factors (Microsoft, and others, modifying the search bar in browsers, ISPs making deals to push other engine, etc.).

<comment><USER3> I would also add good karma. As in, it doesn't hurt them. I say it was also to showcase their tech and provide more confidence in their later services.

</comment></comment><comment><USER4> In this particular case the ideas weren't particularly new - when I first heard about Map-Reduce I thought people were talking about MPI's AllReduce function <http://www.mpi-forum.org/docs/mpi-11-html/node82.html> from the 1995 MPI spec and even then it was nothing new. Teradata and others shipped systems operating on the same principles a decade earlier.

But to answer your question: all large companies need to publish the central technical ideas in one way or another to ensure their own current and future technical staff understand how their systems work (e.g. IBM Systems Journal).

</comment><comment><USER5> Distributed systems are nothing new (AST's Amoeba goes through some of the mapreduce contortions), but there are very few programmers comfortable thinking that way- you may recall, even SONY had an awful lot of trouble recruiting talent.

It's in Google's best interest to increase the market size of "parallel programmers"- to actually be able to pick from more programmers who can "think" in mapreduce, improves their hiring options.

I doubt this fact escaped Google: mapreduce stands on shoulders of its own giants who faced this problem as well.

</comment><comment><USER6> Or maybe, like many scientists, they were truly interested in advancing the sum of human knowledge and the state of the art.

<comment><AUTHOR> I'm just afraid they're being driven by their desire to increase revenue rather than benefiting humanity.

</comment></comment><comment><USER7> Probably done to get feedback in the area. If you publish a paper on a better map-reduce strategy, Google benefits. The important thing is to seed the research community with the right idea.

Of course, when some researches comes up with a better idea, you headhunt him.</comment>


Who works full time at their own startup? - <AUTHOR>

Would love to hear about fellow Hacker News users who work full time at a startup that they founded.<p>Are you able to do it because you make enough money or perhaps because you got funding? <comment><USER2> Well... I am for at least a few days, since I got laid off from my previous day-job. I'd been doing the "nights and weekends" thing all along, and now I get a little while to work on this as much as I want. But the startup isn't funded yet and we don't have any revenue yet, so I'll be taking another day- job at some point. I've been chewing on the idea of just milking the unemployment benefit as long as it lasts while I work on the startup, but I already have some discussions underway about a new day-job, so we'll see.

In the meantime, it is nice to get up and spend all day working on my own thing; instead of working all day doing mind numbingly boring shit for a company that's not going anywhere. :-)

</comment><comment><USER3> I've recently quit my job to work on my startup full time. I do have some money saved up and am living cheaply. At some point you have to take a chance on yourself and do what you want. Life is too short to be working on things you don't want to do; that was the primary reason for me to devote myself full time. I also wrote about this in slightly longer prose, if you are interested:

<http://www.akashkgarg.com/essay/therighttime.html>

</comment><comment><USER4> I put way more time in my startup than my freelance and little part-time job (combined), so in essence, I try to have as little expenses as possible and live within my means with whatever money comes thru freelance channels until it runs out (rinse & repeat). My goal is to work full-time and earn more thru my own startup within the next six months.

</comment><comment><AUTHOR> Interesting. No one responded that does their startup fulltime without any other source of income or savings. I didn't even think about the fact that you could just be working on your startup living off your savings.

</comment><comment><USER5> We've been working full-time with 2 co-founders, for almost a month now. We took a loan to finance it, and hope that we will start to make revenue soon to pay it back :)

The product: www.plumbr.eu

</comment><comment><USER6> We're doing it half and half. My co-founder has a day job and I'm working on the start-up full time while living off savings after working like crazy at my last job.

</comment><comment><USER7> I've been working on my startup fulltime for close to 6 months now. I've been able to do it because of savings.

</comment><comment><USER8> I've been working full-time on my own sites (I don't really think of them as startups), since 1997.

</comment><comment><USER9> Does a 1-person company qualify as a startup? Because if yes i 've been doing it for 3 years</comment>


Ask HN: Deep learning tutorials for hands-on learners? - <AUTHOR> I learn best by doing, so I wanted to ask what are good examples of projects/tutorials/other sources to dive into deep learning beyond the more theoretical research papers and high level overviews? <comment><USER2> Check out this course: [https://www.udacity.com/course/deep-learning-- ud730](https://www.udacity.com/course/deep-learning--ud730)

<comment><AUTHOR> Thank you for the link! Out of curiosity, have you personally gone through it or just heard good things?</comment></comment>


Show HN: Messagify - a private Disqus for web apps. Feedback? - <AUTHOR> http://messagify.com Hey HN, I'm a longtime reader and this is my first Show HN (exciting!) It's a collaboration between me and two friends, and we're building this upon another app we made called EmailYak, an API to receive email. We're trying something new and releasing the documentation to an app while we're still building it.
We'd love feedback. Do you belong to any of these categories?
1) You've built an app with two distinct groups of users (say, people with cars and those looking for a ride) and they were able to communicate with each other. Did you expose personal email addresses? Did you send notification emails that people could reply to directly in their inbox? Or were they only able to read and reply to messages on your site?
2) You built an app where you wished users could message each other but didn't add that feature. What stopped you? Did you try to parse incoming email? What tools or APIs did you try out?
If you note which group(s) above you belong to in your comment that'd be great :)
Thanks so much for the help! <comment><USER2> Hey HN, I'm a longtime reader and this is my first Show HN (exciting!) It's a collaboration between me and two friends, and we're building this upon another app we made called EmailYak, an API to receive email. We're trying something new and releasing the documentation to an app while we're still building it. We'd love feedback. Do you belong to any of these categories?

1) You've built an app with two distinct groups of users (say, people with cars and those looking for a ride) and they were able to communicate with each other. Did you expose personal email addresses? Did you send notification emails that people could reply to directly in their inbox? Or were they only able to read and reply to messages on your site?

2) You built an app where you wished users could message each other but didn't add that feature. What stopped you? Did you try to parse incoming email? What tools or APIs did you try out?

If you note which group(s) above you belong to in your comment that'd be great :)

Thanks so much for the help!

</comment><comment><USER3> hi, one of the guys behind Messagify here. we're trying to make it easier to to build messaging apps, starting with commenting. much like what Disqus did for blog comments, we want to do for web apps in general. i'll be happy to answer any questions.

<comment><USER4> We're are about to start building a internal commenting system for our web app, so I wish we had access to your beta. Looks good from what I see. May be a little too late (for me) depending on when you let people have access.

Side note: as much as I understand the vitality of launch rock, as a pre- launched co-founder, I'm not about to start spamming what little audience I have to get access to something I want to test drive around the block. Good luck to you. I want to try your product out, but I'm not going to mess around with launch rock.

<comment><USER3> thanks, feel free to email firstname.lastname@example.com if you want us to let you know when we're closer to beta :)</comment></comment></comment>


DC appeals court lifts injunction against NSA phone records program - <AUTHOR> http://apps.washingtonpost.com/g/documents/national/read-the-dc-circuit-court-ruling-against-the-nsa-bulk-collection-program/1719/ <comment><USER2> Tl;dr: The plaintiffs/petitioners presented only a tenuous case that their records were actually collected, which reduced their perceived likelihood of success on the ultimate merits of the case enough that they were not entitled to a preliminary injunction.

Let's unpack that a little bit. This is not a final ruling on the merits of the case, and it does not have anything (directly) to do with the 4th Amendment. Plaintiffs had moved for a preliminary injunction before the district court that would have stopped the program well before the ultimate outcome of the case. For obvious reasons, the standard for evaluating such requests is high. One of several factors used for evaluating such a motion is likelihood of ultimate success of the merits.

In order for plaintiffs to ultimately succeed, they have to convince the court that they have actually suffered an injury by having their own call records collected. They need to have been injured in order for the court ultimately to have jurisdiction. At this point, the DC Circuit concluded that they do not have any specific evidence of this (and, in fact, some of the indirect evidence weighs against them). So, the DC Circuit concluded that they were not so likely to ultimately succeed that it should give them the injunction they wanted before the ultimate outcome of the case.

This is not a good sign for a plaintiffs' case, but its important to emphasize that this is an early look at it with, necessarily, the benefit of only a small amount of evidence. The case will continue in the district court which will, among other things, try to determine whether the plaintiffs were actually injured.

Of course, the predictable outcome of that inquiry is that the NSA will invoke various legal privileges against disclosing the evidence necessary to actually make a determination, ultimately rendering plaintiffs' case impossible to maintain.

<comment><USER3> Marcy Wheeler has more in a pair of posts on Emptywheel.

\- one of the three judges said that the plaintiff didn't have standing because there wasn't explicit evidence that the government was collecting data from Verizon Wireless. [In a followup post, Marcy notes that a recent IG report (obtained by Charlie Savage of the NY Times via a FOIA suit) does explicitly include Verizon Wireless in a list; but this information probably wasn't known in time to include it in arguments in this suit.]

\- another judge said that there wasn't any evidence the plaintiff had suffered any harm from the data collection

\- and the third said that the plaintiffs "barely fulfilled the requirements for standing at this threshold stage, Plaintiffs fall short of meeting the higher burden of proof required for a preliminary injunction"

[https://www.emptywheel.net/2015/08/28/dc-circuit-reverses- ju...](https://www.emptywheel.net/2015/08/28/dc-circuit-reverses-judge-leon- order-overturning-phone-dragnet/)

[https://www.emptywheel.net/2015/08/28/government-recently- re...](https://www.emptywheel.net/2015/08/28/government-recently-released- information-proving-larry-klayman-has-standing/)

<comment><USER4> > the plaintiff had suffered any harm from the data collection

so you have to prove you've suffered harm from the removal of your rights? They're called rights and the country was founded on protecting them because they're both intrinsically valuable and completely invaluable!

<comment><USER5> > so you have to prove you've suffered harm from the removal of your rights?

No, you have to be able to establish that _you_ have had _your_ rights violated. The standard that gets referred to as "harm" is more formally "concrete, particularized injury" where "injury" is defined as a violation of a legally-protected interest.

You don't have to prove, e.g., _damages_ from the violation of your rights, but you can't just allege that an action is a violation of people's rights generally, and further that, as a person, you _may_ have been impacted, so therefore you have standing to challenge the action. To have standing to sue, you have to allege with sufficient evidentiary basis that an action actually violated your rights in a concrete way.

<comment><USER6> So if rights are violated, but the violations are kept secret (eg. secret court gag order, national security, etc)... then you haven't been legally harmed?

<comment><USER7> Someone may have been harmed, but

Until YOU can prove that YOU have been harmed, YOU don't have standing.

<comment><USER8> Why doesn't this process lead to an investigation whether data was collected or not about the plaintiff?

<comment><USER5> In civil lawsuits, investigation to gather facts necessary to meet threshold requirements like standing is the responsibility of the plaintiff before filing suit.

<comment><USER4> subpoena?

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Didn't the NSA delay sunsetting the program for a few months (because it was a legal option given to them by the court)? Convenient that this injunction occurred before the sunset date. Once again disappointed to see the court side against the 4th Amendment.

Edit: and this is rather unfortunate...

'It is entirely possible that, even if plaintiffs are granted discovery, the government may refuse to provide information (if any exists) that would further plaintiffs' case. Plaintiffs' claims may well founder in that event. But such is the nature of the government's privileged control over certain classes of information. Plaintiffs must realize that secrecy is yet another form of regulation, prescribing not "what the citizen may do" but instead "what the citizen may know."'

Edit 2: nevermind that the entire states secret clause that the courts are so often to back up is based on the government trying to save face and not admit wrong-doing.

<comment><USER10> > 'It is entirely possible that, even if plaintiffs are granted discovery, the > government may refuse to provide information (if any exists) that would > further plaintiffs' case. Plaintiffs' claims may well founder in that event. > But such is the nature of the government's privileged control over certain > classes of information. Plaintiffs must realize that secrecy is yet another > form of regulation, prescribing not "what the citizen may do" but instead > "what the citizen may know."'

If secrecy is another form of regulation, then any such regulations must be subservient to the fact that a citizen is entitled to due process and to protection against their affects being seized.

This means that the government asserting state secret to block the judicial review of a case about them failing to uphold the constitution is a breach of the constitution, and subservient regulations like state secrecy must be set aside to uphold constitutional obligations.

Or at least, that's what my lawyer would probably say on appeal.

</comment></comment><comment><USER11> This all seems rather academic. Is there any reason to be reasonably sure the NSA wouldn't just do it regardless of what a judge said?

<comment><USER12> This is how we know we've crossed the Rubicon regarding government spying.

We don't expect them to stop spying, even if they're "legally" required to stop, and spying on us is made "illegal". We have zero faith in their word, and that was theirs to lose!

<comment><USER13> You cannot win against Mossad etc. The sooner you realize that the sooner you can get on with your life.

<comment><USER12> I completely reject your fatalistic line of thinking on a few grounds:

1\. You can totally win, provided that you show up with thousands of your friends and a desire to wreck shit. See the corpse of STASI, which the Western surveillance apparatus has surpassed in every dimension: [https://en.wikipedia.org/wiki/Stasi#Storming_the_Stasi_headq...](https://en.wikipedia.org/wiki/Stasi#Storming_the_Stasi_headquarters) (especially read the part about the headquarters being stormed and unconfirmed reports of lynchings-- sounds a lot like they lost on a permanent basis) The KGB office in Berlin met a similar fate (it was supposed to be clandestine, but oops-- intelligence agency installations are seldom hard to find because they rely on being hidden in plain sight), however most of the files contained within were destroyed thanks to the quick thinking of an officer there-- Vladimir Putin.

Another example of total victory is the ugly rout of South African intelligence agencies at the very end of apartheid-- quick, gory, and intentionally forgotten during the "truth and reconciliation" period. These agencies had a premium on brutality, and they aren't nearly as well known as the CIA or Mossad. Interestingly, there were actually several intelligence agencies of SA at the time-- the military intelligence organization was hit the hardest, but responded by digging in and doubling down on brutality. The other (which has had its name changed a number of times but was at the time known as the National Intelligence Service) was horrified by the military intel agency being hunted and killed, and changed focus to clandestinely work on a truce.

2\. You can partially win by forcing them away from your area, provided that you have access to the political apparatus. There was an article trending on HN today about how Bolivia had forced out the DEA. Sure, maybe you can argue the DEA isn't the CIA or Mossad, but the point is clear: these organizations can't operate with impunity if the (quasi stable) political apparatus decides to resist them. An alternative set of examples here are Iraq/Afghanistan/Pakistan/Kurdistan/Syria-- both the CIA and Mossad (and likely Shin Bet) chalked big losses here (with heavy loss of life of their own personnel as well as countless indigenous assets) because the population was hostile to them. Collecting HUMINT requires willing humans, and torturing people doesn't cause that. It's also extremely hard to blackmail or bribe a tribesman.

3\. You can buy them out or co-opt them, if you have the right connections. It's no secret that Putin rose to power via the KGB's influence, but during the transformative 90s, Russia's economic power was privatized and separated from the government's apparatus creating a plurality of power loci. Following this, there began a curious phenomena (replicated by corollaries in the US around the same time) of the Russian intelligence agencies being caught willy nilly for industrial espionage. In the midst of economic strife and violent internal insurgency in the Muslim territories around the same time period, the intelligence agencies of Russia were largely busy chasing dollars rather than mujaheddin. Why? Because the newly minted oligarchs were more concerned with making more cash. This is currently happening in the US. The takeaway point here is that a change in focus can count as a win.

4\. You can change their political mandate with reforms. The US has done this once already with the CIA, and will likely do this many more times. There are too many examples of this to list.

<comment><USER11> So essentially, without obscene amounts of money and political power, I have to be willing to commit treason and violently attack a government building? Okay. So basically not something I'm going to achieve any time soon.

</comment></comment></comment></comment></comment><comment><USER14> From page 3:

> _" NSA may access it only after demonstrating to the FISC that a 'reaonable > articulable suspicion' that a particular phone number is associated with a > foreign terrorist organization'"._

Shouldn't this say "associated with a foreign terrorist organisation, _or the UN_ "?

[http://www.theguardian.com/world/2015/aug/17/un-att-nsa- spy-...](http://www.theguardian.com/world/2015/aug/17/un-att-nsa-spy- headquarters-privacy)

<comment><USER15> I'm sure you could find a few people in the U.S. that would consider the U.N. a foreign terrorist organisation.

<comment><USER16> I know more than a few U.S. citizens who consider the U.S. Government a foreign terrorist organization.

So yes, I believe you.

</comment></comment></comment><comment><USER17> Has anyone tried to use probability to cut through this cloud of bullshit that the government keeps spewing about the plaintiffs not being able to prove that their records were collected? If you put 100,000 names on that lawsuit, there's no way they can say that none of them got caught in the dragnet.

</comment><comment><USER18> Does a plaintiff need to suffer injury if their constitutional rights were violated? Wouldn't this be closer to a class action since there's broad injury and violation?

<comment><USER2> > Does a plaintiff need to suffer injury if their constitutional rights were > violated?

Yes, they do. Even in a class action the class plaintiffs need to be able to show that they were injured. This stems from longstanding judicial interpretation of the "case or controversy" clause of Article III of the U.S. Constitution.

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

<comment><USER19> The US constitution allows for the people to petition the government for a redress of grievances. No monetary injury required.

<comment><USER2> Article III specifically defines the powers of the judiciary, and these powers do not include hearing petitions.

It's an interesting question what substance the Petition Clause has. Unfortunately, it looks these days like it doesn't have much, since the First Amendment has never been interpreted to give petitions any binding legal effect. But I think it _is_ clearly correct that the judicial branch, at least, does not have the power to adjudicate them under Article III.

Edit: By the way, an 'injury' does not necessarily have to be a _monetary_ injury to support standing, though the law about what sorts of injuries count is exceedingly difficult and, perhaps, incoherent at the margins. One interesting wrinkle is that courts assume a fairly concrete definition of "injury", but also permit Congress to expand the applicable conception of injury (within some limits) in particular situations by statute. _Lujan v. Defenders of Wildlife_ is a good entry point to this area of law, [https://www.law.cornell.edu/supremecourt/text/504/555](https://www.law.cornell.edu/supremecourt/text/504/555) (I do not think that the opinion itself is very good, but its discussion of other cases is helpful.)

Edit: Removed an imprecise first sentence.

<comment><USER19> Sorry, but I will have to destroy you here.

First, the word 'lawsuit' does not occur in Article III (nor anywhere else in the US Constitution). You making a distinction between the word lawsuit and petition here is nonsense.

Second, Article III, Section 2, Sentence 1:

>The judicial power shall extend to all cases, in Law and Equity, arising under this Constitution

A petition for redress of grievance is _exactly_ a case in Equity and is specifically allowed under Amendment I.

<comment><USER2> It's not that there isn't an argument to be made that a petition is a case. As a matter of language, of course, it could be. This depends on the precise definitions of "case" and "petition."

But you are way too late to the party when it comes to deciding the legal meaning of these words. The prevailing judicial understanding, for more than 100 years, of the "Case and Controversy" clause has been that Article III courts can only hear lawsuits involving more-or-less concrete injuries.

And as tptacek has pointed out, this is probably for the best. Imagine the chaos if the courts were constitutionally required to hear every grievance brought by a member of the public, even if it did not affect his or her interests in any concrete way. Then also imagine the quality of the legal reasoning that would result from such a farcical system, where there was no guarantee that a plaintiff actually had any interest in its outcome.

You may wish that courts had the power to hear petitions for the redress of grievances when it is your grievance you wish to see redressed. But you should also consider the wider universe of grievances and whether you would really want to see them all ventilated in a court of law.

Edit: There are very many cases that state this clearly but here is is a somewhat random selection:

"The party who invokes the [judicial] power must be able to show, not only that the statute is invalid, but that he has sustained or is immediately in danger of sustaining some direct injury as the result of its enforcement, and not merely that he suffers in some indefinite way in common with people generally." \- COM. OF MASSACHUSETTS v. MELLON, [http://caselaw.findlaw.com/us-supreme- court/262/447.html#488](http://caselaw.findlaw.com/us-supreme- court/262/447.html#488)

"Over the years, our cases have established that the irreducible constitutional minimum of standing contains three elements: first, the plaintiff must have suffered an "injury in fact" \-- an invasion of a legally- protected interest which is (a) concrete and particularized and (b) "actual or imminent, not 'conjectural' or 'hypothetical.'" Second, there must be a causal connection between the injury and the conduct complained of -- the injury has to be fairly trace[able] to the challenged action of the defendant, and not the result of the independent action of some third party not before the court." LUJAN v. DEVENDERS OF WILDLIFE, [https://www.law.cornell.edu/supremecourt/text/504/555](https://www.law.cornell.edu/supremecourt/text/504/555) (very many citations omitted)

"Although the law of standing has been greatly changed in the last 10 years, we have steadfastly adhered to the requirement that, at least in the absence of a statute expressly conferring standing, federal plaintiffs must allege some threatened or actual injury resulting from the putatively illegal action before a federal court may assume jurisdiction." LINDA R. S. v. RICHARD D., [http://caselaw.findlaw.com/us-supreme- court/410/614.html#t4](http://caselaw.findlaw.com/us-supreme- court/410/614.html#t4)

<comment><USER5> > The prevailing judicial understanding, for more than 100 years, of the "Case > and Controversy" clause has been that Article III courts can only hear > lawsuits involving more-or-less concrete injuries.

Its important to understand the reasoning here: to wit, that if there isn't a concrete, particularized, redressable injury -- where "injury" is understood to be a violation of a legally-protected interest -- then there is no "Case" to resolve.

The contentious part of this is primarily the "particularized" part, since that requirement means that violations of the Constitutional limits of government power do not give rise to a cause of action based solely on the general citizens interest in constraining the government to its bounds, as even though this may be a concrete violation of a legally-protected interest, it is not _particularized_.

This certainly serves some economy-of-justice purposes, but it also makes it particularly hard to address systemic violations of the Constitution where an integral part of the charged abuse of power is the governments active concealment of the details of its actions and their particularized impacts.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> So under what circumstances, according to the court, can a citizen actually claim injury from such a program?

<comment><USER2> One can only make an educated guess, but I think there are a few possibly easy cases:

1\. Documents are leaked that specifically identify one or people whose records were illegally collected. Those people probably could sue, I would think.

2\. Documents are leaked (or evidence otherwise emerges) that the NSA collected data on virtually all of a particular company's calls. Subscribers to that service would probably have a good case for standing.

Bear in mind, though, that we're only at the preliminary injunction stage. The review at this stage will typically take a pessimistic view of plaintiffs' ability to prevail on issues like this if there is substantial uncertainty.

It's possible they could lose on the injunction, but ultimately win on the merits.

<comment><USER9> Couldn't the government just say whatever documents presented were obtained illegally or are 'state secrets'?

<comment><USER5> > Couldn't the government just say whatever documents presented were obtained > illegally or are 'state secrets'?

State secrets probably -- that privilege is extremely easily abused. Obtained illegally, less so, since illegally obtained evidence isn't generally excluded except when offered by the government in a criminal case; in other cases, the remedy for illegally obtained evidence is just to prosecute for the act of illegally obtaining it.

</comment></comment></comment></comment><comment><USER21> For those of you who want to argue about standing here, your argument is with the supreme court, not the lower courts :)

[http://www.scotusblog.com/case-files/cases/clapper-v- amnesty...](http://www.scotusblog.com/case-files/cases/clapper-v-amnesty- international-usa/)</comment>


Show HN: Download your spotify music - <AUTHOR> https://github.com/alexperezpaya/Spotijay

<comment><USER2> Ran into a couple of things. Firstly, the documentation is wrong and when it states using "node app.js -u blah -p blah" it needs to specify "node app.js config -u ...".

Also, I found that if you enter an incorrect password, the application itself will break out of the switch statement (track in this case), but it won't output an error to stdout and also node remains running (with the application dead) and will make it appear like nothing bad has happened.

(E: Using Ubuntu 14.04, node 0.10.33, libspotify, etc, all up to date).

</comment><comment><AUTHOR> Hey guys!

I wanted to thank you for your feedback.

User @gorbas submitted a pull request to fix the documentation

You may find some bugs, some caused by my fault and some other s regarding libspotify bindings which are not maintained by me.

If you find any bug please, open a Git Issue

</comment><comment><USER3> ...so, if I'm understanding this correctly, you're ultimately just saving local, DRM-free copies of music downloaded from Spotify?

Is this basically just Napster in 2014?

</comment><comment><USER4> Is this just copying the local temp files? That's what it looks like from a quick glance of the code.

<comment><USER5> Effectively. Seems to use node-libspotify's ability to pipe the raw PCM stream to a file handle, after which it proceeds to convert to WAV->MP3(320kbps). Provides wrappers on top for playlist handling, etc.

</comment></comment><comment><USER6> and share?</comment>


Retrofit your old iphone into a Nintendo Gaming Device - <AUTHOR> http://phonehacks.co/

<comment><USER2> No pics of the modification, no details at all about what you do to the phone? I kept clicking around to find some more info, but nothing. Obviously, this will not be okay with Nintendo either.

</comment><comment><USER3> I have a feeling Nintendo won't be too happy about this, considering they sell Super Mario World for the Virtual Console.

</comment><comment><USER4> this is awesome!

<comment><AUTHOR> Thanks!

<comment><USER5> I think your fb share is messed up, it shares <http://phonehack.co> not <http://phonehacks.co/>

<comment><AUTHOR> thanks we're going to fix it! -- now it should be fixed

</comment></comment></comment></comment><comment><USER6> Or anyone who wants can do this with their android phone in a couple of minutes. Someone was working on a "clamping" controller that would work with basically any phone, but I don't remember what it was called. It would be something that would go over well on Kickstarted I would think.</comment>


Behind the Scene: "Subete ga F ni naru" ED - <AUTHOR> http://baku89.com/article/2394 <comment><USER2> This is about the ending of a currently airing anime: [https://www.youtube.com/watch?v=85yzpU9Wk9w](https://www.youtube.com/watch?v=85yzpU9Wk9w)

<comment><USER3> That link seems to be unavailable in the USA; here's a mirror. [http://b.1339.cf/kqyvngq.webm](http://b.1339.cf/kqyvngq.webm)

The opening credits are pretty cool too, but from a traditional animation perspective rather than geek cred: [http://b.1339.cf/dbbbhjp.webm](http://b.1339.cf/dbbbhjp.webm)

</comment></comment><comment><USER4> Does anyone know of other blog posts like this? I watch a lot of anime, but never see anything written in English about the creation of many of the impressive animation and CG usage.

<comment><USER3> I don't know about blog posts, but if you want to see a lot of (fictionalized) details about how the sausage is made, you should watch Shirobako.

[http://www.crunchyroll.com/shirobako](http://www.crunchyroll.com/shirobako)</comment></comment>


Obama suggests requiring everyone to vote - <AUTHOR> http://www.washingtonpost.com/blogs/wonkblog/wp/2015/03/19/wonkbook-obama-suggests-requiring-everyone-to-vote/

<comment><USER2> Mandatory voting would give a lot of power to the gerrymanderers. As we know, modeling the behavior of large groups of people is easy. When you can predict who will vote and you have access to drawing voter district boundaries, you have the ability to preselect who will be elected.

Not voting is a choice and allows voter apathy to play a role in deciding elections. If an area is a majority Democrat but most of the voters don't care enough to vote then a motivated minority party can put boots on the ground and get their candidate into office. With mandatory voting that would never happen as the majority incumbent would always win thanks to receiving all those votes cast out of obligation rather than intent. That aggravates the most difficult part of democracy which is giving people with unpopular yet valid opinions a voice in the conversation.

Now, if we had proportional representation...

</comment><comment><USER3> Mandatory vote is a good start, and will encourage more people to think about their government. In addition, get rid of electoral college. Add verifiable secure online voting and promote a system wide education of the people on the benefits of political envolvement.

<comment><USER4> Many non voters will think about government, and realize none of the candidates represent them in the slightest.

<comment><USER3> Yes, and it will be a tiny stepping stone toward changing this backwards system altogether.

</comment></comment></comment><comment><USER5> I'm curious what impact mandatory voting has on the number of viable political parties. In Brazil, we have mandatory voting and a few more viable political parties (at least at the state and local level). I haven't a clue if there is any relationship, but I would imagine that requiring people to vote would involve having the 63% that isn't voting currently looking at candidates from the two parties and saying to themselves "I hate both, who else is available?"

</comment><comment><USER6> Well in Brazil we do have mandatory voting and our political situation is one of the worst in the world.. Everybody here is trying the opposite - to make voting not mandatory.

The population does not feel represented by the politicians, yet we have to choose one of them every election. Buying votes /manipulating electors in this scenario looks really easy..

<comment><USER7> Do you understand why making voting not mandatory would not solve your problem? The subset of people that do vote will still vote poorly.

The people in power almost always badly represent the common interest; I hope this changes in my lifetime.

</comment></comment><comment><USER8> It if must be done, it must be done with a radical reform of ballot access, low electoral ceilings and easy-to-register third parties. However, it's not a panacea. Greece, Argentina, Brazil managed to have quite corrupt, dirty politics even with mandatory voting.

<comment><USER9> Are there any successful countries with mandatory voting?

<comment><USER10> [http://en.wikipedia.org/wiki/Compulsory_voting#Current_use_b...](http://en.wikipedia.org/wiki/Compulsory_voting#Current_use_by_countries)

Australia is the country most like the US on the list. I don't know enough about the Central American countries on the list to judge their internal politics. The unenforced list includes Belgium and France.

</comment></comment></comment><comment><USER11> I think switching to instant runoff voting would have more impact. That way, folks can vote their conscience first, practicality second.

<comment><USER12> But I could argue that the act of voting is itself an immoral, even violent act.</comment></comment>


Facebook shrugs as Free Basics private key found to be signing unrelated apps - <AUTHOR> https://www.theregister.co.uk/2019/09/02/facebook_basics_app_key_compromised/ <comment> m-p-3 Did Google blacklist that signing key from being used on the Play Store, and provide a warning when an app signed by it is scanned by Play Protect?

If Facebook isn't willing to take this seriously, IMO that would be the next logical step to minimize the impact.</comment>


Breakdown of technical issues related to the crash of Kobe Bryant's helicopter - <AUTHOR> http://nymag.com/intelligencer/2020/01/kobe-bryants-helicopter-likely-succumbed-to-common-danger.html <comment><AUTHOR> An additional AskHN: Is there an issue with discussing Kobe Bryant's passing on this forum, and if so, what might that be? HN discusses the recent passing of non-tech individuals regularly. It would be understandable if users simply didn't desire to participate in such a conversation; instead, it seems that most attempts at submission are being flagged by a minority of users. In the comments of one or two tangentially-related submissions, others have expressed distress that they're unable to discuss this tragic event in a venue in which they otherwise feel comfortable. That seems unfair.

<comment><USER2> I have no knowledge about previous stories being flagged.

I do have experience in aviation safety and know the article linked to is irresponsibly speculative. I also have first hand experience in unexpectedly losing a loved one, and know how painful such baseless speculation can be.

</comment></comment><comment><USER3> I actually read the article and I'm a commercially-rated pilot with experience in similar terrain and airspace.

First of all, most helicopters are not flown IFR. Following roads in bad weather is common. But ... flying under 500' is not safe these days because of wires, towers and heliostats.

The journalist is likely speculating on what the flight path was and the weather conditions, but overall it feels pretty accurate.

That's why you don't fly in helicopters, and in bad weather. You fly scheduled airlines, in good-enough weather.

Not that I care, but Kobe should have had better personal security advice.

<comment><USER4> > That's why you don't fly in helicopters, and in bad weather. You fly > scheduled airlines, in good-enough weather.

From what I gathered, said bad weather was extremely localized. Someone who had just arrived at the location (by car) around the time of the accident noted that the sky was clear just a few miles away.

<comment><USER5> That doesn't sound right -- I mean, it might be true that there was a clear spot nearby, but it's not a good summary of the weather that morning. It was a blanket coastal fog that grounded the LAPD choppers and canceled many flights. I live in San Diego, 120 miles away, and it was pure white fog outside my bedroom window when I woke up too.

It was not in any sense a fair weather morning for flying.

</comment></comment></comment><comment><USER6> I beats me why all aircraft would not have forward downward facing radar to give a readout of approaching terrain.

<comment> o-__-o Cost is a big factor. Costs to buy the avionics. Costs to get the avionics fit into your probably already full instrument cluster. Costs to troubleshoot during your annuals...

Then there's the I don't need it because I use foreflight. Or because they regularly fly a jumbo jet that has TCAS already installed.

<comment><USER7> TCAS doesn't help with terrain it's designed to avoid collisions with other planes. GPWS or its equivalents does this.</comment></comment></comment>


10 concepts regarding PHP that are wrong? - <AUTHOR> http://www.phpclasses.org/blog/post/155-Top-10-Wrong-Ideas-About-PHP-That-You-Should-Get-Right.html

<comment><AUTHOR> This article suffers from a lack of editing - it could do with a rewrite to improve the readability alone Apart from this, some of the points are somewhat glib, if not outright specious:

* PHP can do more than 'web' - the functions that fall outside of 'web' (process control and semaphore come immediately to mind) have wildly inconsistent quality and are generally not supported outside of POSIX based operating systems. This reflects on PHP as a language on the whole - part of the language and its extensions are well written and documented, many other parts are not. Prolonged use of the language just repeatedly reminds the developer of this, which becomes tiresome.

* PHP projects are not reusable - While the example given (Wordpress) is widely used, the project is somewhat cumbersome to extend because of the mix of application and presentation logic. Also, using Wordpress is not the best example to use, given the amount of security issues it has faced[1].

* PHP is not good for high performance scalable Web sites or applications - There is a claim regarding the HipHop for PHP (H4P) project being solely about making PHP into a citizen of the multi-threaded web server module world. The performance improvements in execution speed provided by H4P show that the benefits of compiling PHP scripts via interpretation into C++ are far more than just providing multi-threaded instances. This part of the article also continually refers to CPU being the key benchmark for intensively used websites. In the real world, applications generally consume more memory than CPU. PHP handles memory use poorly. That alone appears to have been the motivator behind the H4P project at Facebook. Using PHP in the real world means that a series of caching technologies (opcode - e.g. APC, frontside - e.g. Varnish, memory - e.g. memcache) are required to support large amounts of simultaneous users.

In summary, the article detailed and answered many fallacies regarding PHP that are littered across the web. The inclusion of statements that are 'loosely' true and glossing over innate inadequacies in the language reduced the article as a whole. As a result, it underlined the reasons why I do not choose to write any programming code in PHP at all any more.

While I can see the reason for responding to a series of specious assertions regarding PHP[2], a better response could have been made.

[1] [https://encrypted.google.com/search?q=wordpress+security+iss...](https://encrypted.google.com/search?q=wordpress+security+issues)

[2] <http://java.dzone.com/news/i-php#comment-54511>

</comment><comment><USER2> +1</comment>


Scientists Find Microbe That Functions Without Mitochondria - <AUTHOR> http://www.npr.org/sections/health-shots/2016/05/12/477691018/look-ma-no-mitochondria <comment><USER2> There's some rather odd terminology use with this one. A "microbe" is any living organism too small to be seen with the naked eye; so mostly single cell eukaryotes and prokaryotes. Prokaryotes don't have mitochondria. But to read this article one would think it's amazing that any microbe lacks mitochondria. What's interesting here is that they've apparently found a eukaryote which lacks mitochondria, ("microbe" need not have been mentioned).

I wish they'd also at least hint at endosymbiotic theory[1], which states that eukaryotic organelles, like mitochondria, may have at one time been separate organisms and became internal symbiotes later. Then it becomes somewhat easier to be surprised at an eukaryote, an aggregate organism, lacking a critical component.

[1] [https://en.wikipedia.org/wiki/Symbiogenesis](https://en.wikipedia.org/wiki/Symbiogenesis)</comment>


Elon Musk's attempt to discredit the media is dangerous, even if he's joking - <AUTHOR> https://slate.com/technology/2018/05/elon-musks-attempt-to-discredit-the-media-is-dangerous-even-if-hes-joking-about-the-whole-pravda-thing.html?via=recirc_recent <comment><USER2> The profit motive, when it gets into a fighting stance against something with a very different agenda, will usually come out ahead. The original purpose of the 'media', or journalism and the digital and print press which is its media, is to disseminate information.

The direction/bias of the authors can be one of many things: \- state actors attempting to disseminate ideas of the state and influence readers in its favor \- state actors with a directive to attempt to be a place for different voices to be heard \- private actors attempting to promote the spread of their ideas \- private actors attempting to promote the spread of unique / diverse ideas .. skipping further down the muckraking hole \- private actors attempting to promote eyes on their ideas, no matter what they are, because pairs of eyes have become more profitable thanks to programmatic advertising and the brokering of digital space next to the ideas.

The word journalism conjures up the image of a flak-jacket-donning hero risking life to get to the truth to dissemminate it to the masses. That's how the word journalist is understood in the context of an article like this Slate article. But journalism also has one writer who actually writes the article, and someone(s) who write numerous headlines and tests them out programmatically in order to get the most clicks, and selects that headline for the article in question. It's all done very quickly. Thus, clickbait.

Thus, the profit motive.

Does TV Media suffer from that? Of course - it's been well documented how uncomfortable stories on the lines of CNN, MSNBC, Fox News and such can lead to advertisers pulling revenue.

But one major difference is that in the by now old days of TV media journalism, YOU go TO the information (by flipping to the channel). Today, stuff goes FROM the Internet TO you because they know you better than you know yourself. Facebook news feeds, personalized news search results, programmatic 'click here' type imagery in our periphery -- all of that seriously questions what journalism has become. Or perhaps, how it's packaged.

</comment><comment><USER3> I used to get frustrated reading clickbait journalism and say "this isn't _real_ news, the kind I used to watch on major network television in the 20th Century". Then I realized there never was any such thing as real news. It's all clickbait. It's all muckraking. It has value but it requires as much of a critical eye to parse as the personalities it covers.

</comment><comment><USER4> It's interesting, while different media has different bias, the internet has made this bias more apparent than it ever has been in history. We can see everything, so the bias reveals itself in whichever direction it leans.

People are frustrated by this, and Trump, Musk et. al. are speaking for many people when they voice their frustrations.

The media is an essential part of democracy and effective capitalism, but the media must look inwards and focus on ridding itself of bias, otherwise people will continue to protest.

Of course that's a massive challenge. Bias stems from foundational beliefs we hold about the world. How do we/media purge ourselves of bias if it means purging ourselves of foundational beliefs that make us who we are as much as anything else?

<comment><USER5> Of higher value would be ridding ourselves of liars.

The solution to bias, is triangulation. People who don't know about it, or don't want to do it, just want to be spoon fed. And that's a spectator, not a citizen.

<comment><USER4> Liars who hold the attention of millions are few and far between. Skew and bias is ubiquitous and allows small groups with an agenda to direct people away from the raw truth and towards their sanitized or corrupted version of it.

<comment><USER5> 65 million people voted for someone with a life long habit of lying about ostensibly rather important things, and who's rate of lying continues to increase, and continues to hold the attention of millions. Few and far between taken literally applies to one. But few and far between taken in connotation: that they can't meaningfully affect the lives of many others, and therefore they can be ignored as edge cases, is provably wrong.

If you're talking about tinfoil hat nuts, e.g. Alex Jones, sure that's an edge case that doesn't matter and we really can't do anything about it anyway, whether you categorize them as liars (which they are) or bias (which they have). Bias does not imply malice, where lying generally implies either deception or malice or both.</comment></comment></comment></comment>


Ask HN: When/Will IOS support file upload? - <AUTHOR>

This is the only hole in my mobile web strategy right now. Apple won't support file upload on the iphone or ipad. I don't want to build an IOS app just to allow users to upload files. I cannot see why they can't come up with a solution for this. My question is will they ever? Searching on the web I can't seem to find any definitive answers as to why they don't allow uploads or if they ever will. Frustrating! <comment><USER2> I don't think they ever will. I think they see it as taking away from a simple, "It just works" user experience. The reasons that I see it taking away from the experience they want are:

1\. It would require users to think about how much room they have on the device. Yes, you theoretically have to do this anyway, but with approx. half of users never, ever connecting to iTunes, that is something they would have to begin worrying about. Apple doesn't want people to have to think.

2\. It wouldn't be fast, especially for big files. Soon, people would be complaining that their multi gigabyte movie rip is taking too long over the air. I've done this with a jailbroken phone over wifi-it's a pain. People would try it over 3G, or worse, EDGE.

And two non user experience reasons:

3\. It's scope creep. A phone or tablet isn't meant to replace a computer, despite what everyone says. There isn't a solib business case for them to spend the time to develop this or add in additional storage for all the garbage people would acquire.

4\. It's another possible attack vector.

<comment><AUTHOR> But they let apps upload photos, why not just let the web browser only upload photos from the photo/camera section? It seems crazy that they can't just allow photo upload. I am surprised that (many) others are not frustrated as well. It forces me to write an app just to allow the user to upload photos.</comment></comment>


Three reasons you should not use Martini - <AUTHOR> http://stephensearles.com/?p=254

<comment><USER2> Ironically, I have just written an article on how to handle page requests in go:

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

It's pretty simple and it doesn't really seem like you need Martini. When I originally looked at Martini I opted against using it because I wouldn't learn as much, so I don't really know how easy it is to use Martini.</comment>


Webbynode Rapp: Rapid App Deployment - <AUTHOR> http://rapp.webbynode.com/

<comment><USER2> The fact that it is called "Rapp" and you have a black character speaking the way only a RACIST would expect them to, with tattoos and a mouth not un- similar to typical racist cartoons (see: [http://wwwimage.cbsnews.com/images/2005/06/30/image705615x.j...](http://wwwimage.cbsnews.com/images/2005/06/30/image705615x.jpg)) is of poor taste.

</comment><comment><AUTHOR> Heroku Like Deployment for VPS service.</comment>


The House Intelligence Committee's Terrible, Horrible, Very Bad Snowden Report - <AUTHOR> https://tcf.org/content/commentary/house-intelligence-committees-terrible-horrible-bad-snowden-report/ <comment><USER2> So an incompetent liar fooled the government for years and then walked off with 1.5 million classified documents. I guess all the people that hired and promoted him should be unemployed, right? They didn't even verify he graduated from high school.

<comment><USER3> what does that have to do with his revelations which are both a. true and b. disturbing to most Americans with even a small shred of concern over unconstitutional government over-reach?

<comment><USER4> Parent comment is agreeing with absurdity of the claim (using sarcasm) made by the committee and probably agrees with both your points (though I wouldn't want to put words in their mouth, or is it type words with their fingers?).

<comment><USER5> Put words in their hands.

<comment><USER4> Haha, yes that makes a lot more sense, you don't say "make words with their vocal cords" after all.</comment></comment></comment></comment></comment>


Ask HN: Best Tech for a Web Site in 2020 - <AUTHOR> I want to resurrect the linked thread to the right, but focused on 2020. (Original thread: https://news.ycombinator.com/item?id=15685905).
I am a competent programmer, and I want to create a website, which I have not done in a very long time. My best language is Python, though I am not against using PHP or some other language. I am familiar with HTML and CSS, but not great with JavaScript yet. In my case, it would be something similar to a community site (like a small social network) with a newsfeed, p2p chat, mailbox, forum (preferably VBulletin) etc. and would need to be mobile friendly. I know that I will use PostgreSQL due to spatial data types, likely Nginx, probably on AWS.
Over the years, there have been many trends in web development such as Ruby on Rails in 2006. Now, there are so many JavaScript front end packages like React, Vue and Angular, and even for back end work like NodeJS. In 2020, I am lost as to all of the options and if all of these decisions need to be made before working on a project of this size.
Obviously, this is a vague question and heavily depends on the use case, but I am interested to hear if HN has suggestions on things to consider and what to think about when deciding. What do you think is the best tech for a web app these days, in 2020? <comment><USER2> Since your best language is Python, I would probably say Django. Vue and React are probably both fine choices for a front-end framework. If you don't want the front-end framework running across your whole website but instead just for certain components like chat I would go with Vue and then use Django with templates to create the pages.

</comment><comment><USER3> Well you know Python so Django sounds like a no brainer. The closest family members are Laravel (php) and Rails (ruby). Elixir isn't OOP so it's gonna come with a learning curve.

</comment><comment><USER4> There's no best tech stack, but I am pretty sure that the best tech for you is the one you are comfortable with.

It's more important to get the job done than thinking on what tool to use. This aspect would be considered only when you'll scale up, thus doing a rewrite/upgrade of the actual tech.

</comment><comment><USER5> For read-only websites, I use and love Craft CMS. I built a lightning fast docker setup for it. If it were a one-off job for someone else, I'd use WordPress because it's easier to find other devs.

For CRUD apps I use and love Django. It's a great backend with plenty of goodies to make life easier.

For lightweight APIs that don't require an ORM, I would just use flask.

For frontend development I use VueJS. I'd use React otherwise. I just know Vue better.

I pick the right tool for the job, with a bias towards technologies I'm familiar with.

</comment><comment><USER6> Did you check the responses to the numerous other submits of this same question?

[https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...](https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=ask%20hn%20web%20stack&sort=byDate&type=story)

</comment><comment><USER7> As a "vet" Frontend Developer. This is my go-to most of the time for websites.

[https://nextjs.org/learn/basics/create-nextjs- app](https://nextjs.org/learn/basics/create-nextjs-app)

</comment><comment><USER8> What kind of website are you creating? Start with the what and then with the how.

</comment><comment><USER9> Python & Django because you already know python. If you want to learn something new I'd suggest Elixir & Phoenix, Phoenix's new LiveView capabilities are pretty incredible.

</comment><comment><USER10> Keep it simple use django or flask since you know python already.</comment>


Ask HN: How to ask for an hourly rate - <AUTHOR> This is a recurring problem for me. Many friends contact me asking for help for their startups and ideas. I on the other hand wish to help them, but the notion of getting equity for a huge-risky-project is of no interest to me. What is the best way to introduce the topic that they should pay at least $50/hr for help. How do you do it? <comment><USER2> I think of my time as a finite resource that requires allocation. I have big buckets into which I divide these roughly like the following.

Professional Work

> Short-term revenue (freelance/consulting) hourly/day rate

> Long-term deferred at-risk revenue (my own product-like projects and equity > based compensation arrangements)

> Charity (this could include favors to friends, work donated or deeply > discounted to a non profit org that you support and open source > contributions) in this category you are working for intangibles like the > common good, reputation and the satisfaction of having contributed to > something bigger than your own direct interests.

Personal Life

> Interpersonal relationships (family, friends, neighbors etc.)

> Faith community or causes that you support (direct participation - may have > little or nothing to do with your professional skills)

> Personal development - exercise, learning etc.

> Leisure/Entertainment

When friends approach you with their great idea - you can explain you only have so much time and it is not prudent to put too much of it in the deferred at-risk revenue bucket. If they are willing to move it to the short-term revenue bucket you can consider them as a client but your at-risk bucket is already full. If you feel like they are a good enough friend that you might just do it as a favor then do it as an investment in your friendship but limit your time to something comparable to helping your friend build a new deck on his house ...the kind of time investment that is appropriate among friends. However, if you do this as a favor be clear about what you are doing, where the limit is and that you are not committing to long-term support.

Hope this is helpful in some way.

</comment><comment><USER3> I suggest watching this talk: [https://creativemornings.com/talks/mike- monteiro--2/1](https://creativemornings.com/talks/mike-monteiro--2/1)

The speaker is eccentric and sometimes unhinged but many freelancers need to hear it.

<comment><AUTHOR> Amazing video, thanks!

</comment></comment><comment><USER4> Just do it. If they are not willing to pay, they are not committed to the project enough.</comment>


Ask HN: I'll be buying a replacement hard disk, what should I check? - <AUTHOR>

Hello HN!
My laptop hard drive (rotational, magnetic hard disk) broke just yesterday and I need a replacement.
Since I'm on a tight budget, I'll be looking for a replacement on local offers (craiglist-like websites) and I was wondering:
Assuming I bring my laptop with me, and a bootable Usb drive with some GNU/Linux environment installed (and possibly, additional tools like smart tools etc) what tests should I run upon a hard drive before buying it?
And what are 'acceptable' ranges if an used drive is not just perfect (this is, you know, a very likely situation) ?
Of course I won't be buying second-hand SSDs.
Thanks in advance! -- <AUTHOR> <comment><USER2> smartctl --test=short /dev/sdX smartctl --all /dev/sdX

Check "SMART overall-health self-assessment test result: PASSED" just under the drive stats. If it fails, the drive is _definitely_ very faulty.

Any non-zero of the following would make me likely to reject. If you're in real need and can stretch your standards a little, five or fewer of any could be acceptable. Multi_Zone_Error_Rate Offline_Uncorrectable Reallocated_Sector_Ct Reported_Uncorrect Runtime_Bad_Block End-to-End_Error

Non-zero Current_Pending_Sector may be a bad sign, but may also clear itself in time. Treat as above.

Any non-zero, but not very large (i.e. obviously misinterpreted) of Command_Timeout.

Power_on_hours more than 10,000 means a consumer disk is getting a bit old. If it runs above 45°C idle (depending on ambient) may also mean it's getting old or is worn. Any breached temperature threshold that isn't again, misinterpreted (i.e. 255°C). Any Old_age or Pre-fail attributes that breach the threshold indicate an old/unwell drive.

<comment><AUTHOR> Thanks! Just the answer i was looking for!!!

</comment></comment><comment><USER3> If you're on a tight budget, I'd suggest a smaller drive rather than a used drive.

With Ubuntu, lots of dev stuff (big IDEs, big RDBMS), and a decent number of videos, I'm using about half of my 120GB drive.

If you aren't storing/editing music or videos, you should be fine with ~64GB SSD on *nix or Windows 8.1+, and then you'll get the manufacturer's warranty.

If you do need to store those things, you should just bite the bullet and buy a cheap HDD. The major downside is speed. You can then save up some money to buy a SSD in the future.

Finally, if you have access to one and are in the US, you should buy all electronics with a credit card that offers defect/damage/theft protection (like a standard American Express).</comment>