skysight-inc/HackerNews huggingface dataset:
It's hard to implement generic functors as a protocol without either runtime code generation or generalized dynamic dispatch.

The typical efficient implementation of a protocol (aka an interface) is a vtable - an array of pointers to functions. When you instantiate a generic in a statically compiled language, that usually clones the body of the generic thing (method or type) with references to the generic parameters replaced with the type arguments; and the new, cloned body is handed off to codegen.

But if you instantiate via a protocol reference, the compiler doesn't statically know the implementation of the thing you're trying to call - it can't see the body of code to clone. It's an indirect function call through a variable, and without a restricted language, analyzing it quickly runs into the halting problem.

With runtime code generation, the problem can be solved with sufficient magic - the runtime can rewrite as necessary. That's how .NET implements this.

Alternatively, if the body of each generic method is compiled using some form of dynamic dispatch - e.g. every operation on a value whose type is a generic parameter is done via an table of function pointers, and this table is passed into the generic method at the point of every call - then it can work, at some cost in speed. Haskell works like this, AIUI.

Java does it even more simply, with full-fat dynamic dispatch - all generic parameters turn into Object, and method bodies get runtime casts inserted as necessary.
Like most Americans, you think it's all about money.
He never 'evolved' though. It says right there in the article, he never articulated a change of heart/mind, just that he was sorry he offended anyone - the ultimate non-apology, apology.
"Even better, a majority of Biology degrees in 2012 (58%) were earned by women."

Why is it "better" that men are underrepresented in a particular discipline of science?
Poster un nouveau sujet
"As property listing sites go, Airbnb did not produce any true innovation."

Strongly disagree. As an Airbnb host (I rent out my master suite on Airbnb), there simply wasn't a site where I could do that before. Craigslist? Forget it--spam heaven, and no calendar or payment system. And VRBO has always been designed for "vacation homes", not "rent a single bedroom in a house you occupy" (which is why I use Airbnb.)

I live in Austin, and Austin has responded to Airbnb by making hosts pay hotel tax, and requiring us to register with the city. While an inconvenience, I'd rather do that than not be able to make extra income renting out the room. I hope San Francisco can do something similar (and I really hope Airbnb builds this into their site so I can stop filing paperwork and mailing paper checks every quarter!)
Landing pages like those are becoming the new 1999 restaurant website Flash intros.
Had the same problem, typically adblock / ghostery blocking social networks buttons...
I can't really think of a scenario when DDOSing would be responsible policing. If that kind of tactic becomes common it can set up the exact type of aggressive struggle we don't want a 51%er in.
It's not odd that Haskell didn't have them in 1.0, because they were not conceptualized until '93[1] after the Haskell report has been published in '90. They made it into the Haskell report 1.3 ('96)[2].

We should not be comparing the development of languages now to 20 years ago - there is an enormous amount we have learned, and these insights should be fundamental considerations when designing a new language. You can't just "tack" things onto an existing language and expect it to be elegant - tacking on leads to huge languages like C++.

And yes, we should expect it as "normal" for new languages, because it is what people have come to expect to have available - although some implementations leave a lot to be desired.

If we consider how C# implements Functors for example, we see that it requires special language support, where the compiler essentially pattern matches over your code, looking for a method named "Select", with a specific signature taking a generic type and a func. This implementation completely misses the point that Functors themselves, while useful, are not special - they are a specialization of a more general concept we have - typeclasses and higher-kinded polymorphism. C# also adds the ability to create Monads, Foldable, Comonads etc, using similar patterns - but you can't create your own typeclasses, and are left to the language designers to add a desired feature.

The decision to add them onto C# like this was made not without knowledge of this, but out of consideration of working with the existing language, which was designed without their consideration, hence, why they're a pretty ugly design compared to the simplicity of Haskell's implementation.

[1]:http://www.cs.tufts.edu/comp/150GIT/archive/mark-jones/fpca9...
[2]:http://research.microsoft.com/en-us/um/people/simonpj/papers...
Still confused how considerably smaller sites, Path, Quora, Foursquare, even Airbnb, can be raising more money than GoDaddy. GoDaddy has to make more money than all those businesses combined, yes/no?
I think it's more likely that people disagree with your literal reading of the original statement. The money that Apple makes from iAds doesn't matter – there's certainly no indication that it drives policy, which was the subject under discussion. Responding that it's not exactly zero doesn't add much to the discussion.
How does it work? The only word they use for it is "magically".

So, you actually invented magic, and of all the possible things you could do with it, you chose this?
Somewhere in the depths of Bluetooth Proximity Pairing, I remember seeing this. As part of the standard, not as a random startup with no influence on industry.
This isn't technically true. AirBnb likes to claim their hosts operate within the limits of the local laws. Even if you're not doing a full-time hotel, if you're a renter yourself you're almost certainly at least breaking the terms of your lease, and local SF law already makes renting a unit out for < 30 days illegal. AirBnB's make believe universe is about room sharing and couch surfing (all of which would be much more legal). But as much as they talk up the "sharing" aspect, >60% of the rentals shown in this article are for entire units, none of which is legal under current law.

You can still defend the practice by saying you don't agree with the law. But AirBnB can't claim they expect their hosts to all abide by local laws when in this case it's clear that a majority of their hosts are not.
Breaking the back button should be punishable by a day in the stockades with the entire village throwing rotten tomatoes at you.

Maybe someone else finds it cute. I didn't.
>all-but-stated goal

Why do you keep using that phrase? You don't get to judge a company's achievement of goals that you have ascribed to it. Or, you can, but to do so is nonsensical.
The key is to have no ego. That makes any question of significance insignificant :)
DHH won his class (GTE-Am) at the 24 hours of LeMans.
Swift. All the code will move to Swift eventually, I predict that new APIs won't even be callable anymore from Objective-C in the future. I'm going to write all my code in Swift from now on.
Nathan Myhrvold appears to be a co-founder of Intellectual Ventures.
Which social media platform is best for your business
Question: I've seen at least several succinct versions of programs written in Haskell. Would people say this is a benefit of Haskell? Just skill on behalf of the coder?
How To Use Nginx as a Global Traffic Director
I see all these languages as tools in the battle between the big companies. Each language serves the purpose of the power behind it. See my review of this list here: http://tracks.roojoom.com/r/11224
Turbine
The whole Game Theory element the bitcoiners keep throwing around surprises me the most. It's not as in you can apply game theory like that in practice. It also assumes rational players. People are anything but rational. Game theory works in numbers, but not on an individual level like that. Besides, there are plenty of profitable avenues if you control 51%.
Except, now Uber/Lyft has vastly increased supply and is better for drivers.
It's very similar to companies that hide their entire page between a modal dialog until I sign up or sign in with Facebook. This forced method of handing over my information generates zero trust in me. In fact I think this is very slimy. What don't you demonstrate your value to me first before I give you my info.

