Blogs

Boost Program Options accumulator type

After various requests, I've licensed my boost program_options extension code accumulator.hpp under the Boost Software License 1.0. It also now supports taking an argument on construction to store the value as well as the notifier function.

To recap: the accumulator type adds support for repeated options used to increment a particular value. Often this is used for verbosity, so that -v sets a verbosity level of one, -vvv a level of three.

Weekend adventures in noise

Perlin noise in Gnash

My graphic design skills are poor, a fact all the more frustrating because I have a good enough eye to recognize when something looks bad, but not the aptitude to improve it.

Unlike less restrained people, I haven't inflicted the unreadable crimes of Word Art on my fellow humans since I was a teenager (though as previous work on implementing gradients for the MovieClip drawing API shows, when you have an excuse, playing with garish gradients is still fun!). But along with other design-incompetents, I'm fascinated by adventurous graphics and patterns.

Most concise C++ FizzBuzz

What is the most concise C++ FizzBuzz?

The following code appears initially to be a pretty good candidate:

#include <iostream>
#include <ostream>

using std::cout;

int main()
{
    for (int i=0;i++<100;)
        (!(i%3)&&cout<<"Fizz")|(!(i%5)&&cout<<"Buzz")||cout<<i,cout<<"\n";
}

New features for Gnash 0.8.10?

Milk Quest

As well as many stability fixes, Gnash 0.8.9 brought improvements in sound playback, gradient rendering, RTMP remoting support, and implementation of important parts of the BitmapData class.

For the next version, provisionally 0.8.10, there are already some exciting new improvements in the development repository: the Qt4 GUI supports clipboard setting and mouse wheel input, the BitmapData implementation is optimized and extended, and the XML class is finally fully implemented.

Gnash 0.8.9 released!

There's no official announcement yet, but the tarballs of Gnash 0.8.9 are available from GNU mirrors.

Gnash 0.8.9 brings many bugfixes and some new features, including:

  • Fixed playback for some MPEG4 streams, playback of PCM sound with the FFmpeg media handler and ADPCM sound with the Gstreamer media handler.
  • Support for embedded ScreenVideo.
  • Fixes for several crashes.
  • Improved ActionScript performance processing, especially for interactive applications.

Windows installer for Gnash

The Windows 32 builds of Gnash available from this website now use an installer for easy installation and removal of Gnash. Like the executables themselves, the installer is created under Debian GNU/Linux using only free software.

The Gnash for Windows installer is available in the download area. See also the page about Windows binaries for more information.

Boost Program Options

Boost's program_options library does a lot of things (such as formatting help messages and adding default values) automatically, and it means different program modules can add and handle their own options. This is exactly what we need it for.

Its main disadvantage is incomplete documentation. There are some common command-line behaviours that aren't built in, which is fine as long as they can be added. And indeed program_options is fairly extensible and flexible, which in turn is fine as long as you have documentation to tell you how to do it.

New possibilities

For the first time in its history and after years of redesigning large swathes of code, Gnash's core libraries are re-entrant!

Why is this interesting? Until we use it properly, it's not! But it allows Gnash to be used in more powerful and flexible ways.

Re-entrancy

So what is the excitement about? Re-entrancy here means the ability to use as many objects from Gnash's core library as you like without their interfering with each other, or even crashing.

Gnash optimization

Gnash has recently been benefiting from some performance enhancements.

Sandro Santilli started profiling ActionScript execution and noticed some serious bottlenecks in the way Gnash handles property identifiers.

Gnash for Windows

Gnash now runs under Windows (32-bit). I've published binary executables with corresponding source archives in the download area.

The Windows executable uses SDL for the GUI and sound, AGG as a renderer, and FFmpeg (LGPL) as its media handler.

It is built using mingw32 under GNU/Linux and only minimally tested in a real Windows environment, so expect teething problems.

These are unofficial binaries and are not supported by the Gnash team. Please report bugs with the executables to me directly, not to the Gnash bug tracker!

Syndicate content