Friday, December 21, 2007

Run Basic RC1 Released

Carl invited me to be a beta tester for his upcoming Run Basic product about 4 months ago.

This week he released Release Candidate 1 to the beta testing group. It's been exciting to see the evolution of RB from Beta 2 through Beta 5 to RC1.

New features that aren't publicly available at www.runbasic.com include:

  1. A new syntax to use objects. (e.g. #object method). You can see the Smalltalk influence and the syntax leverages a Liberty Basic programmer's conceptual model of handles.
  2. An XMLparser object.
  3. A SQLITE object.
  4. A FILE object.
  5. A TABLE object.
  6. HTTPGet$ function that performs an HTTP GET.
Carl stated that there will be a few more release candidates before the official release of the Run Basic Personal Server. There will be an "Enterprise" version available at a later date which should include version control and enterprise database access.

This release will be the most significant event in the Basic programming world since the introduction of Visual Basic for Windows.


Monday, November 12, 2007

Tiny Basic 1.2 Progress

I'm working on the next release of Tiny Basic. Here's the latest list of enhancements:
  1. Added GOSUB/RETURN statements.
  2. Added TITLEBAR statement for the interpreter console.
  3. Increased program lines from 100 to 1024.
  4. Rewrote the MEM code.
  5. Added runtime error handling in the interpreter. It trys to recover to the READY prompt.
  6. Created test program for the interpreter (i.e. primitive unit testing).
Granted that some of these changes are behind the scenes, but I'm trying to increase the robustness of the interpreter without refactoring it into something completely different.

Before I release Tiny Basic 1.2, I still want to add these features:
  1. String variables (i.e. a$ -- z$).
  2. FOR/NEXT loops
  3. Fix known bugs in current version.
The work continues...

Thursday, October 18, 2007

The first BASIC

This blog is about simple computing. I view this from a programmer's rather than a user's perspective. With the BASIC language, though, this line has always been blurred.

Simple computing started in 1963 when Kemeny and Kurtz first designed the BASIC language.

Here is a scanned PDF of the original Dartmouth BASIC manual.

Tools like Liberty Basic and the upcoming Run Basic are the true succesors to Dartmouth BASIC.

There is nothing simple about Java, .NET and the tools festering around these platforms. Powerful, yes. Simple, no. Unlike Visual Basic 6 (and its predecessors), there is no attempt to strike a balance between simplicity and power.

Monday, September 17, 2007

Carl Gundel Interviews

Over the past month, I've found several audio interviews with Carl Gundel. If you are interested in a behind-the-scenes look at Liberty Basic and Run Basic, then these are recommended listening:
  1. Industry Misinterpretations 22: Liberty Basic with Carl Gundel ( mp3).
  2. Shareware Radio Podcast: Interview with Carl Gundel (mp3).

Enjoy!

Thursday, August 30, 2007

Tiny Basic Sieve Benchmark

Compared to the Sieve benchmarks in previous posts, Tiny Basic is very slow. In fact, it's much slower than I anticipated.

I ran Tiny Basic on both the Run Basic public server and Liberty Basic 4.03 on my laptop. Here are the numbers:



After 5000, the Run Basic program exceeded the allowable time on the public server.

The following is the Sieve program. I had to use IF statements because Tiny Basic doesn't have a FOR/NEXT loop yet.

10 REM sieve2

20 REM ported to Tiny Basic from Liberty Basic by David den Haring

30 REM last updated: 8-14-07

40 REM s -- size, a() -- flags array, a -- start time, z -- end time

50 REM i -- loop counter, p -- prime, c -- prime count, k -- temp

60 s = 7000 : i = 1

70 a = ms

80 IF a(i) > 0 THEN GOTO 300

90 p = (i + i + 3)

100 k = i + p

110 IF k > s THEN GOTO 290

120 a(k) = 1

130 k = k + p

140 GOTO 110

290 c = c + 1

300 i = i + 1

310 IF i > s THEN GOTO 400

320 GOTO 80

400 z = ms

410 PRINT c;

420 PRINT " primes found."

430 PRINT "End of iteration. Elapsed time in milliseconds: ";

440 PRINT z - a

450 END

Thursday, August 23, 2007

Tiny Basic v1.1 Released

I posted a new version of Tiny Basic in both the Run Basic and Liberty Basic wikispaces.

Here's a list of new features:
  1. Added a fixed array accessible from the interpreter -- a(1) to a(7001). The size of the array can be adjusted by changing the ArraySize variable in the code.
  2. Added the functions seconds and ms (or milliseconds) for benchmarking purposes.
  3. (LB4 only). Fixed LOAD and SAVE commands. The argument that these commands take is a number. For example, "LOAD 1". The file saved in the working directory will be "TinyBas1".
  4. (LB4 only). Fixed AutoRun feature. If a file exists in the working directory called "TinyBas0", it will load and run automatically when the interpreter starts up.
  5. (LB4 only). Added KILL and DIR commands to round out file management. KILL takes the same numeric argument as LOAD and SAVE. The DIR command has no arguments. It will display a list of Tiny Basic files and the time stamp.
Known Issues:

  • There is no file management for Run Basic yet. The file management code is commented out in the Run Basic version. The FILES command is still missing in Run Basic.
  • The seconds function does not work correctly. It will display milliseconds instead. This is a bug in version 2.27 of Run Basic that I haven't compensated for in the Tiny Basic code. This issue will be fixed in the near future.
  • There is a range checking bug when printing a value in an array. For example, if you type "PRINT a(7005)" and the array only goes up to 7001, then Liberty Basic will display a run-time error message. Range checking works properly, however, for assignment. This issue will be fixed in the near future.

Summary:

The goal of this release was to add enough features to run the Sieve benchmark. I will post the Tiny Basic Sieve program and the results of the benchmark in another post.

Wednesday, August 08, 2007

Tiny Basic tinkering

One of the examples on the Run Basic website is a port of Tiny Basic. It's fun to play with and is very much like the interactive, command line Basics found on early personal computers. In fact, I think Tiny Basic was the dialect used on the TRS-80 Model 1.

I'm currently working on modifying Tiny Basic to run the Sieve benchmark. Tiny Basic needs two things: profiling and array support.

I've already added profiling support for the RUN command. Tiny Basic now displays the running time of a program in milliseconds.

The last step is to add array support. Tiny Basic only supports the numeric variables 'a' to 'z'. I'm adding a single array to the environment in order to port the Sieve program. The array will be called a().

I will post the modified Tiny Basic code to the Run Basic Programming Wiki when finished. The whole point of this exercise, however, is to see how fast the Tiny Basic interpreter runs the Sieve benchmark and compare it to the others in the last post.

Monday, July 30, 2007

Sieve benchmarks

After comparing the performance of Run Basic (Beta) and Liberty Basic 4.03 using the Sieve sample program, I wanted to expand the comparison to include a few other languages. I ported the Sieve program as directly as possible. Here are the test results sorted from low to high:

Find primes from 0 to 7000 (10-run average in milliseconds)
  • Visual Basic 6.0 (0.0)
  • Run Basic (28.8)
  • REBOL (35.9)
  • Runtime Revolution (63.7)
  • Liberty Basic 3.03 (146.8)
  • Liberty Basic 4.04 (170.3)
Find primes from 0 to 1000000 (10-run average in milliseconds)
  • Visual Basic 6.0 (273.5)
  • Run Basic (4164.4)
  • REBOL (4767.2)
  • Runtime Revolution (12421.5)
  • Liberty Basic 3.03 (20381.1)
  • Liberty Basic 4.04 (27732.9)
I ran the 0-1000000 benchmark to get VB off of zero milliseconds for a better comparison.

Friday, July 27, 2007

Run Basic much faster than Liberty Basic 4.03

Just for fun, I ran the sieve2.bas example that ships with LB4. I was a little shocked to find that Run Basic finished about 5-7 times faster than LB4 running on my 1-year-old Dell laptop.

The Run Basic time varied between 23-35ms -- and that's on a public server.

LB4 on my Dell Inspiron 9600 laptop varied between 156-172ms. The Dell is running XP and has an Intel Core Duo (T2300 @1.66GHz) with 1 gig of RAM.

I mentioned this on the Liberty Basic Community Forum and Carl had this to say:

"Run BASIC and LB5 are not only using a new development tool, but their design is fundamentally different than older versions."

Run Basic and LB5 will be worthwhile upgrades if only for the speed improvements.

Friday, July 20, 2007

Missing buttons in Add/Remove Programs applet

One day not too long ago, I started my Add/Remove Programs applet to uninstall an application. To my initial surprise and later horror, all of the buttons were gone. I could view the list of installed applications, but couldn't do anything with them -- no Remove button!

After spending most of the day searching on the web for a fix, I came to realize that many others had the same problem but there wasn't a definitive answer to fix the problem. The point of this post is to give the reader several options to fix the problem.

  • Q: Where did the buttons go?
  • A: It was a corruption of the registry. Keys were deleted. Windows could no longer find the uninstaller associated with the application. Programs like Registry Mechanic cannot fix this problem. I know because I tried.
There are four ways to fix the problem. They are ordered by increasing impact on your computer and possibly your life:
  1. If you have Windows XP, run System Restore. Slowly step backwards in time until the problem is fixed. System Restore keeps backups of your registry. This is what I did to fix the problem and it worked great. I did have to reinstall a few programs that were installed after the problem started.
  2. If you use some other utility to keep backups of your registry, restore it to a point before the problem started.
  3. If you use programs like Norton Ghost or Acronis True Image, restore a backup saved before the problem started. By restoring your disk image, you restore your registry.
  4. Reinstall Windows XP.
That last one could be really painful.

Wednesday, July 18, 2007

Resizable Run Basic code editor in Safari

Have you ever wanted to resize the Run Basic code editor in a way not allowed by the "small/medium/large" settings? For the "large" setting, I typically want it to be longer. The width is OK.

If you run Apple's Safari web browser on Windows or Macintosh, you can resize the code editor (or any text area) by just dragging the lower right hand corner. Very cool.

On Windows, however, Safari is still in Beta and needs a lot of work. Here's a screen shot of an oddly resized editor for demonstration purposes. Click on the image to zoom.




Friday, July 13, 2007

Moving forward

Compared to the rest of the computer world, Liberty Basic moves forward at a slow pace. Glacially slow. But it moves.

Since my last post almost two years ago, here are the most interesting developments:
  1. Liberty Basic 4.03 was released. Version 4.04 is in the works and will run better on Vista.
  2. Assist for Liberty Basic was released. This is an add-on to the IDE that adds profiling, version control, automatic formatting and a few other goodies for professional developers.
  3. Carl now has a partner who is also an active developer.
  4. The newsletter is finished. New content is now on a wiki (http://lbpe.wikispaces.com).
  5. Run Basic is online (http://runbasic.com). It is a Liberty Basic dialect that runs in your web browser. In fact, it sports the new LB5 syntax. Speaking of that...
  6. Liberty Basic 5 is in development and is late due to problems with Carl's tool vendor.
  7. Finally, Alyce Watson has a new book: API's for Liberty Basic (http://www.alycerestaurant.com/apilb/index.htm).
After looking over this list, maybe things are moving along faster than I thought.

I'm currently using Liberty Basic to experiment with the Windows Service Control Manager. More on that later.