TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

An Old Conjecture on Stream Transducers

36 点作者 mr_tyzic将近 7 年前

5 条评论

Cieplak将近 7 年前
Reminds me of a stream-processing library that Michael Snoyman recently started working on:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;snoyberg&#x2F;zerem" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;snoyberg&#x2F;zerem</a><p>For background, he authored Conduit, one of the most popular Haskell stream-processing libraries:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;snoyberg&#x2F;conduit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;snoyberg&#x2F;conduit</a>
评论 #17502046 未加载
mrmyers将近 7 年前
oleg and friends claim to have disproven the &#x27;pick two&#x27; thing. See their &#x27;Stream Fusion, to Completeness&#x27; paper [1], and the associated Strymonas library [2].<p>[1] <a href="https:&#x2F;&#x2F;yanniss.github.io&#x2F;streams-popl17.pdf" rel="nofollow">https:&#x2F;&#x2F;yanniss.github.io&#x2F;streams-popl17.pdf</a><p>[2] <a href="https:&#x2F;&#x2F;strymonas.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;strymonas.github.io&#x2F;</a>
评论 #17502864 未加载
junke将近 7 年前
&gt; This issue would also appear if we forced stream transducers (processing nodes) to output a fixed number of value at each invocation: it suffices to let S repeat each value of X twice, i.e., interleave X with X.<p>I don&#x27;t understand how the issue would appear in that case. Buffering one value seems to be sufficient to upsample S to the &quot;clock&quot; of X, ie. project S to the instants where X is defined (flow Z below) while filling missing instants with the previously known value:<p><pre><code> X : X0 X1 X2 X3 ... S : S0 S1 Z : S0 S0 S1 S1 </code></pre> That would look as follows in Signal:<p><pre><code> process test = (? integer x ! integer y) (| c := not (c$ init false) | s := (x when c) cell c | y := x + s |) where boolean c; integer s; end; </code></pre> C is the clock which alternates between false and true ($ refers to the last value), &quot;X when C&quot; is filtering, &quot;E cell C&quot; is projection of values of E to the instant of C, defaulting to the previous known value at logical instants where E is not present but C is true.<p>The clock calculus in Signal (etc.) is way to assess if a program can be generated to use constant (static) memory allocation and constant time. There are programs which fail to do so, but you then need to refine them to add explicit operations (<a href="https:&#x2F;&#x2F;www.irisa.fr&#x2F;prive&#x2F;talpin&#x2F;papers&#x2F;date08.pdf" rel="nofollow">https:&#x2F;&#x2F;www.irisa.fr&#x2F;prive&#x2F;talpin&#x2F;papers&#x2F;date08.pdf</a>)
评论 #17497687 未加载
phaedrus将近 7 年前
This is interesting because I have (or had) been working on a C++ logic programming library. Many if not most similar libraries are implemented using streams. (See minikanren, LC++, etc.) Naturally as a C++ library I&#x27;m interested in if it can be done without or with a minimum of dynamic allocation, and had come to the conclusion &quot;probably yes, but only if I give up on some subset of the things I wanted it to be able to do.&quot; So I concur with the article&#x27;s opening, &quot;choose 2 of 3.&quot;
carapace将近 7 年前
Can anyone think up a realistic scenario where you might actually have this problem? The example seems awfully contrived.