skysight-inc/HackerNews huggingface dataset:
In addition to the unexpected high costs of following pointers, the cost of searching an array is often less than you'd expect thanks to branch prediction.

What is that? Well CPUs actually process a statement in several steps, and try to process several statements at a time. But what if you have an if? The solution is to guess which way it will turn out, then begin on the expected branch before it is done evaluating the if. If the if turns out as expected, this goes faster. If not, the partially done work is thrown out, and the other branch is run. This is a substantial speedup when branches are predicted correctly.

When you search through an array you often get into a situation where most of the time the if turns out the same way. "Is this bigger than my max? No. Is this bigger than my max? No...." As a result branch prediction makes this execute surprisingly quickly.
if 4 <= N <= 16, then sqrt(N) <= log2(N)
else sqrt(N) > log2(N)

So, in Big-O term, this only trying to optimize only small dataset (4 <= N <= 16).
Waiting for 1.0 isn't an option for me; I love the language too much already, even if that wasn't apparent from my generally negative comments. Currently I can work around all the corner cases myself, but encouraging/convincing others of Julia's merits is a difficult task at the minute. Thanks for your feedback on my fixed size arrays code.
Hey, You, Get Off of My Cloud: Exploring Information Leakage in Compute Clouds [pdf]
The killer feature in this week's newsletter is an image of using Servo itself to post this link to HN :-)
Flexbox Froggy: A game for learning CSS flexbox
Take a look at 'David Attenborough .. Life on Earth' https://www.youtube.com/watch?v=czgc56Vfz4w
This fails if:

1) If you can see over the fence...

2) If it shows up in Google Maps ;)

#2 might be implausible now, but if people get really accustomed to this, I guarantee that some handymen are going to tile/spraypaint large, permanent drop points in their yards.
"Have they tried closing the Zoo and releasing the animals back into the wild." YES. This. Literally laughing out loud at the obviousness of this.. Rediculious that we still keep wild animals as pets and call it educational. It's an amazing lesson in speciesism.
Cpanel Plans Support for Lets Encrypt Automated SSL
I'm more frustrated that there wasn't a clear editorial take in the article. I'd like to have seen some research done by the journalist into what the correct ethics are in a situation like this. My feeling is that without the option to have euthanasia (should things get worse) you are promising a tiny tiny chance of a possible cure but a large chance of increased suffering too.

The tiny chance of 40 more years of life might be worth it but its crazy to try experimental treatments as a first roll of the dice!
I've had my public links blocked for three years. The reason? "Temporarily blocked due to too much traffic". 3 years is temporary huh? I have even tried emailing support. No response.
I'm surprised at the choice of words. "potentially" doesn't quite cut it.
Parents would you use this 'AirBNB for toys' service?
I’m playing with the idea of creating a startup that lets parents share their un-used kids toys with other kids. So many toys end up in landfill each year. It would be nice to do something about it.

I’d love to get any feedback on this idea from parents on Hacker News and whether you would use such a service.

The platform/service essentially works like this:

1. You log into our platform

2. You submit a photo and description of your toy, age etc

3. Depending on the toy, we then match you with other parents that are in need of similar toys

4. We send out environmentally friendly packaging for you to send send the toy off

5. We then clean the toy, package it up nicely and send it onto another parent for their kids to enjoy

Would you use such a service?

Thanks in advance!
So you have your lies, your damned lies, your statistics and your benchmarks.
Damn straight! it's so demonstrable that our laws are being selectively enforced but what happens when Habeas corpus is selective enforced? We came damn close to losing it in 2006.
I mean, it depends on your data access patterns. Arrays are good for some things, trees are good for other things. Here's another option.
Can you explain how "weakening our currency" isn't equivalent to making us poorer overall? What's so bad about a strong currency?
Have a look at StuntRally too, if you're after well executed OSS games: http://stuntrally.tuxfamily.org/ It does have some initial weirdness and getting used to in the GUI, but it plays really great and looks stunning (even on "average" graphical details, which you should pick unless you have a high-end GPU)
Ask HN: What's a good tutorial for writing a stack-based virtual machine?
Eventually I'd like to write my own language like Lua (but stack-based), mostly for fun and partly for practice. But I don't fully understand a lot of aspects of how a virtual machine like that works. Can you recommend a good tutorial on it? Thanks!
My second sentence was the entire point. If a web page is not a good idea because it can't support certain designs, then what would you suggest instead (that also has the other properties of the web such as easy distribution and is ubiquitous)?

