TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Turtletoy

382 pointsby njnover 6 years ago

27 comments

jncratonover 6 years ago
If you like this project, you may be interested in a similar project that I did a while back using using the turtle interpretation of grammars to represent connections between LEGO bricks:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jncraton&#x2F;connectiongrammar" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jncraton&#x2F;connectiongrammar</a><p>The &quot;API&quot; is admittedly quite poor currently, as I just quickly hacked this together on top of NLTK, but I was able to put together some fun results.
评论 #18692381 未加载
评论 #18684133 未加载
rudolfwinestockover 6 years ago
This reminds me of a story of how Logo was implemented on 8-bit microcomputers.<p>Leigh Klotz was the man who ported MIT Logo to the Apple ][ and then the Commodore 64. According to him “The Commodore 64 CPU 6510 has a bidirectional parallel port at location 0 and 1, taking up 2 of the 256 &quot;page zero&quot; locations, which are the only ones you can indirect through. When I ported MIT Logo from the Apple II, there were lots of places that dereferenced nil without checking, and those caused crashes. Commodore gave me a chip they fabbed in qty 12 yield that brought out the I&#x2F;D decide status as a pin, and we used a Nicolet-Paratronica logic analyzer to feed the address and data bus to a Pet running a BASIC disassembler. I could then set a breakpoint in-circuit to see the 256 instructions prior to or after the errant memory access, so I could go put on guard code...”<p>I got it from Jamie Zawinski&#x27;s weblog. Be forewarned. Following the link from Hacker News will lead to an unsavory image. Just copy &amp; paste it, instead.<p><a href="https:&#x2F;&#x2F;www.jwz.org&#x2F;blog&#x2F;2018&#x2F;11&#x2F;weird-machines&#x2F;#comment-192213" rel="nofollow">https:&#x2F;&#x2F;www.jwz.org&#x2F;blog&#x2F;2018&#x2F;11&#x2F;weird-machines&#x2F;#comment-192...</a>
评论 #18686093 未加载
评论 #18687011 未加载
评论 #18687282 未加载
评论 #18687334 未加载
ebcodeover 6 years ago
I&#x27;m seeing some really interesting JavaScript techniques in the turtlevm.js[1] source.<p>This line in particular stands out: const code = String(work).trim().split(&quot;{&quot;).slice(1).join(&quot;{&quot;).slice(0, - 1).trim().replace(&quot;&#x2F;0&#x2F;&quot;, _turtlevmapi).replace(&quot;&#x2F;1&#x2F;&quot;, strCode);<p>It looks like the author is injecting the turtle code written by the user into a &quot;work&quot; function that removes dangerous objects (XMLHttpRequest, WebSocket, etc).<p>Can someone with experience writing a VM in JS point to a good reference on the topic?<p>[1]<a href="https:&#x2F;&#x2F;turtletoy.net&#x2F;js&#x2F;turtlevm.js?v=56" rel="nofollow">https:&#x2F;&#x2F;turtletoy.net&#x2F;js&#x2F;turtlevm.js?v=56</a>
评论 #18685803 未加载
aarondfover 6 years ago
Go to this one [1], change the GEAR_NUM to like 30 and enjoy the rendering<p>1: <a href="https:&#x2F;&#x2F;turtletoy.net&#x2F;turtle&#x2F;9ddc6d4dc5" rel="nofollow">https:&#x2F;&#x2F;turtletoy.net&#x2F;turtle&#x2F;9ddc6d4dc5</a>
评论 #18682724 未加载
评论 #18683180 未加载
azeirahover 6 years ago
Ahhh, love this site. I own an axidraw pen plotter, and because I&#x27;m feeling generous, I&#x27;ll print every sketch made by people in this HN thread.<p>&lt;3
评论 #18682972 未加载
评论 #18687522 未加载
deyanover 6 years ago
Immediately took me back to Logo and 9 year old me trying to figure out how to move the turtle :) Great memories!
guillaumecover 6 years ago
For anyone interested about this kind of things, I did something a bit similar for 3d voxel rendering: <a href="https:&#x2F;&#x2F;voxeltoy.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;voxeltoy.com&#x2F;</a>, also inspired by shadertoy.
antoineMoPaover 6 years ago
I have seen this site some days ago (reddit maybe?) and I really like the concept! The design is very clean!<p>One feature I&#x27;d like: A way to slow down the render so we can see the whole generation in slow-motion.
评论 #18685018 未加载
评论 #18682871 未加载
评论 #18682557 未加载
kayamonover 6 years ago
I am highly impressed that some of these actually implement wireframe hidden surface removal:<p><a href="https:&#x2F;&#x2F;turtletoy.net&#x2F;turtle&#x2F;9ddc6d4dc5" rel="nofollow">https:&#x2F;&#x2F;turtletoy.net&#x2F;turtle&#x2F;9ddc6d4dc5</a>
mrspeakerover 6 years ago
Not really in the true spirit of turtle (if it doesn&#x27;t &quot;go forward&quot; I don&#x27;t count it!), but I had to make this one based on the MAD computer program discussed here yesterday.<p><a href="https:&#x2F;&#x2F;turtletoy.net&#x2F;turtle&#x2F;ba15abdde7" rel="nofollow">https:&#x2F;&#x2F;turtletoy.net&#x2F;turtle&#x2F;ba15abdde7</a>
评论 #18684667 未加载
DBYCZover 6 years ago
This reminded me of a physics toy I saw ~10 years ago where you would draw simple two-dimensional robots with legs and muscles, optimize their gait, and race them.<p>If only I could remember the name of it...
评论 #18682539 未加载
_xgwover 6 years ago
Reminds me of <a href="https:&#x2F;&#x2F;dwitter.net" rel="nofollow">https:&#x2F;&#x2F;dwitter.net</a>: you get 140 characters to animate an HTML canvas.
chimeover 6 years ago
While TurtleToy is way more advanced, few years ago I built a small webapp that uses nested CSS to make recursive images: <a href="https:&#x2F;&#x2F;zetabee.com&#x2F;weave&#x2F;" rel="nofollow">https:&#x2F;&#x2F;zetabee.com&#x2F;weave&#x2F;</a><p>Click [Help] button to get an idea of how it works. It was heavily inspired by Structure Synth but written from scratch to work with CSS3 in a modern browser.
wellyover 6 years ago
This takes me back. I remember learning Logo at school when I was 10 or 11 and had a project to do using Logo. For some reason I couldn&#x27;t make it into school for a few weeks, I&#x27;m not sure if I was ill or something else but was going to miss the project hand in date, so I wrote the code on paper while I was at home as I didn&#x27;t have a Logo compiler or interpreter for my ZX Spectrum. My teacher put my code into the interpreter and it ended up looking exactly as I had expected. I think it was a tank and used procedures&#x2F;functions which was above and beyond what we&#x27;d been taught.<p>Of course Logo wasn&#x27;t the most complex language ever but I remember being pretty pleased with myself having written a computer program on a bit of paper and it doing exactly what I&#x27;d visualised it to do.
评论 #18688853 未加载
ArtWombover 6 years ago
I am so glad this exists. Turtle Graphics remains the best way to teach so many fundamental concepts. From recursion to path finding.<p>One feature that I wish existed was library import. Or community accepted set of extension modules. An easy way to call polar coordinates, Spirographs, matrix transforms, etc.
viachover 6 years ago
Reminds me of Context Free Art <a href="https:&#x2F;&#x2F;www.contextfreeart.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.contextfreeart.org&#x2F;</a><p>They developed their own declarative language for generating art.
agumonkeyover 6 years ago
Some of them are super impressive. Well I mean full fledged 3d renderers
ejo4041over 6 years ago
Is it possible to get vector files of some sort out of these? .SVG, .AI, .PDF, or something similar would be awesome.<p>Edit: I meant directly from the site. I could do it from my desktop using python.<p>PS, this is awesome!
评论 #18682348 未加载
评论 #18682178 未加载
nottwoover 6 years ago
These are great!<p>Also reminds me of the Forth Haiku Salon: <a href="https:&#x2F;&#x2F;forthsalon.appspot.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;forthsalon.appspot.com&#x2F;</a>
etrautmannover 6 years ago
If you&#x27;re into this, you might also be interested in robotic pen plotters. This article from last year kicked off a serious new hobby for me which combines code&#x2F;art&#x2F;robotics&#x2F;etc and has been a ton of fun.<p><a href="http:&#x2F;&#x2F;www.tobiastoft.com&#x2F;posts&#x2F;an-intro-to-pen-plotters" rel="nofollow">http:&#x2F;&#x2F;www.tobiastoft.com&#x2F;posts&#x2F;an-intro-to-pen-plotters</a>
jleskover 6 years ago
If you&#x27;re into this kind of thing, I made a similar Turtle clone with a simpler syntax:<p><a href="http:&#x2F;&#x2F;prismaco.de&#x2F;" rel="nofollow">http:&#x2F;&#x2F;prismaco.de&#x2F;</a><p>But I also like the approach here of using Turtle as a way to introduce JavaScript syntax. :)
neiledover 6 years ago
So many memories of using a physical robot version of this at school. Good times.
babyover 6 years ago
I suggest adding this to the title: &quot;Create your own generative art using a minimalistic Turtle graphics API.&quot;
评论 #18686576 未加载
damckover 6 years ago
I won my first (and only) programming contest in Logo. Fun to see the idea alive.
beaugundersonover 6 years ago
if you want an even more minimalist API you can try out lindenmoji:<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;lindenmoji" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;lindenmoji</a>
sonatasover 6 years ago
Love this site well done. Concept and design is pretty nice.
glitchcover 6 years ago
This is basically Logo in Python. Looks like a good effort.
评论 #18682492 未加载