Re: [Haskell-cafe] DpH/repa cache locality

2010-07-13 Thread Dominique Devriese
Hi, 2010/7/13 Gregory Crosswhite gcr...@phys.washington.edu: Just out of curiosity, what work is being done in the data parallel haskell / repa projects regarding cache locality? Hi, I'm not knowledgeable at all about this, but for a technical introduction to DPH, I found the following

[Haskell-cafe] Please report any bug of gtk2hs-0.11.0!

2010-07-13 Thread Andy Stewart
Hi all, We plan to release bug fix version : gtk2hs-0.11.1 Please report any bug of gtk2hs-0.11.0, we will fix it before release gtk2hs-0.11.1 We plan to add many new APIs in gtk2hs-0.12.0, so gtk2hs-0.11.1 will be the last stable version with current APIs. Thanks for your help! -- Andy

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: Haskell 2010 Report (final)

2010-07-13 Thread Simon Marlow
On 12/07/2010 18:29, Felipe Lessa wrote: On Mon, Jul 12, 2010 at 9:50 AM, Simon Marlowmarlo...@gmail.com wrote: And hopefully things will improve over time, as fewer packages will need to depend on base. We could also start pulling out APIs that are currently in base into separate packages,

[Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread vadali
hello, iam really new to haskell, i want to define a function which takes as a parameter a list which can contain other lists, eg. [1,[2,3],[4,[5,6]]] how would i define a function that can iterate through the items so (in this example) iter1 = 1 iter2 = [2,3] iter3 = [4,[5,6]] ? ( can i do

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Christopher Done
On 13 July 2010 10:58, vadali shlomivak...@gmail.com wrote: hello, iam really new to haskell, i want to define a function which takes as a parameter a list which can contain other lists, eg. [1,[2,3],[4,[5,6]]] how would i define a function that can iterate through the items so (in this

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Johan Tibell
Hi Vadali, On Tue, Jul 13, 2010 at 10:58 AM, vadali shlomivak...@gmail.com wrote: hello, iam really new to haskell, i want to define a function which takes as a parameter a list which can contain other lists, eg. [1,[2,3],[4,[5,6]]] how would i define a function that can iterate through

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Ivan Lazar Miljenovic
vadali shlomivak...@gmail.com writes: hello, iam really new to haskell, i want to define a function which takes as a parameter a list which can contain other lists, eg. [1,[2,3],[4,[5,6]]] how would i define a function that can iterate through the items so (in this example) iter1 = 1

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Shlomi Vaknin
Thank you all for replying! I am really beginning my baby steps in this fascinating language, and was just wondering if it was possible to naturally scan lists with arbitrary lists (aka trees :) ). I guess this forum specifically is too advancaed for me (yet!), so my next questions will be

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Vo Minh Thu
2010/7/13 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com: vadali shlomivak...@gmail.com writes: hello, iam really new to haskell, i want to define a function which takes as a parameter a list which can contain other lists, eg. [1,[2,3],[4,[5,6]]] how would i define a function that can

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Thomas Davie
On 13 Jul 2010, at 10:11, Shlomi Vaknin wrote: Thank you all for replying! I am really beginning my baby steps in this fascinating language, and was just wondering if it was possible to naturally scan lists with arbitrary lists (aka trees :) ). Trees aren't lists, Trees are trees...

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Haskell 2010 Report (final)

2010-07-13 Thread Simon Marlow
On 12/07/2010 22:12, John Meacham wrote: On Mon, Jul 12, 2010 at 01:50:01PM +0100, Simon Marlow wrote: Right. I like the idea of packages being able to declare re-exported modules, indeed I considered doing this in GHC (when we needed base3) but decided not to mainly because we would still

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Shlomi Vaknin
Thank you Bob, your example clarified how actually using such data type would appear in haskell. I naively thought it would be as simple as defining a regular list, but i see it is slightly more strict than that. I appreciate your help! Vadali On Tue, Jul 13, 2010 at 11:18 AM, Thomas Davie

[Haskell-cafe] Re: Please report any bug of gtk2hs-0.11.0!

2010-07-13 Thread Christian Maeder
Andy Stewart schrieb: Hi all, We plan to release bug fix version : gtk2hs-0.11.1 Please report any bug of gtk2hs-0.11.0, we will fix it before release gtk2hs-0.11.1 I'm looking forward for this bug-fix release (since gtk2hs-0.11.0 did not work for me). Because I've almost missed this

Re: [Haskell-cafe] Re: Finding zipper for custom tree

2010-07-13 Thread Sergey Mironov
2010/7/2 Heinrich Apfelmus apfel...@quantentunnel.de: Sergey Mironov wrote: Hello list! I am trying to understand zipper concept using papers like [1] and [2]. Though main idea looks clear, I still have a problem in applying it for custom data types. Please help me with deriving

Re: [Haskell-cafe] Re: Functional dependencies and Peano numbers

2010-07-13 Thread Brent Yorgey
On Sun, Jul 11, 2010 at 12:43:47AM +0200, Jose A. Ortega Ruiz wrote: On Sat, Jul 10 2010, wren ng thornton wrote: [...] Yes, you can add multiple dependencies. The syntax is to use , after the first |. While having eight parameters is surely a desperate need for refactoring,

Re: [Haskell-cafe] lambda calculus and equational logic

2010-07-13 Thread Brent Yorgey
On Wed, Jul 07, 2010 at 09:56:08AM +0100, Patrick Browne wrote: Hi, In Haskell what roles are played by 1)lambda calculus and 2) equational logic? Are these roles related? Hopefully this question can be answered at a level suitable for this forum. Since no one else has responded I'll take a

Re: [Haskell-cafe] ByteString, zipWith', and rewrite rules

2010-07-13 Thread Henning Thielemann
Thomas M. DuBuisson wrote: Comments on the zipWith' function inside of Data.ByteString say: -- Rewrite rules -- are used to automatically covert zipWith into zipWith' when a pack is -- performed on the result of zipWith. This is only true internally to Data.ByteString because the zipWith'

[Haskell-cafe] Marshalling

2010-07-13 Thread Phyx
Hello I'm wondering if anyone ever benchmarked marshalling in Haskell/GHC. No matter how much I optimize my Haskell code my program still seems to run slow, which leads me to beleive that Marshalling is painfully slow. Does anyone know a way I can test this and fix it? Regards, Phyx

Re: [Haskell-cafe] Marshalling

2010-07-13 Thread Magnus Therning
On Tue, Jul 13, 2010 at 13:29, Phyx loneti...@gmail.com wrote: Hello I'm wondering if anyone ever benchmarked marshalling in Haskell/GHC. No matter how much I optimize my Haskell code my program still seems to run slow, which leads me to beleive that Marshalling is painfully slow. Does

Re: [Haskell-cafe] lambda calculus and equational logic

2010-07-13 Thread Ben Lippmeier
On 13/07/2010, at 20:47 , Brent Yorgey wrote: On Wed, Jul 07, 2010 at 09:56:08AM +0100, Patrick Browne wrote: Hi, In Haskell what roles are played by 1)lambda calculus and 2) equational logic? Are these roles related? Hopefully this question can be answered at a level suitable for this

Re: [Haskell-cafe] lambda calculus and equational logic