Earn my trust.

Don't just claim something. At least give me SOME proof of your value before asking for my info.
Taken for granted: Regression tests
Dupe: https://hn.algolia.com/?q=ikeahackers#!/story/sort_by_date/0...

Also, please re-read the HN guidelines. They ask you not to editorialize in article titles.
This seems to me like an extreme "first world" problem?
Tragedy of the commons. It may be bad for bitcoin as a whole but it's beneficial for that single miner because bigger pool means less variation of miner's income.
'Page not found' for that URL.

This one works though:
http://www.nytimes.com/interactive/2014/06/15/style/tmagazin...
Although this is the weirdest, most out-of-place comment I have seen in a while, my life has taught me that "it's all about money" is the safest position to take in almost any scenario. That is potentially a product of our cultural and economic structure, but I have observed it to be true worldwide; I don't think we are wrong in general.
So, this may simply be a massive gap in my understanding of theory and PL stuff. :)

My reasoning is that an inheritance-based language has some notion of "A extends B extends C", and so if I need to check compatibility of types I can just walk the class hierarchy and get an answer.

I'm clearly missing something--maybe I'm just using the wrong mental model for types?
As a matter of fact I have seen feminists address this frequently. A common interpretation is that Patriarchy has "feminized" professions such as teaching and nursing, because they can be seen as "caretaker"-type jobs; and consequently, have left the occupants of these jobs underappreciated and underpaid. The feminist manner of "fixing" the gender gap in these professions would be by deconstructing Patriarchal social perceptions of these fields.
I think you could make a similar argument for YouTube, but I personally find all of these services to be tremendously valuable and I'm glad that they are working to evolve the law.

Laws are written and interpreted within the context of old, established businesses. Innovation will inevitably produce a certain amount of tension with those old laws. One approach for to dealing with this is to ask permission / change the law first, but that will usually fail because the incumbent businesses generally don't like change (imagine trying to get Hollywood's permission to launch YouTube). The second approach is to move forward within the spirit of the law, deliver genuine value to consumers and society, and then work with legislatures and the courts to develop improved laws and understandings of the law.
"excessive pessimism" stopped reading right there. All credibility lost.
I think you do have to learn a bit of the basics of Objective-C. The sole reason being that most of Apple's frameworks are currently written in Objective-C, as well as most tutorials and example material. You'd have an easier time converting Objective-C code to Swift code if you understand the basics of Objective-C. You'd also have an easier time finding solutions to problems on sites like StackOverflow, which already has a wealth of Obj-C questions and answers.

