[armedbear-devel] MQTT example using ABCL and Eclipse Paho

Frederico Munoz fsmunoz at gmail.com
Mon Jun 24 14:50:20 UTC 2013


Hi all,

I have written a simple example of using the Eclipse Paho libraries, via
ABCL, to send messages in Common Lisp using MQTT. I will not write much
more here since it's in the article which contains the code and some
other considerations: http://finisterra.motd.org/?p=237 

As I note I initially did this in Clojure so - and just like my
experiments with Swing before which I sent to the list as well - this is
in a way a comparison on how the interop facilities work. My code is not
exactly stellar (either the Clojure or the CL one) but it is, I hope,
easy enough to understand and follow, especially since I couldn't found
any other example out there, which is why I thought the list could have
some use for it (even if only for future reference).

I stumbled a bit on getting the command-line arguments but that was due
to my custom-made abcl script end with $@ instead of "@" - something to
watch for :)

I had one problem that I found weird and which I would welcome any help,
I'm not sure why the following works:

    CL-USER(3): (#"currentThread" 'Thread)
    #<java.lang.Thread Thread[interpreter,5,main] {BD30B16}>

... but the following doesn't:

    CL-USER(4): (#"sleep" 'Thread 100)
    #<THREAD "interpreter" {19AA4D78}>: Debugger invoked on condition of type ERROR
      no such method
    Restarts:
      0: TOP-LEVEL Return to top level.

For another short demo I have I will need to subclass, something used in
Swing programming a lot from what I could understand. If I'm not
mistaken this isn't currently supported in ABCL, but I will read on it.

Best regards,

Frederico




More information about the armedbear-devel mailing list