Re: [Haskell-cafe] Yampa vs. Reactive

2008-12-22 Thread Thomas Davie
On 21 Dec 2008, at 13:10, Henrik Nilsson wrote: Hi Tom, > In reactive, one doesn't. All behaviors and events have the same > absolute 0 value for time. Right. I believe the possibility of starting behaviors later is quite important. And from what Conal wrote in a related mail, I take it tha

RE: [Haskell-cafe] Trouble with FFI on Windows2000...

2008-12-22 Thread Serge LE HUITOUZE
Hi Kyra (I tried to email you directly, but, for some reason, my mail bounced...), Hi Haskellers, > > dlltool -d cproj1.def -l libcproj1.a > > ghc --make testFFI_2.hs -optl-lcproj1 -optl-L. > > [...] > > This leads to an error box with message: > > "DLL (null) not found on specified path" >

[Haskell-cafe] Re: Time for a new logo?

2008-12-22 Thread Benjamin L . Russell
On Sun, 14 Dec 2008 16:50:11 -0500, "sam lee" wrote: >http://i35.tinypic.com/mjon83.png >used this: http://www.simwebsol.com/ImageTool/Default.aspx This logo still has not been uploaded to the "Haskell logos/New logo ideas" (http://haskell.org/haskellwiki/Haskell_logos/New_logo_ideas) page. Cou

RE: [Haskell-cafe] Can I build and install GHC 6.10.1 without previous installed ghc

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 11:53 +0800, Wang, Chunye (NSN - CN/Beijing) wrote: > > I tried to install the ghc 6.8.0 last year but failed for some > reason. Now I decide to do it again, because I'd like to try > some examples in <> Now I remember why I try to > install it from source code, because the b

Re: [Haskell-cafe] Removing/Uninstalling cabal packages ?

2008-12-22 Thread Duncan Coutts
On Sun, 2008-12-21 at 13:30 -0600, brian wrote: > On Sun, Dec 21, 2008 at 12:12 PM, Laurent Giroud wrote: > > I have been doing a few experiments with cabal packages lately and I wish to > > uninstall these to return to a cleaner package base. However, there doesn't > > seem to be a "cabal uninsta

RE: [Haskell-cafe] Can I build and install GHC 6.10.1 withoutprevious installed ghc

2008-12-22 Thread Wang, Chunye (NSN - CN/Beijing)
Hi Duncan, wget http://haskell.org/ghc/dist/6.8.2/ghc-6.8.2-x86_64-unknown-linux.tar.bz2 tar -jxvf ghc-6.8.2-x86_64-unknown-linux.tar.bz2 cd ghc-6.8.2 ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system

Re[2]: [Haskell-cafe] Trouble with the ST monad

2008-12-22 Thread Bulat Ziganshin
Hello Andre, Monday, December 22, 2008, 4:44:34 AM, you wrote: > Is there any difference between using freeze/thaw from Data.Array.MArray > versus freezeSTArray/thawSTArray from GHC.Arr? portability, at least -- Best regards, Bulatmailto:bulat.zigans...@gmail.com

Re[2]: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Bulat Ziganshin
Hello Günther, Monday, December 22, 2008, 1:57:22 AM, you wrote: try -threaded, +RTS -N2, and forkOS simultaneously. it may work - i don't see reasons why other threads should be freezd why one does unsafe call nother solution is to compile library with unsafe call changed to safe. this change i

[Haskell-cafe] Re: [Haskell] ANN: HLint 1.0

2008-12-22 Thread Neil Mitchell
Hi Lennart, > It would be nice if HLint didn't suggest things that it will object to > in the next round. > Like > > LLVM/Core/CodeGen.hs:176:1: Eta reduce > Found: > applyArgs f g = apArgs 0 f g > Why not: > applyArgs f = apArgs 0 f The idea is to specify things one step at a time, so the user

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Malcolm Wallace
Don Stewart wrote: > Modify the 'unsafe' inports to be 'safe'? I don't think HDBC is going > to call back in, so should be fine. John? For those who are puzzled, Don is suggesting that foreign import ccall unsafe "foo" :: Bar -> Baz should simply be changed to foreign import ccall safe "

[Haskell-cafe] new "Haskell logos/Logo design tools - HaskellWiki" page [Was: Re: Time for a new logo?]

