Re: [Haskell-cafe] Help on using System.Win32.Com.Automation

2009-03-23 Thread Sigbjorn Finne
Hi Wilkes, you may want to have a look at a simple example of how to interop with Windows WMI using the COM package at -- http://haskell.forkio.com/com-examples Hope it is of some help to you. --sigbjorn On 3/19/2009 16:49, Wilkes Joiner wrote: I'm playing around with the com package, but

[Haskell-cafe] MissingH bracketCD (aka bracketCWD) bug -- this is the infamous lazy io, right?

2009-03-23 Thread Thomas Hartman
I got bitten by a bug (well, I call it bug) in bracketCD from HSH/MissingH demonstrated by the following code bracketCD is very useful for sysadminny one-offs, I use it all the time, but. I suspect that unless people are very careful, this behavior will affect other users of bracketCD, in

Re: [Haskell-cafe] Help on using System.Win32.Com.Automation

2009-03-23 Thread Alexandr N. Zamaraev
Sigbjorn Finne wrote: Hi Wilkes, you may want to have a look at a simple example of how to interop with Windows WMI using the COM package at -- http://haskell.forkio.com/com-examples I try compile WMIDemo.hs but recive error: [code] c:\htestghc --make WMIDemo.hs [2 of 2] Compiling WMIDemo

Re: [Haskell-cafe] MissingH bracketCD (aka bracketCWD) bug -- this is the infamous lazy io, right?

2009-03-23 Thread Nicolas Pouillard
Excerpts from Thomas Hartman's message of Mon Mar 23 09:08:41 +0100 2009: I got bitten by a bug (well, I call it bug) in bracketCD from HSH/MissingH demonstrated by the following code bracketCD is very useful for sysadminny one-offs, I use it all the time, but. I suspect that unless

Re: [Haskell-cafe] [ANN] Safe Lazy IO in Haskell

2009-03-23 Thread nicolas . pouillard
Excerpts from Henning Thielemann's message of Sun Mar 22 23:58:44 +0100 2009: On Sun, 22 Mar 2009, nicolas.pouillard wrote: It sounds like a nice idea, it would be great to have a straight-io package to play a bit more with explicit exceptions in things like 'IO'. Maybe I should then

[Haskell-cafe] HSTringTemplate and syb-with-class

2009-03-23 Thread Kemps-Benedix Torsten
Hello all, I'm trying to use the generic capabilities of HSTringTemplate. The documentation claims that the package is able to automatically generate instances of ToSElem if syb-with-class is installed but gives no further details. I installed syb-with-class and then installed HSTringTemplate

Re: [Haskell-cafe] [ANN] Safe Lazy IO in Haskell

2009-03-23 Thread Henning Thielemann
On Mon, 23 Mar 2009, nicolas.pouillard wrote: Excerpts from Henning Thielemann's message of Sun Mar 22 23:58:44 +0100 2009: On Sun, 22 Mar 2009, nicolas.pouillard wrote: It sounds like a nice idea, it would be great to have a straight-io package to play a bit more with explicit exceptions

Re: [Haskell-cafe] [ANN] Safe Lazy IO in Haskell

2009-03-23 Thread nicolas . pouillard
Excerpts from Henning Thielemann's message of Mon Mar 23 11:06:20 +0100 2009: On Mon, 23 Mar 2009, nicolas.pouillard wrote: Excerpts from Henning Thielemann's message of Sun Mar 22 23:58:44 +0100 2009: On Sun, 22 Mar 2009, nicolas.pouillard wrote: It sounds like a nice idea, it

Re: [Haskell-cafe] [ANN] Safe Lazy IO in Haskell

2009-03-23 Thread Henning Thielemann
On Mon, 23 Mar 2009, nicolas.pouillard wrote: Excerpts from Henning Thielemann's message of Mon Mar 23 11:06:20 +0100 2009: Yes Then what do you mean by lifting to LazyIO to SIO actions? Do you mean liftSIO :: SIO a - LazyIO.T a which says that we only lift computations that explicitly

[Haskell-cafe] ANNOUNCE: WinGhci, a GUI for GHCI on Windows

2009-03-23 Thread Pepe Gallardo
Hi, I am pleased to announce the first release of WinGhci. WinGhci is a simple GUI for GHCI on Windows. It is closely based on WinHugs, and provides similar functionality. WinGhci project web page:

[Haskell-cafe] Hackage upload problems?

2009-03-23 Thread Sebastiaan Visser
Hello, Currently I'm trying to upload a minor update of Salvia to Hackage to fix some dependency issues but Hackage times out all the time? Both the CLI tool and the web-interface do not react to my upload request. Any known problems here? Gr, Sebastiaan.

[Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-23 Thread Xiao-Yong Jin
Hi, I just feel it is not comfortable to deal with exceptions only within IO monad, so I defined tryArith :: a - Either ArithException a tryArith = unsafePerformIO . try . evaluate and it works quite good as map (tryArith . (div 5)) [2,1,0,5] evaluates to [Right 2,Right 5,Left divide by

[Haskell-cafe] Re: SoC idea: interactive profiling

2009-03-23 Thread Tomáš Janoušek
Hello, On Sun, Mar 22, 2009 at 04:08:59PM +0100, Alex Ott wrote: May be providing profiling information for kcachegrind will be a good solution? For example, there are tools for PHP, that allow to view collected information in kcachegrind, and get interactive zooming, etc. This is really

[Haskell-cafe] Re: Use unsafePerformIO to catch Exception?

2009-03-23 Thread ChrisK
You should ensure that the result of evaluate is in normal form, not just weak head normal form. You can do this with the Control.Parallel.Strategies module: import Control.Exception(ArithException(..),try,evaluate) import Control.Parallel.Strategies(NFData,using,rnf) import

[Haskell-cafe] Re: ANNOUNCE: WinGhci, a GUI for GHCI on Windows

2009-03-23 Thread Benjamin L . Russell
This is wonderful--just what I was waiting for! The application looks beautiful, and I'm very happy that GHCi now has a matching GUI application along the lines of WinHugs. It would be even better if you could provide some installation/uninstallation information. I unzipped the contents of

Re: [Haskell-cafe] least fixed points above something

2009-03-23 Thread Jens Blanck
On Friday 20 March 2009 5:23:37 am Ryan Ingram wrote: On Fri, Mar 20, 2009 at 1:01 AM, Dan Doel dan.d...@gmail.com wrote: However, to answer Luke's wonder, I don't think fixAbove always finds fixed points, even when its preconditions are met. Consider: f [] = [] f (x:xs)

[Haskell-cafe] Re: ANNOUNCE: WinGhci, a GUI for GHCI on Windows

2009-03-23 Thread Benjamin L . Russell
Just another couple of thoughts for possible additional improvement: 1. It would be even nicer if WinGhci added a menu entry to the Start menu automatically, as WinHugs does. 2. For the proposed menu entry, it would also probably be a good idea if WinGhci added a folder for that menu entry,

Re: [Haskell-cafe] Re: Use unsafePerformIO to catch Exception?

2009-03-23 Thread Xiao-Yong Jin
ChrisK hask...@list.mightyreason.com writes: You should ensure that the result of evaluate is in normal form, not just weak head normal form. You can do this with the Control.Parallel.Strategies module: import Control.Exception(ArithException(..),try,evaluate) import

Re: [Haskell-cafe] Re: ANNOUNCE: WinGhci, a GUI for GHCI on Windows

2009-03-23 Thread Andrew Butterfield
Benjamin L.Russell wrote: This is wonderful--just what I was waiting for! The application looks beautiful, and I'm very happy that GHCi now has a matching GUI application along the lines of WinHugs. Indeed - me too ! It would be even better if you could provide some

Re: [Haskell-cafe] least fixed points above something

2009-03-23 Thread Holger Siegel
Am Montag, den 23.03.2009, 12:55 + schrieb Jens Blanck: The above approach does not apply to my case. What I have is a monotone function f on a partial order satisfying f x = x, for all x. Given that the partial order is in fact a cpo this is enough to guarantee that a least fixed point

Re: [Haskell-cafe] Sometimes I wish there was a global variable

2009-03-23 Thread Jake McArthur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rafael Cunha de Almeida wrote: | Hello, | | I am writing a OpenGL program in haskell, it can be found in: | http://github.com/aflag/galo/tree/master | But I hope this e-mail will be self-contained :). | | My main function goes like this: |

Re: [Haskell-cafe] Hackage upload problems?

2009-03-23 Thread Don Stewart
sfvisser: Hello, Currently I'm trying to upload a minor update of Salvia to Hackage to fix some dependency issues but Hackage times out all the time? Both the CLI tool and the web-interface do not react to my upload request. Any known problems here? Discussion taking place on libraries@

[Haskell-cafe] Hackage download and popularity statistics

2009-03-23 Thread Don Stewart
For the first time, we've got download and popularity statistics from Hackage: http://www.galois.com/blog/2009/03/23/one-million-haskell-downloads/ Find out if your package made the top 100, and when we reach our 1 millionth hackage download! -- Don

[Haskell-cafe] RE: [ANN] Safe Lazy IO in Haskell

2009-03-23 Thread Wei Hu
Nicolas Pouillard nicolas.pouillard at gmail.com writes: Hi folks, We have good news (nevertheless we hope) for all the lazy guys standing there. Since their birth, lazy IOs have been a great way to modularly leverage all the good things we have with *pure*, *lazy*, *Haskell* functions to

Re: [Haskell-cafe] Help on using System.Win32.Com.Automation

2009-03-23 Thread Sigbjorn Finne
Alexandr N. Zamaraev wrote: Sigbjorn Finne wrote: Hi Wilkes, you may want to have a look at a simple example of how to interop with Windows WMI using the COM package at -- http://haskell.forkio.com/com-examples I try compile WMIDemo.hs but recive error: [code] c:\htestghc --make WMIDemo.hs

[Haskell-cafe] A small display problem using Helium

2009-03-23 Thread Anonymous Anonymous
Hello, I've written something simple: main:: IO () main= do lijn - getLine putStrLn lijn Now if I import it in Helium it will do the following: Test main test -- (here I'm typing test) test it will be displayed two times,

[Haskell-cafe] System.Random.Shuffle fix

2009-03-23 Thread friggin friggin
I was looking for a shuffling algorithm to shuffle mp3-playlists so was very happy to see System.Random.Shuffle: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/random-shuffle-0.0.2 However I get errors,non-exhaustive patterns in function shufleTree or extractTree depending how I call

Re: [Haskell-cafe] System.Random.Shuffle fix

2009-03-23 Thread Manlio Perillo
friggin friggin ha scritto: I was looking for a shuffling algorithm to shuffle mp3-playlists so was very happy to see System.Random.Shuffle: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/random-shuffle-0.0.2 However I get errors,non-exhaustive patterns in function shufleTree or

[Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Kirk Martinez
I saw Miguel Mitrofanov ( http://www.nabble.com/Hugs-on-the-iphone-td19478992.html) successfully ported Hugs to the iPhone. I'm now wondering if anyone has tried to get Apple's blessing to put this in the App Store? It would be really great to be able to try out little Haskell ideas as the mood

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Miguel Mitrofanov
1) You'll need a terminal application first, and I'm not sure if there is one in AppStore. In fact, I AM sure there isn't. 2) My iPod Touch is still running 1.1.4 firmware; I've heard it's not that easy on 2.0 and later. 3) Personally, I'd love to see ghc on iPhone. It could even persuade

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Rick R
Unfortunately the developers agreement expressly forbids the use of interpreters that load and run external programs. This is probably for the simple reason that it would be almost impossible to secure, or even guarantee that it wont exceed its space and mem usage bounds required by AppStore apps.

[Haskell-cafe] SOC idea ticket: Rendering Engine

2009-03-23 Thread Csaba Hruska
Hi! I've created a ticket for this idea: http://hackage.haskell.org/trac/summer-of-code/ticket/1572 Please write your opinion. I also put the source code here: http://code.google.com/p/lambdacube/ svn checkout *http*://lambdacube.googlecode.com/svn/trunk/lambdacube-read-only Cheers, Csaba

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread David Leimbach
On Mon, Mar 23, 2009 at 11:22 AM, Miguel Mitrofanov miguelim...@yandex.ruwrote: 1) You'll need a terminal application first, and I'm not sure if there is one in AppStore. In fact, I AM sure there isn't. There's SSH terminal programs like Putty based stuff that are in the AppStore. So that

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Miguel Mitrofanov
On 23 Mar 2009, at 21:38, David Leimbach wrote: On Mon, Mar 23, 2009 at 11:22 AM, Miguel Mitrofanov miguelim...@yandex.ru wrote: 1) You'll need a terminal application first, and I'm not sure if there is one in AppStore. In fact, I AM sure there isn't. There's SSH terminal programs like

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread John Van Enk
I think he means a program running on the iPhone which allows you to open a terminal over an SSH session to other devices. The instance (I think) you're thinking of is where the SSH *server* runs on the iPhone. On Mon, Mar 23, 2009 at 2:46 PM, Miguel Mitrofanov miguelim...@yandex.ruwrote: On

Re: [Haskell-cafe] SOC idea ticket: Rendering Engine

2009-03-23 Thread Roman Cheplyaka
* Csaba Hruska csaba.hru...@gmail.com [2009-03-23 19:24:19+0100] Hi! I've created a ticket for this idea: http://hackage.haskell.org/trac/summer-of-code/ticket/1572 Please write your opinion. I also put the source code here: http://code.google.com/p/lambdacube/ svn checkout

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread David Leimbach
On Mon, Mar 23, 2009 at 11:46 AM, Miguel Mitrofanov miguelim...@yandex.ruwrote: On 23 Mar 2009, at 21:38, David Leimbach wrote: On Mon, Mar 23, 2009 at 11:22 AM, Miguel Mitrofanov miguelim...@yandex.ru wrote: 1) You'll need a terminal application first, and I'm not sure if there is one

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread David Leimbach
On Mon, Mar 23, 2009 at 11:53 AM, John Van Enk vane...@gmail.com wrote: I think he means a program running on the iPhone which allows you to open a terminal over an SSH session to other devices. The instance (I think) you're thinking of is where the SSH *server* runs on the iPhone. Yeah I

[Haskell-cafe] Re: SOC idea ticket: Rendering Engine

2009-03-23 Thread Achim Schneider
Csaba Hruska csaba.hru...@gmail.com wrote: svn checkout *http*://lambdacube.googlecode.com/svn/trunk/lambdacube-read-only I think you mean svn co http://lambdacube.googlecode.com/svn/trunk I didn't do anything yet, except running the sample program. I get to see an ogre head and this: 8

Re: [Haskell-cafe] Re: SOC idea ticket: Rendering Engine

2009-03-23 Thread Csaba Hruska
2009/3/23 Achim Schneider bars...@web.de Csaba Hruska csaba.hru...@gmail.com wrote: svn checkout *http*://lambdacube.googlecode.com/svn/trunk/lambdacube-read-only I think you mean svn co http://lambdacube.googlecode.com/svn/trunk I didn't do anything yet, except running the sample

[Haskell-cafe] Re: SOC idea ticket: Rendering Engine

2009-03-23 Thread Achim Schneider
Csaba Hruska csaba.hru...@gmail.com wrote: I _think_ example1 is killed by SIGABRT, but I could be wrong, I've never seen this before. Anyway, it's a strange thing. Does the program exit immediatly after the first rendered frame? Usually yes, sometimes I'm seeing the ogre being rotated

RE: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Michael Giagnocavo
Doesn't Apple Store restrict applications (by policy) so they cannot generate or execute arbitrary code? (That's the reason there's no Flash for iPhone.) That restriction seems like it'd block any interpreter or compiler from being sold, no? -Michael From: haskell-cafe-boun...@haskell.org

[Haskell-cafe] Re: Hugs on iPhone

2009-03-23 Thread Braden Shepherdson
Miguel Mitrofanov wrote: 3) Personally, I'd love to see ghc on iPhone. It could even persuade me to upgrade. See the GHC-on-ARM page[1] for my work on it last summer, among others'. GHC is tough to port because bootstrapping to new architectures has been broken for a long time, since soon

Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Miguel Mitrofanov
http://www.readwriteweb.com/archives/confirmed_apple_and_adobe_coll.php On 23 Mar 2009, at 23:29, Michael Giagnocavo wrote: Doesn’t Apple Store restrict applications (by policy) so they cannot generate or execute arbitrary code? (That’s the reason there’s no Flash for iPhone.) That

