skysight-inc/HackerNews huggingface dataset:
But this is an excellent example of where Shape can have concrete code in it though. is_inside is true iff the shape's bounds are inside the rectangle. So assuming you have a means to test rectangle bounds:

bool is_inside(Rectangle enclosing_rect) {
return enclosing_rect.contains(this.get_bounds());
}

Now you don't need to implement cookie cutter is_inside methods everywhere, but rather the simpler get_bounds(). In fact, you can add is_inside after all your shapes are implemented and it will just work, as long as they have get_bounds.

Maybe you want to add some sanity checking to make sure bounds never have negative width, so you implement get_bounds() in Shape, and implement get_left(), get_right(), get_top(), get_bottom() in the child classes. Now you don't have to add cookie-cutter assert(left < right) stuff everywhere, just in one place.

Other similar ideas: if you write an "intersects(Point)" method on each shape, then you can pull a concrete implementation of sampling-based area approximation up to the base Shape class, and leave analytical area calculation to the children. This is useful if you are working with distance-field, parametric or noisy shapes, for example.
> This is actually modern day slavery

Yes, it is. And contrary to the assertion of the article, this sort of thing happens pretty much in every town in the US.

If you owe the court money and you don't pay ... you'll be thrown in jail. Can't pay the fine? Jail. Behind on your alimony payments? Jail. The government always gets paid.

The worst part is that the people who get caught up in this are not exactly model citizens. Not exactly a clear case for sympathy.

Regardless, debtor prisons are barbaric, period.
The United States did not invent the idea of intellectual property.
Can someone please explain to me in a bit more detail what the advantage of not having named functions is?
Geolocation, specifically GeoJSON. That's the main reason why I chose it (I started working on my app while it was at 2.0). When 2.4 came out with better geospatial indices (albeit basic compared to PostgreSQL+PostGIS) and GeoJSON support, I moved to using GeoJSON, and I am happy so far.

The website/app is at https://rwt.to , and an example route search is; from "Milky Way, Johannesburg" to "O.R. Tambo International Airport".

I should note that I've had a look at geocouch and it didn't fit my use case, I'm not doing trivial 'find my 3 places near [y,x]' queries, but am traversing a pseudo-network of routes to calculate directions. Neo4j also wouldn't have worked in my case. TokuMX is based on MongoDB 2.2 as far as I'm aware, so them too.
I think the key point they're missing is that most tech goes through a "hype cycle" of unreasonable expectations followed by a crash followed by slow, steady, solid growth[0]. That's the same trend at play here: it's not that the dotcom-bubble ideas were categorically idiotic, it's just that many were premature and overhyped. Now, a lot of those ideas are being done right, and people with a weak grasp on the underlying tech can't tell the difference.

