Servo passes Acid2 - <AUTHOR> https://twitter.com/pcwalton/status/449299846873108480 <comment><AUTHOR> Servo [1] is an experimental web engine developed by Mozilla, written in the Rust language [2], which is also developed by Mozilla.

[1] [https://github.com/mozilla/servo](https://github.com/mozilla/servo)

[2] [https://en.wikipedia.org/wiki/Rust_%28programming_language%2...](https://en.wikipedia.org/wiki/Rust_%28programming_language%29)

</comment><comment><USER2> Acid2 pass itself maybe uninteresting, but Servo also does layout in parallel (right now, not in the future). No other engines do.

[http://pcwalton.github.io/blog/2014/02/25/revamped- parallel-...](http://pcwalton.github.io/blog/2014/02/25/revamped-parallel- layout-in-servo/)

<comment><USER3> Wow, Servo is way longer along than I thought!

From that post:

> No doubt about it, CSS 2.1 is tricky—floats perhaps more than anything else.

I really hope that Servo helps to identify parts of the HTML/CSS specs (if any) that unnecessarily prevent parallelism. By that I mean features (like "float" perhaps) that make it harder to parallelize, and where an alternative design could support the same use cases in a better way.

Those are the gems that teach us deep lessons about the problem space, and how future similar technologies out to be designed.

<comment><USER4> CSS without float.. would not work very well! Unless we all go back to table based design (or ahead to flexbox I guess, I don't know enough, practically speaking, about that standard yet to reason proper about it though!)

<comment><USER5> If you clear your floats, you'll be fine in terms of giving the engine room to parallelize, according to pcwalton's blog post.

<comment><USER6> Does that 'allow' the classic use case of floats - potentially, what should be the _only_ use of floats - wrapping text around an image? I feel like the answer would be "no", yet there's no good alternative for achieving this common requirement, which would cause a snag.

<comment><USER7> If you know you need to use floats to flow text around elements, feel free to use them! They're in CSS for a reason :) But if there are alternatives (such as absolute positioning) that work equally well in your particular design, then choosing an alternative may help you gain better performance.

</comment></comment></comment></comment></comment></comment><comment><USER8> Oddly enough I just checked and Safari is not passing the Acid2 right now. Happens on my iPhone too.

[http://www.webstandards.org/files/acid2/test.html#top](http://www.webstandards.org/files/acid2/test.html#top)

<comment><USER9> To quote: "Servo passes Acid2 in my branch". It is probably not in default branch yet.

<comment><USER10> To quote: "Safari is not passing".

</comment></comment></comment><comment><USER11> Are there any sites with runnable Servo binaries? Or is it seriously just the engine with absolutely zero browser chrome?

<comment><USER7> We have no browser chrome, for two reasons:

(1) Browser UX research isn't part of the research agenda for Servo at this time. (That isn't to say we aren't interested in browser UX research at Mozilla, just that that isn't being done under the Servo project.)

(2) It helps to ensure that we are embeddable. We want Servo to be an embeddable Web rendering engine for people to use in their own projects.

<comment><USER12> embeddable. Wow. This was what Gecko was hoping to achieve and failed to do so. Lets hope the second time around everything will be much much better.

<comment><USER13> There's also a chance that they'll adopt the Webkit embedding API, which would make Servo a drop-in replacement for any software that currently uses Webkit. Though it hasn't been decided for certain whether to pursue this route.

</comment></comment></comment></comment><comment><USER14> Servo's progress is impressive. How far is it off being ready to integrate in to a real browser? Is this likely in the foreseeable future?

<comment><USER15> Mozilla keeps saying it is experimental and not intended to replace Firefox, but it sure seems like they're putting a lot of effort into it and Rust...

That said, I don't think it could be ready for years if ever.

</comment></comment><comment><USER16> > That smiley face looks like the face of someone that just passed an acid > test. -- @alekslitynski

I remember the mess I saw on my PSP when I tried it out when Acid 2 was important.

<comment><USER17> For the confused: @alekslitynski is making a reference to [https://en.wikipedia.org/wiki/Acid_Tests](https://en.wikipedia.org/wiki/Acid_Tests).

</comment></comment><comment><USER18> Can't wait until I can get a browser that uses this, especially on Android.

</comment><comment><USER19> Posts like this always make me want to play with a layout engine trying to implement various features. Is there a toy layout engine made specifically for (self-) education? I couldn't find one. If there isn't, what is otherwise the easiest one to get started with?

<comment><USER20> Or contribute to Servo! Despite the huge milestone represented by Acid 2, it's still pretty early days and there is plenty of work to go around. The code's on GitHub [1], Josh Matthews did a nice talk about Fosdem that should give you a start on the architecture and how to contribute (video [2], slides [3]), and there is an irc channel (#servo on irc.mozilla.org) where you can ask questions.

[1] [https://github.com/mozilla/servo/](https://github.com/mozilla/servo/) [2] [http://ftp.osuosl.org/pub/fosdem//2014/UD2218A/Saturday/Serv...](http://ftp.osuosl.org/pub/fosdem//2014/UD2218A/Saturday/Servo_building_a_parallel_web_browser.webm) [3] [http://www.joshmatthews.net/fosdemservo/](http://www.joshmatthews.net/fosdemservo/)

<comment><USER7> Servo is also pretty easy to navigate, IMO. I'm biased, of course :) But we do care a lot about code cleanliness.

</comment></comment></comment><comment><USER21> The HTML 5 spec can be implemented from scratch, but my guess is it takes a dozen times more people than implementing a C++ compiler. My basis for this comment is the now-four-years-dormant project I worked on to implement just parsing HTML5 into a DOM tree, which wasn't even inspired by wanting to write my own browser. I was motivated more by having an interest in hacking text layout code, and the need for some sort of syntax for my test cases. Since the project had no commercial goal, it went down a tangent.

I'm impressed that a non-profit has funded two of these projects.

</comment><comment><USER22> But is it any faster at doing so than any of the competition?

Specifically, are there any real benefits to the "parallel" aspect of this?

<comment><USER7> I haven't measured Acid2 layout performance, because it's not particularly interesting; Acid2's CSS is nowhere near the CSS that someone would actually write in the real world. On real pages, from our small amount of testing, we've seen promising results.

<comment><USER22> I'll have to give it another try. Last build I ran couldn't load that much.

Of course, firefox is already bloody fast on any site I can think of. Not sure what sorts of improvements I should be looking for.

<comment><USER7> Oh, Servo certainly isn't a production-ready browser engine yet, if that's what you're looking for; the incomplete DOM code and network code prevent many sites from working.

<comment><USER22> More than just being production ready. I'm wondering what lessons have been learned that will actually help current browsers. Seems that servo is in a massive game of catch up, with no guarantees that things will be faster/better/whatever.

<comment><USER23> I remember the same things being said about Mozilla/Gecko back in '99\. That seemed to turn out pretty well for everyone.

<comment><USER24> "I remember the same things being said about Mozilla/Gecko back in '99."

Except nobody ever said that back in 99.

<comment><USER23> Interesting. how does one go about proving a negative?

To support my side, do a Google search for "Joel spolsky Mozilla". Hope that helps. Granted, it was written four months into 2000, but was reflecting murmurings one would read on Slashdot months earlier (back when /. was the HN of its time).

<comment><USER22> I'm not sure what this proves, though. It didn't exactly work out well for Netscape.

To be fair, the lesson learned there was to not bet your company on a rewrite. Which they are not doing.

<comment><USER23> I'd say that the first thing it proves is you don't remember the tech scene in '98\. All the comments you brought up in your GP post were reflected loudly by most pundits during that time. Cringley, spolsky, and many others said AOL was doing a fool's errand by allowing the then-unproven open source bazaar model to rewrite the browser. And that they'd be playing catch-up. And that IE would win because nobody would care about the rewrite. Fast forward to 2014, and blink/Firefox fight for first place, while IE continues to lose market share. Mozilla not only caught up, but is now setting the pace.

The second thing it shows is that history repeats itself. The pundits, much like you will prove to be, were wrong. Thanks to the brilliance of jwz, the Mozilla project and the gecko rewrite has outlived both Netscape and AOL. Firefox is a flagship example of how open development can create a superior product that can outlast the companies that make it.

The next thing this proves is that open development is continuing to show that rewriting an engine doesn't require "betting the company" anymore. Mozilla and Samsung are both heavily-invested in Servo, and are expecting this rewrite to be at the core of your future operating system. But if servo doesn't pan out, Mozilla won't be filing for chapter 11 protection

<comment><USER22> I'm not sure what I'm reading here. First thing to remember, is that Netscape 4 was pretty rushed and terrible. To the point that I remember thinking of how awesome IE was at a few points. And I already had a large distrust of MS.

That is, MS used some underhanded tactics to gain market share. They also took advantage of (and probably forced) a major misstep by a competitor.

That Phoenix/Firefox was able to be resurrected from the ashes is a fortunate occurrence, but at no time did that at all come of as if it was planned. I pretty much consider it the "classic coke" of the browser wars. (Remember, phoenix was originally Mozilla's suite, stripped down to just the browser.)

So, yes, it has gone rather well. However, I'm not sure the codebase can afford to survive the death of its stewardship again. The statistics show a clear dominance of "not Mozilla" historically.

To the point that I'm not all sure on what you are basing your claim of Mozilla "now setting the pace." Don't get me wrong, I'm glad it is doing well. It is my browser of choice. However, I realize I am the minority both in my friends/family and statistics.

Which is funny. In my family, the browser choice is either Safari or IE. Depending on OS of choice. In my friends, it is Chrome. To the point that I'm not even clear what lessons are to be learned from these choices, honestly.

So, back to the point. How were the pundits wrong? Did AOL/Netscape somehow come off well by the rewrite? Was it a sound investment? If anything, I would think the continued active development of the non-servo codebase shows that it is sound advice _not_ to bet the company on a rewrite, and that they learned it. Are you really claiming otherwise?

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25> Looks better than current Firefox on my system. [http://i.imgur.com/6CN4Heh.png](http://i.imgur.com/6CN4Heh.png)

<comment><USER26> Ouch! Acid2 is broken on my Firefox too (but in a slightly different way). :(

<comment><USER27> No problems on FF 31. [http://i.imgur.com/5l2042M.png](http://i.imgur.com/5l2042M.png)

</comment></comment></comment><comment><USER28> Am I the only one who thought Acid2 was something to do with a new database data integrity test?

<comment><USER29> me too

</comment></comment><comment><USER24> Good,now maybe you could fix that broken IndexedDB spec and come up with something more usefull...

and implement basic stuff like Summary/Details or you know some HTML5 form controls...

And some file system api, seems to me Mozilla dont care about offline webapps,since the WebSQL debacle...

<comment><USER30> Offline and Web have always been very funny to me. Why should it be the Web's responsibility to make offline better, it is the Web after all -- the epitome of online connectivity. If anything, it should be the mobile companies responsibility to have better offline support. Maybe they could start by not choosing to arbitrarily wipe Web browser data as the first step of reclaiming memory for the operating system (I'm looking at you, Apple)?

<comment><USER31> "Why should it be the Web's responsibility to make offline better"

Because you care about your users being able to use the site?

Because modern users aren't tethered to the wall any more?

"Maybe they could start by not choosing to arbitrarily wipe Web browser data as the first step of reclaiming memory for the operating system"

Okay, now I'm curious.

Assume the system is totally out of storage. Something _has_ to go. Should it be:

1) Apple's answer (i.e., deleting cached web pages and data) 2) Your answer (which would be?)</comment></comment></comment>


UCLA professor stole missile secrets for China, faces 219 years in prison - <AUTHOR> https://www.newsweek.com/ucla-professor-stole-missile-secrets-china-219-years-prison-espionage-1447286 <comment><USER2> Discussion from yesterday: [https://news.ycombinator.com/item?id=20343254](https://news.ycombinator.com/item?id=20343254)

</comment><comment><USER3> Interesting that the charges include " failed to report income generated by the scheme on his tax returns."

<comment><USER4> Certainly not the first one being caught via the tax code [1].

[1] [https://en.wikipedia.org/wiki/Al_Capone#Tax_evasion](https://en.wikipedia.org/wiki/Al_Capone#Tax_evasion)

</comment></comment><comment><USER5> Why not 1000 years? These numbers are just stupid at this point. Just say life in prison.

<comment><USER6> From a non-US point of view, it is indeed a very surprising aspect of the US legal system.

Making jail time linear seems like a strange fit for finite human lives. Are there many other legal systems in the world that work like this ?

<comment><USER7> Aren't these large numbers just the sum of the maximum jail time for each of the charges? How are multiple charges handled in other countries?

<comment><USER6> At least in France, this article says that for similar concurrent charges (not sure how similarity is determined), the most important sentence is picked. So, max instead of sum.

[https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticl...](https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000006417358&cidTexte=LEGITEXT000006070719)

<comment><USER8> This seems odd, like buy one get one one free, but for crimes. If you murder a guy in France, you can burn his house down without additional penalty?

<comment><USER9> I am quite certain you can.</comment></comment></comment></comment></comment></comment>


Once Teased for Her Name, Marijuana Pepsi Turns Her Challenges into a PhD - <AUTHOR> https://www.npr.org/2019/06/21/734839666/dr-marijuana-pepsi-wont-change-her-name-to-make-other-people-happy <comment><USER2> >"A lot of other people were thinking [my mom] was smoking marijuana and drinking Pepsi," she tells NPR. "In the black community, we're used to having names that are more cultural."

I'm not a native English speaker, so I might be in the wrong here, but is she using the word _" cultural"_ in a different way than normally?

<comment><USER3> No, African Americans have a unique culture in America, and whites are notoriously judgmental about it.

The only reason you might find this "different" is if you don't consider Black culture to be legitimate.

We call this "racism".

<comment><USER4> > _No, African Americans have a unique culture in America, and whites are > notoriously judgmental about it. The only reason you might find this > "different" is if you don't consider Black culture to be legitimate. We call > this "racism"._

...but he's not American?

It's quite a stretch to arrive at an honest question about the use of a word - by someone outside of your own country's culture - to it being equated to racism, merely because it's from a egocentric (American society) point of view.

The world is _a lot bigger_ than just America.

Maybe tone down the racist accusations until you have some qualitative context to use it. Otherwise, if antagonising people that might otherwise be sympathetic to your plights is your end goal, then by all means, carry on.

</comment></comment></comment><comment><USER5> Naming people after flowers is actually incredibly common if you think about it.

<comment><USER3> Or intoxicants.

"Brandy" is a name, why can't "Marijuana" be a name?

<comment><USER6> It's a common misconception that the name Brandy comes from the drink. All evidence shows the origin is just a feminine form of Brandon.

</comment></comment></comment><comment><USER7> The lesson is you can overcome the legacy of your parents bad decisions.

</comment><comment><USER8> So what's the takeaway here?

<comment><USER9> Literally the last paragraph:

"We can't always go through life-changing things to make other people happy ... and I had to learn that early on."

<comment><USER10> You could also spend 10 mins like my brother did and just change your name to something you like, maybe even name yourself after a celebrity, rather than the one assigned to you.

<comment><USER3> You shouldn't be forced to change your name just to be treated with dignity.

<comment><USER11> But your name is something you have the ability to change once you're an adult (and even earlier in some cases if you insist on being called by a preferred name or nickname).

You don't have the ability to change how someone (everyone?) else reacts to an unusual name.

<comment><USER12> Literally the last paragraph:

"We can't always go through life-changing things to make other people happy ... and I had to learn that early on."</comment></comment></comment></comment></comment></comment>


AlphaGo taught itself to win, but without humans it would have run out of time - <AUTHOR> https://www.theguardian.com/technology/2016/jun/27/alphago-deepmind-ai-code-google <comment><USER2> I don't think this is something that'd be shockingly hard to teach AlphaGo to do itself. But it's an additional variable that they probably didn't want to throw to chance going into this competition. As a relatively simple formula, hard-coding it prevents a weird oddity from costing them the match.</comment>


Ask HN: Production Prolog in 2020? - <AUTHOR> Seeker of logic programmers! <comment><USER2> Upcoming Rust lifetime analysis engine, Polonius.

[http://smallcultfollowing.com/babysteps/blog/2018/04/27/an-a...](http://smallcultfollowing.com/babysteps/blog/2018/04/27/an- alias-based-formulation-of-the-borrow-checker/)

</comment><comment><USER3> I think Prolog and logic programming will have a second renaissance. I think at the very least a general artificial intelligence would require a logical inference engine similar to Prolog.

<comment><USER4> Do any of the non-artificial intelligences walking around out there contain a logical inference engine similar to Prolog?

<comment><USER5> Yes. Logic wasn't conjured up from abstract ideas, but from a concerted effort to distill the essence of what humans (regular, average people) find reasonable and convincing. (To mention just one example, there is a reason one of George Boole's major works is called "The Laws of Thought".)

Our strategies for understanding language also involve inference and unification that is similar to logic programming. This is not to say the exact semantics and evaluation strategy of Prolog is what humans carry around, but _part_ of our cognitive apparatus clearly operates in a manner _similar_ to logic, and by extension Prolog.

I discussed this topic with one of the inventors of Prolog recently: [https://thesearch.space/episodes/1-the-poet-of-logic- program...](https://thesearch.space/episodes/1-the-poet-of-logic-programming)

<comment><USER6> Plotkin's thesis! You had an interview with _Kowalski_? Wow :)

<comment><USER5> You're on my wish list for interviewees too :)

<comment><USER6> Wot me? Haha! Wait another 20 years maybe! But thanks, that's so kind :D

</comment></comment></comment></comment></comment></comment><comment><USER7> Our pay software at work needs a Prolog engine (SWI). I think it's exactly where it shines : a complex logic with a lot of small rules that would be a nightmare to implement and maintain with a if / else logic.

<comment><USER8> I implemented something similar to that at a payments company a while back, but not with prolog because I couldn't get buy-in. I wrote a rules engine expressed as SQL tables, and it was absolutely better than if-else or switch. It let us delete thousands of lines of code and also slap on a UI so that the people managing the payments rules could make changes themselves. Highly recommend.

<comment><USER9> In my experience, "logic wants to be code, and not data". Ie it's a dangerous (although sometimes necessary) step to move this into the data domain. Did you encounter any difficulties with missing source control, being able to use debugging tools, etc?

<comment><USER10> Logic doesn't want anything.

Highly regular logic is better expressed in generalizations, and inferable logic is better expressed in a compressed, normalized fashion rather than repeated and duplicated.

The more irregular logic becomes, the more it fights generalization and needs special cases. The ultimate special case is a programming language (and code is data too!). The risk in expressing rules in the form of data is that to handle all edge cases, you encode a custom programming language without all the resources that supports programming languages, like editors, debuggers, source control, developer mindshare, stack overflow, etc. But not all logic is irregular enough to warrant it.

</comment></comment></comment></comment><comment><USER11> There was a minor hype cycle with SMT solvers in 2019.

For a while I was extremely fascinated by SAT as an encoding for hard problems that somehow had heuristic fast solvers; particularly by SATPLAN, the blocks world, etc.

But there's an useful contrast with Lisp, the other thing everyone within a radius of HN would like to emerge as winner. Lisp is essentially a syntax concept. It isn't particularly opinionated about problems -- on the opposite, it's indefinitely extensible to accomodate nearly everything. So we have Clojure and Hy (a Lisp that superficially imitates Clojure but compiles to the Python AST) and people doing scikit-learn ML on Lisp.

Logic programming, on the other hand, wants problems to be formulated on _its_ terms. It needs the world itself to change to "win big". Of course logic programming problems aren't going to disappear, as sparse linear algebra programs won't. But this isn't a paradigm, it's an application.

<comment><USER5> Prolog-style logic programming is very different from SAT, SMT and Answer Set Programming in this regard. Prolog has the same features that you describe in Lisp. It's homoiconic, infinitely malleable, meta-level programming is trivial, etc. I recommend having a look at:

[https://www.metalevel.at/acomip/](https://www.metalevel.at/acomip/) (A Couple of Meta-interpreters in Prolog)

and

[https://github.com/triska/lisprolog](https://github.com/triska/lisprolog)

<comment><USER12> Understanding the declarative vs. operational semantics of Prolog (and how things like tabling can bridge the gap in some cases) is one of the most important concepts to master. It's really a shame that that more Prologs don't support alternate operational models -- though it's pretty trivial to write meta-interpreters with your own semantics (such as breadth-first eval, etc.) it would be nice if there were canonical versions. For CLP & attributed- variables at least there is some universality.

</comment></comment></comment><comment><USER13> TerminusDB is a new project being implemented in Prolog: [https://github.com/terminusdb/terminusdb- server](https://github.com/terminusdb/terminusdb-server)

</comment><comment><USER14> I really like working with [https://mercurylang.org/](https://mercurylang.org/) ; I think there are a few companies that use it for production software.

<comment><USER12> Seems like it had some traction like 10 years ago. I like the idea of controlling backtracking, but then when I tried it I thought it got a bit verbose w/all the mode decls. I should take a look and see if there's been any changes recently.

</comment></comment><comment><USER15> I did some work with SWI-Prolog. It is useful when the problem can be effectively translated into Prolog's preferred form of terms and rules. But the solver mechanism only solves a subset of logical inference needs. Prolog's use of logic in AI should not be conflated with the AI/ML systems which use networks of floating point operations, i.e. not boolean operations.

As always, best to choose the tool / language that best suits the problem.

</comment><comment><USER16> Datomic uses Datalog, a dialect of prolog, that's what I would look at first if I needed prolog in production in 2020.

</comment><comment><USER17> Gerrit (code review) uses Prolog for submission rules. I guess that counts as production prolog.

[https://gerrit- review.googlesource.com/Documentation/prolog-...](https://gerrit- review.googlesource.com/Documentation/prolog-cookbook.html)

</comment><comment><USER18> Kind of offtopic, but does anyone know a good resource around implementing a simple prolog/similar language? My previous attempts at learning logic programming have failed, and it just _feels_ like a thing that becomes clear after you've seen how it works under the hood.

<comment><USER19> Check out miniKanren ([http://minikanren.org](http://minikanren.org))!

<comment><USER12> Though as Kanren's biding-stream merging which is a bit different than Prolog's DFS backtracking, it's good to look at but doesn't work like Prolog, so one would still need to look at the latter separately.

</comment></comment></comment><comment><USER20> Yarn 2 uses Prolog for workspace constraints.

[https://dev.to/arcanis/introducing-yarn-2-4eh1#workspace- con...](https://dev.to/arcanis/introducing-yarn-2-4eh1#workspace-constraints)

</comment><comment><USER21> I'm writing a constraint solver-based scheduler for lab work with social distancing. It's going to be used by at least one lab.

(Reminds me I've got to get to work on it! Anybody ping me if you want to help.)

</comment><comment><USER22> A tangeant question is: Which non-niche language are having push for integrating a subset of logic programming extensions ?

There was a (unlikely to be merged at least in its current form) proposal for Kotlin -> [https://github.com/Kotlin/KEEP/pull/199/files](https://github.com/Kotlin/KEEP/pull/199/files)

Maybe LINQ from .NET could be included

There is also chalk from Rust [https://github.com/rust- lang/chalk](https://github.com/rust-lang/chalk)

<comment><USER23> LINQ is just in-language SQL with type checks, unless I'm ignorant of a bunch of its functionality (which I really hope is true, now).

<comment><USER24> There's a lot more to LINQ than that.

LINQ is extensible and you can connect it to arbitrary data sources by writing a query provider.

awesome-linq[0] has some examples of what can be done with it.

[0] [https://github.com/aloisdg/awesome- linq](https://github.com/aloisdg/awesome-linq)

<comment><USER23> Oh sure yeah, but I don't think it has any logic/constraint programming functionality.

</comment></comment></comment></comment><comment><USER25> Is this related to Datalog also? I've watched a few presentations by Rich Hickey (creator of the Clojure programming language) and I feel like he often name-drops Datalog as a great tool.

<comment><USER21> > Datalog is a declarative logic programming language that syntactically is a > subset of Prolog.

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

</comment></comment><comment><USER26> I have used Prolog in a few professional projects.

I think if they came out with a version in hardware like they use to have lisp machines, it would have much better performance.

<comment><USER5> That was one of the ideas of the Fifth Generation Computer Systems project, started in 1982 :)

<comment><USER26> timing was bad on that with the AI winter.

<comment><USER27> Wasn't the AI winter mostly a thing wrt. U.S. academia? 5th gen was a Japanese-led industry project.

</comment></comment></comment></comment><comment><USER28> To the degree that it counts as 'production' Prolog, DFS-Tools -- a toolkit for Distributional Formal Semantics -- is actively used in a number of ongoing scientific projects: [https://github.com/hbrouwer/dfs- tools](https://github.com/hbrouwer/dfs-tools)

</comment><comment><USER29> I'm not a prolog or logic programming buff, but have you looked at something like Clojure's core.logic? [https://github.com/clojure/core.logic](https://github.com/clojure/core.logic)

</comment><comment><USER30> Any system that uses Datalog uses a subset of Prolog. Loosely, this would include systems using Clojure's Datalog. To the degree the goal is logic programming, the looseness is more appropriate. YMMV.</comment>


A script for generating image assets for various Android/iOS screen densities - <AUTHOR> https://github.com/YEDev/easyassets

<comment><USER2> Sweet!</comment>


The condom of the future is coming – with support from Charlie Sheen - <AUTHOR> http://www.thememo.com/2016/08/18/lelo-hex-condom-lelo-charlie-sheen-condom-hexagon-condoms-lelo-safe-sex/ <comment><USER2> Great story....and who doesn't love Chucky!</comment>


What's the most asinine technical requirement you've had to work into a design? - <AUTHOR> https://prokopetz.tumblr.com/post/187107725877/heres-one-for-the-techies-whats-the-most <comment><USER2> Back in the days of modems I worked at a company that was selling video games over the internet. The owner was a former IBM middle manager that thought she knew a lot more about technology then she actually did - not uncommon. One day she decides that she wants the game downloads to work one byte at a time so that people could be absolutely sure they received them and could not complain they had been cut off and didn't receive the complete file (Was very common for people to download the games then dispute the transaction with the credit card company, they got to keep the game and we always lost the dispute). We tried to explain that sending the file a byte at a time, depending on the protocols involved, would turn a one megabyte file into a 93 megabyte transmission that would take more then a day to complete as each byte was transmitted and acknowledged but she could not be swayed. So instead we made the system call for each byte and thanked god for John Nagle.

[https://en.m.wikipedia.org/wiki/Nagle%27s_algorithm](https://en.m.wikipedia.org/wiki/Nagle%27s_algorithm)

<comment><USER3> This is an interesting example of a business idea resulting in an asinine technical solution, but thinking about the actual business problem, it seems like you would want to transmit an encrypted blob to the customer, and then transmit the decryption key at the end using your "very reliable" communication method. The decryption key isn't "usable" until the entire thing is received, which means the entire game isn't usable until then either. (I don't think this actually solves the real he-said-she-said problem, but I think it would appease the PM in charge.)

<comment><USER4> There has probably been a lot of thought into problems like this, and it would be interesting to hear any real solutions used.

My addition would be to pre-calculate a checksum for the encrypted blob, and only send the decryption key after receiving the checksum from the downloader.

You would then have a clear audit history showing that the user had downloaded the file completely, though you still have the possibility that they would claim the encryption key wasn't sent, or similar.

I also wonder what the impact of (presumably) having to encrypt the file for each downloader individually.

<comment><USER2> The trick is that it's not really a technical problem, the people receive the download just fine, they just don't like the game, or get tired of it after a few minutes, or never had any intention of paying in the first place - so they do a charge back via their credit card issuer. That is successful just about all the time unless the cardholder and merchant have the same bank, or it is an oil/gas transaction (petroleum companies have some special arrangement where the card has to be reported stolen in order for a chargeback to be successful). I always thought that giving away a couple level demo of the game was the best way to weed out the first two categories of people. I don't think there is much you can really do about the third. As much as it gets abused I'm glad the chargeback system exists, I've needed it a few times.

</comment></comment></comment></comment><comment><USER5> Database IDs should be considered an implementation detail. It's better to assign a randomly-generated identifier for public-facing APIs for exactly this reason.

<comment><USER6> Exposing auto incrementing IDs also lets your partners and competitors both see how big your tables are and make estimates at your growth rate.

Always assign random identifiers.

<comment><USER7> Some accounting firms actually take this into account when you're sending bills.

In my country bills must have an auto incremented bill number. You cannot issue bill #100 without having 99 bills before.

I know one auditing firm that used those ids to spot fraud: some managers started their own firm and started giving contracts to that firm.

The auditors spotted something was going on because the bills have a very low number, and they incremented by 1 or 2 every month - a sign I am your only customer.

<comment><USER8> Which country is that?

<comment><USER9> It's definitely true in Holland. The only resolution you're allowed to shard by is yearly, so 2019-1, 2019-2,.. , 2020-1. Or just all out increment forever.

I assume it makes it harder to hide invoices during an audit.

<comment><USER10> How do companies with hundreds of sales points deal with that? Is a centralized invoicing system required by law? I find it hard to believe that multiple numbering sequences are not allowed.

<comment><USER9> _> een opeenvolgend nummer_

\- [https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/...](https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/btw/administratie_bijhouden/facturen_maken/factuureisen/)

Translation: "a sequential number."

Exceptions are explicitly and exhaustively listed here: [https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/...](https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/btw/administratie_bijhouden/facturen_maken/factuureisen/aangepaste_regels_facturen/aangepaste_regels_voor_facturen) , e.g. the requirements for <€100 are relaxed and don't include the number. Note also that this is not for B2C receipts; this is for B2B invoices.

I'll admit the Dutch IRS site is lacking in info. I remember this information from reading the IRS handbook (ugh) back when I was a sole trader there, and extensive conversations with my accountant on the matter.

However, I would bet good money that a separate invoice category per client is not OK. Very interested to be proven wrong.

</comment></comment></comment></comment></comment></comment></comment><comment><USER11> I had a project with a client who didn't like databases. He demanded that all data was to be written in plain text files.

I then spent a couple weeks writing code that would allow me to query those files for records with specific IDs and cross-reference those IDs with information on other files.

You know, just like a database does. Only slower, probably buggier, and with no real ACID compliance. Whoever came after me must have thought that I was an idiot.

<comment><USER12> Isnt there some microsoft ODBC provider that can execute sql-like query against text or csv file? I faintly remember something like that.

<comment><USER11> Your comment made me look into it. I think you mean the "Microsoft Text Driver", included in the now-deprecated Microsoft Jet Database Engine. I found some references to it going as back as 2003, so there's a good chance that it was already around at the time of my project.

I'll keep your comment in mind for the next time one of those threads titled "what would you tell your past self?" pops up.

</comment></comment></comment><comment><USER13> I had to write software that sent updates out to retail outlets. I specified they should use internal modems capable of at least 9600 baud.

Customer replies "Your salesman said we only needed 2400 baud modems" \- and buys EXTERNAL 2400 baud modems to save £5 per modem. (Different budget to the phone line you see).

Of course now you had to rely on the retail staff to have left the modem plugged in and turned on. (Which they often didn't).

And the transmission time increased so much that we had to build in additional compression (and complexity) to try and ensure it finished in time.

Why employ technical experts if you're just going to ignore them?

</comment><comment><USER14> This sounds kind of like when Steve Jobs threw a fit when he couldn't be employee #1:

> An early showdown came over employee badge numbers. Scott assigned #1 to > Wozniak and #2 to Jobs. Not surprisingly, Jobs demanded to be #1. "I > wouldn't let him have it, because that would stoke his ego even more," said > Scott. Jobs threw a tantrum, even cried. Finally, he proposed a solution. He > would have badge #0. Scott relented, at least for the purpose of the badge, > but the Bank of America required a positive integer for its payroll system > and Jobs's remained #2.

(From _Steve Jobs_.)

<comment><USER15> I really cannot understand this kind of behavior coming from a smart, adult person.

Crying over a badge number? Doesn't it reveal a deeply troubled personality?

Or am I just too naive and Jobs actually understood the importance of being first?

<comment><USER16> Few "great men" are psychologically well-adjusted. Their poor adjustment is what creates the friction that causes them to reshape their surroundings.

<comment><USER17> Here's to the crazy ones, the square pegs in the round hole...

</comment></comment></comment></comment><comment><USER18> More than once I've had to engineer a bug into new code to make it "bug- compatible" with old clients.

<comment><USER19> [https://www.xkcd.com/1172/](https://www.xkcd.com/1172/)

</comment></comment><comment><USER20> I worked on a billing system for a government service in the USA. The system served both government clients and non-government ones. The government ones were tracked as 'federal' and others 'non-federal'. There were mostly minor differences between how the two were handled, but one of those distinctions was in what type of transactions the different category of customer was allowed to use.

From the customers perspective, the only real difference when it came to reading the billing information they received was that federal agencies received a bill that said 'federal' and others received a bill that said 'non- federal'. No big deal, right? Well, not to most agencies. But the US government works pretty closely with, and extends government-style permissions to, various native American tribal authorities. Native American tribes... do not like to be considered to be part of the US government. At all.

It's entirely understandable, but we had to make a bunch of modifications because they wanted to retain the ability to run 'federal agency' style transactions, but wanted their bills to say 'non-federal'. It actually caused quite a lot of drama, but most of it was isolated to the political side of the agency (software changes are not free, after all, so they tried to be diplomatic and begged the tribes lodging the complaint to just ignore the word 'federal' on the monthly bills they received, but they would not budge and demanded it be changed ASAP) luckily. As software lead on the project I did get to hear about some of the firestorm secondhand when working with management to figure out exactly how we were going to change things. The 'federal' designation was a boolean in the database, used both by us in the billing system to determined what kind of processing to do (it impacted amount charged too, with federal customers getting a small discount) and the frontend of the system to kick out attempts to use transaction types not supported for non-federal agencies. So they couldn't just flip the bit and make them non- federal or it would cause even more chaos. It's been a long time ago now, but I believe we ended up special-casing it so that the report templates for the non-federal bills were applied in cases where the agencies were on a hard- coded list of 'federal but non-federal' agencies. All over text maybe 2 people even ever saw.

</comment><comment><USER21> This would probably be an exciting "Ask HN" post subject. I love learning from others experience handling customer requirements.

</comment><comment><USER22> I worked in a company that have been using a sql database for a really long time, like +20 years.

In the original design of the database, they though it would be a great idea to use negative ID for system use (on the same tables that are being used for user data). No foreign key whatsoever.

Forward 2018 when we have to build a system that have to work with this widedly used database (it's for a french ERP). Because there is no index or foreign keys the queries are _really_ slow which make our interface slow. Because the tables are accessible but belong to the ERP we cannot modify them because the ERP is under a licence so we don't have access to remodeling of the tables or how the data is processed before being saved in the database.

So to work around the problem we had to create duplicates of the tables with proper index and foreign keys and start a cron job every minute to read from the original tables and fill the datas into our tables ...

Mind boggling .. The software is being sold to a lot of companies which is kind of sad.

<comment><USER23> Top quality software isnt as valuable as we like to think.

<comment><USER24> Not for customers. What we developers call quality is usually readability and maintainability. But that doesn't affect customers one bit if the software solves the problem it is supposed to.

Of course it affects price and development speed which may in the long run sink the company in the marketplace, like what happend to e.g. QuarkXPress.

<comment><USER20> Whatever happened to QuarkXPress? I remember seeing it all over the place and it was the de facto standard in desktop publishing for quite awhile in the 90s, but then it just sorta... disappeared. Do you know of anywhere I could find a good technically-aimed history or breakdown of what went wrong?

<comment><USER24> Not sure - rumor is they outsourced all development to India to save money. But the program became very crash-pone, and they became extremely slow to add new features. And then InDesign came on the market, iterated quickly, and ate Quarks lunch.

</comment></comment></comment></comment></comment><comment><USER25> Solution: Reserve cool user ids and sell them yourself later if your service becomes popular?

<comment><USER12> I remember people were selling premium UIDs in ICQ. Also, low, 5-digit UIDs could be sold for single hundreds dollars. A novel way to indicate you were an ICQ veteran.

<comment><USER26> Similar thing has happened on Slashdot - the shorter the ID, the higher prestige

</comment></comment></comment><comment><USER27> I recall when I worked on Billing for Telecom Gold (Uk Dialcom) one account manger in charge of online databases wanted our billing system to assign the revenue from the data traffic during a data base session to his LOB.

We told him NO - though we could have done it I suppose, the billing system capable of incredible granularity - unlike BUCK$ eh Vint

</comment><comment><USER28> In the early 2000s I had to interface with a credit card authorization and settlement system for a major credit card. I opened a socket, sent a perfectly formatted transmission, and got back gobbledegook.

Fortunately I had a computer history background and realized I was getting a perfectly sensible response...in EBCDIC.

<comment><USER3> The endpoint accepted incoming ASCII but responded in EBCDIC? Or was this a binary packet with some EBCDIC-coded strings?

<comment><USER28> I was getting an error message back, apparently. So I needed to send EBCDIC too, but apparently nobody thought to document this anywhere.

It wasn't binary, but it was fixed length fields, which were surprising common in those days.

</comment></comment></comment><comment><USER29> Avoid the issue: assign UUIDs to everybody.

<comment><USER30> I worked with a registration system that assigned every attendee a UUID, the issue with that is, most conventions have a badge number, as badge names are generally non-unique.

The developer saw no issue with making people enter UUID's to search for badges.

</comment></comment><comment><USER31> Never had to actually build it, but I've had to explain to multiple people over the years why a dropdown select element for ZIP CODE is a bad idea.

<comment><USER32> Free text fields still tell me mine doesn't exist (in their years out of date database) so I wouldn't be worse off with a drop-down.

</comment></comment><comment><USER33> I had a customer who refused to go to a second screen to add or edit customer transactions. They wanted one screen, dammit. So they got one screen. When a customer renewed their membership the user retyped the data on row two in row three, then row two in row one, and then added the new transaction to row one because that was "easier.". Mmmkay.

</comment><comment><USER34> Why was this easier than just swapping the IDs between Manufacturer #1 and the problem client?

<comment><USER35> Because every used had the list of numbers, the number was already in use, and changing the actual numbers would require interaction with every user of the inventory system.

Then once word got out that you were willing to modify this system to suit one customer's ego, it would be open season for everyone to make ridiculous requests ("we really like 69. Can we be 69?")

<comment><USER36> this is when uuid would be nice, or at least 6+ digit non-sequential ids...</comment></comment></comment>


An introduction to cross compilation with Go - <AUTHOR> http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go <comment><USER2> Very nice introduction.

I've been doing Go development for chumby (ARMv5-based) devices for months, and do all of my editing and compilation on Windows and then just rsync the binary over as part of my Sublime Text 2 build script.

Go is the greatest embedded-device-style development environment I've ever used, by far, without all the hassles of having to build a full cross-compile toolchain or use some hopelessly out of date vendor-made BSP cross-compile toolchain.

(FWIW, building a Go compiler right on the device is easy as well, but even with Go's focus on fast compile times, cross-compiling is still a much better experience when targeting these low CPU/low RAM devices).

<comment><USER3> Cross compiling is certainly necessary and useful for bootstrapping a new platform. It can also be a lot faster to cross compile when the target system is slow, but there is a well known drawback to using cross compiling to speed up development times; you are not stressing the target system, and hence, you've made target-specific bugs harder to find.

Of course, there can be substantial costs from slowing down builds and spending development time waiting for compilation on the actual (target) hardware. On the other hand, the advantages of finding target-specific bugs and adequately stressing the system can make the expense worthwhile. Bad hardware happens far more often than vendors like to admit, and stressing the system is a good way to test it.

As always, it's a trade-off.

The good example of taking the expensive but thorough approach is the OpenBSD project. After getting past bootstrapping an new platform, all builds are done on the actual (target) hardware. Since the code base is cross platform, the new platform could give them the benefit of finding bugs that don't manifest or are unnoticeable on all of the other supported platforms. Also, the OpenBSD project does pretty much continuous build of their tree on actual hardware, so they're always stressing the hardware to make sure it's working properly, as well as finding errant bugs that are tough to find on a single platform.

<comment><USER4> This only makes sense some of the time, like in your OpenBSD example. Native compile for an embedded app brings much less benefit and significantly more pain.

</comment></comment></comment><comment><USER5> Great article and well timed for me.

I've been toying with the idea of trying to bring a Go program up on the following (as I have a couple lying around):

<https://www.olimex.com/dev/lpc-e2468.html>

The only problem is that it doesn't support "normal" linux - uCLinux only.

<comment><USER6> I did a quick grep of the go tree to search things that are unsuported by uClinux, but I haven't found any. It might just work.

edit: the CPU is ARMv4T, the gc Go compilers generate code only for ARMv5 and higher, so it will not work.

<comment><USER5> Thanks much appreciated!! Go's syscall interface looks clean so it wouldn't be too much to deal with either way. I'd be happy with put+get char to start with!

I don't mind writing a new backend as the compilers are quite easy to work with by the looks. Plus it'll exercise my brain more than typical CRUD apps.

<comment><USER6> The C compiler in the Go tree that's used to compile the C bits of the runtime already supports ARMv4 (unsurprisingly, since it was written a long time ago for Plan 9 and Inferno), only the Go compiler would need modifications.

The compiler suite is a pleasure to work on, really clear code, just like all the other code Ken Thompson wrote. Good luck.

<comment><USER5> Even nicer. Thanks for the info.

I'll submit results if I get anywhere - might take a month or two :-)

Currently trying to a (any) toolchain online first to test the board and get a ucLinux kernel up (gcc cross-compiler + OpenOCD + Olimex ARM-JTAG + ThinkPad Ultrabay parallel port stack should be 'fun').

<comment><USER5> Replying to myself. ucLinux + hello world + gdb via OpenOCD online at 4AM :)

Now for the go toolchain...

</comment></comment></comment></comment></comment></comment><comment><USER7> I have been using the instructions in the wiki and they work smoothly: <http://code.google.com/p/go-wiki/wiki/WindowsCrossCompiling></comment>


Masters Thesis on ANSi art [.pdf] - <AUTHOR> http://mhargadon.ca/media/mhargadon-thesis.pdf

<comment><USER2> Nice! Congrats to Mike! As mentioned in the thesis he used to run Plateau. That place was infamous for its hacker-ish fueled discussions perfect for hyper curious teenagers.</comment>


Nobody Says 'Zelle Me': Banks Struggle to Catch Up to Venmo (2018) - <AUTHOR> https://www.wsj.com/articles/zelle-struggles-to-prove-its-not-just-another-payments-app-1533038401 <comment><AUTHOR> [https://outline.com/jSuPcE](https://outline.com/jSuPcE)</comment>


First Node.js-Based Ransomware: Nodera - <AUTHOR> https://blogs.quickheal.com/first-node-js-based-ransomware-nodera/ <comment><USER2> Site is currently down; [https://web.archive.org/web/20200122181519/https://blogs.qui...](https://web.archive.org/web/20200122181519/https://blogs.quickheal.com/first- node-js-based-ransomware-nodera/)

The article mentions the ransom message with the date March 1 2018. This probably means this malware is two years old?

<comment><USER3> Ironically, the archive link you provided also doesn't load for me.

<comment><USER4> If it's just a blank screen, it's a longstanding issue nobody seems to acknowledge:

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

> There's a problem with the Wayback Machine in specific which can kill your > ability to access it quite silently, unless you know how to use the > browser's development tools and interpret headers.

> It has to do with cookies: Somehow, the Wayback Machine sets cookies... and > sets cookies... and keeps setting cookies, until it overflows its own > ability to _accept_ cookies. At that point, your browser tries to access a > Wayback Machine page, handing the server all of the cookies it currently > has, and the server refuses to deal. It absolutely denies everything, > sending an error header and a blank page. You have to clear all > web.archive.org cookies to get anything at all, at which point it works > perfectly.

> I've completely solved this problem by blacklisting web.archive.org in > browser cookie blacklists. I haven't had it happen since then. As far as I'm > concerned, the problem is diagnosed and just needs to be solved. At _their_ > end.

</comment></comment></comment><comment><USER5> One of these modules' owners should update their modules to check if they are running as part of the ransomware, and kill the program if so. That would certainly be an interesting turn of events.

</comment><comment><USER6> So as I read it this is ransomware that was built using nodejs... not a compromised npm package or anything like that. Is that right?

<comment><USER7> That's what I took away from the article as well. It's installed via a VBScript file.

Edit: I'm also not able to find any other record of it (yet). Everything links to the OP link or analysis on the OP link.

</comment></comment><comment><USER8> I wonder how long until instead of installing itself it finds and infects an existing Electron app?

</comment><comment><USER9> Most languages, distros, large applications, etc have their own packaging system. Some are more laissez-faire than others.

Does someone know a good article from the POV of the maintainer of a packaging system ecosystem that describes the tradeoffs made by different approaches over the past ~30 years?

<comment><USER5> To be clear, as far as I can tell, the ransomware is built _using_ nodejs. It is not a ransomware that's installed via a compromised package. Although if you happen to be a bad guy, it seems like building a quality bitcoin-related package, waiting until you have a big installed base, and then owning all your users, might be an effective way to set yourself up for life.

<comment><USER10> I thought Bitcoin can't effectively be mined on CPUs anymore, only some AltCoins that are too difficult to compute with ASICs

<comment><USER5> I'm not talking about a miner. I'm talking about a wallet or some utility module. You'd wait until you have a big installed base then change your module to silently steal coinbase credentials. Wait a few weeks until you have enough of them and then own all the accounts at once. Something like that. The Bitcoin aspect of the module is just to target effectively.

</comment></comment></comment></comment><comment><USER11> Interestingly enough the JS source is not obfuscated, merely minified with no name mangling.

</comment><comment><USER12> Count me in as being one who is disappointed that the code is not being made available. I know releasing it to the public is inherently dangerous, but, I can't help but to be curious as to how these programs work top to bottom.

<comment><USER13> [https://send.firefox.com/download/29f34c9a6a4a30b6/#RBSP9jz2...](https://send.firefox.com/download/29f34c9a6a4a30b6/#RBSP9jz2K5FpiieaUKUpyA)

password hackernews. I've set it to the maximum option of 100 downloads so it won't last forerver but should last long enough.

</comment></comment><comment><USER14> "The sample received in our lab was vbs script which has multiple embedded js scripts. On execution, it creates a directory "GFp0JAk" at location "%userprofile%\AppData\Local\"."

Why is this even possible?

<comment><USER15> If applications can't write to the Application Data folder then what's the point of an application data folder?

> Why is this even possible?

Well they said "on execution" so that's what made it possible. Now if it could install to that location without being explicitly executed (say on download or via a browser bug) then THAT would be a much bigger deal.

<comment><USER13> It's not so much the "applications can write data to application data" as it is "application data is executable by default". It's simply a design choice from before security was important. Nobody would defend that design today and Microsoft recognized this when they created appx which separates installers, executable programs, and data into separate content types treated with separate security policy.</comment></comment></comment>


Political Reality: Buy Ads on Facebook or Risk Losing the Election - <AUTHOR> https://www.wsj.com/articles/political-reality-buy-ads-on-facebook-or-risk-losing-the-election-1541171620 <comment><USER2> This is basically saying: Show your message to lots of people or risk losing the election. Which has always been true.

Example: Say your platform is legalizing widgets. You really believe this is going to improve the country, whenever you talk to people in person they agree, and the science agrees with you.

There are 350 million people in the country and you can't knock on every door yourself.

You can:

1) Hope Word of Mouth gets out about how good your policy is. But the vast majority of americans don't care about policy to seek it out, and you'll only find so many true believers who are going to IRL spam their friends for you.

2) Get really good at PR so people hear about you. But no one wants to hear about your widgets, so if news shows air it their ratings go down, so they won't air it. So you'll have to get in the news based on other BS you insert yourself into. People also segment themselves now into thousands of news sources now, so you can't reach everyone through the same news either.

3) Pay to get in front of people where they are already paying attention (TV and FB ads). This means you can give your most compelling in person argument to people, and they're at least forced to see it or listen for a few seconds. This way, you might actually change a few minds en masse.

</comment><comment><USER3> I find it kind of ironic to see the WSJ essentially publish an ad for Facebook disguised as an article. Still, it is probably true to some extent.

Is Facebook just a fancy machine for auctioning off the electorate to the highest bidder? Should we think of as the means of modern slavery?

<comment><USER4> >Is Facebook just a fancy machine for auctioning off the electorate to the highest bidder?

Doesn't the 2016 presidential election disprove this? The candidate who spent the most lost the election.

<comment><USER5> Although that candidate did get a few million more votes. I'm not trying to make some bitter comment, just that if you consider Facebook as selling votes, the highest spender did get the most.

<comment><USER6> One important factoid that goes against this view is that Clinton's margin of victory in California was substantially greater than her _entire_ margin of victory in the popular vote. The reason I mention this is because you spend where you need to spend. California was never even remotely in contention and so it's safe to say that Clinton was not spending to try to win by millions in California. In other words, it's unlikely that her spending produced the votes she was trying to 'buy'.

<comment><USER5> That's roughly in line with Obama's last election in which he won CA by about 3 million votes. In the 2008 election the margin was about the same. Clinton won CA by 4 million popular votes, so I doubt the total of her 3 million excess can be explained there. It's also, if you'll forgive my pedantry, a fact _oid_ rather than a fact because even in states she lost you have to consider how much more she would have lost by without the ad spend. We don't have access to the information that would allow us to make thst determination.

<comment><USER6> I agree with you, but I don't see how this goes against what I'm saying? In 2008 Obama won California by 3 million. He won in the rest of the nation, excluding California, by 7 million. In 2016 Clinton won in California by 4 million. She lost in the rest of the country, excluding California, by a million. I completely agree that without excessive spending her margin of defeat, outside of California, would likely have been greater. But this also shows that the spending alone does not, in current times, map strongly to votes.

And I hope this will continue to be a thing. In my opinion, people are overestimating the significance of the centralized internet forces, such as Facebook, and discounting the significance of decentralized internet forces - such as discussions perhaps not dissimilar to the one you and I are sharing. There's no doubt that advertising has a significant effect, but I think it's perhaps less than ever before largely because people half way around the world from one another can chat and have far more relevant conversations than any sort of _' Hi, I'm Bob. My opponent's an asshole. Vote for me!'_ piece, or even the more refined. ' _Hi, I 'm Bob. My meta-analytics indicate that you like broccoli. Omg, I do too. My opponent doesn't. He hates broccoli and all it stands for. Also, he's an asshole, like anybody who wouldn't like broccoli amirite!? Vote for me!_'

Even outside of the presidential consider things like Sanders. Yes at some point he was competitive in fund raising, but his success was not because of the fund raising. Rather his fund raising came as an effect, rather than a cause, of his success. And again that success was something that was driven by the decentralized and oft difficult to predict, let alone control, forces of internet communication.

</comment></comment></comment></comment></comment></comment><comment><USER7> Why is this an allowed form of propaganda but other things aren't? If you take a step back out of the US "two" party system, it's just Facebook propping up the status quo. Why are Republicans and Democrats allowed to advertise their shitty ideas but others can't?

<comment><USER8> What do you mean by "others can't"?

<comment><USER7> >Facebook said this amounted to the most domestic pages and accounts it had ever removed related to influence campaigns.

They don't want some things even if they're operated __domestically by Americans __, but it looks like per OP, they 're fine with people/political PAC's/Political Parties buying literal 'influence campaigns' for ideas that prop up the status quo.

[https://www.nytimes.com/2018/10/11/technology/fake-news- onli...](https://www.nytimes.com/2018/10/11/technology/fake-news-online- disinformation.html?module=inline)

<comment><USER8> For violating rules about _false_ information.

<comment><USER7> Why does Facebook get to tell me what's false and not? I'm an adult, I can handle it and research validity myself. Why is it making decisions to what I can and can't see? It's like they're the thought police.

Why aren't they removing all pseudoscience in this case? Why not astrology, why not psychics, why not tarot card readers, why not people selling weight loss drugs, why not people showing videos of 737's recovering from a barrel roll on short final, why not homeopathy, hell why not literally all religion?

</comment></comment></comment></comment></comment><comment><USER9> hot take: facebook should not legally be allowed to show political ads in any country.

<comment> dane-pgp Just facebook or all social media platforms? All online platforms? All forms of media?

Perhaps a clearer approach is to only allow political advertising to be bought using money given by citizens (and limiting the amount each citizen can contribute in each election).

In the case of the US political system, this would probably require an amendment to the constitution, but such an idea is being seriously proposed:

[https://campaignfinancereform.org/amendment](https://campaignfinancereform.org/amendment)

<comment><USER6> I think this sort of ideal is more likely to reward than punish bad actors. I'm certain you can think of a million and one ways companies/PACs/individuals/etc could influence others in ways that would be difficult, if not impossible, to trace back to them. The player that tries to play by the rules and ensures that all of their messaging on the up and up is simply going to get burnt.

The wisest form of regulation is to assume bad actors from step 1 and try to create systems where the bad actors are encouraged to abide the rules, not out of threats, but because it benefits them in some way. For instance, the EU are aiming to force Netflix (and similar operations) to have 30% of their catalogue sourced from local productions... or else. It's not tough to predict the result. They'll license the premium stuff (which they probably already have) and then just stuff the rest with filler to hit the minimum.

Imagine if instead that Netflix and other companies received a tax deduction which was proportional to the percent of time their customers spent consuming locally sourced material. Now suddenly there is a positive incentive for the good behavior, and Netflix would almost certainly be going out of their way to try to get you to watch locally sourced material. On the other hand people often want to have their cake, and eat it too.

<comment><USER10> _> I think this sort of ideal is more likely to reward than punish bad actors. I'm certain you can think of a million and one ways companies/PACs/individuals/etc could influence others in ways that would be difficult, if not impossible, to trace back to them. The player that tries to play by the rules and ensures that all of their messaging on the up and up is simply going to get burnt._

So instead we let all of the players become bad actors without consequence?

 _> Imagine if instead that Netflix and other companies received a tax deduction which was proportional to the percent of time their customers spent consuming locally sourced material. Now suddenly there is a positive incentive for the good behavior, and Netflix would almost certainly be going out of their way to try to get you to watch locally sourced material. On the other hand people often want to have their cake, and eat it too._

And then reward the bad actors for being bad actors in the first place by depriving society of the taxes they owe?

I think it's safe to assume that the politicians making those deals will be often be bad actors too, and courts rarely let cities and other governments back out of those deals just because the deal makers were corrupt.

<comment><USER6> You're straw manning. The point is you need to consider reality before trying to decide how to tackle problems. Your regulations are not only not going to levy any consequences to bad actors, it's going to directly reward their bad behavior. They're the ones that are going to be able to capably break the law, and work to minimize consequences in any case where they're caught. But the law will severely hamper good actors that try to abide it. I think you realize this which is why you're now resorting to _' Well, so we just them all get away with this without consequence!?'_ And the answer there that when doing 'something' is less effective than doing nothing, you don't have any choice. To do otherwise is simply cutting off your nose to spite your face.

</comment></comment></comment></comment></comment><comment><USER11> I'm tinkering with paid acquisition right now and it's not very valuable. There are a lot of impressions but very few clicks. I think that is like a lot of Facebook though, people read the article headline but don't open it. The same goes for ads, people see the message but do not really care about the content. It is perfect for political messaging, get your snippet out there, make your impression, get in their head for election day.

<comment><USER12> You are doing it wrong.

Digital marketing makes it very easy to waste money. Sometimes people throw money at Facebook (everyone is doing Facebook!) when it's the wrong channel for your business. Sometime you miss a tiny checkbox that makes most of your budget get spent outside of facebook.

No matter what your goal is, there is an effective way to buy traffic (advertise). There is a reason advertising agencies exist - they are good at their jobs.

<comment><USER11> I agree, what I am saying is that Facebook feels like the right channel for information dissemination, not necessarily for driving traffic outside of Facebook. The paid acquisition I am trying is on Facebook, sorry if that wasn't clear. I have ideas for other channels that will drive a lot more traffic (and is stuff I'm a lot better at).

</comment></comment></comment><comment><USER13> Kind of like pay for ads on Google or don't be an internet facing business. This is how you determine if a company has a monopoly: if it is practically impossible to play the game without including that one entity in your business plans marketing model

</comment><comment><USER14> Non-paywalled version: [https://outline.com/5T5s6n](https://outline.com/5T5s6n)

Honestly, I don't understand the point of this article. It says Facebook is probably influential (provides no data), says something about data leaks (doesn't tie into the thesis of the piece) and says that Democrats outspend Republicans 3-1 on FB ads (guess we'll see if that's successful on Weds).

It amazes me that so much ink is spilled over Facebook ads. It really seems like scapegoating from people who's candidate lost as I have serious doubts that FB advertising is effective _at all_ and no data pointing to that conclusion is ever demonstrated.

I know a lot of people here have experience with digital advertising (as do I); it's basically a scam. It's not effective and it's certainly not turning any elections around.

</comment><comment><USER15> So, what happens when you have multiple Hari Seldons, each with a different set of ideas?

</comment><comment><USER13> The government could seize Facebook anytime they wish so the fact they don't leads one to conclude that either Facebook controls the government, the government controls Facebook, or Facebook is not worth seizing</comment>


Building REST APIs on Linux with Swift and Zewo - <AUTHOR> http://dev.iachieved.it/iachievedit/building-rest-apis-with-zewo/ <comment><USER2> This is cool but I think it's misleading to say that Swift is a good option for starting a web backend project _today_, at least for anything that's not hobby work. The folks at Apple update the dev builds so frequently that in my experience it breaks things often enough that you'll spend 50% of your time updating your code for a new build or waiting for dependencies to update their code.

And just to be clear I think that's awesome. I love the work they're doing; it's just time consuming. I've been writing my own approach to a Swift MVC framework so this is something I'm experiencing firsthand:

Swerver: [https://github.com/jparishy/swerver](https://github.com/jparishy/swerver) (example usage: [https://github.com/jparishy/swerverorg](https://github.com/jparishy/swerverorg) \- it's based on libuv and makes many choices for you a la Rails compared to the framework demoed in the OP)

and it has been way more time consuming that I would have expected going into it. And right now it doesn't build on Linux because the latest Apple build broke something in CryptoSwift, which Swerver depends on.

All that said, Swerver has been super fun to work on so. After a lot of the hard work had been done, the actual usage (as demoed in jparishy/swerverorg with user authentication, client-side session state, and the basic MVC/DB access stuff) has been really smooth and enjoyable. /shamelessplug

</comment><comment><USER3> This is cool. We need more projects like this.

But, there are some big issues in this code.

First, you are constructing SQL with string interpolation. Never do this, not even in sample code. People will blindly copy.

Second, way too much unsafe code. Why all the try! and explicit unwraps? Swift has all these great safety nets. Why let your code crash with unhandled exceptions while you can also properly deal with them?

</comment><comment><USER4> I'll be that guy again... this isn't REST.

That said, glad people are starting to explore Swift for backend development.</comment>


Tell HN: The TV show Billions is a fun watch (startups/investing related) - <AUTHOR> My incentive for posting is to hope that more people watch it so that it keeps getting renewed... <comment> tony-allan Tell me why you think I should watch it?</comment>


Redraw state borders, see the election results - <AUTHOR> http://kevinhayeswilson.com/redraw/ <comment><AUTHOR> By moving Portland, OR into Washington, and OR flips red.

Move the three most western Florida panhandles out of Florida, and it flips Blue.

With an intense amount of Gerrymandering, you can really mess with the election results.

</comment><comment><USER2> I'm getting anti-trump Hillary might have won if you get rid of the electoral college and change all the rules around ----fatigue.

What's interesting is that when Obama won in 2008, the majority of the population accepted it without protests/violence in the streets.

Republicans certainly are more gracious losers. The left in this country can really learn something from them.

<comment><AUTHOR> You can also move counties around to reduce the effect of cities on the electoral college.

It takes a great deal redrawing midwestern state borders to reduce the effect of Chicago on Illinois.

By moving the coastal counties of California into Oregon, what's left of California flips red.

Kevin, the creator of this site, also has the 2012 election results. This way you can see how Mitt Romney could have won.</comment></comment>


(Re)Designing Firefox - <AUTHOR> https://blog.mozilla.org/ux/2014/05/redesigning-firefox/

<comment> chestnut-tree I really hope Mozilla take a look at bookmarks in the next major release of Firefox. It needs a complete overhaul. Trying to navigate lots of bookmarks through a menu-based system is clunky and unusable.

I see that the Firefox team are moving Preferences into the browser as a web page. This makes even more sense for Bookmarks. Laid out on a web page, you can easily order, reorder, filter, search, expand, collapse, switch to different views. Why not let users create and share "themes" that style their bookmark pages?

Plus, there are so many other clever things Firefox could do with bookmarks. For example, tell me which bookmarks I've never visited, which are my most frequently visited ones etc. Let me bookmark images (like Pinterest). But please keep the option to store everything locally and keep any stats about my bookmark behaviour local to my machine. Give me the choice of whether I want to share anything or nothing. We don't all want to save to the cloud and we don't all want to be tracked either.

<comment><AUTHOR> Personally, I think bookmarks could use a visual reminder which damned site that was. Looking at thumbnail of a site is easier than searching for names.

</comment></comment><comment><USER2> To be honest, the boxy, clunky feeling UI is what kept me from using FireFox. The new UI, coupled with a couple misteps by Chrome, got me to switch back to a Mozilla browser for the first time since Chrome was released.

<comment><USER3> Interesting... I hate it.

I don't want any applications with a different interface or unique looking widgets... round tabs, menus different than anything I've ever seen, buttons that no longer move, etc. Have always despised skinz! of any kind.

If I decide on a new theme, I'll choose it myself from the OS, thanks. Please improve standards support and fix bugs and stop revolutionizing the interface every six weeks.</comment></comment>


Dashcam video shows Montana police shooting man as he steered car away - <AUTHOR> http://www.theguardian.com/us-news/2016/feb/05/montana-police-shooting-loren-simpson-dashcam-footage <comment><AUTHOR> One of the most chilling videos I've seen in a great while.

That kind of an ambush can happen to anyone. And by all appearances, the driver was doing the right thing (swerving off the road to avoid skidding and hitting the officers).

You also have to love they one of the perpetrators blatantly lies to his colleague right afterwards: "We told him to stop, he hit the gas and came right at us."</comment>


Show HN: Generate Google Play Music Playlists from BBC Playlister Urls - <AUTHOR> https://github.com/tavvy/GPM-Playlister/ <comment><USER2> Relatedly, I have a 'nowplaying' commandline I use to capture whatever's on BBC 6 Music right now, since I listen when I'm working but don't pay attention to them saying who it is before the track:

          ruby -e 'require "json"; require "net/http"; track=JSON.parse(Net::HTTP.get_response(URI("http://polling.bbc.co.uk/radio/nowandnextservice/bbc_6music.json")).body)["message"]; puts %w(title artist).map{|k| track[k]}.join(", ")' | tee -a ~/music.txt

the json service there is what powers the now&next on the station's website. I'm sure that code could be neater, but just threw it together and it does the job.

I guess you could adapt this to add the current track to your Google Playlist.</comment>


Snapchat Geofilters are the next big thing - <AUTHOR> https://www.geofilterplace.com/2016/08/06/next-big-thing-snapchat-geofilters/ <comment><USER2> I closed your page a half second after it asked me to sign up for a mailing list

like seriously, do you actually get conversions through that? i've only ever seen it piss people off

<comment><AUTHOR> It shouldn't have done that! I'll look into why it popped up so fast. Hmmm...

</comment></comment><comment><USER3> Content blocked by a "give us your email" overlay.

Click the X.

Click area not large enough, nothing happens.

Click the X again.

"Questions about geofilters?" message blocks content at the bottom of the page.

Click the X.

Result: another, larger, "Questions about geofilters?" message.

Leave.

Write snarky comment on HN.

</comment><comment><USER4> Snapchat can be thought of as the most popular Augmented Reality app. They are the only app I see widespread in North America that convinced users to actually use QR codes, if only occasionally. Filters are an example of great UI in AR: it's intuitive because it interacts with your natural world.

Snapchat is very well positioned to take location-based features beyond just filters. I think these kinds of real-world interactions are an awesome trend and a lot of the tech has yet to be built.

(It also looks like the author removed the popovers. I didn't see any popups when reading the article.)</comment>


A simple example of Radix Sort (a linear-time sorting algorithm) - <AUTHOR> http://dl.getdropbox.com/u/315/programming/exaples/radix_sort_example.cpp

<comment><AUTHOR>
      qsort:  sorting 100 signed integers...        done in 0.000012 seconds.
      std:    sorting 100 signed integers...        done in 0.000007 seconds.
      radix:  sorting 100 signed integers...        done in 0.000009 seconds.
      fstd:   sorting 100 floating-point numbers... done in 0.000009 seconds.
      fradix: sorting 100 floating-point numbers... done in 0.000009 seconds.

      qsort:  sorting 300 signed integers...        done in 0.000037 seconds.
      std:    sorting 300 signed integers...        done in 0.000020 seconds.
      radix:  sorting 300 signed integers...        done in 0.000018 seconds.
      fstd:   sorting 300 floating-point numbers... done in 0.000025 seconds.
      fradix: sorting 300 floating-point numbers... done in 0.000020 seconds.

      qsort:  sorting 500 signed integers...        done in 0.000064 seconds.
      std:    sorting 500 signed integers...        done in 0.000032 seconds.
      radix:  sorting 500 signed integers...        done in 0.000027 seconds.
      fstd:   sorting 500 floating-point numbers... done in 0.000045 seconds.
      fradix: sorting 500 floating-point numbers... done in 0.000031 seconds.

      qsort:  sorting 700 signed integers...        done in 0.000091 seconds.
      std:    sorting 700 signed integers...        done in 0.000290 seconds.
      radix:  sorting 700 signed integers...        done in 0.000036 seconds.
      fstd:   sorting 700 floating-point numbers... done in 0.000063 seconds.
      fradix: sorting 700 floating-point numbers... done in 0.000041 seconds.

      qsort:  sorting 900 signed integers...        done in 0.000122 seconds.
      std:    sorting 900 signed integers...        done in 0.000061 seconds.
      radix:  sorting 900 signed integers...        done in 0.000041 seconds.
      fstd:   sorting 900 floating-point numbers... done in 0.000082 seconds.
      fradix: sorting 900 floating-point numbers... done in 0.000048 seconds.

      qsort:  sorting 1000 signed integers...        done in 0.000137 seconds.
      std:    sorting 1000 signed integers...        done in 0.000070 seconds.
      radix:  sorting 1000 signed integers...        done in 0.000047 seconds.
      fstd:   sorting 1000 floating-point numbers... done in 0.000093 seconds.
      fradix: sorting 1000 floating-point numbers... done in 0.000055 seconds.

      qsort:  sorting 3000 signed integers...        done in 0.000452 seconds.
      std:    sorting 3000 signed integers...        done in 0.000235 seconds.
      radix:  sorting 3000 signed integers...        done in 0.000131 seconds.
      fstd:   sorting 3000 floating-point numbers... done in 0.000333 seconds.
      fradix: sorting 3000 floating-point numbers... done in 0.000162 seconds.

      qsort:  sorting 5000 signed integers...        done in 0.000806 seconds.
      std:    sorting 5000 signed integers...        done in 0.000415 seconds.
      radix:  sorting 5000 signed integers...        done in 0.000221 seconds.
      fstd:   sorting 5000 floating-point numbers... done in 0.000551 seconds.
      fradix: sorting 5000 floating-point numbers... done in 0.000275 seconds.

      qsort:  sorting 7000 signed integers...        done in 0.001146 seconds.
      std:    sorting 7000 signed integers...        done in 0.000618 seconds.
      radix:  sorting 7000 signed integers...        done in 0.000336 seconds.
      fstd:   sorting 7000 floating-point numbers... done in 0.000814 seconds.
      fradix: sorting 7000 floating-point numbers... done in 0.000393 seconds.

      qsort:  sorting 9000 signed integers...        done in 0.001512 seconds.
      std:    sorting 9000 signed integers...        done in 0.000821 seconds.
      radix:  sorting 9000 signed integers...        done in 0.000443 seconds.
      fstd:   sorting 9000 floating-point numbers... done in 0.001069 seconds.
      fradix: sorting 9000 floating-point numbers... done in 0.000518 seconds.

      qsort:  sorting 10000 signed integers...        done in 0.001718 seconds.
      std:    sorting 10000 signed integers...        done in 0.000881 seconds.
      radix:  sorting 10000 signed integers...        done in 0.000516 seconds.
      fstd:   sorting 10000 floating-point numbers... done in 0.001196 seconds.
      fradix: sorting 10000 floating-point numbers... done in 0.000639 seconds.

      qsort:  sorting 30000 signed integers...        done in 0.005759 seconds.
      std:    sorting 30000 signed integers...        done in 0.002991 seconds.
      radix:  sorting 30000 signed integers...        done in 0.001880 seconds.
      fstd:   sorting 30000 floating-point numbers... done in 0.004167 seconds.
      fradix: sorting 30000 floating-point numbers... done in 0.002001 seconds.

      qsort:  sorting 50000 signed integers...        done in 0.009991 seconds.
      std:    sorting 50000 signed integers...        done in 0.005557 seconds.
      radix:  sorting 50000 signed integers...        done in 0.002969 seconds.
      fstd:   sorting 50000 floating-point numbers... done in 0.007003 seconds.
      fradix: sorting 50000 floating-point numbers... done in 0.003315 seconds.

      qsort:  sorting 70000 signed integers...        done in 0.013983 seconds.
      std:    sorting 70000 signed integers...        done in 0.007776 seconds.
      radix:  sorting 70000 signed integers...        done in 0.004127 seconds.
      fstd:   sorting 70000 floating-point numbers... done in 0.009839 seconds.
      fradix: sorting 70000 floating-point numbers... done in 0.004526 seconds.

      qsort:  sorting 90000 signed integers...        done in 0.018232 seconds.
      std:    sorting 90000 signed integers...        done in 0.009571 seconds.
      radix:  sorting 90000 signed integers...        done in 0.005487 seconds.
      fstd:   sorting 90000 floating-point numbers... done in 0.013045 seconds.
      fradix: sorting 90000 floating-point numbers... done in 0.006236 seconds.

      qsort:  sorting 100000 signed integers...        done in 0.020601 seconds.
      std:    sorting 100000 signed integers...        done in 0.011364 seconds.
      radix:  sorting 100000 signed integers...        done in 0.006009 seconds.
      fstd:   sorting 100000 floating-point numbers... done in 0.014733 seconds.
      fradix: sorting 100000 floating-point numbers... done in 0.006624 seconds.

      qsort:  sorting 300000 signed integers...        done in 0.059984 seconds.
      std:    sorting 300000 signed integers...        done in 0.033506 seconds.
      radix:  sorting 300000 signed integers...        done in 0.024661 seconds.
      fstd:   sorting 300000 floating-point numbers... done in 0.044925 seconds.
      fradix: sorting 300000 floating-point numbers... done in 0.039047 seconds.

      qsort:  sorting 500000 signed integers...        done in 0.096697 seconds.
      std:    sorting 500000 signed integers...        done in 0.054535 seconds.
      radix:  sorting 500000 signed integers...        done in 0.070855 seconds.
      fstd:   sorting 500000 floating-point numbers... done in 0.071334 seconds.
      fradix: sorting 500000 floating-point numbers... done in 0.073477 seconds.

      qsort:  sorting 700000 signed integers...        done in 0.184037 seconds.
      std:    sorting 700000 signed integers...        done in 0.075596 seconds.
      radix:  sorting 700000 signed integers...        done in 0.153866 seconds.
      fstd:   sorting 700000 floating-point numbers... done in 0.098688 seconds.
      fradix: sorting 700000 floating-point numbers... done in 0.151021 seconds.

      qsort:  sorting 900000 signed integers...        done in 0.171465 seconds.
      std:    sorting 900000 signed integers...        done in 0.101505 seconds.
      radix:  sorting 900000 signed integers...        done in 0.339174 seconds.
      fstd:   sorting 900000 floating-point numbers... done in 0.140334 seconds.
      fradix: sorting 900000 floating-point numbers... done in 0.261265 seconds.

      qsort:  sorting 1000000 signed integers...        done in 0.202074 seconds.
      std:    sorting 1000000 signed integers...        done in 0.105412 seconds.
      radix:  sorting 1000000 signed integers...        done in 0.315055 seconds.
      fstd:   sorting 1000000 floating-point numbers... done in 0.157816 seconds.
      fradix: sorting 1000000 floating-point numbers... done in 0.297647 seconds.

      qsort:  sorting 3000000 signed integers...        done in 0.577713 seconds.
      std:    sorting 3000000 signed integers...        done in 0.330649 seconds.
      radix:  sorting 3000000 signed integers...        done in 1.230021 seconds.
      fstd:   sorting 3000000 floating-point numbers... done in 0.424504 seconds.
      fradix: sorting 3000000 floating-point numbers... done in 1.246126 seconds.

      qsort:  sorting 5000000 signed integers...        done in 0.958521 seconds.
      std:    sorting 5000000 signed integers...        done in 0.563785 seconds.
      radix:  sorting 5000000 signed integers...        done in 2.167401 seconds.
      fstd:   sorting 5000000 floating-point numbers... done in 0.708164 seconds.
      fradix: sorting 5000000 floating-point numbers... done in 2.277712 seconds.

      qsort:  sorting 7000000 signed integers...        done in 1.361047 seconds.
      std:    sorting 7000000 signed integers...        done in 0.747729 seconds.
      radix:  sorting 7000000 signed integers...        done in 3.204770 seconds.
      fstd:   sorting 7000000 floating-point numbers... done in 1.014800 seconds.
      fradix: sorting 7000000 floating-point numbers... done in 3.175570 seconds.

      qsort:  sorting 9000000 signed integers...        done in 1.766008 seconds.
      std:    sorting 9000000 signed integers...        done in 0.953153 seconds.
      radix:  sorting 9000000 signed integers...        done in 4.121769 seconds.
      fstd:   sorting 9000000 floating-point numbers... done in 1.310309 seconds.
      fradix: sorting 9000000 floating-point numbers... done in 4.056485 seconds.</comment>


Mayan documentary to show evidence of alien contact in ancient Mexico - <AUTHOR> http://www.guardian.co.uk/film/2011/sep/29/mayan-documentary-alien-mexico

<comment><USER2> Saw this yesterday here - <http://news.ycombinator.com/item?id=3053747></comment>


New drug dispenser may turn human beings into weapons against mosquitos - <AUTHOR> http://www.economist.com/news/science-and-technology/21710243-new-drug-dispenser-may-turn-human-beings-chemical-weapons-biter-bit <comment><USER2> In srilanka, an innovative way to fight malaria, was print newspapers with mosquito repellant mixed.

[http://www.independent.co.uk/news/world/asia/the- newspaper-t...](http://www.independent.co.uk/news/world/asia/the-newspaper- that-saves-lives-sri-lankan-paper-fights-dengue-with-mosquito-repellent- ink-9576020.html)

worth a read!

<comment><USER3> There's a "black, white, and read all over" joke in there somewhere, I just can't find it.

</comment></comment><comment><USER4> Giving this to livestock would also be pretty deadly to mosquitoes. Using cows and pigs to fight malaria is not a half-bad idea.

<comment><USER5> What if the effect of this approach is not eradication of mosquitoes but evolution, though? Mosquitos evolving to avoid livestock would need to compensate by feeding more somewhere else. That somewhere might be humans.

<comment><USER6> Or they might just die. Evolution doesn't give guarantees.

</comment></comment></comment><comment> guard-of-terra How about placing in our blood flow a CRISPR that embeds into mosquitoes' DNA something that makes all their offspring sterile after four generations? For three generations they should be fertile thus moving genes around.

<comment><USER7> A similar strategy is already in use.

[http://www.oxitec.com/our-solution/technology/the- science/](http://www.oxitec.com/our-solution/technology/the-science/)

[http://www.straitstimes.com/world/americas/brazil-to-use- fac...](http://www.straitstimes.com/world/americas/brazil-to-use-factory-bred- mozzies-to-fight-diseases)

It doesn't use CRISPR or have the amazing generational sterility though.

</comment></comment><comment><USER8> doesn't this cause a problem similar to the "superbugs" epidemic? i.e., the population of malaria-carrying insects takes a big hit, but then the only ones left are the ones who have adapted to survive (found a new food source) and the population builds back up?

<comment><USER9> Single celled organisms evolve a lot faster than multi cell organisms. So, one long timescales it would be a problem, but solutions that only work for 100 years are still useful.

<comment><USER10> Nonetheless drug resistant fleas are a problem, so much so that the most effective treatment for your pets varies regionally.

</comment></comment></comment><comment><USER11> There are new compounds being used in the veterinary world that may be better options. Fluralaner, for example, appears to have few side effects and remains in effective concentrations to kill fleas and ticks for over 3 months in dogs. I wouldn't be surprised to see some of these drugs being used to cure children of headlice in the near future.

</comment><comment><USER12> Would this be a human equivalent of the flea and tick medicine we give to our pets?

</comment><comment><USER13> It's interesting that ivermectin kills mosquitos. We've always used it for intestinal worms. It is a marvelous compound.

<comment><USER11> Ivermectin, and a lot of other drugs in the class of macrocyclic lactones, are considered "endectocides" in that they kill nematodes (endoparasites) and insects (ectoparasites). I don't understand why they aren't studying moxidectin, a related compound which persists in the body at effective concentrations for a month or more.

</comment></comment><comment><USER14> Wouldn't it be possible to make clothes filled with the bad blood which are attractive to mosquitos? Maybe using diseased's skin or anything mosquitos want to sting (and keep the bad blood slowly "pumping" using sun heat).

<comment> rm_-rf_slash _rip_

"Oh my god, are you bleeding?"

"No...no, it's just my shirt."

<comment><USER15> To say nothing about how it would deal with a washing machine...

</comment></comment></comment><comment><USER16> Is it just me, or does that star-shaped thing look absolutely terrifying? I really don't want that in my stomach. I'd much rather take daily (or even bi- daily) pills, or even some sort of slow release injection.

<comment><USER17> Just you, or just anyone who reads the article. It's soft and flexible. More importantly a consumer, you'd swallow an ordinarily sized gelatin pill.

In the few minutes as the gelatin dissolved, that star would unfurl. In a few weeks, that too would dissolve.

People are really bad at taking pills on a schedule. This seems like a novel solution.

</comment></comment><comment><USER18> Great! Let's give a neurotoxin to people en mass so they don't get Zika.

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

<comment><USER19> From the same Wikipedia article:

"The wholesale cost in the developing world is about US$0.12 for a course of treatment. In the United States it costs $25–50."

:(

</comment></comment><comment><USER20> This title is clickbait.

<comment><USER21> Thanks, we've updated the HN headline.

</comment></comment><comment><USER22> game theory though

<comment><USER23> oh yeah, that game theory. mmm. I see what you mean.

<comment><USER22> sorry, was too lazy to explain:

If only 60% of my village needs to take the drugs, nobody really wants to be it.

<comment><USER24> Just give money to the people who take the drug and can prove that they took it consistently (urine tests?)</comment></comment></comment></comment>


TCP and the Lower Bound of Web Performance - <AUTHOR> http://www.stevesouders.com/blog/2010/07/13/velocity-tcp-and-the-lower-bound-of-web-performance/

<comment><USER2> it seems worth noting that the block size of gzip/deflate (<http://tools.ietf.org/html/rfc1950>) can be up to 32Kb, so i wonder if browsers are smart to enough to start rendering before a complete block has been received?

if not, compression could kill network latency... from the graph it seems maximum compression would require about 21 round trips minimum. i suppose this is why zlib's deflate has a flush argument: <http://www.zlib.net/manual.html#Basic></comment>