AMFPHP 1.9 beta 2 – so fassssssst

On 26th January Patrick posted about the new amfphp beta which, thanks to the Emanuele Ruffaldi‘s php module (you can get the binary and source files here), seems to be “ridiculously faster“.

I had 5 minutes today for testing it. Just a simple test with an array of 1,000 objects and using ServiceCapture in background to see the performance differences between the older amfphp version and this one.
The new amfphp version gave me these results (I has to say I had many other programs running in background…):

Type: amf
This request bundled all of the following service calls:
amfphp.getList()
Request: 697 bytes
Response: 15968 bytes
Total: 16665 bytes
Response Time: 0.19 seconds

while the older one:

Type: amf
This request bundled all of the following service calls:
amfphp.getList()
Request: 697 bytes
Response: 16967 bytes
Total: 17664 bytes
Response Time: 0.541 seconds

So, incredible faster 🙂
This new beta comes with onther features such as gzip support, better recordset support and ByteArray support… but I strongly suggest to read the full article on Patrick’s blog here:
http://www.5etdemi.com/blog/…/amfphp-19-beta-2-ridiculously-faster/

Oh my, Flex3 already on the way?

Today I started reading in various blog about the prerelease program of Flex3!
Ted Patrick blogged about the most important Flex3 feature “Flex 3.0 targets the release version of Flash Player 9 and will be widely deployable to over 90% of computers” (so, linux isn’t included here?)

Also Ben Forta speaks about the new Flex3 and  put the link for the online prerelease program application form.
So, what we can expects from this new Flex3 and when its release is scheduled?

Flex 2.0.1 for linux
I want also to put a link to a this site, a chinese guy who put together flex 2.0.1 for linux.. well, not sure about the legal aspect of this thing, but this demonstrate it is possible (sure, it’s eclipse, we already know that!) and so how long we have to wait for an official one?

Install FlashTracer on Linux

Recently Adobe released the final version of flash player 9 for Linux, fortunately thay also released the linux debug version, so the Flash Tracer extension can be installed now on linux too.

First of all Download the Linux debugger and standalone players and install it.
Then download flashtracer.xpi (updated version for linux only) and install (usually download and then drag on FF).

Restart Firefox and open the FlashTracer panel using Tools->Flash Tracer.
Browse to a flash website with some traces enabled and you should alreay see some text in the panel. Otherwise set in the flash tracer option the output file to this folder:

1
/home/{username}/.macromedia/Flash_Player/Logs/flashlog.txt

* replace {username} with your account name.
Now I can see all the traces (and lot of warnings, more than on Windows) on my Firefox in Ubuntu.

Actionscript parsing experiences: PyBison & PLY

My experiments with text-parsing continue..

PyBison
Last day I founded a python library (pybison) which runs the generated python parser at near the speed of C-based parsers, due to direct hooks into bison-generated C code.
Cool, unfortunately I couldn’t compiled it for Windows and so I made my test on Ubuntu only. What I did was just to export the already written lexer/grammar using bison2py (boundled with pybison) and run it.

If you want to take a look at the python parser try it by downloading the source code here.
The run.py file accept these parameters:

1
2
3
4
5
6
7
8
9
10
11
usage: run.py [options]
options:
-h, --help            show this help message and exit
-v, --verbose         Turn on verbose mode
-o OUTPUT_FILE, --output=OUTPUT_FILE
Don't print to stdout but to the output file
-i INPUT_FILE, --input=INPUT_FILE
Input file to be parsed
-x, --to-xml          Returns a human-readable xml representation of the
parse tree
-b, --bison-debug     Print the Bison/Flex debug

You can download the source code here

PLY
The second test I did was using PLY, an implementation of lex and yacc parsing tools for Python. Being implemented entirely in python it should be much more slower that pybison, but I didn’t find any difference with the pybison parser version. In fact PLY , like the traditional bison, creates tables starting from the grammar syntax.
Ok, Both of the implementations are slower that the pure C parser, but extremely faster that antlr!
(They took more or less 0.02 to 0.5 secs for parsing and generating the AST.)
Unlike pybison PLY is still mantained and offers more features and a better error handling.. even if the whole grammar has to be rewritten in python, and it can be compiled in Windows too.

To run the test just write:

1
python run.py {filename}

P.S. Unfortunately the yacc parser isn’t yet complete because I still need to find a way for parsing correctly E4X and XML syntax..

Flex 2.0.1 is here..

Adobe is just announcing the release of Flex 2.0.1 and everyone around here seems really excited about that! (I agree, Flex is really an impressive software)

Other than including the already released asdoc tool into the installer, this new release can now manage CSS at runtime, support the FlashType encoding (so useful in Flash 8) and includes the  new mx.modules (for the list of complete changes and fixes I suggest to read the release notes).
Moreover it seems that this new release is ready for Apollo (when it finally will be available)..
But the big news is the Mac OSX support for Flex2.

So, now I should ask: “where is the Linux support”?
Eclipse is cross-platform, Flex is based on eclipse (1+1?)… we’ve Flex on both Windows and OS(ni)X, We already have the flash9 player for linux (I tested it on my ubuntu and seems to quite stable and faster enough).. so will we get a chance?

P.S. Here you can read the official Flex 2.0.1 release notes.