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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ruby Poetry

71 点作者 andrewmcdonough超过 13 年前

4 条评论

abecedarius超过 13 年前
Nice little hack. My favorite find of that sort came from a verse-finder in Python run over the text of The Lord of the Rings -- it was looking for <i>scansion</i>, not rhyme -- i.e., blank verse like Paradise Lost:<p><pre><code> One turned to stone. A brief vision he had Of swirling cloud, and in the midst of it Towers and battlements, tall as hills, Founded upon a mighty mountain-throne Above immeasurable pits; great courts And dungeons, eyeless prisons sheer as cliffs, And gaping gates of steel and adamant: And then all passed. </code></pre> I suppose it's not a coincidence the longest passage the program found came at the climactic moment of the story.
pathdependent超过 13 年前
This is off topic, but the code highlighting with slight background noise seems like a good idea in general. Has anyone tried this in their editor of choice?
kijin超过 13 年前
Clicked expecting a poem that is also valid Ruby, like what people used to do with Perl. Was somewhat disappointed, but LOL'd at the Eurozone Bailout poem.
评论 #3631021 未加载
judofyr超过 13 年前
See also Haiku.rb: <a href="http://timelessrepo.com/haiku" rel="nofollow">http://timelessrepo.com/haiku</a>