Sunday, May 04, 2003

All of the Liberty Basic newsletters are now in one convenient location.

The May edition (NL108) of the newsletter has been published. This edition and many of the old ones can be viewed online. This is a first for the Liberty Basic newsletter. They used to be published as a text file.

Sunday, April 13, 2003

The latest edition (NL107) of the Liberty Basic Newsletter is on the virtual newsstand.

It's free and a great resource for all levels of programmers. The previous 106 newsletters are also available at no cost.

Saturday, March 22, 2003

Liberty Basic 4 is now in Alpha testing. It looks like it's going to be a big step forward for the language. Here's a brief list of the new features:
  1. True global variables. (declared using the new global keyword)

  2. Passing arguments to a sub or function by reference. (I complained about the lack of this feature in LB3 about 4 posts ago.)

  3. Handle variables and the new maphandle command. (liberation from static handles to windows, controls and files)

  4. Dynamic evaluation of Liberty Basic code inside of a running program. (eval returns a numeric value and eval$ returns a string value)

  5. Subroutines can now be used for event handlers. (a better choice over branch labels for large programs)

There are many other enhancements, but these are the big ones. The IDE also has a new feature that lets you create tutorials or lessons using a three-pane window. On the left pane is the outline of the lesson. On the upper right pane is the lesson text. On the lower right pane is LB code that can be run by the user. The lessons can be created in the IDE and stored as lesson files with an lsn extension (i.e. tutorial1.lsn).

Some people have called Liberty Basic the language for the masses. Carl strives to keep the language easy to learn and fun to use. He markets to beginning programmers and hobbyists, but as the years roll by LB is moving slowly into the realm of the professional. I welcome this direction, but I hope that the personality of the product is not lost in new complexity. A lesson from current events is Microsoft's VB.NET. The Visual Basic I know and love is nowhere to be found in this new product. VB.NET is just C# with VB-like syntax.

Sunday, March 09, 2003

I upgraded my old Dell Dimension from Windows 98 to Windows 2000 this morning. It was an "upgrade", not a "clean install".

When I first ran Liberty Basic 3.02 under the new OS, the title bar showed that it was not registered. Entering my license number again fixed the problem, but it was an unusual side effect of the upgrade.

It makes me wonder how Carl is storing that license number.

Thursday, March 06, 2003

Yesterday, Carl released the first alpha of Liberty Basic 4!

Those interested in helping Carl test LB4 should go to the Liberty Basic Forum. Join the Liberty Basic 4 Alpha Testing forum. There is a link to download LB4 in Carl's first message.

More to come on LB4's new features!

Sunday, March 02, 2003

The latest edition (NL106) of the Liberty Basic Newsletter has just been published. Two articles really peaked my interest:
  1. Using SQLite Database Manager in LB by Colin McMurchie. Unbelievably simple API access to the SQLite database. This embeddable database is in the public domain, and after a first look it seems to be a good fit for the Liberty Basic programming world.

  2. What I Did With The !Locate Command On My Summer Vacation by Tom Nally. Tom creates a Hypercard-like stack using Liberty Basic's !Locate command. Basically, controls are located off-window and moved into place when needed. Doing this type of GUI work by hand is tedious, but a "stack creation" tool could automate most of the drudgery. I wonder if this idea could be used for FreeForm. Building a GUI with real controls is better than FreeForm's graphically drawn controls.

Monday, February 03, 2003

Despite the fairly recent addition of real functions and subs to the language, Liberty Basic still pushes you to use the old gosub/return construct. This pressure is not obvious until you're actually writing programs.

Let's see how the pressure builds:
  1. Parameters passed to a function or sub are "by value". This means that a copy is made and no changes can be made to original variable in the function call.

  2. Global variables are not visible in a function or sub with the exception of arrays, structs, handles and system variables.

  3. Sometimes you need to return more than one value.

  4. Using single-dimensioned, 1-element arrays as global variables is ugly.

  5. The cleanest solution is to make the code global as a chunk of gosub/return code.

This might be a partial answer to the question I had about why so many Liberty Basic programmers keep on using this construct instead of switching entirely to functions and subs.

There are a few things that require functions -- recursion and useful code libraries.

Thursday, January 30, 2003

The purpose of this blog is to talk about Liberty Basic in particular and computer science in general. Liberty Basic is an easy to use Windows dialect of the BASIC programming language. It's written in Smalltalk by Carl Gundel.

Liberty Basic 3.02 can be downloaded as shareware at the official website. There is no expiration, but programs can't be larger than 250 lines of code and they can't run outside of the LB editor. It's a reasonable limitation. The Silver registration ($29.95) removes the code size limit and popup reminders. The Gold registration ($49.95) adds the ability to create standalone applications that run outside of the editor.

Future posts will both praise and bash this venerable tool. It has been around for 10 years, first as a 16-bit language and now as a 32-bit language.

As a computer professional, its limits can sometimes be frustrating, but even so it remains the most "fun" language in my tool chest.