Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread M Xyz


--- On Sat, 12/5/09, Andrew Coppin  wrote:
>> Hell, I even followed a C++ guide to Win32 programming and
>> managed to translate an "open a blank window" program to Haskell, and it
>> worked. Maybe somebody just needs to sit down and write a nice binding
>> for doing native GUI stuff under Win32?

Well there's 
http://haskell.org/ghc/docs/latest/html/libraries/Win32/Graphics-Win32.html for 
opening blank windows. ;)

This relates to my question a couple days ago about a good cross platform 2d 
library. I wonder why there isnt a Haskell library that follows in the 
footsteps of Java's Swing - by that I mean, just have a very simple low level 
way of opening a window, getting mouse clicks, and an abstracted drawing 
layer... and make the GUIs with that. The GUIs are drawn and not OS widgets. 
That's exactly why I was looking for something like Cairo. My interest is in 
composable fudgets (stealing the word from fudgets). 

This way every platform can share the same GUI library and HP can ship with the 
minimal tools to open a window and draw on every system. Plus OS guis are the 
wrong thing for Haskell. You need to retain the power to make better 
abstractions.





  ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread M Xyz


--- On Sat, 12/5/09, Daniel Fischer  wrote:


I thought in this case, it was a proposed change in the installer, so you'd 
only have to 
change that and could leave the gtk2hs binary untouched. Of course that can 
only work if 
Windows installers are some sort of script or otherwise customisable. Are they?

If they used a tool like NSIS then it would be as easy as modifying the script. 
I emailed a Gtk developer offering to help if that were the case.




  ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread Daniel Fischer
Am Samstag 05 Dezember 2009 21:31:39 schrieb Andrew Coppin:
> Daniel Fischer wrote:
> > Am Samstag 05 Dezember 2009 20:14:17 schrieb Andrew Coppin:
> >> Bulat Ziganshin wrote:
> >>> Developer. many Haskell problems is due to the fact that we have a few
> >>> volunteers doing things and lot of consumers begging for features :)
> >>
> >> That *does* in fact seem to be a recurring problem, yes.
> >>
> >> Now, how to fix this...?
> >
> > How about:
> >
> > get the sources, try proposed fix, if it works, send Duncan(*) the patch?
> > Even better, become a gtk2hs developer yourself (though that's more work
> > and probably requires some serious knowledge of gtk).
>
> In order to do this, I'd have to know how to build Gtk2hs from source on
> Windows. I imagine this is quite nontrivial.

I thought in this case, it was a proposed change in the installer, so you'd 
only have to 
change that and could leave the gtk2hs binary untouched. Of course that can 
only work if 
Windows installers are some sort of script or otherwise customisable. Are they?

>
> >> Interestingly, while you can't compile bindings to external C libraries,
> >> GHC does appear to ship with all the header files for Windows, which is
> >> odd. It seems if you try to FFI to a standard Win32 function, it
> >> magically knows where the hell the header files are, and it Just
> >> Works(tm). Hell, I even followed a C++ guide to Win32 programming and
> >> managed to translate an "open a blank window" program to Haskell, and it
> >> worked. Maybe somebody just needs to sit down and write a nice binding
> >> for doing native GUI stuff under Win32?
> >
> > Maybe you could try to be that somebody? I'm sure the Windows folks would
> > appreciate it very much
>
> The thought has certainly crossed my mind. If I could write such a
> package, I imagine a lot of people would find it seriously useful.
> Native Windows GUI programs, without any 3rd party DLLs to distribute
> with your compiled binary... It'd be great, wouldn't it?
>
> Of course, thinking about how great it would be doesn't get the code
> written. ;-) I'd have to learn how to call Win32 from C first, for a
> start... o_O

Yes, of course, ultra posse nemo obligatur.
As long as you can't do something, you can only hope somebody else can and does.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread Andrew Coppin

Daniel Fischer wrote:

Am Samstag 05 Dezember 2009 20:14:17 schrieb Andrew Coppin:
  

Bulat Ziganshin wrote:


Developer. many Haskell problems is due to the fact that we have a few
volunteers doing things and lot of consumers begging for features :)
  

That *does* in fact seem to be a recurring problem, yes.

Now, how to fix this...?



How about:

get the sources, try proposed fix, if it works, send Duncan(*) the patch?
Even better, become a gtk2hs developer yourself (though that's more work and probably 
requires some serious knowledge of gtk).
  


