[Haskell-cafe] Problem with Text.XHtml.Strict.Formlets.file on Mac OSX

2009-09-22 Thread Colin Adams
I'm writing a form that involves picking a file to upload, and so uses Text.XHtml.Strict.Formlets.file. The form displays OK, but when I click the Browse button, and select a file from the dialog (no matter what the file type), and then click on the Submit button, I get an error: fval[2] is not a

Re: [Haskell-cafe] Building com-1.2.3

2009-09-22 Thread david48
On Mon, Sep 21, 2009 at 8:37 PM, Andrew Coppin andrewcop...@btinternet.com wrote: It also doesn't explain why Cabal isn't finding include/WideStringSrc.h, even though that's the correct relative path to the file. I checked six times; it's definitely there. include/WideStringSrc.h is a relative

[Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal However, after some Google searching and contacting its original author, I have still not found any implementation or project to implement it. Are there any I'm missing? And, if not, who would be

Re: [Haskell-cafe] Cabal packages - cabbages

2009-09-22 Thread Jason Dusek
2009/09/21 Conor McBride co...@strictlypositive.org: ...or have unpleasant memories of being made to eat sulphurous overboiled cabbage on pain of no pudding. Well, maybe the Cabal cabbages are Napa cabbages or red cabbages or pickled cabbages or Savoy cabbages? It is too bad, really,

Re: [Haskell-cafe] Cabal packages - cabbages

2009-09-22 Thread david48
On Mon, Sep 21, 2009 at 12:11 AM, Jason Dusek jason.du...@gmail.com wrote:  Some day, we're going to need a short, catchy name for Cabal  packages. Let's call them cabbages. C'est chou ! :-P +1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Cabal packages - cabbages

2009-09-22 Thread Conor McBride
Hi Jason On 22 Sep 2009, at 10:04, Jason Dusek wrote: 2009/09/21 Conor McBride co...@strictlypositive.org: ...or have unpleasant memories of being made to eat sulphurous overboiled cabbage on pain of no pudding. Well, maybe the Cabal cabbages are Napa cabbages or red cabbages or pickled

Re: [Haskell-cafe] Cabal packages - cabbages

2009-09-22 Thread D. Manning
2009/9/22 Conor McBride co...@strictlypositive.org I'm just suggesting that the marketing department consider the variety of connotations and suggestions the term evokes before adopting it: legendary backfirings abound (the Spanish sales failure of a car called the nova, for example). Its

Re: [Haskell-cafe] Cabal packages - cabbages

2009-09-22 Thread Conor McBride
Hi On 22 Sep 2009, at 15:25, D. Manning wrote: 2009/9/22 Conor McBride co...@strictlypositive.org I'm just suggesting that the marketing department consider the variety of connotations and suggestions the term evokes before adopting it: legendary backfirings abound (the Spanish sales failure

[Haskell-cafe] help with cabal; trying to escape from configuration hell

2009-09-22 Thread S. Doaitse Swierstra
I am trying to run happstack on my Mac, but unfortunately I am getting error messages as described in: http://code.google.com/p/happstack/issues/detail?id=88 The cure seems to be to downgrade to network-2.2.0.1, but unfortunately my installed cabal depends on network-2.2.1.4. I tried to

[Haskell-cafe] gtk2hs and runghc

2009-09-22 Thread Günther Schmidt
Hi, I'm trying to test some gtk2hs gui code without compiling it first, just by using runghc. Gtk2hs then complains about running in a multithreaded ghc, ie. one with several real OS threads. Is it possible to start runghc single-threaded? Günther

Re: [Haskell-cafe] help with cabal; trying to escape from configuration hell

2009-09-22 Thread Anton van Straaten
S. Doaitse Swierstra wrote: I am trying to run happstack on my Mac, but unfortunately I am getting error messages as described in: http://code.google.com/p/happstack/issues/detail?id=88 The cure seems to be to downgrade to network-2.2.0.1, but unfortunately my installed cabal depends on

[Haskell-cafe] How to install GD library on Mac OSX?

2009-09-22 Thread Colin Adams
It needs some missing C libraries - gd, png, jpeg, fontconfig and freetype. Does anyone know what to do to install these on OSX? -- Colin Adams Preston, Lancashire, ENGLAND ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Quadratic complexity though use of STArrays

2009-09-22 Thread Dan Rosén
Dear haskell-cafe users, I am constructing a shuffle function: given an StdGen and a list, return the list permuted, with all permutations of equal probability. There is the simlpe recursive definition: generate a number from 1 to length list, take this element out from the list, call the

[Haskell-cafe] What is

2009-09-22 Thread DavidA
Hi, When I try to build my HaskellForMaths library (http://hackage.haskell.org/package/HaskellForMaths) using GHC6.10.4 on Mac OS X (Leopard), I get several ld warning: atom sorting error (see below). The same code built without problems under GHC6.10.3 on Windows. The code in question is using

Re: [Haskell-cafe] What is

2009-09-22 Thread Bryan O'Sullivan
On Tue, Sep 22, 2009 at 1:01 PM, DavidA polyom...@f2s.com wrote: When I try to build my HaskellForMaths library (http://hackage.haskell.org/package/HaskellForMaths) using GHC6.10.4 on Mac OS X (Leopard), I get several ld warning: atom sorting error (see below). The first rule of weird

Re: [Haskell-cafe] Quadratic complexity though use of STArrays

2009-09-22 Thread Daniel Fischer
Am Dienstag 22 September 2009 21:31:08 schrieb Dan Rosén: Dear haskell-cafe users, I am constructing a shuffle function: given an StdGen and a list, return the list permuted, with all permutations of equal probability. There is the simlpe recursive definition: generate a number from 1 to

Re: [Haskell-cafe] Quadratic complexity though use of STArrays

2009-09-22 Thread Tobias Olausson
Hi Dan! You might want to change the following: shuffleRec :: StdGen - [a] - [a] shuffleRec g list = x:shuffleArr g' xs where (n,g') = randomR (0,length list-1) g (x:xs') = drop n list xs = take n list ++ xs' into the following: shuffleRec :: StdGen - [a] - [a] shuffleRec g list

Re: [Haskell-cafe] Quadratic complexity though use of STArrays

2009-09-22 Thread Daniel Fischer
Am Dienstag 22 September 2009 22:31:48 schrieb Daniel Fischer: That doesn't explain the quadratic behaviour of shuffleArr, though. I suspect it's laziness, things aren't actually done until the result is finally demanded, but I would have to take a closer look to really find out. Yep.

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-22 Thread Brandon S. Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 22, 2009, at 11:31 , Günther Schmidt wrote: Gtk2hs then complains about running in a multithreaded ghc, ie. one with several real OS threads. Is it possible to start runghc single-threaded? No, but you can unsafeInitGUIForThreadedRTS.

[Haskell-cafe] Strange problem with type classes (ghc 6.8.2 looks allright and ghc 6.10.1 doesn't).

2009-09-22 Thread Serguey Zefirov
I try to create yet another hardware description language embedded in Haskell and faced a (perceived) bug in ghc 6.10.1 type checker. In ghc 6.8.2 everything works fine. I need a type class that can express relationship between type and its' size in wires (the number of bits needed to represent

Re: [Haskell-cafe] How to install GD library on Mac OSX?

2009-09-22 Thread Brandon S. Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 22, 2009, at 13:44 , Colin Adams wrote: It needs some missing C libraries - gd, png, jpeg, fontconfig and freetype. Does anyone know what to do to install these on OSX? Customarily, Fink or MacPorts. Several of those *are* installed on

[Haskell-cafe] FFMpeg, SDL and Haskell

2009-09-22 Thread Vasyl Pasternak
Hi all, Last few days I was playing with FFI, FFMpeg and Haskell. Currently I am trying to make this tutorial http://www.dranger.com/ffmpeg/ on Haskell. Now I have done tutorial 01 and tutorial 02 (show video stream in SDL window). The third tutorial is about audio, and I found that audio

[Haskell-cafe] Strange problem with type classes (ghc 6.8.2 looks allright and ghc 6.10.1 doesn't).

2009-09-22 Thread Serguey Zefirov
(followup to my previous letter with the same subject) I found the way to break 6.8.2 type checker. It's as easy as to uncomment Div case alternative in valueIndex. Weird. I found a solution, though. Instead of (valueIndex (x_38,(x_36,x_37))) in that Div alternative I should create expression

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Raynor Vliegendhart
On Tue, Sep 22, 2009 at 10:01 AM, Jimmy Hartzell j...@shareyourgifts.net wrote: I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal I'm not sure whether I like the idea in general or not. It looks a bit odd. The suggestion on the talk page (

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
On Sep 22, 2009, at 8:01 PM, Jimmy Hartzell wrote: I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal I hadn't read it before. Now that I have, I really do not like it. Syntactic sugar causes cancer of the semicolon as Alan Perlis once said, and

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
On Sep 22, 2009, at 8:01 PM, Jimmy Hartzell wrote: I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal I hadn't read it before. Now that I have, I really do not like it. Syntactic sugar causes cancer of the semicolon as Alan Perlis once said,

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Daniel Fischer
Am Mittwoch 23 September 2009 02:51:59 schrieb Jimmy Hartzell: On Sep 22, 2009, at 8:01 PM, Jimmy Hartzell wrote: I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal (Richard O'Keefe:) I hadn't read it before. Now that I have, I really do not

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
Daniel Fischer wrote: Or, what I do: concat [ ( , str , ) ] This is a lot better, true, but it still takes a lot of typing, and the first element is now special-cased, preventing easy copy-and-paste (although, admittedly, much less opportunity for mistake). On a more

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
On Sep 23, 2009, at 12:24 PM, James Hartzell wrote: Well, look at code like this: wrapParens str = concat [ (, str, ) ] I just did. I'd write it as wrap_parens s = ( ++ s ++ ) although I wouldn't use that name, because it's not the parentheses that are wrapped, it's s.

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Evan Laforge
It would be so much better if we could discuss a _real_ example. Or implement one. Unlike some proposals, this could be implemented with a preprocessor and -F -pgmF, right? As far as the parsing job, I don't know how hard this would be to plug into the haskell parsing library, but in case it

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Daniel Fischer
Am Mittwoch 23 September 2009 04:06:11 schrieb Jimmy Hartzell: Daniel Fischer wrote: Or, what I do: concat [ ( , str , ) ] This is a lot better, true, but it still takes a lot of typing, and the Huh? Per line it's two keystrokes more than with the accessible

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
Richard O'Keefe wrote: After all, someone might have started with ( ( ++ str ++ ) ) and ended up with ( ( ++ str ++ ) -- (oops, no ++!) lineEnd -- forgot I needed this ) I asked for the trailing

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
On Sep 23, 2009, at 3:04 PM, Evan Laforge wrote: It would be so much better if we could discuss a _real_ example. Or implement one. I really did mean EXAMPLES. Examples of code which would be improved *more* by the proposal than by adopting an alternative style within the existing

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
On Sep 23, 2009, at 3:40 PM, James Hartzell wrote: I asked for the trailing comma in Erlang for _social_ reasons, not because I believed it would fix all problems of this type. What do you mean, for social reasons? The proposal is http://www.erlang.org/eeps/eep-0021.html The abstract says

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Daniel McAllansmith
On Wed, 23 Sep 2009 15:06:25 Daniel Fischer wrote: Am Mittwoch 23 September 2009 04:06:11 schrieb Jimmy Hartzell: Daniel Fischer wrote: Or, what I do: concat [ ( , str , ) ] This is a lot better, true, but it still takes a lot of typing, and the Huh?

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
Am Mittwoch 23 September 2009 04:06:11 schrieb Jimmy Hartzell: Daniel Fischer wrote: Or, what I do: concat [ ( , str , ) ] You're right: my objections to this seem mostly to be matters of taste -- as I think about it, I find fewer and fewer practical reasons for