skysight-inc/HackerNews huggingface dataset:
Here's a memoized Fibonacci in Haskell

fibs = 0 : 1 : zipWith (+) fibs (tail fibs)

This is essentially equivalent to

long memotable[]; // filled with -1, with first elements 0 and 1
long fib(int n) {
if(memotable[n] != -1)
return memotable[n];
memotable[n] = fib(n-2) + fib(n-1);
return memotable[n];
}

Edit: Actually, the Haskell version can be O(1) in memory as the front of the list can be garbage collected, while the C++ version is O(n) in memory.
And yet, and yet... Female happiness marches relentlessly downward.

http://www.nber.org/papers/w14969
"Nearly every city already has public transportation, mostly buses,"

Oh, well, then, problem solved.

Why are we even having this conversation, then?

Obviously, because you want more than we currently have, in a rather staggering quantity. You can't both have enough and want much, much more whenever it suits you in the argument.
I've wanted to get some clarity on the difference between effects and side effects for some time. I think side effects are effects that aren't explicit in the program. So if you have a function with signature `Int -> Int` which also prints something, that is a side effecting program. But if you have a function `Int -> IO Int`, that is not a side effecting function. But it is a function with effects.

To complicate things, funprogrammers often like to talk about effects in a broader sense, such as errors and failure. But these effects are often perfectly pure; the effect is some kind of semantic that is layered over some other, existing function. Like an addition that either returns the result, or `Nothing` if the input is malformed in some way. This effect has nothing to do with IO. So what is a non-side effectful function, that does IO? Is it called an "IO effect"?

To make things even more complicated, apparently expressions with `IO` in them are pure. That is because it is left to the runtime to actually execute the IO action, or something. At this point, you might feel that they are yanking your chain and using the old "just solve this problem by adding another layer of indirection" (this layer being conceptual). I need to read more on this topic.

> Most programs raison d'être is to do IO

You can strengthen that; All programs that are to be evaluated need to do IO in order to do anything useful (heating the CPU is not useful). At least I can't think of any counter examples. Surely people like Haskell programmers know this, and the point of IO was never to ban IO in the first place. Just to make it explicit. (Hint: what's the point of having non-strict semantics if you have to assume that any expression may be side-effecting?)
The fundamental difference seems to be that Google's prices are fixed, whereas AWS uses a "market" model, which frequently sees crazy prices (well over the on-demand price) especially in us-east-1.

I say "market" because no-one really knows how the spot market place actually works. We've had machines run for weeks, and other times the prices fluctuate in bizarre ways and we can't get out preferred instance types for hours or (in the worst case) days. There's an interesting analysis here: http://santtu.iki.fi/2014/03/20/ec2-spot-market/
> Yes, I know: California Law forbids giving bad references by phone. But we know the routine: To slam a candidate, all I have to say on the phone is “According to California Law, all I’m allowed to do is to confirm Job Title and Employment Dates”. The prospective employer promptly hangs up, fully warned.

My understanding from multiple people is that this is the only thing they will say when asked for a reference. I really hope that doesn't mean that CA companies pass over folks unfairly.
Coffee and Cannabis K-Cup Hack
At least for me in Germany Matlab also shows a normal webshop with prices and a shopping cart. I didn't check what happens after account creation though.

A VPN to the US might help with the other issue (although I wonder how a visa can block you from buying software?)
FBI flight hacker claims queried by security experts
Shallow is not narrow, and I specifically meant narrow in this particular context. A narrow clone gives you the full history for part of the tree.
Here's an explanation of how IO works in Haskell: http://blog.jle.im/entry/first-class-statements

If you go through it and understand it, you will find that it is completely "pure".
Further more, it's very hard to see the merit of FP strictly from Fibonacci.

