Send Beginners mailing list submissions to
        [email protected]

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
        [email protected]

You can reach the person managing the list at
        [email protected]

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


Today's Topics:

   1. Re:  How would you write... (Kim-Ee Yeoh)
   2. Re:  How would you write... (Daniel Hlynskyi)
   3. Re:  graphical output? (Daniel Hlynskyi)
   4. Re:  How would you write... (John M. Dlugosz)
   5. Re:  How would you write... (John M. Dlugosz)
   6. Re:  How would you write... (Norbert Melzer)
   7. Re:  How would you write... (David McBride)


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

Message: 1
Date: Tue, 22 Apr 2014 20:58:47 +0700
From: Kim-Ee Yeoh <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How would you write...
Message-ID:
        <CAPY+ZdRwxOgb1PwW4teB3OxgeM5YUCWaSroAE_=u865zxxn...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Tue, Apr 22, 2014 at 3:00 PM, John M. Dlugosz
<[email protected]>wrote:

> chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus 100
> [1..10] ]


What is translate? What is color? What is Circle? What is pappus?

None of this is plain haskell.

John, if you make your readers guess at undefined names, they'll go away
and hangout somewhere friendlier!

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140422/1e3e99ec/attachment-0001.html>

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

Message: 2
Date: Tue, 22 Apr 2014 19:30:31 +0300
From: Daniel Hlynskyi <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How would you write...
Message-ID:
        <canzg+yfx0+aw2cdperq2x+cw2+gs7bzmiptv4bwacjncomg...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- [pappus 100 i
| i <- [1..10]] ]

better

chain1 = [transform $ pappus 100 i | i <- [1..10]]
  where transform (x,y,r) = translate x y $ color red $ Circle r


2014-04-22 16:58 GMT+03:00 Kim-Ee Yeoh <[email protected]>:

>
> On Tue, Apr 22, 2014 at 3:00 PM, John M. Dlugosz <[email protected]
> > wrote:
>
>> chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus 100
>> [1..10] ]
>
>
> What is translate? What is color? What is Circle? What is pappus?
>
> None of this is plain haskell.
>
> John, if you make your readers guess at undefined names, they'll go away
> and hangout somewhere friendlier!
>
> -- Kim-Ee
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140422/bd9b8bb6/attachment-0001.html>

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

Message: 3
Date: Tue, 22 Apr 2014 19:55:19 +0300
From: Daniel Hlynskyi <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] graphical output?
Message-ID:
        <CANZg+yeQ5d6AA9pDK5vY=uhcyughaapjnkcftz8te7qidcs...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

another example for gloss https://github.com/plaimi/bweakfwu
works under windows


2014-04-21 7:11 GMT+03:00 John M. Dlugosz <[email protected]>:

> On 4/20/2014 1:31 AM, Bill Noble wrote:
>
>  (note for some reason I had to install llvm first).
>>
>>  I had already tried that, and ran into the same problem.
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140422/20b0bc2e/attachment-0001.html>

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

Message: 4
Date: Tue, 22 Apr 2014 13:30:15 -0500
From: "John M. Dlugosz" <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] How would you write...
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 4/22/2014 3:47 AM, Frerich Raabe wrote:

>
>    chain1 = [ translate x y $ color red $ Circle r | i <- [1..10], (x,y,r) <- 
> pappus 100 i ]
>
> would be one way to do what you want.
>

Yes, that's along the lines of what I was thinking???the 1..10 needs to be 
bound by itself 
to trigger the looping behavior, but didn't know how to then continue to 
generate (x,y,r). 
  I thought the comma there was followed by a "guard", which constrains which 
values of i 
are taken or skipped.  Ah, you have a <- there too.  Hmm, but normally a second 
<- is 
another iteration that's done first/loops faster.  So what's the syntax here?  
I must be 
getting things mixed up.

?John



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

Message: 5
Date: Tue, 22 Apr 2014 13:37:50 -0500
From: "John M. Dlugosz" <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] How would you write...
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

