Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Radosław Grzanka
2007/8/30, Tony Sloane [EMAIL PROTECTED]: On 26/08/2007, at 10:07 AM, Jeremy Shaw wrote: There is also an old project to port nhc98 to PalmOS -- not sure if it is still active, or how far they got. AFAIK, nothing was ever released. Yes, we were working on this at Macquarie Uni. The

Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Hugh Perkins
On 8/30/07, Miguel [EMAIL PROTECTED] wrote: What about running Haskell on a PostScript printer? PostScript IS Turing-complete. Yes, because postscript printers are famous for being really fast ;-) ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Hugh Perkins
Dan Piponi [EMAIL PROTECTED] wrote: http://developer.nvidia.com/object/cuda.html It's a C compiler with multiprocessor streaming extensions that targets nvidia cards. Whoa :-O Cool :-) But it's not that simple... Few things are ;-) Whats the catch? Can we use a graphics-card as an n-core

Re[2]: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Bulat Ziganshin
Hello Miguel, Thursday, August 30, 2007, 9:40:08 AM, you wrote: What about running Haskell on a PostScript printer? PostScript IS Turing-complete. it would be cool to port SOE graphics to PostScript engine :) -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re[2]: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Bulat Ziganshin
Hello Hugh, Thursday, August 30, 2007, 11:01:02 AM, you wrote: But it's not that simple... Few things are ;-) Whats the catch? Can we use a graphics-card as an n-core machine, where n = 1024? no. it's more like 8-16 cores with 64-element SSE instructions

[Haskell-cafe] interaction between OS processes

2007-08-30 Thread Andrea Rossato
Hi, there's something I don't get about interaction among OS processes and Haskell handles/channels. Suppose I have a very small program that takes a line and prints it till you write quit: main = do s - getLine case s of quit - putStrLn quitting return () _ - loop s where

Re: Re[2]: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Hugh Perkins
So, according to the blurb, and since this is product-specific, I dont know if this is allowed on the newsgroup?, but it does seem to be a fairly unique product? : - this technology works on GeGForce 8800 cards or better - there's a dedicated processing unit available called the Tesla, which is

Re[4]: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Bulat Ziganshin
Hello Hugh, Thursday, August 30, 2007, 2:46:51 PM, you wrote: - this technology works on GeGForce 8800 cards or better afaik, on any 8xxx cards - the only difference is number of threads - 128 thread processor it's the same as 8800GTX. please read CUDA manual first. these 128 threads are

[Haskell-cafe] Re: GHC optimisations

2007-08-30 Thread Simon Marlow
Simon Peyton-Jones wrote: GHC does some constant folding, but little by way of strength reduction, or using shifts instead of multiplication. It's pretty easy to add more: it's all done in a single module. Look at primOpRules in the module PrelRules. Although it isn't done at the Core

Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread David Roundy
On Thu, Aug 30, 2007 at 11:03:35AM +0400, Bulat Ziganshin wrote: Hello Miguel, Thursday, August 30, 2007, 9:40:08 AM, you wrote: What about running Haskell on a PostScript printer? PostScript IS Turing-complete. it would be cool to port SOE graphics to PostScript engine :) I spent

Re: [Haskell-cafe] Looking for suggestions to improve my algorithm

2007-08-30 Thread Chaddaï Fouché
I managed it in 7 seconds (on 1500 MHz) with an idea close to yours (but I used IntSet, not IntMap), Daniel Fisher gave you some good ideas to achieve it, the real snail in this problem is the sumDivisors function. -- Jedaï ___ Haskell-Cafe mailing

Re: [Gtk2hs-users] [Haskell-cafe] Bug in Gtk2HS 0.9.12/SOE on WinXP? Or is it just me?

2007-08-30 Thread Duncan Coutts
On Fri, 2007-08-24 at 11:58 +0200, Malte Milatz wrote: Peter Verswyvelen [EMAIL PROTECTED]: However, in the code below the blue and green triangle should render on top of each other, but the green triangle is rendered incorrectly. Being a newbie, I hesitate to file a bug report... Can

Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Brandon S. Allbery KF8NH
On Aug 30, 2007, at 2:34 , Radosław Grzanka wrote: obsolete and Pocket PC is probably better target. Anyway, does anyone else experience a feeling that at the time of buying yourself new gadget you are already in deprecated zone? ;) I've been feeling that way since 1982 -- brandon s.

Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Brandon S. Allbery KF8NH
On Aug 30, 2007, at 3:00 , Hugh Perkins wrote: On 8/30/07, Miguel [EMAIL PROTECTED] wrote: What about running Haskell on a PostScript printer? PostScript IS Turing-complete. Yes, because postscript printers are famous for being really fast ;-) You youngsters don't remember when

Re: [Haskell-cafe] 2D game graphics library for Haskell?

2007-08-30 Thread Duncan Coutts
On Fri, 2007-08-24 at 12:31 +0200, peterv wrote: Anyway, SOE is great for learning Haskell, but it lacks a couple of fundamental functions to make it really attractive, like: - Support for images - Support for rendering to an “offscreen graphics surface” and reading the pixels

Re: [Haskell-cafe] defining mapPairs function

2007-08-30 Thread Devin Mullins
That's great (really, thank you for such a fun example of Arrow programming), but isn't the (*) on line two of mapPair supposed to be a point? How would you make a point-less version of mapPair that actually had the type signature (a-a-a)-[a]-[a]*? (For that matter, /would/ you?) Devin *

Re: Re[4]: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Hugh Perkins
On 8/30/07, Bulat Ziganshin [EMAIL PROTECTED] wrote: it's the same as 8800GTX. please read CUDA manual first. these 128 threads are not independent, each 8 or 16 threads execute the same code H, yes you are right. The GPU contains 8 multiprocessors, where each multiprocessor contains

Re: [Haskell-cafe] Looking for suggestions to improve my algorithm

2007-08-30 Thread Chaddaï Fouché
2007/8/30, Chaddaï Fouché [EMAIL PROTECTED]: I managed it in 7 seconds (on 1500 MHz) with an idea close to yours (but I used IntSet, not IntMap), Daniel Fisher gave you some good ideas to achieve it, the real snail in this problem is the sumDivisors function. I put my final solution on the

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Dan Piponi
On 8/30/07, Peter Hercek [EMAIL PROTECTED] wrote: f x = let x = x * scale in let x = x + transform in g x Why are you trying to call three different things by the same name 'x' in one tiny block of code? That's very confusing and makes it hard to reason equationally about the code.

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Brent Yorgey
On 8/30/07, Peter Hercek [EMAIL PROTECTED] wrote: Hi, I find the feature that the construct let x = f x in expr assigns fixed point of f to x annoying. The reason is that I can not simply chain mofifications a variable like e.g. this: f x = let x = x * scale in let x = x +

[Haskell-cafe] Re: let and fixed point operator