0. http://en.wikipedia.org/wiki/Hype_cycle
Selfies Are Far More Dangerous Than You Think
In London, Parkour Generations runs kids parkour classes (http://parkourgenerations.com/class?classtype=youth). While they do have dedicated gyms most of the classes are still run outside, in keeping with the general philosophy of parkour. A lot of what is taught in these classes is not specific physical techniques but instead how to be aware of your own limits, how to push your limits safely and how to deal with fear. The effect on the confidence and maturity of the kids is incredible.

The general feeling of a lot of traceurs is that not only do padded floors and crash mats not keep you safe, but that training only in 'safe' environments makes you dangerously complacent. Soft landings disguise lots of dangerous habits and it only takes an awkward angle or a turned ankle to turn that into a broken bone. Anecdotally, my only parkour injury occurred in NYC where (thanks to the wonderfully friendly NY police) I spent a few months only training indoors in a padded gym.
Haskell's biggest win is the power of its type system, including its ways of getting types places other languages simply can't.

In C and Python, "a statement" is a different kind of thing than "an expression". Statements don't "have types" - the expression that makes it up may, but the value winds up discarded and the type doesn't matter (except maybe to produce a "unhandled value" warning, if you've set things up for that).

In Haskell, statements are just another kind of expression, and the types of those expressions determine how they get chained together. This means I can leverage the type system to help me avoid new kinds of errors - want to be sure you don't try to do I/O in an STM transaction? Or access that variable from the wrong thread? Or... In Haskell, that's straightforward. In C, that's not something you can express and you have to check it all by hand.
Any. (Maybe not something as simple C or Go, and nothing like Agda, but something like ML or Java or C++.) There is something wrong with the grandparent post, because it's not making an argument that distinguishes Haskell from other statically typed languages.
Alameda has piss poor public transit connecting it to Oakland. Plus the opposite side of the Oakland Estuary is Fruitvale, not exactly one of the more desireable areas to live in.
Jesus Christ. Death threats? Harassing phone calls to their families?

I mean, I understand that a lot of the community supporting them has a visceral hatred towards Facebook. I don't share the negative response towards Facebook's purchase of Oculus, but I certainly understand where it's coming from.

But death threats? That's insane. What is wrong with these people??
That kind of depends on your background. I think that this book is recommended in some OS college courses as complementary reading since it describes a full blown OS and not some simpler OS that might be better suited for teaching purposes. You might want to find some OS college course that has materials available online, work through that and read this as you go along or when you are done with the course.
Death threats are obviously inexcusable. This shouldn't even have to be said.

But this is a classic PR strategy. When you do something that makes many people very angry, all you have to do is wait for someone to say something incivil. Then make headlines with whatever it is they said.

Then the message shifts to how you've been wronged. And any time anyone complains or argues against what you did, associate the critic with the death threats and demand that they distance themselves from them. At this point there is no way for the critic to be heard again, and the line of inquiry is broken. Either they halt their criticism and turn to apologizing for something they didn't have anything to do with, exactly as if they were responsible - or they can be effectively smeared as supporting or even responsible for death threats. If not that individual, then whatever group they are part of can be effectively stereotyped as vicious animals who make death threats.

For example, this is what the Adria Richards people did when it became apparent that their case was controversial and Richards' actions were subject to criticism: they changed the subject to death threats, and the conversation of the original event never really resumed.

Actually, nobody really even has to say anything incivil in reality. It only has to be plausible that SOMEONE might send a death threat. (This is ALWAYS plausible; there are so many crazy people out there.) Then it's easy to claim or fake the evidence.
This discussion is getting a little bit more political than I would have liked it to.

I responded to another comment in a little more detail:

https://news.ycombinator.com/item?id=7498742

Maybe you'd like to take a look.

I'm not trying to make a statist or anti-statist argument (apologies if I am putting ideologies in your mouth.)

My entire point is that this is the best system that we have, given all the other alternatives. Experimental validation is incredibly expensive, and it really boils down to whether or not you think that private companies will risk billions of dollars in time and opportunity cost when other parties can rationally choose to "strike last" or "invest last." It's more of a game theory argument than a political one.

It's certainly possible that there are solutions to this that don't involve patents. We just haven't thought of one yet. Patents have all kinds of other undesirable baggage that people want to get rid of. If we come up with a better system, then we'll do it.

In order for our drug discovery process to continue if we abolish patents tomorrow, the following has to be true:

Pharmaceutical companies will still find it rational to stake money on clinical trials that may or may not yield the results necessary to ethically bring the drug to market. And they must still find it rational to do this while knowing that another rational company can just wait to hear the results of the clinical trial and just sell the drug effectively for free.

If you disagree with that paragraph, and more specifically, with what I said in the comment I linked, I would like to hear what you have to say.

I am open minded and I'm a little bit hurt that you are casting me off as having an unquestioning belief in any system, let alone one that I think is just barely good enough given the alternatives.
To be fair, if the place you're trying to debug is not evaluated (be it due to laziness or because it's generally dead code) that should be a pretty strong indicator something is wrong.
Yeah that definitely helps clarifying the issue, I think.

As long as Openstack only use Apache licensed code >>from MondgoDB Inc.<< and diligently avoids using any open source contributions from any community contributor to the MongoDB ecosystem, then you remain compliant the your CLA.

I wouldn't have known the APGL licensed database and the conflict with MongoDB, Inc. licensed code and community code. I guess now all ORM built upon pymongo used in commercial settings is that trouble zone then?

This is a huge bummer. Definitely an alert for those looking forward to use MongoDB at commercial settings as parent said.
Public money saved him.
I think the cost of medical care was probably cheaper, the liabilities less. I was a kid then so I don't actually know.
Your Javascript example is a bit contrived too. How about:

foods.filter(function (e) { return e !== 'chocolate'; }).forEach(eat);

Regardless, I disagree that the Coffeescript example is more readable. My brain is much faster at parsing symbols (`(`, `{`, etc.) than english words.

With your JS example, without having to read the words, I know there's a loop, a conditional and a function invocation. I also know that I can safely add statements after this piece of code without worrying it might break some other function (in Coffeescript, I'd have no way to tell if the implied return really mattered or not assuming it was the last line of a function).

