Back

Turtletoy

317 points2 monthsturtletoy.net
susam2 months ago

A few years ago, I wrote an esoteric, minimalistic turtle graphics language called CFRS[]: <https://susam.net/cfrs.html>.

This was an exercise in making a turtle graphics language that is as minimal as possible. It is closer to Brainfsck than JavaScript and it is not Turing complete, by design.

To see some demos, go to <https://susam.github.io/cfrs/demo.html>.

iberator2 months ago

Interesting project. I guess you know Forth as well? :)

susam2 months ago

Yes, I do! <https://github.com/susam/may4>

I have a Forth-inspired, esoteric, stack-based, postfix, colouring language too: <https://susam.net/fxyt.html>

Demos: <https://susam.github.io/fxyt/demo.html>

markknol2 months ago

computer goes [[[[BRRRRRRRRRR]]]]

Duanemclemore2 months ago

When I was seven I wrote a LOGO program on our school's Apple IIe to tile the (green monochrome) monitor with hexagons. It's all been downhill since.

zucked2 months ago

Was this with the little turle as your cursor? Seeing the "older" kids who could manipulate that program/language to make stopmotion movies might have been the moment that set me on the path of "technology enthusiast" for the rest of my life. The scene of the dimmed computer lab with a whole group gathered around someone's monitor to watch the newest creation is forever etched in my memory.

Duanemclemore2 months ago

It was! I even remember it was Terrapin LOGO - which amazingly seems to still be around. [0]

None of us ever made anything as good as a stop-motion. It didn't even occur to me to do anything that cool. But I was obsessed with geometry and patterns, and benefit from a group of us being allowed up into the middle school to use the computer at lunchtime recess.

When I was older and got official "Enrichment" classes after school I tackled the same pattern and figured out how to do it with a minimum of repeated line segments. I also figured I might as well do triangular and square tilings. But those were boring, as there isn't a repeated edge problem to solve.

[0] https://www.terrapinlogo.com/

cwmoore2 months ago

I made a “circle” but you could see the pixels. I can’t see the pixels anymore.

JSR_FDED2 months ago

The glory days of hi-res graphics… 280x160 pixels!

Duanemclemore2 months ago

This is what we've lost. ;)

SequoiaHope2 months ago

That’s really cool! In adulthood I’ve learned about Seymour Papert and LOGO but I was never exposed to it when I was young. We did have early 90’s Macs in grade school.

Duanemclemore2 months ago

Yeah, it was fun. I had no idea the theory at the time, but Papert et al were definitely on to something.

WillAdams2 months ago

This is a fun sort of project --- couldn't resist knocking out an implementation for OpenPythonSCAD:

https://github.com/WillAdams/gcodepreview/blob/main/tdmt.py

https://github.com/WillAdams/gcodepreview/blob/main/threeDmo...

(and yes, the full name (3-Dimension Model Turtle) does have the same number of syllables as a certain for letter franchise staring beings named for a certain quartet named after Italian Renaissance artists)

wffurr2 months ago

Three dimensional model turtle doo dah, doo dah.

zkmon2 months ago

It's a weird feeling. I'm starting to loathe the very art I used to admire and spend lot of hours to create. It's like the Gulliver story where people were fed with lots of tasty food, by the monster.

markknol2 months ago

Such a nice project!! I made several turtles too, check https://turtletoy.net/user/markknol

jalk2 months ago

I stumbled over your string art turtle some time ago and like one of the commenters on [1], I was wondering about your tool to create points from a image

[1] https://turtletoy.net/turtle/dd4c8beb92

markknol2 months ago

Thanks! If you wanna do more, i wrote a bit about it on x/twitter, recently 3d printed an object to actually test such string art. if you have specific questions, happy to answer ofc! https://x.com/mknol/status/1993708617586077928

cwmoore2 months ago

Nice collection, lots of variety. For "Fake Hyperbolic Plane..." [1] I can suggest looking up the Method of Apollonius, in order to make the circles all touch without overlapping or gaps.

[1] https://turtletoy.net/turtle/0975488621

mangodrunk2 months ago

These are great, thanks for sharing. Are there any resources you recommend for this? I have come across the book Turtle Geometry but haven’t read it.

matsemann2 months ago

Similar: https://www.dwitter.net/

Where you get 140 characters to draw using code. (Similar as in the resulting pictures reminded me of dwitter)

_kb2 months ago

https://tixy.land/ is another where the constraints encourage creativity. A lot of these tools are a little like tiny demoscene.

teruakohatu2 months ago

That is really interesting. Pity half of them use a "eval(unescape(escape(x)).replace(/u../g,'')))" with a compressor and decoder function.

cryptonector2 months ago

LOGO lives!

Sateeshm2 months ago

LOGO was my first interaction with a computer back in 1996. We had to write one program in LOGO in our computer class and we were allowed to play one of the following three games for rest of the period: Dangerous Dave, Paratrooper, or Prince of Persia.

baumschubser2 months ago

I got an Amstrad PCW handed down to me from my dad as my first PC around the same time.

Booted always with disk 1 and that was Locoscript and learned typing on that thing.

When I discovered there is a second disk that boots you in some dark and hidden alternative mode (read: CP/M) I felt like a hacker.

Hidden inside this cave was the only program the manual mentioned in this section: Logo! I did not know that my PC could display anything except characters and it was. so. amazing. to see self-drawn lines on that thing.

