User Tools

Site Tools


weblogo:blog

The Logo Blog

michael.jpg Welcome to my Logo Blog! I am Michael, the author of Terrapin Logo. As Logo evolves, I will write about new Logo features, drop a hint or two, or cover a Logo topic in more detail.

Send me an email! Do you have any ideas for improvement? Are you frustrated because something does not work as expected? Do you see a JavaScript error? Please let me know! Send me an email to michael@terrapinlogo.com!

2019/03/15: Blushing Turtles

Would you like to see a turtle blush? Then set its pen color to red with the command SETPC “RED!

Per public demand, I've changed turtles a little. As soon as you select a pen color other than black, the turtle's shape draws in the selected color so you can always see which pen color you are using. The "PREFS property COLORED.TURTLES controls the behavior. Initially, it is set to TRUE, but you can turn it off by setting it to FALSE, or via the Settings dialog.

Please note that the "PREFS property COLORED.SHADOWS has been replaced with COLORED.TURTLES.

2019/03/09: More Editor Enhancements

Due to public demand, I've switched the hot keys for Open and Save between the workspace and the editor. Logo V4 used Ctrl-O (Cmd-O on the Mac) to load a file into the editor, and Ctrl-S/Cmd-S saved that file again. Now, the hot keys work as Logo 4 users knew them.

The Find and Replace “dialogs” in the editor were awful at best. Now, you have a nice Find/Replace dialog that makes more sense. All find/replace menu items in the Edit menu have been replaced by a single Find/Replace menu item,

Finally, the editor now tracks any loaded file, and displays the file name in the title bar. To get rid of a loaded file, there is a new “Erase” button that erases the entire editor so you can start over. The editor's Save button saves that file again; if you want to save to a different storage location, use the File/Save menu.

2019/03/06: Editor Enhancemenets and New Layout Options

A few small, but interesting enhancements have been added to the editor:

  • You can now double-click a text file in the Files panel (e.g. a classroom file), and it loads into the editor.
  • The editor has a Save button, which is actually just a convenience button for the “Save/Editor Contents” menu item in the File menu. It saves you from having to navigate through the menu to save your editor contents.
  • And you can drag a file into the editor or the Listener to copy the file's full path name.

I've introduced two new globals variables so you can fine-tune the layout of Logo panels.

The Initial Layout

After Logo loads and initializes, the classroom version attempts to load an INIT.LGO file from the classroom server, which could change the lauout. Also, Logo tries to auto-load any layout that Logo has saved previously using the AUtosave settings in the Settings dialog.

As soon as Logo has finished its initialization phase and just before the Listener is ready to accept user input, Logo saves the layout found so far into the global :INITIAL.LAYOUT variable. Users can return to Logo's initial panel layout in one of the following ways:

  1. Enter the command MAKE “LAYOUT :INITIAL.LAYOUT
  2. Select the Window menu item “Initial Layout”
  3. By clicking the Initial Layout toolbar icon

The Default Layout

Logo's default panel layout is available in the global :DEFAULT.LAYOUT variable. This variable is read-only, but you can always use that variable to reset the layout to the default.

  1. Enter the command MAKE “LAYOUT :DEFAULT.LAYOUT
  2. Select the Window menu item “Original Logo Layout”

2019/02/23: Background Programs

Now, Logfo can run background programs. A background program is a Logo program that detaches from the Listener, leaving the Listener free for you to enter commands or run programs while the other program runs. A background has the same access to Logo as every other program; it can print to the Listener, move turtles and more. Event handlers were a sort of background program, but an executing event handler blocked a Logo program while executing. This time is over, because event handler now run in the background and leave Logo programs free tu continue running.

I won't go into details here; please visit the section about background programs in The Logo manual for more details. See also the new commands LAUNCH and HALT.

And yes, Logo has become even faster. Just try https://moas.logoapps.net to see how quickly 300 turtles move across the screen.

2019/02/03: A Change in Classrooms

This minor change affects only classroom licensees. The “Delete Contents” button used to leave all students. Now, it also wipes the list of students and resets it to the sample entries so you can reload the entire classroom.

Other than that, I am working on changes to classroom licenses that all current licensees will benefit from. Stay tuned.

2019/01/04: More Fine-Tuning

