skysight-inc/HackerNews huggingface dataset:
i don't think the explanation as to why this works is correct. the poster says it's because Google and Microsoft "have been working closely with Netflix to get the needed DRM code required for HTML5 streaming", yet:

1. the user-agent switch involves adding a Safari identifier (rather than IE or a new Chrome one)

2. at WWDC 2014, Apple announced that it had been working closely with Netflix along those lines, and that the upcoming version of Safari would be able to play Netflix without Silverlight. (And indeed Safari on Yosemite can do just that in the developer previews)
You're right, as a method for computing pi it's silly and inefficient.

As a way of demonstrating the utility of Monte Carlo algorithms in general, though, it's a neat and easily visualisable example, which is why it's used so often in elementary introductions of the concept.

Actual examples of how Monte Carlo algorithms can be useful involve the sampling of many-dimensional spaces via algorithms which sample points you're interested in more often than points you're not interested in -- check out the Metropolis-Hastings algorithm for an example of useful Monte Carlo in action.
Nicely visualized. One thing however that I realized is that conceptually you actually need a second step if a point falls exactly on the line with distance 1 to the origin. Half of these points should count to the circle, not all of them, or none of them. With 32 bit floating point values there won't be many of these of course...
Try rinsing your razor in a cup of water. No need to fill up a sink, even at home.
Google use operator overloading in their appengine stuff.
It's not as easily divisible by 3.
That is a chrome UA, it has Chrome/X in it. Safari/X is a compatibility shim.
That is the Chrome user agent. It mentions Safari and AppleWebkit for compatibility reasons but it's Chrome.

Windows Chrome user-agent for reference:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
I haven't measured it directly but I definitely noticed a speedup when I switched to zsh, probably in the 0.2s-0.4s range. I probably actually slimmed down a bit, I don't have any plugins and my .zshrc is mostly aliases and path management.
Well done, it's great. With which tools?
Ireland also went metric. We switched road speed limits in 2006ish, so all the signs say "km/hr" so you don't forget (it's also helpful to tell when you cross the border unto hr uk). Beer is sold in 568ml (1 pint), but milk is sold in litres.
Are you sure you won't run into limitations of 2GB RAM? That's the thing that worries me most about these Chromebooks, if the SSD is indeed expandable. I routinely run over 2GB on 32-bit Ubuntu with regular office and internet browsing tasks; sometimes over 4GB.
In programming there are doers and thinkers.

Thinkers also write code, but they have a perfect understanding - breadth and depth - of the application, the environment, the tools they use, the purpose...

They have full autonomy and initiate things.

They have passion and basically do not need any formal education in CS.

Doers receive requirements and implement using the framework they have being told to use.

