Re: [Haskell-cafe] Wumpus World

2008-03-26 Thread Richard A. O'Keefe
On 27 Mar 2008, at 4:23 pm, Benjamin L. Russell wrote: After briefly searching the Internet and coming up with a page entitled "CIS587: The Wumpus World" (http://www.cis.temple.edu/~ingargio/cis587/readings/wumpus.shtml), I think that since the statement of this problem there, involving the Sit

[Haskell-cafe] Re: SoC project: Python-Haskell bridge - request for feedback

2008-03-26 Thread Michał Janeczek
Hi, This is my second take on the project proposal. I have expanded on a few points, and hopefully also clarified a little bit. Please comment :) Regards, Michal Python-Haskell bridge = Description --- This project will seek to provide a comprehensive, high level

Re: [Haskell-cafe] Wumpus World

2008-03-26 Thread Benjamin L. Russell
After briefly searching the Internet and coming up with a page entitled "CIS587: The Wumpus World" (http://www.cis.temple.edu/~ingargio/cis587/readings/wumpus.shtml), I think that since the statement of this problem there, involving the Situation Calculus, chiefly involves a sequence of logical st

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Ian Lynagh
On Wed, Mar 26, 2008 at 02:33:20PM -0700, Jim Snow wrote: > > -Memory consumption is atrocious: 146 megs to render a scene that's a > 33k ascii file. Where does it all go? A heap profile reports the max > heap size at a rather more reasonable 500k or so. (My architecture is > 64 bit ubuntu o

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Jim Snow
David Roundy wrote: On Wed, Mar 26, 2008 at 05:07:10PM -0700, Don Stewart wrote: droundy: On Thu, Mar 27, 2008 at 01:09:47AM +0300, Bulat Ziganshin wrote: -Collecting rendering stats is not easy without global variables. It occurs to me that it would be neat if there were some

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread David Roundy
On Wed, Mar 26, 2008 at 05:07:10PM -0700, Don Stewart wrote: > droundy: > > On Thu, Mar 27, 2008 at 01:09:47AM +0300, Bulat Ziganshin wrote: > > > > -Collecting rendering stats is not easy without global variables. It > > > > occurs to me that it would be neat if there were some sort of write-only

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Don Stewart
droundy: > On Thu, Mar 27, 2008 at 01:09:47AM +0300, Bulat Ziganshin wrote: > > > -Collecting rendering stats is not easy without global variables. It > > > occurs to me that it would be neat if there were some sort of write-only > > > global variables that can be incremented by pure code but can

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread David Roundy
On Thu, Mar 27, 2008 at 01:09:47AM +0300, Bulat Ziganshin wrote: > > -Collecting rendering stats is not easy without global variables. It > > occurs to me that it would be neat if there were some sort of write-only > > global variables that can be incremented by pure code but can only be > > read

Re: [Haskell-cafe] Wumpus World

2008-03-26 Thread Paul Johnson
iliali16 wrote: Hi guys I have to build the wumpus world problem. I didn't start yet since this is the first time in my life I have to do something like that and I feel not confident in starting it. So I have basic idea of what prolog and haskell can do and I know a bit of Java. I am wandering if

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Derek Elkins
On Wed, 2008-03-26 at 14:45 -0700, Don Stewart wrote: > jsnow: > > I have recently posted a haskell port of my ocaml raytracer, Glome: > > > > http://syn.cs.pdx.edu/~jsnow/glome/ > > > > It supports spheres and triangles as base primitives, and is able to > > parse files in the NFF format used b

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Bulat Ziganshin
Hello Jim, Thursday, March 27, 2008, 12:33:20 AM, you wrote: > -Multi-core parallelism is working, but not as well as I'd expect: I get > about a 25% reduction in runtime on two cores rather than 50%. I split this may be an effect of limited memory bandwidth > -Memory consumption is atrocious:

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Justin Bailey
On Wed, Mar 26, 2008 at 2:33 PM, Jim Snow <[EMAIL PROTECTED]> wrote: > -Memory consumption is atrocious: 146 megs to render a scene that's a > 33k ascii file. Where does it all go? A heap profile reports the max > heap size at a rather more reasonable 500k or so. (My architecture is > 64 bit

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Henning Thielemann
On Wed, 26 Mar 2008, Don Stewart wrote: jsnow: -Is there a fast way to cast between Float and Double? I'm using Float currently, and the only reason is because that's what the OpenGL api expects. I'd like to be able to use either representation, but the only way to cast that I've found so f

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Don Stewart
jsnow: > I have recently posted a haskell port of my ocaml raytracer, Glome: > > http://syn.cs.pdx.edu/~jsnow/glome/ > > It supports spheres and triangles as base primitives, and is able to > parse files in the NFF format used by the standard procedural database > (http://tog.acm.org/resources/

[Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Jim Snow
I have recently posted a haskell port of my ocaml raytracer, Glome: http://syn.cs.pdx.edu/~jsnow/glome/ It supports spheres and triangles as base primitives, and is able to parse files in the NFF format used by the standard procedural database (http://tog.acm.org/resources/SPD/). It uses a bo

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Andrew Coppin
Don Stewart wrote: It's very active. See: http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell and watch the commits coming in from Roman. *digs around* Hmm. So in summary, stuff is happening behind the scenes, there's just not a lot of visible activity at the surface.

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Don Stewart
andrewcoppin: > Janis Voigtlaender wrote: > >Google -> http://research.microsoft.com/~simonpj/papers/ndp/ > > > >I don't think the above suggests that "nothing is happening" ... > > The latet thing on that page is dated over a year ago. It's very active. See: http://haskell.org/haskellwiki/G

[Haskell-cafe] Wumpus World

2008-03-26 Thread iliali16
Hi guys I have to build the wumpus world problem. I didn't start yet since this is the first time in my life I have to do something like that and I feel not confident in starting it. So I have basic idea of what prolog and haskell can do and I know a bit of Java. I am wandering if you can tell me

Re: [Haskell-cafe] HDBC, character encoding

2008-03-26 Thread Don Stewart
aneumann: > Hi, > > I wrote a CGI program to access a Postgres database using HDBC. The > database stores books and I want to display those from a certain > author. Everything works fine, unless I search for someone with an > umlaut in his name. Böll, for example. I have a function like this

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Jed Brown
On Wed 2008-03-26 19:50, Bulat Ziganshin wrote: > Hello Jed, > > Wednesday, March 26, 2008, 7:02:28 PM, you wrote: > > > StorableArray. Unfortunately there is a performance hit to using Storable > > versus the built in unboxed types. > > are you sure? it was in ghc 6.4, now afair they should be

Re[2]: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Bulat Ziganshin
Hello Jed, Wednesday, March 26, 2008, 7:02:28 PM, you wrote: > StorableArray. Unfortunately there is a performance hit to using Storable > versus the built in unboxed types. are you sure? it was in ghc 6.4, now afair they should be the same. look in http://haskell.org/haskellwiki/Modern_array_l

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Jed Brown
On Wed 2008-03-26 14:22, Henning Thielemann wrote: > A light-weight unboxed array variant is: > http://code.haskell.org/~sjanssen/storablevector/ There is also CArray which offers an immutable interface for any Storable. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/carray You can

Re: [Haskell-cafe] Type synonyms

2008-03-26 Thread Dan Doel
On Wednesday 26 March 2008, Hugo Pacheco wrote: > Hi guys, > > There is something I think not to fully understand: what are the > differences between these two type synonyms? > > type FInt x = Either One x > type FInt = Either One > > Their kind is the same, so do they differ or are exactly the sam

[Haskell-cafe] Type synonyms

2008-03-26 Thread Hugo Pacheco
Hi guys, There is something I think not to fully understand: what are the differences between these two type synonyms? type FInt x = Either One x type FInt = Either One Their kind is the same, so do they differ or are exactly the same type? Thanks, hugo _

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Roman Cheplyaka
* Henning Thielemann <[EMAIL PROTECTED]> [2008-03-26 14:22:20+0100] > > On Wed, 26 Mar 2008, Roman Cheplyaka wrote: > >> * Andrew Coppin <[EMAIL PROTECTED]> [2008-03-26 12:37:53+] >>> Somebody asked me, so now I'm asking you... >>> >>> In Haskell, you can make "unboxed" arrays of certain value

[Haskell-cafe] [GSoC] student applications deadline approaching

2008-03-26 Thread Malcolm Wallace
Reply-To: haskell-cafe@haskell.org Just to remind students who are interested in Google Summer of Code. Student applications are now open, and the final deadline for submitting your proposals is 2400 UTC, 31st March. http://code.google.com/soc/2008/ Regards, Malcolm _

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Janis Voigtlaender
Andrew Coppin wrote: Janis Voigtlaender wrote: Google -> http://research.microsoft.com/~simonpj/papers/ndp/ I don't think the above suggests that "nothing is happening" ... The latet thing on that page is dated over a year ago. Well, if you expect monthly updates... -- Dr. Janis Voigtlae

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Andrew Coppin
Janis Voigtlaender wrote: Google -> http://research.microsoft.com/~simonpj/papers/ndp/ I don't think the above suggests that "nothing is happening" ... The latet thing on that page is dated over a year ago. ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Janis Voigtlaender
Andrew Coppin wrote: Roman Cheplyaka wrote: * Andrew Coppin <[EMAIL PROTECTED]> [2008-03-26 12:37:53+] Any insights here? Could Data Parallel Haskell[1] be useful for you? It was designed for parallel computation, but it includes unboxed arrays, nice list-like syntax and array c

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Andrew Coppin
Roman Cheplyaka wrote: * Andrew Coppin <[EMAIL PROTECTED]> [2008-03-26 12:37:53+] Any insights here? Could Data Parallel Haskell[1] be useful for you? It was designed for parallel computation, but it includes unboxed arrays, nice list-like syntax and array comprehensions. 1. htt

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Henning Thielemann
On Wed, 26 Mar 2008, Roman Cheplyaka wrote: * Andrew Coppin <[EMAIL PROTECTED]> [2008-03-26 12:37:53+] Somebody asked me, so now I'm asking you... In Haskell, you can make "unboxed" arrays of certain value types. These are typically more efficient in space, and probably time too, and also

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Roman Cheplyaka
* Andrew Coppin <[EMAIL PROTECTED]> [2008-03-26 12:37:53+] > Somebody asked me, so now I'm asking you... > > In Haskell, you can make "unboxed" arrays of certain value types. These > are typically more efficient in space, and probably time too, and also > make the array strict in its values

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Bulat Ziganshin
Hello Andrew, Wednesday, March 26, 2008, 3:37:53 PM, you wrote: > type of your own, you just need to write your own instance". The thing > that makes me suspicious of this logic is the absense of an instance for > tuples. > Any insights here? and even insiders :) i've rewrote arrays library to

[Haskell-cafe] Unboxed arrays

2008-03-26 Thread Andrew Coppin
Somebody asked me, so now I'm asking you... In Haskell, you can make "unboxed" arrays of certain value types. These are typically more efficient in space, and probably time too, and also make the array strict in its values. However, you can only do this magic trick for certain types - not for

Re: [Haskell-cafe] No newlines in the whitespace for Parsec lexeme parsers

2008-03-26 Thread Brandon S. Allbery KF8NH
On Mar 26, 2008, at 7:42 , Bulat Ziganshin wrote: Wednesday, March 26, 2008, 2:32:53 PM, you wrote: I'm looking to parse a Fortran dialect using Parsec, and was afair, some months ago BASIC parsing was discussed here. the first solution one can imagine is to add preprocessing stage replacin

Re: [Haskell-cafe] No newlines in the whitespace for Parsec lexeme parsers

2008-03-26 Thread Andrew Coppin
Paul Keir wrote: Hi, I'm looking to parse a Fortran dialect using Parsec, and was hoping to use the ParsecToken module. Fortran though is unlike the Parsec examples, and prohibits default line continuation (requiring instead an explicit ampersand token &). The lexical parsers of the ParsecTo

RE: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Simon Peyton-Jones
| > Why not quite? | | Maybe I was thinking too much in terms of GHC's implementation, but | due to the lazy expansion type synonyms, the expansion is interleaved | with all the rest of type checking. But I think I now know what you | meant: the outcome should be *as if* type synonym expansion wa

Re: [Haskell-cafe] No newlines in the whitespace for Parsec lexeme parsers

2008-03-26 Thread Bulat Ziganshin
Hello Paul, Wednesday, March 26, 2008, 2:32:53 PM, you wrote: > I'm looking to parse a Fortran dialect using Parsec, and was afair, some months ago BASIC parsing was discussed here. the first solution one can imagine is to add preprocessing stage replacing line ends with ';'-alike -- Best re

[Haskell-cafe] No newlines in the whitespace for Parsec lexeme parsers

2008-03-26 Thread Paul Keir
Hi, I'm looking to parse a Fortran dialect using Parsec, and was hoping to use the ParsecToken module. Fortran though is unlike the Parsec examples, and prohibits default line continuation (requiring instead an explicit ampersand token &). The lexical parsers of the ParsecToken module skip whit

Re: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Manuel M T Chakravarty
Simon Peyton-Jones: | > * GHC says that these constraints must be obeyed only | >*after* the programmer-written type has been normalised | >by expanding saturated type synonyms | > ... | > I regard this as a kind of pre-pass, before serious type checking | > takes place, so I don'

[Haskell-cafe] HDBC, character encoding

2008-03-26 Thread Adrian Neumann
Hi, I wrote a CGI program to access a Postgres database using HDBC. The database stores books and I want to display those from a certain author. Everything works fine, unless I search for someone with an umlaut in his name. Böll, for example. I have a function like this > bookByAuthor ::

Re: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Claus Reinke
Well, we still need normal subject reduction (i.e., types don't change under value term reduction), and we have established that for System FC (in the TLDI paper). In addition, type term normalisation (much like value term normalisation) needs to be confluent; otherwise, you won't get a c

Re: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Manuel M T Chakravarty
Hugo Pacheco: Since I was the one to start this thread, I have managed to implement what I initially wanted as F a :: *->* with F a x::*, and the cost of not having partially applied type synonyms was not much apart from some more equality coercions that I wasn't expecting. [..] Generally,

RE: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Simon Peyton-Jones
| > * GHC says that these constraints must be obeyed only | >*after* the programmer-written type has been normalised | >by expanding saturated type synonyms | > ... | > I regard this as a kind of pre-pass, before serious type checking | > takes place, so I don't think it should inte