Tag: Swiften

XMPP Scripting with Sluift

Did you ever want to find out what XMPP clients people in your contact list are using? Do you want to migrate your contact list from one server to another, but don’t want to provide your password to some on-line service to do that? Do you have some XMPP-related task you quickly want to write a script for, but don’t want to deal with complex asynchronous APIs? Well, Sluift may be just the thing you are looking for!

Sluift is a Lua-based script layer on top of the Swiften XMPP library. It provides a simple API to do common XMPP tasks, either interactively (through an XMPP console), or by running a script in batch mode. In this post, we’ll go through some examples of what you can already do with Sluift today.

Continue reading →

Posted in Programming and Swift | Tagged Jabber, Lua, Sluift, Swift, Swiften, and XMPP

Swiften on Lambdas

One of the cool new features of the upcoming C++ (0x) standard is support for lambda expressions, providing functional-style inline function declarations. After seeing Herb Sutter’s PDC 2010 webcast on lambdas, I wanted to try this out on Swiften, the XMPP library behind Swift. I adapted the introductory EchoBot example from XMPP: The Definitive Guide, and ported it from Python to a C++ application using Swiften. The result is surprisingly clean.

Continue reading →

Posted in Programming and Swift | Tagged C++, C++0x, CLang, GCC, Herb Sutter, Jabber, Lambdas, Swift, Swiften, Visual Studio, and XMPP

More squishy data

After Tobias Markmann told me that he was running into resource limitations with a Swiften-based tool for testing server load, I decided to do a small experiment myself. I created a small benchmarking tool, and ran it through the memory allocation profiler from Apple’s Instruments. It turned out that the combination of TLS and ZLib compression (aka “squishy data”) was causing a much higher memory usage than I would have expected.

Continue reading →

Posted in Swift | Tagged Apple, Compression, Expat, Instruments, Jabber, LibXML, OpenSSL, Profiling, Swiften, TLS, XMPP, and ZLib

“Swiften Developer’s Guide” available

People have recently been showing interest in using Swiften, Swift’s C++ XMPP library, for building their own XMPP applications. We therefore created the Swiften Developer’s Guide with a tutorial-style guide to Swiften (including examples), and made it available together with the Swiften API Documentation. If you’re interested in creating an XMPP client or component, be sure to give these documents (and some of the examples from the Swift code repository) a look!

Posted in Swift | Tagged C++, Jabber, Swift, Swiften, and XMPP