

Expressing L-systems in Rust - mseri
http://unconj.ca/blog/expressing-l-systems-in-rust.html

======
btown
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't be able to mutate their environment (they should be
pure functions). Great library, and a good introduction to how Rust's typing
can make algorithm implementations a pleasure to read in code!

EDIT: Links for the curious:
[https://github.com/atheriel/lsystem/pull/2](https://github.com/atheriel/lsystem/pull/2)
[https://github.com/atheriel/lsystem/pull/3](https://github.com/atheriel/lsystem/pull/3)

------
xixixao
> I didn’t really want to write any graphics code, so here’s a way to cheat:

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?

~~~
mseri
Things are moving fast. I'm not sure what you need specifically, but
piston[1,2] is probably what to look at and maybe more specifically image[3]
or conrod[4]

[1]:[http://www.piston.rs](http://www.piston.rs)
[2]:[http://www.reddit.com/r/rust/comments/28srso/piston_game_eng...](http://www.reddit.com/r/rust/comments/28srso/piston_game_engine_notice_on_progress/)
[3]:[https://github.com/PistonDevelopers/image](https://github.com/PistonDevelopers/image)
[4]:[http://blog.piston.rs/2014/08/30/conrod-
update/](http://blog.piston.rs/2014/08/30/conrod-update/)

~~~
irq-1
If you try the piston getting started example on Windows (the spinning
square), change the freetype name to "libfreetype.a" and put it in the 1.0
path: C:\Program Files\Rust stable 1.0\bin\rustlib\x86_64-pc-windows-gnu\lib

Other than that it works.

------
hansjorg
Very cool, L-systems are fascinating.

As an apropos, there was actually released a Rust implementation of Turtle
graphics recently:

[https://github.com/Kingdread/Rurtle](https://github.com/Kingdread/Rurtle)