With your CS example, I have no way to tell what's going on until I've read the full sentence. I have to read every word and see if it matches one of the many reserved keywords in order to determine if it has a special meaning or if it's just a regular variable.

In Javascript, you have a few reserved words but the list is relatively short and those words are almost always preceded by a line break or a symbol.

Maybe our brains work differently...
Rote learning and programming
The Essential Leslie Lamport
I don't know anything about how Dropbox or Turtl handle data and when they do their encryption but it would still be possible for Turtl to do hash level checking even with client side encryption. They could just hash the file and encrypt it all client side and then send both back to the server. It seems that this article is insinuating that Dropbox has full access to your data (which I dont know is true or not).
Not picking on this tool specifically but I see these sorts of things posted on HN a bit and I am struggling to understand the appeal. So genuine quesion: I can understand it is a fun task to build but what advantages does it bring in real world use? Is it just a novelty thing or do people use these sorts of tools and if so why and what advantages do they have over ssh/cli?

My sysadmin brain is always looking to reduce the dependencies and the attack surface. Ideally I want less services running on less ports. Less software to install, maintain and secure. As a result I stick to ssh and shell most of the time. Generally any admin tool that has big library dependencies (eg anything python, node.js or ruby) is on my shit list. I am a bit more sympathetic to Go because of the single static exe but otherwise I prefer plain old shell.

I understand historical graphs are nice to look at and time series data is one of the areas where web tools are a win. Though I am probably more likely to look at alerts based on triggers than watch a graph in real time. I don't understand what advantage tables of process stats in html offers over the same in the cli.
Oculus VR was in trouble soon as Sony and Microsoft started to develop very quickly their own VR headsets. There was just very little market let for Oculus VR that mattered. I think they basically took advantage of Facebook with some grand and likely unrealistic vision.

I would be surprised if Oculus VR ever lives up to its vision. Rather we will be using Sony and Microsoft VR headsets in the next decade if VR does in fact go mainstream for gamers -- which is still up in the air I think.
Can you see an argument for how both physical property rights and intellectual property rights are both government granted rights?
> Edit, let me try that point again, because I don't think that was very clear. You may design iteratively, but you're still designing. ... You have more tools than that, so as a metaphor evolution as a designer can be described by a simpler ontology.

I would claim that our process of building things very much follows the process of evolution even if we have the ability to design explicitly rather than perform random mutations follows by natural selection. Our ability to classify things and carry over implementation fits with this way of building. OOP is not just a way of implementing a design, I would say this is actually secondary: its a way of coming up with a design in the first place where you really don't have it all down in your head before you start coding.

This is what so annoys me about Haskell: it works very well when you can figure out everything before hand; in fact, you are expected to think long and hard about your problems because its language abstractions are very unforgiving otherwise.

Haskell designs are then elegant out of necessity, and this is very limiting when you just need to get something done (aka worse is better). OO implementations are typically over-engineered and less elegant, not because OO thinking is somehow defective, but because elegance is not required to encapsulate complexity and just get something working.

> My point there was that if you had choose one axis on which to classify parts of your code, implementation details wouldn't likely be it. A fool's errand in general, I suspect, but at any rate not possible under the class inheritance model (single or multiple).

Implementation details provide the strongest signals of similarity than artificial interfaces. If you were going to let a DNN or RNN classify your code, it would probably be along this axis as well as with how the code was actually used.

> That you have to choose is a consequence of the strict single-inheritance model here.

I rarely let myself be constrained by single inheritance, even when I'm coding in C# I have my mixin patterns handy (ya, more boilerplate, but I can type fast; all my own languages support mixins).

> Completely classifying a software abstraction is identifying the point n-dimensional space that describes it in terms of all the different ways to categorize it.

I agree, but if we aren't limited by single inheritance (say linearized multiple inheritance via mixins...or gasp...aspects), then this argument no longer holds.
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?
data Foo = Foo
{ bar :: !String
, baz :: !Int
}

This is actually a great illustration of why "making data fields strict" is a lot more tricky than it sometimes looks. All that

> bar :: !String

is going to get you is the first cons cell in weak head normal form.

If my string is "Hello", then in unevaluated form I have

<THUNK>

