Brad Fitzpatrick (brad) wrote in fotobilder,
Brad Fitzpatrick

s2compile in perl

I've ported the S2 compiler from Java to Windows.
picpix@tally:~/src/s2$ wc -l danga/s2/*.java | tail -1 
   6950 total
picpix@tally:~/src/s2$ wc -l S2/*.pm | tail -1
   6424 total

It was more an exercise in typing than anything.

Anyway, the benefits of this are:

-- no Java dependency at all (previously it was only a dependency for style developers or people wanting their users to edit styles from the website)

-- won't have to put compiled S2 in CVS. site admin can compile them.

-- better integration between web code (mod_perl) and the compiler. No flaky IPC::Open3 crap anymore. I never got it working anyway.

-- speed! while the compiler's quicker on small files right now (perl starts up quicker than Java), the java version was much faster once it got going. I'll be fixing this, though... the current version in Perl is a 1:1 port, without doing any optimizations for Perl. Right now I still operate on a character streams, rather than taking advantage of Perl regexps and such. I also plan to memoize compilations and serialize the "Checker" object on parent layers instead of always compiling core1.s2 for every theme change. (I was going to do this in Java eventually, but Java's not as nice as Perl when it comes to all that...)

-- can compile the compiler with ActiveState PDK and make EXEs for Windows users.

Anyway, enjoy! All the fun stuff will be coming soon enough. (like creating/editing S2 layouts from the website, without needing your own FotoBilder installation)

  • 302: lj_dev

    In the interests of consolidating all FotoBilder development-related discussion, we're going to be closing down this community. The same…

  • Development stalled?

    Is the development of Fotobilder held? Stalled? I am asking because there is no activity on the community and there is no link to the Fotobilder…

  • (no subject)

    Does FotoBilder works with Apache2? I installed all the required modules on my debian sarge, and when I restart my apache server, it dies horribly…

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic
  • 1 comment