tcljava-dev Mailing List for Tcl/Java (Page 7)
Brought to you by:
mdejong
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(12) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(9) |
Feb
(29) |
Mar
(16) |
Apr
(8) |
May
(9) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(11) |
Dec
(10) |
2002 |
Jan
(19) |
Feb
(11) |
Mar
(2) |
Apr
(17) |
May
(13) |
Jun
(2) |
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
(4) |
2003 |
Jan
(1) |
Feb
|
Mar
(24) |
Apr
(9) |
May
(8) |
Jun
(17) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
2004 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
(8) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(8) |
2005 |
Jan
|
Feb
(3) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
(3) |
Sep
(10) |
Oct
|
Nov
|
Dec
(3) |
2006 |
Jan
(10) |
Feb
(13) |
Mar
(11) |
Apr
(6) |
May
(4) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2007 |
Jan
(6) |
Feb
(18) |
Mar
(13) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(6) |
Aug
(1) |
Sep
|
Oct
|
Nov
(6) |
Dec
(5) |
2009 |
Jan
(6) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
(6) |
Feb
(2) |
Mar
(1) |
Apr
(7) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Pournaris C. <cha...@gn...> - 2006-12-28 07:15:27
|
Hello everyone, This is my first post. First of all I want to give my congratulations to the tcltk/tcl blend developers, great job! The reason I'm writing this mail is because I recently tried to interpet some tcl source files from my java application but run into some problems. I got some errors using the tcl regexp command, in particular I got an error about using the -all option with regexp.My question is will there be anynew version that supports the latest regexp (and other tcl commands) options like -all ? Thanks for your time and sorry for my bad english Charalampos "DiAvOl" Pournaris |
From: Polina G. <ta...@gm...> - 2006-12-05 08:01:43
|
Hi Everybody, Could someone possibly explain me in more details how packages are discovered and loaded ? Thanks |
From: raj k. <raj...@gm...> - 2006-08-01 10:19:32
|
Sorry, I seen your message delayed..... thanks for responding to my problem. I could solve my issue. cheers, rajjlakcshmi. On 4/12/06, Mo DeJong <md...@un...> wrote: > > On Tue, 11 Apr 2006 15:34:14 +0530 > "raj knowledge" <raj...@gm...> wrote: > > > $AdminApp edit my_webapp.war {-MapModulesToServers {{XXXX > > xxxx.war,WEB-INF/web.xml > > WebSphere:cluster=$ clusterName > > +WebSphere:cell=HD-CELLNUMBERCell02,node=$nodeName,server=$webserverName > }}} > > If you have vars that need to be evaluated, pass in double quotes: > > set name Bob > set word "My name is $name" > puts $word > > (The above will print: "My name is Bob") > > If you pass a brace quoted string then no $ subst will be done. > > set name Bob > set word {My name is $name} > puts $word > > (The above will print: "My name is $name") > > P.S. > The expr is for math expressions and has nothing to do with the problem > you are having. > > Mo DeJong > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > tcljava-dev mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-dev > |
From: Mo D. <md...@un...> - 2006-06-21 21:38:37
|
Thanks to some recent modificaitons, the Jacl/TJC expr evaluator is now as fast or faster than the expr evaluation logic in the C version of Tcl. Re-running the Tcl Bench suite with the server JVM shows that Jacl is actually faster than the C version of Tcl in many cases. http://www.modejong.com/tcljava/tjc_results_6_20_2006/index.html The results are split into 3 bar charts so that execution time (in ms) can be compared side by side. cheers Mo DeJong |
From: Mo D. <md...@un...> - 2006-05-18 17:33:58
|
On Thu, 18 May 2006 10:22:08 -0700 Martti Tienhaara <ma...@da...> wrote: > Obviously with the TJC compiler running in a separate thread > this is no longer feasible. Another approach that you might find useful is to invoke vwait on some variable at the end of your existing eval script. This will process events in your script without having to make big changes to the init logic in your Java and Tcl code. It is something that might be worth trying before you make bigger changes. cheers Mo DeJong |
From: Martti T. <ma...@da...> - 2006-05-18 17:17:44
|
> 2. Re: Re: tcljava compiler (Mo DeJong) >> >> The only minor problem so far is that the "-readyvar" option on >> >> TJC::compile never returns a result in the server. > > Your code is not processing Tcl events. Please take a look at the > new documentation in the CVS and let me know if that clears > things up for you. > > tcljava/docs/Topics/EventLoop.html > > Or online via: > > http://tcljava.cvs.sourceforge.net/*checkout*/tcljava/tcljava/docs/Topics/EventLoop.html?revision=1.1 > > cheers > Mo DeJong Thank you very much for the documentation on The Tcl Event Loop which is excellent. I definitely did not understand the event processing relationship and I now understand why we have got away without the understanding up to now. We have been using the Jacl interpreter and doing eval strictly within each thread in past projects and so have not run into any problems with just eval. Obviously with the TJC compiler running in a separate thread this is no longer feasible. In our new project under development we are using the Bean Scripting Framework, an Apache Jakarta project to allow other scripting languages to be used by users as well as Jacl. We use Jacl for everything but some users will prefer to use Javascript since they already know it. I will have to look at the Jacl engine source in the BSF package to see what we need to do to use the Tcl events properly. Being able to queue Jacl commands from other threads will also be very useful. Thanks again. -- Martti Tienhaara (ma...@da...) DASH Software Ltd. |
From: Mo D. <md...@un...> - 2006-05-18 02:10:35
|
On Tue, 04 Apr 2006 22:34:31 -0700 Martti Tienhaara <ma...@da...> wrote: > tcl...@li... wrote: > > The only minor problem so far is that the "-readyvar" option on > >> TJC::compile never returns a result in the server. Your code is not processing Tcl events. Please take a look at the new documentation in the CVS and let me know if that clears things up for you. tcljava/docs/Topics/EventLoop.html Or online via: http://tcljava.cvs.sourceforge.net/*checkout*/tcljava/tcljava/docs/Topics/EventLoop.html?revision=1.1 cheers Mo DeJong |
From: Mo D. <md...@un...> - 2006-05-18 02:07:16
|
Hello all There have been many problems with the Sourceforge CVS, but it all seems to be fixed now. You should now be able to check out the most recent CVS version of Jacl and Tcl Blend. Note that old working copies will need to be checked out again since the name of the project cvs server has changed. Use: cvs -d:pserver:ano...@tc...:/cvsroot/tcljava checkout tcljava A number of new features are now available in the CVS, they include: (2006-04-07) The expr module now updates TclObject internal rep. (2006-04-10) Numeric range checking when Tcl numbers are passed to Java. (2006-04-12) Add inner class support for all java::* commands. (2006-04-13) New java::for collection iteration command added. (2006-04-26) Add interp.setInterrupted() API to support interruption of a running interpreter from another thread. I have also created a new set of timing results that compare uncompiled Jacl to TJC compiled Jacl and to Tcl 8.4 compiled with optimizations. It turns out that some earlier tests were run with a C Tcl shell compiled in debug mode, and that has a big impact on execution time for Tcl compiled byte code. In most cases, TJC compiled Jacl code runs 2 to 4 times slower than C Tcl bytecodes. The results can be found here: http://www.modejong.com/tcljava/tjc_results_5_17_2006/index.html Clearly some expr optimizations are needed. The only big winner is TJC compiled switch command, they execute must more quickly than in C Tcl. cheers Mo DeJong |
From: Mo D. <md...@un...> - 2006-04-12 01:59:11
|
On Tue, 11 Apr 2006 15:34:14 +0530 "raj knowledge" <raj...@gm...> wrote: > $AdminApp edit my_webapp.war {-MapModulesToServers {{XXXX > xxxx.war,WEB-INF/web.xml > WebSphere:cluster=$ clusterName > +WebSphere:cell=HD-CELLNUMBERCell02,node=$nodeName,server=$webserverName }}} If you have vars that need to be evaluated, pass in double quotes: set name Bob set word "My name is $name" puts $word (The above will print: "My name is Bob") If you pass a brace quoted string then no $ subst will be done. set name Bob set word {My name is $name} puts $word (The above will print: "My name is $name") P.S. The expr is for math expressions and has nothing to do with the problem you are having. Mo DeJong |
From: raj k. <raj...@gm...> - 2006-04-11 10:29:51
|
Hi, I have my variables set in my jcl script file as Set clusterName new Set nodeName singlenode Set webserverName webserver And I have a command in my jcl file to edit my deployed webapp as, $AdminApp edit my_webapp.war {-MapModulesToServers {{XXXX xxxx.war,WEB-INF/web.xml WebSphere:cluster=3D$ clusterName +WebSphere:cell=3DHD-CELLNUMBERCell02,node=3D$nodeName,server=3D$webserverN= ame }}} Here I am not able to run the above command as it is not able to evaluate my $variables. I tried to use 'expr' in this case=85.btu dint work. Can anyone help me how to execute this command using the *'$ variables'*set= . Thanks in advance. *- rajalakshmi ravva* |
From: Mo D. <md...@un...> - 2006-04-10 17:55:32
|
On Mon, 10 Apr 2006 08:56:29 -0700 "Khalid Sebti" <ks...@cr...> wrote: > Hi, > > On JACL forum, I found this response from Neil Madden on JACL license. > What are the licensing restrictions that may apply to using Jacl .? > Jacl, like Tcl, is BSD-licensed, so you can do pretty much whatever you like > with it. There should be a license.terms or similar in the distribution > which gives the full license details. Each Jacl download comes with the file license.txt that gives the license terms. Mo DeJong |
From: Martti T. <ma...@da...> - 2006-04-05 05:31:07
|
tcl...@li... wrote: The only minor problem so far is that the "-readyvar" option on >> TJC::compile never returns a result in the server. > Exception in thread "TJCThread service" java.lang.NoSuchMethodError: >This is a binary compat issue with a version of the compiler that you >installed already. >The following should fix the problem: > >make clean >make all >make install >rm -rf tjc2 >make tjc2 >make install Thank you. I'll remember to make clean in the future. I'll now post a simple example of my problem with the -readyvar option. -------- /* Test2 */ import tcl.lang.*; public class Test2 { public static void main(String[] args) { try { Interp interp = new Interp(); interp.eval("source [pwd]/unknown.tcl"); interp.eval("test"); } catch ( Exception e ) { e.printStackTrace(); } } } ----unknown.tcl---- package require TJC proc unknown { args } { set command [lindex $args 0] source [pwd]/${command}.tcl set compile_ready NOT TJC::compile $command -readyvar compile_ready vwait compile_ready if { ! [string equal [string range $compile_ready 0 1] "OK"] } { puts "Compilation failed on $args ($compile_ready)" return } else { return [eval $args] } } ------- The ouput is "Compilation failed on test (NOT)". If I don't set the variable compile_ready then it is undefined. The compiler runs correctly and vwait takes 6 seconds just as in a direct compile but the -readyvar variable is never set. In a more complex example the unknown proc running ignores the wait and seems to compile as it goes along and the proc execution speeds up considerably after a while. However I suspect it is dangerous to allow the compiler to replace procs from another thread while the interpreter is executing the source proc without waiting for the compile to finish. Cheers -- Martti Tienhaara (ma...@da...) DASH Software Ltd. |
From: Mo D. <md...@un...> - 2006-04-04 20:46:22
|
On Tue, 04 Apr 2006 12:36:53 -0700 Martti Tienhaara <ma...@da...> wrote: > make tjc2 > make tjc2.replace > make tjc.install > > java -classpath > /usr/local/lib/tcljava1.3.2/jacl.jar:/usr/local/lib/tcljava1.3.2/tcljava.jar:/usr/local/lib/tcljava1.3.2/tjc.jar:. > Test1 > Exception in thread "TJCThread service" java.lang.NoSuchMethodError: > tjc.ProcessTclSourceCmd.setVarScalar(Ltcl/lang/Interp;Ljava/lang/String; > Ltcl/lang/TclObject;ILtcl/lang/Var;I)Ltcl/lang/TclObject; This is a binary compat issue with a version of the compiler that you installed already. The following should fix the problem: make clean make all make install rm -rf tjc2 make tjc2 make install cheers Mo DeJong |
From: Martti T. <ma...@da...> - 2006-04-04 19:33:27
|
tcl...@li... wrote: > Message: 2 > Date: Sun, 26 Mar 2006 16:10:40 -0800 > From: Mo DeJong <md...@un...> > To: tcl...@li... > Subject: Re: [tcljava-dev] Re: tjc runtime compiler > Organization: None > Reply-To: tcl...@li... > > On Wed, 15 Feb 2006 22:52:28 -0800 > Martti Tienhaara <ma...@da...> wrote: > >> The only minor problem so far is that the "-readyvar" option on >> TJC::compile never returns a result in the server. It does return >> correctly in jaclsh. > > As far as I know, the only way that would happen is if your interp > is not processing events in the Tcl event queue. If that is the case, then > you could test this by setting up and after event and then testing to > see if it got processed. See the documentation and the Shell.java class > for examples of how a thread should grab an event off the Tcl event > queue and process it. > > Mo DeJong Sorry to take so long to respond. I wrote some test programs to demo some of the problems I am having. I'll include only one example. The Test1 program works as expected when running with the TJC compiler. "test.tcl" is just a "puts hello" proc and the result is; OK ::test {} hello from test After compiling the compiler the result from the same program is; make tjc2 make tjc2.replace make tjc.install java -classpath /usr/local/lib/tcljava1.3.2/jacl.jar:/usr/local/lib/tcljava1.3.2/tcljava.jar:/usr/local/lib/tcljava1.3.2/tjc.jar:. Test1 Exception in thread "TJCThread service" java.lang.NoSuchMethodError: tjc.ProcessTclSourceCmd.setVarScalar(Ltcl/lang/Interp;Ljava/lang/String;Ltcl/lang/TclObject;ILtcl/lang/Var;I)Ltcl/lang/TclObject; at tjc.ProcessTclSourceCmd.cmdProc(ProcessTclSourceCmd.java:21) at tcl.lang.Parser.evalObjv(Parser.java:837) at tcl.lang.Interp.eval(Interp.java:2619) at tcl.lang.TJCThread.processTclSource(TJCThread.java:623) at tcl.lang.TJCThread.processEvent(TJCThread.java:504) at tcl.lang.TJCThread.run(TJCThread.java:366) at java.lang.Thread.run(Thread.java:595) I can't seem to get JSwat to work with the test program to examine the internals even though it works well with other Java programs. I am not familiar enough with the compiler internals to understand what is going on here. ------ // Test1.java import tcl.lang.*; public class Test1 { public static void main(String[] args) { try { Interp interp = new Interp(); interp.eval("source [pwd]/test.tcl"); interp.eval("package require TJC"); interp.eval("TJC::compile test -readyvar compile_ready"); interp.eval("vwait compile_ready"); interp.eval("puts $compile_ready"); interp.eval("test"); } catch ( Exception e ) { e.printStackTrace(); } } } ------ # test.tcl proc test {} { puts "hello from test" } -- Martti Tienhaara (ma...@da...) DASH Software Ltd. |
From: Mo D. <md...@un...> - 2006-03-27 00:04:45
|
On Wed, 15 Feb 2006 22:52:28 -0800 Martti Tienhaara <ma...@da...> wrote: > The only minor problem so far is that the "-readyvar" option on > TJC::compile never returns a result in the server. It does return > correctly in jaclsh. As far as I know, the only way that would happen is if your interp is not processing events in the Tcl event queue. If that is the case, then you could test this by setting up and after event and then testing to see if it got processed. See the documentation and the Shell.java class for examples of how a thread should grab an event off the Tcl event queue and process it. Mo DeJong |
From: Mo D. <md...@un...> - 2006-03-26 23:57:50
|
Hello all I have recently implemented the "compiled locals" feature from the C version of Tcl in the TJC compiler. This feature makes use of an array of variable objects known at compile time instead of using a hashtable to store the variable objects. This means that a TJC compiled proc will now consume less memory and will execute more quickly in many cases. Here are the highlights showing performance improvements found when comparing TJC compiled code before and after the "compiled locals" enhancement. These times are all in ms, they come from the tclbench test suite found in tcljava/tests/tclbench in the CVS. Tcl Bench test name Pre-locals W-locals invoke_1_to_10 3585 1873 invoke_1_to_10_loop 51770 18320 invoke_empty 42 20 bench_set_different_scalars 26 10 bench_set_same_scalar 10 6 bench_set_global_import 18 12 bench_set_array_variable_keys 70 28 bench_set_array_and_scalar_names 52 38 bench_incr_array_constant_50 100 50 data-create-array 5668 1652 These results show that the "compiled locals" feature has resulted in a significant performance improvement for many common cases. cheers Mo DeJong |
From: Tom P. <tpo...@ny...> - 2006-03-09 16:08:29
|
On Wed, Mar 08, 2006 at 02:30:08PM -0800, Mo DeJong wrote: > @file thing will keep it from working with another compiler. What > I did was reimplement the [exec $JAVAC ...] bit so that files are > processed in batches of 40. This should fix the compile under Unix > while also avoiding the compiler out of memory problem. > > The fix is checked into CVS as of today, please let me know if you > run into any more problems. Yep, latest CVS sources are now making tjc2 just fine, and no stack problems during compile. -- Tom Poindexter tpo...@ny... |
From: Mo D. <md...@un...> - 2006-03-08 22:24:31
|
On Tue, 7 Mar 2006 16:53:45 -0700 Tom Poindexter <tpo...@ny...> wrote: > > > Mo, I got this error while trying to compile tjc: > > > > > > $ make tjc2 > > > compile TJC Tcl source files > > > tjc tjc.tjc > > > error: cannot read: /home/tpoindex/src/java/tcljava.cvs/build/tjc2/bldTJC/source/tjc/*.java > > > 1 error ... > See attached jdk.tcl.diff and jdk.tcl (to patch/replace > ./src/tjc/tjc/library/jdk.tcl) > > The fix glob's files to expand wildcard patterns, > writes the resulting list of files to another file, > and uses javac's '@filename' to specify the file > containing the list of files. > > Also, I had to increase the memory for javac to > prevent out of memory errors during 'make tjc2'. This is a fine patch, but I think this javac function is getting too messy. There is no real reason to support wildcard expansion and using the @file thing will keep it from working with another compiler. What I did was reimplement the [exec $JAVAC ...] bit so that files are processed in batches of 40. This should fix the compile under Unix while also avoiding the compiler out of memory problem. The fix is checked into CVS as of today, please let me know if you run into any more problems. Mo DeJong |
From: Mo D. <md...@un...> - 2006-03-08 22:18:24
|
On Tue, 7 Mar 2006 10:09:46 -0700 Tom Poindexter <tpo...@ny...> wrote: > $ jaclsh > % proc randazAZchar {} { > return [format %c [expr {int(rand() * 26) + [expr {int(rand() * 10) > 5 ? 97 : 65}]}]] > } > % TJC::compile randazAZchar > % Interal error while compiling proc "randazAZchar" in file RandazAZcharCmd > unknown type "operator" in {operator { > return [format %c [expr {int(rand() * 26) + [expr {int(rand() * 10) > 5 ? 97 : 65}]}]] > } Ugh. That is a nasty one. It can be reproduced with just [expr {rand() * 1}]. This issue has now been fixed and the patch has been checked into the CVS. Mo DeJong |
From: Tom P. <tpo...@ny...> - 2006-03-07 23:53:56
|
On Thu, Mar 02, 2006 at 11:05:50AM -0800, Mo DeJong wrote: > On Thu, 2 Mar 2006 10:37:50 -0700 > Tom Poindexter <tpo...@ny...> wrote: > > > Mo, I got this error while trying to compile tjc: > > > > $ make tjc2 > > compile TJC Tcl source files > > tjc tjc.tjc > > error: cannot read: /home/tpoindex/src/java/tcljava.cvs/build/tjc2/bldTJC/source/tjc/*.java > > 1 error > > Well, the command line to javac is something like: > > javac source/tjc/*.java > > It does that instead of passing a huge number of filenames on the command line > because the exec blows up under Windows when the command line is too long. > I wonder if the Unix version of javac can't accept a file name pattern like the > Windows version does. > > You could try to disable that pattern logic in jdk.tcl and see if that fixes it. See attached jdk.tcl.diff and jdk.tcl (to patch/replace ./src/tjc/tjc/library/jdk.tcl) The fix glob's files to expand wildcard patterns, writes the resulting list of files to another file, and uses javac's '@filename' to specify the file containing the list of files. Also, I had to increase the memory for javac to prevent out of memory errors during 'make tjc2'. > > Small request: how about a '-wait' option for TJC::compile that waits > > until compilation is completed, throwing a Tcl error on compile error? > > Notification is already implemented: A shortcut would still be nice to have, perhaps: proc TJC::proc {name arglist body} { uplevel #0 [list ::proc $name $arglist $body] set ::TJC::__DONE__ "" TJC::compile $name -readyvar ::TJC::__DONE__ vwait ::TJC::__DONE__ } -- Tom Poindexter tpo...@ny... |
From: Tom P. <tpo...@ny...> - 2006-03-07 17:09:56
|
While working a fix for the 'make tjc2' error, I borrowed some wiki code to generate temp files, encounter this TJC error: $ jaclsh % proc randazAZchar {} { return [format %c [expr {int(rand() * 26) + [expr {int(rand() * 10) > 5 ? 97 : 65}]}]] } % randazAZchar i % randazAZchar u % package require TJC 1.0 % TJC::compile randazAZchar % Interal error while compiling proc "randazAZchar" in file RandazAZcharCmd unknown type "operator" in {operator { return [format %c [expr {int(rand() * 26) + [expr {int(rand() * 10) > 5 ? 97 : 65}]}]] } {operator {34 4} {}} 0 rand {{34 4}}} at index 1 while executing "error "unknown type \"$operand_cmdlist_elem_type\" in \{$operand_cmdlist_elem\} at index $j"" ("if" else script line 2) invoked from within "if {$operand_cmdlist_elem_type == "subexpr"} { ....etc.... -- Tom Poindexter tpo...@ny... |
From: Mo D. <md...@un...> - 2006-03-02 19:00:31
|
On Thu, 2 Mar 2006 10:37:50 -0700 Tom Poindexter <tpo...@ny...> wrote: > Mo, I got this error while trying to compile tjc: > > $ make tjc2 > compile TJC Tcl source files > tjc tjc.tjc > error: cannot read: /home/tpoindex/src/java/tcljava.cvs/build/tjc2/bldTJC/source/tjc/*.java > 1 error Well, the command line to javac is something like: javac source/tjc/*.java It does that instead of passing a huge number of filenames on the command line because the exec blows up under Windows when the command line is too long. I wonder if the Unix version of javac can't accept a file name pattern like the Windows version does. You could try to disable that pattern logic in jdk.tcl and see if that fixes it. > I'm current on CVS, and ran: > > cvs -q up -dP > ./configure --enable-jacl --disable-tclblend > make > make tjc2 You don't need to pass --disable-tclblend there since --enable-jacl already does that implicitly. Also, you need to install before running the tjc2 target. make make install make tjc2 > Jacl ('make install' after above build) and TJC work otherwise: > > $ jaclsh > % package require TJC > 1.0 > % proc foo {args} {puts "foo here"} > % info body foo > puts "foo here" > % foo > foo here > % TJC::compile foo > % after 10000 > % info body foo > "foo" isn't a procedure > % foo > foo here > > > Small request: how about a '-wait' option for TJC::compile that waits > until compilation is completed, throwing a Tcl error on compile error? Notification is already implemented: TJC::compile foo -readyvar rvar vwait rvar puts stderr "rvar result is \{$rvar\}" cheers Mo DeJong |
From: Tom P. <tpo...@ny...> - 2006-03-02 17:38:00
|
Mo, I got this error while trying to compile tjc: $ make tjc2 compile TJC Tcl source files tjc tjc.tjc error: cannot read: /home/tpoindex/src/java/tcljava.cvs/build/tjc2/bldTJC/source/tjc/*.java 1 error real 9m39.976s user 8m8.844s sys 0m5.013s make[1]: *** [tjc2/tjc.jar] Error 255 make: *** [tjc2] Error 2 I'm current on CVS, and ran: cvs -q up -dP ./configure --enable-jacl --disable-tclblend make make tjc2 My Java is: $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) and machine: $ uname -a Linux xxxxxxxx 2.6.12-10-amd64-generic #1 Mon Feb 13 12:14:05 UTC 2006 x86_64 GNU/Linux Jacl ('make install' after above build) and TJC work otherwise: $ jaclsh % package require TJC 1.0 % proc foo {args} {puts "foo here"} % info body foo puts "foo here" % foo foo here % TJC::compile foo % after 10000 % info body foo "foo" isn't a procedure % foo foo here Small request: how about a '-wait' option for TJC::compile that waits until compilation is completed, throwing a Tcl error on compile error? -- Tom Poindexter tpo...@ny... |
From: Tom P. <tpo...@ny...> - 2006-03-02 15:18:16
|
On Thu, Mar 02, 2006 at 12:55:45AM -0800, Mo DeJong wrote: > These results show that compiling with TJC lead to code > that executed 7.8 times faster. That is quite an improvement. > The TJC compiled Jacl version of this code even executes > about twice as fast as the same code running in the C version > of Tcl. Very nice, Mo. -- Tom Poindexter tpo...@ny... |
From: Mo D. <md...@un...> - 2006-03-02 08:50:18
|
Hello I decided to try to get some "real world" numbers related to the TJC compiler. What I did was to test how long the TJC compiler took to compile itself and then compared that with how long a TJC compiled version of itself took to compile itself. Just to make things even more interesting, I compared those times to the amount of time it took to execute the TJC compiler in the C version of Tcl which has an embedded compiler and byte code engine. Here are the results. C Tcl (Tcl byte code compiler) $ time tjc -nocompile tjc.tjc real 5m30s (330 s) Interpreted in Jacl (no compilation) $ time tjc -nocompile tjc.tjc real 21m17s (1277 s) TJC compiled in Jacl: $ time tjc -nocompile tjc.tjc real 2m42s (162 s) These results show that compiling with TJC lead to code that executed 7.8 times faster. That is quite an improvement. The TJC compiled Jacl version of this code even executes about twice as fast as the same code running in the C version of Tcl. cheers Mo DeJong P.S. I added support to the Makefile for a 2 stage build rule that will recompile the TJC source with TJC. Just build the normal way and then run "make install". After that, run "make tjc2 tjc2.replace tjc.install" to 2 stage the compiler and install the compiled versions of tjc.jar and tjcsrc.jar. The numbers above show that this 2 stage will take about 20 minutes to run the first time, but the compiler will then execute about 8 times faster. |