Re: [Haskell-cafe] Wumpus World

2008-03-31 Thread Benjamin L. Russell
--- Richard A. O'Keefe [EMAIL PROTECTED] wrote: [snip] Let me contrast SICStus Prolog with GHC. I *have* a personal copy of SICStus on my SunBlade 100/Solaris 2.10 system which installed absolutely trouble free. I *did* have a copy of GHC, but trying to install GHC 6.4 took a great

Re: [Haskell-cafe] lexicographic order

2008-03-31 Thread Simeon Mattes
Chaddaï Fouché-2 wrote: 2008/3/30, Bulat Ziganshin [EMAIL PROTECTED]: although the last alternative, (Branch l r) = (Branch l' r') = l == l' r = r' || l = l' seems suspicious to me. isn't it the same as (Branch l r) = (Branch l' r') = l = l' Yes, it should be : (Branch l

Re: [Haskell-cafe] Possible to automatically determine typeclass membership?

2008-03-31 Thread Alfonso Acosta
Hopefully, accessing the instance environment from Tempalte Haskell will be possible in next GHC's release: http://hackage.haskell.org/trac/ghc/ticket/1835 2008/3/31 jeff p [EMAIL PROTECTED]: Hello, Is it possible in Haskell + GHC extensions to use reflection techniques to determine

Re: [Haskell-cafe] lexicographic order

2008-03-31 Thread Chaddaï Fouché
2008/3/31, Simeon Mattes [EMAIL PROTECTED]: why I should take as right (a,b) = (a',b') iff (a a' or (a == a' and b = b')) and not (a,b) = (a',b') iff (a = a' or (a == a' and b = b')) The latter seems more logical, doesn't it? No, it doesn't, since in the latter (1,2) = (1,1) because 1

[Haskell-cafe] SYB with class: Bug in Derive.hs module

2008-03-31 Thread Alexey Rodriguez Yakushev
Hi people (and Ralf and Alex), I found a bug in the SYB with class library when trying to implement generic equality. I am hoping that someone in the Cafe (maybe Ralf) can confirm it is a bug, or maybe show me that I am doing something wrong. I am using the Scrap your boilerplate with

[Haskell-cafe] How can I represent 4x4 map in haskell

2008-03-31 Thread iliali16
Hi can you please tell me how can I represent 4x4 map in haskell.Should I show it as a list of lines and each line to be a list of char or I am mistaken? Thanks in advance! -- View this message in context: http://www.nabble.com/How-can-I-represent-4x4-map-in-haskell-tp16396273p16396273.html

Re: [Haskell-cafe] How can I represent 4x4 map in haskell

2008-03-31 Thread Janis Voigtlaender
iliali16 wrote: Hi can you please tell me how can I represent 4x4 map in haskell.Should I show it as a list of lines and each line to be a list of char or I am mistaken? Thanks in advance! Sure this is no homework? If it is, please first consult:

[Haskell-cafe] Re: How can I represent 4x4 map in haskell

2008-03-31 Thread Chris Smith
iliali16 wrote: Hi can you please tell me how can I represent 4x4 map in haskell.Should I show it as a list of lines and each line to be a list of char or I am mistaken? Thanks in advance! What do you mean by a 4x4 map? Maybe I'm missing something obvious, but there are several different

Re: [Haskell-cafe] How can I represent 4x4 map in haskell

2008-03-31 Thread iliali16
Just to let you know that that is not a homework just for one function representing the map. It is my project wich I subdivided into peaces but since I am not that new to haskell I am not sure if I am on the right track so that is my code till now: type Line = [Char] type Board = [Line] so my

[Haskell-cafe] Homework wiki page (was Re: How can I represent 4x4 map in haskell)

2008-03-31 Thread Chris Smith
This is a little off-topic, but perhaps we can have some discussion of that Wiki page? The Haskell community has a reputation of being helpful and welcoming to newcomers. I'm having a hard time reconciling that with this wiki page. In particular. 1. The tone is generally threatening, as in:

Re: [Haskell-cafe] How can I represent 4x4 map in haskell