On 4/22/2014 8:58 AM, Kim-Ee Yeoh wrote:
>
> On Tue, Apr 22, 2014 at 3:00 PM, John M. Dlugosz <[email protected]
> <mailto:[email protected]>> wrote:
>
>     chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus 100 
> [1..10] ]
>
>
> What is translate? What is color? What is Circle? What is pappus?
>
> None of this is plain haskell.
>
> John, if you make your readers guess at undefined names, they'll go away and 
> hangout
> somewhere friendlier!
>
> -- Kim-Ee
>
>


Sorry ? I thought showing a form that did work would be enough.  The important 
part is 
that I have a input = map foo [0..10] and a bar (t1,t2,t3) = baz where baz 
returns a 
tuple, and the result of bar is the guts of another map.

I didn't realize that using real words from a library instead of foo and bar 
was 
considered unfriendly!




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

Message: 6
Date: Tue, 22 Apr 2014 20:45:43 +0200
From: Norbert Melzer <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How would you write...
Message-ID:
        <ca+bcvsvits6a3-rd8zoiacah8yjk9hzv1+jk876n4jiyzjc...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Its considered unfriendly to not give important information. The minimum
information would have been the typesignature of every function you use.
Am 22.04.2014 20:38 schrieb "John M. Dlugosz" <[email protected]>:

> On 4/22/2014 8:58 AM, Kim-Ee Yeoh wrote:
>
>>
>> On Tue, Apr 22, 2014 at 3:00 PM, John M. Dlugosz <
>> [email protected]
>> <mailto:[email protected]>> wrote:
>>
>>     chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus
>> 100 [1..10] ]
>>
>>
>> What is translate? What is color? What is Circle? What is pappus?
>>
>> None of this is plain haskell.
>>
>> John, if you make your readers guess at undefined names, they'll go away
>> and hangout
>> somewhere friendlier!
>>
>> -- Kim-Ee
>>
>>
>>
>
> Sorry ? I thought showing a form that did work would be enough.  The
> important part is that I have a input = map foo [0..10] and a bar
> (t1,t2,t3) = baz where baz returns a tuple, and the result of bar is the
> guts of another map.
>
> I didn't realize that using real words from a library instead of foo and
> bar was considered unfriendly!
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140422/860f8e79/attachment-0001.html>

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

Message: 7
Date: Tue, 22 Apr 2014 14:47:12 -0400
From: David McBride <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How would you write...
Message-ID:
        <CAN+Tr40x6vzFJYO0BkwUNpyH+4YX=tCTCXLQ=w23amlyvpk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

There is nothing wrong with using real functions from a library, but you
never said what library it was or even enough info to guess.  Was it
diagrams?  Gloss?  FOV?  Or something you wrote?

If the library doesn't matter, as it didn't in this case, you can just
specify the types like so

data Color = Color

translate :: Int -> Int -> ()
translate = undefined

color :: Color -> ()
color = undefined

red :: Color
red = undefined

so that at least your snippet compiles for others.



On Tue, Apr 22, 2014 at 2:37 PM, John M. Dlugosz
<[email protected]>wrote:

> On 4/22/2014 8:58 AM, Kim-Ee Yeoh wrote:
>
>>
>> On Tue, Apr 22, 2014 at 3:00 PM, John M. Dlugosz <
>> [email protected]
>> <mailto:[email protected]>> wrote:
>>
>>     chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus
>> 100 [1..10] ]
>>
>>
>> What is translate? What is color? What is Circle? What is pappus?
>>
>> None of this is plain haskell.
>>
>> John, if you make your readers guess at undefined names, they'll go away
>> and hangout
>> somewhere friendlier!
>>
>> -- Kim-Ee
>>
>>
>>
>
> Sorry ? I thought showing a form that did work would be enough.  The
> important part is that I have a input = map foo [0..10] and a bar
> (t1,t2,t3) = baz where baz returns a tuple, and the result of bar is the
> guts of another map.
>
> I didn't realize that using real words from a library instead of foo and
> bar was considered unfriendly!
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140422/9adf2cef/attachment.html>

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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


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

End of Beginners Digest, Vol 70, Issue 44
*****************************************

Reply via email to