Re: [Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-28 Thread Dmitry V'yal

On 27.10.2010 13:16, Andy Stewart wrote:

Christopher Donechrisd...@googlemail.com  writes:


On 27 October 2010 10:13, Dmitry V'yalakam...@gmail.com  wrote:

While ago I had a question about opening the url in the default browser from
haskell program. I didn't get any immediate answers so I wrote my own
solution. On Linux it uses xdg-open and on Windows - ShellExecute Api.



Does it deserve to be a hackage package?


If it's not in an existing small library, yes. If I have to have a
dependency on gtk2hs just to do that, I'd rather have a small library.
Does it work on OS X? If not, I'm sure someone would submit a patch
for that. This can also be used for opening the file browser and such,
right?

It's APIs in GIO library (a sub-library in gtk2hs), you just need depend
on GIO don't need depend any other library.

Dmitry, it's unnecessary since GIO can do better with same experience
both Windows and Linux, don't need any external program help.
Infact, GIO not just call default browser for url, it can call any
program to open any format.


Ok then. I'll wait for it.
I hope binary package for Windows would be provided too. Currently I 
can't figure out how build gtk2hs there.

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


Re: [Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-28 Thread Andy Stewart
Dmitry V'yal akam...@gmail.com writes:

 On 27.10.2010 13:16, Andy Stewart wrote:
 Christopher Donechrisd...@googlemail.com  writes:

 On 27 October 2010 10:13, Dmitry V'yalakam...@gmail.com  wrote:
 While ago I had a question about opening the url in the default browser 
 from
 haskell program. I didn't get any immediate answers so I wrote my own
 solution. On Linux it uses xdg-open and on Windows - ShellExecute Api.

 Does it deserve to be a hackage package?

 If it's not in an existing small library, yes. If I have to have a
 dependency on gtk2hs just to do that, I'd rather have a small library.
 Does it work on OS X? If not, I'm sure someone would submit a patch
 for that. This can also be used for opening the file browser and such,
 right?
 It's APIs in GIO library (a sub-library in gtk2hs), you just need depend
 on GIO don't need depend any other library.

 Dmitry, it's unnecessary since GIO can do better with same experience
 both Windows and Linux, don't need any external program help.
 Infact, GIO not just call default browser for url, it can call any
 program to open any format.

 Ok then. I'll wait for it.
 I hope binary package for Windows would be provided too. Currently I can't 
 figure out how build
 gtk2hs there.
I guess we won't provide binary package for Windows, but i can tell you
how to build gtk2hs on Windows:

First:
see http://code.haskell.org/gtk2hs/INSTALL

short summary:

http://www.gtk.org/download-windows.html

and download one of the All-in-one bundles.

Note that you need to have ~/.cabal/bin on your PATH since otherwise building
the libraries will fail, saying that e.g. gtk2hsC2hs cannot be found.

Then do cabal install gtk2hs-buildtools gtk will install gtk2hs.

I suggest you pull gtk2hs darcs code first to test the GIO code i send
you before.

When build gtk2hs darcs, you need replace cabal install gtk2hs-buildtools gtk 
with below commands:

   darcs get --lazy http://code.haskell.org/gtk2hs/
   cd ./gtk2hs
   sudo chmod +x ./bootstrap.sh
   ./bootstrap.sh 

Cheers,

  -- Andy



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


[Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-28 Thread Simon Michael

On 10/27/10 1:13 AM, Dmitry V'yal wrote:

Code I wrote works quite well for my purposes and I copied it into
several my programs. In order to make maintenance easier I recently
thought about uploading it to hackage. But given a wast amount of
half-dead packages with intersecting functionality there I'd like to ask
the opinion of community. Does such library look helpful to you?


Absolutely! Please do release it in its own package. Gtk2hs is certainly too 
heavy a dependency for this.

I don't think you'll find anything in it, but here's what I've been using:

http://joyful.com/darcsweb/darcsweb.cgi?r=hledger;a=headblob;f=/hledger/Hledger/Cli/Utils.hs
 - openBrowserOn

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


[Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-27 Thread Andy Stewart
Christopher Done chrisd...@googlemail.com writes:

 On 27 October 2010 10:13, Dmitry V'yal akam...@gmail.com wrote:
 While ago I had a question about opening the url in the default browser from
 haskell program. I didn't get any immediate answers so I wrote my own
 solution. On Linux it uses xdg-open and on Windows - ShellExecute Api.

 Does it deserve to be a hackage package?

 If it's not in an existing small library, yes. If I have to have a
 dependency on gtk2hs just to do that, I'd rather have a small library.
 Does it work on OS X? If not, I'm sure someone would submit a patch
 for that. This can also be used for opening the file browser and such,
 right?
It's APIs in GIO library (a sub-library in gtk2hs), you just need depend
on GIO don't need depend any other library.

Dmitry, it's unnecessary since GIO can do better with same experience
both Windows and Linux, don't need any external program help.
Infact, GIO not just call default browser for url, it can call any
program to open any format.

Example, you install many different PDF-Viewer in your system, it will
return a Application list for *.pdf format...etc.

Good news is, gtk2hs-0.12.0 has ready for release, we will wait one week,
if no user report any bug of gtk2hs darcs, we will release.
Then you can use it.

Cheers,

  -- Andy


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