Discussion:
Berkeley Logo 6.0 released
(too old to reply)
Brian Harvey
2008-09-14 18:54:33 UTC
Permalink
Release 6.0 of Berkeley Logo is now available by anonymous FTP or Web.
Versions are available for Unix, Windows, and MacOS X. (The DOS and
MacOS Classic versions are frozen at 5.3, still online.)
Berkeley Logo (a/k/a UCBLogo) is FREE SOFTWARE, with source code included.
-------------

This major release includes a shift to using the wxWidgets cross-platform
GUI toolkit, for a more uniform user experience across platforms.

Logo is the educational programming language best known for its "turtle
graphics" but also featuring easy and powerful facilities for computing
with words and sentences. Sample projects included with the Berkeley
Logo distribution range from a tic-tac-toe game to a Pascal compiler and
a Logo implementation of Student, Daniel Bobrow's program that solves
algebra word problems.

Berkeley Logo is distributed under the terms of the GNU General Public
License: You may redistribute it freely, and you may use it as a base
for developing additional free software, but you may not use it as a base
for commercial software products. The exact details are included in the
distribution, in the file named GPL.

Advantages of Berkeley Logo:

* It's free.
* It comes with source files (in C).
* Logo programs are completely compatible among Unix, PC, and Mac.

Disadvantages of Berkeley Logo:

* It's relatively slow.
* It doesn't do anything fancy about graphics. (One turtle.)

This announcement has five more parts:
* How to get Berkeley Logo.
* Installation instructions.
* Details about this release.
* Pointers to other people's Berkeley-Logo-related distributions.
* Instructions for DOS and MacOS Classic.

----------------------------------------
HOW TO GET BERKELEY LOGO:
----------------------------------------

To use a web browser, go to
http://www.cs.berkeley.edu/~bh/logo.html

Or, FTP to ftp.cs.berkeley.edu and get any of the following files:

pub/ucblogo/ucblogo.tar.gz Unix sources and documentation (gzip format)

pub/ucblogo/ucbwlogosetup.exe Windows version, self-installing, with
executable UCBWLOGO.EXE

pub/ucblogo/UCBLogo.dmg Mac OS X version, disk image

pub/ucblogo/ucblogo-4.xo OLPC XO activity

pub/ucblogo/usermanual Just the documentation file

(The filenames above are links to filenames that include the version number,
e.g., ucblogo-6.0.tar.gz; either name is okay. Anything other than these
versions, if still online, is in the subdirectory pub/ucblogo/old.)

-----------

The Windows and Mac versions include a SOURCE subdirectory containing
the C source files used to compile Berkeley Logo. If you don't want to play
with the code, you can delete this directory and all its contents. You can
also delete some or all of the contents of the DOCS directory, which has the
usermanual in various formats (Postscript, PDF, HTML, INFO, TEXI). The
HTML files are particularly huge, if you're looking for something to delete.
(In the Unix version, the source files are in the top-level directory of the
distribution.)

In the source directory, the file plm is a Program Logic Manual that
documents some of the inner mysteries of this interpreter. You should read
_Structure and Interpretation of Computer Programs_ before you read plm.
Also included is evaluator.ps, a beautiful one-page simplified flowchart
of the evaluator to admire while reading plm.

In the Unix version, if you want to save space, you can delete the entire
ucblogo directory created by tar once you've done "make install".

----------------------------------------
INSTALLATION INSTRUCTIONS:
----------------------------------------

The Unix version is a compressed tar file. To install it, copy to your
machine, then say
gunzip ucblogo.tar
tar -xf ucblogo.tar
cd ucblogo-6.0
./configure
make

The makefile compiles with optimization turned off. This is necessary to
avoid mysterious garbage collection failures. (NOTE: On my HP 712, for
reasons I don't understand, I had to compile the entire interpreter without
optimization. But on other platforms, such as PCs running Linux and FreeBSD,
it's sufficient merely to un-optimize mem.c. If that works on your machine,
you can remove the "-O0" at the end of the CFLAGS line at the beginning of the
makefile, after running configure.)

---------

The Windows version is in the form of an installer, with the usual options
for desktop icons and the like.

The Logo interpreter, named LOGO.EXE, requires Windows 95/98/Me/NT/2000/XP
or later (not 3.1; sorry). It is distributed as a self-installing setup file.

---------

The MacOS X version is an application that can just be dragged into your
Applications folder.

----------------------------------------
THIS RELEASE:
----------------------------------------

All platforms:

MAJOR CHANGE: All platforms now use a uniform graphical user
interface, based on the wxWidgets library. A very simple editor
is part of the package, no more external editor. This GUI is,
so far, rather primitive, but provides a framework that should
allow for many improvements relatively soon. There is a single
Logo window that can be in fullscreen, splitscreen, or textscreen
mode, like traditional Logo versions.

INCOMPATIBLE CHANGE: RGB color lists, as used by PALETTE,
SETPALETTE, etc., now take integer or non-integer values between
0 and 100 rather than integers between 0 and 65535. I don't like
incompatible changes, but having now actually tried teaching kids
with Berkeley Logo, I've learned that they have trouble understanding
the old system; their colors all come out near-black.

New commands PRINTPICT and PRINTTEXT to print the graphics and
text screens, respectively. If called with an argument (in
parentheses), they print preview instead. (wxWidgets only)

New commands INCREASEFONT and DECREASEFONT to make the text window
font one size bigger or smaller, SETTEXTSIZE to set the absolute
size, SETLABELHEIGHT to adjust graphics-window text size, and
SETFONT to set the font name for all windows. (wxWidgets only)

SETTEXTCOLOR (SETTC) command, formerly just in DOS version, works
on all platforms. It takes two color number or RGB lists as inputs,
first the text color, then the text background color. (wxWidgets only)

New command FILLED takes two arguments, a color and an instruction
list. The instructions should draw a simple closed curve (but if
not closed, FILLED will add a turtle move back to the starting
point). The instructions are carried out, and then the area
enclosed by the curve is filled using the given color, regardless
of other lines that might intersect that area. (wxWidgets only)

Special variable BUTTONACT, if defined and nonempty, is an instruction
list to be run when the user presses a mouse button. Special variable
KEYACT, if ditto, is to be run when the user presses a key on the
keyboard. It is the responsibility of the user code to handle the
problem of a second mouse/keypress during the running of these
instructions. New operation CLICKPOS outputs the position of the
mouse at the moment when the mouse button was pressed. BUTTON
outputs which button was most recently pressed, or zero if no button
was pressed since the last call to BUTTON. (BUTTONP still reflects
the actual current button status.) (wxWidgets only)

The workspace management procedures (PO, TEXT, HELP, etc.) look
in the library before deciding whether the name you give exists
as a procedure or not, just the way running the procedure does.
This is an incompatible change!

The procedure formerly named BACKSLASHEDP or BACKSLASHED? is now
called VBARREDP or VBARRED?, to reflect a longstanding change in
its meaning. The old names are retained in the Logo library for
backward compatibility.

A command line argument consisting of just a hyphen means that all
following command line arguments should be collected in a list,
instead of taken as filenames to load. The list can be seen in
the buried variable :COMMAND.LINE

Logo looks in its library directory (e.g., /usr/local/lib/logo/logolib)
for a file startup.lg, and runs it if found, before looking in the
user's current directory for startup.lg and running that.

A vertical bar that comes after a semicolon doesn't require a
matching vertical bar to end the line.

Fixed a garbage collector bug (although I don't know why it was
a bug, alas).

The buffer for saving pictures (for SAVEPICT and EPSPICT and for
restoring the graphics window after it's hidden) has no size limit.

INVOKE is a macro, so (INVOKE [IF ? < 0 [OUTPUT "NEGATIVE]] :X)
will output from the caller, rather than from INVOKE.

Improved error message "Runlist %s has more than one expression"
for the case of a macro seen where an expression (that outputs a
value) is needed: PRINT RUN [PRINT "A PRINT "B].

One-pixel moves from drawing turtle aren't saved in SAVEPICT buffer.

(1 2 3) gives error message instead of blowing up.

PRINT [~] (bracket after tilde) works (no line continuation).

The check for END inside a multi-line instruction is correctly
internationalized.

APPLY [[][]] [] no longer crashes.

APPLY copies the arg list, so the original list can't be modified
by changes to the inputs (e.g., after an error).

Better error message (don't know how) for too much inside parens
and also the first one isn't a procedure name.

Better error message for STOP or OUTPUT during a PAUSE.

Fixed bug crashing backquote (`) in case of `[[,[...] ...]]

Fixed bug giving "out of bounds" message for line just on screen edge.

Fixed bug that ignored TEST outside of a procedure.

Turtle is invisible during drawing (to speed it up).


Windows:

Mac:

Unix:

----------------------------------------
OTHER UCBLOGO-RELATED DISTRIBUTIONS:
----------------------------------------

MSWLogo is a free port of Berkeley Logo to Microsoft Windows done by George
Mills. He has added a lot of Windows-specific capability to the language,
so you can do cool multimedia stuff with it. Look in

http://www.softronix.com/logo.html

David Costanzo's FMSLogo, an updated version of MSWLogo, is at

http://fmslogo.sourceforge.net/

Andreas Micheler's aUCBLogo, a rewrite and enhancement of UCBLogo, is at

http://www.physik.uni-augsburg.de/~micheler/

---

Adaptation francaise pour MSWLogo et UCBLogo:

A startup file and documentation for UCBLogo in French is at

http://www.algo.be/logo1/MSWlogo-fr.html

Thanks to Francis Leboutte.

----------------------------------------
VERSION 5.3 FOR OLDER PLATFORMS:
----------------------------------------

To use a web browser, go to
http://www.cs.berkeley.edu/~bh/logo.html

Or, FTP to ftp.cs.berkeley.edu and get any of the following files:

pub/ucblogo/blogo.exe DOS version, PKZIP format, including
executables BL.EXE and UCBLOGO.EXE

pub/ucblogo/ucblogo.sea Mac Classic version, StuffIt format,
w/executable Logo
pub/ucblogo/ucblogo.sea.hqx Mac Classic version, BinHexed StuffIt format,
including executable Logo

Be sure to use BINARY transfer mode when retrieving the archive files!

-----------

The DOS 5.3 version is in the form of a self-extracting PKZIP archive.
Run BLOGO.EXE ; it will create two files, INSTALL.BAT and INSTALLU.EXE. Then
run INSTALL to create a C:\UCBLOGO directory with the complete
distribution. If you want to install
Logo somewhere other than C:\UCBLOGO, you can say
installu -d d:\foo\
to put it in d:\foo\ucblogo. DON'T FORGET THE "-d" PART!

The DOS distribution includes two executable programs. BL.EXE runs on any
DOS PC, but is limited to 640K of memory. UCBLOGO.EXE requires a
286-or-better processor, but is able to take advantage of extended memory if
you have it. Read the README file for technical details.

The BL.EXE version, for really old 8086 PCs, is frozen at version 3.6,
because the garbage collection algorithm introduced in version 4.0
doesn't work well with really small memory.

-----------

The Mac Classic 5.3 version is in the form of a BinHex-converted
self-extracting StuffIt archive. To install it, just copy to your hard disk,
un-BinHex it (this may be done automatically by your file transfer program),
and double-click on it.
Benjamin L. Russell
2008-09-17 03:15:19 UTC
Permalink
Thank you for releasing version 6.0 (at last); I was beginning to
worry if it was ever going to come out!

It installs fine on Windows XP Professional, Service Pack 2.

The new Start menu and desktop icons and line editor are both
improvements.

Personally, I preferred the old black-on-white REPL background to the
new white-on-black one. Is there a way to reset the color scheme to
the old one?

Incidentally, what should I do if version 5.5 has already been
installed? The release notes do not say that it should be
uninstalled, but since the default installation process attempted to
install to the same folder as the old one (c:\ucblogo), I uninstalled
the old version first. Perhaps it might help if the release notes
indicated whether version 5.5 should be uninstalled before installing
version 6.0.

Having an option automatically to detect whether the old folder was
present and then installing to a different directory (e.g., c:\Program
Files\ucblogo) would help in this case, since many users presumably
would not know what to do then.

Great work, and I'll post to this newsgroup if I encounter any bugs!

-- Benjamin L. Russell
Brian Harvey
2008-09-17 03:42:15 UTC
Permalink
Post by Benjamin L. Russell
Personally, I preferred the old black-on-white REPL background to the
new white-on-black one. Is there a way to reset the color scheme to
the old one?
Yes, there is a SETTEXTCOLOR (abbrev SETTC) command that takes two inputs,
a foreground color and a background color. Each can be either a color number
(as for turtle graphics) or an RGB list (on a 0-100 scale). So
SETTC 0 7
means black on white.
Post by Benjamin L. Russell
Incidentally, what should I do if version 5.5 has already been
installed? The release notes do not say that it should be
uninstalled, but since the default installation process attempted to
install to the same folder as the old one (c:\ucblogo), I uninstalled
the old version first. Perhaps it might help if the release notes
indicated whether version 5.5 should be uninstalled before installing
version 6.0.
Oops, good point; I just figured that the new files would replace the
old files without a problem. Do you get an error if you overwrite the
old Logo?

P.S. I discovered this morning that the Mac version I posted over the
weekend had an Intel-only binary. As of this evening that's been fixed,
so PowerPC Mac users who couldn't get it to work should re-download.
(It's now a fat binary.) Sorry!
bluebat
2008-09-17 06:51:42 UTC
Permalink
in configure*:
/usr/bin/wx-config would be better than /usr/local/bin/wx-config

in wxTerminal.cpp:
941: error: conversion from 'const char [2]' to 'const wxString' is
ambiguous
bluebat
2008-09-19 06:07:35 UTC
Permalink
Post by bluebat
941: error: conversion from 'const char [2]' to 'const wxString' is
ambiguous
with an UNICODE build wx,
"M" should be changed to wxT("M") ?
Brian Harvey
2008-09-19 06:23:03 UTC
Permalink
Post by bluebat
with an UNICODE build wx,
"M" should be changed to wxT("M") ?
Thanks -- I'll fix it for next release.
bluebat
2008-09-22 02:16:47 UTC
Permalink
so some tweaks:
sed -i 's|local/bin|bin|' configure*
sed -i 's|("M"|(wxT("M")|' wx*.cpp
sed -i 's|everything|all|' makefile*
rm -rf CVS .svn */CVS */.svn

and some problems:
not support i18n of menu
not support utf8-named fonts
not support utf8-coded commands
Brian Harvey
2008-09-22 14:27:16 UTC
Permalink
Thanks.
Post by bluebat
sed -i 's|everything|all|' makefile*
This is deliberate. Since we added the individual help and library files
to the svn distribution, it's counterproductive for plain "make" to remake
them, thereby convincing svn that you're out of sync.
Post by bluebat
rm -rf CVS .svn */CVS */.svn
If we do that, svn will stop working!
bluebat
2008-09-23 06:26:34 UTC
Permalink
Better would be using gettext for i18n of menus, commands and
messages.
Following /usr/bin/ucblogo is just a workaround for commands and
messages:
=========================================================================
#!/bin/sh

LOGOLANG=`echo $LANG|sed 's/\([^\.]*\).*/\1/'`
LOGOLIB="/usr/share/logo/logolib"
LOGOCMD="logo"

STARTFILE=$LOGOLIB/Startup.$LOGOLANG
if [ -e $STARTFILE ] ; then
LOGOCMD="$LOGOCMD $STARTFILE"
else
STARTFILE=`echo $STARTFILE|sed 's/\([^_]*\).*/\1/'`
if [ -e $STARTFILE ] ; then
LOGOCMD="$LOGOCMD $STARTFILE"
fi
fi

if [ -f $LOGOLIB/Messages -a ! -h $LOGOLIB/Messages ] ; then
mv -f $LOGOLIB/Messages $LOGOLIB/Messages.en
fi
MSGFILE=Messages.$LOGOLANG
if [ -e $LOGOLIB/$MSGFILE ] ; then
ln -sf $MSGFILE $LOGOLIB/Messages
else
STARTFILE=`echo $MSGFILE|sed 's/\([^_]*\).*/\1/'`
if [ -e $LOGOLIB/$MSGFILE ] ; then
ln -sf $MSGFILE $LOGOLIB/Messages
else
ln -sf Messages.en $LOGOLIB/Messages
fi
fi

exec $LOGOCMD

==============================================================
and a related ucblogo.desktop file:
==============================================================
[Desktop Entry]
Name=UCBLogo
Name[zh_TW]=柏克萊海龜語言
Comment=LOGO computer language
Comment[zh_TW]=UCBLogo 海龜電腦語言
Exec=ucblogo
Terminal=false
Type=Application
Icon=ucblogo
Encoding=UTF-8
Categories=Application;Development;
bluebat
2008-09-26 05:46:28 UTC
Permalink
This post might be inappropriate. Click to display it.
Brian Harvey
2008-09-26 06:17:46 UTC
Permalink
Post by bluebat
1. no build-in rlwrap
I'm not sure what you mean.
Post by bluebat
2. copydef "XXX "END ; not work
It doesn't work because END isn't a procedure. The TO procedure recognizes
END as a special keyword, more akin to TRUE and FALSE than to procedures.
If you want a synonym for END for internationalization purposes, there's a
mechanism for that (the Messages file).
Post by bluebat
3. color of turtle better depends on background, not on pen
The thing is, this way the color conveys information (what color it'll draw);
I get that your way would ensure a high-contrast turtle, but in any case, if
the background isn't white or black, the results are a little peculiar
because the turtle is drawn in penreverse (xor) mode. But, maybe.
Loading...