I was referring to the whole mindset of "the web was not meant to do that". Well, yeah, it wasn't. But its already doing that, so we have to do something to make it properly rise up to the challenge.
or simply free hosting
Big-O is only strictly meaningful in terms of asymptotic behavior; as soon as you start talking about specific values of N, you have to care about constant factors.

In this case, the constant factors will probably be quite different because the goal is to make better use of CPU cache.
Awesome work by the TypeScript team - they have been moving very fast to improve TypeScript over the course of this year, and I am impressed by the amount of effort Microsoft has poured into this. Using TS now is pretty nice, and has already paid dividends at work in catching some subtle bugs
I agree, but personally it has been somewhat emotionally taxing that this deer season I've had to cut two throats. Too much bow hunting seems to have left me a poorer shot with a gun.

At some level, however, if I'm not comfortable cutting the throat of an animal that is staring at me in fear, how comfortable should I be eating meat?
That's a riff on Tanenbaum:

"Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway."

https://en.wikiquote.org/wiki/Andrew_S._Tanenbaum
You've turned a racial issue into an economic one. That's quite a moving of goalposts.
Silicon Valley Vies for a Piece of the U.S. Mortgage Market
For brainstorming and architecting I use whiteboards that I take photos of before erasing. If there's no whiteboard available, I use pen and paper - yellow legal pads - which I also take photos of.

Text files and Evernote I use for snipping web pages, organizing bookmarks, and taking meeting minutes. For todo lists, I use text files, Evernote, and increasingly, Asana.

I don't do any brainstorming with the computer.
What I learned working at McDonalds for 4 years
In our Clojure web app, we started out using MongoDB, and eventually we migrated to Datomic. It's a nice compromise between relational DBs like SQL, and "dynamic" DBs like NoSQL. So far it's been a huge performance win. Queries are faster here because we have relational data, and we don't do too many writes, so the trade-off worked perfectly for us. Plus, the API is way nicer to work with than SQL-based anything.
Computer's and Me
It probably doesn't -- there's likely an API that the app calls, and that one could, with time, mimic it. That would also require the intersection of people with the tools, cats, and inclination.
Polymorphic this Typing seems like a major change with many possible corner cases. I think Dart .. operator is a better solution

newModel.setupBase().setupAdvanced();

becomes

newModel..setupBase()..setupAdvanced();
But what about fabbing or the PLC? Can you verify those? or disk controllers, &c.
If I leave my kids for themselves they will spend all time watching Netflix and playing Minecraft. It's just better than watching TV.
Does anyone know of a course to learn Arabic?
Which reminds me that in iMessage, Apple still has the keys but the forward secrecy is enough to exclude it from CALEA because of the "encryption" exception. This of course caused FBI to complain, which among other example of encryption made encryption backdoors a political issue again.
Makes sense. I was thinking the emulation could have a single virtual core to enforce the non-parallelism within a process. Beneath the emulation, I was hoping to field out processes. However, I see that's not feasible. Thanks for your help!
Optimistic View of Feminism
Nobody is going to read this since this post is over a day old, but:

Emacs searches not only ~/.emacs but also ~/.emacs.d/init.el (and probably more) places for its init file. So you don't have to mess around with symlinks, you can just have a synced folder that is your ~/.emacs.d and have init.el be at the top of that folder.
Bomb squad investigates hand grenade found at Stanford Research Park
You're probably being downvoted because you're nitpicking language and missing the entire point of what the parent comment is saying, which is that there are more types of compute-intense workloads than raw "number crunching" and these workloads cannot or should not be offloaded to the cloud.
> This isn't the first time Perl6 has been 'production ready'

