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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Bach's prelude in C major written in sed

88 点作者 vitaut大约 5 年前

9 条评论

notkaiho大约 5 年前
I, uh, applaud the sheer chutzpah and will that would go into making something like this.<p>Only after the piece finishes in full, not in between movements, of course.
sramsay大约 5 年前
I love showing students sed, and then teaching them regular expressions, then showing them sed again, and then showing them stuff like this. sedtris is another fun example:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;uuner&#x2F;sedtris" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;uuner&#x2F;sedtris</a>
fortran77大约 5 年前
Not quite. This piece has three voices. There are two half notes in each measure, that start on beats 1 and 3, and there is a dotted eight tied to a quarter note that starts on beats 1+1&#x2F;16th and 3+1&#x2F;16th<p>See: <a href="https:&#x2F;&#x2F;www.pianoshelf.com&#x2F;sheetmusic&#x2F;728&#x2F;bach-bwv-846---wtc,-book-1--prelude-and-fugue-no.-1-728" rel="nofollow">https:&#x2F;&#x2F;www.pianoshelf.com&#x2F;sheetmusic&#x2F;728&#x2F;bach-bwv-846---wtc...</a>
评论 #22578934 未加载
andrei-mircea大约 5 年前
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=jyNqHsN3pEc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=jyNqHsN3pEc</a>
评论 #22585205 未加载
LessDmesg大约 5 年前
My compiler only supports C11, how do you compile C major?
评论 #22578141 未加载
del_operator大约 5 年前
Oh, wow. Is it common that Bach Prelude refers to Well Tempered Clavier or was I just biased by my obsession with Gould and his WTC book 1 prelude?
评论 #22578523 未加载
Wowfunhappy大约 5 年前
Can this be made to work with OS X’s built-in SED? I’m getting:<p><pre><code> sed: 34: bach.sed: RE error: invalid repetition count(s)</code></pre>
评论 #22585084 未加载
codr7大约 5 年前
I initially read that as &quot;Bash&#x27;s prelude in C&quot;, which still makes more sense to me.
ShorsHammer大约 5 年前
24 SLOC. Beautiful.