Re: [Haskell-cafe] Link errors in Gtk2Hs are more general than I thought.

2009-04-04 Thread Colin Paul Adams
> "Jeff" == Jeff Wheeler writes: Jeff> I installed Gtk2Hs on a similar machine earlier tonight, Jeff> with much success, even with Yi. Jeff> I did not use MacPorts, and instead followed the Jeff> instructions on the HaskellWiki [1] under "Using the GTK+ OS Jeff> X Framewo

Re: [Haskell-cafe] trying to download "leksah" ....

2009-04-04 Thread Bertram Felgenhauer
Vasili I. Galchin wrote: > vigalc...@ubuntu:~/FTP$ darcs get http://code.haskell.org/leksah > Invalid repository: http://code.haskell.org/leksah > > darcs failed: Failed to download URL > http://code.haskell.org/leksah/_darcs/inventory : HTTP error (404?) > > I did a google on "HTTP 404" => not

Re: [Haskell-cafe] Link errors in Gtk2Hs are more general than I thought.

2009-04-04 Thread Jeff Wheeler
On Sun, 2009-04-05 at 07:12 +0200, Bertram Felgenhauer wrote: > This looks like the quartz backend was disabled in the cairo C library, > not like a gtk2hs problem. I don't know how ports work, but > > http://trac.macports.org/browser/trunk/dports/graphics/cairo/Portfile > > defines a 'quartz'

[Haskell-cafe] trying to download "leksah" ....

2009-04-04 Thread Vasili I. Galchin
vigalc...@ubuntu:~/FTP$ darcs get http://code.haskell.org/leksah Invalid repository: http://code.haskell.org/leksah darcs failed: Failed to download URL http://code.haskell.org/leksah/_darcs/inventory : HTTP error (404?) I did a google on "HTTP 404" => not found why? Kind regards, Vasili

Re: [Haskell-cafe] Link errors in Gtk2Hs are more general than I thought.

2009-04-04 Thread Bertram Felgenhauer
Jeff Heard wrote: > I tried to get yi to run on my Mac earlier and I get the following errors: > > dyld: lazy symbol binding failed: Symbol not found: > _cairo_quartz_font_face_create_for_atsu_font_id > Referenced from: /opt/local/lib/libpangocairo-1.0.0.dylib > Expected in: /opt/local/lib/lib

[Haskell-cafe] Haskell Weekly News: Issue 112 - April 5, 2009

2009-04-04 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20090405 Issue 112 - April 05, 2009 --- Welcome to issue 112 of HWN, a newsletter covering dev

Re: [Haskell-cafe] Combining sequences

2009-04-04 Thread michael rice
Thanks, guys! This one works perfectly. I was monkeying with similar logic but wasn't sure about syntax. Michael --- On Sat, 4/4/09, Andrew Wagner wrote: From: Andrew Wagner Subject: Re: [Haskell-cafe] Combining sequences To: "michael rice" Cc: haskell-cafe@haskell.org Date: Saturday, Apri

[Haskell-cafe] Re: Reverting to any old version using Darcs

2009-04-04 Thread Trent W. Buck
Henning Thielemann writes: > On Wed, 1 Apr 2009, Don Stewart wrote: > >> bugfact: >>> Rumor goes that this is very difficult to do with Darcs. Is this correct? >> >>darcs unpull > > Be careful - you cannot revert this! If you want to unpull patches, > that were not distributed so far, you sho

Re: [Haskell-cafe] Combining sequences

2009-04-04 Thread Andrew Wagner
Here's a pretty straightforward approach: combine [] ys = ys combine xs [] = xs combine (x:xs) (y:ys) | x <= y = x : combine xs (y:ys) | otherwise = y : combine (x:xs) ys On Sat, Apr 4, 2009 at 8:40 PM, michael rice wrote: > Is there a simple way to combine two

[Haskell-cafe] Combining sequences

2009-04-04 Thread michael rice
Is there a simple way to combine two sequences that are in ascending order into a single sequence that's also in ascending order? An example would be the squares [1,4,9,16,25..] combined with the cubes [1,8,27,64,125..] to form [1,1,4,8,9,16,25,27..]. Michael _

Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-04 Thread Henning Thielemann
On Thu, 2 Apr 2009, Bjorn Buckwalter wrote: I'm pleased to announce the initial release of the Haskell fad library, developed by Barak A. Pearlmutter and Jeffrey Mark Siskind. Fad provides Forward Automatic Differentiation (AD) for functions polymorphic over instances of 'Num'. There have been