2008-03-31 Thread Janis Voigtlaender
iliali16 wrote: Just to let you know that that is not a homework just for one function representing the map. It is my project wich I subdivided into peaces but since I am not that new to haskell I am not sure if I am on the right track so that is my code till now: type Line = [Char] type Board

Re: [Haskell-cafe] Homework wiki page (was Re: How can I represent 4x4 map in haskell)

2008-03-31 Thread Neil Mitchell
Hi Chris, The Haskell community has a reputation of being helpful and welcoming to newcomers. I'm having a hard time reconciling that with this wiki page. In particular. For those who want to follow along, its this one: http://haskell.org/haskellwiki/Homework_help I agree. That page is

Re: [Haskell-cafe] How can I represent 4x4 map in haskell

2008-03-31 Thread Tillmann Rendel
iliali16 wrote: type Line = [Char] type Board = [Line] so my question is if this is ok to represent a map. If yes I will try to write the function which makes it 4 x 4 myself. What I jsut need as an answer is Yes or No. Just to let you know is that I am trying to build the Wumpus World A

[Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Bruno Carnazzi
Dears Haskellers, As an Haskell newbie, I'm learning Haskell by trying to resolve Euler Project problems (http://projecteuler.net/ ). I'm hanging on problem 14 (Collatz problem). I've written the following program... Which does not end in a reasonable time :( My algorithm seems ok to me but I

Re: [Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Bulat Ziganshin
Hello Bruno, Monday, March 31, 2008, 7:51:43 PM, you wrote: I've written the following program... Which does not end in a reasonable time :( My algorithm seems ok to me but I see that memory consumption is gigantic... Is this a memory problem with Data.Map ? Or an infinite loop ? (Where ?)

[Haskell-cafe] Re: HTTP client libraries

2008-03-31 Thread John Goerzen
On 2008-03-30, Iavor Diatchki [EMAIL PROTECTED] wrote: Hi, On Fri, Mar 28, 2008 at 6:42 AM, John Goerzen [EMAIL PROTECTED] wrote: On 2008-03-28, Don Stewart [EMAIL PROTECTED] wrote: paulrbrown+haskell-cafe: And we have a curl binding, already in wide use.

Re: [Haskell-cafe] Seeking Daan Leijen

2008-03-31 Thread Bjorn Bringert
On Thu, Mar 27, 2008 at 6:43 PM, John Goerzen [EMAIL PROTECTED] wrote: I tried to email this to Daan, but his mail is bouncing... Subject: http://legacy.cs.uu.nl/daan/parsec.html Hi Daan, I noticed Parsec 3.0.0 on Hackage, and went to your homepage to read about the new package. But

[Haskell-cafe] [GSoC] X Haskell bindings

2008-03-31 Thread Roman Cheplyaka
Hi! I've written a draft proposal for GSoC on XCB Haskell Bindings[1]. I'd appreciate any feedback. Especially I need help with Milestones section. I'm not quite sure how it should look like for such project. 1. http://ro-che.info/docs/xhsb.txt -- Roman I. Cheplyaka :: http://ro-che.info/

Re: [Haskell-cafe] HDBC, character encoding

2008-03-31 Thread Bjorn Bringert
2008/3/26 Adrian Neumann [EMAIL PROTECTED]: 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

Re: [Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Bruno Carnazzi
The program ends for values up to 40 : *Main :set +s *Main maxChain 1000 (871,179) (0.09 secs, 3697648 bytes) *Main maxChain 1 (6171,262) (0.73 secs, 31560008 bytes) *Main maxChain 10 (77031,351) (9.31 secs, 347122064 bytes) *Main maxChain 20 (156159,383) (19.32 secs, 709303708

[Haskell-cafe] [GSoC] Student applications deadline extended one week

2008-03-31 Thread Don Stewart
Hey all, As you might know, the Google Summer of Code application submission period is open. Google has decided to extend the deadline for initial student applications by one week, http://groups.google.com/group/google-summer-of-code-announce/browse_thread/thread/9fa88f31aa401f70 If you've

Re: [Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Ketil Malde
Bruno Carnazzi [EMAIL PROTECTED] writes: The program ends for values up to 40 : Wild guess here - I know nothing about the problem, and haven't examined your program in detail - but could it be that you default to Int, and that it wraps silently at some power of two, thereby making your

Re: [Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Bruno Carnazzi
I've done this modification with no more success : import qualified Data.List as List import qualified Data.Map as Map f :: Integer - Integer f n | even n = n `div` 2 | otherwise = 3 * n + 1 chain m n = let chain' cn cm | Map.member cn m = Map.map (+ (m Map.! cn)) cm

Re: [Haskell-cafe] [GSoC] X Haskell bindings

2008-03-31 Thread Adam Langley
2008/3/31 Roman Cheplyaka [EMAIL PROTECTED]: Especially I need help with Milestones section. I'm not quite sure how it should look like for such project. This would seem to be a commendable SoC project. I'm not sure that the milestones are all that important - no plan ever survives contact

Re: [Haskell-cafe] [GSoC] Student applications deadline extended one week

2008-03-31 Thread Manlio Perillo
Don Stewart ha scritto: Hey all, As you might know, the Google Summer of Code application submission period is open. Google has decided to extend the deadline for initial student applications by one week,

Re: [Haskell-cafe] [GSoC] X Haskell bindings

2008-03-31 Thread Roman Cheplyaka
* Adam Langley [EMAIL PROTECTED] [2008-03-31 11:29:57-0700] 2008/3/31 Roman Cheplyaka [EMAIL PROTECTED]: Especially I need help with Milestones section. I'm not quite sure how it should look like for such project. This would seem to be a commendable SoC project. I'm not sure that the

Re: [Haskell-cafe] [GSoC] X Haskell bindings

2008-03-31 Thread Antoine Latter
I've been looking into to this a bit myself, and have had trouble with the fact that the XML descriptions of the protocol are extremely C-centric. As in, the union types defined in the XML are C-unions, and I've seen a struct definition which uses padding-bytes to store semantically useful data.

Re: [Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Luke Palmer
On Mon, Mar 31, 2008 at 6:00 PM, Bruno Carnazzi [EMAIL PROTECTED] wrote: I've done this modification with no more success : import qualified Data.List as List import qualified Data.Map as Map f :: Integer - Integer f n | even n = n `div` 2 | otherwise = 3 * n + 1 chain m n =

Re: [Haskell-cafe] [GSoC] Student applications deadline extended one week

2008-03-31 Thread Adam Langley
On Mon, Mar 31, 2008 at 12:00 PM, Manlio Perillo [EMAIL PROTECTED] wrote: Since Nginx is asynchronous, how can be solved the producer-consumer problem (that is, the Haskell program produces more data that Nginx can send to the client without blocking)? I assume that the Haskell process is

Re: [Haskell-cafe] How can I represent 4x4 map in haskell

2008-03-31 Thread iliali16
I mean board but I found the solution to my problem don't worry I really don't want someone to do my Project since I won't learn from that and I really want to learn since that's what is important at the end of the day. Thanks to all that people who understood what I mean and advised me, thanks

Re: [Haskell-cafe] HDBC, character encoding

2008-03-31 Thread Peter Gammie
On 31/03/2008, at 11:42 PM, Bjorn Bringert wrote: 2008/3/26 Adrian Neumann [EMAIL PROTECTED]: Hi, I wrote a CGI program to access a Postgres database using HDBC. [...] I think that Peter Gammie (copied) has some code to deal with this. I added some stuff to HSQL (not HDBC) and HaskellDB

Re: [Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Chaddaï Fouché
2008/3/31, Bruno Carnazzi [EMAIL PROTECTED]: Dears Haskellers, As an Haskell newbie, I'm learning Haskell by trying to resolve Euler Project problems (http://projecteuler.net/ ). I'm hanging on problem 14 (Collatz problem). I've written the following program... Which does not end in

Re: [Haskell-cafe] [Newbie] Problem with Data.Map (or something else ?)

2008-03-31 Thread Don Stewart
chaddai.fouche: 2008/3/31, Bruno Carnazzi [EMAIL PROTECTED]: Dears Haskellers, As an Haskell newbie, I'm learning Haskell by trying to resolve Euler Project problems (http://projecteuler.net/ ). I'm hanging on problem 14 (Collatz problem). I've written the following