In order to do this, I'd have to know how to build Gtk2hs from source on 
Windows. I imagine this is quite nontrivial.



Interestingly, while you can't compile bindings to external C libraries,
GHC does appear to ship with all the header files for Windows, which is
odd. It seems if you try to FFI to a standard Win32 function, it
magically knows where the hell the header files are, and it Just
Works(tm). Hell, I even followed a C++ guide to Win32 programming and
managed to translate an "open a blank window" program to Haskell, and it
worked. Maybe somebody just needs to sit down and write a nice binding
for doing native GUI stuff under Win32?


Maybe you could try to be that somebody? I'm sure the Windows folks would appreciate it 
very much


The thought has certainly crossed my mind. If I could write such a 
package, I imagine a lot of people would find it seriously useful. 
Native Windows GUI programs, without any 3rd party DLLs to distribute 
with your compiled binary... It'd be great, wouldn't it?


Of course, thinking about how great it would be doesn't get the code 
written. ;-) I'd have to learn how to call Win32 from C first, for a 
start... o_O


The various I/O libraries sometimes return weird results, and I'm told 
this is because GHC is using the emulated POSIX interfaces rather than 
native Win32 calls. I did think about turning my attention to fixing 
that. However, I notice the next version of GHC seems to have a 
radically reworked set of I/O libraries, so maybe it's already fixed?


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread Stephen Tetley
2009/12/5 Andrew Coppin :

> Interestingly, while you can't compile bindings to external C libraries,


Ah Mr Coppin,  maybe you should change "you" to "I".

I had (Haskell bindings) SDL-0.5.3 working August last year - so I
think I would be using GHC 6.8.3 at that time, the version of the SDL
C library was 1.2.13.

SDL has no prepared package in the Cygwin package manager, so you have
to download it yourself. I seem to remember it being more tricky to
get SDL working under Cygwin as a C library (you need extra DirectX
header files at least), than it was to compile the Haskell binding
once the C library was working. Instructions for compiling the C
library for Cygwin are on the SDL website.

I haven't tried it since as I don't need SDL for anything I do, but
don't I think it would be any harder (lemmih's binding seems to be
pretty stable and at the time I used it, it was impressively tidy).

Best wishes again

Stephen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread Daniel Fischer
Am Samstag 05 Dezember 2009 20:14:17 schrieb Andrew Coppin:
> Bulat Ziganshin wrote:
> > Hello Andrew,
> >
> > Saturday, December 5, 2009, 6:40:23 PM, you wrote:
> >> prominent?) Somebody pointed out this bug 6 months ago. Somebody else
> >> posted a potential fix a month ago. There is no visible activity from
> >> the developers.
> >
> > Developer. many Haskell problems is due to the fact that we have a few
> > volunteers doing things and lot of consumers begging for features :)
>
> That *does* in fact seem to be a recurring problem, yes.
>
> Now, how to fix this...?

How about:

get the sources, try proposed fix, if it works, send Duncan(*) the patch?
Even better, become a gtk2hs developer yourself (though that's more work and 
probably 
requires some serious knowledge of gtk).

(*) for gtk2hs, would be somebody else for other packages of course.

>
> >> Gtk2hs is currently the *only* GUI binding that actually works on
> >> Windows.
> >
> > i thought that wx and even qt are in rather good shape now
>
> I did try to get wxHaskell going once or twice. And the SDL binding. (I
> wasn't aware we have Qt now...) I've never got any of them to work yet. :-(
>
> Interestingly, while you can't compile bindings to external C libraries,
> GHC does appear to ship with all the header files for Windows, which is
> odd. It seems if you try to FFI to a standard Win32 function, it
> magically knows where the hell the header files are, and it Just
> Works(tm). Hell, I even followed a C++ guide to Win32 programming and
> managed to translate an "open a blank window" program to Haskell, and it
> worked. Maybe somebody just needs to sit down and write a nice binding
> for doing native GUI stuff under Win32?
>
Maybe you could try to be that somebody? I'm sure the Windows folks would 
appreciate it 
very much.
Or, if you think that's beyond your ken, try organising the writing.
Perhaps create a windows-haskell mailing list where Windows users can help each 
other 
making things work on Windows.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread Andrew Coppin

Bulat Ziganshin wrote:

Hello Andrew,

Saturday, December 5, 2009, 6:40:23 PM, you wrote:

  

prominent?) Somebody pointed out this bug 6 months ago. Somebody else
posted a potential fix a month ago. There is no visible activity from 
the developers.



Developer. many Haskell problems is due to the fact that we have a few
volunteers doing things and lot of consumers begging for features :)
  


That *does* in fact seem to be a recurring problem, yes.

Now, how to fix this...?


Gtk2hs is currently the *only* GUI binding that actually works on
Windows.



i thought that wx and even qt are in rather good shape now
  


I did try to get wxHaskell going once or twice. And the SDL binding. (I 
wasn't aware we have Qt now...) I've never got any of them to work yet. :-(


Interestingly, while you can't compile bindings to external C libraries, 
GHC does appear to ship with all the header files for Windows, which is 
odd. It seems if you try to FFI to a standard Win32 function, it 
magically knows where the hell the header files are, and it Just 
Works(tm). Hell, I even followed a C++ guide to Win32 programming and 
managed to translate an "open a blank window" program to Haskell, and it 
worked. Maybe somebody just needs to sit down and write a nice binding 
for doing native GUI stuff under Win32?


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread Andrew Coppin

M Xyz wrote:




- Apart from HP providing GHC 6.10.4 while Gtk2hs currently
requires 6.10.3, it appears that the Gtk2hs installer package
doesn't like GHC being installed in a path with spaces. Apparently
Gtk2hs has a bug tracker. (I only just discovered this, so perhaps
it needs to be more prominent?) Somebody pointed out this bug 6
months ago. Somebody else posted a potential fix a month ago.
There is no visible activity from the developers. (I emphasize
"visible". Maybe they've seen this and they're working on it, but
there's no visible indication of activity.)

Thank you so much for this post. I tried to install Gtk2hs yesterday 
to play with
its Cairo bindings and I hit the "Setup found what appears to be a 
non-working installation of GHC" brickwall. I found a closed ticket 
about this problem: http://hackage.haskell.org/trac/gtk2hs/ticket/1117
I posted this issue on the Gtk2hs-devel mailing list and got a 
response today:

http://sourceforge.net/mailarchive/forum.php?thread_name=EF0EE62B-259C-4F62-9BF2-65FA1F01949E%40di.ens.fr&forum_name=gtk2hs-devel

I don't think I have the will to uninstall the Haskell Platform and 
everything I've set up just to install in a path with no spaces. :)




My information is from here:

http://hackage.haskell.org/trac/gtk2hs/ticket/1165

In case it makes any difference to you. :-)

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread M Xyz



- Apart from HP providing GHC 6.10.4 while Gtk2hs currently requires 6.10.3, it 
appears that the Gtk2hs installer package doesn't like GHC being installed in a 
path with spaces. Apparently Gtk2hs has a bug tracker. (I only just discovered 
this, so perhaps it needs to be more prominent?) Somebody pointed out this bug 
6 months ago. Somebody else posted a potential fix a month ago. There is no 
visible activity from the developers. (I emphasize "visible". Maybe they've 
seen this and they're working on it, but there's no visible indication of 
activity.)

Thank you so much for this post. I tried to install Gtk2hs yesterday to play 
with
its Cairo bindings and I hit the "Setup found what appears to be a
 non-working installation of GHC" brickwall. I found a closed ticket about this 
problem: http://hackage.haskell.org/trac/gtk2hs/ticket/1117
I posted this issue on the Gtk2hs-devel mailing list and got a response today:
http://sourceforge.net/mailarchive/forum.php?thread_name=EF0EE62B-259C-4F62-9BF2-65FA1F01949E%40di.ens.fr&forum_name=gtk2hs-devel

I don't think I have the will to uninstall the Haskell Platform and everything 
I've set up just to install in a path with no spaces. :)



  


  ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HP + Gtk2hs?

2009-12-05 Thread Bulat Ziganshin
Hello Andrew,

Saturday, December 5, 2009, 6:40:23 PM, you wrote:

> prominent?) Somebody pointed out this bug 6 months ago. Somebody else
> posted a potential fix a month ago. There is no visible activity from 
> the developers.

Developer. many Haskell problems is due to the fact that we have a few
volunteers doing things and lot of consumers begging for features :)

> Gtk2hs is currently the *only* GUI binding that actually works on
> Windows.

i thought that wx and even qt are in rather good shape now


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe