John Lato | 6 Jul 2011 13:23
Picon

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

Message: 23

Date: Wed, 06 Jul 2011 10:14:56 +0100
From: Simon Marlow <marlowsd <at> gmail.com>
Subject: Re: [Haskell-cafe] How to ensure code executes in the context
       of a    specific OS thread?
To: Jason Dagit <dagitj <at> gmail.com>, cvs-ghc <at> haskell.org,        Haskell Cafe
       <haskell-cafe <at> haskell.org>
Message-ID: <4E142790.8090009 <at> gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 05/07/2011 20:33, Ian Lynagh wrote:
> On Tue, Jul 05, 2011 at 08:11:21PM +0100, Simon Marlow wrote:
>>
>> In GHCi it's a different matter, because the main thread is running
>> GHCi itself, and all the expressions/statements typed at the prompt
>> are run in forkIO'd threads (a new one for each statement, in fact).
>> If you want a way to run command-line operations in the main thread,
>> please submit a feature request.  I'm not sure it can be done, but
>> I'll look into it.
>
> We already have a way: -fno-ghci-sandbox

Aha, I'd forgotten about that!  Thanks Ian.

Simon

IIRC a lot of people have had trouble running GUI apps from within GHCi on OS X, whether they're GLUT, Gtk2hs, WxHaskell, or native, and several users consider this a large obstacle.  I know that I haven't been successful with gtk2hs.  However, at this suggestion I just tried running a gtk2hs app I'm developing with the -fno-ghci-sandbox flag, and it worked perfectly.

Thanks very much, Ian.

John L.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Gtk2hs-users mailing list
Gtk2hs-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
koral | 6 Jul 2011 19:39
Favicon

Re: Webkit demo and flash video

 Would it be possible to get an answer please ? :)

 On Thu, 23 Jun 2011 00:12:27 +0200, <koral <at> mailoo.org> wrote:
> Hi,
>
>  I've just noticed the demo webkit browser provided with the webkit
>  package freezes when attempting to play any flash video. I tried 
> other
>  webkit browsers (epiphany, chromium) and it worked well, so I'm
>  suspecting a bug in the haskell binding of webkit. First, could 
> someone
>  confirm this problem ?
>
>  Thank you.

--

-- 
 koral

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
wagnerdm | 6 Jul 2011 19:54
Favicon
Gravatar

Re: Webkit demo and flash video

I tried to confirm, but can't get webkit to build (from darcs).

crabgrass:~/inst/webkit% cabal configure
Resolving dependencies...
Configuring webkit-0.12.1...
setup: gtk2hsHookGenerator: Invalid character in input file:
MSTRI
zsh: exit 1     cabal configure

~d

Quoting koral <at> mailoo.org:

>  Would it be possible to get an answer please ? :)
>
>  On Thu, 23 Jun 2011 00:12:27 +0200, <koral <at> mailoo.org> wrote:
>> Hi,
>>
>>  I've just noticed the demo webkit browser provided with the webkit
>>  package freezes when attempting to play any flash video. I tried
>> other
>>  webkit browsers (epiphany, chromium) and it worked well, so I'm
>>  suspecting a bug in the haskell binding of webkit. First, could
>> someone
>>  confirm this problem ?
>>
>>  Thank you.
>
> --
>  koral
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Gtk2hs-users mailing list
> Gtk2hs-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
>
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
koral | 6 Jul 2011 20:36
Favicon

Re: Webkit demo and flash video

> I tried to confirm, but can't get webkit to build (from darcs).
>
> crabgrass:~/inst/webkit% cabal configure
> Resolving dependencies...
> Configuring webkit-0.12.1...
> setup: gtk2hsHookGenerator: Invalid character in input file:
> MSTRI
> zsh: exit 1     cabal configure

 That's strange, it works fine here:

 % cabal configure
 Resolving dependencies...

 Gtk2HsSetup.hs:25:2:
      warning: #warning Setup.hs is guessing the version of Cabal. If 
 compilation of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal 
 version 1.x.0 when building (prefixed by --ghc-option= when using the 
 'cabal' command) [-Wcpp]
 [1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, 
 dist/setup/Gtk2HsSetup.o )
 [2 of 2] Compiling Main             ( Setup.hs, dist/setup/Main.o )
 Linking ./dist/setup/setup ...
 Configuring webkit-0.12.1...

--

-- 
 koral

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Axel Simon | 7 Jul 2011 08:24
Picon
Favicon

Re: Webkit demo and flash video

On 06.07.2011, at 19:39, <koral <at> mailoo.org> wrote:

> Would it be possible to get an answer please ? :)
>

Uh, well. Only a really bad ones:

a) I'm swamped with work. I would release a gtk version that runs with  
ghc 7 if I weren't.
b) I haven't used the webkit binding and I've never even built it.  
Andy Stewart should know.

 <at> David:

c) The bad character: You might have a CPP that behaves oddly. There  
shouldn't be any tri-graphs in our sources but you could try to  
disable them by adding a flag to the command line of CPP. I think you  
can do this using cabal somehow.

Cheers,
Axel

> On Thu, 23 Jun 2011 00:12:27 +0200, <koral <at> mailoo.org> wrote:
>> Hi,
>>
>> I've just noticed the demo webkit browser provided with the webkit
>> package freezes when attempting to play any flash video. I tried
>> other
>> webkit browsers (epiphany, chromium) and it worked well, so I'm
>> suspecting a bug in the haskell binding of webkit. First, could
>> someone
>> confirm this problem ?
>>
>> Thank you.
>
> -- 
> koral
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously  
> valuable.
> Why? It contains a definitive record of application performance,  
> security
> threats, fraudulent activity, and more. Splunk takes this data and  
> makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Gtk2hs-users mailing list
> Gtk2hs-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
koral | 7 Jul 2011 17:14
Favicon

Re: Webkit demo and flash video

> Uh, well. Only a really bad ones:
>
> a) I'm swamped with work. I would release a gtk version that runs
> with  ghc 7 if I weren't.
> b) I haven't used the webkit binding and I've never even built it.
> Andy Stewart should know.

 Well sorry for bothering you then :s . Where should I start to learn 
 how to hack the webkit package myself ?

--

-- 
 koral

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Axel Simon | 7 Jul 2011 17:59
Picon
Favicon

Re: Webkit demo and flash video

Hi Koral,

On 07.07.2011, at 17:14, <koral <at> mailoo.org> wrote:

>> Uh, well. Only a really bad ones:
>>
>> a) I'm swamped with work. I would release a gtk version that runs
>> with  ghc 7 if I weren't.
>> b) I haven't used the webkit binding and I've never even built it.
>> Andy Stewart should know.
>
> Well sorry for bothering you then :s . Where should I start to learn
> how to hack the webkit package myself ?
>

This could be a threading issue since you say that the application  
freezes. You can probably confirm this by running your Haskell program  
in gdb and stopping it to see what threads there are. You could try to  
use hello debugging to see after which call it freezes or register a  
periodic timeout that prints something to the console. If that stops  
printing then the main Gtk loop is not run anymore which it should  
when you call mainGUI.

Cheers,
Axel

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Magicloud Magiclouds | 12 Jul 2011 12:13
Picon

Any news about gtk3 binding?

Hi there,
  From gtk3's binding support list, I saw gtk2hs there.
  Well, is it correct? Can I use gtk3hs now?
--

-- 
竹密岂妨流水过
山高哪阻野云飞
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Gtk2hs-users mailing list
Gtk2hs-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
Axel Simon | 12 Jul 2011 12:27
Picon
Favicon

Re: Any news about gtk3 binding?


On 12.07.2011, at 12:13, Magicloud Magiclouds wrote:

> Hi there,
>  From gtk3's binding support list, I saw gtk2hs there.
>  Well, is it correct? Can I use gtk3hs now?

Well, I guess somebody did a copy and paste job there. I think we have  
to add a few #ifdefs to exclude legacy Gtk2 stuff. But currently I'm  
still struggling to get the ghc 7 patches in.

Axel

> -- 
> 竹密岂妨流水过
> 山高哪阻野云飞
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously  
> valuable.
> Why? It contains a definitive record of application performance,  
> security
> threats, fraudulent activity, and more. Splunk takes this data and  
> makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Gtk2hs-users mailing list
> Gtk2hs-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Gtk2hs-users mailing list
Gtk2hs-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
Christoffer Öjeling | 15 Jul 2011 00:32
Picon

gtk_entry_set_icon_from_* missing

Hi,
The functions introduced in gtk 2.16 for adding icons to a text entry
seems to be missing.
http://developer.gnome.org/gtk/2.24/GtkEntry.html#gtk-entry-set-icon-from-stock
The signals to connect the icons are there though, entryIconPress and
entryIconRelease.
Could this be added?

Thanks,
Christoffer

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev

Gmane