Version 16 of Wibble news

Updated 2010-12-23 01:31:09 by AMG

AMG: This page is for Wibble news and announcements. Discussion is welcome, but if it gets lengthy it should be moved to the Wibble discussion page. Announcements prior to the 2010-11-06 are embedded in Wibble discussion and Wibble discussion archive. Detailed change reports are at Wibble change log.

Fetching backrefs...

2010-12-22 - Minor bug fix

Change log: [L1 ]

AMG: I fixed a bug that only strikes when the zone handlers fail to produce a response. This is very minor.

2010-12-20 - Remove ineffective code

Change log: [L2 ]

AMG: JBR pointed out that most uses of [nexthandler] are really no-ops and can be removed. I have now removed them from Wibble and the examples on this wiki. When a zone handler returns, that's the same as if it did [nexthandler $state] without modifying $state. I updated Wibble detailed description to say this.

2010-12-18 - State dicts, AJAX improvements

Change log: [L3 ]

AMG: Along with several bug fixes, I tightened up the way zone handlers work. Now they take a single, unified state dict instead of two request and response dicts. This is cool for (at least) three reasons: One, it rarely made sense to receive a response dict, so why require it? Two, this way custom options don't have to be inserted into and removed from the request dict. Three, zone handlers can create custom dicts inside the argument(s) to [nexthandler], which will be picked up by later handlers.

Of course, custom zone handlers need to be updated in order to work with the new version of Wibble. I've updated all the examples on this wiki.

I also changed the way coroutines are suspended and resumed. Now there's a [suspend] command that takes arguments naming the events that it should wait for. The coroutine will stay sleeping until one of those events happen. The original version of Wibble didn't need this, since there was only one thing that could wake up the coroutine (chan readable). Later I added asynchronous [chan copy], which constituted another event. In discussions with JCW, I found that AJAX can have other events as well. To support AJAX, I unified the interface to suspending and resuming. The [resume] command constructs a command prefix that will resume the coroutine.

I put up a basic AJAX example here: [L4 ].

I updated Wibble detailed description somewhat, incorporating some stuff from Wibble discussion. Also I moved the older stuff from Wibble discussion to a new page, Wibble discussion archive.

2010-11-13 - Non-blocking file transfers

Change log: [L5 ]

AMG: I can't believe I didn't notice this problem before. The [chan copy] invocation blocks until it's complete. I changed it to use the -command option, instructing it to resume the connection's coroutine when it's done. Then I [yield]. The [llength] of [yield]'s return value shows why the coroutine was resumed:

  • llength = 0: Socket became readable. Yield again.
  • llength = 1: Copy completed. Break out of loop and go on to the next request.
  • llength = 2: Copy failed. Error.

Also I put in workarounds for the two bugs currently posted on the Wibble bugs page. I'll back these out again when they're no longer needed.


2010-11-07 - Another new version, already!

Change log: [L6 ]

AMG: I guess I'm making up for lost time; it's been well over a year since my last big update. This update isn't nearly as big as yesterday's, but it's still progress.

I added another zone handler called script that's meant as a companion to template. Previously they were combined into a single template zone handler.

I made the vars zone handler much nicer, and error reporting is nicer too. They now share a common library routine to format the request data.

I added a few more keys to the request dictionary (time, rawtime, port).

PUT is gone.


2010-11-06 - Reorganization, new version

Change log: [L7 ]

AMG: Tired of having one giant page for everything Wibble, I reorganized into several pages.

This level of content shuffling would make RA2 happy, but I figured I'd avoid one of his major mistakes and let the Wiki do the indexing work for me. All Wibble-related pages link to Category Wibble, whose backrefs are conveniently repeated on the main Wibble page. But I can't have everything. Page history suffers, since it obviously doesn't carry over to the new pages. For history prior to today, see [L8 ].

I took this opportunity to publish the latest version of Wibble, found at Wibble implementation. You may notice that I turned off syntax highlighting for that page. Trust me, the syntax highlighting made the code far less readable (scroll through [L9 ] to see what I mean). We need to fix that. :^(

The new version digs deeper into the headers, breaking them into lists and dicts. Among other things, this made POST file uploads possible. That's another new feature I've added. I don't know if I'll ever support PUT; does anyone even use PUT? If no one speaks up, I'll drop it entirely.

I think I have more writing to do: updated documentation, new examples, etc.