Hacker Newsnew | past | comments | ask | show | jobs | submit | drwh0's commentslogin

haskell:

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


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 ;-)


Oh, they compile now. They're just ugly.

http://functionaljava.org/examples/1.5


aka yQuery


other than programming perl, this is the only must-read perl book. its a classic.


I would also add "Perl Best Practices" by Damian Conway to that must-read Perl list.


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!


I wonder if this is a fact or a fiction.

The legend of the Simple Google Interface.

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


Clearly either Moore's Law has been broken or you're mistaken.


and a really good quicksilver replacement

yeah we call it xmonad. why make keyboard shortcuts a slapped-on app when they can be your entire desktop?

But there is always tons and tons of yak shaving

wtf are you even talking about?


I tend to live on the command line so my experience is a bit different.

then why would you go to an OS that mandates the use of the mouse??


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. :-)


is it april 1 already? TEA RECIPES????


This is a nice idea and as another mentioned tea trends in Google Trends.

Adding coffee would be good too, as well as others mentioned adding earth tones to the design.


yet another front end to amazon's cloud. when will it stop?


When will the stupid comments stop? If you don't have something constructive to say, don't say it.


If you don't have something constructive to say, don't say it.

ESL classes are now being offered in your community


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.


It's rather unfortunate that you need to pay for Mac hardware just to run bash, don't you think?


In my case my employer pays for it ;-) Otherwise I'd be running Ubuntu!


You want to know how a computer works under the hood, you should prefer OS X

no, i should prefer linux or freebsd, which i do, ON (SANITIZED AND LIBERATED) APPLE HARDWARE.


Hey, you are quoting just part of my sentence! I said prefer OS X to Windows. I agree with you.


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.


I prefer the idea of a future where improvements can be built upon all previous knowledge

pretty much nailed it on the head there. A lot of developers really miss the point while getting sucked into these flamewars..

almost as annoying as the vim vs emacs bickering.


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.


not every developer wants to develop on their os

uh....okay-doke


I think what they meant was, "Not everybody wants to develop things for only their current OS".


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.


modu-whaaa? encapsu...lishion???? wow you must be one of them professor types!


Any mention of Apple sure gets your dander up, doesn't it?


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


You can get the kernel source and much more here: http://developer.apple.com/opensource/index.html

> 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!


You seem pretty upset about this stuff. I think you're over generalizing about Apple users. Everybody buys things for different reasons.


i also vent on the other hypocrites who piss on people for buying bottled water yet are sure to lease a new mercedes every nine months


The latest flat aluminum Apple external keyboards are the best I've ever used, and I've been a keyboard snob for decades.


I can't stand them myself. But other people I work with use them more regularly than me and seem to love them.

No proof of anything, but possibly more useful data.


+1 I LOVE this keyboard- only wish the wireless one had a numeric keypad also


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?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: