Re: [Haskell-cafe] Inputs to classic FRP: unsafeInterleaveIO/unsafePerformIO

2011-04-26 Thread Heinrich Apfelmus
Ryan Ingram wrote: Apfelmus, I hope you don't abandon your efforts, at least for the selfish reason that I enjoy reading your blog entries about trying to implement it! :D My reasoning was that a temporary demand-driven implementation would allow me to release the library sooner; I want peopl

Re: [Haskell-cafe] plugins and cabal build

2011-04-26 Thread Michael Snoyman
On Tue, Apr 26, 2011 at 4:56 PM, Andy Stewart wrote: > Ivan Lazar Miljenovic writes: > >> On 26 April 2011 04:57, Michael Snoyman wrote: >>> Hi all, >>> >>> I'm experimenting with using the plugins package for yesod devel >>> server. The basic approach is to use cabal for building the object >>>

Re: [Haskell-cafe] How to keep cabal and ghci package versions in sync?

2011-04-26 Thread Peter Gammie
On 27/04/2011, at 3:04 AM, Rogan Creswick wrote: > At the moment, cabal-dev ghci just uses the -package-conf and > -no-user-package-conf flags to restrict ghci to the sandboxed and > global package dbs. > > It's difficult to do more without parsing the content of the project's > cabal file, and t

Re: [Haskell-cafe] Good reads?

2011-04-26 Thread Eric Rasmussen
I'm currently reading Real World Haskell ( http://book.realworldhaskell.org/read/), and it's an excellent book. It goes into detail on quite a few interesting and practical uses of the language. Also, in the spirit of this discussion, is there a resource that attempts to compare libraries for comm

Re: [Haskell-cafe] ANN: Leksah 0.10.0

2011-04-26 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/26/11 09:15 , Daniel Fischer wrote: > On Tuesday 26 April 2011 02:00:32, jutaro wrote: >> Well, it is a bit more intricate to invert the sides. After >> * swapping LeftP and RightP in Edit Prefs -> Initial Pane positions >> * Close all panes and p

Re: [Haskell-cafe] Good reads?