Re: [Haskell-cafe] Announcement: Beta of Leksah IDE available

2009-04-04 Thread Henning Thielemann
On Fri, 3 Apr 2009, Jeff Heard wrote: Jurgen... I have one more question, or rather request... I'm running under Ubuntu, and I get inconsistencies with packages that I build and install via Leksah not showing up when I configure other packages that depend on them. Then I notice that you're us

Re: [Haskell-cafe] Reverting to any old version using Darcs

2009-04-04 Thread Henning Thielemann
On Wed, 1 Apr 2009, Don Stewart wrote: bugfact: Rumor goes that this is very difficult to do with Darcs. Is this correct? darcs unpull Be careful - you cannot revert this! If you want to unpull patches, that were not distributed so far, you should better call 'darcs get' to get a copy

[Haskell-cafe] Re: .editrc

2009-04-04 Thread Ben Franksen
brad clawsie wrote: > does anyone have a .editrc they can provide that allows ghci to be used > on freebsd? > > i'm not looking for anything fancy, just backspace not being broken etc You could try to cabal install ghci-haskeline and see if that works better. Cheers Ben

Re: [Haskell-cafe] System.Process.Posix

2009-04-04 Thread Don Stewart
cristiano.paris: > On Sat, Apr 4, 2009 at 10:21 PM, Bulat Ziganshin > wrote: > > Hello Cristiano, > > ... > > there was a large thread a few months ago and many peoples voted for > > excluding any OS-specific packages at all since this decreases > > portability of code developed by Hoogle users :)

Re: [Haskell-cafe] System.Process.Posix

2009-04-04 Thread Cristiano Paris
On Sat, Apr 4, 2009 at 10:21 PM, Bulat Ziganshin wrote: > Hello Cristiano, > ... > there was a large thread a few months ago and many peoples voted for > excluding any OS-specific packages at all since this decreases > portability of code developed by Hoogle users :))) Nice shot :D So how do I f

Re: [Haskell-cafe] System.Process.Posix

2009-04-04 Thread Bulat Ziganshin
Hello Cristiano, Sunday, April 5, 2009, 12:05:02 AM, you wrote: > Is it me or the above package is not included in Hoogle? afair, Neil, being windows user, includes only packages available for his own system there was a large thread a few months ago and many peoples voted for excluding any OS-s

[Haskell-cafe] Link errors in Gtk2Hs are more general than I thought.

2009-04-04 Thread Jeff Heard
I tried to get yi to run on my Mac earlier and I get the following errors: dyld: lazy symbol binding failed: Symbol not found: _cairo_quartz_font_face_create_for_atsu_font_id Referenced from: /opt/local/lib/libpangocairo-1.0.0.dylib Expected in: /opt/local/lib/libcairo.2.dylib dyld: Symbol no

[Haskell-cafe] System.Process.Posix

2009-04-04 Thread Cristiano Paris
Is it me or the above package is not included in Hoogle? Cristiano ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] First time I've gotten gtk2hs to install from ports on Mac OS X from scratch

2009-04-04 Thread Jason Dagit
On Sat, Apr 4, 2009 at 12:15 PM, Jason Dagit wrote: > I think people might be able to help you, but I think we need the > exact error message.  Unfortunately, "won't link" is a bit too vague > to make any suggestions. Nevermind my message. I see you sent the error in a different thread. Jason

Re: [Haskell-cafe] First time I've gotten gtk2hs to install from ports on Mac OS X from scratch

2009-04-04 Thread Jason Dagit
Hi Jeff, On Sat, Apr 4, 2009 at 10:57 AM, Jeff Heard wrote: > The instructions in the leksah manuals seem to work for doing a > straight-up ports install of gtk2hs.  I've never managed to get it to > install without compiling manually, but this worked > > $ sudo port install gtk2 cairo librsvg li

[Haskell-cafe] Leksah+Gtk2Hs link error on Mac OS X Leopard