Still working on event handling! I've found that the event data for floor robots needed to be split up. Before, it was a two-element list, where the first element was the sensor value and the second element was the device name that triggered the event.

To me, it was tedious that you had to use FIRST :EVENTDATA to access the sensor value.

Therefore, I split the data,. Now, the :EVENTDATA variable contains the sensor value only, which makes much more sense. If you want to know which device actually triggered the event, there is a new global variable :EVENTSOURCE that contains that name.

I apologize to everybody who has written event handler for floor bots!

There is more: I've also been working on the Logo Blocks page. I added a new tab “Events” so you can pull together an event handler, and I've added a new tab for the Root robot.

Finally, there is a change for classroom users. If you do not want to create passwords for students, that is fine. Just leave the password field blank for a student to have the student log in the the classroom name and their own name instead.

2018/12/30: Fine-Tuning InO-Bot

I've had the first inquiry about how to program InO-Bot's obstacle sensors. During my answer, I wrote sample code, and found that event handlers for obstacle and line sensors were hard to program. Therefore, I changed the property names for these sonsors. Instead of OBSTACLE and LINE properties, I split up the OBSTACLE property into distinct properties FRONTLEFT, FRONTRIGHT, REARLEFT and REARRIGHT. The LINE property has been split into LINELEFT and LINERIGHT. All of these properties contain either TRUE or FALSE depending on the sensor status.

The event handlers have been split and renamed in the same way. Please see the Advanced Floor Bots page for details.

Let me show you a short example; if you want to respond to the detection of an obstacle for the front right sensor:

2018/12/12: Icon Bars, Undo and More

Terrapin Logo 4's icon toolbar was sorely missed, so I've added it back in. It offers quick access to the most used menu items, and makes life easier for students. You can remove that toolbar with a single click.

You can now undo your drawings! Every time Logo returns to toplevel after running a command or a procedure, it creates a snapshot of the Graphics panel and the location and heading of every turtle. Use the Undo and Redo buttons or menu items to revert your drawing. The undo is limited to the last 10 drawing operations, though.

For classroom users, we have added a classroom manager. With this manager, teacher can:

  • view all students who are logged into classroom
  • broadcast a message to the entire class
  • provide help to individual students
  • send programming suggestions to a student's Editor Panel
  • upload a student's Logo environment
  • log-out all student sessions
  • receive questions from students

The new page Manage a Classroom describes this new feature.

2018/11/01: Logo speaks!

The new SAY command speaks everything that you supply as input. You can feed it either a word or a list of words. Of course, your computer must have a speech synthesizer module (most computers have one). Often, computers have a lot of voices installed. Select a different voice for fun results. You can, for example, select a German voice to listen to Logo speak ENglish with a terrible German accent!

The new menu item Tools/Select Voice… or the SELECT.VOICE command lets you select a voice.

Note that the desktop version currently offery only one voice. We will change this with the next release of the desktop executable.

2018/10/24: Chrome 70 has been released

So why does this affect Logo? Because finally, Chrome 70 for Windows offers a full implementation of the Bluetooth functionality that Logo needs to talk to Bluetooth robots. For other platforms, Chrome has supported Bluetooth already, but Windows support has been missing. Now (I think that you need a newer version of Windows 10, however), you can use the Web version of Terrapin Logo to talk to Blue-Bot and InO-Bot on Windows!

See the Blue-Bot page for Blue-Bot commands, and the InO-Bot page for InO-Bot commands.

2018/09/16: Debugging Made Easier

We have converted the Debugger panel to a modal dialog box and made it simpler to use. Often, the Debugger panel would open when a Logo program ran into an error, and people would simply click it away and attempt to fix and rerun the affected procedure. In the meantime, the debugger would stay active, and the current Logo program would continue to pause.

Now that the debugger is a dialog, it pops up “in your face” and forces you to view the error. It comes with its own copy of a Listener so you can enter commands, like checking or changing the values of a variable, or redefine a procedure.

Please read the manual chapter Squish the Bugs! for more information.

2018/09/08: Two New Commands

This Logo release contains mostly bug fixes, but I've added two new commands:

  • SELECT.BLUETOOTH lets you select a Bluetooth device.
  • XLIST creates a list much like the well-known LIST command, but the created list is enclosed in parentheses instead of square brackets, making it executable.

2018/08/31: Classroom Tweaks