Most people who have been told to do CS because it is financially rewarding or a good job end up in this category. It is any-office-job for them.
Poll: Favourite self hosted applications/services
It's becoming increasingly easy (if not necessarily as secure) to host applications similar to popular cloud services on your own server or VPS. For those of us that do this, which of the following do you host AND use regularly (either for yourself, or a group of people). Specific products here are only examples - feel free to expand in the comments on other solutions.
Productivity/all-in-one (eg OwnCloud)
Blogs (eg Ghost)
Mail (webmail, IMAP, pop, etc)
File sharing/hosting (can be FTP server, or fancier web based alternatives)
Music streaming
VPN (eg OpenVPN)
Source control repositories (eg GitLab)
Issue tracking (eg Jira)
Wiki (eg tWiki)
I like to think of Applicative Functors, Monads, etc as the Design Patterns of functional languages (though I've developed most of my understanding by applying these ideas in JavaScript).

A nice way to think about how they can be used (and the difference between parallel and sequential evaluation discussed towards the end of the article) is in handling promises:

The parallel or sequential composition of a list of promises returns a promise of a list.

The monadic composition resolves each promise sequentially (via the Haskell operator `sequence` or as a cascade of JavaScript `.then` calls).

The parallel applicative composition resolves all promises simultaneously.
We wouldn't have this conversation, if immigration was sane in the first place. Ie let anyone in. It's such a waste of human labour.
I've done that too, and I think there's nothing wrong with that. All I'm saying is people should stop calling it Monte Carlo once they've found the correct solution and realized it has nothing to do with randomness.
Ask HN: How did you build an audience for your blog?
I like to know how did you pick a subject and built an audience for your blog since I am considering starting my own.
(And indeed Safari on Yosemite can do just that in the developer previews)

Yep, it's definitely a bit buggy and stops occasionally but it's usable!
Would you care to estimate the magnitude of this error, and how many steps you would need before it actually became relevant?
Apart from driving for fun.
Monte Carlo methods are never "seriously" used to approximate pi – there are algorithms which converge much, much faster.
This here, however, is not a "serious" attempt at computing pi, but a learning exercise for someone who just found out about Monte Carlo methods.

Regarding the randomness of the problem to solve: A practical application for Monte Carlo methods is integration over a high-dimensional space (with dozens or more degrees of freedom). Traditional deterministic methods have a runtime which is exponential in the number of dimensions, while for Monte Carlo integration, the error of the result decreases as 1/sqrt(N) (where N is the number of samples, which is proportional to the runtime), independent of the dimensionality of the integration space.
(I'd even want to see km/h so it is consistent with continental europe).

Or even, consistent with the country the UK has a land border with.
Immediately means "without executing an entire algorithm".
The line is a 0-measure space: it shouldn't matter in theory but if your boundary is "squiggly" enough it indeed does, in practice.
Centimeter is about 2 grids in a school "checked" notebook. Everybody know after using these notebooks fot the whole education how long exactly that is. No problems with eyeballing. I have problems eyeballing an inch (only used in 5.25 or 3.14 disk sizes and in monitors' sizes).

Milimeter is close to smallest unit useful in human scale - when you try to draw 0.5 milimeter scale with a regular pen, for example, the lines will probably touch each other. You can't cut with regular tools with better than 1mm accuracy, too. Tools are commonly scaled in milimeters, and you can almost use 14 key for 13 screw etc, so no point in smaller units for regular mechanics work either.

Food stuff is bought in "dekos" (dekagrams). You say "10 deko of this meat, 40 deko of that cheese, and 1 kilo of these berries, please". Somehow hektagram haven't caught up.

Land is measured in ar (10x10 meters), hektar (100x100 meters) and squared kilometers for anything bigger. Flats are measured in squared meters (50-300 m2 for most flats).

1 kg of water (and most other common liquids, with precision good enough for cooking etc) is 1 liter, everybody know that and use them interchangeably. 1 glass is 250 ml is 250 g of most liquids and powders, people measure stuff with glasses when cooking assuming 1 glass = 250 g.

There's a joke about this 1 liter = 1kg assumption. When asked what's 10 times 100g everybody answered 1kg except Russian and Polish who answered 1 liter (because shot glasses of alcohol in pubs are sold as 100g).

1 meter is almost exactly 1 step, 1 km is how far you can walk in 10 minutes.

I don't think one system is better than another in everyday usage, except the much easier calculations in metric.
I feel the same way about quantum mechanics.
Haha i seen your post on 9gag
"the user-agent switch involves adding a Safari identifier"

Well, the default user agent string for Chrome already has a Safari identifier in it, but I don't think Safari user agents have a Chrome identifier. The change being made in the post doesn't add a Safari identifier, because there was one there already, but it does change the OS string to Windows. So I think the explanation in the post is probably right.
Firefox + pipelight + UA switcher has been working flawlessly* for me for the last six months or so.

It doesn't work on chrome anymore unfortunately after the update where they disabled NPAPI plugins.

Native support still can't come soon enough.
I'm clearly not as smart as you. How do those numbers imply that the droughts don't need worrying about?
Can the driver-less truck put chains on its tires in the winter?

http://www.onspot.com/
I think this illustrates my point ;) But since when do I get down-votes for favouring the metric system??
I liked it the most from the beginning, though, and would welcome the return to that style.
I can confirm this works on Chrome on OpenSuSE 13.1:

Version 37.0.2062.68 beta (64-bit)
f you are interested. I did something similar for fpga: https://github.com/scottwilson46/FPGARandom
Levenshtein is pretty useless compared to damerau-levenshtein or Jaro-Winkler
Why are Americans scared of the European style of healthcare system? [quora]
Spotify isn't bad.
I'm surprised by the tone of the comments so far. In the article I see a clear parallel between the example teacher doing things right, and the hacker mentality.

Think of it as an overall problem with code - how do you teach someone how to get good at debugging? A more generic version of that question may be simpler, but maybe even harder to answer: how do you teach general problem solving skills?

The teacher in the article was doing nothing less than debugging erroneous logic as applied by her students. Not just for the procedural errors, but for the underlying faults which allowed the logical errors to manifest.

That's pretty hard core.
Silicon Valley and Parachute Journalism
Appreciate that you took the time to personally address a reported tactic. You are doing things that don't scale the right way - tactics are 90% of this website for me at the moment, and they're starting to get pretty arbitrary and frustrating. So to manually filter through them will encourage me, and others in the same boat to stick with Chesscademy.
Which ones? I've never heard it.
thanks for sharing your experience, it sounds like a tough job just to do the job right. do you think the system will get un-broken before we start seeing things like automated trucks?

http://www.vox.com/2014/6/3/5775482/why-trucks-will-drive-th...
The toilets in SF are so incredibly wasteful. I didn't see any dual flush ones anywhere, and the full flush probably 10x as much water as the toilets in Australia.
Show HN: A 40loc stateless wiki engine built using ServiceWorker
Mac Menu Bars
Doesn't display right for me http://i298.photobucket.com/albums/mm249/hrenistic/p5_zps408...

Either on Chromium 34 or Firefox 30 on Ubuntu.
I believe the error should be (roughly) ~ size of f.p. interval at 1 * pi ~ pi* 2^(-32/64), i.e. barely representable. Number of steps would be ~ 1/(error^2) ~ 2^(2* 32/64).

Even giving 50% probability at the line the result would be minutely biased because of many other things involving the discreteness of the floating point arithmetic. A less biased version would have to maybe increase the resolution around the boundary as number of steps progresses.
Why are you assuming it'd be recognizable? They would just take a popular device model and load it up with a different ROM.
I think you missed my point. I know this isn't how pi is calculated, that is completely irrelevant to what I've been trying to say. I also know Monte Carlo has other benefits, and that's entirely my point: the actual benefits aren't illustrated in the example.

what I'm saying is that the entire point of illustrating an algorithm by example is to illustrate the power of the algorithm compared to a naive approach, regardless of whether or not there is a better way to solve the example problem.

i.e., the example should motivate the algorithm.
But computing pi is one of the worst possible illustrations of why anyone would use Monte Carlo, because it's inferior to the naive approach. i.e., it doesn't motivate why anyone would want to use Monte Carlo.
I see, then I misunderstood the definition of "imply X". Thanks :)
Same thing in hillsborough and atherton. The homeowners use something like 400g of water per day on average and I doubt they give a fuck about the drought.

I read somewhere that despite drought warnings, water consumption has gone up 1% this year over last year. It paints a picture as to how environmental california really is, despite it's image.
A lot of men go into unnecessary graphic details most of which are not really useful and unnecessarily objectify the women they review. It would be like reviewing a guitar tutor by describing how they placed their fingers on the fret board or how they turned the pages of their song book.
See my comment here. https://news.ycombinator.com/item?id=8159270
I'd trust the definition of the other people more than my own, since English is only my second language. Also I am not a scientist. It's totally possible that my interpretation of the word "imply" is wrong, which is also what all the other other comments suggest.
I have a fast system (Core i5, SSD), but tab completion is often very slow.

I just checked my `oh-my-zsh/plugins` directory, and there are 173 plugins, most of which I don't need.

Should I purge them?

Edit: browsing through the (oh-my-)zsh files, I can see that it only loads the plugins found in the `plugin` environment variable, so I guess the answer is no. The only plugin enabled is `git`.

My theme is also very basic (git and mercurial status).

Any advice to improve performance?
That's the same as my setup, I don't know how you control the switches but I managed to get an Arduino to control them through the PC:

http://www.stavros.io/posts/control-rf-devices-with-arduino/
Perhaps, if the student had done some rote learning of algorithms, they wouldn't have come up with 1.5 at all.
Yeah, it's worth noting that not-empty is the flip-side to empty (which returns an empty coll of the same type as its argument), as opposed to empty?.
Is that a Canadian Starbucks thing? In English Starbucks I've never had a problem with asking for a "large" or "medium".
I am in awe of the people that have the skillset to dream up stuff like this. I never thought the interference of the processor would travel down the line of a UTP cable.
You should put up a donation link. If more people do that and it becomes common practice to donate to useful open source tools / projects then imagine what more awesome stuff could be created. Many people desire to build tools but don't have the financial support to do so.
Mine. I'm French. We often use soccer fields as a unit of surface.
It be fair, in this case it's pretty clear this was a DARPA funded project.

It would make even less sense for them to have just said, 'oh no, we're busy focusing on other things at the moment' when DARPA tried to start throwing money at them.
I've used Marginalia[1] in the past, which more or less embeds markdown in clojure comments as a sort of literate programming lite. It has the payoff that it can generate rather nice docs[2] but without something like that, I'm not sure there's much benefit to the hierarchy.

[1] https://github.com/gdeer81/marginalia
[2] http://gdeer81.github.io/marginalia/
Simple Solutions Home-page
Really good concept, I have already found some useful productivity apps. Maybe we could throw similar approaches for sharing general configuration tips on HN.
to be fair, that isn't necessarily a misunderstanding of symbols -- if you retested that kid several times, you might find him interpreting 7/12 as 12/7 and 12/7 also as 12/7, on the grounds that obviously you divide the larger number by the smaller number. That kind of "reasoning" is common, but amounts more to ignoring the symbols than misunderstanding them.
> Biology has evolved to use spikes (across many different species).

Those different species didn't independently arrive at their own neuronal implementation, we're all using the same basic pattern (with heavy modifications).

More importantly though, in biology, most cells use temporal encoding - one spike isn't meant to be a binary event. Instead, the frequency of pulses over time is used to encode intensity. The receiving end can then continuously integrate the signal over time. I'm not sure the IBM chip uses spikes in the same way.

> Perhaps evolution didn't get the memo that non-spiking convolutional neural networks is the only architecture worth building.

Temporal encoding in nature is used for the obvious reason of hardware efficiency. If every axon had 8+ binary signal lines it would become unreasonably complex and large, and prone to failure. This somewhat mirrors the design decision in the TrueNorth chip, again for obvious reasons.

However, the two diverge algorithmically. In nature, signal processing is used to transport relative values over the network. The chip on the other hand really seems to use boolean encoding.

You're right about one point though: it's fairly certain that a large number of configurations and algorithms do produce "working" neural networks. Nobody said that imitating our own implementation details will lead to better results than anything else we might want to try.

And in fact, that's the reason why so many computational implementations of neuronal networks do not use temporal encoding, because encoding values in floating points or even integers comes more naturally to computers than it does to wetware. But it is an abstraction that takes up comparatively many resources.
Also, if you're not able to hide thick XLR cables in your home, there are tons of cheap DMX-over-wireless solutions out there, though I don't know how reliable these are in practice.
"I'm simply not willing to pay the price to catch all potentially dangerous UB at build time. "

Huh? The point is the opposite: that UB is apparently explicitly (or maybe implicitly) recognized and exploited for non-sensical "optimizations". So it's not that the compiler should do extra work to catch dangerous UB. It's that it shouldn't do this extra work to then do unexpected stupid stuff. Either not doing the extra work at all or doing something sensible would be OK.
That sort of thing is the whole point of a reservoir. It doesn't make any sense to complain that we desperately need to conserve water because we've actually been getting more than we expected. A rainfall cycle longer than one year doesn't make calendar years that happen to swing low into emergencies.
There is a lot to automate, for example shifting the trailer tandem axles or the 'fifth wheel' to more evenly distribute the weight per axle. I don't know how an automated truck would handle driving across Wyoming with tens of thousands of big tumbleweeds blowing across the road, would the collision-avoidance system be triggered? A human knows what they are and that you just keep going full-speed.

Snow is another issue. Sometimes you can safely drive through snowdrifts at speed and keep going. Sometimes it isn't a snowdrift at all, but a car covered in snow and abandoned on the highway, and the only way to tell is to approach slowly and look for an antenna sticking up or something like that. Not an everyday occurrence but it illustrates a scenario where human intelligence keeps you moving ahead when an automated system would probably need to stop and wait for human intervention.

Trucking is a huge industry with well over 100% annual turnover, and many individual drivers taking liability for accidents that were preventable. With automated trucks, that liability burden may shift back to the companies who would no longer be able to plead ignorance. It's one more issue to deal with in addition to getting the technology right.
is there a ruby equivalent?
How does New Relic make IIS log useful things?
Spotify's UI is many things, but it doesn't even begin to appear system native.
I work in manufacturing, and one thing I've noticed here in the U.S. is that metric hardware (nuts, bolts, etc.) is consistently more expensive than comparable-sized imperial hardware. I've never received a satisfactory explanation why.
FYI, Toga uses Cassowary as well - natively through Apple's implementation on OSX and iOS, and via a Python implementation of the algorithm (http://pybee.org/cassowary/) for GTK and Windows.
Thanks for those pointers, it looks like he wrote five "nongenre" novels, http://www.isfdb.org/cgi-bin/ea.cgi?18 . I was looking at his time-travel collection, Years in the Making.

Separately, Charles Singer edited a 1950's History of Technology encyclopedia which is well respected: http://www.hyperorg.com/blogger/2013/07/28/the-history-of-th... and http://www.amazon.com/review/RG20DEV8YLX39/ref=cm_cr_rdp_per...
Also the Internet of Things portal from Eclipse mighht be interesting. It shows other brokers and client libraries
http://iot.eclipse.org/

I think I might go with mosquitto and see how many simultaneuous connections are possibke on ine machine. Otherwise RabbitMQ with MQTT support might be an option.
mosquitto ajd RabbitMQ can cluster brokers, which you might need to scale out.
Statistical correlation (revealed by some statsistical test) is one thing.

The common meaning of correlation is close relationship embedding some causation in it (A implied B or B implied A or the same thing is the root for A and B).

You can find that two series have high correlation (statistically), whereas this happens just by chance.

OK.
So what is going to prevent the US from just serving NSL to everybody in the paths of the emails? They already read all the network traffic anyway.

Freenet works substantially the same way, with routers not knowing the end paths and endpaths not knowing the sender, but it is build for file transfer - something where you would think the average person has an interest as it would prevent nasty letters from RIAA - and it hasn't taken of. Why should this?
Which organic certification are you referring to which allows the use of neonicotinoids? Looking through the Australian ones it doesn't appear any of them would allow the use of neonicotinoids[1] but I have the feeling I don't know enough about it to say so conclusively ...

[1]http://www.daff.gov.au/biosecurity/about/contact/aco
I store the fingerprint and URL to fetch my public PGP key in a DNSSEC protected DNS record. It's called PKA:

mike@blob:~$ dig +short txt mike.cardwell._pka.grepular.com
"v=pka1\;fpr=35BCAF1D3AA21F843DC3B0CF70A5F5120018461F\;
uri=http://grepular.com/0018461F.pub.asc"
mike@blob:~$

My HN profile is GnuPG signed. You can automatically fetch my key using my PKA record and verify it by running it through the following command:

sed 's/^[ ]*//'|gpg --verify-options pka-lookups --keyserver-options \
auto-key-retrieve --verify
People would judge a guitar teacher on their finger placement and general technique.
Πως να δημιουργήσετε μια λίστα με 1.000 email – SEO | WEB DESIGN
int lookup (int *COUNT(array.length) array, int index) {
return array[index];
}

Shouldn't there be an assert(index < array.length) in there too? Looks a bit half baked to me otherwise.