News aggregator

ANN: Helium now available from Hackage

General haskell list - Sat, 09/06/2014 - 1:45pm
Dear Haskellers, I am happy to inform you that the programmer-friendly Helium Haskell compiler, known for its focus on error messages and hints, domain specific type error diagnosis, and its compilation logging facility, is now available from Hackage. All you need to do is cabal install helium cabal install lvmrun and you should be ready to go. The system has been tested under various instances of Windows, Mac, and Linux. To use Helium, there is a texthint program that is much like ghci (but less powerful), and a runhelium program that behaves like runhaskell. NB. the Hint environment is not yet availalble in this way (and, being pure Java, I am not sure if we will make it available in this way), and the server for logging the compiled programs is also not made available in this way. If you have a need for either of these, please e-mail me. There is a website too: To dispell one of the frequent misunderstandings about Helium: Helium DOES support a for
Categories: Incoming News

Scratch jr

Lambda the Ultimate - Sat, 09/06/2014 - 11:45am

Scratch jr is an iPad version of the Scratch environment, designed with young kids in mind. It is the best kid-oriented programming tool I tried so far, and my five year old has great fun making "movies" with it. As I noted on twitter an hour after installing, the ability to record your own voice and use it for your sprites is a killer feature. Check it out!

Categories: Offsite Discussion

Scala woes?

Lambda the Ultimate - Sat, 09/06/2014 - 6:12am

A fork in the back? See discussion over at HN. People in the know are encouraged to shed light on the situation.

Categories: Offsite Discussion

Tim Docker: A New Charting API

Planet Haskell - Fri, 09/05/2014 - 11:34pm

One of the challenges with building a library like Chart is the tension between ease of use and flexibility. Users want to produce charts with a minimum of code up front, but later want to refine the details. The chart library addresses this through the use of "defaulted records" using Data.Default.Class. Because such records are often nested, we rely on the somewhat intimidating lens library to modify the default values. We end up with code to create chart elements like this:

sinusoid2 = plot_points_title .~ "fn(x)" $ plot_points_values .~ mydata $ plot_points_style . point_color .~ opaque red $ def

This is much simpler and cleaner that the corresponding code using native record accessors, but it still has a certain amount of syntactic overhead.

I’ve added a simple state monad to the library to further clean up the syntax. The state of the monad is the value being constructed, allowing the use of the monadic lens operators. The above code sample becomes:

sinusoid2 = execEC $ do plot_points_title .= "fn(x)" plot_points_values .= mydata plot_points_style . point_color .= opaque red

This may seem only a minor syntactic improvement, but it adds up over an typical chart definition.

A few other changes further reduce the clutter in charting code:

  • A new Easy module that includes helper functions and key dependencies
  • Simpler "toFile" functions in the rendering backends
  • Automatic sequencing of colours for successive plots

All this means that a simple plot can now be a one liner:

import Graphics.Rendering.Chart.Easy import Graphics.Rendering.Chart.Backend.Cairo mydata :: [Double,Double] mydata = ... main = toFile def "test.png" $ plot $ points "lines" mydata

But this extends naturally to more complex charts. The code differences between the new stateful API versus the existing API can been seen in this example.

The stateful API is available in chart v1.3 It is a thin layer over the existing API – both will be continue to be available in the future.

Categories: Offsite Blogs

Can't create a static Linux executable when usinghmatrix

haskell-cafe - Fri, 09/05/2014 - 10:02pm
Hi Cafe, I am trying to build a static exec to be run on another machine, and I failed probably due to hmatrix. How can I fix this? Thanks! Test code: import Numeric.LinearAlgebra.Data main = print (fromLists [[2,3,3], [2,3,3]] :: Matrix Double) When complied with "ghc -O2 -static -optc-static -optl-static test.hs -optl-pthread", gave me lots of errors: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In function `dgees_': (.text+0xbc4): undefined reference to `dcopy_' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In function `dgees_': (.text+0xed9): undefined reference to `dswap_' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In function `dgees_': (.text+0x1304): undefined reference to `dswap_' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In function `dgees_': (.text+0x1377): undefined reference to `dswap_' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In function `dg
Categories: Offsite Discussion

Dependent Haskell

Haskell on Reddit - Fri, 09/05/2014 - 7:17pm
Categories: Incoming News

IDE for Haste projects

Haskell on Reddit - Fri, 09/05/2014 - 10:36am
Categories: Incoming News

Presentation about monads (beginner level) with example code

Haskell on Reddit - Fri, 09/05/2014 - 8:49am


I gave a presentation about monads at a Hungarian Haskell meetup in February. I put an emphasis on examples over definitions. My code examples include ones about image processing and text-based adventure games.

I'm not a Haskell expert, I just wanted to give a different perspective about starting out with monads so don't expect anything high level.

Audience members said they've found my presentation informative; I hope you will too.


Code examples:

submitted by printron
[link] [comment]
Categories: Incoming News

How can I specify a "must not be a member of a certain type class" as a constraint?

Haskell on Reddit - Fri, 09/05/2014 - 2:20am

I'm trying to implement a typeclass hierarchy and want to specify that a type can only implement one of two classes in a branch of the heirarchy. How would I go about doing that?

submitted by deltaSquee
[link] [29 comments]
Categories: Incoming News

Anecdotes and Advice on Hiring Junior or Summer/Co-Op Students for Haskell Work

Haskell on Reddit - Thu, 09/04/2014 - 11:56pm

I've seen anecdotes about Haskell's type system being very beneficial for juniour programmers working in a team environment (I think one from Don Stewart); that leaning on the type system allows juniour engineers to become productive faster while also keeping teams more productive.

My conjecture is that Haskell creates a really good environment for junior engineers. Yes, there is a steeper learning curve, but productivity should be increased (for them and the rest of the team) and anxiety lessened by leaning on the compiler and purity to guide programmers on the right course. Alas, this is just conjecture.

I'm wondering if anyone has any experience or anecdotes in this area. Especially with respect to hiring summer co-op students for paid work. This is quite an important consideration for start-ups in University/College towns who rely on Co-Op students. Specifically:

  1. Was it hard to hire junior programmers to write Haskell? (i.e. do young coders know about Haskell and/or see the appeal)
  2. Is writing Haskell appealing to juniour / co-op students?
  3. Are junior programmers able to learn Haskell quick enough? Can they become productive in Haskell in a short, summer-long co-op? How long did it take?
  4. Any tips or advice on interviewing junior / co-op programmers?
  5. What didn't work? What did?


submitted by aaronlevin
[link] [29 comments]
Categories: Incoming News

Elm-like IDE for Haste projects

haskell-cafe - Thu, 09/04/2014 - 9:23pm
Following the thread on lightweight Web interfaces for Haskell: I finished an Elm-like IDE for Haste projects. The software is at: Running in a heroku instance: Besides to edit-compile and run, it can also import , compile and run haste projects from git repositories (Although this, like the rest of the project is experimental). I use it for my hplayground framework but it can run any haste project. Using playground is easy to translate console programs to the browser and have reactive effects A simple example: the hello-haste example: Or something more complicated: the todo application, from written in Haste and hplayground: rename the programs if you modify them. Follow the instructions to download the
Categories: Offsite Discussion