Re: [Haskell-cafe] Unicode workaround for getDirectoryContents under Windows?

2009-06-13 Thread Bulat Ziganshin
Hello Shu-yu, Sunday, June 14, 2009, 7:41:46 AM, you wrote: > It seems like getDirectoryContents applies codepage conversion based it's not a bug, but old-fashioned architecture of entire file apis you may find my Win32Files.hs module useful - it adopts UTF-16 versions of file operations http:

Re: [Haskell-cafe] Unicode workaround for getDirectoryContents under Windows?

2009-06-13 Thread Judah Jacobson
On Sat, Jun 13, 2009 at 8:41 PM, Shu-yu Guo wrote: > Hello all, > > It seems like getDirectoryContents applies codepage conversion based > on the default program locale under Windows. What this means is that > if my default codepage is some kind of Latin, Asian glyphs get > returned as '?' in the f

[Haskell-cafe] Unicode workaround for getDirectoryContents under Windows?

2009-06-13 Thread Shu-yu Guo
Hello all, It seems like getDirectoryContents applies codepage conversion based on the default program locale under Windows. What this means is that if my default codepage is some kind of Latin, Asian glyphs get returned as '?' in the filename. By '?' I don't mean that the font is lacking the glyp

Re: [Haskell-cafe] How to know the build dependencies?

2009-06-13 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Sat, Jun 13, 2009 at 10:22 PM, Magicloud Magiclouds wrote: > Hi, > I am learning to use cabal for my code. > Just when I start, I met a question, is there an easy way to find > out what packages my code depends? > > Thanks. Not really. The easi

[Haskell-cafe] Re: HSH and IO ()

2009-06-13 Thread John Goerzen
Dimitry Golubovsky wrote: > I'll try to write a wrapper for a forked process inside a Channel -> > IO Channel typed function. Your best bet would be to start with these instances in HSH.Command: instance ShellCommand (String, [String]) where instance ShellCommand String where and the implementa

[Haskell-cafe] How to know the build dependencies?

2009-06-13 Thread Magicloud Magiclouds
Hi, I am learning to use cabal for my code. Just when I start, I met a question, is there an easy way to find out what packages my code depends? Thanks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/ha

[Haskell-cafe] Re: HSH and IO ()

2009-06-13 Thread Dimitry Golubovsky
John, On Sat, Jun 13, 2009 at 7:01 PM, John Goerzen wrote: >> where hscpid corresponds to a process that runs a Haskell function >> (hsffigMain :: a -> b -> c -> IO ()) defined within the same program, >> and gccpid runs an external program (gcc), and they are piped >> together. I am trying to avo

Re: [Haskell-cafe] Re: HSH and IO ()

2009-06-13 Thread John Goerzen
On Sat, Jun 13, 2009 at 05:06:41PM -0700, Jason Dagit wrote: > On Sat, Jun 13, 2009 at 4:01 PM, John Goerzen wrote: > > > Dimitry Golubovsky wrote: > > > > > where hscpid corresponds to a process that runs a Haskell function > > > (hsffigMain :: a -> b -> c -> IO ()) defined within the same progr

Re: [Haskell-cafe] Re: HSH and IO ()

2009-06-13 Thread Jason Dagit
On Sat, Jun 13, 2009 at 4:01 PM, John Goerzen wrote: > Dimitry Golubovsky wrote: > > > where hscpid corresponds to a process that runs a Haskell function > > (hsffigMain :: a -> b -> c -> IO ()) defined within the same program, > > and gccpid runs an external program (gcc), and they are piped > >

[Haskell-cafe] Re: HSH and IO ()

2009-06-13 Thread John Goerzen
Dimitry Golubovsky wrote: > John, > > Thanks for the reply. > > In this case, would the body of my function run in a separate thread > via forkProcess (that's what is needed, maybe I didn't make it clear)? No; at least not automatically. The idea is that a function that is Channel -> IO Channel

[Haskell-cafe] ANN: hledger 0.6 released

2009-06-13 Thread Simon Michael
I'm pleased to announce the release of hledger 0.6. For docs, online demo etc., see http://hledger.org . Some pre-built binaries are now available at http://hledger.org/ binaries . Or, install with: cabal install hledger [-fhapps] [-fvty]. (Using the latest Haskell Platform, "cabal install h

[Haskell-cafe] Haskell Weekly News: Issue 121 - June 13, 2009

2009-06-13 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20090613 Issue 121 - June 13, 2009 --- Welcome to issue 121 of HWN, a newsletter covering

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Jake McArthur
Keith Sheppard wrote: Is there any reason that sum isn't strict? I can't think of any case where that is a good thing. Prelude> sum [0 .. 100] *** Exception: stack overflow As others have said, there are cases where non-strictness is what you want. And if you are using a type that is stri

[Haskell-cafe] ANNOUNCE: hunp-0.0

