Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Help!! (Lyndon Maydwell)
   2. Re:  Help!! (Daniel Fischer)
   3. Re:  Help!! (Patrick Lynch)
   4. Re:  Beginners issue with 'Why Haskell    matters'        example code
      (Patrick Lynch)
   5.  Which haskell array implementation to use? AKA what are the
      pros and cons of each (Rohit Garg)
   6. Re:  Which haskell array implementation to use?   AKA what are
      the pros and cons of each (Ben Lippmeier)
   7.  Is this an appropriate use of the writer monad?
      (Alex Rozenshteyn)


----------------------------------------------------------------------

Message: 1
Date: Thu, 10 Mar 2011 19:46:15 +0800
From: Lyndon Maydwell <maydw...@gmail.com>
Subject: Re: [Haskell-beginners] Help!!
To: aditya siram <aditya.si...@gmail.com>
Cc: jessicamayba...@gmail.com, beginners@haskell.org
Message-ID:
        <AANLkTim9bba=cbm+pbpduf4b2dunbvhhfp0p5z6af...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Interesting! What is the book called? I ran through many examples like
this in ruby once upon a time, but I just tried to crack various
cyphers from their wikipedia descriptions.

On Thu, Mar 10, 2011 at 12:23 AM, aditya siram <aditya.si...@gmail.com> wrote:
> What do you have so far? Or how are you thinking of attacking the problem?
> -deech
>
> On Wed, Mar 9, 2011 at 10:00 AM, Jessica Baker
> <jessicamayba...@gmail.com> wrote:
>> 3.1 Step 1
>> Create a Haskell script le called crypt.hs and enter the code for he Caesar
>> cipher from
>> Section 5.5 of the text book (Hutton). Make sure you understand how all the
>> functions
>> work.
>>
>> 3.2 Step 2
>> Transform your script le (from Step 1) into a Haskell program that reads
>> text from the
>> standard input, encrypts the text using the Caesar cipher, and writes the
>> result to the
>> standard output. Your program should take a command-line argument that speci
>> es the
>> shift factor to be used. So, for example:
>> cat poem.txt | ./crypt 3
>> Eqvdqjxlqlqj wkh vnb
>> Hrz khdylob lw glhv
>> Iqwr wkh Whvw dzdb
>> Pdvw wrxfk dqg vljkw dqg vrxqg
>> Nr orqjhu wr eh irxqg
>> Hrz krshohvv xqghujurxqg
>> Fdoov wkh uhpruvhixo gdb
>>
>> If the command-line argument is 0 (zero) then the program should crack the
>> code and
>> output the deciphered text. So, the following command pipeline should echo
>> the original
>> message:
>> cat poem.txt | ./crypt 3 | ./crypt 0
>> Ensanguining the sky
>> How heavily it dies
>> Into the West away
>> Past touch and sight and sound
>> No longer to be found
>> How hopeless underground
>> Falls the remorseful day
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners@haskell.org
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>



------------------------------

Message: 2
Date: Thu, 10 Mar 2011 13:33:52 +0100
From: Daniel Fischer <daniel.is.fisc...@googlemail.com>
Subject: Re: [Haskell-beginners] Help!!
To: beginners@haskell.org
Message-ID: <201103101333.53028.daniel.is.fisc...@googlemail.com>
Content-Type: Text/Plain;  charset="iso-8859-1"

On Thursday 10 March 2011 12:46:15, Lyndon Maydwell wrote:
> Interesting! What is the book called?

"Programming in Haskell", iirc.



------------------------------

Message: 3
Date: Thu, 10 Mar 2011 09:25:46 -0500
From: "Patrick Lynch" <kmandpjly...@verizon.net>
Subject: Re: [Haskell-beginners] Help!!
To: "Daniel Fischer" <daniel.is.fisc...@googlemail.com>,
        <beginners@haskell.org>
Message-ID: <7C8896C598214CCBAC4BBA181280F601@UserPC>
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
        reply-type=original

Good morning,

I'm going thru this book now...it's excellent...
The author is Graham Hutton and you can view the full text at: 
http://horna.org.ua/books/fp-papers/Hutton,%20Graham%20-%20Programming%20in%20Haskell.pdf

In addition, I'm also reading "Category Theory" by Steve Awodey - it was 
written for Computer Scientists and not Mathemeticians...I'll let you know 
about it...

Good day

----- Original Message ----- 
From: "Daniel Fischer" <daniel.is.fisc...@googlemail.com>
To: <beginners@haskell.org>
Sent: Thursday, March 10, 2011 7:33 AM
Subject: Re: [Haskell-beginners] Help!!


> On Thursday 10 March 2011 12:46:15, Lyndon Maydwell wrote:
>> Interesting! What is the book called?
>
> "Programming in Haskell", iirc.
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
> 




------------------------------

Message: 4
Date: Thu, 10 Mar 2011 09:32:39 -0500
From: "Patrick Lynch" <kmandpjly...@verizon.net>
Subject: Re: [Haskell-beginners] Beginners issue with 'Why Haskell
        matters'        example code
To: "Michael Anckaert" <michael.ancka...@sinax.be>,
        <beginners@haskell.org>
Message-ID: <99BBB2ADA7B5452BA4ECB9AC16BE2531@UserPC>
Content-Type: text/plain; charset="iso-8859-1"

Good morning,
Take a look at the following - it comes from Graham Hutton's book: "Programming 
in Haskell" - see link: 
http://horna.org.ua/books/fp-papers/Hutton,%20Graham%20-%20Programming%20in%20Haskell.pdf

qsort :: (Ord a) => [a] -> [a]
qsort [] = []
qsort (x:xs) = qsort smaller ++ [x] ++ qsort larger
               where
                   smaller = [a|a<-xs, a <= x] 
                   larger   = [a|a<-xs, a >   x] 

----- Original Message ----- 
  From: Michael Anckaert 
  To: beginners@haskell.org 
  Sent: Thursday, March 10, 2011 2:46 AM
  Subject: [Haskell-beginners] Beginners issue with 'Why Haskell matters' 
example code


  Hey everyone

  I'm new on the list here and just started out learning Haskell and functional 
programming. I have over 12 years experience programming in various languages, 
from C to Python. 

  I started out with the Why Haskell matters paper 
(http://haskell.org/haskellwiki/Why_Haskell_Matters) and ran into a problem 
with the code below. It's discussed in the paper but when I save it to test.hs 
and load it into ghci, I get the following output:

  ------------------------
  [1 of 1] Compiling Main             ( test.hs, interpreted )

  test.hs:6:22: parse error on input `='
  Failed, modules loaded: none.

  ------------------------

  Could someone give a pointer on where my error lies?

  qsort [] = []
  qsort (x:xs) = qsort less ++ [x] ++ qsort more
      where less = filter (<x) xs
          more = filter (>=x) xs

  -- 
  Kind regards
  Michael Anckaert <michael.ancka...@sinax.be>
  http://www.sinax.be



------------------------------------------------------------------------------


  _______________________________________________
  Beginners mailing list
  Beginners@haskell.org
  http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110310/6f31e044/attachment-0001.htm>

------------------------------

Message: 5
Date: Fri, 11 Mar 2011 00:23:15 +0530
From: Rohit Garg <rpg....@gmail.com>
Subject: [Haskell-beginners] Which haskell array implementation to
        use? AKA what are the pros and cons of each
To: beginners@haskell.org
Message-ID:
        <aanlktinjeghpm5kg2ynjwvowz8cba9dccaghr3esx...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I am reposting the question I posted here

http://stackoverflow.com/questions/5196394/which-haskell-array-implementation-to-use-aka-what-are-the-pros-and-cons-of-each

I am somewhat surprised at the answers. It could be that I didn't pose
it very well, but I was surprised nonetheless to know that the present
array library in Platform is considered horrendous, the suggested
version (Data.Vector) can't parallelize operations over boxed arrays
and the repa one (which actually does boxed arrays) doesn't work with
any stable build as of today.

I only need
-> very easy parallelization
-> map/filter type operations
-> support for matrices

Any help would be much appreciated.

-- 
Rohit Garg

http://rpg-314.blogspot.com/



------------------------------

Message: 6
Date: Fri, 11 Mar 2011 13:55:37 +1100
From: Ben Lippmeier <b...@ouroborus.net>
Subject: Re: [Haskell-beginners] Which haskell array implementation to
        use?    AKA what are the pros and cons of each
To: Rohit Garg <rpg....@gmail.com>
Cc: beginners@haskell.org
Message-ID: <1eefe642-3f4d-40c6-b3ed-043d1f264...@ouroborus.net>
Content-Type: text/plain; charset=us-ascii


On 11/03/2011, at 5:53 AM, Rohit Garg wrote:

> I am reposting the question I posted here
> 
> http://stackoverflow.com/questions/5196394/which-haskell-array-implementation-to-use-aka-what-are-the-pros-and-cons-of-each
> 
> I am somewhat surprised at the answers. It could be that I didn't pose
> it very well, but I was surprised nonetheless to know that the present
> array library in Platform is considered horrendous, the suggested
> version (Data.Vector) can't parallelize operations over boxed arrays
> and the repa one (which actually does boxed arrays) doesn't work with
> any stable build as of today.
> 
> I only need
> -> very easy parallelization
> -> map/filter type operations
> -> support for matrices
> 
> Any help would be much appreciated.

The HEAD version of Repa [1] works with 7.0.2, but caveat emptor. It also only 
works with primitive types like Int, Float etc, and Tuples of them -- though 
that can be fixed. There is some latent support for parallel filter operations, 
but it's not finished.  I'll be able to do a proper release for 7.0.2 after the 
ICFP deadline. 

Ben.

[1] http://code.ouroborus.net/repa/








------------------------------

Message: 7
Date: Fri, 11 Mar 2011 00:47:59 -0500
From: Alex Rozenshteyn <rpglove...@gmail.com>
Subject: [Haskell-beginners] Is this an appropriate use of the writer
        monad?
To: Haskell Beginners <beginners@haskell.org>
Message-ID:
        <aanlktinurah_q1h1tqhtka+cifz3wnw7fjpu79e__...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I need to (for class) write a minimax implementation.

I'm currently doing this by functionally defining the entire tree and later
pruning it down to the size I want.

My assignment requires that I output the number of nodes I evaluated.  I am
considering wrapping the tree generation with the Writer monad (I'm not yet
certain how I'd do this).

Does this sound reasonable to you haskellers who know more than I?  Would
anyone suggest a better way?

-- 
          Alex R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110311/2ec63a15/attachment-0001.htm>

------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 33, Issue 12
*****************************************

Reply via email to