Showing posts with label haskell. Show all posts
Showing posts with label haskell. Show all posts

Monday, 22 November 2010

Haskell and JavaScript


I think Haskell is great and have spent a reasonable amount of time messing with it in the past. I like its strict typing and the way it is very concise. Everytime I return to it I understand the language a little better and everytime my interest wains when I take a hard look at the projects I like to work on and realise that haskell does not quite fit in with them. I like to do web or mobile stuff in my free time, while haskell seems to have had a focus on desktop and perhaps server stuff.

I was very happy to spot that some people are attempting to make JavaScript backends for a Haskell compiler. It is early stages yet but I would love to code Haskell and have it run in a browser. If the interface to the DOM was good or the haskell code could use JQuery effectively I would be a very happy programmer as I would finally have a reason to commit to learning Haskell for the long term. 

A descent Haskell to JavaScript compiler would also provide a route mobile development. 

Ok as far as I can see it is still early days and I resisted the temptation of reading up on the subject and getting all excited over Haskell once again. The next time I return to Haskell I want it to be when it is ready for something I want to produce rather than an academic exercise in stretching my mind some more. I am hoping this project gains some momentum and does result in a route to using haskell in numerous ways.

Friday, 14 May 2010

Creating a little website with haskell

So my main website has been offline for a while. It was a wordpress powered site. I did not want to go back to wordpress but instead want a small site I can drop files onto should I need to.

For this I want static site so maintainence is minimal. Obviously I could have open up gvim and crafted a couple of pages of html and been done with it.

But that is not the programmer way, I decided to create a little DSL (in haskell) and would generate the html files for me from a simple haskell like description of the page. The main reason for doing this was so I could have consistent headers and footer on each page. The sort of thing you can do with php in about 30 seconds.

It only took me a couple of hours to knock it together and is probably something many haskellers have done in the past and many will do in the future. A nice little diversion from all the android coding I have been doing and again demonstrates, to me, how much fun hacking in Haskell is.

The one page place holder site is at www.marblemice.com.