News aggregator

FFI - Approaches to C/C++

haskell-cafe - Thu, 01/31/2013 - 7:41am
Hi, I'm working on a project in Haskell and C++ where the former is the brains and the latter is for UI, interaction etc. I've read this http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ and a number of other haskell posts suggesting the OOP is not the way to go. Without trying to emulate functional programming through templates or boost::phoenix, what approaches do you all favor when designing parts of an application in C++? Patterns to embrace or avoid? Should I just use functions and handle things with name spaces? I was thinking about handling the callbacks with boosts signals and slots 2 I know this is not entirely haskell centric, but it is a question for haskell users. Thanks, Casey
Categories: Offsite Discussion

Yesod Web Framework: The School of Haskell

Planet Haskell - Thu, 01/31/2013 - 7:30am

I'm quite excited to be able to announce that FP Complete is launching a new product, the School of Haskell. We're now accepting beta signups. You can find out much more in Bartosz's release announcement.

Categories: Offsite Blogs

Haskell Weekly News: Issue 256

General haskell list - Thu, 01/31/2013 - 4:39am
Welcome to issue 256 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the weeks of January 20 to 26, 2013. Quotes of the Week * elliott: cmccann: unfortunately it is too perfect an abstraction to be useful. * SamanthaD: shachaf: you're one of those dirty imperative communists who want the state to dictate everything! * monochrom: I refuse camel case and mark zuckerberg. same level. not negotiable. * mauke: a newtype is like an existing type but wearing glasses and a fake mustache and a sign saying "you've never seen me before" Top Reddit Stories * Taking magic out of GHC or: Tracing compilation by transformation (intro to Core transformations, inlining,.. Domain: ics.p.lodz.pl, Score: 59, Comments: 2 On Reddit: [1] http://goo.gl/lJmsb Original: [2] http://goo.gl/IbJ5O * Introduction to Haskell IO Domain: haskellforall.com, Score: 57, Comments: 26 On Reddi
Categories: Incoming News

Neil Mitchell: Shake 0.8 is out

Planet Haskell - Thu, 01/31/2013 - 3:59am
Summary: Shake 0.8 is out, ask any questions on StackOverflow

Shake is a build system I have been working on sporadically for the last four years, think of it as a better alternative to writing Makefiles. In the past few weeks I've released versions 0.6, 0.7 and 0.8.

Questions about Shake

Unlike many of my other libraries, Shake invites user questions. It's a complex tool with lots of power to wield, and lots of aspects that emerge from the API, rather than being obvious from it. Therefore, I encourage anyone with any questions about Shake to ask them against the shake-build-system StackOverflow tag (thanks to Lennart Augustsson for creating the tag, as my reputation is too low). I've already asked one question, but I'm sure there are lots of others - "how does Shake/Make compare to monad/arrow?", "why did the Oracle change type?", "how would I define a rule that downloads from the web?". The more questions the easier it will be for future Shake users to find the information they need.

API Change: getDirectoryFiles

There is only one real breaking API change in the above series of versions, getDirectoryFiles now takes a list of FilePatterns. So you can write:

getDirectoryFiles "Configuration" ["*.xml","*.json"]

to find all XML and JSON files in your Configuration directory. The reason for this change is to introduce a new and more powerful matching capability, so you can also write:

getDirectoryFiles "Configuration" ["//*.xml","//*.json"]

And that will find all XML and JSON files anywhere under the Configuration directory. Shake tries hard to issue the minimum number of directory traversals, so searching for a list of patterns results in fewer file system queries than searching for each pattern individually.
Categories: Offsite Blogs

TIPS: To Insure Package Sanity

haskell-cafe - Thu, 01/31/2013 - 3:19am
If you possess multiple instances (may be different versions, may be same version different builds) of a package, life can be hard and confusing. The problems are explained in my http://www.vex.net/~trebla/haskell/sicp.xhtml and faced by many people regularly. (Just read this mailing list.) cabal-install has a mechanism for not adding more instances. It is available since version 0.14.0, or earlier. It is just little known. It is also a bit manual. You have to give 1 instruction for each package. If you want to say it for n packages, you have to give n instructions. Also, if you give such an instruction for a package you do not already have, there is a problem: now you can't install that package. To insure package sanity, add these lines to your $HOME/.cabal/config, one line per package you want to protect. (Cannot merge into one line.) constraint: array installed constraint: bytestring installed constraint: Cabal installed constraint: containers installed ... Generally, do it for every package
Categories: Offsite Discussion

Jan Stolarek: New domain is here

Planet Haskell - Thu, 01/31/2013 - 3:01am

