Except that this isn't really quicksort, because it's not in-place. Let's see you write the real one; I bet you it will be uglier than the equivalent java code.
Well, Java has Comparator classes. You can simply have first class functions by making a generic-d class (generic types for input and output), and a single member like "public T apply(F arg)". Its not that out of the ordinary.
So the paradigm is easily replicated, but yes, the syntax is totally ugly though ;) I think the real difficulty is in explaining how say lots of Comparators and Function classes are better or worse than a first-class function. Java at least affords type-safety on the wrapped functions whereas Ruby and Python don't (though, they don't really have any Java-style type safety to begin with).
You're right - Haskell does lazy evaluation far better than Lisp/Scheme do. I've been making my way through real world haskell, and I'm constantly amazed.
I'm not proficient enough in Haskell to write a public blog post on it though; and I figure Lisp was esoteric enough ;-)
just remember that the single most impactful, game-changing, and profitable revolution in web uis in the last ten years was the dramatic simplicity of the google homepage...DESIGNED BY TWO UNIX SYSTEMS HACKERS!
Not saying it's not true. But are we sure we have a cause-effect here? Sure it worked, it was liked. Bu if they had a different UI, would they be nowhere now?
I think it helped. It wasn't the ONLY factor (the search engine was pretty good too ;)), but I think displaying results faster (smaller page size, more focused UI), contributes positively to the experience.
Perhaps there are UIs that would have resulted in faster growth or more total marketshare, but there are definitely UIs that would have made things far worse. I think the "headroom" for growth is pretty low, there were so many competing services then, if you can remember, that I find it hard to believe that there was only Google with a different looking interface.
you can buy an i7-based desktop from dell for $1300, WITH A 24 INCH MONITOR. the i7 is at a minimum more than 200% faster than the mac pro's processors. don't believe me, read tomshardware or anandtech
for $2800 you can get one of the dell gaming i7 boxes that is tricked out far beyond anything apple offers hardware wise, once again, a minimum of 200% performance improvement
the mac math once again does not hold up. and where is their snob appeal? they don't even have an i7 box on the market
My last experience with a MacBook Pro, my friend used the keyboard 99% of the time. The few occasions he used the touchpad, it was almost entirely composed of 1+2+3+4 finger gestures for switching between programs/tabe, scrolling, and so on. This actually became a selling point for me, and why I'm considering a MacBook for my next laptop.
And at this point, I need to learn to stop feeding the trolls. But I thought my point would contribute to the discussion anyhow. :-)
yeah its amazing that apple touts themselves as pro-user but their external keyboards are without a doubt the most craptastic worthless keyboards on the market. they look cool but are utterly useless for prolonged use
and yes apple takes your freedom and will slowly turn you into an idiot. we're software developers damnit, we're supposed to be interested in how the computer works under the hood, not looking to put a gramma-friendly interface on everything. i don't understand developers who look for "just works" at the expense of "show me the code"
I don't like macs because they are gramma-friendly, I like them because I can run a real bash rather than cygwin. You want to know how a computer works under the hood, you should prefer OS X to windows.
A good deal of OS X is open source, but that's beside the point. I don't really care that XNU, etc, are open source, because I don't want to develop an OS -- I want to develop for that OS. If you're so bothered about everything being open, then I suppose you are using OpenBSD, not Linux or anything else, because it doesn't contain binary blobs? Seriously, I don't understand why you're so bothered about things being open that you'd never change anyway.
On the other hand, Cocoa is a better API than anything available for Linux or Windows, and that does matter to me. So do the consistent and logical keyboard shortcuts across all apps, the high level of UI design absent on almost every other OS, how all my hardware just works without having to edit configuration files, and loads of other detail that Apple pays attention to. There's a lot more to good design than being grandma-friendly, and not many people except Apple get it right.
I'm bothered about things being open because I prefer the idea of a future where improvements can be built upon all previous knowledge, rather than a future where everybody has to start from scratch implementing their own basic proprietary versions of everything.
not every developer wants to develop on their os. rather, I would like computer that "just works" so that I can do my development work.
yes it's cool to be interested in what's under the hood, but once you've tried to get your wireless working for hours on numerous occasions, you start to appreciate when things just work. i got sick of wasting my time.
If you truly believe you should have to look at the code and that things shouldn't "just work", then you must not know about modularization and encapsulation. If I have to know about how the C linker works in order to install a program, then the OS I'm using is a terribly leaky abstraction with a poorly designed user interface/API.
I want my basic tools to just work so that I can concentrate on developing my own programs and tools.
yes, i get particularly pissed by so-called counter-culture hipsters pissing all over the unwashed masses yet slavishly dedicated to the hypocrisy of crass consumerism when they think its "cool". the appletards go miles beyond any shopping-zombie i can think of in their pursuit of buying shit. and yes, it is shit. its stunning that there are morons buying the new macbooks for $2k!!!...i mean, you have to be braindead.
but the icing on the cake was when i bought the 3rd gen ipod nano. previous ipods were recognized by linux and various tools. but oh no, steve had to encrypt the firmware, thus pointlessly complicating what should be a trivial task - mounting a usb device. WHY???? what do you FUCKING CARE steve that i am trying to plug this into a linux box??? is it a problem that i don't buy into your end-end slavery? i replaced it with a cowon...at least they aren't going out of their way to fuck over users who don't goose-step a certain way
> its stunning that there are morons buying the new macbooks for $2k!!!...i mean, you have to be braindead.
Do you have a car? By your logic - if you drive anything above a Geo Metro you must be braindead. If you don't, do you pay for the bus? You could walk - you must be braindead. Do everything yourself, pay for nothing! Don't put money into making yourself happy with the things you use most of your waking life! What a weakling!
ask anyone occupational therapist if the apple keyboard is recommended over, say, the kinesis advantage pro. if you aren't using a kinesis or one of its real competitors right now, you are not a "keyboard snob"
the apple keyboard:
- has no discernable key travel
- is not split and contoured
- is too small
its probably the biggest ergonomic nightmare out there. fortunately few people actually use them after buying the computer
But if I can fly on this keyboard (and the ones like it such as the MacBook Air) with no problems for years, why should I worry about the "ergonomic" keyboards?
quicksort:
qsort [] = []
qsort (x:xs) = qsort (filter (<= x) xs) ++ [x] ++ qsort (filter (> x) xs)
fib sequence:
fiblist = 0 : 1 : (zipWith (+) fiblist (tail fiblist))
but don't worry, with the rate at which the java kitchen sink swallows more paradigms, this will likely compile in java8 or something