Using the strict data field gets you weak head normal form, which is

<THUNK>:<THUNK>

Probably not what you had in mind. As far as Haskell is concerned those two thunks might be

undefined:undefined

Using a strict Text will get you where you want to go, because when you reduce that to weak head normal form you will get a fully formed Text.

Watch out with lists, which is all that a String is.
I forwarded your comment to the right people in my company.

In the meantime have you tried to ask these kind of questions in http://reverseengineering.stackexchange.com/
Working excessively long hours has obvious negative impacts on a programmer's performance. If you do it constantly, instead of being considered a hero you should be considered a liability. Would you board a plane with a pilot who flies, say, 300 hours a month

I am fine with chasing a bug for hours every once and then or to extend your schedule when your muse pays you a visit, but if you do it so frequently that it starts impacting your performance negatively, you should stop out of consideration for your colleagues.
The Haskell compiler will complain if I am writing wrong Haskell code, or more generally when the types are indeterminate and can't be inferred.

This not the same as 'wrong code' in the abstract. The code will run fine if I don't pass in mismatched data, or more generally bad data. And if I am passing in bad data, static typing doesn't give me good answers, it just keeps the program from crashing. Don't get me wrong, there are times when crashing is bad. But there are times when the cost of a runtime error is nominal and the value of flexible code is high.

Static typing trades one type of cognitive overhead for another. The Java program of 500 classes is its manifestation.
Is the U.S. stock market rigged? [video]
There's a difference between assigning an anonymous function to a variable and declaring a named function. It's the difference between:

var funcName = function(){}
function funcName(){}

The problem is that using named functions involves nuances that can be confusing. Generally it's considered idiomatic to just avoid named functions altogether. You can read about some of the nuances here: http://kangax.github.io/nfe/
Interesting. I hadn't considered whether anti-discrimination laws would constrain him from expressing his political opinions at work.
Yep. If they're really receiving death threats, that's something they take up with the authorities. Articles like this are just a transparent attempt at getting brand sympathy. They do nothing else.
Bradley Voytek: The Importance of Knowing One Thing
One of the biggest perks of Haskell is that it has a very good static typing system.

I wrote a blogpost awhile ago on the benefits of such a typing system, it's kinda long but you might find it interesting:

http://bsamuels.net/blog/2013/11/20/StaticTyping.html
If you want a proper laugh: re-share an "internal" rip from a private tracker on a public one without sufficient identifying meta-data, and watch some fool jump up and down because you've stolen his hard work without credit. His hard word of course being to steal someone else's hard work... To some (many?) everything they do is fair, and everything they don't like isn't (even if what they don't like is exactly what they do themselves).

Not that I would know anything about obtaining copyright protected materials in that manner, of course. A friend told me about it, honest...
exercism.io isn't bad either
I'm not surprised. I quit playing multi-player online games (Starcraft) because of excessive violence threats and verbal abuse. It's an unfortunate side effect of the gaming community, and I feel the Oculus appealed to that community.
No. At least that's not how rights were seen by the authors of the US constitution.
Then how about we call it "oversensitized" or "embrittled" instead of "hardened"? They are far more fitting terms for what you just described.

Not only is the "Colonel Jessup hypothesis" total baloney (note how the deputy at the end saw what happened as the mark of a rookie), but accepting it glorifies moral failure and belittles the efforts of officers who have managed to develop a thick hide along with the integrity to judiciously wield the authority they have been given.
I don't disagree. For the most part biotech investment outcomes are binary. You either win or you lose (there are some exceptions).

And since it typically costs $5-10M just to be able to test your drug in the first human, when biotechs fail, they fail hard.
I know I'm not the typical reader, but there's literally no single article or video that will ever get me to install an app to read it.

I wonder what their conversion rate on this is.
It's pretty embarrassing for them that their response is incredulousness. Facebook is largely regarded as a necessary evil by many people, especially technical folks, and yet these guys are surprised that people might worry that you'll need a Facebook account in order to use it? Or that Facebook will insert some microcode or firmware doing satan-knows-what and requiring authorization for any usage? That's not paranoia or irrational hand wringing; it's exactly the kind of thing these folks are up to because their business model isn't charging for a service, it's selling people's information to other businesses.

But death threats are not acceptable. I just wanted to respond to my shock at learning the Oculus guys were so surprised. Clearly they do not understand how Facebook is regarded outside of some wine parties in the Valley.