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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Expressing L-systems in Rust

59 点作者 mseri将近 10 年前

3 条评论

btown将近 10 年前
Just sent a couple of pull requests to make this run on stable Rust 1.0.0 (using swaps instead of the unstable drain feature), and to clarify that production rules shouldn&#x27;t be able to mutate their environment (they should be pure functions). Great library, and a good introduction to how Rust&#x27;s typing can make algorithm implementations a pleasure to read in code!<p>EDIT: Links for the curious: <a href="https:&#x2F;&#x2F;github.com&#x2F;atheriel&#x2F;lsystem&#x2F;pull&#x2F;2" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;atheriel&#x2F;lsystem&#x2F;pull&#x2F;2</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;atheriel&#x2F;lsystem&#x2F;pull&#x2F;3" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;atheriel&#x2F;lsystem&#x2F;pull&#x2F;3</a>
xixixao将近 10 年前
&gt; I didn’t really want to write any graphics code, so here’s a way to cheat:<p>I wanted to try out Rust maybe a year ago, was thinking of writing a simple terminal app and found out that there was no way to do simple 2D graphics in Rust. Has the situation changed?
评论 #9675301 未加载
评论 #9675288 未加载
评论 #9675537 未加载
hansjorg将近 10 年前
Very cool, L-systems are fascinating.<p>As an apropos, there was actually released a Rust implementation of Turtle graphics recently:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Kingdread&#x2F;Rurtle" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Kingdread&#x2F;Rurtle</a>