2010-07-13 Thread Peter Gammie
Ben, comments from the peanut gallery: On 13/07/2010, at 11:51 PM, Ben Lippmeier wrote: What kind of equality do you use for getChar :: IO Char ? Surely this is easy: getChar denotes a particular IO action, which is always the same thing (i.e. self-identical and distinct from all other IO

[Haskell-cafe] New FGL naming survey

2010-07-13 Thread Ivan Lazar Miljenovic
Whether or not the new FGL that Thomas Bereknyei and I are working on should keep the name was a semi-hot issue when we first mentioned the fact that we were working on a new version about a month ago. As such, I've created a survey here to try and find out what the Haskell community overall

Re: [Haskell-cafe] Re: The site has been exploited (again)

2010-07-13 Thread Mike Dillon
begin Gwern Branwen quotation: Ashley has made me admin; I've spent the last 1.5 hours deleting all the vandalism and indef blocking the accounts. I have Recent Changes in my RSS reader, so hopefully in the future there will be no greater than 24 hours delay before vandalism is dealt with. A

Re: [Haskell-cafe] Marshalling

2010-07-13 Thread Phyx
Marshalling large amount of data from and to C http://phyx.pastebin.com/WXGBr1bX shows the code I use to do this (it's autogenerated, so just looking at 1 block should be enough) The tool is mine, so i can change the code it generates, but i would need to know how to do it better first. On Tue,

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4

2010-07-13 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/12/10 22:29 , Richard O'Keefe wrote: On Jul 11, 2010, at 9:38 AM, wren ng thornton wrote: Generally OSX takes UTF16 to be the standard encoding (I don't recall if it's LE or BE), though UTF8 is supported almost everywhere. I haven't checked

Re: [Haskell-cafe] Marshalling

2010-07-13 Thread Thomas DuBuisson
That code is effectively copying the data (thats what those peeks / pokes do), so it stands to reason it would be slow by most performance standards. The reason ByteStrings are fast when used both by C and Haskell is there is a zero-copy `useAsCString`. Cheers, Thomas On Tue, Jul 13, 2010 at

Re: [Haskell-cafe] Marshalling

2010-07-13 Thread Phyx
I understand that part, but the strings are generated from SDocs, and So unless internally SDoc doesn't use String then I'm afraid there's nothing I can do about that :/ Or rather, Is there a way to efficiently make CWStrings from SDocs? Regards, Phyx On Tue, Jul 13, 2010 at 6:56 PM, Thomas

Re: [Haskell-cafe] Comments on Haskell 2010 Report

2010-07-13 Thread Nick Bowler
On 16:21 Fri 09 Jul , John Meacham wrote: I would think it is a typo in the report. Every language out there seems to think 0**0 is 1 and 0**y | y /= 0 is 0. I am not sure whether it is mandated by the IEEE standard but a quick review doesn't say they should be undefined (and the report

Re: [Haskell-cafe] Re: The site has been exploited (again)

2010-07-13 Thread Don Stewart
gwern0: Ashley has made me admin; I've spent the last 1.5 hours deleting all the vandalism and indef blocking the accounts. I have Recent Changes in my RSS reader, so hopefully in the future there will be no greater than 24 hours delay before vandalism is dealt with. A MW upgrade will also

[Haskell-cafe] AngloHaskell 2010

2010-07-13 Thread Derek Wright
Are you interested in AngloHaskell 2010? AngloHaskell is a gathering of all people Haskell-related from beginners to seasoned hackers. Previously it has been held in Cambridge (three times) and London (once). Last year I volunteered to organise it but I want know when you can attend.

[Haskell-cafe] library for objective-j?

2010-07-13 Thread Günther Schmidt
Hi all, is there a haskell library for generating Objective-J? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] lambda calculus and equational logic

