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:  About ! before a type signature (Bob Ippolito)
   2. Re:  About ! before a type signature (Xiaojun Phil Hu)
   3. Re:  About ! before a type signature (Kim-Ee Yeoh)
   4.   Most important Functional Methods (Richard Seldon)
   5. Re:  About ! before a type signature (Bob Ippolito)


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

Message: 1
Date: Fri, 6 Jun 2014 06:05:42 -0700
From: Bob Ippolito <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] About ! before a type signature
Message-ID:
        <CACwMPm8DeFSZcxyHjjrtyVe3y47kvVQkk=g0mpjqkxkahig...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

That declares those fields to be strict. See also
http://www.haskell.org/haskellwiki/Performance/Data_types

On Friday, June 6, 2014, Song Zhang <[email protected]> wrote:

> This is about syntax of Haskell.
> I am reading the source code of Yampa. I find that a definition like the
> following
>
> data SF' a b where
>     SFArr   :: !(DTime -> a -> Transition a b) -> !(FunDesc a b) -> SF' a b
>
>
> in Yampa.hs.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140606/89745e72/attachment-0001.html>

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

Message: 2
Date: Sat, 7 Jun 2014 12:14:40 +0800
From: Xiaojun "Phil" Hu <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] About ! before a type signature
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

I?m just curious, but is there any practical guide or tutorial on this topic? I 
found it relatively hard to reason about the time complexity of Haskell 
programs.

?  
Xiaojun "Phil (http://cnphil.com/)" Hu


On Friday, 6 June, 2014 at 21:05, Bob Ippolito wrote:

> That declares those fields to be strict. See also 
> http://www.haskell.org/haskellwiki/Performance/Data_types
>  
> On Friday, June 6, 2014, Song Zhang <[email protected] 
> (mailto:[email protected])> wrote:
> > This is about syntax of Haskell.
> > I am reading the source code of Yampa. I find that a definition like the 
> > following
> >  
> > data SF' a b where
> >     SFArr   :: !(DTime -> a -> Transition a b) -> !(FunDesc a b) -> SF' a b
> >  
> >  
> >  
> > in Yampa.hs.
> _______________________________________________
> Beginners mailing list
> [email protected] (mailto:[email protected])
> http://www.haskell.org/mailman/listinfo/beginners
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140607/21a537b3/attachment-0001.html>

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

Message: 3
Date: Sat, 7 Jun 2014 12:15:07 +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] About ! before a type signature
Message-ID:
        <capy+zdqjtsvry7bccgxnw88xoab9kcm9oxyyqsmovp+o7ws...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Sat, Jun 7, 2014 at 11:14 AM, Xiaojun "Phil" Hu <[email protected]> wrote:

> I found it relatively hard to reason about the time complexity of Haskell
> programs.


Is that the question you really want to ask?

If it is, the answer is trivial: if it's O(f(n)) time in other languages,
it's also O(f(n)) time in Haskell. (Note: space is a different story.)

But what typically people want to know is: why is my program so slow?

You wonder about the constants covered up by Big-Oh.

And so you're going to have to get acquainted with

0) lambda calculus
1) graph reduction,
2) the G-machine, and
3) the spineless-tagless variant thereof.

You're also going to have to learn to read Core and understand some of the
higher order core-to-core optimizations that GHC performs.


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

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

Message: 4
Date: Sat, 7 Jun 2014 14:21:25 +0900
From: Richard Seldon <[email protected]>
To: [email protected]
Subject: [Haskell-beginners]  Most important Functional Methods
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

Hello,

I have a general question, not specific to Haskell although I am learning 
Haskell as I ask this question..

Please can someone provide consensus on the most important functional methods 
in their view.

I read somewhere that having map, reduce, filter, mergeAll, and zip pretty much 
means everything else can be derived.

Further, what I specifically want to know is whether flatMap should be included 
as an implementation in a functional library, or whether it should be excluded 
because it is derivable using ?building block? functions.

Hope this makes sense.

In languages like JS, there is a lot of resistance to include flatMap in 
prominent libraries such as underscore and lodash.

Am curious to know what the Haskell community view is here, or whether in this 
community too opinions are widely divided.

Alternatives I have seen are:

1). Chaining functions together chain(map(), map()
2). Using reduce()  - which seems so versatile like a for loop for anything if 
really want
3). Using flatten(), or chaining pluck and flatten
4). Using map flatten compact  - this gets rid of null, undefined etc in a 
language like JS too

Recently, Reactive extensions have got really popular and it seems increasingly 
that flatMap is ideal for these situations.

Would welcome some general advice and thoughts. If this is off-topic of course, 
then sorry to have caused any inconvenience.
My thoughts are that the Haskell community have the necessary experience 
regarding functional programming in general to offer opinion.

Best regards,




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

Message: 5
Date: Fri, 6 Jun 2014 23:52:25 -0700
From: Bob Ippolito <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] About ! before a type signature
Message-ID:
        <cacwmpm8yqhubt6xsm+advyjkfwt3huhysypcbr30dnpyvtt...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I really like the explanation of Haskell's non-strict evaluation from
Parallel and Concurrent Programming in Haskell, reading this chapter will
probably be sufficient and much easier than studying all of GHC's
implementation details:
http://chimera.labs.oreilly.com/books/1230000000929/ch02.html#sec_par-eval-whnf



On Fri, Jun 6, 2014 at 10:15 PM, Kim-Ee Yeoh <[email protected]> wrote:

>
> On Sat, Jun 7, 2014 at 11:14 AM, Xiaojun "Phil" Hu <[email protected]>
> wrote:
>
>> I found it relatively hard to reason about the time complexity of Haskell
>> programs.
>
>
> Is that the question you really want to ask?
>
> If it is, the answer is trivial: if it's O(f(n)) time in other languages,
> it's also O(f(n)) time in Haskell. (Note: space is a different story.)
>
> But what typically people want to know is: why is my program so slow?
>
> You wonder about the constants covered up by Big-Oh.
>
> And so you're going to have to get acquainted with
>
> 0) lambda calculus
> 1) graph reduction,
> 2) the G-machine, and
> 3) the spineless-tagless variant thereof.
>
> You're also going to have to learn to read Core and understand some of the
> higher order core-to-core optimizations that GHC performs.
>
>
> -- 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/20140606/7e9defa9/attachment-0001.html>

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

Subject: Digest Footer

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


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

End of Beginners Digest, Vol 72, Issue 5
****************************************

Reply via email to