Better HN
topnewbestaskshowjobs
Log inSign up

papsosouid

2,420 karma · joined Apr 9, 2012 (14y ago) · 1,199 submissions

Submissions

comment 14y ago · link · parent

>Bools are special too because the compiler handles ensuring that they are true and false (and you don't even get to choose to representation).

No they aren't. You are assuming every language is as shitty as Java. This is not the case. There is nothing special about Bool, it is a normal ADT:

    Bool = True | False
>How would you handle a real complex type like Customer or Order or Window or Button?

Defining a type for it, just like anything else? I don't understand what is confusing you here. Do you normally just keep your Customers or Orders as a hash table of string:string or something? Even in OO languages, you create a type for them, it just happens that the only way you can create types in most OO languages is making classes.

>Yes, it does. It's effectively the DRY principle -- you can't repeat the data manipulation code throughout the codebase

Yes you can, there is absolutely nothing stopping you from making a dozen different doThingToCustomer functions/methods scattered across a dozen different classes. I am amazed that you are seriously suggesting that the problem OOP solves is people accidentally writing the same function multiple times, when that was never a problem, and OOP doesn't do anything to address it. And how on earth does this bizarre notion address the class of errors you were complaining about, which are type errors?

comment 14y ago · link · parent

Did you reply to the wrong post by accident? I was responding to the post I replied to. My comment should obviously be taken in that context, not as a response to the existence of the "plugin".

comment 14y ago · link · parent

Yes, they should replace the operating system they currently use and are perfectly happy with just because you want them too. Step outside yourself for a moment and consider who those people are, and what their needs are. They don't care about your buzzword3.0 social.ly cloud.io startup's pointless javascript app. The fact that it won't work in IE6 doesn't matter to them in the least, they just use their web browser to retrieve information, a simple task which even mosaic is perfectly capable of. Crashing their browser to try to make yourself feel good doesn't accomplish anything.

comment 14y ago · link · parent

>What about every other piece of data in your application?

I create a type for it? Why do you think RGB being bytes makes it special? Bools aren't bytes, but I can't pass anything other than True and False for a Bool.

>OOP combines opaque data structures with the operations performed on them.

That does nothing to prevent errors. Having the operations require the correct types does prevent errors on the other hand, regardless of whether or not the operations and data are put into an "object" together or not.

comment 14y ago · link · parent

Well that is genuinely impressive then. Please explain to me how the fact that no chemical reaction occurs when beating an egg is in any way relevant, or even related to the discussion, or anything I said. I didn't say beating an egg caused a chemical reaction, and at no point would anyone who has even the loosest grip on reality consider that to be relevant at all.

Had you just suggested that beating eggs is a side effect, and thus not purely functional you would have gotten a response. But when you go so far off the rails that the only reasonable explanations are that you are trolling or insane you shouldn't expect people to take you seriously enough to bother responding.

Yes, beating an egg changes the state of the egg from unbeaten to beaten. Yes, this is a difference, however it is not a difficult to understand difference. I explain it all the time, that's why I used it as an example. "With functional programming, instead of the egg_beater function changing the egg, it takes in the unbeaten egg, and returns to you a beaten egg. If you gave the unbeaten egg a name, you can still use it.". That is easy to understand, which is why people respond with "oh, ok" instead of confusion. This concept has to be understood when teaching OOP too, as generally methods that just change state return "this" so you can chain method calls: egg->beat()->fry(). So proposing that it is some unfathomable difficulty with learning FP is ridiculous.

comment 14y ago · link · parent

I'm now unable to tell if your post is serious or satire. The strawmen are so glaring and absurd that I have a hard time believing you are seriously attempting to use them to make an argument. Chemistry, seriously?

comment 14y ago · link · parent

>do you mean, that someone only knows an FPL and not an OOPL means they are more well rounded than someone who has experience with both.

No? How would you get to that interpretation when I didn't even say anything about this theoretical person, but rather about you?

>For what I do, I cannot afford to work with a PhD student who does not know more than one programming paradigm!

Unless you are doing programming language research, yes you can. Almost everyone already does, it is just that the only paradigm in question is imperative, rather than functional. That's not a significant barrier for the vast majority of roles, especially not PhD students.

>People don't talk in terms of transformations, they talk in terms of instructions,

That's the same thing. People think "beat the egg". Beating is a transformation, egg is a thing. People do not think "send the egg a message requesting it to change itself to the beaten state", which is why the OOP metaphor fails so badly. Functional programming directly maps to the normal way people think, as does traditional imperative programming. OOP does not.

comment 14y ago · link · parent

>But I wouldn't for the life of me take on as an employee someone who knows Haskell but not an OOPL (like C#, Java, or at least C++), that would indicate severe ideological bias on their part.

Ironically, it actually indicates a severe ideological bias on your part, not theirs.

The rest of your post seems like it is entirely platitudes intended to say nothing. No, people don't think in terms of objects, that is why the leaky metaphor used to teach OOP traditionally causes so much confusion, and makes OOP harder to learn than FP. Thinking in terms of FP is not thinking in terms of "formulas", and it appears you are basing all the rest of your assumptions on top of that one faulty assumption. People intuitively understand "I make a thing that transforms other things" much easier than they understand "I make my things know how to transform themselves, or maybe other things, or maybe both, but sometimes neither and I make different things to do the transforming instead, but those things are wrapped inside an "object" that doesn't represent anything for no discernable reason".

comment 14y ago · link · parent

Most would agree because most have never used anything other than OOP. That isn't saying anything interesting. I find OOP to be most often awkward and difficult to express the rules of my application in. Functional programming does it quite naturally, as it is all about creating small simple components and combining them to produce larger components. My rules are simply the combination of smaller rules applied in order.

comment 14y ago · link · parent

As jerf and danieldk point out, your concern is "I want static typing", and has nothing to do with OOP.

comment 14y ago · link · parent

>The nice thing about a language like Haskell, then, is that you have to be really smart to use it

I'm living proof that you are mistaken.

>Actually, many companies put Haskell (or even Scala) down as a requirement just to filter out the low end programmers

If by "many" you mean "a couple", then it depends what you mean by "low end programmers". Asking for haskell is decent at weeding out people who have no interest in learning new things and improving themselves. It isn't particularly useful for filtering out people who aren't "really smart".

>OO is accessible because it is much more naturalistic than FP

It is interesting that you pre-suppose that is the case. My experience with teaching people programming with no prior experience is that OOP is not accessible at all, and FP comes quite naturally.

comment 14y ago · link · parent

No they don't. They have a reputation for taking months to respond to security issues, responding with "yeah whatever, we'll look into it" and then doing nothing for months, leaving software vulnerable to known exploits because "its not patch day yet", and similar bullshit.

comment 14y ago · link · parent

I have no idea what you are trying to say. You don't appear to have read what I said at all. There is no magic "just be focusing" power. You can't just tell people to stop doing what you want, and start doing what you don't want because some random guy on the internet thinks it will make some random software you don't care about more popular. The netbsd devs don't care about making freebsd more popular, deleting 3 of the BSD lineage operating systems won't make a focused effort on the remaining one, the remaining one would still be right where it is now, and the devs of the other systems would simply not be involved. This would be a loss, not a gain, as the remaining system would no longer have 3 other OSes to pull code and ideas from.

You are doing the equivalent of saying gnome developers should just delete gnome and start working on KDE instead. The gnome developers aren't interested in KDE. If they were, they would be KDE developers, not gnome developers. This is the same with the BSD lineage operating systems. NetBSD developers aren't going to become FreeBSD developers just because you think it would make them do better in a popularity contest they didn't enter. If they wanted to develop FreeBSD, they would be doing so.

comment 14y ago · link · parent

It is entirely correct. First of all, they do not serve hundreds of thousands in one install. Second, it doesn't matter. The point is they are individual sites, they are not tied to each other in any way. So lets say they host 100 sites on server X. Now one of those sites explodes in popularity and the server can't handle it all. They can simply move the site to its own server (or a server shared with a smaller number of other sites). It doesn't matter that the data is currently in the same database, as the data is in no way tied to the data of the other sites in that database. So it can be trivially exported and moved to a different server.

comment 14y ago · link · parent

Yeah, that is a hilarious attempt to misrepresent the situation. Notice how he pretends they did it "to strike back", when they actually did exactly what he wants (try to get a number from IANA) and they refused to give them one because "that's just VRRP but different, it doesn't deserve its own number". The right choice was taken away from them, all they could do is use a number that is either used already, or will be handed out later. They chose the least bad option of using the number of VRRP, which IANA claimed they were too similar to.

comment 14y ago · link · parent

It didn't make our life any harder, and using a different number wouldn't make our life any easier. We use cisco, juniper and openbsd, this caused exactly zero problems.

comment 14y ago · link · parent

It isn't a choice between "do it wrong A" and "do it wrong B". There are a whole host of options, one of which is "do it right". Relying on a non-standard shell to be in /bin is bad, relying on non-standard shell extensions to be in the standard shell is also bad. So either use the standard shell as the standard shell, or use whatever nonstandard shell you want by calling env to find it.

comment 14y ago · link · parent

I guess IANA should have given them a protocol number like they requested then, instead of playing politics because cisco employees run the organization.

comment 14y ago · link · parent

>The Linux Desktop can't stand still to accommodate some minor platform.

The current strategy of charging backwards at full speed doesn't seem like a great plan though. We're not getting closer to linux on the desktop being plausible, we're getting further and further away. Making a typical linux desktop system even more complex, brittle, and fragile than windows is not a good way to compete with windows.

comment 14y ago · link · parent

>It doesn't exactly help that there are four major BSDs

Yes it does. This weird misconception that all the developers of different BSD lineage OSes would all be working together one a single system otherwise is ridiculous. There are 4 because the people working on them wanted 4. If netbsd disappeared, those developers wouldn't just switch to an OS they don't care for, and aren't interested in. Having 4 OSes means there are more developers in total, and given the licences, code is shared between the 4 systems. It is entirely a gain for all 4 of them to have the other 3 exist.

comment 14y ago · link · parent

I can choose between giving up a simple, reliable OS or giving up a convoluted and obnoxious desktop interface that is essentially indistinguishable from the competing convoluted and obnoxious desktop interfaces. Guess which one I am likely to choose.

comment 14y ago · link · parent

It is worth noting that Atwood is the one saying that, and I would trust a random 3rd grade student's opinion on the subject over his. Notice how he is unable to provide any actual criticism of the answer, just "I don't like it"? That is his way of saying "I don't know what I am talking about, so someone else criticize it and then I'll jump in and say I was going to say that".

comment 14y ago · link · parent

Adding "yeah but I don't believe science" to your non-argument doesn't improve it. You are still making the same baseless assumptions, just with the addition of suggesting that you alone possess the knowledge required to determine the intelligence of dolphins, and all those people who spent their lives studying them are dumbasses.

comment 14y ago · link · parent

Except that as I pointed out, facebook isn't independent pages. Wordpress.com is tons of tiny, entirely independent sites. That's like claiming godaddy is a top 10 website because they host tons of little PHP sites. Tons of little sites is not the same as one big site.

I realize lots of people run wordpress. That doesn't support the claim that it easily scales to the traffic demands of a top 10 site.

comment 14y ago · link · parent

What is with the totally misplaced and unnecessary snark? I was not criticizing the law, I was pointing out what purpose it is meant to serve (people).

comment 14y ago · link · parent

Yes, and lots of people pointed out how that argument is just a red herring. You didn't come back with an actual argument, so pointing back to the fallacious one doesn't accomplish anything.

comment 14y ago · link · parent

So, none of them? It doesn't include other domains and it shouldn't include other domains. Really, it is being exceedingly generous in that estimation already. Hosting thousands of totally independent, small sites is trivial, and does not require scaling wordpress in any significant way. Facebook is one site, all their data needs to be able to be accessed by all their software. Bob's blog and Joe's blog are totally independent, and have no need to be on the same software or hardware at all. Thus making scaling a non-issue.

I agree that using caching is normal, but the difference is the total reliance on caching. I wouldn't be impressed with google's scalability either if it were 99.9999% static pages being served up.

comment 14y ago · link · parent

Which top 10 site is running on wordpress? And how much of it is static content being served by a cache and completely avoiding wordpress at all?

comment 14y ago · link · parent

>I go to any $5/month host, check "install wordpress", and it's done.

That is a function of popularity, not language. If some blogging app had a userbase the size of wordpress's, it wouldn't matter if it were written in PHP or brainfuck, shared hosting providers will set it up. This is why appealing to techies makes sense. They will be the ones setting it up in the initial "its not popular yet" phase, and if they don't use it, it will never get off the ground. Once they start setting it up for their friends/family/etc, a few companies start offering it as an option for their hosting. Then a few more, and it snowballs as the app gets more and more popular. Trying to start from "use PHP so end users will use it" doesn't work, because installing a PHP app is just as hard for them as installing anything else.

comment 14y ago · link · parent

Don't confuse "mobile responsiveness" with people doing it wrong. Your website should never, under any circumstances try to look and feel like an app. All that does is set behavioural expectations in the user that will not and can not be met. It should look like your website, just with some presentation changes to make it easier to get to the content you want on a device with a smaller screen and touch based input.
1
262728
40