I'd go so far as to assume most of us don't spend all day coding anything close to Fibonacci series.
Anyone knows how does it compare to dynmap, another well-known renderer? Key differences (I remember that it didn't allow showing players location and chat and such stuff)?
Sounds like you want your cake and to eat it too.
True, however Pants right now does not have support with Git to only checkout dependencies it actually needs for the build.

I agree that it should take effectively zero time for me to download and apply 50MB of updates, but poor quality internet is still pretty easy to find (working with plane wifi) -- maybe my coffee shops have worse internet than yours!
> No that's not a fair way to do it if you take info account the fact that the employee has to sign away not just their rights to sue, but their right to full unemployment benefits.

That's going to depend heavily on the jurisdiction. Where I am (Massachusetts), you cannot receive unemployment insurance for the same weeks covered by a severance package (which seems reasonable; I can't get unemployment for weeks in which I'm being paid a salary either...), unless that severance package requires the employee to sign a release of claims against the employer. If it does, then you can receive unemployment income for the same weeks covered by severance.

In every case I can think of, here in MA, employees terminated under such an arrangement have right to full employment benefits. I'm sure that will vary in other places to some degree.
The guy(John Grey) who wrote Guys are from Mars, and Women from Venus got his Phd form Columbia University, San Rafael Ca.

Personally, I think too many schools are essentially diploma mills. I waiting for good Ivy League Internet school that has low tuition, or free. I believe it will come one day?
I understand a student wanting a Master's, but the little extra knowledge gained with a Phd seems pointless?

Personally, if I was hiring a candidate and he told me he stuck around the university 2-3 extra years working on a non-original thesis; I would hire the guy with the masters.

I wish the U.S. Government did away with all degree requirements in hiring for federal jobs, unless the job requires a license(medicine, engineering, law, etc.) and only hired applicants on test scores.

I sometimes feel if a person can pass a series of tests designed to test whether a person can do a job; they shouldn't be penalized for not going to college? (The tests would have to be of high caliper like the California Bar exam.)
I'm interested if Scala's OOP hybridity leads to better readable code on a high level of abstraction than for example Haskell? Or do you mainly avoid the OOP features of the language?
The only evidence of productivity boost I know of is the following paper by Paul Hudak and Mark P. Jones: http://www.cs.yale.edu/publications/techreports/tr1049.pdf, where the conclusions seem to support the "gross improvement" hypothesis :)

In the paper, the Haskell implementations beat several other languages in multiple aspects:

- They are shorter.

- They are complete (i.e. compile and actually work).

- They include extra features.

This would seem to show Haskell is actually a pretty great language for rapid prototyping!

Unfortunately the experiment is marred by several SERIOUS flaws:

- The requirements were pretty vague, and it was pretty much up to each implementer how much to implement, and what.

- The results were self-reported. Here I trust Paul Hudak not to lie about Haskell, but it's a huge flaw in the study.

- The review board didn't attempt to execute the code, and in the case of Functional Programming, they didn't fully understand it and thought some of it was trickery (they called it "too cute for its own good").

At the end of the paper, the authors propose a new study to remedy these problems, but unfortunately it never happened as far as I know.
I didn't say the US isn't dense enough for high-speed rail. My focus isn't limited to high-speed rail, but all manner of public transit. I also mentioned distribution of density as well as raw density.

Most importantly, I was not addressing whether it can work or cannot work. That is not the question. The question is whether shared transit is and has been more convenient and cost-effective than roads, highways and automobiles.

I am explaining why a simplistic comparison between the US and Europe is misguided. I am countering the point "I lived in Europe and their public transit was so great why can't we have that in the US?" Which everyone upvotes because they're starry-eyed idealists who haven't thought through the economics and messy details.

Furthermore, I went beyond describing density as simply a number, but also referenced distribution of the density. The shape matters.

Your article compares Spain to California. But their situations are far different. Spain is a less-dense adjacent to a dense region. A couple connections into France and a ferry to Italy and you've got bandwidth into the heart of the existing network in central Europe. California, on the other hand, is a denser region on the opposite side of deserts and mountain ranges. They could build a rail system for themselves, but unlike spain they wouldn't have the huge advantage of a cheap and easy connection into a large existing network. This all helps to explain why the US and Europe did not evolve the same manner of public transit systems.

I see that China is looking to build a high-speed rail between Moscow and Beijing. [1] The relevant points: it does not exist yet; and China is booming.

[1] http://rt.com/business/225131-russia-china-speed-railway/
Is your Apple Watch game indistinguishable? – Thoughts?
No, it wouldn't work as well without them. The swear words are there to wake you up and make you pay attention. Because making simple websites that work should be obvious. But everyone's so distracted by the latest javascript libraries and css frameworks that you have to scream to get your point across.
There were others and there is a great Quora thread somewhere discussing why Dropbox was successful.
> There are recursive layers of social intrigue in this paragraph that people with autism would have a great deal of trouble understanding, much less writing

That's a bit sweeping. Many doubtless would; but there are autistic people who are capable of self-reflection.

A somewhat exceptional example: Temple Grandin, PhD, who has extrapolated from her experience of having autism, specifically the sense of constantly being under threat from her surroundings, to advise on more humane ways of handling livestock: http://en.wikipedia.org/wiki/Temple_Grandin#Career
No idea why the author thinks it's impossible. I mean, C stdlib comes with qsort.

Here's a map in C

void *map(void *in, void (*f)(void *src, void *dst), size_t size, size_t in_s, size_t out_s)
{
void *out = malloc(size * out_s);

for(size_t i = 0; i < size; i++)
f(in + (i * in_s), out + (i * out_s));

return out;
}
Hi, appreciate your thoughts on our new (free) editorial feature offer for Apple Watch game developers.
Nice! This ties in with the discussion yesterday on HN about data center utilization. Good for saving money and the end result must be lower global energy use if this also catches on with other providers (AWS already offers something similar).

When I worked at Google in 2013 part of my job was running very large calculations that were often pre-empted. I usually ran at the lowest priority and was in effect using spare capacity. No hassles, assuming that getting runs completed was not too time sensitive.
It's unimportant like your eyes are unimportant because they're small. Or like only one of your family dying is unimportant because there are several family members.

I'm British and have lived part of my life in Scotland, I don't consider it another country, it's part of our country and my relatives who live there are the same nationality as me.

It's a visceral, and probably illogical, thing to a certain extent - like feeling attached more to family members than to other people.

Also Scotland ain't that small, it's population is that of Yorkshire, it's geographic size is pretty big as a proportion of the UK (~1/3 I think).
I am an autism parent, who was similarly skeptical of prompting as many comments expressed here.

My son, who appears completely uncoordinated with random repetitive behaviors, would fit the typical pattern of many of these kids. Even now, if we take him to a grocery shop, his conspicuous behaviors would cause people to stare at him.

Yet, here is an experimentally testable concrete thing he can do: read a complex English passage and answer a series of fairly non-trivial multiple choice questions - for example "What is the tone of this paragraph? a) Irony b) Sarcasm c) Sorrow d) Happiness" type of questions which you cannot simply answer by trivial pattern matching.

No prompting would be necessary and this test has been performed without parents being nearby, on totally new material. In fact, he takes these tests often, partly because we could tell he gets some thrill from getting everything right and that test-taking seems one of the rare times he seems completely focused.

Originally, he was very prompt dependent (as many people mention here), so even I was somewhat skeptical about his real skills, but now I have no doubt.

The reason I mention all this is that no casual observer, not even one who spends hours together with him, would conclude he can do those things. He has no motivation to connect or demonstrate his skills; yet, he now can demonstrate he can do these things independently.

These kids are very complicated, so don't be too quick to dismiss them.
The problem is that under the current system, every time a job is eliminated due to technological and productivity gains, another useless one is created, which, in turn eats out the productivity that was gained from eliminating the first one.

Politicians should stop looking at "job creation" as a means of keeping people busy and consuming. A job should be done only if the society benefits from it.
I COMPLETELY missed what Cameron said the first time. Like, completely:

"For too long, we have been a passively tolerant society, saying to our citizens 'as long as you obey the law, we will leave you alone'."

Obeying the law is no longer enough. Great.
Watch Live Today – 2nd Annual InterPlanetary Networking Conference
Depending on your POV, even C can be said to be purely functional!

http://conal.net/blog/posts/the-c-language-is-purely-functio...
> Sounds like it is a fearful place to work and puts all ownership on the employee and nothing on the person doing the fire with no checks or balances. Just a clear cut you disappoint me and I will fire you quickly and even pay you off instead of you suing me.

If you were paying me hundreds of thousands—or more—of dollars a year, then that's kinda how it works: I execute well, or you sever the relationship.

> Professionals (I am assuming this is a professional position and not some low hourly wage job) normally don't get fired for them not being smart enough or the ability to improve.

I don't understand this at all. Why would an insufficiently-smart professional's employer keep him around—as window dressing? If one's not smart enough for the position, and doesn't have the ability to improve, then who would continue to employ one.
I agree that is doesn't add much if you read UK media. For the majority of the world, which doesn't, I thought it gave some useful context: the sailor is "on the run", the MOD are downplaying his claims, the SNP reaction, etc.
Permissions? ie different teams with different push/pull rights for different repositories. We have that where I work; for most projects it seems like needless complexity, but some things are more closely controlled; payment handling, ops (where a change could bring down the whole org not just an app), etc. There's also the issue of contractors being brought in, generally they see a restricted subset of the codebase.
To answer your first question there is little incentive to look into this question as no one with serious money wants to know the answer.

Which of the three options was best for you?
He claims to have used an ethernet cable to break into the controls
Mailpiggy – save your newsletters to Pocket
a better way to save the articles you want from weekly and curated newsletters. using Mailpiggy (demo: http://bit.ly/mp_demo) you can save all of the articles in a newsletter for later to Pocket with one click forwarding. Sign up for BETA http://mailpiggy.com
It's because IDN domains became a standard after tables stopped to be used in page layouts </sarcasm>
Pity it doesn't support mod blocks; if it did I think I know what I'd be installing this evening…

I wonder if he could figure out the blocks' textures from the mods themselves, somehow.
isn't this the OS that degrades it's performance after a certain amount of time & then prompts you to buy a license?
The cheap systems that are not 720p cannot see things like face details and license plates which make them useless when showing police.
I think you're right and in hindsight I should've formulated the comment differently, putting the focus on the fact that the article doesn't differentiate between cardio and weigth training.
Note that Backus investigated purity long ago (FL) and ended up banging on the IO wall too. I don't get the IO Monad really (I only grasp a tiny bit of it), but I wonder if that's the only way to define IO to fit purely functional evaluation.
I can recommend flicking through https://leanpub.com/javascript-allonge/read -- it's a really good book on functional programming in JS. Ends up doing Ycombinators, trampolining etc.
Adult Swim (yes, that Adult Swim) makes a psychedelic leap into virtual reality
Двери Массив
Show HN: Add scheduling to your website
My guess is because your post reads as if you were implying it was a mistake learning Haskell first. I'd say it was a big win; I'd recommend learning a principled FP language like Haskell first, then a hybrid language like Scala. To me it's harder to learn FP principles in Scala, where it's so easy to cheat and revert to the plain old Java ways... It's harder to see the point of many FP techniques when you can just go back to imperative programming whenever you hit a roadblock.

Probably also because Haskell is not only "fun to play with", but actually a capable language that can be used for real work (if only your boss would let you, of course, and that's a big "if").
Ah, fair play, you're right.
Search: better user experience with one line of JavaScript
Everyone knows the technique you use influences the final work. If I draft a novel by talking into a tape machine, it's gonna come out different if I wrote it on paper.
Really?

Given you can't rely purely on GPS with autonomous vehicles anyway (tunnels, highly built up areas etc) I would have through the current accuracy was fine.
The Geek Trick
Its all about the future. If the startup has great potential it doesn't matter how much money or traction it made. The acquiring company only has to want something about that startup that it thinks will help in the future.

Also pretty sure Amazon went 6+ years at a loss. That was a no brainer for investing in them even though they weren't making a profit.
How to Copy Data to Another AWS Account
Check out the legal notice sent to the NYT http://www.axact.com/defamation-response/pdf/ln-NYT.PDF (lol)
For C/C++ all that is usually needed is to implement a few helper functions.

E.g. the quicksort example is one of my favourite pet peeves, because the reason the C version sorts in place is that the archetypical C implementation after Hoare sorts in place.

Many of the FP versions of quicksorts like this end up requiring a lot of additional memory. Maybe it is becoming reasonable to assume they will optimise it into an in-place sort these days, but it didn't use to be.

Meanwhile, with a couple of small, generic helper functions, you can get down to nearly the same complexity in C/C++. For C++ the only helper you absolutely need to cut down on the verbosity has been a part of the standard library since C++98

I wrote a blog post about this back in 2005 [1] about one of the other typical Haskell quicksort examples, and referenced an article by Alexandrescu that gave an example implementation of quicksort in C++ with the (generic) partitioning, as well as the pivot selection split out that looks like this:

template <class Iter>
void Sort(Iter b, Iter e)
{
const pair<Iter, Iter> midRange = Partition(b, e, SelectPivot(b, e));
Sort(b, midRange.first);
Sort(midRange.second, e);
}

You can do the same in C easily enough. So what Haskell had over C/C++ in this respect was mainly a more expressive standard library. C++ has long had std::partition(), so it can be done entirely with the standard library too if you're willing to do the same (bad) fixed/dumb pivot selection that the typical Haskell versions (as well as the archetypical C version) use.

Unfortunately the link to the CUJ article is dead, as it was a quite fascinating walk through optimising sorting (including better pivot selection).

[1] http://www.hokstad.com/archives/2005/03/about_haskell_a
In my own (very limited!) experience, Scala code is way harder to read than Haskell's. Even type signatures of Scala functions are harder to understand, and more verbose. Scala brings OOP to the table, but I wouldn't say this makes it a "higher level of abstraction" either. It does make it more complex, though.
Sounds like a crazy situation if a mortgage and all the associated costs is less than renting - here in Australia it is considerably cheaper to rent.

I don't think the choice of not using daycare is one that can only be made from a position of massive privilege, but it does involve material sacrifices if you are middle class.
> And then our hypothetical attacker can figure out how you generate the honeypot URL and embed an image with that URL for their visitors.

So add a salt. Just like you would when hashing passwords. You then make it more time consuming to crack the hash than it would be to perform a more typical denial of service attack

> you need to make sure that they can't obtain robots.txt via GET requests from a visitors browser (No Access-Control-Allow headers).

If an attacker already has control over the victims browser (to pull the robots.txt file) then they really don't need to bother with this attack.

> Also don't forget a single visit from a network, sharing an IP would still ban all the network.

Multiple users of the same site behind the same NATing really isn't that common unless you're Google / Facebook / etc. And when you're talking about those kinds of volumes then you'd have intrusion detection systems and possibly other, more sophisticated, honeypots in place to capture this kind of stuff. Also some busier sites will have to comply with PCI data security standards (and similar such as the Gambling Commision audits) which will require regular vulnerability scans (and possibly pen tests as well - depending on the strictness of the standards / audit) which will hopefully highlight weaknesses without the need to blanket ban via entrapment. And in the extremely rare instances where someone is innocently caught out, it's only a temporary ban anyway.

> Maybe a login form can be served from that URL, and any attempts to login would then get the visitor banned via a session cookie / browser fingerprint combo (Easy to get around but at least then you're not blocking IP addresses).

You can do this same method of banning with the honeypot you're arguing against!

While I don't disagree with any of your points per se, I do think you're being a little over dramatic. :)