January 7th, 2008

This is a bug fix release.

  • When playing a closed game, the plugin no longer uses PHP sessions. This avoids problems with PHP configurations where output buffering is disabled (thus preventing cookies from being set correctly in the plugin) - this would manifest as an inability to post a move in a closed game. Note: this requires the WordPress nonce feature, which was introduced in WordPress 2.0.2.
  • When playing a closed game, users with Contributor access or lower (or those without the unfiltered_html capability) no longer corrupt the special div tags in the post after posting a move.
  • For closed games, players are now only required to have the Subscriber role. Unlike the previous version of the plugin, this should work in versions of WordPress prior to 2.2.
  • Draw offers, acceptance, and refusal should now work as intended.
  • A bug which allowed a player to force an opponent to castle in certain circumstances has been fixed.

As usual, here is the Chess By Blog blurb page.

And here’s the download - ChessByBlog-1.0.3.zip, 213 KiB.

Please post any questions or issues in the comments. Happy chess playing!

Giraffe at Woodland Zoo, Seattle

We finally shipped PRMan 13.5 yesterday. Wow, has it been that long in gestation? Just about as bad as giving birth to a giraffe.

The toughest release I’ve ever had to work on; and that included 13.0, the first multi-threading capable release. (And I moved in the middle of 13.0.) February and March of this year were particularly killer months. I was a particularly mean SOB during that period, and not too proud of it. Refactoring a lot of code and redesigning rendering algorithms in multi-threading land does that to you. Anyways, I’d take a bunch of time off now, but there’s the small matter of getting another dot release out the door within a month to wrap up some ends here and there. And so the software treadmill churns along..

Three smallish reasons why last weekend was not, in fact, the best weekend ever:

  • I took the dog to the vet and got her the one shot I wasn’t supposed to get (live vaccine, dangerous to immuno-compromised sweeties). As a result, Kaylee was quarantined from Susan until yesterday.
  • Susan fainted. Very scary. I’m glad she’s okay.
  • I hit a jogger while driving, turning right around a corner. Just nudged him, braked hard thankfully. I like to think I wouldn’t have run him over even without Susan yelping a warning, but I wasn’t looking right when he came jogging along. I’m bad like that. Fortunately the jogger was nice enough not to sue my ass over the incident.

Just one more day to the long weekend. Should be a marked improvement.

August 26th, 2007

Another new release!. Here’s the changelist:

  • Full support for Forsyth-Edwards Notation (FEN) has been added via the FEN tag. This allows for arbitrary positioning of pieces on the board.
  • Fischer Random Chess (aka Chess960) is now supported. You must specify the opening layout via a FEN tag. The castling rules specific to this variant are handled correctly.
  • Capablanca chess is now supported. The Archbishop and Chancellor pieces have been added. Capablanca Random Chess is also supported. Caveat: arbitrary positioning of the first rank is supported, but castling always follows Capablanca Random Chess rules (i.e. the King ends up on the c or i files). This is at odds with Capablanca-derived variants such as Embassy Chess.
  • Limited support has been added for arbitrary board sizes; the plugin detects the implied board size based on the FEN tag. Note that en passant, castling, and pawn promotion makes some assumptions which change based on the board size, and not all chess variants will work correctly.
  • For persistent games, users now only require Contributor access, not Editor access, in order to play the game. Note that this will only work with WordPress 2.2; users in WordPress 2.0 and 2.1 still require Editor access due to WordPress issues.
  • Because of the potential castling ambiguity caused by the random chess variants, castling must now be done via the new buttons, rather than by direct manipulation of the King piece on the board.
  • A bug in en passant capture has been fixed.
  • The server side now correctly escapes text before posting moves to the database. Previously there were SQL issues preventing some posts from being updated correctly.
  • Various cross-browser/platform user interface glitches have been fixed.
  • The default icons are now 32×32 instead of 44×44.

As usual, here is the Chess By Blog blurb page.

And here’s the download - ChessByBlog-1.0.2.zip, 212 KiB.

Please post any questions or issues in the comments. Happy chess playing!

August 25th, 2007

José Raúl Capablanca invented (or at least popularized) a chess variant played on a 10×8 board and named after him: Capablanca chess. There are two new pieces in it: a chancellor that moves as both a rook and a knight, and an archbishop that moves as both a bishop and a knight. These are pretty powerful pieces; for example, the archbishop can checkmate by itself (opposite king in a corner, archbishop two diagonal squares away).

While working on some user-requested features for Chess By Blog, I realised that supporting Capablanca chess wasn’t going to be a big deal. Behold:


Note that this isn’t quite the first rank layout that Capablanca envisioned; this is the layout for Embassy chess, itself a variant on Capablanca chess. (Confusing matters further, I’ve implemented the castling rules in the applet to follow Capablanca random chess.) Anyways, check it out on the board above. I haven’t played it against anyone yet, but so far it seems like the two new pieces make for a very different opening game from standard chess: the archbishop and chancellor wreak havoc on the midboard early since they jump over the pawns immediately. Very interesting!

On track for a Chess By Blog 1.0.2 tomorrow or Monday.

June 24th, 2007

A new release, fairly minor. Here’s what’s changed:

  • Now compiled with Google Web Toolkit 1.4 Release Candidate. This automatically fixes the issue whereby viewers can get to your blog from different addresses (i.e. http://levork.org instead of http://www.levork.org) fail to see the chess board due to the Google Web Toolkit’s enforcement of the Single Origin Policy. There are also some speed and size enhancements that automatically come along with the upgrade.
  • The “bouncy resize” of the initial board seen by users of Internet Explorer 6 and 7 has been addressed.
  • In closed games there is now the ability to offer, accept or refuse a draw; also to resign.
  • Games which end in a draw, stalemate, checkmate, or resignation now automatically update the “Result” tag in the PGN.
  • An issue where “+” and “++” was stripped out of the PGN has been fixed.
  • The PGN parser was unable to handle moves ending in ‘=’ (indicating stalemate); now fixed.
  • The one-hour timeout between page view and move post is now reset with each move.

Here is the Chess By Blog blurb page.

Here’s the download - ChessByBlog-1.0.1.zip, 206 KiB.

Please post any questions or issues in the comments. Happy chess playing!

April 20th, 2007

I think it’s ready for release!

Here is the Chess By Blog blurb page.

Here’s the download - ChessByBlog-1.0.0.zip, 212 KiB.

Please post any questions or issues in the comments. Happy chess playing!

Screen capture of Chess applet written with GWT

My brother-in-law and I have been playing chess by e-mail for the last few months. This has been less than optimal: we use the old style English notation rather than algebraic notation, and he sets up a real board while I use Apple Chess, so there’s always some transcription from mail to board. Invariably one of us (usually me) gets something wrong, and we end up backtracking through mail history or making a stupid move that we didn’t intend.

We looked at web interfaces for chess by e-mail gateways, and none of them worked out acceptably for both of us. So finally I decided I’d program something. I decided to put together a client side using the Google Web Toolkit; I plan to integrate the back end with Wordpress as a PHP plugin.

The Google Web Toolkit (GWT) is pretty neat, even without diving into all the AJAX/RPC stuff which I might not need for this project. You program the client side in Java, using the GWT-supplied emulation of java.lang, java.util, plus their own classes which provide UI elements and control over the browser object model. During development, the GWT environment runs your code in a Java-enabled hosted browser; once done, it compiles your code into browser-specific Javascript. No Java plugin required.

The result of hacking this weekend: a Chess applet that runs in a browser. The applet itself is about 61 KiB depending on browser, plus 16 KiB for Google-supplied base code. You can play a new game on a blank board here. All chess rules except for pawn promotion are handled, including en passant and castling - you shouldn’t be able to input an invalid move. (If so, it’s a bug! Please let me know.) It should detect check, checkmate, and stalemate (by lack of move) correctly, and the game log should be maintained in proper algebraic notation. The applet can also load a movelist in PGN format (or at least a good subset of it), embedded directly on the web page - for example, here’s Fool’s Mate in 4 moves, view the page source to see the original PGN. For a more interesting problem, here’s Reshevsky vs. Fisher, 1970, black to move and win.

I burrowed the icons from XBoard, themselves generated from a METAFONT font. I noticed Wikipedia has SVG versions derived from same.

The Google Web Toolkit does have a few quirks. No java.util.StringTokenizer, but String.split sort of covers that. It also doesn’t completely cover cross-browser issues. I noticed some differences between regular expression handling (or maybe it was actually newline or whitespace issues in TextAreas), and because of Internet Explorer stupidity (lack of CSS support for min-width), and because I couldn’t figure out how to size an element after an image had guaranteed loading, I couldn’t successfully achieve my goal of getting all sizes and images controlled completely by a style sheet. I still have a ways to go before the client UI is as clean as I want, and with all the chess rules pushed to the client side, it isn’t as optimal as it should be. For example, you may have gotten a script incomplete warning while loading the last page: it’s churning through a lot of possible moves while dealing with PGN notation. Then there’s figuring out how to integrate this all with Wordpress properly. Once this is all done though, David and I can finally be rid of my KP1-KP3 gaffes.

March 11th, 2004

New l2rib release! I should win some sort of award for rampant abuse of RiTransformPoints for it. Now that the more egregious bugs are fixed, maybe someone will actually send me a picture rendered using this thing.

June 5th, 2003

Since I graduated from David Thompson ten years ago this month, expect maudlin reminiscing about high school over the next few weeks. I expect commentary from anyone involved. (You know who you are.)

My mom’s kept around a lot of my papers from around that time which I asked to be shipped down when I moved to Seattle. When I finally started sifting through them lately, I came across the following gem: my Computer Science 12 grades, first time around (I took it in grade 10).

Playing Scrabble with high school comp sci grades

I’d totally forgotten about this. I’ve been trotting out my linear algebra grades in university as an example of my academic ineptitude, but I think this takes the cake. So what happened? Well, I didn’t quite “get” functions back then. I’d aced CS 11 the year before, and what little programming we’d done was accomplished in QuickBasic, without ever using functions - not that this wasn’t possible in QuickBasic, we just never got around to covering that subject. So when we were introduced to Turbo Pascal in CS 12, I just could not make that mental leap to the world of FUNCTION and PROCEDURE. Why on earth would people need to write code this way?

This sounds enormously stupid twelve years after the fact, but that really was the turning point in that course for me. After I got stuck on functions, I more or less gave up. We never even got close to using the object oriented features in Turbo Pascal so I don’t recall what else was covered. It couldn’t have been that much. (Bubble sorting?) I guess it didn’t help that I think I skipped more than half of the classes towards the second half of the year. There’s certainly no way I only missed zero and two days in the second and third terms like my report card says. We’d worked out a system where someone else would say “Here!” when Mr. Turley did roll call. I don’t think he noticed - or more likely, he just didn’t care; there were at least four of us gone each class, all of sitting consecutively in a row next to the printer right next to the teacher’s workstation.

Two years later I did take CS 12 again and more than made up for that glaring ‘P’ on my transcript. In between though, the curriculum hadn’t changed a single bit. (Thankfully, it was a different teacher.) So I ended studying for the AP exam on my own - and the AB level of CS tested some basic data structures, which involved this trivial middling concept called “pointers”. Yet another gigantic stumbling block for my addled brain to deal with. Why would anyone want to know the address of a variable when they already had a name for that variable? Why on earth would people need to write code this way?

Ever hear those programmers who claim they’ve been hacking on computers, ever since elementary school? And how it came naturally to them? Well, that sooo wasn’t me. It was uphill all the way, baby.

October 14th, 2002

Anyone looking for l2rib should note that I finally fixed the download links. The files they used to point to were certainly present on mac.com’s disks, the corresponding web service was just refusing to acknowledge their existence - until I shortened the filenames. Sorry about that.

By the way, I’m also aware that the address www.levork.org/l2rib.html actually doesn’t point at the right page; it gets you back here. Unfortunately I can’t do much about that for now - the URL redirection service at register.com isn’t very intelligent.

So, has anyone besides me actually made a picture with this thing?

© 1999-2008 Julian Fong