Fog Creek Software
Discussion Board




ASP to PHP compiler

are you going to sell the compiler or open-source it, Joel? any chance of a article on the challenges learned on this effort?

it will be a huge boon to many people.

eddy
Wednesday, December 24, 2003

It might well blow the PHP/Linux market wide open.  If you are looking for your killer app.  This might be it.

christopher baus (www.baus.net)
Wednesday, December 24, 2003

I doubt it will blow the whole php / linux world wide open, since asp to php converters already exist, e.g.:

http://asp2php.naken.cc/

anon
Wednesday, December 24, 2003

Interesting.  I might need to give that a try.  I have a bunch of ASP code I'd like to convert to PHP myself.

christopher baus (www.baus.net)
Wednesday, December 24, 2003

I've tried that crosscompiler and it doesn't work very well. It just puts $ in front of every variable and function and prays for the best.

Frederik Slijkerman
Wednesday, December 24, 2003

Incidentally, I wonder how well Joel's compiler is working. It would be great if you could just generate the PHP/Linux product from the ASP/Windows product automatically, but I guess that isn't the case. Which leaves you with two separate branches of the same product to maintain.

Frederik Slijkerman
Wednesday, December 24, 2003

I keep wondering if Joel's ASP to PHP converter is a converter writ small to handle Fog Creek's coding style and function call choices.  There's no need to handle all cases if Fog Creek only uses certain routines over and over again (as it likely does for FogBugz). 

And that would take some serious thought - if you're only dealing with 30 functions you can really think about how to convert them into strong PHP code and write a pretty good converter.

Lou
Wednesday, December 24, 2003

>> "Last summer, an intern wrote a complete ASP to PHP compiler, which allowed us to port our flagship product to Unix. He learned Java, ASP, and PHP in one summer and wrote an industrial-strength compiler from beginning to end in two months."

http://www.fogcreek.com/Jobs/SummerIntern.html

Believe it or not by Ripley.

Ripley
Wednesday, December 24, 2003

That's not so surprising.  If the asp scripts use a minimum of external components, the problem is just to transform code in one representation to another (and even with components, there's frequently some semantic equivalent on Unix -- eg: ADO/MSSQL -> MySQL).  If you've built up a large tool library you could probably do it in less time (especially if there exists a context free grammar for both the source and target language).

Of course, if the asp scripts use weird components with no equivalent on Unix (to which you do not have the source), it would be much more difficult.

K
Wednesday, December 24, 2003

*  Recent Topics

*  Fog Creek Home