logoiMonad.com


Haskell plug-in for Eclipse

Posted in Haskell, functional programming by zoo on the June 29th, 2008

I use Eclipse to all sort of development on C, Java and Haskell. It gives me uniform look and feel on every project. In this post I wold like to show steps necessary to run Haskell Eclipse plug-in.

First of all you need to have Eclipse installed. I will use Ubuntu 8.10 and the installation command is:

sudo apt-get install eclipse

My Eclipse version is: Europa 3.2.2, Haskell plug-in version is: 0.10.0 and Java version “1.6.0_06″

When the installation finish run Eclipse and select “Workbench” from initial page.

  1. From menu on the top select: Help -> Software Updates -> Find and Install ….
  2. On “Install/Update” form select “Search for new features to Install”, click “Next”.
  3. On “Install” form click “New Remote Site …”
  4. On “Edit Remote Site” form enter:
    Name: Haskell Plug-in
    URL: http://eclipsefp.sf.net/updates

    - this is the location of Project that develops Functional Programming plug-in for Haskell and Ocaml. Click “OK”.

  5. On “Install” form select check-box near the “Haskell Plug-in” if it is not already selected and click “Finish”

After the Installation is complete it may be necessary to restart Eclipse.

  1. From menu go to: “Window”-> “Preferences…”
  2. On “Preferences” form select “Functional Programming” and set appropriate compiler and editor options for you system.
  3. On top right corner of Eclipse there is “Java perspective” that can be changed to “Haskell perspective”.

Enjoy happy programming.

GPU programming in Haskell

Posted in GPU, Haskell, functional programming by zoo on the June 25th, 2008

Recently I become interested in GPU programming particularly technology developed by NVidia - CUDA. There is a lot of interesting examples provided with the SDK and a lot of demonstration links on the site. I have no vision if this will become mainstream in the future or other type of multi core technology, but I like the idea of cheap data parallel programming on video card. I have written some simple Monte Carlo programs to have a taste and my opinion is that I will use this technology only if there is compiler support from high level languages, especially functional ones. There is one project at Chalmers University (mentioned on the #haskell channel) that aims to provide backend for Haskell compiler. Programs are written in Haskell and executed on GPU-s.

Chalmers University:

PDF slides of presentation: “Obsidian: GPU programming in Haskell

Authors pages:

http://www.cs.chalmers.se/~koen/

http://www.cs.chalmers.se/~ms/

Other thechnology that I am studing right now is Data Parallel Haskell. It is in process of development and gives great promises for parallel programming in Haskell and utilization of nested data parallelism. This will make possible to write programs that will scale well on massively parallel architectures composed of thousands and even hundred thousands computing cores.

And finally here is a short movie I found describing the usage of GPU “supercomputer” for tomographical reconstructions (7:30min). This shows the real value of such “exotic” computational technologies:


YouTube direct link video

Vegetarian Sushi

Posted in life by zoo on the June 22nd, 2008

Sushi refers to sticky rice that has been seasoned with rice wine vinegar. It is cut and shaped into small rolls wrapped with Nori (Toasted Seaweed sheets).

Ingredients: carrots, cucumber, pepper, rice, 2/3 cup rice wine vinegar, 6 Tbsp. brown sugar, package toasted Nori sheets

Preparation:

Simmer rice for 30-40 minutes.

Julienne the cucumber, carrots and pepper. Steam all vegetables in boiling water for 10-15 minutes.

Use “Seasoning for Sushi” or prepare yourself by mixing rice wine vinegar with brown sugar and stirring until the sugar is dissolved.

When the rice is cooked wait until it is cooled down and mix with the vinegar and brown sugar mixture.

Lay out one Nori sheet and place a handful of rice on it. Moisten your hands with water, and firmly press the rice to the edges of the sheet to cover it all. Lay vegetable strips parallel to Nori edges and carefully wrap the closest edge over the vegetables. When the Nori sheet is rolled completely slice the roll with sharp knife on pieces and arrange.

Google Tech Talks - Philip Wadler

Posted in Uncategorized, functional programming by zoo on the June 15th, 2008

Philip Wadler talk on “Faith, Evolution, and Programming Languages” (1h 7min)


Google direct link video