News aggregator

Map data structure of entire application?

Haskell on Reddit - Sat, 09/06/2014 - 3:38pm

Anyone know of a utility that could map the data structure of an application? I guess that in a statically typed language it should be possible to trace the data dependencies of all variables and create a graph of them, where variables are nodes and functions are edges. Is there anything like this?

submitted by scottansan
[link] [2 comments]
Categories: Incoming News

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: http://www.cs.uu.nl/foswiki/Helium/WebHome 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

Hi!

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.

Presentation: https://www.youtube.com/watch?v=ze0SGPOcfTM

Code examples: https://github.com/printron/feb-2014-monad

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