Yes it is

> No jobs

Just like every other new language

> no deep libraries

http://modules.perl6.org/

> no SDK support

Who knows what that means...

> If we'd put 1/10 the time into minor improvements to
> perl5 over the past 15 years

If you think perl5 has been starved of development time, resources, and releases by the Perl 6 effort, you've not been paying much attention.
[video] Adam Curtis – Bitter Lake
Both those numbers seem to be accurate for the city limits. Wikipedia says the population of NYC was 8.5 million in 2014. City limits are, of course, a somewhat arbitrary concept and NYC's environs are more crowded than Houston's. I'm not sure what your point is however. There are a variety of historical and other reasons why the South doesn't have cities as large as the North and the West Coast.
> The bad thing is that the reputation of the FBI and other such agencies is now such that an analogy with the Hoover days can no longer be rejected out of hand 'because they'd never do such a thing'.

Not only that but when someone's life is as public as a politician - and their career dependent on that credibility - it takes far less than Hoover-era style blackmail to ruin such a person.

So even if the FBI is no longer acting like the Hoover era agents there are significant careers risks in standing up to the three-letter agencies, (and their similarily-powerful network of friends and former employees). Those risks have only grown as the power of the NSA/FBI have grown with the spread of technology/internet.

The bar for making such a claim is much lower than in the 1950s, especially in the context of a politician.
I'm looking to build something similar. What did you use as a hopper?
How do your cats maintain clean teeth when on solely wet food? I had thought the kibble helped with that, but that may have been more because of my prior cat's allergies than the food itself.
Errr, what?
natural log grows slower than sqrt(n)

http://www.wolframalpha.com/input/?i=sqrt%281e55%29+%3E+log%...
Speed designing of ToDo list video. #reactjs #redux
Show HN: Design by Contract for JavaScript
If by market rate, you mean $250k per year at Google, then yes, most startups will pay below market rate, but it's a competitive market for talent and it's very hard for startups to attract good talent. You need a generous compensation package and a compelling mission.

Everyone on my team makes 2x - 3x what I make, and I'm three years into my startup. I wouldn't expect a non-founder to assume that same burden. Moreover, if we fail I'll have no savings, I'll likely have gone bankrupt trying to save the company, and that Magical Founders Club you speak of really only exists for founders who built a successful company and had an exit for their investors.

You also mentioned stress and health issues. I'm not sure why founders would be immune to that. They should have it far far worse. Heavy is the head that wears the crown.
I think the Udemy coupons are generally used as a way to boost the ratings. Give out coupons and tell people to rate your course 5 stars, then people see the well-rated course and buy it for real.

Given the number of terribly produced courses I've seen on there with excellent ratings, it wouldn't surprise me.
So I can speak from experience here, on both ends. I was recruited back to upstate NY after moving away for about 200k to run an engineering team, I make a bit north of that on the west coast. I turned it down without even thinking about it too much, one I would have to uproot my family, and if that company went sour, I wouldn't be able to provide for them the same way and we'd have to move again. I also couldn't take the winters anymore.

If you are recruiting top end college grads, forget it, they'll get snapped up by the bigger companies, even if you are offering them the same, it's about the name and moving out west. If you are recruiting senior engineers, none of them will move from the bigger cities, and there aren't really that many local if at all that can solve certain problems, they all move away.
That gives you only the equation of motions for a test particle, i.e. the geodesic equation. The field equations are another thing. I think historically there was a lot of guess work. But using that the sources of the field are the energy/momentum density you can make them plausible: looking for a divergence free 2-tensor that depends on the curvature the Einstein tensor is easiest choice. The coupling constant can be determined by looking for the non-relativistic limit which must be identical to Newtons law.

On the other hand, the Einstein-Hilbert action[1] is so beautiful it just has to be right :) It simply says that the the solutions to the field equations are the stationary points of the averaged scalar curvature.

