- I anticipate we're going to need a promises-like abstraction (like what
whatsxmpp had), because sending and receiving stanzas is by nature async.
- So I NIH'd one to avoid having to import blackbird, and we now use it
for IQ-GET.
- This has the rather nifty effect that we can use the "join" abstraction
provided to only populate *SERVER-FEATURES* once both IQ-gets (self, server)
have returned!
- clgc_stanza_get_children now works properly, after fixing 2 dumb errors (it
was in hindsight a miracle that it worked at all)
- We now send a disco#info to the server on connect and store the list of
returned features in *SERVER-FEATURES*.
- Instead of using ECL_HANDLER_CASE (which caught way too many conditions and
broke things like the SLIME debugger), we now use ECL_RESTART_CASE to make an
ABORT restart, and override ECL's default debugger with our own that prints
the condition it gets and invokes this restart.
- Note that if e.g. the SLIME debugger is running, the whole of weechat is
halted waiting for it to complete (!)
- libstrophe logs now get handled in Lisp instead of C.
- We now make sure all of the WEE-IMPL functions are defined *before* loading
the support library.
- We also trim blank lines from our gray stream implementation used to forward
output to Lisp.
- We now have some bindings to libstrophe's stanza creation and getter
functions.
- Stanzas coming from C->Lisp get all of their properties (children,
name, attrs) read out as Lisp objects when crossing the FFI
boundary. You can't currently mutate them, but it's unclear when
you'd really want to do that.
- Lisp code can create stanzas by instantiating a NODE-STANZA or a
TEXT-STANZA, which creates a libstrophe stanza behind the scenes and
does the necessary libstrophe calls to add all the Lisp properties
to the C object.
- The STANZAIZE macro is a nice CXML-style overlay to make stanzas in
Lisp.
- (and it's possible to verify its function with RENDER-STANZA, which
is libstrophe-backed!)
- A Gray stream is used to redirect *STANDARD-OUTPUT* and *ERROR-OUTPUT*
to weechat's weechat_printf() function, so it doesn't mess up the
terminal (and you can actually see it, too).
- An *incredibly* hacky support file to make Emacs' SLIME/SWANK work is
now included.
- This required hacking up SWANK's :FD-HANDLER support to integrate
with weechat's event loop.
- The WEE-IMPL::HOOK-FD function can be used to register a callback
when a given file descriptor is readable.
- However, the SWANK code is architected rather stupidly, and needed
some bodging to get everything to work.
- This can and should be done more cleanly in future.
- Also, attempting to do 2 connections currently crashes WeeChat...
- Like in danger-bird2, some Common Lisp gets compiled at weechat build
time into a static library, which gets linked in to the final binary.
- This required some cmake trickery to get it to actually do the thing.
- As a proof of concept, we now get the "plugin loaded" message to be
printed from Lisp, with the ECL version chucked in as a nifty trick.