We have tweaked the classrooms a little. First, you may have noticed that we have split up the login dialog to make things clearer. For classroom users, there is a small, but significant change. As a classroom license holder, you could use your license code to log in, which let you create classroomns and manage the list of students for each classroom. The Files panel displayed all classrooms and their student folders. Students could log in using the classroom name and their assigned password. They could only view their student folder.

We have added a new login for teachers. Teachers can login using the classroom name and an assigned password. They can see their own classroom and their student folders, but none of the other classrooms that someone who logged in with a license code could see. The teacher's name and password is part of the list of students that a license code login would see.

So, now we have three levels:

  • Admins: Login with a license code. You can see all classrooms, create and delete classrooms, and set the teacher's name and password along with the students' names and password for each class.
  • Teachers: Login with a teacher password. You can see your own classrrom and set the students' names and passwords.
  • Students: Login with a student password. You can see your own student folder.

All users can change their own password in the Settings dialog, including students. If a student changes the password, the teacher (and admins) can see the new password in the list of students. If a teacher changes the password, admins can see that password.

IMPORTANT: We have created an entry with “Teacher's Name” as the user name and “Teacher's Password” as the password. If you want to save the student list as an Admin, you must change these entries before you update the list of students.

We'll update the documentation ASAP.

2018/08/18: Logo 5.1 Released

Well, I did not expect to ever increase the Logo version, but the additional features that Logo has received are so many that I've decided to bump the version number to 5.1.

So, what's new? Indeed, there is a lot:

New Classroom Concept

During the first months of our classroom offering, we found that is difficult for students to save their work, and difficult for teachers to monitor their students.

Therefore, we decided to offer our own cloud storage. The Terrapin Classroom storage comes with 1/2 gigabytes of disk space, which should be enough to handle several classrooms, and it is free of charge for classroom licensees.

You may already be familiar with Logo's concept of storage services. The Terrapin classroom storage is another cloud service like e.g. Google Drive or Dropbox.

Each classroom has its own folder; for single-classroom licenses, there is only one folder, and for Site or Campus licenses, Logo creates separate classroom folder for each sub-classroom.

The Classrooms dialog has been simplified, and entering student names and passwords has been made easier. When you create a student login for a classroom in the Classrooms dialog, Logo creates a folder for each student inside the classroom folder. When the student logs in, Logo connects to that folder and redirects all load and save functionality to that folder. The student can work with that folder as if it was a local hard drive.

You as the teacher have full access to the classroom and all of its student folders. You can even set up your classroom storage as an external drive in Windows or Mac OS so you can use your favourite tools to manage your classes.

We dropped support for Logo apps inside a classroom. Now, there are other and hopefully easier ways to prepare initial settings and material for your class; for example, if you want to create a special environment for your students, you save your workspace as INIT.LGO at the classroom level, and every student will find that file (and any other files that you save) inside their student folders as read-only files. If you previously have created an “init” app to set up your students, we've copied the “Workspace.lgo” file from that app into “INIT.LGO” so you do not lose your settings.

Please visit the "Classrooms" page for more information and examples.

Logo Blocks

blocks_sample.jpgWe have integrated Google's Blockly programming environment to make it easy to teach basic programming concepts. Simply drag and drop small blocks together to create your first Logo program! See the chapter about Logo Blocks for details.

Save Your Environment

You can now save your entire environment to a Zip archive. This archive contains your Logo workspaces, your turtles and controls, the contents of the Logo Editor plus your graphics. You can load that archive file anytime to restore your complete Logo environment.

Integration of Cloud Services

We have added support for Google Drive in addition to Dropbox. You can now connect and disconnect from these services via the File menu. Logo will automatically attempt to connect to a cloud service when trying to access a file or folder on that cloud service, so it is not strictly necessary to connect manually anymore.

All cloud services display their contents in the Files Panel. These are the Logo names for these services:

  1. Dropbox: ~DROPBOX
  2. Google Drive: ~GDRIVE
  3. Classroom storage: ~CLASS (only available to classroom licensees and students)

Please see also the chapter "Where are my files?" in the Logo manual for how a storage service works.

AUTOSAVE

This feature is the solution to the problem that people frequently hit the Refresh button of their browser, which causes Logo to be reloaded, and losing all of their work.