2009-06-13 Thread Deniz Dogan
Inspired by the CLI utility "unp", which was nice but lacked some DWIM functionality, I developed hunp (or hünp, but pronounced hump because it's easier). It automagically calls the right "unpacker" program for you and works on both files and directories: $ hunp ~/download/something/ ...finds ~/do

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Conal Elliott
You can make numeric class instances from arbitrary Applicatives [1]. I imagine a lot of them (e.g. Stream) would want at least some non-strictness. We might provide strict alternatives for sum and product. I wonder what else. [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/applic

Re: [Haskell-cafe] Check out my photos on Facebook

2009-06-13 Thread Deniz Dogan
2009/6/13 Rakesh Malik : > To sign up for Facebook, follow the link below: > http://www.facebook.com/p.php?i=898160075&k=Z5E62YTRPW2CUGGAX144X3&r I followed that link, in case anyone cares. -- Deniz Dogan ___ Haskell-Cafe mailing list Haskell-Cafe@hask

[Haskell-cafe] Check out my photos on Facebook

2009-06-13 Thread Rakesh Malik
Hi haskell-cafe@haskell.org, I set up a Facebook profile where I can post my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile. Thanks, Rakesh To sign up for Facebook, follow th

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Jochem Berndsen
Daniel Fischer wrote: > Am Samstag 13 Juni 2009 17:00:36 schrieb Jochem Berndsen: >> Deniz Dogan wrote: >>> 2009/6/13 Jochem Berndsen : Keith Sheppard wrote: > Is there any reason that sum isn't strict? I can't think of any case > where that is a good thing. > > Prelude> sum [0

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Daniel Fischer
Am Samstag 13 Juni 2009 17:00:36 schrieb Jochem Berndsen: > Deniz Dogan wrote: > > 2009/6/13 Jochem Berndsen : > >> Keith Sheppard wrote: > >>> Is there any reason that sum isn't strict? I can't think of any case > >>> where that is a good thing. > >>> > >>> Prelude> sum [0 .. 100] > >>> *** Ex

Re: [Haskell-cafe] Atom - help.

2009-06-13 Thread Tom Hawkins
Calling foreign functions that return values is problematic for the compiler -- I haven't invested enough time to come up with a good solution. The work around is to assign the result to an external variable.  The drawback is the result will not be available until the rule executing the action has

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Jochem Berndsen
Deniz Dogan wrote: > 2009/6/13 Jochem Berndsen : >> Keith Sheppard wrote: >>> Is there any reason that sum isn't strict? I can't think of any case >>> where that is a good thing. >>> >>> Prelude> sum [0 .. 100] >>> *** Exception: stack overflow >> It is useful if the (+) is nonstrict; although

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Keith Sheppard
That's an interesting example. I guess a lazy number system like that would work nicely for Deniz's use case. On Sat, Jun 13, 2009 at 10:26 AM, Stephan Friedrichs wrote: > Jochem Berndsen wrote: >> Keith Sheppard wrote: >>> Is there any reason that sum isn't strict? I can't think of any case >>> w

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Stephan Friedrichs
Jochem Berndsen wrote: > Keith Sheppard wrote: >> Is there any reason that sum isn't strict? I can't think of any case >> where that is a good thing. >> >> Prelude> sum [0 .. 100] >> *** Exception: stack overflow > > It is useful if the (+) is nonstrict; although I cannot think of any > useful

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Deniz Dogan
2009/6/13 Jochem Berndsen : > Keith Sheppard wrote: >> Is there any reason that sum isn't strict? I can't think of any case >> where that is a good thing. >> >> Prelude> sum [0 .. 100] >> *** Exception: stack overflow > > It is useful if the (+) is nonstrict; although I cannot think of any > us

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Jochem Berndsen
Keith Sheppard wrote: > Is there any reason that sum isn't strict? I can't think of any case > where that is a good thing. > > Prelude> sum [0 .. 100] > *** Exception: stack overflow It is useful if the (+) is nonstrict; although I cannot think of any useful mathematical structure where (+) w

[Haskell-cafe] curious about sum

2009-06-13 Thread Keith Sheppard
Is there any reason that sum isn't strict? I can't think of any case where that is a good thing. Prelude> sum [0 .. 100] *** Exception: stack overflow -Keith -- keithsheppard.name ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.ha

[Haskell-cafe] Re: HSH and IO ()

2009-06-13 Thread Dimitry Golubovsky
John, Thanks for the reply. In this case, would the body of my function run in a separate thread via forkProcess (that's what is needed, maybe I didn't make it clear)? In my previous project, I had to do like this (probably not very portable, at least requires System.Posix): ===

Re: [Haskell-cafe] Haskell Meetup groups in Glasgow

2009-06-13 Thread Dougal Stanton
On Sat, Jun 13, 2009 at 5:09 AM, A Smith wrote: > Do any Haskell Meetup groups exist in or around Glasgow, an informal > get-to-gether in a pub,cafe or wherever ? > I'm in Edinburgh, and on my own have been desperately trying to rewire my > brain from Perl to Haskell without much success for most o

[Haskell-cafe] Atom - help.

2009-06-13 Thread Radamés Ajna
hi there, I've been working with haskell and atom dsl, however I'm new to haskell.. John Van Enk inspired me with programming arduino->atmegas , with haskell, So here is my problem. With an action , action :: ([String] -> String) -> [UE] -> Atom () , it's possible make calls to some precoded C fun