tag:blogger.com,1999:blog-10770855.post115094787778326946..comments2024-03-28T03:20:57.393-04:00Comments on The Little Calculist: The prophecy was unclearDave Hermanhttp://www.blogger.com/profile/00405190527081772997noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-10770855.post-1151343966205800852006-06-26T13:46:00.000-04:002006-06-26T13:46:00.000-04:00Except.. how does the "eager" thread signal to the...Except.. how does the "eager" thread signal to the system that "I have some data available, but not all"? Other than imperatively, that is? In other words, if the eager stream simply produces a list, then it won't be available until the <I>whole list</I> is available.<BR/><BR/>I'm not an expert on laziness, but it seems to be an asymmetric thing: it's driven entirely by <I>observation</I>, not computation.Dave Hermanhttps://www.blogger.com/profile/00405190527081772997noreply@blogger.comtag:blogger.com,1999:blog-10770855.post-1151343434402141572006-06-26T13:37:00.000-04:002006-06-26T13:37:00.000-04:00I think I like that even better. Skip the silly im...I think I like that even better. Skip the silly imperative stuff and drop the relationship with generators.<BR/><BR/>At least for my purposes, you're right that yield isn't essential. I suppose at this point the main difference between what I wanted and what PLT Scheme's pipes provide me is the ability to communicate something other than characters between threads.<BR/><BR/>So I believe what I want is "value pipes", where one thread is eagerly creating a stream of values, and another thread is lazily consuming it.<BR/><BR/>When I get a chance I'll implement a library for this.Dave Hermanhttps://www.blogger.com/profile/00405190527081772997noreply@blogger.comtag:blogger.com,1999:blog-10770855.post-1151102106582016182006-06-23T18:35:00.000-04:002006-06-23T18:35:00.000-04:00OK, I think I understand this now. It sounds like ...OK, I think I understand this now. <BR/><BR/>It sounds like the functionality you're getting is quite similar to the idea of UNIX pipes--in particular, the idea of forking off a background process and reading from its standard out.<BR/><BR/>Is the "yield" operation essential? How would it be different if you forked a thread that would yield a stream? Rather than sequentially executing yield statements, you'd be constructing a stream in a pure-functional way. This would give you independence of evaluation order, at least.<BR/><BR/>Just curious about the design space.Anonymousnoreply@blogger.com