TurtleGraphics

amd6502

Senior member
Apr 21, 2017
971
360
136
I have very fond memories of turtle graphics.

https://en.wikipedia.org/wiki/Turtle_graphics

I've recently been hoping to pick up one of the newer elegant languages, with Julia being high up in the list to consider (Scala in 2nd place). However, one the biggest shortcoming in this seeming like a good fit for me might be what seems to be a lack of graphics and simple IO + UI.

Simple graphics and non-text based UI should come standard in an ideal language in my opinion. It's very important. Ideally one should be able to write a simple demo like Pong in under an hour.

Well, I am excited to have made this find for Julia:

https://juliagraphics.github.io/Luxor.jl/latest/turtle.html
 

Cogman

Lifer
Sep 19, 2000
10,277
125
106
What are you trying to accomplish? Why do Julia and Scala rank high on your list of "elegance"?
 

amd6502

Senior member
Apr 21, 2017
971
360
136
What are you trying to accomplish? Why do Julia and Scala rank high on your list of "elegance"?

I need basic graphics and prefferrably simple and basic non-text based UI functions.

Text based output is often almost useless to me. Visualization is a pretty common need.

Java has done a decent job at providing both, and it's also like a more elegant (in its OO implementation) version of C++; however, it's so incredibly verbose. The graphics and UI programming is kind of meh; very verbose, not the easiest to pick up nor a charm to program, but at least it exists and is standard and manageable.

I think Scala seems to have features borrowed from matlab/octave, where three lines replace a page of code (or pages, if you have to rewrite or hunt around for hours what comes standard in octave).

Scala should interface well with Java; but if Julia has graphics and UI that is even simpler than Java, maybe it' worth considering it.
 

amd6502

Senior member
Apr 21, 2017
971
360
136
For anyone interested, Julia is now at version 1.0!! ( debian still shows 0.3-2-2 in their repo! So download 1.0 and simply move the contents into /usr/ )

After testing julia command line and playing around with it a tiny bit, the first thing you should probably do is run "import Pkg" in the interpreter.
Julia-starting.jpg
Otherwise you will have real problems; I had a rough time with the documentation. But it seems good now. Then you run Pkg.add("Luxor") to install Luxor, and you should be able to hop right into the tutorial https://juliagraphics.github.io/Luxor.jl/latest/turtle.html


And there is a course you can enroll in too that's starting.

https://www.coursera.org/learn/julia-programming