Which kid's beginners programming - Python or Forth?

M

Mike Meyer

Ivan Van Laningham said:
In which case, you should start with PostScript;-) I learned it by
plugging a glass tty into the serial port on one of the very first
AppleWriters and typing away. None of this fancy-shmancy '>>>'
business;-) But what a great reward, having graphics come out the
printer when you typed 'show'.

This is why Logo came with "turtle graphics". Something very simple,
but very powerfull - and the kids could get immediate results from it.

I'm surprised the OP missed Logo in his search. It's one of the few
languages designed to teach computing to children. There are free
implementations for most popular platforms.

Someone has already provided a link to pylogo. That might be a good
starting place.

<mike
 
T

Terry Hancock

This is why Logo came with "turtle graphics". Something very simple,
but very powerfull - and the kids could get immediate results from it.

I suppose it's worth mentioning then, that Python has it's own
implementation of turtle graphics? I think it's in the standard
library, isn't it? The "Live Wires" graphics module is also a good
start --- very similar to the kind of graphics interface that I had
when I was learning on my TRS-80 Color Computer with BASIC. ;-)
 
B

BORT

All,

The Forth-Python pull was heading to a conclusion just like "Tastes
Great" vs. "Less Filling" or Ford-Chevy. However, friendly folks at
comp.lang.forth pointed me to Amazon.com and _Mindstorms: Children,
Computers, and Powerful Ideas_
by Seymour Papert. The book is by Logo's inventor and, according to
the reviews, addresses the larger goal I most want to achieve.

I now want to read the book. Period. However, my kids both love Legos
which uses a Logo implementation for their robotics toys. I could
probably capture both the 10 yr old AND the 7 yr old if we can spring
for the $200 Lego Mindstorm set. Sort of blows away my specification
of "free," but...

In my earlier browsing, I eliminated Logo early on, thinking we would
hit its capability ceiling too quickly and then backtrack in order to
make a transition to a "REAL" language.

uh... I've been browsing on Logo tonight and, even without the Lego
robots, I may go that route. Shoot, I thought Logo was just moving
hokey sprites in increasingly complex patterns until I saw the book
list at:

http://el.media.mit.edu/logo-foundation/products/books.html

Hmm... When all is said and done, maybe the choice is kind of like
physical exercise. I can spend weeks choosing the most effective work
out and diet combination. But, until I cut back on biggie size grease
brugers with double shakes and get off of the couch every now and then,
the choice of workout is moot. In fact, one I use is better than the
"best" that I don't use.

Gentle folk of comp.lang.python, I heartily thank you all for your
input. I think I'm taking the boys through the door marked "Logo." We
may be back this way, though. We will likely need MORE in the nebulous
future. I am impressed with the outpouring of support here!

Thanks to all!
 
D

Dennis Lee Bieber

Not "unless"... perhaps "because"? Whatever a MUCK is, it's definitely

MUCK, MUD, MOO

Though what MUCK is an acronym of is up for grabs... As I
recall, MUD was "Multi-User Dungeon/Domain", MOO is MUD Object Oriented.
Between them are MUCKs, which were less game (ie, scoring) oriented and
more social. I've seen MUCK expanded as Multi-User, C-Kernel (as MUDs
originated in LISP-like languages, MUCKs used compiled C for the core,
then used MUF -- Multi-User Forth -- as a built-in extension language).

Of course, I've also seen MPI (the LISP-like macro language of
FurryMUCK and Furtoonia) expanded as "My Personal Insanity".

--
 
D

Dennis Lee Bieber

I just checked, and you're quite right: the State Library of Tasmania
has only one Forth book -- but it has two Python books (Python

Try searching for "threaded interpreted languages", which was a
generic term for Forth-like language interpreters. "threaded" as
practically all operators and functions were "pointers" to other
interpreted objects...

--
 
E

Erik Max Francis

BORT said:
In my earlier browsing, I eliminated Logo early on, thinking we would
hit its capability ceiling too quickly and then backtrack in order to
make a transition to a "REAL" language.

uh... I've been browsing on Logo tonight and, even without the Lego
robots, I may go that route. Shoot, I thought Logo was just moving
hokey sprites in increasingly complex patterns until I saw the book
list at:

It's probably ideal for ages 7 and 10. Note that even the name _logo_
is Greek for _word_. There's plenty of "non-hokey sprite" stuff you can
do with Logo, it's just that the turtle graphics are the most visually
obvious form of Logo and what most people who had any exposure to Logo
remember most easily. The language itself shares a great deal with Lisp.

There are numerous modern Logo interpreters, so you shouldn't have any
problem finding something both you and the kids can use, like UCBLogo
for Unix or MSWLogo for Windows (based on UCBLogo). If you want to go
that route, there's even a set of computer science texts based on Logo,
called _Computer Science Logo Style_ by Brian Harvey, maintainer of UCBLogo.
 
D

Dennis Lee Bieber

I now want to read the book. Period. However, my kids both love Legos
which uses a Logo implementation for their robotics toys. I could
probably capture both the 10 yr old AND the 7 yr old if we can spring
for the $200 Lego Mindstorm set. Sort of blows away my specification
of "free," but...
Well, to add to that, at one time (I don't know if it is still
available) one could get a compiler module for AdaGIDE to let one write
integer/non-tasking Ada programs for the Mindstorms system.

--
 
G

gabriele renzi

BORT ha scritto:
All,

The Forth-Python pull was heading to a conclusion just like "Tastes
Great" vs. "Less Filling" or Ford-Chevy. However, friendly folks at
comp.lang.forth pointed me to Amazon.com and _Mindstorms: Children,
Computers, and Powerful Ideas_
by Seymour Papert. The book is by Logo's inventor and, according to
the reviews, addresses the larger goal I most want to achieve.
<snip>

I thought you were limiting the choice to python/forth.
Logo is a nice dialect of lisp, so I think you're making a good choice ;)

But I'd consider Squeak. It is the best educational-but-not-only
environment I've seen (which does not mean there are not better, but
I've seen quite a bit of them)

Squeak not only has programming at the hand but it also provide you with
a complete educational system, with music, painting, animations etc. And
there is nothing that could get a kid involved like making a rabbit explode.
 
R

Rocco Moretti

BORT said:
Gentle folk of comp.lang.python, I heartily thank you all for your
input. I think I'm taking the boys through the door marked "Logo." We
may be back this way, though. We will likely need MORE in the nebulous
future. I am impressed with the outpouring of support here!

Others in the thread mentioned it briefly, but when you do come back to
the door marked "Python", someone has eased the transition slightly:

http://pylogo.org/

'''PyLogo is a Logo interpreter written in Python. Its implementation is
small, and is based on the language as implemented by UCBLogo. The Logo
language is a learning language, intended for children for which more
"complete" languages aren't appropriate. Many of Logos language design
choices are driven by this, and differ from Python.'''

Although given it's 0.1 version status, it may be a little rough around
the edges.
 
A

Aahz

Gentle folk of comp.lang.python, I heartily thank you all for your
input. I think I'm taking the boys through the door marked "Logo." We
may be back this way, though. We will likely need MORE in the nebulous
future. I am impressed with the outpouring of support here!

Thanks to all!

You're welcome. I want to leave you with one parting comment:

I first started programming when I was nine years old, in the mid-1970s.
We used TTYs with a timeshared HP1000 and BASIC. Given modern computers
and editors I think that any programming language that isn't excessively
baroque will do fine for young people. They can always unlearn bad
habits later.
 
I

Ian Osgood

Forth clarifications below...

Rocco said:
So for Math you'd do something like:

y = b + mx + cx^2

IIRC, for Forth it would be something like (please excuse the mistakes
in operator notation):

x 2 ^ c * m x * + b + 'y' setvar

Assuming these are all VALUEs:

x DUP * c * m x * + b + TO y
[Portability]

Much Forth code you find on the net is written to the ANS standard, and
is thus portable. Free standard Forth systems are available for all
platforms.
There are ANS and IEEE standards for Forth, but official standards tend
to leave things implementation dependent, especially in platform
specific things like file access.

Standard I/O and file I/O are part of the ANS standard.
To further compound the issue, a Forth
system tends to be self contained and insular - interaction with the
surrounding environment may be minimal at best. Python, where possible,
tries to shield the user from platform specifics, while still allowing
full access to the environment. There are a number of Python bindings to
C libraries which give near complete control to the desktop/screen/sound
system, etc. Forth-bound libraries will likely be rarer, and again,
interpreter specific.

That is unfortunately true. There are FFI (foreign function iterfaces)
available for the most popular Forth systems, but how they work is not
standardized. Forth has nothing like the module libraries of Python.
Graphics, object-orientation, and data-types are all available or
easily implemented in a particular Forth, but those batteries are not
included as they are in Python.

Ian
 
N

NickC

N

Nick Craig-Wood

Rocco Moretti said:
So for Math you'd do something like:

y = b + mx + cx^2

(Where ^2 is a superscript 2)

For Python it would be:

y = b + m*x + c*x**2

IIRC, for Forth it would be something like (please excuse the mistakes
in operator notation):

x 2 ^ c * m x * + b + 'y' setvar

In FORTH you don't generally use variables unless you really have to -
that is what the stack is for, so you'd write a word like this...

variable c 10 c !
variable m -2 m !
variable b 14 b !

: quad ( x -- b + m*x + c*x**2 )
dup dup ( x x x )
* c @ * swap ( cx**2 x )
m @ * + ( m*x + c*x**2 )
b @ + ( b + m*x + c*x**2 )
;

And now we test

7 quad . 490 ok

Was that easy? Not really! Compared to python...
490

Was it fun? Well yes it was! FORTH is much lower level than python
and you learn different things from it. At each step you have to
worry about what is on the stack which attention to detail is
important for a programmer. Its a lot of work to do even the simple
stuff though.

Its much easier to understand how FORTH works, and even implement your
own from scratch.

I learnt FORTH a long time ago, and I haven't used it for many many
years! Its major pull back then was that it was fast, and easier to
write than assembler. I don't think that really matters now though,
Python is just as fast thanks to the 3 GHz machine I'm running it on
(rather than the 4 MHz one I ran FORTH on then!) I think FORTH would
be an interesting supplimentary language for anyone to learn though...

*However* I reckon Python would make a much better first language than
FORTH. The batteries included approach make a young programmers life
much, much more fun, rather than starting from almost nothing (in
modern terms) with FORTH.

And like FORTH, Python has the interactive console which is essential
when starting out.
 
R

Roy Smith

Nick Craig-Wood said:
In FORTH you don't generally use variables unless you really have to -
that is what the stack is for

Exactly. Every language has its natural way of doing things. You can
usually bludgeon a language into doing things some other way, and newcomers
to a language usually try to do exactly that. Eventually they catch on to
the idioms.

Storing temporary values in variables in a stack language is like iterating
through the items of a list in Python by incrementing an integer and using
it as an index.
 
R

Roy Smith

There's a reprint this morning on slashdot of a 1984 review Byte did
on the brand-new Macintosh (executive summary: cool machine, needs
more memory). The first four software packages available for the new
machine?

MacWrite/MacPaint (they seem to count this as one package)
Microsoft Multiplan
Microsoft BASIC
CSI MacForth

No mention of Python :-(
 
M

Mike Meyer

There's a reprint this morning on slashdot of a 1984 review Byte did
on the brand-new Macintosh (executive summary: cool machine, needs
more memory). The first four software packages available for the new
machine?

MacWrite/MacPaint (they seem to count this as one package)
Microsoft Multiplan
Microsoft BASIC
CSI MacForth

No mention of Python :-(

That's because the time machine doesn't work that far into the
past. It's primary use is to retroactively fix bugs in Python, so the
design spec only called for the ability to go back to the first public
release of Python.

<mike
 
C

Colin J. Williams

BORT said:
Please forgive me if this is TOO newbie-ish.

I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.

My programming classes were a long, long time ago in a land far, far
away. My programming muscles, which were never truly developed, have
atrophied even so. That said, I want to learn this as we go. The
PROCESS of research and using net resources for a self-learning
adventure is almost as much of the goal as learning a programming
skill.

That said, a good learning goal for my kid would be to create a
spelling tutor for his little brother. My (simple) vision would be:

1. an input file of this week's word list
2. use a free text-to-speech engine to call out one word at a time
3. in turn, monitor each key press as a particular word is being
typed, beeping on an incorrect keystroke and going to the next word if
correct

I don't care if it takes a year or two to get to this level, I just
want a vehicle that will take us there.

I told my son, who wants to learn how to compute probabilities, that we
have to start with some boring stuff so we can learn how to do the cool
stuff. Adding and subtracting aren't really fun, but figuring odds on
rolling dice IS fun. Learning to program will be kind of like that.
He accepted that explantion.

So, that said... In ~simplest~ terms for the stated goal -- Forth or
Python?
....the goal is NOT the spelling tutor... it is learning how to use a
tool to solve a problem. I am asking which tool is more suited to an
otherwise arbitrary direction of "spelling tutor program."

[NOTE: This is not a troll. I'm geting ready to bark up a tree and I
prefer to avoid the wrong one. I am cross-posting.]

Thanks
As a pre-learning-Python stage you might use the Firefox browser:
1. Set up a text file with correctly spelled words.
2. Open that file with Firefox.
3. Ctrl F to open the search window at the bottom of the screen.
4. Enter each word to test.

Fun? for the younger brother and a suggestion as to the functionality
you might build into the second stage of your Python program.

Colin W.
 
C

Christos TZOTZIOY Georgiou

Kids your backwards talking like if forth love will they then.

I have a nephew that would love Forth only for that.

The perfect language for many kids I know would be Python with boolean
operators reversed. Oh, and 'print' should be 'do_NOT_print'.
 
?

=?iso-8859-1?B?QW5kcuk=?=

Scanning quickly through the various response, I noticed that at least
one person suggested rur-ple (rur-ple.sf.net), hence Python. I would
second that ;-) ... but then, I am biased as the author of rur-ple!

rur-ple is intended to be a complete learning environment for learning
programming and Python for complete beginners. At the core of it are a
set of lessons (about 40 so far). Before the end of the summer,
rur-ple should include a complete tutorial on writing games using
Python (and pygames). My goal is for rur-ple to be usable by 10 years
old (with guidance) and young adults (by themselves) to learn about
programming.

Check it out ... and let me know what appeals to you (if anything) and
what doesn't.

It's free :)

André
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top