Monthly Archives: July 2009

Executables for SPITBOL for Microsoft DOS and Windows now available

The DOS and Windows ports of SPITBOL are now available on the SPITBOL Downloads section

The DOS version is S.COM. This is 16-bit 8086 version and can be run under Linux using the package ‘dosqemu.’

The Windows version is SPITBOL-3.7-win.exe. This is 32-bit version and can be run under Linux using Wine. You also need to download 32RTM.exe to run this program. I don’t know why. I just know SPITBOL complains if it is not present.

These are the *only* executable versions of SPITBOL at hand. S.COM dates back to 1983. SPITBOL.exe was last updated a decade or so ago.

Both are as fast as the wind, and a Linux version should be available shortly. 🙂

My First Computer: The Geniac, 1958

While poking about the web I located my first computer, The Geniac. See also this entry in the Old Computer Museum web site: Geniac picture

I can recall building most of the circuits, especially the one that played tic-tac-toe.

There is was a Geniac for sale on ebay: Geniac Vintage Computer Edmund Berkeley Simon.

I just bought it!

It turns out the buyer lives nearby and I hope to pick it up in person.

I had a lot of fun with that computer — back around 1958 — over fifty years ago.

I’m still having lots of fun with computers — except when I have to use Microsoft software.

My first Geniac cost less than $20. My second Geniac just cost me $320.

That is less than $100 more than the cost of a copy of Microsoft Windows Vista Ultimate SP1 – Retail from Newegg.

The Geniac boots up much more quickly. Just flip the switch on the battery, and away you go.

And you don’t even need the Internet to install new updates every other day…

One Million Lines Per Minute: SPITBOL/386 times for tokenizing and code generation

I’m making good progress on producing a version of SPITBOL for Linux.

One sign I’m on the right track is the performance that PC-SPITBOL delivers when run on Linux using Wine.

The translation is done in two steps.

The first step tokenizes the input, puts the operations in a standard form and drops the comments. This takes about 0.8 seconds to scan 31,000+ lines of MINIMAL source for v3.7, and produces just over 12,000 lines of tokenized instructions. This corresponds to about 2,325,000 lines/minute.

The second step generates assembly code for 386 for the 12,000 instructions. This results in 14,000 386 instructions and takes about 1.4 seconds. The scales up to about 500,000 statements/minute for the code generation phase.

The combined phases take just over 2 seconds to translate 31,000 lines of MINIMAL to 14,000 386 instructions. This corresponds to about 930,000 source lines per minute.

Not bad for a program written over 25 years ago.

And that’s before doing any tuning…

SQL No, Set Theory Yes

Slashdot just posted a story about a “nosql” conference, Enthusiasts Convene To Say No To SQL, Hash Out New DB Breed.

The “nosql” folks seem to agree with me that SQL is fundamentally wrong.

However, a quick look at some of the presentations to be found at NOSQL debrief suggests they are missing a key point.

The presentations lament the problems with SQL in today’s world, and make mention of some of the latest buzzwords such as “JSON,” “REST” and “Log-structured Merge Trees.”

I suggest the answer is not be found in a mashup of hot new technologies but by going back to the basics.

That would be mathematics.

If set-theory is good enough for mathematicians shouldn’t it be good enough to describe what you want to retrieve from a database?

Get the basics right, and all the rest will follow. This is a much better approach than working backward from technology to determine how the user should construct a query.

PC-SPITBOL for Intel 8086 DOS Now Available

I just located my copy of PC-SPITBOL for the IBM PC, 8086, circa 1983. This is a 16-bit version.

It can be downloaded here.

Here are some pictures of the manual and a screenshot showing PC-SPITBOL starting up:

PC-SPITBOL Manual, 1983

PC-SPITBOL Manual, 1983

2009-06-NM-TREK 146

I did comparative runs of PC-SPITBOL 8086, SPITBOL/386, and CPython, using Cygwin on Windows XP:

CPython 55 seconds
SPITBOL/86 15 seconds
SPITBOL 8086 22 seconds

The numbers speak for themselves. PC-SPITBOL, written in 1983, is almost three times faster than CPython. SPITBOL/386, created over a decade ago, is more that four times faster than CPython.

Screenshot showing comparative times

Screenshot showing comparative times

Here are the test programs:
Python:

def add(a,b):
 return a+b
def sub(a,b):
 return a-b
n = 0
limit = 1000000
limit = limit * 50
trips = 0
for i in xrange(0, limit):
    m = add(n, 1)
    n = sub(m, 1)
    trips += 1

PC-SPITBOL, 8086, 16-bit:

 &stlimit = -1
 define("add(a,b)") :(add_end)
add
 add = a + b: (return)
add_end
 define("sub(a,b)") :(sub_end)
sub
 sub = a - b: (return)
sub_end
* repeat for limit1 * limit2 * limit3
 n = 0
* limit = 1000000
* limit = limit * 50
* variant for 16-bit spitbol, need to keep numbers small
 limit1 = 10000
 limit2 = 100
 limit3 = 50
 trip3 = 1
lp3
 trip2 = 1
lp2
 trip1 = 1
lp1
 m = add(n, 1)
 n = sub(m, 1)
 trip1 = trip1 + 1
 le(trip1, limit1) :s(lp1)
 trip2 = trip2 + 1
 le(trip2, limit2) :s(lp2)
 trip3 = trip3 + 1
 le(trip3,limit3)  :s(lp3)
 output = limit1 " " limit2 " " limit3
end

SPITBOL/386, 32-bit:

&stlimit = -1
 define("add(a,b)") :(add_end)
add
 add = a + b: (return)
add_end
 define("sub(a,b)") :(sub_end)
sub
 sub = a - b: (return)
sub_end
 n = 0
 limit = 1000000
 limit = limit * 50
 trips = 0
lp
 m = add(n, 1)
 n = sub(m, 1)
 trips = trips + 1
 le(trips, limit) :s(lp)
 output = trips
end

There is a bug in the “sourcecode” function in that right parenthesis followed by a colon is deemed to be a “smiley face” and so rendered as an image. I find this so charming that I have left it in.

  • Pages

  • July 2009
    M T W T F S S
    « Jun   Aug »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • RSS The Wayward Word Press

  • Recent Comments

    Sahana’s Respo… on A brief history of Sahana by S…
    Sahana’s Respo… on A brief history of Sahana by S…
    James Murray on On being the maintainer, sole…
    James Murray on On being the maintainer, sole…
    mrrdev on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated