Archive for category Uncategorized
Around a month has passed since our talk at mloc.js. There we had a great opportunity to talk about the technology behind the duetto C++ compiler for the Web. We also made our first public announcement of our promise based support for asynchronous type safe RPC, which fits in our vision of C++ as the platform language for the Web, both on the client and on the server side.
Today, we announce the new, feature-packed release of Duetto — 0.9.4! This time, we really splurged, and added some quality features that we’re sure you’ll find interesting:
Initial support for promise-based async RPC
Support for C++ mutex/atomic/thread headers
Asynchronous RPC using promises
With duetto you can “tag” a method to let the compiler know that the code should be compiled for the server side. The compiler also takes care of generating RPC boilerplate including type safe serialization of parameters and deserialization of the return value. While the basic model is synchronous, you can take advantage of promises to use fully type safe asynchronous RPC in duetto. See e.g. the following code:
// Pending requests for messages
Promise<string>* getChatMessageRemote() [[server]]
void sendMessageRemote(const string& str) [[server]]
void messageHandler(const string& newMessage) [[client]]
void webMain() [[client]]
The code is a simple but working example of a multi-user chat application. The getChatMessageRemote method returns a promise immediately after being called, without waiting for the server answer. On the server side we create a promise and return it. We also need to store it somewhere to eventually fulfill the promise by sending a value.
The client code needs to set a callback to receive the value when the promise will be eventually fulfilled. Later on the client send a chat message using the sendMessageRemote server method. This method is synchronous and will return only after the server side execution is completed. The server echoes the message back to all connected clients by fulfilling all pending promises.
Strong JS interoperability
[[jsexport]] class attribute
class [[jsexport]] ExportExample
var cppobj = new ExportExample(0.1, 42);
At the moment only this simple form of JS code insertion is supported. It’s not currently possible to pass variables from surrounding C++ code or return a value from __asm__, but we will extend this support in the future.
Support for C++ mutex/atomic/thread headers
Some C++ functionalities, especially the ones related to multi-threading, do not have a direct mapping on the browser platform. That said, we want to provide as much compatibility as possible with existing C++ code to reduce the effort when using duetto for porting.
As of duetto 0.9.4, we support the following C++ threading primitives:
mutex: Implemented as plain counters, mutexes cannot block execution but report an error if a non-recursive mutex is acquired twice.
atomic: Implemented as plain integers, since the browser is not actually concurrent there is no real support for atomic operations.
thread: Modern browsers support WebWorkers, but the threading model does not map to the one expected by C++ threads. We chose to make the user aware that C++ threads are not supported by adding an explicit error message when the thread header is included in code compiled with duetto.
Today Leaning Technologies Ltd. releases duetto, a compiler designed to develop integrated (backend and frontend) web applications in C++. duetto is now available to the public as FOSS here, and will be offered in a commercial package with closed-source-friendly licensing soon.
Browser-based applications will undoubtedly play a big role in the future of both consumer and business applications. Web apps have some clear advantages compared to native applications, like being natively cloud-based and collaborative, while also being inherently portable, especially thanks to the increased attention that browser vendors have dedicated to web standard compliancy. Modern web standards, that usually go under the umbrella term HTML5, provide incredible close-to-native capabilities and this gap will be shrinking with time.
Duetto combines the advantages of emscripten and node.js by allowing the programmer to:
write web applications in C++, reusing existing code and making porting of whole applications and games to the browser plausible.
code both the frontend and the backend of a web application in the same language and codebase
In addition to this, duetto provides some nice features:
Bring the robustness and proven scalability of C++ programming to the Web
You can access all browser APIs directly. Duetto inherits the C++ philosophy of exposing the platform capabilities (and limitations) to the users. There is no middle man.
Duetto is based on LLVM/clang. An industry standard C++ compiler is a programmer’s best friend: code sanity is verified as compile time, including RPC signatures.
Contrarily to emscripten we do not try to emulate a traditional address space using typed arrays, but directly map C++ objects to JS objects. This reduces memory consumption since the garbage collector can delete unused object.
Are you interested in using duetto? You can now. We have just released the whole technology as a FOSS project, available here. Also, we’ve stuck to our promise of releasing in six months from our first announcement in April
The compiler itself, derived from LLVM/clang is released with the same license as LLVM/clang (UI/NCSA) and we plan to contribute generally useful code upstream. Accompanying headers and libraries will be released as GPLv2+. We will be also offering closed source friendly licensing of such components for a fee. Here are links to the various repositories on github:
duetto enabled LLVM
duetto enabled clang
duetto headers and utilities
Release tarballs will be available shortly on the Launchpad page of the project: https://launchpad.net/duetto. Launchpad will also be our bug reporting system, so please use it to report any problem you might find. We will be also providing builds of duetto for Ubuntu linux using a PPA. We plan to provide binary builds for Mac OS X and Windows as well, but we are still working on automating those build.
Please subscribe to our Launchpad group/mailing list to discuss bugs, desired features and usability issues on https://launchpad.net/~duetto-users. You can also follow us on twitter (@leaningtech) and visit our website to be updated on duetto related news:
I got as a Christmas gift an external USB audio device: an Asus Xonar U1. It’s a nice device with a decent audio quality. The audio itself, both in and out works perfectly with the standard snd-usb-audio kernel module. Unfortunately the audio controls on the device are not standard, so I developed a simple daemon and accompanying udev and pm-utils script to get the device to work. I’ve published everything under the GPL hoping that they might be useful for someone else. Feel free to clone and fork my repository on github
I’m very happy to annouce a new major release for Lightspark, the open source flash player implementation. This release includes quite a lot of fixes, both internal and visible to users. The most important ones from a user point of view are probably the improved support for PulseAudio flat volumes, which makes it impossible for lightspark to manipulate the system volume and the newly added support for the BBC video player. To use BBC site you might need to use AdBlock, which is generally recommended since more often than not flash advertisements are not supported by Lightspark and causes failures in otherwise supported sites.
From the ChangeLog:
* Enable RTMP support by default, requires librtmp
* Fixed support for IEventDispatcher implementation pattern
* Improved serialization robustness
* Improved matrix handling
* Implement string and namespace pooling to reduce memory consumption
* Proper support for private namespaces
* Improved support for fonts
* Support LLVM 3.1
* Fix full volume issue when PulseAudio flat volumes are enabled
* Initial support for AIR desktop applications
* Support for www.bbc.co.uk video player
Source tarball is, as usual available from Launchpad.
This year, having joined the computer security group at UCSB for my phd, I’ve helped in the organization of the 2010rh edition of the iCTF, the biggest international online hacking competition. It has been plenty of fun, with more than 70 teams participating from all over the world. The CMU team “Plaid parliament of pwning” won it, getting the 1000$ price (thanks Adobe and IEEE Security & Privacy magazine for the sponsorships!).
Since people have been asking for the solutions of the two challenges I wrote, so here they are.
This challenge is easy, I encourage you to give it a try, it’s fun!
Question: “Who’re you’re gonna call?”
Teams that have completed it: 44 (congrats!)
Solution: in an html comment following this line
This challenge is a little more difficult, but if you know python you have all the skills necessary to beat it.
To make it run, unpack this file and run server.py (it’s all python, you can check it for backdoors). To start the challenge, you should read only the content of the “pub” directory: that was the material that was given in the ctf.
Teams that have completed it: 0, as most of the difficult challenges — because of the structure of the iCTF 2010, it turned out that it was more convenient to focus only on the easy challenges. We’ll have to fix it next year!
Solution: in an html comment following this line. The given file also contains a script that can solve the challenge (the test_* files)
For the solution of another difficult challenge, head over to Bryce’s blog.
Finally, after a long delay caused by several issues Lightspark 0.4.5 is out. Here it is a brief Changelog.
- Include the new Advanced Graphics Engine, that should provide smoother and faster graphics and support for clipping
- More robust input support (makes it possible to use Play/Pause on YouTube)
The work on this released has been especially slowed down by an issue found in libxml++ and another one found in mesa. Packagers should pay attention to fulfill the following dependency requirements:
- Libxml++ version 2.33.1 or better. If an older version on libxml++ must be supported some commits must be backported. More info about this in the README file
- Mesa should include the fix for this bug. The issue affects some radeon and maybe intel cards.
Me and most of my engineering colleagues here at Sant’Anna School for Advanced Studies are leaving tomorrow morning for a week long tour of universities and labs in Belgium and Netherlands. This means I’ll have no time to work on Lightspark, sorry
Anyway the 0.4.5 release will be probably out in the last days of the month. The critical bug in libxml++ is now fixed as my patch was accepted upstream. If (as I believe) a new version of the library will be released and packaged before i get back there will be no reason to hold the release anymore.
Another week, another bugfix release for Lightspark! Apart from restoring the support for YouTube this release features the new plugin based audio framework that makes it possible to support other backends beside PulseAudio. At the moment both an ALSA and OpenAL plugins are being worked on.
As always you can grab the release here on Launchpad
I’m back from GUADEC. It was my first conference about open source and it was great.
I’ve found particularly inspiring the talk by Guillaume Desmottes about Telepathy and Epiphany, which can be great to extend GTG possibilities in collaboration.
The talk by Jake Edge about promoting free software projects was also very interesting, in particular for the young Lightspark project (that went completely unnoticed for a few months before showing up on planet GNOME).
Thanks to the exciting talks and people at GUADEC, the GTG team (even the people who were not there!) has been working fervently on a nice rewrite of some parts of GTG core, along with a lot of unit-tests. Hopefully, a lot of bugs will be closed thanks to this, and GTG will be nicer to code.
As for my Google Summer of Code on Getting Things Gnome support for multiple backends, this week has seen:
- a port of my Evolution plugin as a backend (that was the last one planned)
- refactoring of the Twitter plugin to get authorization through Oauth (using the tweepy library, thanks Tante for the hint)
- docs, docs, docs
Next week, I’ll keep documenting and testing. I should also write a guide on how to write new backends. See you next week!
Trying to keep up with the old rule “Release early, release often” I’ happy to announce release 0.4.2.2 open source flash player.
This apparently small point release actually includes the biggest feature plannend for the upcoming 0.4.3 release, namely Gnash fallback on older SWF clips. Lightspark currently relies no Gnash for any Flash content that does not require AVM2 (ActionScript 3) support.
I would also like to explain an issue that many users and testers reported. Firefox is not able to handle multiple plugin for the same file type! Not even if only one of those plugins is actually enabled. So, if lightspark is installed alongside adobe’s player or Gnash no flash content will be displayed. This is a firefox bug, I’ve reported the bug and proposed a patch that is currently waiting the review.
The source of the release is as always available on launchpad. Binary packages for Ubuntu Lucid and Maverick will be available on the usual PPA (in a couple hours from now, Launchpad seems pretty busy at the moment). Moreover, since the last announcement lightspark has been also included in the debian experimental suite (thanks to Didier Raboud and Luca Falavigna).
Stay tuned, and follow the roadmap