Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Christopher Wilson
On Fri, Dec 17, 2010 at 11:04 AM, michael rice nowg...@yahoo.com wrote: I don't understand this error message. Haskell appears not to understand that 1 is a Num. Prelude :t 1 1 :: (Num t) = t Prelude :t [1,2,3,4,5] [1,2,3,4,5] :: (Num t) = [t] Prelude Michael === f

Re: [Haskell-cafe] OT: Monad co-tutorial: the Compilation Monad

2010-12-18 Thread Andrew Coppin
On 17/12/2010 12:59 AM, Gregg Reynolds wrote: This is a little off-topic, since it isn't specifically about Haskell, but since Haskell is the home of the monad tutorial it isn't completely irrelevant. The monad tutorial genre is well-known; it's often written somebody who has just learned the

Re: [Haskell-cafe] OT: Monad co-tutorial: the Compilation Monad

2010-12-18 Thread Max Bolingbroke
On 17 December 2010 12:45, Larry Evans cppljev...@suddenlink.net wrote: Am I doing something wrong or has somehow community.haskell.org been hijacked somehow? Er, it works for me. Maybe *your* DNS has been hijacked? I know lots of Windows viruses play tricks like this... Max

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread aditya siram
I think it is giving you the error because you the fmap in your code is operating on the IO monad and not the List monad. In order to get it to work, you can remove the IO layer with = as below: f :: [Int] - IO [Int] f lst = do return lst main = do let lst = f [1,2,3,4,5] lst = return

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Antoine Latter
This is a bit tricky. The type of 'f' is '[Int] - IO [Int]', which means that the type of 'lst' is 'IO [Int]'. So fmap (+1) tries to add one to the [Int] underneath the 'IO' type constructor. You can either use two 'fmap's, the first to lift up to IO and the second to lift into the list, or you

Re: [Haskell-cafe] Making type-incompatible strategies interchangeable

2010-12-18 Thread Heinrich Apfelmus
Jacek Generowicz wrote: # Imagine an activity which may be performed either by a computer, or # by a human (alternatively, either locally, or remotely across a # network). From Haskell's type system's perspective, these two will # look completely different (most obviously, the human (or the #

Re: [Haskell-cafe] OT: Monad co-tutorial: the Compilation Monad

2010-12-18 Thread Larry Evans
On 12/17/10 07:07, Daniel Fischer wrote: On Friday 17 December 2010 13:45:38, Larry Evans wrote: WARNING: I clicked on that link in my thunderbird news reader and got a page which was something about registering domains. It was nothing about Neil's slides. I then tried directing my Firfox

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-18 Thread John D. Ramsdell
You might like to read about free and reclaimable memory on Linux systems. I recommend that you go http://linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html and run the C programs that are included in the article. Another good way to learn about Linux memory is to Google with the

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Mads Lindstrøm
Hi Michael The type of lst is IO [Int] and therefore fmap (+1) applies (+1) to the hole lists of integers, and not to each member of the list. That is: fmap (+1) lst = fmap (+1) (return [1,2,3,4,5]) = return ([1,2,3,4,5] + 1) and you cannot say [1,2,3,4,5] + 1. Does that make sense? Maybe

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-18 Thread John D. Ramsdell
On Fri, Dec 17, 2010 at 3:03 AM, Ketil Malde ke...@malde.org wrote: So I still think the 80% rule is pretty good - it's simple, and although it isn't optimal in all cases, it's conservative in that any larger bound is almost certainly going to thrash. Please test the 80% rule, and report the

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread aditya siram
I have the same problem. -deech On Fri, Dec 17, 2010 at 8:01 AM, Eugene Kirpichov ekirpic...@gmail.com wrote: Hello. For a couple of friends of mine, hackage.haskell.org happens to resolve to something strange (parked domain), though haskell.org works ok. This might be something to tell to

[Haskell-cafe] [URGENT] DNS problems at haskell.org?

2010-12-18 Thread Stephane Bortzmeyer
On Fri, Dec 17, 2010 at 05:01:45PM +0300, Eugene Kirpichov ekirpic...@gmail.com wrote a message of 82 lines which said: For a couple of friends of mine, hackage.haskell.org happens to resolve to something strange (parked domain), though haskell.org works ok. This might be something to tell

Re: [Haskell-cafe] [URGENT] DNS problems at haskell.org?

2010-12-18 Thread Karel Gardas
Hello, please read: http://www.reddit.com/r/haskell/comments/encrv/whats_happened_to_haskellorg_did_someone_forget/c19guw1 Thanks, Karel On 12/17/10 03:19 PM, Stephane Bortzmeyer wrote: On Fri, Dec 17, 2010 at 05:01:45PM +0300, Eugene Kirpichovekirpic...@gmail.com wrote a message of

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread John D. Ramsdell
I think someone failed to pay a bill for using the domain name haskell.org. John On Fri, Dec 17, 2010 at 12:05 PM, aditya siram aditya.si...@gmail.com wrote: I have the same problem. -deech On Fri, Dec 17, 2010 at 8:01 AM, Eugene Kirpichov ekirpic...@gmail.com wrote: Hello. For a

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread aditya siram
It's fixed now. Try www.haskell.org. Check out http://www.reddit.com/r/haskell/comments/encrv/whats_happened_to_haskellorg_did_someone_forget/ for more discussion. -deech On Sat, Dec 18, 2010 at 9:12 AM, John D. Ramsdell ramsde...@gmail.com wrote: I think someone failed to pay a bill for using

Re: [Haskell-cafe] [URGENT] DNS problems at haskell.org?

2010-12-18 Thread Ketil Malde
Karel Gardas karel.gar...@centrum.cz writes: http://www.reddit.com/r/haskell/comments/encrv/whats_happened_to_haskellorg_did_someone_forget/c19guw1 Quoth dons: | The domain name was seized by Network Solutions (it wasn't due to | expire until this time next year). The confusion seems to be

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread Tony Hannan
I am seeing this from New York. Has the domain expired? dmmb:~ tony$ dig haskell.org ; DiG 9.6.0-APPLE-P2 haskell.org ;; global options: +cmd ;; Got answer: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 36391 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-18 Thread John D. Ramsdell
On Thu, Dec 16, 2010 at 4:13 AM, Simon Marlow marlo...@gmail.com wrote: If your program has large memory requirements, you might also benefit from parallel GC in the old generation: +RTS -N2 -qg1.l Testing shows this advice did not help in my case. The program that implements the undecidable

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread aditya siram
To make that a little clearer, here is code that uses two calls to fmap to drill through two monadic layers: f :: [Int] - IO [Int] f lst = do return lst main = do let lst = f [1,2,3,4,5] fmap (fmap (+1)) lst So the order of operations is : 1. The first fmap converts an IO [Int] to

Re: [Haskell-cafe] Layout styles and EclipseFP evolution.

