Programming blog on functional languages, static typing, concurrency and open source, with opinionated takes on Scala, Clojure and STM.
Commenters debate its posts on STM versus message passing and on open source responsibility, and cite its writing on programmers and history.
I read the article differently than most of you. I think Zed is still grumpy that contributing a big piece (if not irreplaceable, but unarguably useful) of the rails stack didn't lead to more recognition and, more importantly, the type of recognition that's useful when it's time to pay the rent. Hence his rails is a ghetto post -- I read it as something like, "This rails shit has worked out well for DHH but a bunch of other people have contributed and we haven't gotten shit. This sucks."
This post is an elaboration -- having written a bunch of big projects that are freely available for anyone who wants to to review the code, Zed still has to answer the usual weeder questions. It's kind of insulting, frankly. And from his perspective, his contributions to open source and the community at large haven't done that much for him.
I think this is part of a general problem in programming that a blog author I follow pointed out and another poster in this thread mentioned: open source has worked out well for eg Larry Wall or Linus or DHH, etc. But there are a lot of people that contribute -- maybe not as main authors, but who eg make sure all your rails db gems work with new revs of the databases and contribute lots of little pieces -- but who don't get enough out of it to financially justify the contribution. See the creator of Clojure essentially begging for donations on his website in order to continue development. Sometimes, it comes down to the simple fact that open…
Our Ruby on Rails app uses PostgreSQL (for now but that will change). We started off with MySQL but after growing quickly, we were forced to look into partitioning of the data. PostgreSQL was made to be easy for advanced stuff like that. We tried to do it with MySQL and failed because we're not MySQL experts and we managed to get it working with Postgres. Postgres has better documentation than MySQL so that might be the factor if you don't have a DBA you can readily ask for help. Here's a write-up by someone who went through similar process:
http://enfranchisedmind.com/blog/archive/2006/11/04/166
Also, if you use Postgres on multi-CPU machines, it's faster than MySQL. But, make sure you read this:
http://www.suite101.com/article.cfm/oracle/115560
(comparison of Oracle/MySQL/PostgreSQL)
One last word of advice if you end up using PostgreSQL, learn and use this:
http://pgreplicator.sourceforge.net/
Finally, we are moving back to MySQL because we found a really fast replacement for the MyISAM storage engine (a lot faster than Postgres) and our part-time DBA knows MySQL and this new storage engine a lot better than Postgres. We are also moving to VPS architecture and Postgres' performance advantage over MySQL on a VPS doesn't really exist.
In the end, go with what your staff/friends know and what your hosting place recommends. If they have an optimized DB stack and provide some kind of a support for it, stick with that DB because you can always go to them for help!
http://enfranchisedmind.com/blog/posts/what-is-a-functional-programming-language/
Note: NOT written by same guy who did "Scala not Functional".
Everybody has a different definition of FP in mind with these, uh, parameters:
- "no hidden side effects"; clearly demarcated IO functions, database calls.
- curry, partial function application; lexical closures
- TCO
- 1st class, higher-order functions
- Immutable / persistent collections / data structures
Altho most people agree that these are orthogonal to the definition of FP, (but nice to have:
- type inference (ML's is variously referred to as Damas-Milner or Hindley-Milner) or static typing
- lazy eval
- pattern matching
- green/lightweight threads with message passing OR STM/MVCC
- monads,arrows, functors, CPS
http://stackoverflow.com/questions/485418/distinctive-traits-of-the-functional-languages
http://stackoverflow.com/questions/1112773/what-are-the-core-concepts-in-functional-programming
Maybe I was unusually naive, and probably everyone's more informed these days, but the thing I'd add is that tech companies are very different from other companies for CS majors.
I supposed in my innocence that there were the overtly-sexy apps and the unsexy but still challenging apps* . I haven't had the opportunity to work for a real tech company yet, but my impression is that programming in IT is essentially a different career compared to programming in a software company.
*It's not just a matter of nasty-little-problems. It's also a question of cultural values. More on this at http://enfranchisedmind.com/blog/2009/02/22/programming-doesnt-suck-or-at-least-it-shouldnt/.
STM and locks have some interesting clean-up and (as is cited in the article) you really need for it not to crash and not to deadlock or go all priority-inverted on you.
Message-passing, on the other hand, doesn't need particular locking and crashes are (somewhat) simpler to deal with.
(And most any scheme I've encountered can deadlock, and will usually choose the most inopportune moment to demonstrate this capability.)
There's an older blog post here http://enfranchisedmind.com/blog/posts/thoughts-on-parallelism/ that's worth a read.
if anything saves imperative programming it will be transactional memory, which is exremely hard. hardware TM and code written for TM are in a chicken-and-egg situation. the answer is hybrid hardware/software TM and the sun guys are way ahead on this too.
What's interesting is STM is only hard in imperative languages. It's relatively straightforward in Clojure and Haskell. See http://enfranchisedmind.com/blog/posts/the-problem-with-stm-your-languages-still-suck/