2008-12-22 Thread Benjamin L . Russell
In order to encourage participation in The Great 2009 Haskell Logo Contest, I have created a new "Haskell logos/Logo design tools - HaskellWiki" page (see http://haskell.org/haskellwiki/Haskell_logos/Logo_design_tools). This page is still a stub; if you have any further information on logo design

Re: [Haskell-cafe] understanding enumerator/iteratee

2008-12-22 Thread Jason Dusek
So an iteratee is not like a cursor because it does not "own" the collection -- it just tells us how to step it. The enumerator "owns" the collection and provides a way to scope resource use? -- Jason Dusek ___ Haskell-Cafe mailing list Haskell-C

Re: [Haskell-cafe] understanding enumerator/iteratee

2008-12-22 Thread Artyom Shalkhakov
Hi Jason! 2008/12/22 Jason Dusek : > So an iteratee is not like a cursor because it does not "own" > the collection -- it just tells us how to step it. The > enumerator "owns" the collection and provides a way to scope > resource use? Iteratee does not know anything about resources, it doesn'

RE: [Haskell-cafe] Can I build and install GHC 6.10.1 withoutprevious installed ghc

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 17:53 +0800, Wang, Chunye (NSN - CN/Beijing) wrote: > Hi Duncan, > > > wget > http://haskell.org/ghc/dist/6.8.2/ghc-6.8.2-x86_64-unknown-linux.tar.bz2 > tar -jxvf ghc-6.8.2-x86_64-unknown-linux.tar.bz2 Ahh, x86-64. Those have always been built on Fedora Core 5. My only su

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 10:30 +, Malcolm Wallace wrote: > For those who are puzzled, Don is suggesting that > foreign import ccall unsafe "foo" :: Bar -> Baz > should simply be changed to > foreign import ccall safe "foo" :: Bar -> Baz > > And in case anyone is wondering whether fiddlin

Re: [Haskell-cafe] A hell of a question

2008-12-22 Thread Luke Palmer
On Sun, Dec 21, 2008 at 6:03 PM, Andrzej Jaworski wrote: > I just want to say Hello to let you know that there are some serious > entities watching you besides > monads and FBI:-) > > There has been a hell of a discussion recently about logos, languages and > religion and I want to add > to this.

Re: [Haskell-cafe] understanding enumerator/iteratee

2008-12-22 Thread Jason Dusek
I'm taking a stab at composable streams, starting with cursors. I managed to make a derived cursor today -- as I work through this stuff, I hope to understand Iteratee/Enumerator better. -- Jason Dusek http://github.com/jsnx/streams/tree/554dd69339f027f113a6cfa16f552727ba9d92b3/Control/St

[Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Raeck Zhao
I am trying to define a containing function to see if a value is one of the elements within a list which is polymorphic, but failed with the following codes: > contain :: a -> [a] -> Bool > contain x [] = False > contain x (y:ys) = if x == y then True else contain x ys it seems that the pr

[Haskell-cafe] Takusen

2008-12-22 Thread Günther Schmidt
Hi all, where can I find some sample code or other examples to familiarize me with Takusen? Does Takusen use safe ccall only, or does it also use ccall unsafe? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/m

Re: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Andrew Wagner
The problem here is even slightly deeper than you might realize. For example, what if you have a list of functions. How do you compare two functions to each other to see if they're equal? There is no good way really to do it! So, not only is == not completely polymorphic, but it CAN'T be. There is

[Haskell-cafe] haskell for windows mobile 6 on Intel PXA270 processor

2008-12-22 Thread Constantine Potapov
Hi All. I'm looking for haskell interpreter/compiler for windows mobile 6 (I have an Asus A696 PDA with intel PXA270 processor). Somebody head about any haskell implementation for this platform? -- With best regards, Constantine Potapov. ___ Haskell-C

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread John Goerzen
Duncan Coutts wrote: > On Mon, 2008-12-22 at 10:30 +, Malcolm Wallace wrote: > >> The terminology seems counter-intuitive, but in other other words, a >> "safe" call is slower but more flexible, an "unsafe" call is fast and >> dangerous. Therefore it is always OK to convert an "unsafe" declar

Re: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Denis Bueno
2008/12/22 Andrew Wagner : > The problem here is even slightly deeper than you might realize. For > example, what if you have a list of functions. How do you compare two > functions to each other to see if they're equal? There is no good way really > to do it! So, not only is == not completely poly

Re: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Andrew Wagner
Yes, of course, sorry for the typo. On Mon, Dec 22, 2008 at 9:17 AM, Denis Bueno wrote: > 2008/12/22 Andrew Wagner : > > The problem here is even slightly deeper than you might realize. For > > example, what if you have a list of functions. How do you compare two > > functions to each other to s

[Haskell-cafe] ANN: Control.Monad.IfElse

2008-12-22 Thread Jeff Heard
Provides useful anaphoric and monadic versions of if-else and when, as well as infix operators for the actions to allow things like this: -- Allow the clause to be in m a whenM (Gtk.widgetIsFocus win) $ do this that -- anaphoric if. If the condition is nonempty, pass the conditional value to

Re: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Thomas Davie
On 22 Dec 2008, at 15:18, Andrew Wagner wrote: Yes, of course, sorry for the typo. On Mon, Dec 22, 2008 at 9:17 AM, Denis Bueno wrote: 2008/12/22 Andrew Wagner : > The problem here is even slightly deeper than you might realize. For > example, what if you have a list of functions. How do you

[Haskell-cafe] A hell of a question

2008-12-22 Thread Andrzej Jaworski
Hi Luke, When neurosurgeons split the brain into left and right hemisphere cutting it along corpus callosum the patient will talk to you with his left half and right half independently - each time unaware what his other half was talking about a moment earlier. I believe Zen emulates such split o

[Haskell-cafe] Re: forkIO on multicore

2008-12-22 Thread Simon Marlow
Duncan Coutts wrote: On Fri, 2008-12-19 at 10:42 -0600, Jake McArthur wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Keir wrote: fibs = 0 : 1 : zipWith (+) fibs (tail fibs) This is a CAF (Constant Applicative Form). Since it is actually a constant it is never garbage collected, and

RE: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Raeck Zhao
Thank you very much for your reply! It is really helpful! But I just found another 'problem', I just realize that the list does not support the user-defined data type? the list is also depending on the Eq function? For example, data Shape = Square | Triangle | Circle when I type either [Squa

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Günther Schmidt
Hi, I am not yet 100% certain that the unsafe calls are indeed the cause of the problem, eventhough I strongly suspect there are. I can tell you more once I have managed to rewrite all "unsafe" calls into "safe" once, reinstall HDBC.Sqlite3 and then run my app again to see the effects. My

Re: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Andrew Wagner
There are two ways to fix this. Let me see if I can get my syntax right this time :) 1.) Let GHC work out the Eq instance: data Shape = Square | Triangle | Circle deriving Eq 2.) Tell GHC how to do it explicitly: data Shape = Square | Triangle | Circle instance Eq Shape where Square ==

Re[2]: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Bulat Ziganshin
Hello John, Monday, December 22, 2008, 5:15:46 PM, you wrote: >> And in general we would not even bother with considering using "unsafe" >> for calls that are already expensive. It's only worth considering when >> the length of the call is always very short. the other way to look at it is to mea

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread John Goerzen
Günther Schmidt wrote: > Hi, > > I am not yet 100% certain that the unsafe calls are indeed the cause of > the problem, eventhough I strongly suspect there are. > > I can tell you more once I have managed to rewrite all "unsafe" calls into > "safe" once, reinstall HDBC.Sqlite3 and then run my

Re: [Haskell-cafe] Can I build and install GHC 6.10.1 withoutprevious installed ghc

2008-12-22 Thread Robert Greayer
I've recently built 6.10.1 on fairly archaic RHEL servers, both 64 and 32 bit, and the incantation that worked most seamlessly for me was to grab a really old binary release (in my case 6.2 worked) that installs without intervention, and then build up to the latest version (6.10.1) in steps -- I

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread GŸuenther Schmidt
John Goerzen schrieb: Günther Schmidt wrote: Hi, I am not yet 100% certain that the unsafe calls are indeed the cause of the problem, eventhough I strongly suspect there are. I can tell you more once I have managed to rewrite all "unsafe" calls into "safe" once, reinstall HDBC.Sqlite3

RE: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Bayley, Alistair
> From: haskell-cafe-boun...@haskell.org > [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt > > I understand that Takusen does not use "unsafe" calls and > would like to > try it with that one then, but haven't find enough docs yet > on how to use > Takusen. Not a lot

Re[2]: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Bulat Ziganshin
Hello Alistair, Monday, December 22, 2008, 7:28:03 PM, you wrote: > safe). I also was not aware of unsafe calls blocking other threads. they don't to it directly. but without -threaded +RTS -N (or forkOS) there is only 1 OS thread that runs all haskell threads. unsafe call blocks it untill call

[Haskell-cafe] monad constraint + record update

2008-12-22 Thread Peter Padawitz
I'd like to define a monad Set for types in the class Eq. But how can the arguments of Set be constrained when Set is defined as an instance of Monad? instance Eq a => Monad Set where ... obviously cannot work. Is there a standard update function for fields in data types, something that OO pro

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-22 Thread Eelco Lempsink
On 21 dec 2008, at 22:26, Sebastian Sylvan wrote: I am very shortly travelling abroad for several weeks and will not have (reliable access to) a computer, but isn't this a task for one of the haskell web-apps people (HSP, HAppS, Turbinado, etc.) to show us once and for all why *their* librar

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-22 Thread Loup Vaillant
2008/12/22 Eelco Lempsink : > Hmm, right. I started on a thing in HAppS. See > http://github.com/eelco/voting/ for the source code (contributors more than > welcome!) and http://code.tupil.com/voting/ for a live demo. It relies > heavily on javascript, needs some work on the UI and there are a l

[Haskell-cafe] Problems Installing Takusen with Sqlite Backend

2008-12-22 Thread Günther Schmidt
Hi Alistair, what does it take to install Takusen on Win32 with Sqlite backend? I did manage to install *plain* Takusen via cabal install by downgrading to Cabal-1.4 but when I want to cabal-install takusen -fsqlite it complains about a missing sqlite3. What do I need to fix? Günther _

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 08:15 -0600, John Goerzen wrote: > Duncan Coutts wrote: > > On Mon, 2008-12-22 at 10:30 +, Malcolm Wallace wrote: > > > >> The terminology seems counter-intuitive, but in other other words, a > >> "safe" call is slower but more flexible, an "unsafe" call is fast and > >>

Re: [Haskell-cafe] Re: [Haskell] ANN: HLint 1.0

2008-12-22 Thread Claus Reinke
Well, sort of. Ok, we can parse that. Let's assume a variable x holds the output of :show modules as a String. We call lines on it, then map words on it, do a !! 2 on it, and we get ["Util.hs,", "Recorder.hs,", "Game.hs,", "Monadius.hs,", "Demo.hs,"]. Chuck in a map (filter (\= ',')), and we get a

