
Hello, I've written a simple sequencer[0] using gtk2hs and control-timeout[1]. In GHCi it works fine, but when I compile it, the timeouts generated by control-timeout are not executed. Actually, when I use the keyboard a lot, at some time they got executed. I thought it could be that these two packages are incompatible, but the I wondered why they work in GHCi. Any ideas? Greetings. 0: http://marcot.iaaeee.org/capoeira 1: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/control-timeout -- marcot Página: http://marcotmarcot.iaaeee.org/ Blog: http://marcotmarcot.blogspot.com/ Correio: marcot@riseup.net XMPP: marcot@jabber.org IRC: marcot@irc.freenode.net Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil

On Thu, Sep 18, 2008 at 9:46 AM, Marco Túlio Gontijo e Silva
Hello,
I've written a simple sequencer[0] using gtk2hs and control-timeout[1]. In GHCi it works fine, but when I compile it, the timeouts generated by control-timeout are not executed. Actually, when I use the keyboard a lot, at some time they got executed. I thought it could be that these two packages are incompatible, but the I wondered why they work in GHCi.
Any ideas?
Just a guess, but this might be a problem with control-timeout's use of the unsafePerformIO global variables hack. It's missing the standard NOINLINE annotations which prevent multiple copies of the global variable from being created. See the haddock docs for System.IO.Unsafe.unsafePerformIO for more information. -Judah

On Thu, Sep 18, 2008 at 10:05 AM, Judah Jacobson
Just a guess, but this might be a problem with control-timeout's use of the unsafePerformIO global variables hack. It's missing the standard NOINLINE annotations which prevent multiple copies of the global variable from being created. See the haddock docs for System.IO.Unsafe.unsafePerformIO for more information.
That might well be it, should be an easy fix to try. I'm afraid that I don't have enough time to do justice to my packages on Hackage these days so I've just sent an email requesting that they be removed. Anyone who wants to maintain any of them should grab it now. The repos are all at http://darcs.imperialviolet.org On the chopping block: binary-strict codec-libevent control-timeout ctemplate LRU network-connection network-dns network-minihttp network-rpca system-inotify Cheers -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org

Em Qui, 2008-09-18 às 11:30 -0700, Adam Langley escreveu:
I'm afraid that I don't have enough time to do justice to my packages on Hackage these days so I've just sent an email requesting that they be removed.
Maybe it's better that they stay there, even with nobody maintaining them. Greetings. -- marcot Página: http://marcotmarcot.iaaeee.org/ Blog: http://marcotmarcot.blogspot.com/ Correio: marcot@riseup.net XMPP: marcot@jabber.org IRC: marcot@irc.freenode.net Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil

On Thu, Sep 18, 2008 at 11:38 AM, Marco Túlio Gontijo e Silva
Maybe it's better that they stay there, even with nobody maintaining them.
Except that I feel shitty everytime someone someone emails me with questions or problems that I don't have the time to deal with. It's a constant cost for my name to be associated with them and, if nobody cares enough to take the maintainership, they should probably die - Hackage has a lot of packages these days. Do you want control-timeout? :) AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org

Em Qui, 2008-09-18 às 11:51 -0700, Adam Langley escreveu:
Do you want control-timeout?
I think control-timeout is very useful. I'll try to fix it, and if I could, I'll upload it to hackage then. Greetings. -- marcot Página: http://marcotmarcot.iaaeee.org/ Blog: http://marcotmarcot.blogspot.com/ Correio: marcot@riseup.net XMPP: marcot@jabber.org IRC: marcot@irc.freenode.net Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil

Em Qui, 2008-09-18 às 16:14 -0300, Marco Túlio Gontijo e Silva escreveu:
Em Qui, 2008-09-18 às 11:51 -0700, Adam Langley escreveu:
Do you want control-timeout?
I think control-timeout is very useful. I'll try to fix it, and if I could, I'll upload it to hackage then.
I couldn't, and I found a solution to what I want in System.Glib.MainLoop. So, if someone else is interested in maintaining this package, feel free to do it. Greetings. -- marcot Página: http://marcotmarcot.iaaeee.org/ Blog: http://marcotmarcot.blogspot.com/ Correio: marcot@riseup.net XMPP: marcot@jabber.org IRC: marcot@irc.freenode.net Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil

On Thu, Sep 18, 2008 at 11:30 AM, Adam Langley
On Thu, Sep 18, 2008 at 10:05 AM, Judah Jacobson
wrote: Just a guess, but this might be a problem with control-timeout's use of the unsafePerformIO global variables hack. It's missing the standard NOINLINE annotations which prevent multiple copies of the global variable from being created. See the haddock docs for System.IO.Unsafe.unsafePerformIO for more information.
That might well be it, should be an easy fix to try.
I'm afraid that I don't have enough time to do justice to my packages on Hackage these days so I've just sent an email requesting that they be removed. Anyone who wants to maintain any of them should grab it now. The repos are all at http://darcs.imperialviolet.org
Could you please send a separate message, and hence a new thread, to Haskell-Cafe asking for new maintainers to these libraries? If you're ready to hand over the role, that's the action which is most fair to the community at large. Thanks for your hard work and good luck in your other projects! Jason PS If you sent that email already and I missed it, then please disregard this.

Adam Langley
be removed. Anyone who wants to maintain any of them should grab it now. The repos are all at http://darcs.imperialviolet.org
On the chopping block:
binary-strict
Adam, I don't particularly want to maintain this as I have negative amounts of free time but I'll look after it as best I can if no-one else is in a position to pick it up. Dominic

Hello, Em Qui, 2008-09-18 às 10:05 -0700, Judah Jacobson escreveu:
Just a guess, but this might be a problem with control-timeout's use of the unsafePerformIO global variables hack. It's missing the standard NOINLINE annotations which prevent multiple copies of the global variable from being created.
I added the NOINLINE annotations and even tried building with -fno-cse, but the result was the same. Do you have any other suggestions? Greetings. -- marcot Página: http://marcotmarcot.iaaeee.org/ Blog: http://marcotmarcot.blogspot.com/ Correio: marcot@riseup.net XMPP: marcot@jabber.org IRC: marcot@irc.freenode.net Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil

On Fri, 2008-09-19 at 09:09 -0300, Marco Túlio Gontijo e Silva wrote:
I added the NOINLINE annotations and even tried building with -fno-cse, but the result was the same. Do you have any other suggestions?
A while ago I made a shim using control-event to provide the control-timeout api in Control.Event.Timeout. It performs worse than control-timeout because it computes absolute times on each addTimeout call, but might be fine for your needs. If this is a problem with unsafePeformIO it won't be fixed by this change - control-event uses the same hack to provide the control-timeout API. Alternatively, you could pass the timeout data structure as an argument as expected by the Control.Event module. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/control-event Tom
participants (6)
-
Adam Langley
-
Dominic Steinitz
-
Jason Dagit
-
Judah Jacobson
-
Marco Túlio Gontijo e Silva
-
Thomas M. DuBuisson