2010-07-13 Thread Patrick Browne
In Haskell what roles are played by 1)lambda calculus and 2) equational logic? Are these roles related? Hi, Thanks for your clear and helpful responses. I am aware that this question can lead to into very deep water. I am comparing Haskell with languages based on equational logic (EL) (e.g.

Re: [Haskell-cafe] library for objective-j?

2010-07-13 Thread Jason Dagit
2010/7/13 Günther Schmidt gue.schm...@web.de Hi all, is there a haskell library for generating Objective-J? http://www.google.co.uk/search?hl=enas_sitesearch=hackage.haskell.org/packageas_q=object-j Hackage upload or it didn't happen! Jason ___

Re: [Haskell-cafe] library for objective-j?

2010-07-13 Thread Günther Schmidt
Jason dearest, http://hoc.sourceforge.net/ did happen but isn't on hackage, WASH did happen but isn't on hackage ... and I presume quite a few other goodies didn't make it to hackage either. So I was hoping I'd finally be admitted to the inner haskellers circle where the dark arts are

[Haskell-cafe] [Newbie] What to improve in my code

2010-07-13 Thread Frank1981
First of all: I'm not sure if this question is allowed here. If not, I apologize I'm trying to solve the following problem: For each word in a text find the number of occurences for each unique word in the text. i've come up with the following steps to solve this: * remove all punctuation

Re: [Haskell-cafe] library for objective-j?

2010-07-13 Thread Jason Dagit
2010/7/13 Günther Schmidt gue.schm...@web.de Jason dearest, http://hoc.sourceforge.net/ did happen but isn't on hackage, http://code.google.com/p/hoc/issues/detail?id=26#c0 WASH did happen but isn't on hackage ... http://hackage.haskell.org/package/WashNGo

[Haskell-cafe] Collecting MonadError errors generically

2010-07-13 Thread Leon Grynszpan
Hello, This is my first post to the Haskell Café, and I'm hoping the issue I'm tackling here isn't one that's been thoroughly explored elsewhere. If that's the case, I'll apologize in advance for my insufficient google chops. Otherwise, here goes... I do a lot of work within the error monad.

Re: [Haskell-cafe] [Newbie] What to improve in my code

2010-07-13 Thread Daniel Fischer
On Tuesday 13 July 2010 23:49:45, Frank1981 wrote: First of all: I'm not sure if this question is allowed here. If not, I apologize I'm trying to solve the following problem: For each word in a text find the number of occurences for each unique word in the text. i've come up with the

Re: [Haskell-cafe] Collecting MonadError errors generically

2010-07-13 Thread Gregory Crosswhite
Leon, In order to avoid the short-circuiting behaviour, it might help you to work in terms of Applicatives instead of Monads. For example, in my error-message package I have the following instance: instance (Monoid e) = Applicative (Either e) where pure = Right (*) (Left error2) (Left

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Richard O'Keefe
On Jul 13, 2010, at 9:00 PM, Christopher Done wrote: On 13 July 2010 10:58, vadali shlomivak...@gmail.com wrote:\ i want to define a function which takes as a parameter a list which can contain other lists, eg. [1,[2,3],[4,[5,6]]] What would the type of a list like that be? What you

Re: [Haskell-cafe] lambda calculus and equational logic

2010-07-13 Thread Richard O'Keefe
On Jul 14, 2010, at 1:51 AM, Ben Lippmeier wrote: Replacing equals by equals usually doesn't change anything. What kind of equality do you use for getChar :: IO Char ? The usual one: getChar = getChar. It's a pure value. If I find [getChar,getChar] in a program, I can safely replace it by

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4

2010-07-13 Thread Richard O'Keefe
wren is half right: at the level of Unixy APIs (and this includes anything that goes on in a Terminal window and anything that you will be doing from Haskell) you use UTF8, but OSX APIs --- that is, Carbon and Cocoa --- use UTF16. So for the purposes of ghc/jhc OSX is UTF8, but if

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: Haskell 2010 Report (final)

2010-07-13 Thread John Meacham
On Tue, Jul 13, 2010 at 10:24:00AM +0100, Simon Marlow wrote: Well, a main useful case is that I can do -phaskell98 and -phaskell2010 at the same time. So I can make the default jhc behavior be the union of the two languages easily. That works in GHC too: the modules of those two packages

[Haskell-cafe] Re: New FGL naming survey

2010-07-13 Thread Ivan Miljenovic
Thank you for all the people who have voted; we so far have 42 results in about 12 hours. Some indication of the results so far: * 62% prefer inductive-graphs * 62% have indicated that they use fgl or do some graph-related stuff (no correlation, just an interesting coincidence; I have not as

Re: [Haskell-cafe] Re: Please report any bug of gtk2hs-0.11.0!

2010-07-13 Thread briand
Short version of this post: Looks like the intsall depends on alex and that dependencies doesn't appear to be handled, i.e. I had to install alex before proceeding. why do is it called gtk2hs if you are actually installing package gtk ;-) Where's the demo directory ?! Moral of the story: don't

Re: [Haskell-cafe] Re: Please report any bug of gtk2hs-0.11.0!

2010-07-13 Thread Ivan Miljenovic
On 14 July 2010 14:52, bri...@aracnet.com wrote: Short version of this post: Looks like the intsall depends on alex and that dependencies doesn't appear to be handled, i.e. I had to install alex before proceeding. Yes, cabal-install isn't able to cope with the build-tools dependencies. why