2011-04-26 Thread Edward Amsden
On Tue, Apr 26, 2011 at 5:48 PM, Christopher Svanefalk wrote: > I am currently reading through Peyton-Jones "Haskell: The Craft of > Functional Programming" (2nd ed.), as well as a great paper published by > one of my professors > (http://www.cse.chalmers.se/~rjmh/Papers/whyfp.html). However, what

Re: [Haskell-cafe] Can't install haskellnet with ghc7

2011-04-26 Thread Vincent Hanquez
On 04/26/2011 10:17 PM, Charles-Pierre Astolfi wrote: Hi -cafe, Did anybody managed to install haskellnet from hackage with ghc7? I tried on windows and mac and I get the following type error: [ 4 of 11] Compiling Network.HaskellNet.SMTP ( Network/HaskellNet/SMTP.hs, dist/build/Network/Haskell

[Haskell-cafe] Creating polygons in qtHaskell

2011-04-26 Thread Øystein Kolsrud
Hi! I'm using qtHaskell and I'm trying to create a QGraphicsPolygonItem object. From what I see I need to create a QPolygonF item that I can supply to the constructor, but to populate the QPolygonF I need to use methods of the QVector class that QPolygonF inherits and I can't figure out how to do t

[Haskell-cafe] Good reads?

2011-04-26 Thread Christopher Svanefalk
[I originally posted this over in haskell-beginners. However, since this list has a lot more traffic, and I am not sure how many people read both lists, I thought I would post here as well. I apologize for the doublepost! Just want to make sure I can get some replies from the great people here who

[Haskell-cafe] Can't install haskellnet with ghc7

2011-04-26 Thread Charles-Pierre Astolfi
Hi -cafe, Did anybody managed to install haskellnet from hackage with ghc7? I tried on windows and mac and I get the following type error: [ 4 of 11] Compiling Network.HaskellNet.SMTP ( Network/HaskellNet/SMTP.hs, dist/build/Network/HaskellNet/SMTP.o ) Network/HaskellNet/SMTP.hs:269:25: Could

Re: [Haskell-cafe] HipmunkPlayground compile error

2011-04-26 Thread Andrew Pennebaker
Thanks for the tip. GHC 7.0.3 does seem to fix a couple bugs, and maybe even run faster than GHC 7.0.2. But it doesn't solve the problem. $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.0.3 $ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cab

Re: [Haskell-cafe] ANNOUNCE: iteratee-compress 0.2.0.0

2011-04-26 Thread Maciej Piechotka
On Mon, 2011-04-25 at 15:47 +0900, Conrad Parker wrote: > On 23 April 2011 19:29, Maciej Piechotka wrote: > > Iteratee-compress provides compressing and decompressing enumerators > > including flushing (using John Lato's implementation). Currently only > > gzip and bzip is provided but LZMA is pla

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Sergei Trofimovich
> > 2. I have no idea how to make Darcs do the thing with "hard links" (is that > > even supported under Windows?) I just copy the whole folder using the normal > > OS file tools. > > darcs get path/to/other/local/repo > > > Either way, you lose the ability to see how branches are related to each

Re: [Haskell-cafe] Inputs to classic FRP: unsafeInterleaveIO/unsafePerformIO

2011-04-26 Thread Ryan Ingram
Apfelmus, I hope you don't abandon your efforts, at least for the selfish reason that I enjoy reading your blog entries about trying to implement it! I was looking at your last entry and trying to understand if/how you solve the order-dependency problem for events. In particular: source events e

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-26 Thread John Lato
On Tue, Apr 26, 2011 at 6:32 PM, John Millikin wrote: > On Tuesday, April 26, 2011 7:19:25 AM UTC-7, John Lato wrote: > >> I'd be interested to see the results of a shootout between iteratee and >> enumerator. I would expect them to be basically equivalent most of the >> time, with maybe two or

Re: [Haskell-cafe] Haskell User Group starter kit

2011-04-26 Thread aditya siram
Yes! This is a great idea. I'm a Haskell enthusiast in St. Louis, MO, USA and have given numerous talks on Haskell locally at Lambda Lounge[1], a catch-all groups for functional programmers, and the St.Louis Perl Mongers[2]. I would love to have a dedicated Haskell User Group, but unfortunately t

[Haskell-cafe] Haskell User Group starter kit

2011-04-26 Thread Eric Y. Kow
Hi all, We may be coming to a time where we start to see Haskell User Groups or Functional Programming clubs popping up all the over the place. Maybe it's a good time to put our heads together and figure out what we can do to nurture these groups, to keep them going strong rather than fizzling ou

[Haskell-cafe] ANNOUNCE: cereal-0.3.3.0

2011-04-26 Thread Trevor Elliott
Hot on the heels of the last release, cereal-0.3.3.0 [1] adds support for parsing and rendering lazy ByteStrings. Most running functions in Data.Serialize.Get and Data.Serialize.Put now have lazy analogues, and Data.Serialize has gained encodeLazy and decodeLazy. This new functionality was made p

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-26 Thread John Millikin
On Tuesday, April 26, 2011 7:19:25 AM UTC-7, John Lato wrote: > I'd be interested to see the results of a shootout between iteratee and > enumerator. I would expect them to be basically equivalent most of the > time, with maybe two or three operations with a small (but consistent) > difference

Re: [Haskell-cafe] How to keep cabal and ghci package versions in sync?

2011-04-26 Thread Rogan Creswick
On Tue, Apr 26, 2011 at 2:10 AM, Gracjan Polak wrote: > > I kind of expected 'cabal-dev ghci' to do this for me. At the moment, cabal-dev ghci just uses the -package-conf and -no-user-package-conf flags to restrict ghci to the sandboxed and global package dbs. It's difficult to do more without p

Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Bryan O'Sullivan
On Tue, Apr 26, 2011 at 9:16 AM, Daniel Kahlenberg wrote: > > hold on I'd like to have the genArray call generating distinctive > results in one IO execution The problem you're seeing is due to the fact that you're not taking the final RNG state from the first execution of your code and passing

Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Daniel Kahlenberg
Oh thanks, hold on I'd like to have the genArray call generating distinctive results in one IO execution (meaning when I load the .lhs file in ghci): Prelude> genArray [ThingK True,Thing1 False] and when calling immediately again e. g. Prelude> genArray [Thing1 True] By now I only get one and

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Maciej Marcin Piechotka
On Tue, 2011-04-26 at 16:34 +0200, Daniel Fischer wrote: > On Tuesday 26 April 2011 16:04:55, Nick Bowler wrote: > > On 2011-04-26 15:51 +0200, Daniel Fischer wrote: > > > On Tuesday 26 April 2011 15:35:42, Ivan Lazar Miljenovic wrote: > > > > How do you "see" how git branches are related to each o

Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Bryan O'Sullivan
On Tue, Apr 26, 2011 at 3:04 AM, Daniel Kahlenberg < d.kahlenb...@googlemail.com> wrote: > Thought getRandom function would be the best place to inject my unGen > function > call, but cannot get it to type-check: > You haven't described what it is you're actually trying to do, and I'm afraid your

[Haskell-cafe] typing hmatrix expressions

2011-04-26 Thread Carter Schonwald
hello alberto, i've had some funny issues with using the cmap function, and i'd like understand what i'm doing wrong namely it wont correctly instantiate for vectors or matrices and I don't understand why. basically my question is: what is the correct type for the hmatrix expression mapMat f =

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Radoslav Dorcik
On Tue, Apr 26, 2011 at 3:16 PM, Andrew Coppin wrote: > Presumably David thought the same. I won't deny that there is a certain > simplifying elegance to it. > >>> It does mean that you duplicate information. You have [nearly] the same >>> set of patches stored twice, >> >> No, if on the same mach

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Daniel Fischer
On Tuesday 26 April 2011 16:04:55, Nick Bowler wrote: > On 2011-04-26 15:51 +0200, Daniel Fischer wrote: > > On Tuesday 26 April 2011 15:35:42, Ivan Lazar Miljenovic wrote: > > > How do you "see" how git branches are related to each other? > > > > To some extent, you can see such a relation in git

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-26 Thread John Lato
Joining slightly late... > From: John Millikin > > John Lato's "iteratee" package is based on IterateeMCPS.hs[1]. I used > IterateeM.hs for "enumerator", because when I benchmarked them the non-CPS > version was something like 10% faster on most operations. > Based on tests I did before iterate

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Nick Bowler
On 2011-04-26 15:51 +0200, Daniel Fischer wrote: > On Tuesday 26 April 2011 15:35:42, Ivan Lazar Miljenovic wrote: > > How do you "see" how git branches are related to each other? > > To some extent, you can see such a relation in gitk. For mercurial, hg glog > also shows a bit. I suppose there's

Re: [Haskell-cafe] plugins and cabal build

2011-04-26 Thread Andy Stewart
Ivan Lazar Miljenovic writes: > On 26 April 2011 04:57, Michael Snoyman wrote: >> Hi all, >> >> I'm experimenting with using the plugins package for yesod devel >> server. The basic approach is to use cabal for building the object >> files, and then load them with plugins. I can get everything t

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Daniel Fischer
On Tuesday 26 April 2011 15:35:42, Ivan Lazar Miljenovic wrote: > How do you "see" how git branches are related to each other? To some extent, you can see such a relation in gitk. For mercurial, hg glog also shows a bit. I suppose there's also something to visualise branches in bazaar, but I've

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-26 Thread Ertugrul Soeylemez
wren ng thornton wrote: > But the greatest thing about Maybe is that you don't *have* to write > code in monadic style. Because Maybe makes explicit the null-pointer > shenanigans in other languages, you can simply unwrap the Maybe and > pass around the raw value instead of letting Nothing permea

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Jason Dagit
On Tue, Apr 26, 2011 at 6:35 AM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > On 26 April 2011 13:16, Andrew Coppin wrote: > > > > 2. I have no idea how to make Darcs do the thing with "hard links" (is > that > > even supported under Windows?) I just copy the whole folder using the

Re: [Haskell-cafe] converting prefixes of CString <-> String

2011-04-26 Thread Malcolm Wallace
On 26 Apr 2011, at 13:31, Eric Stansifer wrote: >>> Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert >>> Haskell Strings to CStrings. (If I understand correctly, c2h . h2c >>> === id, but h2c . c2h is not the identity on all inputs; >> >> That is correct. CStrings are 8-bits, a

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Ivan Lazar Miljenovic
On 26 April 2011 13:16, Andrew Coppin wrote: > > 2. I have no idea how to make Darcs do the thing with "hard links" (is that > even supported under Windows?) I just copy the whole folder using the normal > OS file tools. darcs get path/to/other/local/repo > Either way, you lose the ability to se

Re: [Haskell-cafe] ANN: Leksah 0.10.0

2011-04-26 Thread Daniel Fischer
On Tuesday 26 April 2011 02:00:32, jutaro wrote: > Well, it is a bit more intricate to invert the sides. After > * swapping LeftP and RightP in Edit Prefs -> Initial Pane positions > * Close all panes and pane groups. (You may leave an editor window open, > so that you better see what happens in th

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Andrew Coppin
This is because of a deliberate choice that was made by David Roundy. In darcs, you never have multiple branches within a single darcs repository directory tree. Yes, this seems clear. I'm just wondering whether or not it's the best design choice. It seems to me to be a considerable insight.

Re: [Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-04-26 Thread Antoine Latter
On Tue, Apr 26, 2011 at 7:27 AM, Erik de Castro Lopo wrote: > Hi all, > > I'm using Wai and http-enumerator to build a http proxy. The core of > the code looks like this: > >    import qualified Network.HTTP.Enumerator     as HE >    import qualified Network.Wai                 as Wai > >    serve

Re: [Haskell-cafe] converting prefixes of CString <-> String

2011-04-26 Thread Eric Stansifer
>> Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert >> Haskell Strings to CStrings.  (If I understand correctly, c2h . h2c >> === id, but h2c . c2h is not the identity on all inputs; > > That is correct.  CStrings are 8-bits, and Haskell Strings are 32-bits.   > Converting from Hask

[Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-04-26 Thread Erik de Castro Lopo
Hi all, I'm using Wai and http-enumerator to build a http proxy. The core of the code looks like this: import qualified Network.HTTP.Enumerator as HE import qualified Network.Wai as Wai serveRequest :: forall (m :: * -> *). (MonadControlIO m, Failure

Re: [Haskell-cafe] plugins and cabal build

2011-04-26 Thread Ivan Lazar Miljenovic
On 26 April 2011 04:57, Michael Snoyman wrote: > Hi all, > > I'm experimenting with using the plugins package for yesod devel > server. The basic approach is to use cabal for building the object > files, and then load them with plugins. I can get everything to work > when I compile with "ghc --mak

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-26 Thread Malcolm Wallace
On 25 Apr 2011, at 11:13, Andrew Coppin wrote: > On 24/04/2011 06:33 PM, Jason Dagit wrote: >> >> This is because of a deliberate choice that was made by David Roundy. >> In darcs, you never have multiple branches within a single darcs >> repository directory tree. > > Yes, this seems clear. I'

Re: [Haskell-cafe] converting prefixes of CString <-> String

2011-04-26 Thread Malcolm Wallace
On 25 Apr 2011, at 08:16, Eric Stansifer wrote: > Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert > Haskell Strings to CStrings. (If I understand correctly, c2h . h2c > === id, but h2c . c2h is not the identity on all inputs; That is correct. CStrings are 8-bits, and Haskell S

Re: [Haskell-cafe] Why does Cabal not choose the latest package?

2011-04-26 Thread Jason Dagit
On Tue, Apr 26, 2011 at 3:22 AM, Emil Axelsson wrote: > Hello! > > I've had some of the usual problems with packages depending on multiple > versions of another package. It seems the root of the hole problem was that > I once attempted to run > > cabal install cabal-install > > This brought in a

[Haskell-cafe] Why does Cabal not choose the latest package?

2011-04-26 Thread Emil Axelsson
Hello! I've had some of the usual problems with packages depending on multiple versions of another package. It seems the root of the hole problem was that I once attempted to run cabal install cabal-install This brought in a number of older packages (Cabal-1.8.0.6, containers-0.3.0.0, dir

[Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Daniel Kahlenberg
Maybe this is a beginners question... But here my problems description: > import Random > import Control.Monad > import qualified Control.Monad.State as S > import Test.QuickCheck.Gen > import Test.QuickCheck.Arbitrary Each thing can have one of three types: > data Ontology = Thing1 Bool >

Re: [Haskell-cafe] How to keep cabal and ghci package versions in sync?

2011-04-26 Thread Gracjan Polak
Henning Thielemann henning-thielemann.de> writes: > You can manually select packages for GHCi with '-package' option. > However I do not know a way to automatically syncronise this with the > dependencies from the Cabal file. > I kind of expected 'cabal-dev ghci' to do this for me. Thanks for h

Re: [Haskell-cafe] HipmunkPlayground compile error

2011-04-26 Thread Jason Dagit
On Tue, Apr 26, 2011 at 1:38 AM, Andrew Pennebaker < andrew.penneba...@gmail.com> wrote: > $ system_profiler SPSoftwareDataType | grep "System Version" > System Version: Mac OS X 10.6.7 (10J869) > $ ghc --version > The Glorious Glasgow Haskell Compilation System, version 7.0.2 > $ cabal --ve

[Haskell-cafe] HipmunkPlayground compile error

2011-04-26 Thread Andrew Pennebaker
$ system_profiler SPSoftwareDataType | grep "System Version" System Version: Mac OS X 10.6.7 (10J869) $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.0.2 $ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library $ cabal install hipmu

Re: [Haskell-cafe] -- Extension for "Pearls of Functional Algorithm Design" by Richard Bird, 2010, page 25 #Haskell

2011-04-26 Thread Jason Dagit
Do you have a question for the group or something you want to discuss? On Mon, Apr 25, 2011 at 8:50 PM, wrote: > -- Extension for "Pearls of Functional Algorithm Design" by Richard Bird, > -- 2010, page 25 #Haskell > > -- This version assumes 3 disjoint ordered sets represented as lists. > -- So

Re: [Haskell-cafe] Inputs to classic FRP: unsafeInterleaveIO/unsafePerformIO

2011-04-26 Thread Heinrich Apfelmus
Edward Amsden wrote: As far as I can tell, with classic FRP implementations (those which use behaviors as a first-class abstraction), the only way to create a behavior or event based on some external input (for instance keypresses or microphone input) is to do something with unsafePerformIO or un