Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, everyone, I just got this question e-mailed to me. I don't know the answer (excepf for "Don't port to Java - keep it in Tcl/Tk!"). Does anyone else? "I searched around the web, but cannot find any definitive answer. My question is ... I have alot of tcl/tkl code which was used in developing a GUI some time ago. ...and my tcl/tkl is very rusty... about 10 years or so. My customer is looking to port this code over to Java ... do you know of any automated tools that can help do the translation???" Thanks! Eric
Post Follow-up to this messageIn article <1159208832.047770.299190@d34g2000cwd.googlegroups.com>, EKB <eric@kb-creative.net> wrote: >Hi, everyone, > >I just got this question e-mailed to me. I don't know the answer >(excepf for "Don't port to Java - keep it in Tcl/Tk!"). Does anyone >else? > >"I searched around the web, but cannot find any definitive answer. My >question is ... I have alot of tcl/tkl code which was used in >developing a GUI some time ago. ...and my tcl/tkl is very rusty... >about 10 years or so. My customer is looking to port this code over to >Java ... do you know of any automated tools that can help do the >translation???"
Post Follow-up to this messageEKB wrote: > Hi, everyone, > > I just got this question e-mailed to me. I don't know the answer > (excepf for "Don't port to Java - keep it in Tcl/Tk!"). Does anyone > else? > > "I searched around the web, but cannot find any definitive answer. My > question is ... I have alot of tcl/tkl code which was used in > developing a GUI some time ago. ...and my tcl/tkl is very rusty... > about 10 years or so. My customer is looking to port this code over to > Java ... do you know of any automated tools that can help do the > translation???" Hi I'm actually doing my thesis work in this area: a compile time translator of Tcl code to Java. It will be released under GPL later this year. However, I'm afraid it has some limitations that may make it inapplicable for your purpose. It supports Tcl only, ie no Tk. Tcl commands that would require threads or reflection in Java are not implemented. Dynamical scoping, that is upvar and uplevel, are not supported. Tcl scripts that exploits the weak typing of Tcl look clumsy in Java, especially with generics. It targets Tcl 8.5. Furthermore, the more the Tcl scripts rely on runtime properties, the harder it gets to generate high quality Java code. Still the forthcoming tool, named laugh, is useful as a translation aid for many Tcl scripts, at least IMHO. If you want to become a beta tester, please send me a mail Regards Martin
Post Follow-up to this messageEKB wrote: > Hi, everyone, > > I just got this question e-mailed to me. I don't know the answer > (excepf for "Don't port to Java - keep it in Tcl/Tk!"). Does anyone > else? > > "I searched around the web, but cannot find any definitive answer. My > question is ... I have alot of tcl/tkl code which was used in > developing a GUI some time ago. ...and my tcl/tkl is very rusty... > about 10 years or so. My customer is looking to port this code over to > Java ... do you know of any automated tools that can help do the > translation???" In addition what others have mentioned (e.g., use of Jacl), I would also point you at Swank (http://www.onemoonscientific.com/swank/index.html) which is a port of Tk for Jacl/Java, which uses Swing. It may also be worth looking at the TJC compiler that is part of the same project as Jacl (http://tcljava.sf.net). This is a Tcl (Jacl) -> Java bytecode compiler. IIRC, it may use Java sourcecode as an intermediate language. While the generated source may be quite ugly, it may serve as a starting point. (Note for Tcl-URL! authors: TJC surely deserves to be product of the wat some point, if it hasn't already been...) -- Neil
Post Follow-up to this messageThanks, everybody! I passed all of these comments along to the person who had sent me the e-mail, and also let her know about comp.lang.tcl. Eric
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.