On Tuesday I moved my blog to a different domain. Please update your bookmarks to point to http://lambda.jstolarek.com (the old address will redirect you anyway) and your RSS feeds to http://lambda.jstolarek.com/feed/. Because of domain change your RSS readers might have downloaded all the posts that you have already read – sorry for that. I know that in the past some of you have been experiencing problems with my blog: the directory listing was displayed instead of the main page. I am unable to resolve that problem on the server I am currently using so the plan is to move to a more reliable machine. New domain will make this change transparent. Big thanks go to my friend Robert for helping me with all of this.

Categories: Offsite Blogs

Package conflicts using cabal-dev

haskell-cafe - Wed, 01/30/2013 - 11:29pm
Hello, I am running into a strange issue that reminds me of Java's classloader black magic havoc :-) My code compiles fine using cabal-dev install, but when I try to compile an individual file with ghc, I got the following error: $ ghc -package-conf cabal-dev/packages-7.4.1.conf YakGraph.hs [1 of 1] Compiling YakGraph ( YakGraph.hs, YakGraph.o ) YakGraph.hs:13:30: Couldn't match expected type `Data.Text.Lazy.Internal.Text' with actual type `text-0.11.2.0:Data.Text.Lazy.Internal.Text' In the first argument of `unpack', namely `s' In the expression: unpack s In an equation for `fromGraphId': fromGraphId (Str s) = unpack s YakGraph.hs:24:57: Couldn't match expected type `Data.Text.Lazy.Internal.Text' with actual type `text-0.11.2.0:Data.Text.Lazy.Internal.Text' In the first argument of `unpack', namely `name' In the expression: unpack name In a case alternative: (Just (Str name)) : _ -> unpack name The code leading to this error is he
Categories: Offsite Discussion

Haskellでお絵描き - TIM Labs

del.icio.us/haskell - Wed, 01/30/2013 - 10:57pm
Categories: Offsite Blogs

Ticking time bomb

haskell-cafe - Wed, 01/30/2013 - 9:27pm
https://status.heroku.com/incidents/489 Unsigned Hackage packages are a ticking time bomb. Cheers, Edward
Categories: Offsite Discussion

Haskell Weekly News: Issue 256

Haskell on Reddit - Wed, 01/30/2013 - 8:42pm
Categories: Incoming News

Proposal to extend FieldPat in Template Haskell

glasgow-user - Tue, 01/29/2013 - 11:25pm
Hello, (sorry for the repost, I forgot to add a subject.) I was just doing some work with Template Haskell and I noticed that the AST does not have support for record puns and wild-cards. I know that these could be desugared into ordinary record patterns but I think that it would be more convenient for users (and also more consistent with the rest of the AST) if we provided direct support for them. So I propose to change: type FieldPat = (Name, Pat) to data FieldPat = RecordFileldP Name Pat -- x = P | RecordPunP Name -- x | RecordWildP -- .. Would there be any objections to doing so? If not, I'd be happy to have a go at making the change. -Iavor _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Categories: Offsite Discussion

(unknown)

glasgow-user - Tue, 01/29/2013 - 11:23pm
Hello, I was just doing some work with Template Haskell and I noticed that the AST does not have support for record puns and wild-cards. I know that these could be desugared into ordinary record patterns but I think that it would be more convenient for users (and also more consistent with the rest of the AST) if we provided direct support for them. So I propose to change: type FieldPat = (Name, Pat) to data FieldPat = RecordFileldP Name Pat -- x = P | RecordPunP Name -- x | RecordWildP -- .. Would there be any objections to doing so? If not, I'd be happy to have a go at making the change. -Iavor _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Categories: Offsite Discussion

Request for review of a GADT tutorial draft

glasgow-user - Mon, 01/28/2013 - 8:40am
Dear Haskell community, I have recently written an introductory-level tutorial article about GADTs in GHC (inspired by LASER 2012 summer school and to be submitted to their proceedings). I have already send this draft to the "Haskell Cafe" mailing list, but I was also advised to use these mailing lists, so I would like to ask for your feedback: http://anton-dergunov.ru/publications/gadts_draft_v4.pdf Any opinion about this article and any suggestions are very welcome!
Categories: Offsite Discussion

How to get started with a new backend?

glasgow-user - Mon, 01/28/2013 - 3:15am
I would like to explore making a backend for .NET. I've done a lot of background reading about previous .NET and JVM attempts for Haskell. It seems like several folks have made significant progress in the past and, with the exception of UHC, I can't find any code around the internet from the previous efforts. I realize that in total it's a huge undertaking and codegen is only one of several significant hurdles to success. I would like to get a very, very, very simple translation working inside GHC. If all I can compile and run is fibonacci, then I would be quite happy. For my first attempt, proof of concept is sufficient. I found a lot of good documentation on the ghc trac for how the compilation phases work and what happens in the different parts of the backend. The documentation is excellent, especially compared to other compilers I've looked at. When I started looking at how to write the code, I started to wonder about the "least effort" path to getting something (anything?) working. Here are some ques
Categories: Offsite Discussion

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!

~d

Categories: Incoming News