[1] https://en.wikipedia.org/wiki/Einstein-Hilbert_action
Exxon takes aim at Columbia University journalists for role in climate reports
If you like audio there's a BBC Radio Four programme called "Inside the Ethics Committee". They have a bunch of people with real world experience of medical ethics, and they take real events and walk through them, explaining what happens at each step.

http://www.bbc.co.uk/programmes/b007xbtd

It's a surprisingly tough listen. Here's one example of a child with a treatable brain tumour. He didn't like the treatment, and when he got another tumour he decided he didn't want treatment.

http://www.bbc.co.uk/programmes/b0643x61

I think it's available to people outside the UK.
Layout Mode sounds really cool, I wonder if they'll be able to expand that to more of CSS.
That 20-something is very stereotypical. I'm sure some cities are more attractive than others, but there are many that would not be interested in NYC of SF. Many more young people happily live outside of NYC and SF than inside those cities.

As for families, NYC and SF are unattractive because of their extremely high cost of living, especially if home ownership is important. If long-term zip-code stability is important, the competition for Buffalo wouldn't be NYC or SF. Texas or North Carolina, maybe.
I suppose there's compiling but I've built kernels and other large things on my phone and it wasn't noticeably worse than my laptop.
Why is "stolen" in quotes? Is it because that is being questioned? Or just the it's sort of a direct quote?
> You see, that's precisely what's twisting the facts to fit the theory is like. If you have a theory that it's all because of income inequality, and then the facts are that it's not the poor who are terrorists, now you have to amend your theory that it's actually the moderately rich who are afraid of becoming poor.

The insecurities of the middle class and the direction they push hardest being a key factor in both revolutionary violence and support for tyrannical government (depending on whether the fear of the continuation of the current or the fear of its collapse dominates, which can vary for different members of the same middle class) isn't exactly a novel theory, even outside the specific case of middle eastern terrorism (in fact, the first time I seem to remember it is in the context of the 19th Century European revolutions.)

> If you have a theory that it's all because of income inequality, and then the facts are that it's not the poor who are terrorists, now you have to amend your theory

No, you don't, because the theory that "income inequality" is a contributing factor does not imply that the actors are "the poor".

If you have a theory that their own poverty is the reason that individual terrorists become terrorists, you'd have to revise the theory, but that's not what the theory was to start with.

> that it's actually the moderately rich who are afraid of becoming poor. And that's why they go on suicide terrorist attacks?!

No, that economic insecurity combined with lack of upward mobility in the middle class leads to disillusionment with the existing order, desperation, and susceptibility to alternative worldviews to those supporting the existing order.

Now, where on top of the economic conditions, you also have a situation where, due to a variety of factors (including attempts to repress alternative views to preserve the power and privilege of the existing elites) there aren't non-violent, non-radical groups that provide something that feels like a plausible alternative, those susceptible to alternative views are going to be, more than in other circumstances, drawn to violent, radical groups.

> I'm sorry if I sound disparaging, but I've had this debate 50 times before, and the mental gymnastics to keep an incorrect theory alive are virtually impossible to penetrate to the point that I'm not even sure if there are any conceivable facts that would falsify that theory in the minds of those who believe in it.

Facts that would falsify a theory of economic inequality contributing to terrorism would be statistics showing that, controlling for other factors that demonstrably contribute to terrorism, economic inequality has no correlation, or a negative correlation, to terrorism.

The things you offer are facts that would falsify particular models of how economic inequality contributes to terrorism, but those particular models seem to be strawmen.
Imperfect Produce
There are costs to this, because you may dereference things that are not valid pointers either. The kernel used to have software prefetch code for linked list traversal. On each access it would prefetch the subsequent access. Which sounds like a huge win. However, in practice the most common list size was just a few elements and there was a huge penalty for fetching the final, invalid null pointer. They ended up taking out the prefetching recently (and I think they saw a small speedup as a result!) Now maybe someone could invent a hardware prefetcher that does this in a way that's a net gain, but the fact that Intel hasn't done it yet suggests that it maybe it doesn't help much or that the situation isn't all that common.
Perhaps the theoretical idea of an `a + bi` number could be called 2D. However, this particular implementation, anyway, only represents scalar values (every number is just a binary string).
why was this classified??

