Important caveat:
These are on my advanced languages post for a reason. Any IDE's they have tend to be on the weak side, so you should be comfortable working in a text editor. Vim and Emacs are the classics, or one of those silly graphical editors if you really must (though their support will generally be weaker). The previous post was not meant for the faint of heart. That applies triply to this one.
Haskell
Those of you who've talked to me in the past 6 months knew this one was coming. This wonderful language is known for three things:
1) Elegance - Lazy evaluation and a few bits of sugar make code ridiculously simple looking
Quicksort has never been simpler
The Sieve of Eratosthenes (that operates on infinite lists) in 3 lines
2) The ridiculously rich (though also absurdly rigid) type system. Typeclasses provide a safe way to do overloading. The Hindley-Milner type inference system allows you to have the full assurance that static typing grants you without bogging your code down in excessive type declarations. That being said, while it's possibly the best part of Haskell, it's also often the most infuriating.
3) Being difficult to learn. Now, I'm not convinced this reputation is deserved. But, given that monads appear to be the most tutorialized subject in programming, your mileage may vary. Monads essentially function to encapsulate different bits of programming where the sequencing is important in a lazily evaluated language. Once it clicks it seems absurdly elegant, but it could take a bit of time.
How to install:
On Debian: sudo apt-get install haskell-platform
On Arch: pacman -S ghc cabal-install haddock happy alex
On Mac OS X: First, install homebrew - if you didn't already have it, you definitely should. I'm going to write another post about it later. Then it's as simple as "brew install haskell-platform"
Anything else: Go to this page
IDE/Editor support:
This page should have all the info you need.
Recommended tutorials:
I'd explain my recommendations at length, but someone on Stack Overflow already did it for me
Racket:
Now, I know what you're thinking: "You recommended Racket last time!" But I only talked about it in an introductory context. Now, I'm recommending something different: Read the last few chapters of SICP. Work through The Seasoned Schemer. But, whatever you do, learn macros. When you do, you'll understand all the fuss over Lisp's parentheses. Their biggest benefit is that their use essentially means that Lisp has no syntax. And that makes metaprogramming as easy as normal programming in many other languages! This is ridiculously important. Macros allowed the Racket developers to graft a static type system on top of the base language, and added async to Javascript. The first one I have some vague sense of how it was done. The second one, though, strikes me as black magic. All the more reason to learn!
How to install:
I'd recommend working from here if you want to use the racket IDE. But, if you want to use Vim or Emacs there's support for those too. I'd recommend searching your favorite package manager for racket.
Mac OS X: brew install plt-racket
Debian-based OS':
sudo add-apt-repository ppa:plt/racket sudo apt-get update sudo apt-get install racketRacklog:
The best thing about Racket is that it comes with a bunch of other languages built on the same syntax and editor using macros. Racklog is a great example (as is Typed Racket, and Lazy Racket). If that doesn't compel you to learn more about macros I don't know what will. That being said, the reason to learn Racklog as well is to get used to yet another programming paradigm: logic programming. I would recommend prolog, but given that it isn't used anywhere, there's no real reason to learn it beyond just getting used to the paradigm, and Racklog will be more than adequate for that.
Logic programming feels even more like magic than functional programming. You don't specify computations at all. You specify a few characteristics of the answer you're looking for, and out pops the answer! I'd swear it was magic if I hadn't spent time looking at the source code for Racklog.
Recommended Learning Resources:
I linked to the official Racklog tutorial above, though you can also learn much of it (with slightly different syntax) in The Reasoned Schemer
APL:
Now, don't get me wrong, I don't expect you to ever use APL for anything. You probably won't even use too many ideas from it elsewhere. So why do I say you should learn APL?
Simple.
It's fun.
More specifically, I recommend learning J, a modern implementation of APL that thankfully only uses the ASCII character set.
Now, if you've never heard of APL, I guess it needs some introduction. APL (A Programming Language) was originally designed by Kenneth Iverson as a system of mathematical notation for array manipulation (the name APL obviously had yet to be dreamt up). When he was working with IBM in the 60's, he realized that it was also a useful structure for describing program operations. And thus APL was born.
Array programming is... interesting to say the least. You can write just about any (purely numerical) computation in one line. But, APL has also been called the world's first and only write only programming language, and probably rightly so. Reading old programs is often damn hard, as the syntax provides little to no redundant information. Write it once, hope it works. That being said, I'm pretty sure J is turing complete, so it'll still do.
No comments:
Post a Comment