• Advertisement
Sign in to follow this  

Haskell

This topic is 4144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Some time ago I started learning Haskell and I'm loving it. It took me a long time, on and off, to get into it, and a lot of mindbending to understand it enough to do anything useful, but once I got past the initial hump, I've had nothing but good experiences. I already wrote a mini-lisp interpreter and a web server and can't wait for more. The language is really really good. Emacs mode isn't bad (though could be much better). GHC is excellent. The excellent language compensates for the lack of some libraries. And with type inference and hs-plugins I get the best of static/dynamic worlds. So who else loves Haskell? What have you done with it? What are you doing and/or going to do next?

Share this post


Link to post
Share on other sites
Advertisement
A fellow PhD student in my room is writing a number of static analysis tools (think SPARK++) in Haskell. I've heard nothing but good things about it as a language so far, and the turnaround from design to implementation on his work is incredible - I seriously wish I'd looked at prototype languages for my current work...

Share this post


Link to post
Share on other sites
I learned the basics of Haskell over this past summer, and was extremely impressed by the language too. The type inference and pattern matching of Haskell make the C-based languages seem archaic.

The most advanced program I did with Haskell, however, was Hangman, because I got into a similar language, Ocaml, instead.

Share this post


Link to post
Share on other sites
I had to learn it in uni last year and found it to be quite interesting (most people hated it.. I guess a functional language is a bit much for people who primarily know Java). I tried learning OCaml for a while after that (it looks like a nice mix between C++ and Haskell) but even though I understand functional programming, I find it extremely dificult to think about and solve problems in a functional way.
Hopefully someday I'll get over that as over all I really love the ideas behind these languages (I quite like the ideas behind Prolog too) and languages like OCaml really do seem a lot more modern than the likes of C.

Share this post


Link to post
Share on other sites
I'm writing a Haskell compiler in C++ for the psp, hopefully if I can pitch it to my coworkers we'll have a new ingame scripting language.

Share this post


Link to post
Share on other sites
Quote:
Original post by ph33r
I'm writing a Haskell compiler in C++ for the psp, hopefully if I can pitch it to my coworkers we'll have a new ingame scripting language.

That sounds pretty hard. Implementing a stable and efficient Lisp compiler is hard enough (making a slow/incomplete one is very simple, but complexity increases exponentially once you start working on industrial strength features). Implementing a Haskell compiler must be much harder. I suppose most of the work goes into implementing the type system trickery correctly.

Share this post


Link to post
Share on other sites
Quote:
Original post by CoffeeMug
So who else loves Haskell?


I' and I'll vouch for Superpig because I know he likes it too [grin].

Quote:
Original post by CoffeeMug
What have you done with it?


Nothing of significant value yet.

Quote:
Original post by CoffeeMug
What are you doing and/or going to do next?


No idea only time will tell... (that is regardless of haskell or not)

CoffeeMug, you might find this amusing yet highly insightful and then there this. Also has the lazy aspect of haskell clicked for you yet? if not keep pursing it until you open pandora's box. Oh did you have look at Write Yourself a Scheme in 48 Hours?

You might want to check out:

Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire
A tutorial on the universality and expressiveness of fold

Quote:
Original post by ph33r
I'm writing a Haskell compiler in C++ for the psp, hopefully if I can pitch it to my coworkers we'll have a new ingame scripting language.


Since GHC can target GCC and as I'm aware there are ports of GCC for the PSP, why not use GHC instead of starting from scratch? if you really wanted to you could write a backend for GHC that directly generates native code. I think there is good documentation for this.

[Edited by - snk_kid on October 18, 2006 4:57:10 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by snk_kid
Also has the lazy aspect of haskell clicked for you yet?

Thanks for the resources. Yes, the lazyness clicked. Actually, I didn't find this concept too hard to wrap my mind around. I thought monads (and monad transformers) were much harder to understand. I was reading Haskell articles for over two years (on and off). Then I took the plunge, downloaded the compiler, and within two or three months all these concepts I was reading about finally clicked.

I still can't do things as concisely as they do it in "blow your mind", mainly because I don't know the prelude as well (though I'm learning), and also because I'm not too accustomed to dealing with folds. I'm getting much better, though.

Of course it's not all rosy. Yesterday I was trying to format a date and realized that you can't output seconds (%S) without the decimals (so they end up looking like this: 43.7658374). Not hard to postprocess the string to get rid of the decimals, but it makes me wonder if choosing haskell to do production software is a good idea.

BTW, a simple web server compiled with GHC 6.6 (finally out!) takes only 2500k of memory (though it grows, somewhat) and seems to perform very well (no exact numbers yet) even though I made no active attempts to optimize it. In many places I still use O(N^2) string concats. BTW, anyone has any idea why Firefox and IE (but not Opera) ignore "Connection: close" in server response and insist on keep-alive?

Sorry for the brain dump [smile]

Share this post


Link to post
Share on other sites
I'm learning Haskell, on and off, as a mini-hobby. It looks quite interesting, and I can see where it could be useful. Unfortunately, I'm only at the stage where I can essentially use the GHC interpreter as an incredibly powerful... calculator. I've not dedicated enough time to it to know much beyond the real, real basics.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I love Haskell.

I also firmly believe that the only way we're ever going to program the XBox 720 (or whatever it's called) and other next-next gen consoles effectively is if we use purely functional programming (See Tim Sweeney's presentation "The Next Mainstream Programming Language - A Game Developer's Perspective").

With massive multithreading using a language whose main mode of computation is "uninterupted modification of memory". It's quite messy in a single threaded program, but it gets exponentialy worse with multithreaded applications (to the point where it's just not practical anymore).

I'm not sure if Haskell will be it (I'd like to see a version with lenient or perhaps even strict evaluation for performance reasons), but some form of purely functional language (with STM, ST, lightweight concurrency, etc.) will be The Future (TM).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I love Haskell.

I also firmly believe that the only way we're ever going to program the XBox 720 (or whatever it's called) and other next-next gen consoles effectively is if we use purely functional programming (See Tim Sweeney's presentation "The Next Mainstream Programming Language - A Game Developer's Perspective").

With massive multithreading using a language whose main mode of computation is "uninterupted modification of memory". It's quite messy in a single threaded program, but it gets exponentialy worse with multithreaded applications (to the point where it's just not practical anymore).

I'm not sure if Haskell will be it (I'd like to see a version with lenient or perhaps even strict evaluation for performance reasons), but some form of purely functional language (with STM, ST, lightweight concurrency, etc.) will be The Future (TM).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement