Progress: Web Stack Implemented
My copy of the Links interpreter is now capable of serializing a control stack along the lines of what I called for on Monday.
I have a working demo of a login routine. You can call this routine and it will:
- return a login form to the caller, with the form/@action bound to the continuation of the routine itself.
- on post, check the username/password; if they are incorrect, recurse, displaying the form again
- if username/password combo is correct, return to the caller.
This way, various callers can invoke the login routine and it will keep track of the context where it was called—you don't have to tell it explicitly.
In working with this I've become aware of just how confusing it is to work with explicit first-class continuations. I'll be working on offering a better syntax for that.
To get precisely the feature outlined in Monday's post, I need a way to get and set the cookies—but I'm going to defer that as I think the syntax issue is more interesting.