2009-04-04 Thread Jeff Heard
I tried installing leskah on OS X using the x11 version of gtk2hs (because I use gtkglext a lot in my work, and need it, therefore the quartz build won't work for me) I get these errors. Is this leksah specific or is this a more general problem with gtk2hs? Linking dist/build/leksah/leksah ... l

[Haskell-cafe] First time I've gotten gtk2hs to install from ports on Mac OS X from scratch

2009-04-04 Thread Jeff Heard
The instructions in the leksah manuals seem to work for doing a straight-up ports install of gtk2hs. I've never managed to get it to install without compiling manually, but this worked $ sudo port install gtk2 cairo librsvg libglade2 gtksourceview2 gtkglext gtk-chtheme gtk2-clearlooks $ sudo port

Re: [Haskell-cafe] about Haskell code written to be "too smart"

2009-04-04 Thread Thomas Hartman
Thanks Claus, Indeed the problem was that I was using the Strict state monad, with lazy state it does the right thing when run through testP. I will try and get back to this thread if I manage the derivation which "proves" (or at least supports) that the two versions are equivalent. 2009/4/4

Re: [Haskell-cafe] happstack example code wanted

2009-04-04 Thread Andrew Wagner
Copied there. On Sat, Apr 4, 2009 at 1:30 PM, Thomas Hartman wrote: > Johannes, > > You'll have a better response if you post to the happs list. > > Have you had a look at tutorial.happstack.com? > > Thomas. > > 2009/4/4 Johannes Waldmann : > > Hi, I'm thinking of using happstack for a simple

Re: [Haskell-cafe] happstack example code wanted

2009-04-04 Thread Thomas Hartman
Johannes, You'll have a better response if you post to the happs list. Have you had a look at tutorial.happstack.com? Thomas. 2009/4/4 Johannes Waldmann : > Hi, I'm thinking of using happstack for a simple > online registration system. [ Customer gives > Name and Address and registers for

Re: [Haskell-cafe] ANN: logfloat 0.12.0.1

2009-04-04 Thread Peter Verswyvelen
Indeed. I recommend upgrading to GHC 6.10.2, all the weird floating point FFI bugs I encountered with GHC 6.10.1 seem to be resolved now. On Sat, Apr 4, 2009 at 12:10 PM, Bulat Ziganshin wrote: > Hello wren, > > Saturday, April 4, 2009, 2:51:39 AM, you wrote: > > > On GHC 6.10 the use of -fvia-C h

Re: [Haskell-cafe] ANN: logfloat 0.12.0.1

2009-04-04 Thread Peter Verswyvelen
Indeed. I recommend upgrading to GHC 6.10.2, all the weird floating point FFI bugs I encountered with GHC 6.10.1 seem to be resolved now. On Sat, Apr 4, 2009 at 12:10 PM, Bulat Ziganshin wrote: > Hello wren, > > Saturday, April 4, 2009, 2:51:39 AM, you wrote: > > > On GHC 6.10 the use of -fvia-C h

Re: [Haskell-cafe] ANN: logfloat 0.12.0.1

2009-04-04 Thread Peter Verswyvelen
Indeed. I recommend upgrading to GHC 6.10.2, all the weird floating point FFI bugs I encountered with GHC 6.10.1 seem to be resolved now. On Sat, Apr 4, 2009 at 12:10 PM, Bulat Ziganshin wrote: > Hello wren, > > Saturday, April 4, 2009, 2:51:39 AM, you wrote: > > > On GHC 6.10 the use of -fvia-C h

Re: [Haskell-cafe] about import alias

2009-04-04 Thread Neil Mitchell
Hi > You can always do > > {-# INLINE short #-} > short = > C.veryLongFunctionNameThatIReallyDoNotWantToTypeOutEveryTimeIUseIt The INLINE pragma is not necessary, if an optimising compiler fails to inline that then it's not very good. However, you might want to consider the (evil) monomorphism r

Re: [Haskell-cafe] about import alias

2009-04-04 Thread Daniel Fischer
Am Samstag 04 April 2009 17:33:55 schrieb Manlio Perillo: > Hi. > > Haskell 98 allows import alias: > import qualified VeryLongModuleName as C > > however it does not allow aliasing for imported names > import NormalModule (veryLongFunctionName as C) > > > what is the rational? > IMHO thi

Re: [Haskell-cafe] about import alias

2009-04-04 Thread Marcin Kosiba
On Saturday 04 April 2009, Manlio Perillo wrote: > Hi. > > Haskell 98 allows import alias: > import qualified VeryLongModuleName as C > > however it does not allow aliasing for imported names > import NormalModule (veryLongFunctionName as C) > > > what is the rational? > IMHO this can be

[Haskell-cafe] about import alias

2009-04-04 Thread Manlio Perillo
Hi. Haskell 98 allows import alias: import qualified VeryLongModuleName as C however it does not allow aliasing for imported names import NormalModule (veryLongFunctionName as C) what is the rational? IMHO this can be very useful in some cases. Thanks Manlio ___

Re: [Haskell-cafe] How to get glyph outline from ttf font.

2009-04-04 Thread Tillmann Vogt
Dmitry V'yal schrieb: Greetings. I'm trying to render some glyphs from ttf font to svg image using gtk2hs cairo binding. Since I can find nothing appropriate in gtk2hs API, I decided to draw outlines with bezier curves myself. But how to get them out of font? As far as I know, freetype lib

[Haskell-cafe] happstack example code wanted

2009-04-04 Thread Johannes Waldmann
Hi, I'm thinking of using happstack for a simple online registration system. [ Customer gives Name and Address and registers for certain workshops. Then the app server should just produce a bill. (Payment is handled through a different channel.) The "store owner" needs to get some overview of regis

Re: [Haskell-cafe] How to get glyph outline from ttf font.

2009-04-04 Thread Peter Verswyvelen
A Haskell binding to Freetype2 is indeed missing. Would be nice to have. On Sat, Apr 4, 2009 at 4:08 PM, Jeff Heard wrote: > Yes, the FTGL library, but it uses FTGL on the backend and not > freetype directly. You might be able to get the flyph shapes from > Pango... > > On Sat, Apr 4, 2009 at 12:

Re: [Haskell-cafe] How to get glyph outline from ttf font.

2009-04-04 Thread Jeff Heard
Yes, the FTGL library, but it uses FTGL on the backend and not freetype directly. You might be able to get the flyph shapes from Pango... On Sat, Apr 4, 2009 at 12:59 PM, Dmitry V'yal wrote: >        Greetings. I'm trying to render some glyphs from ttf font to svg > image using gtk2hs cairo bind

[Haskell-cafe] Re: Haskell EDSL to generate SQL?

2009-04-04 Thread GüŸnther Schmidt
Hi Jeremy, thanks for that. I had come across it before but I think I'd prefer a more light-weight approach. Günther Jeremy Shaw schrieb: > At Sat, 04 Apr 2009 15:40:56 +0200, > GüŸnther Schmidt wrote: > >> But I hope to be able to use an DSL from which I can automatically >> generate SQL-St

Re: [Haskell-cafe] g++ std:map vs GHC IntMap

2009-04-04 Thread Jon Harrop
On Saturday 04 April 2009 14:02:48 Peter Verswyvelen wrote: > > On Sat, Apr 4, 2009 at 12:42 PM, Jon Harrop wrote: > >> For comparison: > >> > >> Haskell hash table: 44s > >> Haskell map: 7s > >> F# hash table: 0.7s > > So how does F# IntMap version compares to Haskell's IntMap? F#

[Haskell-cafe] How to get glyph outline from ttf font.

2009-04-04 Thread Dmitry V'yal
Greetings. I'm trying to render some glyphs from ttf font to svg image using gtk2hs cairo binding. Since I can find nothing appropriate in gtk2hs API, I decided to draw outlines with bezier curves myself. But how to get them out of font? As far as I know, freetype library is capable of extract

Re: [Haskell-cafe] Haskell EDSL to generate SQL?

2009-04-04 Thread Jeremy Shaw
At Sat, 04 Apr 2009 15:40:56 +0200, GüŸnther Schmidt wrote: > But I hope to be able to use an DSL from which I can automatically > generate SQL-Strings instead of writing the SQL statements literally. > > Has anyone else taken a similar approach? HaskellDB has an DSL for generating SQL strings.

[Haskell-cafe] Haskell EDSL to generate SQL?

2009-04-04 Thread GüŸnther Schmidt
Hi, I tried to solve some large data processing solely in Haskell so I could avoid lots of eventually very long and complex SQL statements. Unfortunately, as was to be expected, that approach doesn't scale. So I do need an SQL backend. But I hope to be able to use an DSL from which I can aut

Re: [Haskell-cafe] g++ std:map vs GHC IntMap

2009-04-04 Thread Peter Verswyvelen
So how does F# IntMap version compares to Haskell's IntMap? On Sat, Apr 4, 2009 at 2:58 PM, Peter Verswyvelen wrote: > On Sat, Apr 4, 2009 at 12:42 PM, Jon Harrop wrote: > >> For comparison: >> >> Haskell hash table: 44s >> Haskell map: 7s >> F# hash table: 0.7s > > > Ouch! That's

Re: [Haskell-cafe] g++ std:map vs GHC IntMap

2009-04-04 Thread Peter Verswyvelen
On Sat, Apr 4, 2009 at 12:42 PM, Jon Harrop wrote: > For comparison: > > Haskell hash table: 44s > Haskell map: 7s > F# hash table: 0.7s Ouch! That's pretty insane. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskel

Re: [Haskell-cafe] g++ std:map vs GHC IntMap

2009-04-04 Thread Jon Harrop
On Thursday 26 March 2009 15:39:12 Manlio Perillo wrote: > I also tried with Data.HashTable: > http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2902 > > but memory usage is 703 MB, and execution time is about 4.5 times slower! This is due to a perf bug in GHC's GC implementation that causes it to tr

Re: [Haskell-cafe] about Haskell code written to be "too smart"

2009-04-04 Thread Claus Reinke
takeListSt' = evalState . foldr k (return []) . map (State . splitAt) where k m m'= cutNull $ do x<-m; xs<-m'; return (x:xs) cutNull m = do s<-get; if null s then return [] else m |Not only is ths not that elegant anymore, As I was saying, sequence/mapM with early cutout i

Re: [Haskell-cafe] ANN: logfloat 0.12.0.1

2009-04-04 Thread Bulat Ziganshin
Hello wren, Saturday, April 4, 2009, 2:51:39 AM, you wrote: > On GHC 6.10 the use of -fvia-C had to be disabled because it conflicts > with the FFI (version 0.12.0.0 still used it, which is fine on GHC 6.8). > I'm still investigating the use of -fasm and getting proper benchmarking > numbers. Con

Re: [Haskell-cafe] Optional EOF in Parsec.

2009-04-04 Thread Stephan Friedrichs
Kannan Goundan wrote: > I'm writing a parser with Parsec. In the input language, elements of a > sequence > are separated by commas: > >[1, 2, 3] > > However, instead of a comma, you can also use an EOL: > > [1, 2 > 3] > > Anywhere else, EOL is considered ignorable whitespace. So it'

Re: [Haskell-cafe] Optional EOF in Parsec.

2009-04-04 Thread Martijn van Steenbergen
Kannan Goundan wrote: I've implemented this functionality in a hand-written parser (basically a hack that keeps track of whether the last read token was preceded by an EOL, without making EOL itself a token). Does anybody have ideas about how to do this with Parsec? You can do exactly the same

Re: [Haskell-cafe] about Haskell code written to be "too smart"

2009-04-04 Thread Thomas Hartman
> takeListSt' = evalState . foldr k (return []) . map (State . splitAt) > where k m m'= cutNull $ do x<-m; xs<-m'; return (x:xs) > cutNull m = do s<-get; if null s then return [] else m Not only is ths not that elegant anymore, I think it *still* has a bug, stack overflow again

[Haskell-cafe] Re: Monad transformer, liftIO

2009-04-04 Thread Paolo Losi
Michael Roth wrote: Hello list, maybe I'm just stupid, I'm trying to do something like this: Ciao Michael, As an alternative solution to Creighton's: import Control.Monad.List foobar :: ListT IO Int foobar = do a <- ListT . return $ [1,2,3] b <- ListT . return $ [4,5