Logo's AUTOSAVE functionality is now fully available. AUTOSAVE saves the Logo workspace and much more very frequently, so nothing is lost when your browser crashes, or if you by accident hit the Reload button to reload Logo's web page. You can either use the Settings dialog to define the amount of data that Logo saves, or you set the "PREFS property AUTOSAVE. That property accepts four different values:

  1. OFF turns off AUTOSAVE completely. This is the default.
  2. WORKSPACE saves all procedures, names, and property lists plus the contents of the Editor panel.
  3. TURTLES saves the Logo workspace plus all turtles and the contents of the Graphics panel.
  4. ALL saves everything, including the contents of the Listener panel, all controls, and all global built-in names.

Dropping a Color

When dragging a color from the Toolbox and dropping it on to the Graphics panel, this used to set the panel's background color. Now, the color instead starts a FILL operation, filling the parts of the Graphics panel that are bordered by a drawing. If you want to set the panel's packground color, press and hold the Ctrl key when dropping the color.

Please note that this behavior has changed from Logo 5.0 back to what it was in Logo 4.1, where dropping a color also caused a fill operation.

The Print dialog has an additional option that lets you print the Graphics Panel.

2018/06/24: Printing, Auto-Saving and no more Helper App

As discussed before, the Logo Helper app is gone. To work with Pro-Bot, you will now need the desktop version for Windows and Mac. For Bluetooth devices, you will either need the desktop version, or the Chrome browser (this is not valid for Windows and iOS, unfortunately, because Chrome does not support the Web Bluetooth technology on these platforms).

I've heard complaints about accidentally losing your work by refreshing the page when working with the Web version of Logo. To a cxertain extent, these days are over! Logo will nor very often saved the contents of aour Logo workspace (procedures, names and property lists) as well as the contents of the Editor panel, and restore them when you refresh the page. It does currently not save the Graphics panel, nor does it save any turtles. But you have at least your procedures back! I am working on saving more of Logo, so expect to be able to save and restore the Graphics panel at a later time.

When you log out, Logo asks you if you want to keep your data. If you are a student, this may not be a good idea if the next student uses the same password to log in to the PC; he/she will be able to pick up your work!

You can turn off auto-saving with this command:

PPROP "PREFS "AUTOSAVE "OFF

Turn it on again with:

PPROP "PREFS "AUTOSAVE "WORKSPACE

See also the explanation of the AUTOSAVE property.

Finally, we have a Print dialog. You can choose between printing the contents of the Editor panel, the Listener contents, or a screen shot of your Logo window. Note that printing the Editor contents or the Listener does not print any colors; Logo only prints the contents without any extra formatting.

A side note: For the time being, I've removed support for the SBrick (see the announcement below for 2017/10/30).

2018/06/09: The End of the Helper App

In 2016, Google has announced that they will stop supporting Chrome apps for desktop browsers. Although Google has not published the final end date for Chrome apps support, the Robots Helper app appears to be more and more instable, maybe because Google does not pay sufficient attention to maintaining the hooks and APIs that the Helper apps uses.

Therefore, we decided to remove our Robots Helper app in the near future.

What does this mean for you if you use Terrapin Logo to connect to a robot? This depends on the robot that you connect to:

  • Pro-Bot users will have to use the desktop version for Windows or the Mac, because no browser supports access to the computer's serial port.
  • Users of Bluetooth-based devices like Blue-Bot, InO-Bot or SBrick are not affected if they use the Chrome browser, except for Windows users. Windows users need to use the desktop version, and Mac users can decide whether to use the desktop of the the browser version. There is a way to install Bluetooth support for Windows Chrome users, which we will publish more details about later, but this requires some manual fine-tuning and is not for the technically unsavvy.

Summary

  • Windows users need to use the desktop version.
  • Mac users need to use the desktop version for Pro-Bots, and they can use the the Chrome browser for Bluetooth devices.
  • Chromebook, iOS and Android users cannot access the Pro-Bot, but Bluetooth devices are OK.

2018/05/25: GDPR and the new Listener

We changed the login dialog slightly today. Now, there is an explicit “Got it!” button to acknowledge that you are OK with browser cookies. Logo stores your session data (like your login information) in a browser cookie. This lets Logo skip the Login dialog if you reload the page. Thie is a GDPR requirement (General Data Protection Regulation) that the EU has issued, and it should not affect you in any way.

We will also remove the previous Listener code (do you even remember the Listener where you had just a single line to type in your commands?) by June, 1. If you still use that Listener, please let us know!

2018/03/31: The "old" Listener is back!

I've received a few comments about the Listener panel, which is very different from the one that you have been used to in Logo v4. From now one, you have the good old Listener panel back! If you mistyped a command, just place the cursor where the command is, edit it and press Enter to rerun the command! You can even highlight some text and press Enter, and Logo will happily execute whatever you have highlighted.

If you want the old Listener panel back, I will keep it around for a while, at least in the Web version. Just append ”?old-listener” to the link as in https://weblogo.terrapinlogo.com?old-listener”, and Logo will launch the previous Listener. But be warned that I will remove that Listener before long.

2018/02/01: Breakpoints, Settings and More

Today, Logo received a major internal overhaul. First of all, Logo has become up to four times faster, which will please the more hard-core programmers among you. But wait, there is more:

Breakpoints! Yes, We have breakpoints now. You will soon discover that breakpoints are a fantastic debugging aid. In the editor or debugger panels, just click the line number where you would like Logo to pause. A red dot appears next to the line number indicating that Logo is now monitoring that line. And as soon as Logo hits that line during program execution, it pauses and lets the debugger take over.

You can set a breakpoint at just any line, but Logo will only pause that that line if there is any executable code there. It will not pause if there is no code, or if you click the very first line of a procedure (the line with the TO command. A procedure's code begins at line 2 of a procedure, that's why.

Click on a line again to remove a breakpoint, or, to remove all breakpoints, enter the new BPCLEAR command.

More info can be found here.

Change your settings! The Settings dialog (menu Tools/Settings) now displays the global settings; you can view them there and save them back to Logo. Licensed user can even tell Logo to remember these settings for the next launch! Essentially, the dialog exposes Logo's "PREFS object.

2017/11/30: PLAY notes is back!

I've added MIDI music to Logo. In Terrapin Logo 4, the PLAY command let you play notes and create simple songs. This feature is back, and much more. Select your instrument, play notes and chords, add reverb and other effects, add more instruments (up to 16 at the same time), then save your work as a MIDI file. A whole new manual chapter is dedicated to making music, including the first few bars of Jimi Hendrix' Purple Haze.

2017/11/09: Let the turtles glow!

We have changed this behavior. Now, use the "PREFS property COLORED.TURTLES to make turtles display their pen color.

After having a nice chat with Olivier M., I've added a new feature. You could always have a widget cast a shadow. Use the SETSHADOW command to see a shadow. Now, you can select whether you prefer a shadow, or a glow effect. Set the new widget property GLOW to TRUE to have a glow effect rather than a shadow. Try this:

SETSHADOW 5
PPROP 0 "GLOW TRUE

Keep in mind that these commands work for bitmaps and controls as well.

But wait, there is more. You can make turtles display their shadows in the current pen color! You can set the PREFS property COLORED.SHADOWS to TRUE, and all of a sudden, all turtles that cast a shadow cast it in the current pen color. Controls and bitmaps are not affected, because they cannot draw, and they do not have a pen color.

This is a PREFS property meaning that its setting is recorded when you SAVE your workspace.

2017/10/30: Exciting New Features!

Today, I've posted a new release containing a number of exciting new features!

inobot.jpgInO-Bot support: If you have an InO-Bot, you can create an InO-Bot turtle that drives your InO-Bot as you move your turtle across the screen. You can even draw if your InO-Bot carries a pen. See the InO-Bot manual page for details.

SBrick support: Do you like to work with Lego WeDo to build robots, vehicles and more? We are excited to provide full support for the SBrick, which is a Bluetooth enabled Lego WeDo controller (see https://www.sbrick.com for details). The SBrick manual page has more details.

VIDEO and WEBCAM controls: Would you like to embed a YouTube or Vimeo video in your Logo program? The VIDEO control does this for you. It supports all of the major video streaming sites. And the WEBCAM control displays the video feed of your webcams. So if you have an Easi-Scope, for example, you can display its feed in your Logo program! Our Controls manual page has the details.

Web Bluetooth support: The Chrome browser supports the brand new WebBluetooth technology on most computer systems except for Windows and iOS. You do not need a helper app anymore to access your Bluetooth robots. You can run robots even on your Android devices!

I also posted new desktop releases that fully support Bluetooth, also on Windows. The Windows version is 64-bit only; it cannot run on 32-bit computers anymore. Please go to our Downloads page to download and install a copy.

2017/10/16: A few menu shortcut keys needed to change

I admit that I did not pay enough respect to the Mac version of Logo. Only now, I found out that the Option key together with other keys likes to produce extended characters. This makes a key combination like Option E for the editor panel unusable, because that key produces the Euro sign instead.

Well, sometimes you have to bite the bullet and change the hot keys so they work on all systems. This has now happened. If you are a fan of hot keys, I ask for forgiveness while you learn the new key combinations.

2017/09/03: Pre-Release of Terrapin Logo for the Desktop!

I am excited to announce our pre-release of Terrapin Logo for the desktop! This is an exact match of the Web version, but you have full file handling and other features that you would expect from a desktop program.

But there is more: Once installed, it auto-updates itself. No more hassle with downloading and installing new versions (well, more info is below). An Internet connection is not required once you have logged in for the first time. Please go to the Terrapin Downloads page for the latest copy. Your license code will work just fine with the desktop version as well.

Occasionally, I will have to update the Logo loader itself; this would require you to download and install a new release in order to fix crucial bugs, or to take advantage of new features that are hardware dependent (all hardware drivers reside in the Logo loader itself).

2017/07/30: WHEN: The Swiss Army Knife (OBSOLETE)

UPDATE: The WHEN command has been around for a while, and it turned out that it is way too intimidating for the casual user. Well, Logo is a dynamic language, so I've decided to remove the WHEN command again, and to re-instantiate the event handling via the "EVENTS property list. Please refer to the Manual page about event handling for more info.

OBSOLETE! See above I've introduced the WHEN command to Logo, which greatly simplifies event programming. WHEN lets you tell Logo to monitor any global variable or any property for changes, and execute a runlist when the value changes. For standard events, I have added these properties for you to monitor:

  1. Mouse coordinates: GRAPHICS panel's MOUSE property
  2. Mouse button: GRAPHICS panel's BUTTON property
  3. Touch events: GRAPHICS panel's TOUCH property
  4. Keyboard input: LISTENER panel's KEY property
  5. Menu commands: LISTENER panel's MENU property

Please read the new manual chapter "Working with Input Data" for details.

Please note that the previous way to handle events via the "EVENTS property list is still present; it will, however, be removed in a future release of Logo.

2017/07/25: Connecting to robots

A small, but significant change happened today. If you have been working with Terrapin's robots, you have also launched the Robots Helper Chrome app. For a while, this app offered a list of Bluetooth devices to pick from. As of today, this list has become part of Terrapin Logo itself. You have a new menu item when you select the Tools menu. The Robots… menu item opens a small dialog that lists all robots known to the system (actually it may list other devices, but it is safe to ignore these). Select the robot that you want to connect with and have fun!

The manual page “Connect to Robots” has more details about how to connect to robots.

2017/05/02: New Help

Today, I posted a new, updated Help panel. Now, you can browse the entire Logo documentation, not only the command or property reference. You can read the manual, or skim the Quick Reference. At the top (or to the left if you Help panel is larger), you have the sidebar that lets you select what to read.

Actually, the Help panel now displays the official documentation that we have on this site, and not a subset anymore!

You can enter your command name into the text field at the top, and Logo will search for the command or property. If Logo does not find what you entered, it searches the entire Logo documentation and reports a list of hits.

Logo is somewhat special about what you type. If Logo recognizes your input to be a command or property, it displays the description of that command or property. If the input does not exactly match the command, Logo will start a search. So, if you, for example, want to search for the word (not the command) FORWARD, you will have to trick Logo; add a space as in “FORWARD ”, for example; or use double quotes as in ““FORWARD””.

If you enter multiple words, Logo searches for all occurrences of these words.

Did you know? If you want to use a Logo command that requires a file name, like e.g. SETSHAPE, save the typing! Just drag the files that you want to access from the Toolbox, and drop it either into the editor, or the Listener input field.

weblogo/blog.txt · Last modified: 2019/03/15 14:08 by Michael Daumling