But in the end you don't have to become an Objective-C pro. Once you feel comfortable using the language, you could start focusing on Swift.
The difference is that in a lot of cases, there are kind of a "hard cap" for demand that can't be increased easily without a lot of factor (accountant, lawyer comes to mind). However, I believe there are certain professions where if you're only concerned with the superstar level, the sky is the limit (demand-wise): there are no artificial (market) cap on the value you can added to the society.

That is until human is immortal, energy is unlimited (to a first approximation), and/ or the Singularity happened.
"is how the true innovation they did was bypassing laws"

Hollywood started in the West Coast so they could be far enough from Edison and his patents

A lot less MP3 players would be sold if only legal songs were allowed to be loaded

But more importantly, a business goes deeper than a nice website. AirBnB built a business using a website, as opposed to several cases where a website is built and the business comes after (not saying it's wrong)
Thanks, that was intersting.
Ubuntu has a package 'unattended-upgrades' that will automatically pull and apply many kinds of updates.
Neat! I also cloned 2048 in Haskell [1]. I don't know how many lines of code it is, but the core game logic is remarkably simple.

[1]: http://taylor.fausak.me/2014/04/28/cloning-2048-in-haskell/
Apple GUI development is obviously a major constraint. Another is: no GC in order to avoid the collections happening when they want and thus making the smoothness of the UI impossible.

I still claim there isn't at this moment any more innovative language that can provide that what Swift provides, observing any GUI platform you want to observe: meaning that level of support for the platform's native GUI with that performance and elegance.
I'll chime in here that I witnessed a long time friend who has a family with a history of mental illness go down this road. For him all it took was one LSD trip. My personal position is that psychedelics are the "going nuclear" of the substance space. They are not toys and hold the power to create and to create awe inducing destruction.
Here's the original HTML form, courtesy of the Internet Archive: https://web.archive.org/web/20060304194444/http://www.dyingd...
I think worse than that I have no idea of how this service works and what the security implications are, and that specifically makes me hesitant to sign up.
So far as I can tell NAT for ISPs is brought up pretty much every time that IPv6 is mentioned on HN.

And every time people point out that it breaks the fundamentally decentralised nature of the internet and makes it harder to run P2P services.

And also, pretty much every time someone mentions unused blocks, and someone else points out that even if we reclaimed the largest known blocks that aren't publicly routed this would only expand the timeline for a few months.
Anybody else getting flashbacks to Fallout New Vegas?
Wait, it's wrong to correlate pool size with steady income, but the simulation correlated pool size with steady income? If you need a few percent to guarantee steady income the base assertion is not wrong.
Can anyone explain the advantage of macros like this, rather than just using an `inline function`?

Is it because C doesn't have generics?
So if you brute force http://getwifi.io/XXX you get everyone's WiFi passwords. Great idea.

Also check out my version: http://getwifi.io/whatyouwritebelow

Also: delete this site.
How is it possible that although this post gets only negative comments it still gets to be 3th post on front page?
If everyone considers this service to be bad, then it shouldn't even get to the front page.

I don't have anything against this website, but I've seen this stuff happen before and I don't understand it.
I am not a huge fan of PHP, but you can do some useful stuff to XML using the PHP command line tool, provided you have the right libraries installed. I have run into situations where the package manager on a machine I'm using doesn't have an up to date xmlstartlet or xmllint, and have tidily gotten around this problem using PHP.
Anyone who played the web version (as I did) knew it was special. Now not all special games become hits on mobile, but it's not actually all that surprising.
Objective C. When you need to figure something out, and Google returns 1,000 tutorials on how to do it on Objective C and nothing for Swift, you'll know why.

Sure, Swift might be better. One day you'll probably learn it. But 99% of the effort in learning Objective C is learning all the frameworks and libraries, and the support to do that is much better in Objective C (at present).

If you already know Objective C, and a looking at starting a new project, Swift might be better. The lack of Swift-specific resources won't hurt, because you should be able to easily translate them from one to the other. But if you don't know either, I'd start with Obj-C.
Not knowing either, I would say Objective-C. Way more tutorials, SO answers and you don't want to be dealing with compiler bugs when you're trying to learn. In a year the answer will be Swift.
Supply and demand is not the only actor at play in employment. Otherwise, you wouldnt need minimum wage, or laws of any kind to protect employees (or businesses) from the other side.

And also, in the particular taxi-driving business, the problem is not supply/demand of drivers, its of city permits to be a taxi driver. Drivers working for Uber/Lyft do not take the same abuse as taxi drivers.

The taxi business is a racket, made by people that took that business, got an advantage in that time, and could make laws to their own benefit.
Uber found a loophole in those laws, and got to be a winning player in that market. And now, they are going to be one of the actors in redefining the new set of laws regarding this,
I think you have not read my post carefully. I was clear in separating believing in discrete categories (both their objective existence and their usefulness), vs believing that symptoms can be treated.

>Labels do serve some use. But many people hate having the label and they hide it. Stigma is still very strong. For all the people who are open about their diagnosis there are many who keep it secret -- or who do not seek treatment because they are scared of the stigma.

You've ignored my argument regarding why people seek out labels, apart from their therapeutic usefulness. I did also state that these labels have a stigma associated with them, but I made a claim, that you haven't addressed, that the stigma of the symptoms in the absence of diagnosis, may be greater than the stigma of the label.

>Depression is not just sadness. Imagine your favourite show going off TV. You may be sad for a while. You probably won't feel as if it's your fault it's come off air, nor that there is never going to be anything else worth watching, and the feelings won't be constantly with you throughout the day and probably won't last long.

It is this sort of claim, that I was asking for evidence for. I agree that a person might feel all these things, and that it might be reasonable to label this cluster of symptoms as "depression". But you are taking it much much further, and claiming that this is in contrast to ordinary experience, and not an extreme part of a spectrum. I can guarantee you one things: every person on earth has experienced much more significant sadness than their favorite TV show going off the air, and when they experience these things, the result is going to be much closer to the symptoms you associate with depression, than to "being sad for a while".

>I find it vaguely offensive when people suggest that feeling bad enough to overcome the human inante desire for self-preservation is somehow a normal part of the human experience. A broken leg is not shameful, happens to many people, but is not normal.

If you are offended because you thought that I was implying that nothing should be done to help people who were in a state of mind that was so terrible to be in, that they preferred suicide, then you misread my post. If you are offended because I didn't draw a line in the sand separating such people from everyone else, because you find it offensive to the human spirit to suggest that, absent a very specific disease, a person would ever find themself in this state of mind, or anything resembling it, then I would answer that human nature is what it is, not what we want it to be.

>You also call cancer "real". That kind of attitude (here's a list of real illnesses, and here's a list of psychological illnesses) is really harmful.

That is not what I said. I never claimed that people should not seek help, or otherwise try to address the symptoms of mental illness. What I said is that cancer is different from depression because cancer is a discrete category. People don't fall on a spectrum of having cancer, and whether or not a person has cancer is not at all subjective.
I agree with your remark about the relative and absolute comparisons.

However, in this case, the discussion were about the "popularity", or the "reach" of bitcoin. The underlying assumption (by me) is that absolute value would strongly correlate with the number of people knowing about bitcoin, hence the absolute number remark.
A Survey of C and C++ Software Tools for Computational Science (2009) [pdf]
I really enjoyed ArcElite back in the day. oOlite actually looks worse a lot of the time :-(
I highly doubt that actually. Swift is not a replacement. There will always be glue between Swift and platform and system APIs. Swift only interoperates with Objective-C and (to a limited extent) C and not C++ (and a lot of APIs in Apple world are exposed as C++ especially on the Mac). Swift uses ObjC blocks and can't even handle function pointers. Unless there is a dramatic shift in the design of Swift, I don't see the writing on the wall that Swift is out to kill Objective-C, only complement it.
Project Euler offline, "database may have compromised"
http://projecteuler.net/ has been taken offline. Full text:

"Due to the discovery of a serious security issue a decision was made on Sunday 15 June 2014 to take down the website. The full extent of the issue is still being investigated but in an attempt to be as honest as possible to our members we must make you aware that we have reason to suspect that all or parts of the database may have compromised. Passwords at Project Euler are strongly encrypted using a one-way hash, but if you use the same password at other websites then it is strongly advised that you change it. We are extremely sorry for this inconvenience. At this time we can provide no more information and there is no indication when Project Euler will return."
Haskell and Scala both seem to have survived adding it later. Rust won't have it by 1.0 either, and this never seems to come up in threads about Rust. I agree it will be a nice feature, if/when it comes. I just think Swift is being held to a higher standard because, well, Apple.

By the way, thank you for the timeline for Haskell. That's exactly what I was wanting to know.
"Because some men aren't looking for anything logical, like money. They can't be bought, bullied, reasoned, or negotiated with. Some men just want to watch the world burn."
Hm.. Is this similar to my service, www.GetOnMyWifi.com?

I generate a QR code that when scanned with an iOS device, will push a mobile provisioning profile down to the device and log them onto your wifi.

Edit: Yep, looks like a different implementation of the same 'trick' :)
I think it is because of the general "you go girl!" perception in modern American society, where most things that showcase female achievement are celebrated, no matter what their far-reaching implications are for the rest of society. This manifests itself in numerous ways, including this one.
In an alternate universe where functional programming was invented by programmers rather than mathematicians, map would probably be called something like convertWith and a functor would probably be called something like a convertible.

If you think of a function as being a way of converting from one kind of thing to another, then a functor is an object which has a number of things which you can convert to some other kind (a number which may be one or zero), using a method of your choice, and map is the name of the method you use to do that.
Towelroot by geohot – root for S5 and other android devices