Re: [wxhaskell-users] Question about how to install WxHakell on Ubuntu and Win7

2013-03-04 Thread Maciek Makowski
Regarding the Ubuntu setup, wxHaskell 0.90 requires wxWidgets 2.9, which
are not packaged for Ubuntu as far as I know. You can try `cabal install
wx-0.13.2.3` for a version of wxHaskell compatible with wxWidgets 2.8, or
build wxWidgets 2.9 from source -- which will probably be harder.

Regards,
Maciek


On Sun, Mar 3, 2013 at 7:31 PM, Lu Kai flyskyw...@gmail.com wrote:

 Hi:
   I am trying to install wxhaskell on Ubuntu and Win7, but I failed on
 both systems.
 Is there anyone who could solve either of my problem ?
 Thank you very much!
 My problem on ubuntu is as follows:

 My OS is : Ubuntu 12.04 I have install GHCI 7.4.1, and cabal 1.14.0 and I
 try to install wxHaskell to do some GUI programming. 1) I have installed
 the sudo apt-get install g++ sudo apt-get install libglu-dev sudo apt-get
 install libwxgtk2.8-dev

 2) However, when I try to install wxhaskell using : cabal install wx

 I met a problem that: Resolving dependencies... [1 of 1] Compiling Main (
 /tmp/wxc-0.90.0.4-9701/wxc-0.90.0.4/Setup.hs,
 /tmp/wxc-0.90.0.4-9701/wxc-0.90.0.4/dist/setup/Main.o ) Linking
 /tmp/wxc-0.90.0.4-9701/wxc-0.90.0.4/dist/setup/setup ... Configuring
 wxc-0.90.0.4...

 Warning: No config found to match: /usr/bin/wx-config --version=2.9
 --version-full in /usr/lib/i386-linux-gnu/wx/config If you require this
 configuration, please install the desired library build. If this is part of
 an automated configuration test and no other errors occur, you may safely
 ignore it. You may use wx-config --list to see all configs available in the
 default prefix.

 setup: failed cabal: Error: some packages failed to install: wx-0.90.0.1
 depends on wxc-0.90.0.4 which failed to install. wxc-0.90.0.4 failed during
 the configure step. The exception was: ExitFailure 1 wxcore-0.90.0.3
 depends on wxc-0.90.0.4 which failed to install. 






 For the Win7, my problem is : cabal install wx-

 Resolving dependencies...

 Configuring strict-0.3.2...

 Building strict-0.3.2...

 Preprocessing library strict-0.3.2...

 built-in:0:4: lexical error (UTF-8 decoding error)

 cabal: Error: some packages failed to install:

 strict-0.3.2 failed during the building phase. The exception was:

 ExitFailure 1

 wx-0.90.0.1 depends on strict-0.3.2 which failed to install.

 wxc-0.90.0.4 depends on strict-0.3.2 which failed to install.

 wxcore-0.90.0.3 depends on strict-0.3.2 which failed to install.

 wxdirect-0.90.0.1 depends on strict-0.3.2 which failed to install.



 Thanks a lot!

 Best!


 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_feb
 ___
 wxhaskell-users mailing list
 wxhaskell-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] Fwd: UI updates from non-UI threads: an addition to wx?

2012-09-30 Thread maciek . makowski
I have now updated the module to use event-based notifications instead
of polling: 
https://github.com/mmakowski/habaz/blob/master/src/Graphics/UI/WX/Async.hs.
The original question still stands: is it worth exposing this sort of
abstraction as a part of wxHaskell?

Regards,
Maciek

On Wed, Sep 26, 2012 at 9:43 PM,  maciek.makow...@gmail.com wrote:
 Thanks for this, and for responding to the SO question. I'll see if I
 can rewrite the run async abstraction using your solution.

 Cheers,
 Maciek

 On Wed, Sep 26, 2012 at 8:30 AM, Henning Thielemann
 lemm...@henning-thielemann.de wrote:

 On Wed, 26 Sep 2012, Henning Thielemann wrote:

 However, it seems to be essential what eventId you use. The value in the
 above example (wxID_HIGHEST+1) was already used in my system and this lead
 to strange behavior. I think wxhaskell should provide support for finding
 free event ids.



 If you want to see this technique in action:
http://code.haskell.org/alsa/gui/src/controller.hs
http://code.haskell.org/alsa/gui/src/Common.hs

 I have implemented both the busy wait (reactOnEventTimer) and the
 event-driven method (reactOnEvent).

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] Fwd: UI updates from non-UI threads: an addition to wx?

2012-09-26 Thread maciek . makowski
Thanks for this, and for responding to the SO question. I'll see if I
can rewrite the run async abstraction using your solution.

Cheers,
Maciek

On Wed, Sep 26, 2012 at 8:30 AM, Henning Thielemann
lemm...@henning-thielemann.de wrote:

 On Wed, 26 Sep 2012, Henning Thielemann wrote:

 However, it seems to be essential what eventId you use. The value in the
 above example (wxID_HIGHEST+1) was already used in my system and this lead
 to strange behavior. I think wxhaskell should provide support for finding
 free event ids.



 If you want to see this technique in action:
http://code.haskell.org/alsa/gui/src/controller.hs
http://code.haskell.org/alsa/gui/src/Common.hs

 I have implemented both the busy wait (reactOnEventTimer) and the
 event-driven method (reactOnEvent).

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


[wxhaskell-users] Fwd: UI updates from non-UI threads: an addition to wx?

2012-09-25 Thread maciek . makowski
Including wxhaskell-users. Anyone interested in async UI update functionality?

Cheers,
Maciek

-- Forwarded message --
From:  maciek.makow...@gmail.com
Date: Fri, Aug 24, 2012 at 10:41 PM
Subject: UI updates from non-UI threads: an addition to wx?
To: wxhaskell-devel wxhaskell-de...@lists.sourceforge.net


Getting wxHaskell to handle UI updates from non-UI threads was a
frustrating experience; it's embarassing how long it took me to
realise that the solution presented in this StackOverflow answer:
http://stackoverflow.com/a/3182588/424978 is probably the only viable
one. I've packaged it into a tiny module that provides Gtk2hs-style
`postGUIAsync` function:
https://github.com/mmakowski/habaz/blob/master/src/Graphics/UI/WX/Async.hs.
Is there any interest in incorporating this into wxHaskell proper? It
might save other users some head scratching.

Regards,
Maciek

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] wxHaskell and forkIO or forkOS

2011-09-02 Thread maciek . makowski
There is indeed a claim in wxHaskell FAQ that it is incompatible with
Haskell threads. I have, however, used threads spawned with forkIO to
update wxHaskell GUI in toy apps, without any ill effects. Examples:

http://mmakowski.com/wiki/tech:haskell_mvc
https://github.com/mmakowski/habaz

I'd be interested to learn how the incompatibility can manifest itself
-- if there indeed is any.

Regards,
Maciek

On Fri, Sep 2, 2011 at 9:41 AM, D.V. dav.v...@gmail.com wrote:
 Bonjour List !

 I am writing a program that is supposed to listen to a tcp port, and
 when a client connects,
 update a UI done with wxHaskell.

 Since wxHaskell is not compatible with multiple threads, I am not sure
 how to do this.

 an idea I have is to

 - forkOS a thread which will do the network part.
 - when a message is sent from a client, write it to a channel
 - on the other thread, have a wxHaskell timer check periodically if a
 new message is available, update the UI if needed.

 I've tried it and it looks like it's working, but I anyone has some
 remark I'm interested.

 David.

 --
 Special Offer -- Download ArcSight Logger for FREE!
 Finally, a world-class log management solution at an even better
 price-free! And you'll get a free Love Thy Logs t-shirt when you
 download Logger. Secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsisghtdev2dev
 ___
 wxhaskell-users mailing list
 wxhaskell-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] wxHaskell and forkIO or forkOS

2011-09-02 Thread maciek . makowski
If the only restriction here is that all the GUI updates should happen
on the main OS thread, doesn't it mean that Haskell (green) threads
spawned through forkIO are fine, because they execute on the same OS
thread? Or does wxHaskell introduce additional restrictions?

Maciek

On Fri, Sep 2, 2011 at 3:21 PM, Eric Y. Kow eric@gmail.com wrote:
 On Fri, Sep 02, 2011 at 15:03:28 +0100, maciek.makow...@gmail.com wrote:
 There is indeed a claim in wxHaskell FAQ that it is incompatible with
 Haskell threads. I have, however, used threads spawned with forkIO to
 update wxHaskell GUI in toy apps, without any ill effects. Examples:

 http://mmakowski.com/wiki/tech:haskell_mvc
 https://github.com/mmakowski/habaz

 I'd be interested to learn how the incompatibility can manifest itself
 -- if there indeed is any.

 It's worth noting this entry from the wxWidgets FAQ:

  wxWidgets (like most GUI toolkits underneath it) is not thread-safe, and
  handling of GUI components should always be done exclusively in the main
  thread.

 This doesn't stop you from doing the non-GUI stuff in other threads
 though.

 Was interested to see that the wxHaskell mutable var is just a TVar
 (from STM?)

 --
 Eric Kow http://erickow.com


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] preview: wx-config in Haskell

2011-07-20 Thread maciek . makowski
Good to see something moving in wxHaskell on Windows space. Some random remarks:

- making wx cabal Setups dependent on this library instead of the
command line wx-config sounds like a very good idea
- one of the reasons it currently fails to work with official
wxHaskell darcs tip might be its usage of --version flag in
wxcore/Setup.hs, which I mentioned in a post to wxhaskell-devel a
couple of weeks back

Are you coming to CamHac in three weeks' time? I'd love to get
wxHaskell tip to buildable state in my environment, looks like your
help could be invaluable. In the mean time I'll see if I can build
from your branch.

Regards,
Maciek

On Wed, Jul 20, 2011 at 3:37 PM, Eric Y. Kow eric@gmail.com wrote:
 Hi everybody,

 I'm trying to simplify the process of installing wxHaskell on Windows.

 My wxhaskell branch at

   http://darcsden.com/kowey/wxhaskell

 contains a Haskell implementation of wx-config.

 It seems to work for me as a drop-in replacement for wx-config on Windows,
 at least as far as wxHaskell is concerned.  Note that it offers none of
 the features of the real wx-config.

 Good news
 -
 - no need to set WXCFG
 - setting WXWIN is optional if you put wxWidgets in a path
  this wx-config will think to look at (eg. C:\wxWidgets-2.8)
 - can be used as a Haskell library
 - can be depended on as a Cabal dependency

 Bad news
 
 - has not been tested with wxWidgets 2.9
 - broken with HEAD wxHaskell (seems to work for the latest released one)
 - no maintainer: I don't think I have the resources to actually maintain it
  or extend it with new features. I'm mainly hoping to break inertia by
  starting with something that sort of works while hoping that somebody
  else can take over.
 - none of the features/safety of the real wx-config. In fact, it's little
  more than a glorified putStrLn of the wx-config --cppflags --libs
  output.  Crucially, this may break other wxFoo bindings that use
  wx-config (this is easy for us to work around, eg. only use it as a
  library, and don't install a wx-config executable)

 What do you think?

 --
 Eric Kow http://erickow.com

 --
 10 Tips for Better Web Security
 Learn 10 ways to better secure your business today. Topics covered include:
 Web security, SSL, hacker attacks  Denial of Service (DoS), private keys,
 security Microsoft Exchange, secure Instant Messaging, and much more.
 http://www.accelacomm.com/jaw/sfnl/114/51426210/
 ___
 wxhaskell-users mailing list
 wxhaskell-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxhaskell-users



--
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks  Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] can't load .so/.DLL for : stdc++

2011-06-27 Thread maciek . makowski
It's been a while since I last installed wxHaskell on Linux, but if
memory serves me well I needed to install libstdc++-dev to get it to
build. Do you have this package installed?

Regards,
Maciek

On Thu, Jun 23, 2011 at 4:11 AM, Joel Shellman j...@mentics.com wrote:
 I have seen this mentioned in various places but haven't seen a
 solution for it. I'm on Ubuntu Natty using ghc 7.0.3.20110330 running
 cabal install on my project and I get the below error:

 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package array-0.3.0.2 ... linking ... done.
 Loading package stm-2.2.0.1 ... linking ... done.
 Loading package bytestring-0.9.1.10 ... linking ... done.
 Loading package containers-0.4.0.0 ... linking ... done.
 Loading package filepath-1.2.0.0 ... linking ... done.
 Loading package old-locale-1.0.0.2 ... linking ... done.
 Loading package old-time-1.0.0.6 ... linking ... done.
 Loading package unix-2.4.2.0 ... linking ... done.
 Loading package directory-1.1.0.0 ... linking ... done.
 Loading package transformers-0.2.2.0 ... linking ... done.
 Loading package mtl-2.0.1.0 ... linking ... done.
 Loading package parsec-3.1.1 ... linking ... done.
 Loading package time-1.2.0.3 ... linking ... done.
 Loading package wxdirect-0.12.1.4 ... linking ... done.
 Loading package wxcore-0.12.1.7 ... command line: can't load
 .so/.DLL for: stdc++ (libstdc++.so: cannot open shared object file: No
 such file or directory)
 cabal: Error: some packages failed to install:

 --
 Simplify data backup and recovery for your virtual environment with vRanger.
 Installation's a snap, and flexible recovery options mean your data is safe,
 secure and there when you need it. Data protection magic?
 Nope - It's vRanger. Get your free trial download today.
 http://p.sf.net/sfu/quest-sfdev2dev
 ___
 wxhaskell-users mailing list
 wxhaskell-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxhaskell-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
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


[wxhaskell-users] Solved: Ubuntu: cabal install wx reports missing wx libraries

2010-12-05 Thread maciek . makowski
Hi,

This is resolved now. The error message was misleading but running
cabal install with --verbose=3 helped:

/usr/bin/ld: cannot find -lstdc++

Turned out g++ package was missing, after installing it wxcore built
and installed fine.

As for the misleading missing libraries message produced by cabal,
apparently this or a similar issue is already recognised:
http://hackage.haskell.org/trac/hackage/ticket/648 so I won't be
raising it against cabal for now.

Regards,
Maciek

