as3tohaxe google group

Posted on October 28, 2008. Filed under: Uncategorized | Tags: , , , , |

I’ve created a google group to discuss issues, features of as3tohaxe and the general love of haXe

Please feel free to join it and let the group know what you’re converting or running into any issues.

-Don Q.

Update: I’ve uploaded Windows and Mac OSX binaries to the files section of the google group.

Read Full Post | Make a Comment ( None so far )

hxflickr now on github

Posted on October 21, 2008. Filed under: Uncategorized | Tags: , , , , |

Previously, I attempted to convert the AsWing project with as3tohaxe and decided instead to go after a smaller code base, the as3flickrlib. I spent the majority of the time dealing with converting the xml processing which as3tohaxe doesn’t handle (and I’m not sure ever will), but the rest of the codebase went through for the most part without a hitch. So my conversion efforts are now on github.

I’ve uploaded Adobe’s as3flickrlib and an example by Shang Liang converted to haXe as hxflickr. The library hasn’t been fully tested, but you should be able to have fun with it. Enjoy!

Next project is the flare vis kit!

Read Full Post | Make a Comment ( None so far )

Translating AsWing

Posted on October 14, 2008. Filed under: Uncategorized | Tags: , , |

Since the last blog post, as3tohaxe converter now has expression parsing, “as” converted to “cast ()” calls, and a program, as3tohaxe.hs, to run through a directory recursively and convert!

So I gave the converter the AsWing codebase as its first big test and ran into a couple problems.

The parser was bombing on some unidentifiable characters which turned out to be the UTF8 header sequence “\239\187\191” or EF BB BF in hex. At first I just tried removing those characters but couldn’t with vim because the character is “zero width”. So I used a hex editor, 0xED, and the parser ran without issue. So I’ve updated the lexer to handle the header as whitespace.

The second problem I came across was one file taking a particularly long time converting. I think it has to do with one of the statements which has a nested expression.

((((((((("GridLayout[hgap=") + hgap) + ",vgap=") + vgap) + ",rows=") + rows) + ",cols=") + cols) + "]");

I still need to verify this.

Update: The nested expressions were causing the slowdown. I removed redundant work being done by the parser and got a huge speedup.

Read Full Post | Make a Comment ( None so far )

Actionscript 3 to haXe!

Posted on October 1, 2008. Filed under: Uncategorized | Tags: , , , |

So after a couple of months of study, I finally put together my first Haskell project, as3tohaxe, an Actionscript 3 to haXe converter. And now it’s up on github for everyone. The code is a mess because I’m still green with Haskell (and haXe!). It’s just a start, but I hope to continually improve the translator as I work on my haXe projects.

Here’s what it can do so far:

  • converts basic types int to Int
  • cleans up the package braces
  • renames the constructor to new or main
  • converts default arguments
  • moves member variable initializers into the constructor
  • converts access control attributes (e.g. protected to public)
  • and more eventually

Parsing expressions is on the todo list.

Read Full Post | Make a Comment ( 2 so far )

Liked it here?
Why not try sites on the blogroll...