2007-08-30 Thread Peter Hercek
1 f x = 2let x = x * scale in 3g x Hmmm ... just assume that the scope of the x on line 3 (which hides the x from the higher level scope is extended from line 3 to the beginning part of line 2 (from line start to the equal sign). OCAML does it. Let before in Clean does it too. Does

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Ketil Malde
On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote: I find the feature that the construct let x = f x in expr assigns fixed point of f to x annoying. Any alternative? Non-recursive assignments? f x = let x = x * scale in let x = x + transform in g x I think it is often it

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Brent Yorgey
On 8/30/07, Brent Yorgey [EMAIL PROTECTED] wrote: The way to combine functions into a pipeline is by using function concatenation: Oops, of course I meant function composition instead of function concatenation. -Brent ___ Haskell-Cafe mailing

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Derek Elkins
On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote: Hi, I find the feature that the construct let x = f x in expr assigns fixed point of f to x annoying. The reason is that I can not simply chain mofifications a variable like e.g. this: f x = let x = x * scale in let x = x

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Andrew Coppin
OK, so it's only tangentally related, but... do you have *any idea* how many times I've written something like let x = (some complex function of x) in (some other complex function of x) when in fact what I *meant* to do was type x' instead of x?! It's really maddening to write 50,000 lines

[Haskell-cafe] Re: let and fixed point operator

2007-08-30 Thread Peter Hercek
Derek Elkins wrote: On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote: Hi, I find the feature that the construct let x = f x in expr assigns fixed point of f to x annoying. The reason is that I can not simply chain mofifications a variable like e.g. this: f x = let x = x * scale in

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Brent Yorgey
It's really maddening to write 50,000 lines of code, eventually get it to compile, run it, and have the program lock up and start consuming so much virtual memory that the entire PC becomes unstable within seconds. (This isn't helped by the fact that Ctrl+C doesn't seem to make either GHCi

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread David Roundy
On Thu, Aug 30, 2007 at 06:16:12PM +0100, Andrew Coppin wrote: Obviously you might very well have *meant* to write x = f x. But would it be possible to add some kind of optional compiler warning to find such assignments? It can be a nightmare trying to track down where you made the

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Dan Piponi
On 8/30/07, Andrew Coppin [EMAIL PROTECTED] wrote: Obviously you might very well have *meant* to write x = f x. But would it be possible to add some kind of optional compiler warning to find such assignments? The thing that convinced me to learn Haskell in the first place was the fact that you

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Paul Hudak
Andrew Coppin wrote: OK, so it's only tangentally related, but... do you have *any idea* how many times I've written something like let x = (some complex function of x) in (some other complex function of x) when in fact what I *meant* to do was type x' instead of x?! I try not to use

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Chaddaï Fouché
Another interesting example of the x = f x use : coins = [1,2,5,10,20,50,100,200] beautiful = foldl (\without p - let (poor,rich) = splitAt p without with = poor ++ zipWith (++) (map (map (p:)) with)

[Haskell-cafe] Newbie question: Why gfoldl has this strange type?

2007-08-30 Thread Rodrigo Geraldo
Hi! I am a novice in Haskell, and particularly I have interested in generic programming. This interest motivated me to read paper Scrap your boilerplate: A practical design pattern for generic programming, but I didn't understand the type of the function gfoldl, that was present in class Term

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Albert Y. C. Lai
Peter Hercek wrote: So the question is what am I missing? Any nice use cases where fixed point search is so good that it is worth the trouble with figuring out new and new variable names for essentially the same stuff? When I write functional code, I do find myself writing recursions much

RE: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Peter Verswyvelen
F# and Concurrent Clean introduced special syntax for doing this. Basically they just invent new names for you. In Haskell (warning: I'm a newbie, so take this with a grain of salt), I guess you just use monads if you want to pass a value from one function to another under some context, or you

Re: [Haskell-cafe] cabal install of HDBC-odbc fails on ghc 6.7, -I flag causes problems

2007-08-30 Thread Duncan Coutts
On Wed, 2007-08-29 at 10:05 -0400, Thomas Hartman wrote: Ah ok, so I did echo :main build -v3 | /usr/local/bin/ghci-6.7.20070816 Setup.hs 1build.out 2build.err and this does indeed seem more informative. advice? Turns out this was a bug in FilePath that Cabal was hitting. The bug was

RE: Re[4]: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Peter Verswyvelen
Although I'm sure a lot can be done on modern GPU's (especially the DirectX 10 cards = Nvidia 8x00, that can write back to main memory, called geometry shaders), a Playstation 3 runs Linux, doesn't cost a lot, and it has 7 CPUs running at 3+ GHz, and 6 of these have parallel vector processing

[Haskell-cafe] darcs behind firewall

2007-08-30 Thread Sukit Tretriluxana
Hi all, Does anyone know how to specify proxy server and port for darcs to use when it connects to servers? I am behind firewall most of the time and all requests have to go through a proxy. Thanks, Ed ___ Haskell-Cafe mailing list

[Haskell-cafe] FFI and DLLs

2007-08-30 Thread Lewis-Sandy, Darrell
An early proposal for the FFI supported importing functions directly from dynamic link libraries: www. http://www.haskell.org/hdirect/ffi-a4.ps.gz haskell.org/hdirect/ffi-a4.ps.gz This looks like it was dropped from the final version of the addendum in favor of C header files as the sole

Re: [Haskell-cafe] redirecting stdout

2007-08-30 Thread Bryan O'Sullivan
Chad Scherrer wrote: Is it possible to write a function redirect :: Handle - IO () - IO () so that redirect h action is just like action, except that all the output written to stdout now gets sent to h instead? No. The file descriptor used for IO is wired into a Handle, just as in a FILE *

RE: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Henning Thielemann
On Thu, 30 Aug 2007, Peter Verswyvelen wrote: infixl 0 \ -- I just took the first weird symbol combination that came to mind, this does not mean anything (I hope ;-) x \ fx = fx x f x = x * scale \ \x - x + transform \ \x - g x like this you don't have to invent new names,

Re: [Haskell-cafe] darcs behind firewall

2007-08-30 Thread Thomas Hartman
If you are on linux (I'm on ubuntu) you should be able to set export http_proxy=http://proxyserver.com:1234 export https_proxy=http://proxyserver.com:123 vars, per what your sysadmin says. In my case, these are set to the same var that permits me to use firefox via the proxy, in firefox -

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Andrew Coppin
Brent Yorgey wrote: It's really maddening to write 50,000 lines of code, eventually get it to compile, run it, and have the program lock up and start consuming so much virtual memory that the entire PC becomes unstable within seconds. (This isn't helped by the fact

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Andrew Coppin
David Roundy wrote: On Thu, Aug 30, 2007 at 06:16:12PM +0100, Andrew Coppin wrote: Obviously you might very well have *meant* to write x = f x. But would it be possible to add some kind of optional compiler warning to find such assignments? It can be a nightmare trying to track down where

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Andrew Coppin
Dan Piponi wrote: On 8/30/07, Andrew Coppin [EMAIL PROTECTED] wrote: Obviously you might very well have *meant* to write x = f x. But would it be possible to add some kind of optional compiler warning to find such assignments? The thing that convinced me to learn Haskell in the first

[Haskell-cafe] Re: let and fixed point operator

2007-08-30 Thread Peter Hercek
Chaddaï Fouché wrote: But, even more trivial... You use this all the time when you define recursive function, you know ? You would need to add a rec keyword to the language if you disallowed this. Great and new reason too. Trying to make a difference based on presence of formal argument would

[Haskell-cafe] happs on ghc 6.7 won't work because of dependency on Data.Binary (everything that depends on Data.Binary broken at present) ( unknown symbol `stg_uncheckedShiftRL64' )

2007-08-30 Thread Thomas Hartman
happs on ghc 6.7 won't work because of dependency on Data.Binary, since everything that depends on Data.Binary is broken at present. This is for Data.Binary installed via cabal from darcs get --partial http://darcs.haskell.org/binary . Cabal installed without any errors, but perhaps there

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Dan Piponi
On 8/30/07, Andrew Coppin [EMAIL PROTECTED] wrote: Yeah, but... programs aren't like mathematics. I know people claim that they are, but they aren't. But the raison d'etre of Haskell is to make programming more like mathematics. That motivates everything from the fact that it's a declarative

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread jerzy . karczmarczuk
Dan Piponi writes: In mathematics, if you write x = f y you mean that these two expressions are equal. In Haskell, if you say x = f y you mean *make* then equal! Haskell is a declarative language, not an imperative language. When you write x = f x in Haskell, you're declaring to the

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Dan Piponi
On 8/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dan Piponi writes: In Haskell, there is no box. Well, there are boxes... But there also thunks and latent, yet-unevaluated graphs... But the point of Haskell is to provide an abstraction that hides these details from you. (Though

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Derek Elkins
On Thu, 2007-08-30 at 23:58 +0200, [EMAIL PROTECTED] wrote: Dan Piponi writes: In mathematics, if you write x = f y you mean that these two expressions are equal. In Haskell, if you say x = f y you mean *make* then equal! Haskell is a declarative language, not an imperative

[Haskell-cafe] Re: trouble compiling regex posix head (I think 0.92) on ghc 6.7

2007-08-30 Thread Thomas Hartman
I darcs pulled cabal head to get latest cabal, removed -Werror from GHC-Options in the cabal file, removed HsRegexPosixConfig.h and tried again with the same result. It seems to really want that file. With, it installs, without, no install. $ darcs whatsnew { hunk ./regex-posix.cabal 16

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread ok
What is so bad about f x = g x'' where x'' = x' + transform x' = x * scale (if you really hate inventing temporary names, that is). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] darcs behind firewall

2007-08-30 Thread Sukit Tretriluxana
Thank you so much. That works nicely!! Ed On 8/30/07, Thomas Hartman [EMAIL PROTECTED] wrote: If you are on linux (I'm on ubuntu) you should be able to set export http_proxy=http://proxyserver.com:1234 export https_proxy=http://proxyserver.com:123 vars, per what your sysadmin says. In my

Re: [Haskell-cafe] Newbie question: Why gfoldl has this strange type?

2007-08-30 Thread Ryan Ingram
Just so nobody else has to look it up: Data.Generics.Basics.gfoldl :: Data a = (c (a - b) - a - c b) - (g - c g) - a - c a -- ryan On 8/30/07, Rodrigo Geraldo [EMAIL PROTECTED] wrote: Hi! I am a novice in Haskell, and particularly I have interested in generic programming. This interest

Re: [Haskell-cafe] Newbie question: Why gfoldl has this strange type?

2007-08-30 Thread Ryan Ingram
Actually, it's a higher rank type and that doesn't show up on hoogle's main page. gfoldl :: (forall a b . Data a = c (a - b) - a - c b) - (forall g . g - c g) - a - c a ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: interaction between OS processes

2007-08-30 Thread Aaron Denney
On 2007-08-30, Andrea Rossato [EMAIL PROTECTED] wrote: Hi, there's something I don't get about interaction among OS processes and Haskell handles/channels. This looks like a buffering problem. You might be able to make it work by explicitly setting line buffering with hSetBuffering --

Re: Re[4]: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread Hugh Perkins
On 8/31/07, Dan Piponi [EMAIL PROTECTED] wrote: Right. But the functions and data that we are trying to map and fold could be anything, so we are required to have the full functionality of Haskell running on the GPU - unless the compiler can smartly figure out what should run on the GPU and