On Thu, Dec 2, 2010 at 2:25 PM,  maciek.makow...@gmail.com wrote:
 Hi,

 On my system (Ubuntu Maverick with haskell-platform 2010.1.0.0.1)
 'cabal install wx' results in the following:

 Configuring wxcore-0.12.1.6...
 setup: Missing dependencies on foreign libraries:
 * Missing C libraries: wx_baseu-2.8, wx_baseu_net-2.8, wx_baseu_xml-2.8,
 wx_gtk2u_core-2.8, wx_gtk2u_adv-2.8, wx_gtk2u_html-2.8, wx_gtk2u_qa-2.8,
 wx_gtk2u_xrc-2.8, wx_gtk2u_aui-2.8, wx_gtk2u_richtext-2.8
 This problem can usually be solved by installing the system packages that
 provide these libraries (you may need the -dev versions). If the libraries
 are already installed but in a non-standard location then you can use the
 flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
 cabal: Error: some packages failed to install:
 wx-0.12.1.6 depends on wxcore-0.12.1.6 which failed to install.
 wxcore-0.12.1.6 failed during the configure step. The exception was:
 ExitFailure 1

 However:

 mmakow...@tallis:~/temp/wxcore-0.12.1.6$ ls -1 /usr/lib/libwx_*.so
 /usr/lib/libwx_baseu-2.8.so
 /usr/lib/libwx_baseu_net-2.8.so
 /usr/lib/libwx_baseu_xml-2.8.so
 /usr/lib/libwx_gtk2u_adv-2.8.so
 /usr/lib/libwx_gtk2u_aui-2.8.so
 /usr/lib/libwx_gtk2u_core-2.8.so
 /usr/lib/libwx_gtk2u_fl-2.8.so
 /usr/lib/libwx_gtk2u_gizmos-2.8.so
 /usr/lib/libwx_gtk2u_gizmos_xrc-2.8.so
 /usr/lib/libwx_gtk2u_gl-2.8.so
 /usr/lib/libwx_gtk2u_html-2.8.so
 /usr/lib/libwx_gtk2u_ogl-2.8.so
 /usr/lib/libwx_gtk2u_plot-2.8.so
 /usr/lib/libwx_gtk2u_qa-2.8.so
 /usr/lib/libwx_gtk2u_richtext-2.8.so
 /usr/lib/libwx_gtk2u_stc-2.8.so
 /usr/lib/libwx_gtk2u_svg-2.8.so
 /usr/lib/libwx_gtk2u_xrc-2.8.so

 Any idea what I'm doing wrong or how I can diagnose this further? It's
 my first attempt to use cabal so apologies if I missed something
 obvious.

 Thanks,
 Maciek


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


[wxhaskell-users] Ubuntu: cabal install wx reports missing wx libraries

2010-12-02 Thread maciek . makowski
Hi,

On my system (Ubuntu Maverick with haskell-platform 2010.1.0.0.1)
'cabal install wx' results in the following:

Configuring wxcore-0.12.1.6...
setup: Missing dependencies on foreign libraries:
* Missing C libraries: wx_baseu-2.8, wx_baseu_net-2.8, wx_baseu_xml-2.8,
wx_gtk2u_core-2.8, wx_gtk2u_adv-2.8, wx_gtk2u_html-2.8, wx_gtk2u_qa-2.8,
wx_gtk2u_xrc-2.8, wx_gtk2u_aui-2.8, wx_gtk2u_richtext-2.8
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the -dev versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: Error: some packages failed to install:
wx-0.12.1.6 depends on wxcore-0.12.1.6 which failed to install.
wxcore-0.12.1.6 failed during the configure step. The exception was:
ExitFailure 1

However:

mmakow...@tallis:~/temp/wxcore-0.12.1.6$ ls -1 /usr/lib/libwx_*.so
/usr/lib/libwx_baseu-2.8.so
/usr/lib/libwx_baseu_net-2.8.so
/usr/lib/libwx_baseu_xml-2.8.so
/usr/lib/libwx_gtk2u_adv-2.8.so
/usr/lib/libwx_gtk2u_aui-2.8.so
/usr/lib/libwx_gtk2u_core-2.8.so
/usr/lib/libwx_gtk2u_fl-2.8.so
/usr/lib/libwx_gtk2u_gizmos-2.8.so
/usr/lib/libwx_gtk2u_gizmos_xrc-2.8.so
/usr/lib/libwx_gtk2u_gl-2.8.so
/usr/lib/libwx_gtk2u_html-2.8.so
/usr/lib/libwx_gtk2u_ogl-2.8.so
/usr/lib/libwx_gtk2u_plot-2.8.so
/usr/lib/libwx_gtk2u_qa-2.8.so
/usr/lib/libwx_gtk2u_richtext-2.8.so
/usr/lib/libwx_gtk2u_stc-2.8.so
/usr/lib/libwx_gtk2u_svg-2.8.so
/usr/lib/libwx_gtk2u_xrc-2.8.so

Any idea what I'm doing wrong or how I can diagnose this further? It's
my first attempt to use cabal so apologies if I missed something
obvious.

Thanks,
Maciek

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users