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: Addable function combinators (Brent Yorgey)
2. Re: What should I use (the equivalent of Windows schtasks)
to schedule a task to run? (Hong Yang)
3. Re: hiding documentation for non-exposed modules (Dave Bayer)
4. Addable function combinators (Edgar Klerks)
5. Addable function combinators (Edgar Klerks)
6. (->) instance for ArrowApply and laziness (aditya siram)
----------------------------------------------------------------------
Message: 1
Date: Tue, 30 Mar 2010 18:59:36 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Addable function combinators
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Edgar,
I am not sure what you are asking. What do you mean "to make the
stars addable"?
-Brent
On Mon, Mar 29, 2010 at 02:04:54AM +0200, edgar klerks wrote:
> He All,
>
> I was toying a bit around and found a function, which combines an function
> of arity 1 with 2.
> Then I produced a whole sequence of these function, the number of * stands
> for the arity of the left function and the number of | stands for arity the
> right function. so <*|||> :: (b -> c -> d) -> (a -> c) -> a -> b -> d:
>
> (<*****|>) = flip (<*|||||>)
> (<****|>) = flip (<*||||>)
> (<***|>) = flip (<*|||>)
> (<**|>) = flip (<*||>)
> (<*|>) = (.)
> (<*||>) = (<*|>).(<*|>)
> (<*|||>) =(<*||>).(<*|>)
> (<*||||>) = (<*||>).(<*||>)
> (<*|||||>) = (<*||||>).(<*|>)
>
> con = (flip.) .(.)
> (<**||>) = (<*||>).flip
> (<**|||>) = (<*|>).(<**||>)
> (<**||||>) = (<*|>).(<**|||>)
> (<***||>) = (<*||>).(con flip)
> (<***|||>) = (<*|>).(<***||>)
> (<****||>) = (<*||>).(con.con $ flip)
>
> I found it interesting, but now I am stuck. is it possible to make the stars
> addable instead of the | or both?
>
> Greets,
>
> Edgar
> Edgar
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
------------------------------
Message: 2
Date: Tue, 30 Mar 2010 18:13:23 -0500
From: Hong Yang <[email protected]>
Subject: Re: [Haskell-beginners] What should I use (the equivalent of
Windows schtasks) to schedule a task to run?
To: Brent Yorgey <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="utf-8"
Hi Brent,
Thanks for your reply.
I asked for an example, because I thought I needed to use
Control.Monad.Event and I did not go to Monads in my learning yet (you only
have so much time left having a full time job and a little boy:)). Since
Control.Monad.Event is not what I want, do not bother with the example.
Hong
On Tue, Mar 30, 2010 at 5:38 PM, Brent Yorgey <[email protected]>wrote:
> On Fri, Mar 26, 2010 at 11:29:42PM -0500, Hong Yang wrote:
> > I searched "schedul" on hayoo!, but had no clue. It seems that I can use
> > scheduleEventAt from Control.Monad.Event.Classes. But what is type "e"?
> It
> > seems like an event. How do I define an event?
>
> I don't think that's what you want; Control.Monad.Event appears to be
> for doing event-driven simulations, not for scheduling actual tasks on
> your OS. I am not sure how to do this but presumably there would have
> to be a library with bindings to the OS's underlying calls.
>
> > I have not learned Monad yet. Can some one give me a simple example?
> Suppose
> > I want to run an external program "pg" which in Haskell's language has
> the
> > type of String -> IO ().
>
> Can you be more specific? A "simple example of monads" is rather
> vague; monads are used for quite a lot of things. Have you read any
> particular books or tutorials?
>
> -Brent
> _______________________________________________
> 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/20100330/ab708a37/attachment-0001.html
------------------------------
Message: 3
Date: Wed, 31 Mar 2010 07:32:39 -0400
From: Dave Bayer <[email protected]>
Subject: Re: [Haskell-beginners] hiding documentation for non-exposed
modules
To: Ashish Agarwal <[email protected]>
Cc: Haskell-beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Mar 30, 2010, at 2:55 PM, Ashish Agarwal wrote:
> However, the haddock generated documentation includes even the non-exposed
> modules, which is not what I want since end-users should not see these.
And why do you feel that way?
Some of us are old enough to remember the "glass walls, men in white coats" era
of computing. Shouldn't Haskell be a language where everyone gets to see
everything?
Put this differently, coming from any language with an order of magnitude more
users and a careful vetting process for libraries, it can sure seem at first
like Hackage is a hippy co-op where any anyone can put food up on the shelves.
(Actually, that is the case!)
Going out of your way to make it easy to see your beautiful code can help set
people at ease, assuring them that they don't have to rely just on "standard
packages" and their own code.
------------------------------
Message: 4
Date: Wed, 31 Mar 2010 17:53:55 +0200
From: Edgar Klerks <[email protected]>
Subject: [Haskell-beginners] Addable function combinators
To: [email protected]
Message-ID: <20100331175355.7d6c1...@hollaholla>
Content-Type: text/plain; charset=US-ASCII
Hi Brent,
I already solved it myself. I wanted to find an systematic way to
produce composition operators which composes functions with different
arity together. I stated it a bit vague. For example <*||> is (c -> d)
-> (a -> b -> c) -> a -> b -> d
I can add this types with the composition operator to create a new
operator which combines functions with different arity. In this case a
function with arity 1 with a function with arity 4:
<*||>.<*||> = <*||||>
But I couldn't find an systematic way to level the arity of the function
on the left side. I wanted to find an operator what did this, like so:
<*|> `op` <*|> = <**|>
But I found another way already, which can be found in the followup. So
I guess this question is closed. But thanks anyway for your response. I
really appreciate the way the people on this list react to new
haskellers. Your are really helpful, which sometimes on other lists is
quitte the oposite.
Greets,
Edgar
------------------------------
Message: 5
Date: Wed, 31 Mar 2010 18:00:29 +0200
From: Edgar Klerks <[email protected]>
Subject: [Haskell-beginners] Addable function combinators
To: [email protected]
Message-ID: <20100331180029.39e74...@hollaholla>
Content-Type: text/plain; charset=US-ASCII
(I am sorry for the spam, but my browser seems to chopoff the reply-to
field. I have changed mailclient so I can manually add it. Hopefully
the issue is resolved)
Hi Brent,
I already solved it myself. I wanted to find an systematic way to
produce composition operators which composes functions with different
arity together. I stated it a bit vague. For example <*||> is (c -> d)
-> (a -> b -> c) -> a -> b -> d
I can add this types with the composition operator to create a new
operator which combines functions with different arity. In this case a
function with arity 1 with a function with arity 4:
<*||>.<*||> = <*||||>
But I couldn't find an systematic way to level the arity of the function
on the left side. I wanted to find an operator what did this, like so:
<*|> `op` <*|> = <**|>
But I found another way already, which can be found in the followup. So
I guess this question is closed. But thanks anyway for your response. I
really appreciate the way the people on this list react to new
haskellers. Your are really helpful, which sometimes on other lists is
quitte the oposite.
Greets,
Edgar
------------------------------
Message: 6
Date: Thu, 1 Apr 2010 09:32:44 -0500
From: aditya siram <[email protected]>
Subject: [Haskell-beginners] (->) instance for ArrowApply and laziness
To: beginners <[email protected]>
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Hi all,
Could someone help me understand how the (->) instance for ArrowApply
works? It looks like this:
> instance ArrowLoop (->) where
> loop f b = let (c,d) = f (b,d) in c
This models recursion for arrows and I need help understanding how it
does that. I have a strong feeling it has to do with the magic value
'd'. I've read the Patterson tutorial but I still don't grok it.
Thanks!
-deech
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 22, Issue 1
****************************************