RE: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Michael Giagnocavo
Guess they ended up making an exception for Flash, finally. Will be interesting to see how they prevent 3rd party stores from running arbitrary Flash games and whatnot. Maybe they'll blacklist any popular sites that are stealing marketshare from the AppStore? -Michael -Original

Re: [Haskell-cafe] Function to cast types

2009-03-23 Thread Richard O'Keefe
On 23 Mar 2009, at 2:20 am, Anonymous Anonymous wrote: Hello, I'm new to haskell, I'm wondering how can you write a function that will do the following: fromIntToString :: Int - String this is a cast function to cast an Int to a String. It cannot be. What could it possibly mean to

Re: [Haskell-cafe] Re: Hugs on iPhone

2009-03-23 Thread John Meacham
On Mon, Mar 23, 2009 at 04:41:04PM -0400, Braden Shepherdson wrote: The good news is that jhc's portable C code works perfectly well -- but of course that is simply running precompiled Haskell apps and not a compiler or interpreter running on the device. Since jhc is not self-hosting

Re: [Haskell-cafe] HSTringTemplate and syb-with-class

2009-03-23 Thread Sterling Clover
You don't need to derive ToSElem -- you get the instance for free if you derive Data. Import GenericWithClass to get the instance for Data from syb-with-class, and import GenericStandard for use with Data from the vanilla syb that comes with GHC. Cheers, Sterl. 2009/3/23 Kemps-Benedix Torsten

Re: [Haskell-cafe] Re: Hugs on iPhone

2009-03-23 Thread Rick R
This is solely the reason for my interest in JHC. The agreement doesn't specifically prohibit the use of interpreters (just those than run external code). It also doesn't say anything about machine generated code. The only thing one would have to ensure is that the dependencies of JHC are all

[Haskell-cafe] generalized shuffle

2009-03-23 Thread Manlio Perillo
Hi. I have implemented a generalized shuffle function, for the random-shuffle package http://hackage.haskell.org/cgi-bin/hackage-scripts/package/random-shuffle I have not yet commited the change, before that I would like to receive some feedbacks (especially by the original author of the

Re: [Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-23 Thread Henning Thielemann
On Mon, 23 Mar 2009, Xiao-Yong Jin wrote: Hi, I just feel it is not comfortable to deal with exceptions only within IO monad, so I defined tryArith :: a - Either ArithException a tryArith = unsafePerformIO . try . evaluate and it works quite good as map (tryArith . (div 5)) [2,1,0,5]

Re: [Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-23 Thread wren ng thornton
Xiao-Yong Jin wrote: Hi, I just feel it is not comfortable to deal with exceptions only within IO monad, so I defined tryArith :: a - Either ArithException a tryArith = unsafePerformIO . try . evaluate [...] However, I guess unsafePerformIO definitely has a reason for its name. As I read

[Haskell-cafe] Learning Haskell

2009-03-23 Thread Tom.Amundsen
How long did it take you to become proficient in Haskell? By that, I mean - how long until you were just as comfortable with Haskell as you were with your strongest language at that time? -- View this message in context: http://www.nabble.com/Learning-Haskell-tp22673552p22673552.html Sent from

Re: [Haskell-cafe] Learning Haskell

2009-03-23 Thread Rick R
I've been messing with Haskell since the Middle of January on evenings and weekends. Just now I'm getting to the point where I can construct nontrivial programs with little help from #haskell. It is by no means my most proficient language, I've been coding C++ and other languages for over 10

Re: [Haskell-cafe] Learning Haskell

2009-03-23 Thread Duane Johnson
I second that! Haskell is a very fun and engaging language (with its accompanying corpus of theorems, and its great community)... My timing is a little bit longer than Rick's... I've been eyeing Haskell for about 8 months, reading books, poking around etc. I've started to feel

Re: [Haskell-cafe] Learning Haskell

2009-03-23 Thread leledumbo
Still struggling after almost year (I learn it along with Prolog, Lua, and many other non-C family languages), because I'm not very good at describing solutions. My imperative background is quite strong, but I've been able to switch more easily these days (after taking Functional Programming