Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Issue installing reactive-banana-5.0.0.1 (Heinrich Apfelmus) 2. Signals and external bindings... (Mike Meyer) 3. Re: Signals and external bindings... (Brandon Allbery) 4. Re: Signals and external bindings... (Mike Meyer) 5. Re: Signals and external bindings... (Brandon Allbery) ---------------------------------------------------------------------- Message: 1 Date: Wed, 02 May 2012 15:25:05 +0200 From: Heinrich Apfelmus <apfel...@quantentunnel.de> Subject: Re: [Haskell-beginners] Issue installing reactive-banana-5.0.0.1 To: beginners@haskell.org Message-ID: <jnrcjh$c4n$1...@dough.gmane.org> Content-Type: text/plain; charset=UTF-8; format=flowed Miguel Negrao wrote: > > cabal install regex-base parsec-3.1.1 MissingH --reinstall > --constraint='mtl == 2.1? > > With this command it installs correctly, I can now run all the > examples. All seem to work fine except CRUD that crashed at some > point. Great! By the way, the crash is fixed in the development version of wxHaskell https://github.com/jodonoghue/wxHaskell >>> No, you have to create timers yourself. It's not very difficult, >>> though, you can just create a wxWidget and listen to its command >>> event. > > Is any generality lost because of this or are the approaches > equivalent ? Once you have a timer, you can make a behavior time :: Behavior t Time that indicates the current time and thus allows you to write functions that depend on the current clock time, just like in Conal's papers. In other words, the approaches are largely equivalent. The thing is just that different GUI or audio frameworks tend to have different implementations of timers and reactive-banana can't decide which one is more appropriate. For instance, Henning Thielemann uses ALSA-timers in his reactive-balsa package http://hackage.haskell.org/package/reactive-balsa-0.0 At some point, I intend to offer some common time-related functionality (for example as in the Wave.hs example) for different backends. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ------------------------------ Message: 2 Date: Wed, 2 May 2012 13:00:41 -0400 From: Mike Meyer <m...@mired.org> Subject: [Haskell-beginners] Signals and external bindings... To: beginners@haskell.org Message-ID: <20120502130041.65029...@bhuda.mired.org> Content-Type: text/plain; charset=US-ASCII I've just finished a QAD project in Python, and expect them to ask me to build the production version of the same project. I'd like to switch to Haskell, but (again, for those who noticed) have some questions I'd like answered. One problem I ran into is that I use Unix signals to control the various processes. In CPython, this causes a problem with extension code because the python signal handler at the C level just note the signal, then wait to run the Python "signal handler" the next time the interpreter. Since my extensions are doing the heavy lifting, they often run for long periods (by which I mean 10s of minutes). Meaning the signal is ignored for long periods. Since I expect to such extensions (the wrappers are available) and want to leave the control mechanisms in place, I'd like to know if I'm going to have similar problems in Haskell. Thanks, <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/ Independent Software developer/SCM consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org ------------------------------ Message: 3 Date: Wed, 2 May 2012 13:46:39 -0400 From: Brandon Allbery <allber...@gmail.com> Subject: Re: [Haskell-beginners] Signals and external bindings... To: Mike Meyer <m...@mired.org> Cc: beginners@haskell.org Message-ID: <CAKFCL4WCi41x=anogdenfymzyxkhhfuvyi00-qwj8e3+-r-...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Wed, May 2, 2012 at 1:00 PM, Mike Meyer <m...@mired.org> wrote: > One problem I ran into is that I use Unix signals to control the > various processes. In CPython, this causes a problem with extension > code because the python signal handler at the C level just note the > signal, then wait to run the Python "signal handler" the next time the > interpreter. Since my extensions are doing the heavy lifting, they > often run for long periods (by which I mean 10s of minutes). Meaning > the signal is ignored for long periods. > > Since I expect to such extensions (the wrappers are available) and > want to leave the control mechanisms in place, I'd like to know if I'm > going to have similar problems in Haskell. > Yes, and in pretty much any other language that requires its own runtime as well. Cross-runtime borders are *always* a problem for signals and various resources that may need to be cleaned up. You can use wrappers which save the old signal handlers and install new ones which clean up after your plugins and return. Doing so, and thereby learning the hard way what "clean up after your plugins" entails (unless you were very careful designing and writing them in the first place), will teach you why nobody tries to automatically handle it for you. (In the general case, your plugin has to track *everything* so it can unwind (or commit, as appropriate) memory and resource allocations on signal.) -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20120502/ed398b48/attachment-0001.htm> ------------------------------ Message: 4 Date: Wed, 2 May 2012 14:29:17 -0400 From: Mike Meyer <m...@mired.org> Subject: Re: [Haskell-beginners] Signals and external bindings... To: beginners@haskell.org <beginners@haskell.org> Message-ID: <20120502142917.63592...@bhuda.mired.org> Content-Type: text/plain; charset=US-ASCII On Wed, 2 May 2012 13:46:39 -0400 Brandon Allbery <allber...@gmail.com> wrote: > On Wed, May 2, 2012 at 1:00 PM, Mike Meyer <m...@mired.org> wrote: > You can use wrappers which save the old signal handlers and install new > ones which clean up after your plugins and return. Doing so, and thereby > learning the hard way what "clean up after your plugins" entails (unless > you were very careful designing and writing them in the first place), will > teach you why nobody tries to automatically handle it for you. (In the > general case, your plugin has to track *everything* so it can unwind (or > commit, as appropriate) memory and resource allocations on signal.) So unless I'm using something like Qt which can catch the signals and run it's own code to call back to my code and then shut itself down, I'm pretty much SOL. Thanks, <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/ Independent Software developer/SCM consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org ------------------------------ Message: 5 Date: Wed, 2 May 2012 17:35:05 -0400 From: Brandon Allbery <allber...@gmail.com> Subject: Re: [Haskell-beginners] Signals and external bindings... To: Mike Meyer <m...@mired.org> Cc: "beginners@haskell.org" <beginners@haskell.org> Message-ID: <CAKFCL4UcV7x0fS6e_2-+=ketqf6j294qyspkubdv+uokgs3...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Wed, May 2, 2012 at 2:29 PM, Mike Meyer <m...@mired.org> wrote: > On Wed, 2 May 2012 13:46:39 -0400 > Brandon Allbery <allber...@gmail.com> wrote: > > > On Wed, May 2, 2012 at 1:00 PM, Mike Meyer <m...@mired.org> wrote: > > You can use wrappers which save the old signal handlers and install new > > ones which clean up after your plugins and return. Doing so, and thereby > > learning the hard way what "clean up after your plugins" entails (unless > > you were very careful designing and writing them in the first place), > will > > teach you why nobody tries to automatically handle it for you. (In the > > So unless I'm using something like Qt which can catch the signals and > run it's own code to call back to my code and then shut itself down, > I'm pretty much SOL. Pretty much. And Qt only makes it a little easier; I think there are ways to do that with Haskell as well, but it doesn't necessarily earn you much aside from confusion if something goes wrong because of all the boundary crossings. -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20120502/2a09b1a1/attachment-0001.htm> ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 47, Issue 2 ****************************************