[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOGO-L> legal/illegal one-liners



Yehuda writes:
 
> BTW, What's wrong with ARC, which isn't allowed to be used in this
> contest. It's a primitive in UCBLOgo and (I think) in MSWLogo.

The rule is:

The one-liner should be reasonably portable. In other
words, the one-liner should use only commands which are
likely to be easily translated into equivalent commands
in common Logo implementations.

I don't care if the equivalent command takes more
words, provided that it is "easy" to do.

For example, these substitutions (MSW -> MicroWorlds)
are easy:
SETPC -> SETC
CS -> HOME CLEAN
SETPENSIZE [2 2]  -> SETPENSIZE 2 

ARC and CIRCLE are not legal, because they might have
very different implementations in different Logos.
(For example: Is the turtle at the center or on the arc?)
Also, several Logos, such as MicroWorlds, do not have
ARC or CIRCLE.

Color is not legal because it may have very different
implementations (RGB or color index? What color is 1?)

FOR and REPCOUNT are legal, even though many Logos
do not have them, because these can be easily changed
to something portable like this:
make "i 0 repeat [ ... make "i :i+1]

Math functions like SQRT, SIN, LOG10, POWER, etc. are
legal, even though some Logos do not have them, because
they just seem so "fundamental" to me. I almost feel that
it is a "flaw" in any programming language to leave out
these basic math functions. There may be different
implementations (such as degrees vs. radians) but these
can usually be handled by something simple, like multiplying
by a constant.

PENREVERSE (PX) is legal. For black and white,
it is very well defined for all Logo's which support it.
Furthermore, it is very useful for making pretty pictures
in 15 words or less. On the other hand, if your Logo does
not implement it, you are stuck. So PX is legal, but I'm
not comfortable leaving out all the people who don't have it.

- Keith Enevoldsen
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home