Thermal Noise

Icon

The Adventures Of A Unix Programmer

Haskell ?

I have been looking at various options for learning a new secondary programming language (Primary still being “C”) in the past few weeks. The main intent is having a lot fun, exploring new concepts and maybe switch to it in the very distant future. Python was a LOT of fun, powerful, partly gives me a day job and so on, but I haven’t been able to do anything profoundly new with it in the last few months. I have looked at Erlang, Haskell and Scala so far (Functional Programming and Concurrency were big motivators).

Scala is at the bottom of my list because the documentation and the community seem to be interested in attracting “Java Programmers”. Good luck trying to do that with a FPL and an arbitrarily different syntax. The JVM is a tempting option but being in a community of Java programmers is not.

Erlang is a powerful and practical language. Its very good at concurrency even if message passing is a one trick pony. I was very annoyed by its syntax though – Did anyone think of refactoring as a legitimate use case ?

Haskell is slightly academic but quickly evolving into a practical language. The syntax is just beautiful. It reads like a mathematical poem and that is a crucial factor for me. Writing high-perf programs seems to require magical knowledge. But I am completely willing to invest time in something that is a pleasure to work with. Also, it has multiple choices for concurrent programming, including Software Transactional Memory.

The vague associations in my brain are: Scala <=> Java, Erlang <=> Perl, Haskell <=> Python. Haskell seems to be the emerging choice, but that option is not set in stone yet. Clojure and Ocaml are definitely out of the question. I already know a little bit of Scheme and LISP and they aren’t very exciting for me. What other languages should I be looking at ? Do people who read this have useful insights to share ?

Filed under: Computer Science, Programming

8 Responses

  1. Why don’t you try some different language like SystemC or Verilog HDL for instance? You cannot associate these with any programming language that easily. My recent interest is MMIX – fully academic, but full of fun. MMIXMIPS assembly.

  2. Ananth says:

    @ Sundar:

    At some point of time in the near future, I would like to go through Noam Nisan’s awesome new textbook: http://www1.idc.ac.il/tecs/

    It is the kind of book I wish I had during my college days. Your idea of Verilog/SystemC appeals to me in that context.

    But the problems I am looking to solve with my new pet language are things like Measuring similarity of graphs, doing K-Means clustering on high dimensional data, writing fast network servers, working on Project Euler problems etc… Its definitely got to be a high level language :)

  3. omkar says:

    Why don’t you look at factor. Its a stack based language like forth but has all these other cool features from lisp and smalltalk. The development environment is also great for exploring the language. It is JITed, with the compiler written in factor itself.

    http://factorcode.org/

  4. omkar says:

    Here is a small program I’ve written in factor to check primality of a number.

    : odd-divisors ( n — n seq )
    dup sqrt round >integer 1 + 2 swap [a,b] [ odd? ] filter ;

    : isdiv? ( n m — ? ) mod 0 = ;

    : check? ( n seq — n ? ) over . [ swap isdiv? ] curry any? ;

    : isprime? ( n — n ? ) odd-divisors check? not ;

    It uses all map/reduce operators from lisp and is basically a stack based program like forth. Really interesting.

  5. Ananth says:

    @ omkar,

    Thanks ! Never heard about Factor before. Piques my curiosity enough to give it a try !

  6. Joe says:

    How about Matlab?? It does everything for you. Dont even think about performance though ;)

  7. Ananth says:

    @Jovin

    Hmmm… Mathematica or even R maybe. Matlab less so. But that just led to an entirely new chain of thought about my motivations for picking up a new language. Thanks !

  8. anand says:

    @Jovin: Matlab?? Damn… it is totally pissing off..
    @Ananth: R seems simple enough. haven’t explored much but used it for a basic density distribution plot.. and was clean and simple……. And apparently there is a python package for R programming rpy http://rpy.sourceforge.net/

Leave a Reply

SocialVibe


Twitter

  • Paradox: I hate lua and yet picked up deep internals in 20 hours. I love Haskell and see little progress after days and weekends of work. 2 days ago
  • The few hundred lines of Lua i was forced to write today flushed out all the nice Haskell crammed in my brain. Lua's design seems dreadful. 3 days ago
  • Steven Pinker at his usual best: http://bit.ly/7ZM4lU | My Android is really a truth verifying device pretending to be a hand-held computer. 5 days ago
  • Changing the prompt to "What's Happening", adding a RT button & lists is hailed as "Twitter Innovation" ? Lets see how their Ads idea goes. 1 week ago
  • Howto to telnet into your Samsung TV: http://bit.ly/2cboPL - Linux Hardware Hackers FTW. 1 week ago

Archives