in any case this is really clever. the norm-squared of 1+i in the Gaussian integers is (1+i)(1-i) = 1 + 1 = 2. the norm is sqrt(2).

another way to think of this is we can color a checkerboard like this:

xoxoxoxo
oxoxoxox
xoxoxoxo
oxoxoxox

The o's are "even" in this binary system and the x's are "odd"

So in a sense this is the "square-root" of the binary numbers in the complex intgers Z[i]

I wonder then how "carries" work in this binary system?
Gag orders are like ancient laws (e.g. no horses allowed in front of church); they just stay on the books until somebody notices.
That assumes setupBase(), etc are either void-returning or return the this-instance (newModel). It won't work if each method returns a new instance, such as methods of immutable collections.

Edit: Since this is hard to google for, this is called the "cascade operator". The given example is equivalent to:

newModel.setupBase(); newModel.setupAdvanced();

That is, it ignores the result of the method and runs the remaining part of the statement with the LHS of the operator.
To me, this appears to be the way to go. Javascript + Typescript. Rather than deciding on weak (dynamic) typing vs strong typing, you pick both - incremental typing, as allowed by Typescript.

Want to bang up a quick solution, as in MVP?
Use bare-bones Javascript, it is all valid Typescript. So you get dynamic typing. And if you do not care about strong typing, you can just stop right there.

But if you, some day, for whatever reason, decide that you feel like strong typing: good - you do not need to rewrite your app in a different language - just go back to your code and add some type info, here and there, at your leisure. As you do that, you get all the benefits of static typing, ie compiler showing you obvious type-related errors, correct keyword-completion, exact refactorings, etc etc.

Looks like the best of both worlds.
Detroit may be an even more pronounced example. Apparently the core down by the river is actually gentrifying. But large portions of the city are seriously blighted.

http://www.theguardian.com/cities/2015/feb/05/detroit-city-c...
Japan's Cute Army
Ask HN: What do you use for internal documentation?
We currently use the Fogbugz wiki and it's horrendous. We use mediawiki for external docs and that's a bit of a pain too - lots of work to skin it, not very user friendly. We also use Google docs which is a great applicaiton but not very good at managing and organizing lots of internal documents for a team.

I'm looking for something for a small team (5 to 10 people) to very easily add documentation to that can include file attachments, formatting and includes revision history. It would be great if it was self organizing e.g. auto generated lists of recently modified, most frequently accessed etc.

I would like it to have these features out of the box along with great security i.e. it's for internal use only and has secure sign-on.

We need this for ops docs, network diagrams, documents about our security audits, tools and configurations, product specs, project plans, biz plans etc.

I'm expecting to pay for the service.

I'd love to hear what other HN members and businesses are using. Thanks!
> This type can be used in classes and interfaces to represent some type that is a subtype of the containing type (rather than the containing type itself)

Could that not be achieved by having covariant return types instead?
I never understood the point of automatic feeders for cats - you lose out on that association your cat makes with you feeding them so your cat doesn't necessarily like you as much.
“Dismissing 500B Galaxies” – The Extraterrestrial Life
A $1k ARM platform beating a $300 x86 platform isn't interesting though. If things are close in price the difference isn't material but 3x the cost means comparing performance is almost meaningless, except to say "at least its better than".
But the ping is terrible.
Do a small Forth implementation. Shouldn't take you more than a few days and you'll learn a ton about stack machines VM or otherwise.

Brodie's 'Staring Forth' would be a good point to branch out from. It's fun and it will maybe give you a new perspective on programming.
Genomics of Cancer and a New Era for Cancer Prevention
Can TypeScript do runtime enforcement at the boundaries between typed and untyped code, though?
Moving to a More Elastic Future: Upcoming Build Infrastructure Migration