Re: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Miguel Mitrofanov
On 22 Dec 2008, at 17:35, Raeck Zhao wrote: But I just found another 'problem', I just realize that the list does not support the user-defined data type? Don't worry, it does. the list is also depending on the Eq function? No, it doesn't. data Shape = Square | Triangle | Circle [Squar

Re: [Haskell-cafe] Defining a containing function on polymorphic list

2008-12-22 Thread Luke Palmer
2008/12/22 Raeck Zhao > Thank you very much for your reply! It is really helpful! > > But I just found another 'problem', I just realize that the list does not > support the user-defined data type? > the list is also depending on the Eq function? > > For example, > > data Shape = Square | Triang

Re: [Haskell-cafe] monad constraint + record update

2008-12-22 Thread Miguel Mitrofanov
You can use a continuation trick I describe below. First of all, I would like to work in a more general situation. So, instead of working with Set, I'd like to declare two classes: > class Returnable m a where ret :: a -> m a and > class Bindable m a b where bind :: m a -> (a -> m b) -> m b

Re: [Haskell-cafe] A hell of a question

2008-12-22 Thread Andrzej Jaworski
Arnaud Bailly kindly exposed my mistake: I cited Leibniz Monadology attributing it to Spinoza. Call me idiot but it wasn't thoughtless mistake, I really mixed up Spinoza's concept of 'modes' with Leibniz's concept of 'monad'. But it is because of my laziness rather than foolishness (at least th

[Haskell-cafe] concurrent haskell: thread priorities

2008-12-22 Thread Neal Alexander
From what i understand (correct me if I'm wrong): The threaded RT creates an OS thread for each CPU/core on the system and uses them to multiplex userland threads. These are context switched whenever they block/yield/gc and no priorities can be assigned. It seems like we could get some priori

Re: [Haskell-cafe] "Rewrite thunk action" rule?

2008-12-22 Thread Dan Weston
Peter Todd wrote: Not quite. If I have a thunk, at the low level somewhere it must refer to the transform function, the transform matrix, and the element that is to be transformed. If I apply another transform to that unevaluated thunk, my understanding is that haskell will represent it as such:

Re: [Haskell-cafe] monad constraint + record update

2008-12-22 Thread Cristiano Paris
On Mon, Dec 22, 2008 at 6:19 PM, Peter Padawitz wrote: > I'd like to define a monad Set for types in the class Eq. But how can the > arguments of Set be constrained when Set is defined as an instance of Monad? > instance Eq a => Monad Set where ... obviously cannot work. Shouldn't you impose the

Re: [Haskell-cafe] concurrent haskell: thread priorities

2008-12-22 Thread Bulat Ziganshin
Hello Neal, Monday, December 22, 2008, 11:07:32 PM, you wrote: > The threaded RT creates an OS thread for each CPU/core on the system and > uses them to multiplex userland threads. These are context switched > whenever they block/yield/gc and no priorities can be assigned. not exactly. amount o

[Haskell-cafe] OpenAL

2008-12-22 Thread brian
Does the example code at http://articles.bluishcoder.co.nz/Haskell/OpenAL work for anyone? I added some putStrLns to see the device and context, and get $ ./Main2 Device (ALCdevice 0x08a744c8) Context (ALCcontext 0x08aabda0) AL lib: alSource.c:2291: alcDestroyContext(): 1 Source(s) NOT deleted AL

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread John Goerzen
On Mon, Dec 22, 2008 at 04:28:03PM -, Bayley, Alistair wrote: > > From: haskell-cafe-boun...@haskell.org > > [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt > > > > I understand that Takusen does not use "unsafe" calls and > > would like to > > try it with that one t

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Günther Schmidt
Hi guys, I just tried to forkIO-off the database code to keep the UI responsive using Takusen with Sqlite this time. The problem persists though, the UI freezes. AFAIK the sqlite-Takusen code does not use unsafe ccall which would block the thread, so that might not be the cause of the prob

Re: [Haskell-cafe] Pattern combinators

2008-12-22 Thread David Menendez
On Sun, Dec 21, 2008 at 10:14 PM, Andrew Wagner wrote: > I'd love to see a copy of this go up on hackage for experimentation. Would > you care to upload your code, or send it to me so I can upload it? I've uploaded my latest version to . It explicitly makes patterns polym

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 22:12 +0100, Günther Schmidt wrote: > Hi guys, > > I just tried to forkIO-off the database code to keep the UI responsive > using Takusen with Sqlite this time. > > The problem persists though, the UI freezes. You might need to provide us more details on the GUI code. As

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Günther Schmidt
Hi, I put in on hpaste: http://hpaste.org/13264 slightly simplified Günther Am 22.12.2008, 22:36 Uhr, schrieb Duncan Coutts : On Mon, 2008-12-22 at 22:12 +0100, Günther Schmidt wrote: Hi guys, I just tried to forkIO-off the database code to keep the UI responsive using Takusen with Sql

[Haskell-cafe] Stupid question #374: why is MaybeT not in the standard library?

2008-12-22 Thread Brian Hurt
I wrote my own implementation of MaybeT (which was a usefull exercise), but a quick google showed: http://www.haskell.org/haskellwiki/New_monads/MaybeT But I'm wondering why it's not in the standard library. The standards committee just hasn't gotten around to it yet? Or was there some di

Re: [Haskell-cafe] concurrent haskell: thread priorities

2008-12-22 Thread Thomas DuBuisson
> > It seems like we could get some priority based scheduling (and still be > slackers) if we allow marked green threads to be strictly associated with a > specific OS thread (forkChildIO?). I think you want the GHC-only GHC.Conc.forkOnIO Suggestions like this are more motivation for the suggest

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-22 Thread Isaac Dupree
(responding with just a bit of possibly relevant context, not always directly) Paul Johnson wrote: I've lived through a couple of corporate rebranding exercises in my time, and I've read about some others. They follow a pattern: ... 2. The new branding is released with as much fanfare as p

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Sterling Clover
Thanks John! I've been running into this quite a bit with the ODBC backend as well. Having an entire server app freeze because MS SQL Server decides to deadlock is rather unpleasant. Cheers, Sterl. On Mon, Dec 22, 2008 at 3:59 PM, John Goerzen wrote: > On Mon, Dec 22, 2008 at 04:28:03PM -, B

Re: [Haskell-cafe] Stupid question #374: why is MaybeT not in the standard library?

2008-12-22 Thread Luke Palmer
On Mon, Dec 22, 2008 at 3:31 PM, Brian Hurt wrote: > > I wrote my own implementation of MaybeT (which was a usefull exercise), but > a quick google showed: > > http://www.haskell.org/haskellwiki/New_monads/MaybeT > > But I'm wondering why it's not in the standard library. The standards > committ

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 22:55 +0100, Günther Schmidt wrote: > Hi, > > I put in on hpaste: > > http://hpaste.org/13264 > > slightly simplified Ok, that works fine when the action is something like threadDelay so it's clearly not blocking the UI. Duncan ___

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread GŸuenther Schmidt
Hi Duncan, are you saying then that the db-code is what's blocking the UI? Günther Duncan Coutts schrieb: On Mon, 2008-12-22 at 22:55 +0100, Günther Schmidt wrote: Hi, I put in on hpaste: http://hpaste.org/13264 slightly simplified Ok, that works fine when the action is something

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-22 Thread Eelco Lempsink
On 22 dec 2008, at 19:14, Loup Vaillant wrote: 2008/12/22 Eelco Lempsink : Hmm, right. I started on a thing in HAppS. See http://github.com/eelco/voting/ for the source code (contributors more than welcome!) and http://code.tupil.com/voting/ for a live demo. It relies heavily on javascrip

Re: [Haskell-cafe] A hell of a question

2008-12-22 Thread Jason Dusek
2008/12/22 Luke Palmer : > Andrzej Jaworski > > First let me disassociate Haskell from Taoism... > I associate Haskell with Zen... The relationship between Taoism and Zen is actually very close. The notion of "stillness practice" is essentially Chinese. Indian schools of meditation and sch

Re: [Haskell-cafe] A hell of a question

2008-12-22 Thread Jason Dusek
Andrzej Jaworski wrote: > First let me disassociate Haskell from Taoism which to may > taste has left us in an unhealthy climate. It suffices to say > that Taoism is a school of clever trics and cute aphorisms but > without the slightest attempt to explain or generalize let > alone produce an abs

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Ryan Ingram
You shouldn't need forkOS, but without -threaded (and related RTS switches to enable multithreading) I think you are sunk. Without enabling multithreading support, you are saying that your program (which might use concurrency features of Haskell) will run on a single OS thread. During a foreign c

Re: [Haskell-cafe] A hell of a question

2008-12-22 Thread Jonathan Cast
On Mon, 2008-12-22 at 17:14 -0800, Jason Dusek wrote: > Andrzej Jaworski wrote: > > First let me disassociate Haskell from Taoism which to may > > taste has left us in an unhealthy climate. It suffices to say > > that Taoism is a school of clever trics and cute aphorisms but > > without the sligh

Re: [Haskell-cafe] A hell of a question

2008-12-22 Thread Jason Dusek
Jonathan Cast wrote: > Jason Dusek wrote: > > Thus it is in practical arts -- Chinese medicine, Taiji, > > strategy -- that one comes to appreciate the Way and its > > Power. > > But nonetheless, Haskell is not a practical art, no more than > theoretical physics or abstract algebra. I guess the

Re: [Haskell-cafe] Stupid question #374: why is MaybeT not in the standard library?

2008-12-22 Thread Antoine Latter
2008/12/22 Luke Palmer : > Yeah, it'd be useful. Doesn't really matter, though, because it's on > Hackage (http://hackage.haskell.org), so it's just a cabal install > MaybeT away. > Now that cabal and cabal-install are reasonably mature, we really don't have > to worry about what's blessed as "sta

Re: [Haskell-cafe] Cabal Install & Links to Source from Haddock Docs

2008-12-22 Thread R Hayes
Thank you. As it turns out, I was aware of that recipe. What I wanted was to be able to use cabal install's nice dependency following features and still get source links in my documentation. Personally, I feel that inclusion of source and docs should be the DEFAULT for cabal, as well as

Re: [Haskell-cafe] Re: Is this related to monomorphism restriction?

2008-12-22 Thread Iavor Diatchki
Hi, On Sun, Dec 21, 2008 at 11:45 AM, Luke Palmer wrote: > 2008/12/21 Iavor Diatchki >> >> >> g :: TestClass a => a -> Integer >> g = fst (a :: (a -> Integer, a -> Integer)) > > Which I believe needs to be written: > > g :: forall a. TestClass a => a -> Integer > g = fst (a :: (a -> Integer, a -

Re: [Haskell-cafe] Time for a new logo?

2008-12-22 Thread ksvanhorn
Looking over the New_logo_ideas page, my vote is for the "snowflake" logo: http://haskell.org/sitewiki/images/9/98/Haskell-Symstar.png (I would simplify it, though, by removing the motto "pure - lazy - fun".) I like this logo because it works well on two different levels. For those in the know

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Günther Schmidt
Hi Ryan, BINGO! that did it. Thanks a lot. It certainly works now, finally, eventhough I don't really know what the implications are. Günther Am 23.12.2008, 02:14 Uhr, schrieb Ryan Ingram : You shouldn't need forkOS, but without -threaded (and related RTS switches to enable multithreadin

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread John Goerzen
Günther Schmidt wrote: > Hi Ryan, > > BINGO! > > that did it. > > Thanks a lot. It certainly works now, finally, eventhough I don't really > know what the implications are. Did it still work with the unmodified HDBC as well? Just curious. -- John

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread wman
Thanks to you all for inspiration. My web app (which otherwise ran ok) was getting stuck while getting harassed by ab (apache-benchmark) after receiving some 800+ requests in short succession (not less, never gotten to 900, what was weird that running like 500 reqs - pause - 500 reqs ... went ok).

Re: [Haskell-cafe] Takusen

2008-12-22 Thread Artyom Shalkhakov
Hi Günther, 2008/12/22 Günther Schmidt : > where can I find some sample code or other examples to familiarize me with > Takusen? The best resource I've found is: http://darcs.haskell.org/takusen/doc/html/Database-Enumerator.html Cheers, Artyom Shalkhakov. ___

[Haskell-cafe] intercalate and (byte)strings

2008-12-22 Thread wman
I encountered the following code : -- B == Data.ByteString ; L == Data.ByteString.Lazy contents' = B.intercalate B.empty $ L.toChunks contents with a previously unencountered function intercalate. A quick google query later i knew that it's just intersperse & concat nicely bundled and started won

[Haskell-cafe] [Byte8] <-> ByteString

2008-12-22 Thread Galchin, Vasili
Hello, I have been reading through Data->ByteString. What is the is most elegant and efficient way to map/unmap [Byte8] <-> ByteString? Thanks, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/h

Re: [Haskell-cafe] [Byte8] <-> ByteString

2008-12-22 Thread Luke Palmer
2008/12/22 Galchin, Vasili > Hello, > > I have been reading through Data->ByteString. What is the is most > elegant and efficient way to map/unmap [Byte8] <-> ByteString? pack and unpack. You might need a fromIntegral in there, depending on whether Byte8 and Word8 are the same. Luke ___

Re: [Haskell-cafe] Stupid question #374: why is MaybeT not in the standard library?

2008-12-22 Thread Luke Palmer
On Mon, Dec 22, 2008 at 6:52 PM, Antoine Latter wrote: > 2008/12/22 Luke Palmer : > > Yeah, it'd be useful. Doesn't really matter, though, because it's on > > Hackage (http://hackage.haskell.org), so it's just a cabal install > > MaybeT away. > > Now that cabal and cabal-install are reasonably m

Re: [Haskell-cafe] Stupid question #374: why is MaybeT not in the standard library?

2008-12-22 Thread J. Garrett Morris
On Mon, Dec 22, 2008 at 2:31 PM, Brian Hurt wrote: > But I'm wondering why it's not in the standard library. The standards > committee just hasn't gotten around to it yet? Or was there some discussion > of this in the past on some (public) maillist, that my admittedly shallow > googling failed t

Re: [Haskell-cafe] [Byte8] <-> ByteString

2008-12-22 Thread Galchin, Vasili
sorry actually ByteString -> [Word8] On Tue, Dec 23, 2008 at 12:49 AM, Luke Palmer wrote: > 2008/12/22 Galchin, Vasili > >> Hello, >> >> I have been reading through Data->ByteString. What is the is most >> elegant and efficient way to map/unmap [Byte8] <-> ByteString? > > > pack an