Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Porting Tcl/Tk to Java
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


Report this thread to moderator Post Follow-up to this message
Old Post
EKB
09-26-06 12:02 AM


Re: Porting Tcl/Tk to Java
In 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???"

Report this thread to moderator Post Follow-up to this message
Old Post
Cameron Laird
09-26-06 12:02 AM


Re: Porting Tcl/Tk to Java
EKB 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


Report this thread to moderator Post Follow-up to this message
Old Post
nyllet
09-26-06 01:40 PM


Re: Porting Tcl/Tk to Java
EKB 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
w at some point, if it hasn't already been...)

-- Neil

Report this thread to moderator Post Follow-up to this message
Old Post
Neil Madden
09-26-06 01:40 PM


Re: Porting Tcl/Tk to Java
Thanks, 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


Report this thread to moderator Post Follow-up to this message
Old Post
EKB
09-27-06 01:01 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:15 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.