Tag Archives: unix

FRIBBLE, a SPITBOL program to play word games such as Word With Friends, now available

The FRIBBLE project is pleased to announce its first release V17.1.30, available at Fribble Project.

FRIBBLE is written in SPITBOL, and uses a brute-force approach, trying all possible moves, to play WWWF.

Fribble can be run in three ways: to play against itself, to play against you, or to help you play a game with a foe, with Fribble finding your moves.

The code speaks for itself. Speaking for my self, I can say that I have never had more fun writing a program than I have had writing FRIBBLE.

FRIBBLE is also my first program inspired by an election.

I was an obsessive follower of the recent presidential election, spending more time than I care to admit on Twitter, reading blogs, listening to podcasts, and so on.

After the election, looking for a more productive and entertaining form of amusement, I started playing Words With Friends, an online version of Scrabble. My foe was a fellow IBMer and friend who said he was quite good at WWF.

Indeed he is. We have played many games and I have yet to beat him. Often his score is 50% higher than mine.

Soon after I realized I was unlikely to ever win a game against him, I though of using my programming skills to see if I would write a program that could play WWF.

Fribble, representing just over two months of the most fun I have yet had writing a program, is the realization of that goal.

What has made the writing of Fribble such fun is the realization that it is as close to an ideal demonstration of SPITBOL as I have yet seen. Everyone knows about games such as Scrabble and WWF, and dealing with strings, words, lines of text, dictionaries, and all that such games involve, is the perfect grist for SPITBOL’s mill.

Though the program is largely done, I plan to continue work on it by using it as a way to teach SPITBOL as a first, or at least early, programming language.

Dave

Advertisements

Unix SPITBOL 13.05 Released, With Support for Unicode

The SPITBOL project is pleased to announce that Unix SPITBOL 13.05 is now available.

It can be downloaded from http://spitbol.googlecode.com/files/spitbol-13.05.tar.gz.

This release includes versions of SPITBOL for both ASCII (8-bit characters) and Unicode (32-bit characters).

The Unicode version of SPITBOL (uspitbol) uses 32-bit characters internally. Character strings are converted from UTF-8 encoding to 32-bit characters when input from the command line, the operating system environment, a pipe, or a file opened in line mode. Character strings are converted from 32-bit characters to 8-bit characters in UTF-8 format when written to a file opened in line mode, a pipe, or when passed as an argument to an operating system procedure.

Program source files, which are read by SPITBOL in line mode, may thus contain UTF-8 format Unicode characters in strings and comments. Identifiers are still restricted to ASCII.

Unix SPITBOL 13.01 Released

The SPITBOL Project is pleased to announce that Unix SPITBOL 13.01 is available.

It can be downloaded from Github: HARDBOL/SPITBOL:

13.01 tar.gz

13.01 zip

This release supports floating-point arithmetic and save files. Load modules and the loading of external functions are still not supported.

Linux: The Last OS Standing

One of my favorite films is Akira Kurosawa’s Yojimbo. It stars Toshiru Mifune, who plays a lone samurai who comes into a town where two factions are feuding, and then skillfully plays one against another until he is the last man standing, so it’s no surprise that the film was (poorly) remade as Last Man Standing, starring Bruce Willis, in one of his worst films (all gore, no subtlety, which was the point of Yojimbo.)

I was reminded of this while doing a cleanup/refactoring of the code for Macro SPITBOL.

There has been almost no work on SPITBOL, save the port to Linux, in the last decade. Most of the code has been stable since the mid 80’s, save for ports to different architectures.

SPITBOL has a run-time interface written in C. While perusing this code I noticed the code had conditional text for various operating systems: AIX, BSD, LINUX, SOLARIS, and WINNT. Not Windows, but WINNT, a sign of the age of the code.

I then decided to clean up the code. There was no need for SOLARIS. It’s dead, though its new owner Oracle has not yet addmitted it.

AIX is also an outlier OS now, used only in large servers, so that went next.

BSD, UNIX and LINUX are all variants of UNIX.

That left WINNT. I then realized that, while much of the WINNT code would probably still work, I had absolutely no intereset in supporting it. That’s because Microsoft has not made any meaningful innovation, at least when it comes to Windows, in the last decade or so.

One thing (is it the only thing?) Microsoft does well is to support previous versions of its various OS’s, going all the way back to DOS. For example, the Windows/WINNT version of SPITBOL, last touched over a decade ago, still works, and so is in my view sufficient for Windows users.

I thus edited the source so there is *no* conditional text to distinguish operating systems, because there is only *one* OS of interest. It runs everywhere, and is where operating system innovation can still be found.

So I deleted *all* the conditional text, and changed the source to just use “Unix” instead of “Linux” in the version/achitecture description.

Needless to say doing that edit was a lot of fun. Bye bye, SOLARIS. Bye, bye AIX. Bye, bye Windows. Just Unix is enough for me.

The remaining issue is what hardware to support.

I see only two architectures of interest: X86 and ARM. SPITBOL supports X86 now, and I will port the system to ARM within a few months.

This is one result of working on legacy code. It gives you a sense of what was once important, but no longer is.

It also gives you greater appreciation for the survivors, and all the hard work behind them.

  • Pages

  • October 2017
    M T W T F S S
    « Apr    
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    3031  
  • RSS The Wayward Word Press

  • Recent Comments

    mrrdev on On being the maintainer, sole…
    daveshields on On being the maintainer, sole…
    James Murray on On being the maintainer, sole…
    russurquhart1 on SPITBOL for OSX is now av…
    dave porter on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated