From: Aaron Bohannon <bohannon@seas.upenn.edu>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: Richard Jones <rich@annexia.org>, OCaml List <caml-list@inria.fr>
Subject: Re: more on frp (was Re: [Caml-list] Re: Recursion on React.events)
Date: Thu, 10 Dec 2009 00:01:30 -0500 [thread overview]
Message-ID: <c413fcb70912092101u20884069o9807929cfde84519@mail.gmail.com> (raw)
In-Reply-To: <91a3da520912092016g58f320as79561ae722b3fb61@mail.gmail.com>
On Wed, Dec 9, 2009 at 11:16 PM, Daniel Bünzli
<daniel.buenzli@erratique.ch> wrote:
>> Your example perfectly illustrates what makes understanding FRP hard:
>> when I type the string "programming", should I expect to get a signal
>> with a value of "programming" or "programing"?
>
> Note, you don't get any signal here, we are talking about an _event_.
> So the sequence of event occurences you will see is 'p', 'r', 'o',
> 'g', 'r', 'a', 'm', 'm', 'i', 'n', 'g'. Now if you fold over these
> occurences as I suggested to make a string signal, the sequence of
> changes in the signal you will see is "", "p", "pr", "pro", "prog",
> "progr", "progra", "program", "programm", "programmi", "programmin",
> "programming" (you could have chosen a shorter word, that was painful
> to write).
I apologize. I read your message too quickly and thought that you
were using "last_keysym" to define "istr". (And I chose the word
because it was part of "FRP". :)
> So the function time -> 'a option returns a value if there's an
> occurence of the event at that time (e.g. if the
> user pressed a key at that time) and None otherwise.
Yes, (I think) I did understand what the type "time -> 'a option" was
trying to represent. It just doesn't seem a very good match for the
concept. It would appear (from the type) that events could have
nonzero duration, but that doesn't match my intuition of events.
- Aaron
next prev parent reply other threads:[~2009-12-10 5:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 16:43 Daniel Bünzli
2009-12-09 18:33 ` Aaron Bohannon
2009-12-10 4:16 ` Daniel Bünzli
2009-12-10 5:01 ` Aaron Bohannon [this message]
2009-12-12 15:04 ` Rich Neswold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c413fcb70912092101u20884069o9807929cfde84519@mail.gmail.com \
--to=bohannon@seas.upenn.edu \
--cc=caml-list@inria.fr \
--cc=daniel.buenzli@erratique.ch \
--cc=rich@annexia.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).