2010-12-18 Thread John D. Ramsdell
Note to community. Design the syntax of a language to support auto indenting. Don't make me repeatedly hit the tab key. John On Thu, Dec 16, 2010 at 8:48 PM, Scott Michel scooter@gmail.com wrote: Disclaimer: I'm not looking to start a favorite IDE flame war, or resurrect Emacs vs. VIM

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread Jordan Bray
I can confirm this. If anyone has an immediate problem with this, you can use 8.8.8.8 (google's DNS server) as your DNS server. jor...@jordan-laptop:~$ nslookup hackage.haskell.org 8.8.8.8 Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: Name: hackage.haskell.org Address:

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread Pavel Perikov
For me only hackage.haskell.org works (resolves to 69.30.63.204), www.haskell.org shows parked domain (209.62.105.19) Pavel On 17.12.2010, at 17:01, Eugene Kirpichov wrote: Hello. For a couple of friends of mine, hackage.haskell.org happens to resolve to something strange (parked domain),

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread David Leimbach
On Fri, Dec 17, 2010 at 9:04 AM, michael rice nowg...@yahoo.com wrote: I don't understand this error message. Haskell appears not to understand that 1 is a Num. Prelude :t 1 1 :: (Num t) = t Prelude :t [1,2,3,4,5] [1,2,3,4,5] :: (Num t) = [t] Prelude Michael === f ::

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread Bas van Dijk
See the thread on the Haskell reddit about it: http://www.reddit.com/r/haskell/comments/encrv/whats_happened_to_haskellorg_did_someone_forget/ I hope it is resolved soon. Regards, Bas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] OT: Monad co-tutorial: the Compilation Monad

2010-12-18 Thread Neil Mitchell
Er, it works for me. Maybe *your* DNS has been hijacked? I know lots of Windows viruses play tricks like this... No, the DNS for haskell.org was down yesterday - if you try again today (after the DNS caches have cleared) it will work. Thanks, Neil

Re: [Haskell-cafe] OT: Monad co-tutorial: the Compilation Monad

2010-12-18 Thread Thomas Schilling
The haskell.org domain expired. It's being worked on. On 17 December 2010 12:45, Larry Evans cppljev...@suddenlink.net wrote: On 12/17/10 01:32, Max Bolingbroke wrote: [snip] I can't speak for your monad based approach, but you may be interested in Neil Mitchell's Haskell DSL for build

[Haskell-cafe] ByteString or Text version of getDirectoryContents

2010-12-18 Thread Jesse Schalken
Is there a ByteString or Text version of getDirectoryContents? I am writing a program which scans a filesystem and it runs out of memory using Strings for all the file names, and I would like to avoid the overhead of calling ByteString.pack on the results of getDirectoryContents. I don't mind if

Re: [Haskell-cafe] Making type-incompatible strategies interchangeable

2010-12-18 Thread aditya siram
Warning! Incredibly hacky Haskell coming up! Here's some code that seems to do the near same thing as your Python. Below it is some sample output. A couple of differences are that the secret number should be between 1 and 10, and whenever the computer tries guess it just picks a random number

Re: [Haskell-cafe] handling multiple versions of a data structure

2010-12-18 Thread Jeremy Shaw
Nice. Do you think there is any reason we would not be able to / want to use it with happstack ? I would love happstack-data to 'go away' and just use some library from hackage which does the same thing. - jeremy On Dec 17, 2010, at 3:57 AM, Erik Hesselink wrote: I've recently been

Re: [Haskell-cafe] handling multiple versions of a data structure

2010-12-18 Thread Erik Hesselink
No, I don't think so. It uses some extensions, but happstack-data already does, so that shouldn't be a problem. We don't have a releasable library yet, but when we do, it will have a versioned binary implementation, just like happstack-data does now. Perhaps even binary compatible with it, though

Re: [Haskell-cafe] DNS problems at haskell.org?

2010-12-18 Thread Diego Souza
The whois still says it is registered to Galois, Inc. Then, hopefully, it is just a DNS problem. Guys, if you that are responsible for managing haskell.org need a hand with sysadmin tasks I volunteer to work. I don't have lots of spare time, but I do have some. Just let me know. Thanks, On Fri,

Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-18 Thread Yves Parès
Thanks you all for your links, I will read this. However, Brent, I fail to understand your implementation of Monad... I understand the purpose, but not the algorithm. 2010/12/18 Matthew Sottile mjsott...@mac.com Hi- This may be of some interest:

Re: [Haskell-cafe] Making type-incompatible strategies interchangeable

2010-12-18 Thread Edward Z. Yang
Excerpts from Jacek Generowicz's message of Fri Dec 17 20:17:30 -0500 2010: Imagine an activity which may be performed either by a computer, or by a human (alternatively, either locally, or remotely across a network). From Haskell's type system's perspective, these two will look completely

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Daniel Peebles
Write out more types and it'll get more clear. f is [Int] - IO [Int] lst is f applied to Num a = [a], so it is of type IO [Int] fmap is applied to lst, which means it's stepping inside the IO. That means it's applying +1 to [1,2,3,4,5], which doesn't make much sense unless you have a Num

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Christopher Done
On 17 December 2010 18:04, michael rice nowg...@yahoo.com wrote: === f :: [Int] - IO [Int] f lst = do return lst main = do let lst = f [1,2,3,4,5] fmap (+1) lst The problem is that you are applying fmap to a type IO a. fmap (+1) (return [1,2,3]) But to achieve

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Thomas Davie
On 17 Dec 2010, at 21:44, Christopher Done wrote: On 17 December 2010 18:04, michael rice nowg...@yahoo.com wrote: === f :: [Int] - IO [Int] f lst = do return lst main = do let lst = f [1,2,3,4,5] fmap (+1) lst The problem is that you are applying fmap to

[Haskell-cafe] unable to load package `regex-posix-0.94.2' (On Vista x64)

2010-12-18 Thread __kaveh__
I am using Vista x64. I have Haskell platform installed (Latest varsion -available for Windows, 2010.2.0.0, GHC 6.12.3). When I am trying to run picnic.hs from How To Organize a Picnic on a Computer tutorial. I get this: C:\...runhaskell picnic.hs picnic.hs:46:18: Warning: accepting

Re: [Haskell-cafe] [URGENT] DNS problems at haskell.org?

2010-12-18 Thread Lennart Augustsson
I bet they did try to contact the owner. But when the contact email no longer works nobody will get the messages. On Sat, Dec 18, 2010 at 3:35 PM, Ketil Malde ke...@malde.org wrote: Karel Gardas karel.gar...@centrum.cz writes:

Re: [Haskell-cafe] Haskell, Step by Step, Tutorial, Developing a Whole Application

2010-12-18 Thread Jonathan Geddes
I agree with the feeling that Haskell tutorials feel like they are bottom-up. But I think there's a reason for this: In my experience, at least, Haskell applications are built bottom-up. Functional programming languages strive for composability. In Haskell you have very clean, clear ways of

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread David Leimbach
No problem. Haskell is a different animal than even other functional languages in my experience, and it takes time to get used to the coolness in the type system, the lazy evaluation, the point free style, functional composition and all the other interesting techniques you now have at your

Re: [Haskell-cafe] ANNOUNCE: genprog-0.1

2010-12-18 Thread Jan Snajder
(Moved from hask...@haskell.org) Hi Kenneth, I'm sorry for the very late reply. On Wed, 2010-12-08 at 10:01 +0100, Kenneth Hoste wrote: Hi Jan, On 11/29/2010 12:55 PM, Jan Snajder wrote: Dear Haskellers, I am pleased to announce the release of genprog-0.1, a genetic programming

[Haskell-cafe] (re)newcomer

2010-12-18 Thread Matthew Fairtlough
Hello Haskell-cafers, I used to teach Haskell (and Clean!) at University level but haven't touched Haskell in years and certainly never used it with a Mac. Now I work in publishing and want to experiment with Haskell's web services and see if I can help set up an open-source system for

Re: [Haskell-cafe] (re)newcomer

2010-12-18 Thread Jeremy Shaw
Hello, It looks like you are using GHC 6.10, which is now a pretty old version of GHC. The latest version of the unix package on hackage requires a more recent version of GHC. You could try to force an older version of the unix library: cabal install happstack-server --constraints

[Haskell-cafe] DNS Problems at haskell.org

2010-12-18 Thread John Peterson
Just to clarify - I was the contact for Haskell.org but the email address was no longer being forwarded. I had assumed I had been removed as the contact but unfortunately only the technical contact had been changed. All was finally resolved with the help of Yale, where they resurrected the

Re: [Haskell-cafe] [Haskell] macports, cabal, cabal-install difficulty

2010-12-18 Thread Antoine Latter
I don't know about the ld warning, but cabal-install can never know which version of cabal-install is installed, because it doesn't track executables - it only tracks and knows about libraries. Right after the warning is the line: Installing executable(s) in /Users/matthew/.cabal/bin So it