aitchnyu2 months ago

Did we both study in Greets, Kochi?

We learned the same lessons for the parts of CPU, computer generations, Babbage and co for 5 years. Our lab exams was more means than ends, so `pir*2` will carry more marks than `3.14r*r`.

namanyayg2 months ago

LOGO and Dangerous Dave were my childhood. I never was able to complete DAVE :(

(This was around 2005 for me!)

empressplay2 months ago

To be fair, turtle graphics is not itself Logo, Logo was originally designed for text manipulation (because all schools had at that time were teletype terminals). Then came the idea of a physical turtle robot, then the graphical turtle when schools got computers with CRT displays.

My partner and I do maintain a complete (and extended) Logo interpreter however, so yes it really does live. Somewhat :)

cryptonector2 months ago

The LOGO I got to use when I was 12 was practically a micro-Lisp with turtle graphics. JavaScript is a sort of a Lisp. Thus "LOGO lives" seems appropriate to me :)

cryptonector2 months ago

> My partner and I do maintain a complete (and extended) Logo interpreter however, so yes it really does live. Somewhat :)

That's very cool!

russellbeattie2 months ago

I want to preface this by noting that as an adult, I totally understand the intent behind LOGO, its use as an educational tool, and understand its historic place in computer history.

But as a pre-teen kid in the early 80s? I hated LOGO! I thought it was a baby language and I wanted to get back to doing cool stuff in BASIC. Ten year old Me thought LOGO was soooo dumb - you couldn't make a video game, so what use was it?

It seemed every year we'd have a grade school class using LOGO - for a math lesson, or an art project, or an "intro to computing", etc. I was always a classic 80s young computer nerd snob about it.

potato37328422 months ago

We did LOGO then some sort of watered down BASIC. Both were incredibly useless to my education because at no point was any serious attempt ever made to teach that these were the tip of any sort of computer programming iceberg. We were simply given lessons and assignments and told to things and we just did them without understanding what we were doing. At least with math they had some example applications for everything they taught us.

I have less than zero nostalgia for either.

cryptonector2 months ago

You could peek and poke with LOGO... At least the one I used.

btbuildem2 months ago

This is so neat. I quite like this one: https://turtletoy.net/turtle/782a9f5329

cubefox2 months ago

This is what "computer art" and "generative art" meant for decades: relatively short programs generating interesting pictures. Today's text-to-image models are quite different from that.

(But I think even for diffusion models, interesting pictures that come from very short or unspecific prompts are more in the spirit of classic generative art, as they don't try to describe specific details explicitly.)

iberator2 months ago

No screenshots?!

Not clear nor simple. Imo negligible use for teaching. If you know how to import modules and use library functions then you don't need LOGO anymore...

'KEYWORD(50)'

is always simpler than:

' turtle.function(value, value)'

Great project but missed the opportunity to develop your own LOGO interpreter from scratch in web assembly:)

empressplay2 months ago

> Great project but missed the opportunity to develop your own LOGO interpreter from scratch in web assembly:)

There is one! We wrote it in Golang and compiled it to WebAssembly, it's a greatly extended version of Apple Logo ][:

https://turtlespaces.org

markknol2 months ago

turtlespaces seemss ded

markknol2 months ago

It's build with JavaScript which is pretty common, makes it pretty accessible. Syntax is pretty easy to learn https://turtletoy.net/syntax

csmoak2 months ago

turtletoy was made back around 2018 before web assembly was generally available.

andoando2 months ago

This is really cool. Ive been thinking a lot about how to make a Turing complete visual language.

antris2 months ago

I wish you could export these in higher res and 16:9, would make good background images

SequoiaHope2 months ago

Yes there’s one I’d like to print out. There must be some way to render this at higher res. Does anyone know?

throwaway20462 months ago

Click on the drawing that you like on the website, then click the download button and choose "Export as SVG". You can then open the SVG file in Inkscape and render as PNG/JPG at any resolution you want. Let me know if you need help.

SequoiaHope2 months ago

That’s great thank you! I missed that option.

csmoak2 months ago

you can download each as an SVG and then render it out at any resolution using something like inkscape

empressplay2 months ago

Great stuff, kind of like the turtle graphics library for p5.js.

If you want to create much fancier graphics (and games!) in actual Logo, check out turtleSpaces:

https://turtlespaces.org

markknol2 months ago

turtlespaces seems dead

01HNNWZ0MV43FF2 months ago

Can't I slow down the drawing to watch it work?

markknol2 months ago

you actually can but it is a workaround: You can export as gif, then it'll draw slowly

csmoak2 months ago

i made some art on this site years ago. some people used this to make plottable art. plotting it is definitely a slower way to watch it work through a drawing :)

busterarm2 months ago

LOGO on Apple IIs was my very first experience with programming. Seeing this puts a huge smile on my face.

bibimsz2 months ago

[flagged]

avhon12 months ago

Writing an infinite "hello world!" loop on an Atari 800XL was my first programming experience... in the mid-2000s.

busterarm2 months ago

I mean, I did start in the late 80s...but since I can't reply to the flagged comment I'll do so here.

I still feel pretty good. I'm still squatting 2.5x my bodyweight and not slowing down in the gym yet.

+1
bibimsz2 months ago
scientist43972 months ago

I can say, I didn't do so beautiful pictures back in the 80's in my French School

Sabr02 months ago

HAHA it brings back memories!

the-mitr2 months ago