Thread: [tcljava-dev] Jacl help offer
Brought to you by:
mdejong
From: Shawn B. <sh...@qc...> - 2002-01-02 19:05:46
|
I'm willing to help out with Jacl 1.3. What are areas that need addressing? I didn't see major items in the diffs.txt file that were not being worked on (ie. channel I/O and socket). My main interest is reducing the number of differences with Tcl so that I can just point users to the "standard" Tcl books and not have to explain what's missing. These commands are listed as being not implemented. Any votes? > auto_mkindex, fblocked, fcopy, fconfigure, fileevent > load, pkg_mkIndex, pid, socket > -- -Shawn |
From: Mo D. <su...@ba...> - 2002-01-02 22:14:28
|
On Wed, 02 Jan 2002 14:05:42 -0500 Shawn Boyce <sh...@qc...> wrote: > I'm willing to help out with Jacl 1.3. What are areas that need addressing? > I didn't see major items in the diffs.txt file that were not being > worked on > (ie. channel I/O and socket). Well, some IO areas are being worked on but others could still use some work. For example, async IO and pipes still need to be implemented. These are not currently being targeted in the Channel rewrite. > My main interest is reducing the number of differences > with Tcl so that I can just point users to the "standard" > Tcl books and not have to explain what's missing. There are not a lot of features left to implement, but the ones that are left can be rather tricky. Perhaps a good place to get started with the code would be in the exec command. A new version of the exec() API was added in JDK 1.3: http://java.sun.com/j2se/1.3/docs/api/java/lang/Runtime.html#exec(java.lang.String[], java.lang.String[], java.io.File) The current exec code in src/jacl/tcl/lang/ExecCmd.java does this really scary/nasty hack that involves writing out tmp files and then execing sh on them. It would be better if we could just make use of this new exec API. Trick is, Jacl needs to continue to run on a JDK 1.1 system so one would need to invoke the method at runtime through an interface and compile the class only when compiling with a newer version of Java. It might be easier to try to invoke this method via the reflection interface. How does that sound? If you want a bigger challenge after that, the automated test cases could use a lot of work. Mo |
From: Shawn B. <sh...@qc...> - 2002-01-03 15:45:06
|
Mo DeJong wrote: >There are not a lot of features left to implement, but the >ones that are left can be rather tricky. Perhaps a good >place to get started with the code would be in the >exec command. A new version of the exec() API was > Fine. > >added in JDK 1.3: > >http://java.sun.com/j2se/1.3/docs/api/java/lang/Runtime.html#exec(java.lang.String[], java.lang.String[], java.io.File) > >The current exec code in src/jacl/tcl/lang/ExecCmd.java does this really >scary/nasty hack that involves writing out tmp files and then execing >sh on them. It would be better if we could just make use of this new > How does the new API help? Is it really necessary for the code to specify the command shell (command.com or sh)? For Windows, if I use the new API, do I need the temporary files anymore? > >exec API. Trick is, Jacl needs to continue to run on a JDK 1.1 system >so one would need to invoke the method at runtime through an >interface and compile the class only when compiling with a newer >version of Java. It might be easier to try to invoke this method via >the reflection interface. How does that sound? > I'll look into it. I'm not sure about the compilation part. If I use reflection on java.lang.Runtime to see if the new method exists, then the code will compile fine with pre-1.3. > > >If you want a bigger challenge after that, the automated test cases >could use a lot of work. > >Mo > >_______________________________________________ >tcljava-dev mailing list >tcl...@li... >https://lists.sourceforge.net/lists/listinfo/tcljava-dev > > -- -Shawn |
From: Mo D. <su...@ba...> - 2002-01-03 20:31:40
|
On Thu, 03 Jan 2002 10:45:02 -0500 Shawn Boyce <sh...@qc...> wrote: > >The current exec code in src/jacl/tcl/lang/ExecCmd.java does this really > >scary/nasty hack that involves writing out tmp files and then execing > >sh on them. It would be better if we could just make use of this new > > > How does the new API help? Is it really necessary for the code to > specify the command shell > (command.com or sh)? For Windows, if I use the new API, do I need the > temporary files anymore? If you use the new API then the temp files will no longer be needed. The whole point of the hack was to work around the fact that you could not set the CWD when execing. > >exec API. Trick is, Jacl needs to continue to run on a JDK 1.1 system > >so one would need to invoke the method at runtime through an > >interface and compile the class only when compiling with a newer > >version of Java. It might be easier to try to invoke this method via > >the reflection interface. How does that sound? > > > I'll look into it. I'm not sure about the compilation part. If I use > reflection on java.lang.Runtime > to see if the new method exists, then the code will compile fine with > pre-1.3. That seems like the most simple approach to implement. cheers Mo |
From: Shawn B. <sh...@qc...> - 2002-01-08 04:06:02
|
I have the exec changes. How do I submit them? Shawn Boyce wrote: > > > Mo DeJong wrote: > >> There are not a lot of features left to implement, but the >> ones that are left can be rather tricky. Perhaps a good >> place to get started with the code would be in the >> exec command. A new version of the exec() API was >> > Fine. > >> >> added in JDK 1.3: >> >> http://java.sun.com/j2se/1.3/docs/api/java/lang/Runtime.html#exec(java.lang.String[], >> java.lang.String[], java.io.File) >> >> The current exec code in src/jacl/tcl/lang/ExecCmd.java does this really >> scary/nasty hack that involves writing out tmp files and then execing >> sh on them. It would be better if we could just make use of this new >> > How does the new API help? Is it really necessary for the code to > specify the command shell > (command.com or sh)? For Windows, if I use the new API, do I need the > temporary files anymore? > >> >> exec API. Trick is, Jacl needs to continue to run on a JDK 1.1 system >> so one would need to invoke the method at runtime through an >> interface and compile the class only when compiling with a newer >> version of Java. It might be easier to try to invoke this method via >> the reflection interface. How does that sound? >> > I'll look into it. I'm not sure about the compilation part. If I use > reflection on java.lang.Runtime > to see if the new method exists, then the code will compile fine with > pre-1.3. > >> >> >> If you want a bigger challenge after that, the automated test cases >> could use a lot of work. >> >> Mo >> >> _______________________________________________ >> tcljava-dev mailing list >> tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcljava-dev >> >> > -- -Shawn |
From: Mo D. <su...@ba...> - 2002-01-08 05:02:48
|
On Mon, 07 Jan 2002 23:05:53 -0500 Shawn Boyce <sh...@qc...> wrote: > I have the exec changes. How do I submit them? For quick little changes you can just post them to the list. If the patch is a bit larger (which I expect this one is) you could add a new patch to the sourceforge patch queue. Either way, post a note to the list nothing that you just added a patch, make sure there is a ChangeLog entry, and make sure the patch is in diff -u format. cheers Mo |
From: Shawn B. <sh...@qc...> - 2002-01-08 15:16:11
|
Sorry I'm new to this. How do I add the ChangeLog entry? Include it with my patch? Mo DeJong wrote: >On Mon, 07 Jan 2002 23:05:53 -0500 >Shawn Boyce <sh...@qc...> wrote: > >>I have the exec changes. How do I submit them? >> > >For quick little changes you can just post them to the list. If the patch is a bit larger (which I expect this one is) you could add a new patch to the sourceforge patch queue. Either way, post a note to the list nothing that you just added a patch, make sure there is a ChangeLog entry, and make sure the patch is in diff -u format. > >cheers >Mo > >_______________________________________________ >tcljava-dev mailing list >tcl...@li... >https://lists.sourceforge.net/lists/listinfo/tcljava-dev > > -- -Shawn |
From: Mo D. <su...@ba...> - 2002-01-08 16:01:59
|
On Tue, 08 Jan 2002 10:16:03 -0500 Shawn Boyce <sh...@qc...> wrote: > Sorry I'm new to this. How do I add the ChangeLog entry? Include it with > my patch? Yeah. Take a look at the existing ChangeLog for examples. You might end up with something like so: 2002-01-08 Shawn Boyce <sh...@qc...> * src/jacl/tcl/lang/ExecCmd.java (FuncName): Did something or other. Include a desc for each file you changed and what exactly you did. A ChangeLog is the only way to really go back and figure out what happened to the code so a patch really should include one. cheers Mo |