|
From: Arnulf W. <ar...@wi...> - 2011-04-01 07:05:09
|
Hello Miachal, sounds good from my point of view too. I agree on all what you have written down. Did not have to much time to think about it, as payed work is waiting. I would say: go ahead in that direction and let us see what Lars is answering, because I am interested on how he is doing that in detail, for learning how we can use a modified part in our project. Arnulf Am 31.03.2011 22:00, schrieb dmp: > Hello Arnulf, > > To update status of programming languages: C seems to be unused and > tcl part will be bigger, Java part unchanged. > > I was thinking about architecture. I'm sure it doesn't have to be a > deamon. My idea: User clicks "run with debug" event: netbeans debugger > executes tclsh to run prepared debugscript.tcl with path to edited.tcl > script from netbeans editor and also opens a socket for comunication > between debugscript.tcl and netbeans. debugscript.tcl(master) similar > to Lars's solution executes edited.tcl(slave) but also providing > builtin trace and info(debug information). debugscript.tcl capture > debug information and sends it to netbeans debugger via socket. > debugscript.tcl supervise execution, by socket from netbeans debugger > events. > > If tcl script from netbeans will be debug using tclsh. It would be > nice to have interactive tcl shell window in netbeans, and ability to > put commands. During breakpoint for example. > > Let me know what you think. > > Thanks, > Michal > > > 2011/3/31 Arnulf Wiedemann <ar...@wi...>: >> Hello Lars, >> yes I am interested in the code you mentioned. If you can wikify it or >> give us somehow access to it, that would be great. >> >> Arnulf, >> >> Am 31.03.2011 10:45, schrieb Lars Hellström: >>> Arnulf Wiedemann skrev 2011-03-30 19.54: >>>> I agree we could have plugin execute tclsh as you describe, but I would >>>> like to use netbeans plugin to edit sources of Tcl scripts with syntax >>>> highlighting and to be able to set breakpoints and get variable infos >>>> etc. . So I think the interface I described yesterday could also be used >>>> for this solution sending some requests to tclsh via socket or whatever >>>> interface and get back the required information from tclsh. >>>> >>>> So netbeans would drive an instance of tclsh using some dedicated >>>> interface and the Tcl side has to instrument the application using trace >>>> execution command using the info provided from netbeans GUI and using >>>> the handling script thereof for communicating with netbeans to deliver >>>> back info or instrument the application according to the request sent >>>> from netbeans. >>> >>> This reminds me of a piece of code I wrote a couple of years ago (as part >>> of an as-yet unfinished IPC project), which spawns a child tclsh and >>> effectively sets it up as a slave [interp], complete with the ability to >>> create aliases in the slave which call back to commands in the master. I >>> could have a go at wikifying it or something, if you're interested. >>> >>> In particular I might point out that the code was written before 8.5 was >>> released, so it handles 8.4 and 8.5 both, which might be convenient if >>> JTcl is to be used at one end; there is specifically no assumption that >>> master and slave must be running the same Tcl version. >>> >>> Lars Hellström >>> >>> >>> ------------------------------------------------------------------------------ >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and >>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> Tcl-gsoc mailing list >>> Tcl...@li... >>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and >> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> Tcl-gsoc mailing list >> Tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> |
|
From: Lars H. <Lar...@re...> - 2011-04-01 16:19:23
|
Arnulf Wiedemann skrev 2011-04-01 09.04: > Hello Miachal, > sounds good from my point of view too. I agree on all what you have > written down. Did not have to much time to think about it, as payed work > is waiting. > > I would say: go ahead in that direction and let us see what Lars is > answering, because I am interested on how he is doing that in detail, > for learning how we can use a modified part in our project. The code I mentioned can now be found at http://wiki.tcl.tk/28182. Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but bear in mind that the scope of the problem that it set out to address is somewhat larger than just controlling a child tclsh, so there are a lot of issues considered that you're probably not so interested in. For a first experiment, you might want to try something like the following: % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 ::my::slave % ::my::slave eval {array get tcl_platform} osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 platform unix os Darwin tip,280 1 user lars wordSize 4 % exec ps -p 19741 PID TT STAT TIME COMMAND 19741 ?? S 0:00.10 tclsh8.4 % ::my::slave exit % exec ps -p 19741 Error: PID TT STAT TIME COMMAND child process exited abnormally % (ps exits with a nonzero status, since the process 19741 wasn't around anymore.) Lars Hellström |
|
From: Arnulf W. <ar...@wi...> - 2011-04-01 17:47:51
|
Hello Lars, great!! and excellent work! I extracted the code with: http://wiki.tcl.tk/28182.code @Michal: extracting code from Tcl wiki pages can be done like so: http://wiki.tcl.tk/28182.code did comment out the first block and ran it with a tclsh8.5 starting a tclsh8.6. It worked perfect! > tclsh8.5 % source hubs.tcl % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 ::my::slave % ::my::slave eval {package require Itcl} 4.0b5 % I am pretty sure, we will use that in the project. And thanks for providing all the wiki entries. Arnulf Am 01.04.2011 18:19, schrieb Lars Hellström: > Arnulf Wiedemann skrev 2011-04-01 09.04: >> > Hello Miachal, >> > sounds good from my point of view too. I agree on all what you have >> > written down. Did not have to much time to think about it, as payed work >> > is waiting. >> > >> > I would say: go ahead in that direction and let us see what Lars is >> > answering, because I am interested on how he is doing that in detail, >> > for learning how we can use a modified part in our project. > The code I mentioned can now be found at http://wiki.tcl.tk/28182. > > Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but > bear in mind that the scope of the problem that it set out to address is > somewhat larger than just controlling a child tclsh, so there are a lot of > issues considered that you're probably not so interested in. > > For a first experiment, you might want to try something like the following: > > % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 > Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 > ::my::slave > % ::my::slave eval {array get tcl_platform} > osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 > platform unix os Darwin tip,280 1 user lars wordSize 4 > % exec ps -p 19741 > PID TT STAT TIME COMMAND > 19741 ?? S 0:00.10 tclsh8.4 > % ::my::slave exit > % exec ps -p 19741 > Error: PID TT STAT TIME COMMAND > child process exited abnormally > % > > (ps exits with a nonzero status, since the process 19741 wasn't around > anymore.) > > Lars Hellström > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > Tcl-gsoc mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-gsoc |
|
From: dmp <dmp...@gm...> - 2011-04-02 10:32:20
|
Hello Arnulf, I've tried code. Of course works here, too. Time to consider using JTCL. I agree with your idea to write debugscript.tcl using JTCL. It may be better solution. Also opportunity to make JTCL more popular. Probably there should also be prepared separate JTCL plugin for netbeans like jython did it. Thank you very much Lars. It'll be helpfull. Thanks, Michal 2011/4/1 Arnulf Wiedemann <ar...@wi...>: > Hello Lars, > great!! and excellent work! > > I extracted the code with: http://wiki.tcl.tk/28182.code > > @Michal: extracting code from Tcl wiki pages can be done like so: > http://wiki.tcl.tk/28182.code > > did comment out the first block and ran it with a tclsh8.5 starting a > tclsh8.6. > It worked perfect! > >> tclsh8.5 > % source hubs.tcl > % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 > Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 > ::my::slave > % ::my::slave eval {package require Itcl} > 4.0b5 > % > > I am pretty sure, we will use that in the project. > And thanks for providing all the wiki entries. > > Arnulf > > Am 01.04.2011 18:19, schrieb Lars Hellström: >> Arnulf Wiedemann skrev 2011-04-01 09.04: >>> > Hello Miachal, >>> > sounds good from my point of view too. I agree on all what you have >>> > written down. Did not have to much time to think about it, as payed work >>> > is waiting. >>> > >>> > I would say: go ahead in that direction and let us see what Lars is >>> > answering, because I am interested on how he is doing that in detail, >>> > for learning how we can use a modified part in our project. >> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >> >> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >> bear in mind that the scope of the problem that it set out to address is >> somewhat larger than just controlling a child tclsh, so there are a lot of >> issues considered that you're probably not so interested in. >> >> For a first experiment, you might want to try something like the following: >> >> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >> ::my::slave >> % ::my::slave eval {array get tcl_platform} >> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >> platform unix os Darwin tip,280 1 user lars wordSize 4 >> % exec ps -p 19741 >> PID TT STAT TIME COMMAND >> 19741 ?? S 0:00.10 tclsh8.4 >> % ::my::slave exit >> % exec ps -p 19741 >> Error: PID TT STAT TIME COMMAND >> child process exited abnormally >> % >> >> (ps exits with a nonzero status, since the process 19741 wasn't around >> anymore.) >> >> Lars Hellström >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and >> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> Tcl-gsoc mailing list >> Tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > Tcl-gsoc mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-gsoc > |
|
From: Radosław S. <rad...@sz...> - 2011-04-02 15:16:20
|
Thanks in advance for popularizing JTCL :) If your was project, we (JTcl team) would consider creating a separate plugin for NB. However, the one you are going to create would be much useful for JTcl soft. developers. Once again, good idea and good luck to you. -- Radek W dniu 02.04.2011 12:32, dmp pisze: > Hello Arnulf, > > I've tried code. Of course works here, too. > > Time to consider using JTCL. I agree with your idea to write > debugscript.tcl using JTCL. It may be better solution. Also > opportunity to make JTCL more popular. Probably there should also be > prepared separate JTCL plugin for netbeans like jython did it. > > Thank you very much Lars. It'll be helpfull. > > Thanks, > Michal > > 2011/4/1 Arnulf Wiedemann <ar...@wi...>: >> Hello Lars, >> great!! and excellent work! >> >> I extracted the code with: http://wiki.tcl.tk/28182.code >> >> @Michal: extracting code from Tcl wiki pages can be done like so: >> http://wiki.tcl.tk/28182.code >> >> did comment out the first block and ran it with a tclsh8.5 starting a >> tclsh8.6. >> It worked perfect! >> >>> tclsh8.5 >> % source hubs.tcl >> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >> ::my::slave >> % ::my::slave eval {package require Itcl} >> 4.0b5 >> % >> >> I am pretty sure, we will use that in the project. >> And thanks for providing all the wiki entries. >> >> Arnulf >> >> Am 01.04.2011 18:19, schrieb Lars Hellström: >>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>> Hello Miachal, >>>>> sounds good from my point of view too. I agree on all what you have >>>>> written down. Did not have to much time to think about it, as payed work >>>>> is waiting. >>>>> >>>>> I would say: go ahead in that direction and let us see what Lars is >>>>> answering, because I am interested on how he is doing that in detail, >>>>> for learning how we can use a modified part in our project. >>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>> >>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>> bear in mind that the scope of the problem that it set out to address is >>> somewhat larger than just controlling a child tclsh, so there are a lot of >>> issues considered that you're probably not so interested in. >>> >>> For a first experiment, you might want to try something like the following: >>> >>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>> ::my::slave >>> % ::my::slave eval {array get tcl_platform} >>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>> % exec ps -p 19741 >>> PID TT STAT TIME COMMAND >>> 19741 ?? S 0:00.10 tclsh8.4 >>> % ::my::slave exit >>> % exec ps -p 19741 >>> Error: PID TT STAT TIME COMMAND >>> child process exited abnormally >>> % >>> >>> (ps exits with a nonzero status, since the process 19741 wasn't around >>> anymore.) >>> >>> Lars Hellström >>> >>> >>> ------------------------------------------------------------------------------ >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and >>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> Tcl-gsoc mailing list >>> Tcl...@li... >>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and >> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> Tcl-gsoc mailing list >> Tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > Tcl-gsoc mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-gsoc |
|
From: Arnulf W. <ar...@wi...> - 2011-04-02 15:37:24
|
Hello Michal, see my comments below. Arulf Am 02.04.2011 12:32, schrieb dmp: > Hello Arnulf, > > I've tried code. Of course works here, too. > > Time to consider using JTCL. I agree with your idea to write > debugscript.tcl using JTCL. It may be better solution. Also > opportunity to make JTCL more popular. Probably there should also be > prepared separate JTCL plugin for netbeans like jython did it. I had a similar idea. for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I did not know that itcl is running in JTCL, so my fault to say it is not existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs for communication (that will also allow remote debugging, if I have understood correctly). Best would be to use the same mechanism/interface in both cases when using hubs started from JTCL for "not integrated" and using some tcl script running directly in JTCL in the other case. I am also happy, if that helps JTCL as a side effect. > > Thank you very much Lars. It'll be helpfull. > > Thanks, > Michal > > 2011/4/1 Arnulf Wiedemann <ar...@wi...>: >> Hello Lars, >> great!! and excellent work! >> >> I extracted the code with: http://wiki.tcl.tk/28182.code >> >> @Michal: extracting code from Tcl wiki pages can be done like so: >> http://wiki.tcl.tk/28182.code >> >> did comment out the first block and ran it with a tclsh8.5 starting a >> tclsh8.6. >> It worked perfect! >> >>> tclsh8.5 >> % source hubs.tcl >> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >> ::my::slave >> % ::my::slave eval {package require Itcl} >> 4.0b5 >> % >> >> I am pretty sure, we will use that in the project. >> And thanks for providing all the wiki entries. >> >> Arnulf >> >> Am 01.04.2011 18:19, schrieb Lars Hellström: >>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>> Hello Miachal, >>>>> sounds good from my point of view too. I agree on all what you have >>>>> written down. Did not have to much time to think about it, as payed work >>>>> is waiting. >>>>> >>>>> I would say: go ahead in that direction and let us see what Lars is >>>>> answering, because I am interested on how he is doing that in detail, >>>>> for learning how we can use a modified part in our project. >>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>> >>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>> bear in mind that the scope of the problem that it set out to address is >>> somewhat larger than just controlling a child tclsh, so there are a lot of >>> issues considered that you're probably not so interested in. >>> >>> For a first experiment, you might want to try something like the following: >>> >>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>> ::my::slave >>> % ::my::slave eval {array get tcl_platform} >>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>> % exec ps -p 19741 >>> PID TT STAT TIME COMMAND >>> 19741 ?? S 0:00.10 tclsh8.4 >>> % ::my::slave exit >>> % exec ps -p 19741 >>> Error: PID TT STAT TIME COMMAND >>> child process exited abnormally >>> % >>> >>> (ps exits with a nonzero status, since the process 19741 wasn't around >>> anymore.) >>> >>> Lars Hellström >>> >>> >>> ------------------------------------------------------------------------------ >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and >>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> Tcl-gsoc mailing list >>> Tcl...@li... >>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and >> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> Tcl-gsoc mailing list >> Tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> |
|
From: dmp <dmp...@gm...> - 2011-04-08 12:16:47
|
Hello Tcl Community, Currently students posting here informations about their proposals. I've submited my application, too. :) Thanks, Michal On 2 April 2011 15:37, Arnulf Wiedemann <ar...@wi...> wrote: > Hello Michal, > see my comments below. > > Arulf > > Am 02.04.2011 12:32, schrieb dmp: >> Hello Arnulf, >> >> I've tried code. Of course works here, too. >> >> Time to consider using JTCL. I agree with your idea to write >> debugscript.tcl using JTCL. It may be better solution. Also >> opportunity to make JTCL more popular. Probably there should also be >> prepared separate JTCL plugin for netbeans like jython did it. > > I had a similar idea. > for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I > did not know that itcl is running in JTCL, so my fault to say it is not > existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when > debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 > or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs > for communication (that will also allow remote debugging, if I have > understood correctly). > > Best would be to use the same mechanism/interface in both cases when > using hubs started from JTCL for "not integrated" and using some tcl > script running directly in JTCL in the other case. > > I am also happy, if that helps JTCL as a side effect. > > >> >> Thank you very much Lars. It'll be helpfull. >> >> Thanks, >> Michal >> >> 2011/4/1 Arnulf Wiedemann <ar...@wi...>: >>> Hello Lars, >>> great!! and excellent work! >>> >>> I extracted the code with: http://wiki.tcl.tk/28182.code >>> >>> @Michal: extracting code from Tcl wiki pages can be done like so: >>> http://wiki.tcl.tk/28182.code >>> >>> did comment out the first block and ran it with a tclsh8.5 starting a >>> tclsh8.6. >>> It worked perfect! >>> >>>> tclsh8.5 >>> % source hubs.tcl >>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>> ::my::slave >>> % ::my::slave eval {package require Itcl} >>> 4.0b5 >>> % >>> >>> I am pretty sure, we will use that in the project. >>> And thanks for providing all the wiki entries. >>> >>> Arnulf >>> >>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>> Hello Miachal, >>>>>> sounds good from my point of view too. I agree on all what you have >>>>>> written down. Did not have to much time to think about it, as payed work >>>>>> is waiting. >>>>>> >>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>> answering, because I am interested on how he is doing that in detail, >>>>>> for learning how we can use a modified part in our project. >>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>> >>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>> bear in mind that the scope of the problem that it set out to address is >>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>> issues considered that you're probably not so interested in. >>>> >>>> For a first experiment, you might want to try something like the following: >>>> >>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>> ::my::slave >>>> % ::my::slave eval {array get tcl_platform} >>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>> % exec ps -p 19741 >>>> PID TT STAT TIME COMMAND >>>> 19741 ?? S 0:00.10 tclsh8.4 >>>> % ::my::slave exit >>>> % exec ps -p 19741 >>>> Error: PID TT STAT TIME COMMAND >>>> child process exited abnormally >>>> % >>>> >>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>> anymore.) >>>> >>>> Lars Hellström >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Create and publish websites with WebMatrix >>>> Use the most popular FREE web apps or write code yourself; >>>> WebMatrix provides all the features you need to develop and >>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>> _______________________________________________ >>>> Tcl-gsoc mailing list >>>> Tcl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>> >>> >>> ------------------------------------------------------------------------------ >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and >>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> Tcl-gsoc mailing list >>> Tcl...@li... >>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>> > > |
|
From: dmp <dmp...@gm...> - 2011-05-05 21:21:27
|
Hello Arnulf, I've checked Tcl plugin already available and its lexer to provide syntax hilight. Short tutorial to reproduce: $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm $ unzip org-netbeans-modules-languages-tcl.nbm $ cd netbeans/modules $ unzip org-netbeans-modules-languages-tcl.jar $ cd org/netbeans/modules/languages/tcl and there is TCL.nbs file - it contains lexer. I've got question about license, there are some restriction for this file. I pasted its license header here: http://wklej.org/id/524675/ (for other readers). Due possible restrictions I will prefer to write own version from scratch, It shouldn't be difficult to collect all Tcl keywords and prepare similar solution. And here comes my question: Which licence I should use for every project file? As far as I know, It depends on mentor and organization :) Thanks, Michal On 8 April 2011 14:16, dmp <dmp...@gm...> wrote: > Hello Tcl Community, > > Currently students posting here informations about their proposals. > I've submited my application, too. :) > > Thanks, > Michal > > On 2 April 2011 15:37, Arnulf Wiedemann <ar...@wi...> wrote: >> Hello Michal, >> see my comments below. >> >> Arulf >> >> Am 02.04.2011 12:32, schrieb dmp: >>> Hello Arnulf, >>> >>> I've tried code. Of course works here, too. >>> >>> Time to consider using JTCL. I agree with your idea to write >>> debugscript.tcl using JTCL. It may be better solution. Also >>> opportunity to make JTCL more popular. Probably there should also be >>> prepared separate JTCL plugin for netbeans like jython did it. >> >> I had a similar idea. >> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >> did not know that itcl is running in JTCL, so my fault to say it is not >> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >> for communication (that will also allow remote debugging, if I have >> understood correctly). >> >> Best would be to use the same mechanism/interface in both cases when >> using hubs started from JTCL for "not integrated" and using some tcl >> script running directly in JTCL in the other case. >> >> I am also happy, if that helps JTCL as a side effect. >> >> >>> >>> Thank you very much Lars. It'll be helpfull. >>> >>> Thanks, >>> Michal >>> >>> 2011/4/1 Arnulf Wiedemann <ar...@wi...>: >>>> Hello Lars, >>>> great!! and excellent work! >>>> >>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>> >>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>> http://wiki.tcl.tk/28182.code >>>> >>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>> tclsh8.6. >>>> It worked perfect! >>>> >>>>> tclsh8.5 >>>> % source hubs.tcl >>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>> ::my::slave >>>> % ::my::slave eval {package require Itcl} >>>> 4.0b5 >>>> % >>>> >>>> I am pretty sure, we will use that in the project. >>>> And thanks for providing all the wiki entries. >>>> >>>> Arnulf >>>> >>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>> Hello Miachal, >>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>> is waiting. >>>>>>> >>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>> for learning how we can use a modified part in our project. >>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>> >>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>> bear in mind that the scope of the problem that it set out to address is >>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>> issues considered that you're probably not so interested in. >>>>> >>>>> For a first experiment, you might want to try something like the following: >>>>> >>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>> ::my::slave >>>>> % ::my::slave eval {array get tcl_platform} >>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>> % exec ps -p 19741 >>>>> PID TT STAT TIME COMMAND >>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>> % ::my::slave exit >>>>> % exec ps -p 19741 >>>>> Error: PID TT STAT TIME COMMAND >>>>> child process exited abnormally >>>>> % >>>>> >>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>> anymore.) >>>>> >>>>> Lars Hellström >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Create and publish websites with WebMatrix >>>>> Use the most popular FREE web apps or write code yourself; >>>>> WebMatrix provides all the features you need to develop and >>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>> _______________________________________________ >>>>> Tcl-gsoc mailing list >>>>> Tcl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Create and publish websites with WebMatrix >>>> Use the most popular FREE web apps or write code yourself; >>>> WebMatrix provides all the features you need to develop and >>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>> _______________________________________________ >>>> Tcl-gsoc mailing list >>>> Tcl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>> >> >> > |
|
From: Gerald W. L. <Ger...@co...> - 2011-05-06 00:40:00
|
Michal, The license should be BSD. Now as to the statement "collect all Tcl keywords" -- Tcl does not have *any* keywords. On 5/5/11 4:21 PM, dmp wrote: > Hello Arnulf, > > I've checked Tcl plugin already available and its lexer to provide > syntax hilight. > > Short tutorial to reproduce: > $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm > $ unzip org-netbeans-modules-languages-tcl.nbm > $ cd netbeans/modules > $ unzip org-netbeans-modules-languages-tcl.jar > $ cd org/netbeans/modules/languages/tcl > and there is TCL.nbs file - it contains lexer. > > I've got question about license, there are some restriction for this > file. I pasted its license header here: http://wklej.org/id/524675/ > (for other readers). > > Due possible restrictions I will prefer to write own version from > scratch, It shouldn't be difficult to collect all Tcl keywords and > prepare similar solution. And here comes my question: Which licence I > should use for every project file? As far as I know, It depends on > mentor and organization :) > > Thanks, > Michal > > > On 8 April 2011 14:16, dmp<dmp...@gm...> wrote: >> Hello Tcl Community, >> >> Currently students posting here informations about their proposals. >> I've submited my application, too. :) >> >> Thanks, >> Michal >> >> On 2 April 2011 15:37, Arnulf Wiedemann<ar...@wi...> wrote: >>> Hello Michal, >>> see my comments below. >>> >>> Arulf >>> >>> Am 02.04.2011 12:32, schrieb dmp: >>>> Hello Arnulf, >>>> >>>> I've tried code. Of course works here, too. >>>> >>>> Time to consider using JTCL. I agree with your idea to write >>>> debugscript.tcl using JTCL. It may be better solution. Also >>>> opportunity to make JTCL more popular. Probably there should also be >>>> prepared separate JTCL plugin for netbeans like jython did it. >>> I had a similar idea. >>> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >>> did not know that itcl is running in JTCL, so my fault to say it is not >>> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >>> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >>> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >>> for communication (that will also allow remote debugging, if I have >>> understood correctly). >>> >>> Best would be to use the same mechanism/interface in both cases when >>> using hubs started from JTCL for "not integrated" and using some tcl >>> script running directly in JTCL in the other case. >>> >>> I am also happy, if that helps JTCL as a side effect. >>> >>> >>>> Thank you very much Lars. It'll be helpfull. >>>> >>>> Thanks, >>>> Michal >>>> >>>> 2011/4/1 Arnulf Wiedemann<ar...@wi...>: >>>>> Hello Lars, >>>>> great!! and excellent work! >>>>> >>>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>>> >>>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>>> http://wiki.tcl.tk/28182.code >>>>> >>>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>>> tclsh8.6. >>>>> It worked perfect! >>>>> >>>>>> tclsh8.5 >>>>> % source hubs.tcl >>>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>>> ::my::slave >>>>> % ::my::slave eval {package require Itcl} >>>>> 4.0b5 >>>>> % >>>>> >>>>> I am pretty sure, we will use that in the project. >>>>> And thanks for providing all the wiki entries. >>>>> >>>>> Arnulf >>>>> >>>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>>> Hello Miachal, >>>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>>> is waiting. >>>>>>>> >>>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>>> for learning how we can use a modified part in our project. >>>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>>> >>>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>>> bear in mind that the scope of the problem that it set out to address is >>>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>>> issues considered that you're probably not so interested in. >>>>>> >>>>>> For a first experiment, you might want to try something like the following: >>>>>> >>>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>>> ::my::slave >>>>>> % ::my::slave eval {array get tcl_platform} >>>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>>> % exec ps -p 19741 >>>>>> PID TT STAT TIME COMMAND >>>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>>> % ::my::slave exit >>>>>> % exec ps -p 19741 >>>>>> Error: PID TT STAT TIME COMMAND >>>>>> child process exited abnormally >>>>>> % >>>>>> >>>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>>> anymore.) >>>>>> >>>>>> Lars Hellström >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Create and publish websites with WebMatrix >>>>>> Use the most popular FREE web apps or write code yourself; >>>>>> WebMatrix provides all the features you need to develop and >>>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>>> _______________________________________________ >>>>>> Tcl-gsoc mailing list >>>>>> Tcl...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Create and publish websites with WebMatrix >>>>> Use the most popular FREE web apps or write code yourself; >>>>> WebMatrix provides all the features you need to develop and >>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>> _______________________________________________ >>>>> Tcl-gsoc mailing list >>>>> Tcl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>> >>> > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Tcl-gsoc mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-gsoc -- +------------------------------------------------------------------------+ | Gerald W. Lester | |"The man who fights for his ideals is the man who is alive." - Cervantes| +------------------------------------------------------------------------+ |
|
From: Jeff H. <je...@ac...> - 2011-05-06 00:42:00
|
On 05/05/2011 5:39 PM, Gerald W. Lester wrote: > Now as to the statement "collect all Tcl keywords" -- Tcl does not have > *any* keywords. Er, yes and no. While the flexibility of Tcl allows anything to be overwritten, renamed or deleted, there are core default keywords (if, while, set, etc...) in Tcl. I assume that's what Michal is building up. > On 5/5/11 4:21 PM, dmp wrote: >> Hello Arnulf, >> >> I've checked Tcl plugin already available and its lexer to provide >> syntax hilight. >> >> Short tutorial to reproduce: >> $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm >> $ unzip org-netbeans-modules-languages-tcl.nbm >> $ cd netbeans/modules >> $ unzip org-netbeans-modules-languages-tcl.jar >> $ cd org/netbeans/modules/languages/tcl >> and there is TCL.nbs file - it contains lexer. >> >> I've got question about license, there are some restriction for this >> file. I pasted its license header here: http://wklej.org/id/524675/ >> (for other readers). >> >> Due possible restrictions I will prefer to write own version from >> scratch, It shouldn't be difficult to collect all Tcl keywords and >> prepare similar solution. And here comes my question: Which licence I >> should use for every project file? As far as I know, It depends on >> mentor and organization :) >> >> Thanks, >> Michal >> >> >> On 8 April 2011 14:16, dmp<dmp...@gm...> wrote: >>> Hello Tcl Community, >>> >>> Currently students posting here informations about their proposals. >>> I've submited my application, too. :) >>> >>> Thanks, >>> Michal >>> >>> On 2 April 2011 15:37, Arnulf Wiedemann<ar...@wi...> wrote: >>>> Hello Michal, >>>> see my comments below. >>>> >>>> Arulf >>>> >>>> Am 02.04.2011 12:32, schrieb dmp: >>>>> Hello Arnulf, >>>>> >>>>> I've tried code. Of course works here, too. >>>>> >>>>> Time to consider using JTCL. I agree with your idea to write >>>>> debugscript.tcl using JTCL. It may be better solution. Also >>>>> opportunity to make JTCL more popular. Probably there should also be >>>>> prepared separate JTCL plugin for netbeans like jython did it. >>>> I had a similar idea. >>>> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >>>> did not know that itcl is running in JTCL, so my fault to say it is not >>>> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >>>> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >>>> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >>>> for communication (that will also allow remote debugging, if I have >>>> understood correctly). >>>> >>>> Best would be to use the same mechanism/interface in both cases when >>>> using hubs started from JTCL for "not integrated" and using some tcl >>>> script running directly in JTCL in the other case. >>>> >>>> I am also happy, if that helps JTCL as a side effect. >>>> >>>> >>>>> Thank you very much Lars. It'll be helpfull. >>>>> >>>>> Thanks, >>>>> Michal >>>>> >>>>> 2011/4/1 Arnulf Wiedemann<ar...@wi...>: >>>>>> Hello Lars, >>>>>> great!! and excellent work! >>>>>> >>>>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>>>> >>>>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>>>> http://wiki.tcl.tk/28182.code >>>>>> >>>>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>>>> tclsh8.6. >>>>>> It worked perfect! >>>>>> >>>>>>> tclsh8.5 >>>>>> % source hubs.tcl >>>>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>>>> ::my::slave >>>>>> % ::my::slave eval {package require Itcl} >>>>>> 4.0b5 >>>>>> % >>>>>> >>>>>> I am pretty sure, we will use that in the project. >>>>>> And thanks for providing all the wiki entries. >>>>>> >>>>>> Arnulf >>>>>> >>>>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>>>> Hello Miachal, >>>>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>>>> is waiting. >>>>>>>>> >>>>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>>>> for learning how we can use a modified part in our project. >>>>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>>>> >>>>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>>>> bear in mind that the scope of the problem that it set out to address is >>>>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>>>> issues considered that you're probably not so interested in. >>>>>>> >>>>>>> For a first experiment, you might want to try something like the following: >>>>>>> >>>>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>>>> ::my::slave >>>>>>> % ::my::slave eval {array get tcl_platform} >>>>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>>>> % exec ps -p 19741 >>>>>>> PID TT STAT TIME COMMAND >>>>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>>>> % ::my::slave exit >>>>>>> % exec ps -p 19741 >>>>>>> Error: PID TT STAT TIME COMMAND >>>>>>> child process exited abnormally >>>>>>> % >>>>>>> >>>>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>>>> anymore.) >>>>>>> >>>>>>> Lars Hellström |
|
From: Arnulf W. <ar...@wi...> - 2011-05-06 07:01:12
|
Hello Michal, great to hear, you are making progress :) as Gerald already mentioned, license should be BSD. as Jeff already mentioned: the lexer needs the core keywords, (I have looked already into the sources) and you should add the itcl and TclOO keywords too like method, class etc. If you provide a list of keywords and the types thereof (command, comment, variable etc.), I will have a look and add the ones, which I think should be used too. To start, you can use a tclsh and directly after starting type in: join [lsort [info command]] \n For itcl you can find these here: http://wiki.tcl.tk/itcl http://wiki.tcl.tk/itcl-ng And for TclOO you can find info here: http://wiki.tcl.tk/TclOO As a general rule: Tcl wiki can answer a lot of questions :) I also agree on starting from scratch because of license problems (should be not so much a problem I think, also in terms of time) How are you doing in learning Tcl? If there are questions in that direction, please let me know. Arnulf Am 05.05.2011 23:21, schrieb dmp: > Hello Arnulf, > > I've checked Tcl plugin already available and its lexer to provide > syntax hilight. > > Short tutorial to reproduce: > $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm > $ unzip org-netbeans-modules-languages-tcl.nbm > $ cd netbeans/modules > $ unzip org-netbeans-modules-languages-tcl.jar > $ cd org/netbeans/modules/languages/tcl > and there is TCL.nbs file - it contains lexer. > > I've got question about license, there are some restriction for this > file. I pasted its license header here: http://wklej.org/id/524675/ > (for other readers). > > Due possible restrictions I will prefer to write own version from > scratch, It shouldn't be difficult to collect all Tcl keywords and > prepare similar solution. And here comes my question: Which licence I > should use for every project file? As far as I know, It depends on > mentor and organization :) > > Thanks, > Michal > > > On 8 April 2011 14:16, dmp <dmp...@gm...> wrote: >> Hello Tcl Community, >> >> Currently students posting here informations about their proposals. >> I've submited my application, too. :) >> >> Thanks, >> Michal >> >> On 2 April 2011 15:37, Arnulf Wiedemann <ar...@wi...> wrote: >>> Hello Michal, >>> see my comments below. >>> >>> Arulf >>> >>> Am 02.04.2011 12:32, schrieb dmp: >>>> Hello Arnulf, >>>> >>>> I've tried code. Of course works here, too. >>>> >>>> Time to consider using JTCL. I agree with your idea to write >>>> debugscript.tcl using JTCL. It may be better solution. Also >>>> opportunity to make JTCL more popular. Probably there should also be >>>> prepared separate JTCL plugin for netbeans like jython did it. >>> >>> I had a similar idea. >>> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >>> did not know that itcl is running in JTCL, so my fault to say it is not >>> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >>> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >>> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >>> for communication (that will also allow remote debugging, if I have >>> understood correctly). >>> >>> Best would be to use the same mechanism/interface in both cases when >>> using hubs started from JTCL for "not integrated" and using some tcl >>> script running directly in JTCL in the other case. >>> >>> I am also happy, if that helps JTCL as a side effect. >>> >>> >>>> >>>> Thank you very much Lars. It'll be helpfull. >>>> >>>> Thanks, >>>> Michal >>>> >>>> 2011/4/1 Arnulf Wiedemann <ar...@wi...>: >>>>> Hello Lars, >>>>> great!! and excellent work! >>>>> >>>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>>> >>>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>>> http://wiki.tcl.tk/28182.code >>>>> >>>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>>> tclsh8.6. >>>>> It worked perfect! >>>>> >>>>>> tclsh8.5 >>>>> % source hubs.tcl >>>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>>> ::my::slave >>>>> % ::my::slave eval {package require Itcl} >>>>> 4.0b5 >>>>> % >>>>> >>>>> I am pretty sure, we will use that in the project. >>>>> And thanks for providing all the wiki entries. >>>>> >>>>> Arnulf >>>>> >>>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>>> Hello Miachal, >>>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>>> is waiting. >>>>>>>> >>>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>>> for learning how we can use a modified part in our project. >>>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>>> >>>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>>> bear in mind that the scope of the problem that it set out to address is >>>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>>> issues considered that you're probably not so interested in. >>>>>> >>>>>> For a first experiment, you might want to try something like the following: >>>>>> >>>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>>> ::my::slave >>>>>> % ::my::slave eval {array get tcl_platform} >>>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>>> % exec ps -p 19741 >>>>>> PID TT STAT TIME COMMAND >>>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>>> % ::my::slave exit >>>>>> % exec ps -p 19741 >>>>>> Error: PID TT STAT TIME COMMAND >>>>>> child process exited abnormally >>>>>> % >>>>>> >>>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>>> anymore.) >>>>>> >>>>>> Lars Hellström >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Create and publish websites with WebMatrix >>>>>> Use the most popular FREE web apps or write code yourself; >>>>>> WebMatrix provides all the features you need to develop and >>>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>>> _______________________________________________ >>>>>> Tcl-gsoc mailing list >>>>>> Tcl...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Create and publish websites with WebMatrix >>>>> Use the most popular FREE web apps or write code yourself; >>>>> WebMatrix provides all the features you need to develop and >>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>> _______________________________________________ >>>>> Tcl-gsoc mailing list >>>>> Tcl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>> >>> >>> >> |
|
From: dmp <dmp...@gm...> - 2011-05-07 10:14:39
|
Hello Arnulf, Thanks for informations. Learning Tcl going fine, mostly thanks to Tcl tutorial: http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html If any problem appears, I'll tell you :) To update Netbeans part: I'll use Antlr lexer, because JavaCC solution (Generic Language Support) is marked as deprecated now. Thanks, Michal On 6 May 2011 09:01, Arnulf Wiedemann <ar...@wi...> wrote: > Hello Michal, > great to hear, you are making progress :) > > as Gerald already mentioned, license should be BSD. > as Jeff already mentioned: the lexer needs the core keywords, (I have > looked already into the sources) and you should add the itcl and TclOO > keywords too like method, class etc. If you provide a list of keywords > and the types thereof (command, comment, variable etc.), I will have a > look and add the ones, which I think should be used too. > > To start, you can use a tclsh and directly after starting type in: > join [lsort [info command]] \n > > For itcl you can find these here: > http://wiki.tcl.tk/itcl > http://wiki.tcl.tk/itcl-ng > > And for TclOO you can find info here: > http://wiki.tcl.tk/TclOO > > As a general rule: Tcl wiki can answer a lot of questions :) > > I also agree on starting from scratch because of license problems > (should be not so much a problem I think, also in terms of time) > > How are you doing in learning Tcl? If there are questions in that > direction, please let me know. > > Arnulf > > Am 05.05.2011 23:21, schrieb dmp: >> Hello Arnulf, >> >> I've checked Tcl plugin already available and its lexer to provide >> syntax hilight. >> >> Short tutorial to reproduce: >> $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm >> $ unzip org-netbeans-modules-languages-tcl.nbm >> $ cd netbeans/modules >> $ unzip org-netbeans-modules-languages-tcl.jar >> $ cd org/netbeans/modules/languages/tcl >> and there is TCL.nbs file - it contains lexer. >> >> I've got question about license, there are some restriction for this >> file. I pasted its license header here: http://wklej.org/id/524675/ >> (for other readers). >> >> Due possible restrictions I will prefer to write own version from >> scratch, It shouldn't be difficult to collect all Tcl keywords and >> prepare similar solution. And here comes my question: Which licence I >> should use for every project file? As far as I know, It depends on >> mentor and organization :) >> >> Thanks, >> Michal >> >> >> On 8 April 2011 14:16, dmp <dmp...@gm...> wrote: >>> Hello Tcl Community, >>> >>> Currently students posting here informations about their proposals. >>> I've submited my application, too. :) >>> >>> Thanks, >>> Michal >>> >>> On 2 April 2011 15:37, Arnulf Wiedemann <ar...@wi...> wrote: >>>> Hello Michal, >>>> see my comments below. >>>> >>>> Arulf >>>> >>>> Am 02.04.2011 12:32, schrieb dmp: >>>>> Hello Arnulf, >>>>> >>>>> I've tried code. Of course works here, too. >>>>> >>>>> Time to consider using JTCL. I agree with your idea to write >>>>> debugscript.tcl using JTCL. It may be better solution. Also >>>>> opportunity to make JTCL more popular. Probably there should also be >>>>> prepared separate JTCL plugin for netbeans like jython did it. >>>> >>>> I had a similar idea. >>>> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >>>> did not know that itcl is running in JTCL, so my fault to say it is not >>>> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >>>> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >>>> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >>>> for communication (that will also allow remote debugging, if I have >>>> understood correctly). >>>> >>>> Best would be to use the same mechanism/interface in both cases when >>>> using hubs started from JTCL for "not integrated" and using some tcl >>>> script running directly in JTCL in the other case. >>>> >>>> I am also happy, if that helps JTCL as a side effect. >>>> >>>> >>>>> >>>>> Thank you very much Lars. It'll be helpfull. >>>>> >>>>> Thanks, >>>>> Michal >>>>> >>>>> 2011/4/1 Arnulf Wiedemann <ar...@wi...>: >>>>>> Hello Lars, >>>>>> great!! and excellent work! >>>>>> >>>>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>>>> >>>>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>>>> http://wiki.tcl.tk/28182.code >>>>>> >>>>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>>>> tclsh8.6. >>>>>> It worked perfect! >>>>>> >>>>>>> tclsh8.5 >>>>>> % source hubs.tcl >>>>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>>>> ::my::slave >>>>>> % ::my::slave eval {package require Itcl} >>>>>> 4.0b5 >>>>>> % >>>>>> >>>>>> I am pretty sure, we will use that in the project. >>>>>> And thanks for providing all the wiki entries. >>>>>> >>>>>> Arnulf >>>>>> >>>>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>>>> Hello Miachal, >>>>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>>>> is waiting. >>>>>>>>> >>>>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>>>> for learning how we can use a modified part in our project. >>>>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>>>> >>>>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>>>> bear in mind that the scope of the problem that it set out to address is >>>>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>>>> issues considered that you're probably not so interested in. >>>>>>> >>>>>>> For a first experiment, you might want to try something like the following: >>>>>>> >>>>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>>>> ::my::slave >>>>>>> % ::my::slave eval {array get tcl_platform} >>>>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>>>> % exec ps -p 19741 >>>>>>> PID TT STAT TIME COMMAND >>>>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>>>> % ::my::slave exit >>>>>>> % exec ps -p 19741 >>>>>>> Error: PID TT STAT TIME COMMAND >>>>>>> child process exited abnormally >>>>>>> % >>>>>>> >>>>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>>>> anymore.) >>>>>>> >>>>>>> Lars Hellström >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Create and publish websites with WebMatrix >>>>>>> Use the most popular FREE web apps or write code yourself; >>>>>>> WebMatrix provides all the features you need to develop and >>>>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>>>> _______________________________________________ >>>>>>> Tcl-gsoc mailing list >>>>>>> Tcl...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Create and publish websites with WebMatrix >>>>>> Use the most popular FREE web apps or write code yourself; >>>>>> WebMatrix provides all the features you need to develop and >>>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>>> _______________________________________________ >>>>>> Tcl-gsoc mailing list >>>>>> Tcl...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>>> >>>> >>>> >>> > > |
|
From: Arnulf W. <ar...@wi...> - 2011-05-07 12:39:47
|
Hello Michal, I am happy that you make progress in understanding Tcl :) I also tried to use antlr for another project for parsing Tcl syntax, but I gave up soon, as I could not setup the antlr environment. I am pretty sure, you can do better there, as you understand java and the build process there. One remark in that direction, think about the following, if that makes sense to you: - what about using a tclsh for lexer/parser of the Tcl syntax, as Tcl is mostly built on commands, normal lexing and parsing using parser tools often makes problems. I made the same experience (parsing Tcl syntax) when working on my itcl in Javascript project. The parsing rules are exactly described in the dodekalogue http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm - when using Tcl for parsing, you can use "info complete" command of Tcl and http://wiki.tcl.tk/cmdSplit it should be possible to do most of the parsing you need using those two (if you have problems understanding these please let me know). I have a partially ready part, which also saves comments etc. in my itclng project: http://itclng.svn.sourceforge.net/viewvc/itclng/itclng/library/ and in there mostly itclngDoc.tcl and itclngMember.tcl (these understand normal Tcl and itcl Syntax and can be easily enhanced to understand TclOO syntax). - and after that use some java part for setting up the editing environment. - for communication of the parser with Tcl you could use a similar solution with ProcessBuilder Please let me know, what you think about that. Arnulf Am 07.05.2011 12:14, schrieb dmp: > Hello Arnulf, > > Thanks for informations. Learning Tcl going fine, mostly thanks to Tcl > tutorial: http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html If > any problem appears, I'll tell you :) > > To update Netbeans part: I'll use Antlr lexer, because JavaCC solution > (Generic Language Support) is marked as deprecated now. > > Thanks, > Michal > > On 6 May 2011 09:01, Arnulf Wiedemann <ar...@wi...> wrote: >> Hello Michal, >> great to hear, you are making progress :) >> >> as Gerald already mentioned, license should be BSD. >> as Jeff already mentioned: the lexer needs the core keywords, (I have >> looked already into the sources) and you should add the itcl and TclOO >> keywords too like method, class etc. If you provide a list of keywords >> and the types thereof (command, comment, variable etc.), I will have a >> look and add the ones, which I think should be used too. >> >> To start, you can use a tclsh and directly after starting type in: >> join [lsort [info command]] \n >> >> For itcl you can find these here: >> http://wiki.tcl.tk/itcl >> http://wiki.tcl.tk/itcl-ng >> >> And for TclOO you can find info here: >> http://wiki.tcl.tk/TclOO >> >> As a general rule: Tcl wiki can answer a lot of questions :) >> >> I also agree on starting from scratch because of license problems >> (should be not so much a problem I think, also in terms of time) >> >> How are you doing in learning Tcl? If there are questions in that >> direction, please let me know. >> >> Arnulf >> >> Am 05.05.2011 23:21, schrieb dmp: >>> Hello Arnulf, >>> >>> I've checked Tcl plugin already available and its lexer to provide >>> syntax hilight. >>> >>> Short tutorial to reproduce: >>> $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm >>> $ unzip org-netbeans-modules-languages-tcl.nbm >>> $ cd netbeans/modules >>> $ unzip org-netbeans-modules-languages-tcl.jar >>> $ cd org/netbeans/modules/languages/tcl >>> and there is TCL.nbs file - it contains lexer. >>> >>> I've got question about license, there are some restriction for this >>> file. I pasted its license header here: http://wklej.org/id/524675/ >>> (for other readers). >>> >>> Due possible restrictions I will prefer to write own version from >>> scratch, It shouldn't be difficult to collect all Tcl keywords and >>> prepare similar solution. And here comes my question: Which licence I >>> should use for every project file? As far as I know, It depends on >>> mentor and organization :) >>> >>> Thanks, >>> Michal >>> >>> >>> On 8 April 2011 14:16, dmp <dmp...@gm...> wrote: >>>> Hello Tcl Community, >>>> >>>> Currently students posting here informations about their proposals. >>>> I've submited my application, too. :) >>>> >>>> Thanks, >>>> Michal >>>> >>>> On 2 April 2011 15:37, Arnulf Wiedemann <ar...@wi...> wrote: >>>>> Hello Michal, >>>>> see my comments below. >>>>> >>>>> Arulf >>>>> >>>>> Am 02.04.2011 12:32, schrieb dmp: >>>>>> Hello Arnulf, >>>>>> >>>>>> I've tried code. Of course works here, too. >>>>>> >>>>>> Time to consider using JTCL. I agree with your idea to write >>>>>> debugscript.tcl using JTCL. It may be better solution. Also >>>>>> opportunity to make JTCL more popular. Probably there should also be >>>>>> prepared separate JTCL plugin for netbeans like jython did it. >>>>> >>>>> I had a similar idea. >>>>> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >>>>> did not know that itcl is running in JTCL, so my fault to say it is not >>>>> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >>>>> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >>>>> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >>>>> for communication (that will also allow remote debugging, if I have >>>>> understood correctly). >>>>> >>>>> Best would be to use the same mechanism/interface in both cases when >>>>> using hubs started from JTCL for "not integrated" and using some tcl >>>>> script running directly in JTCL in the other case. >>>>> >>>>> I am also happy, if that helps JTCL as a side effect. >>>>> >>>>> >>>>>> >>>>>> Thank you very much Lars. It'll be helpfull. >>>>>> >>>>>> Thanks, >>>>>> Michal >>>>>> >>>>>> 2011/4/1 Arnulf Wiedemann <ar...@wi...>: >>>>>>> Hello Lars, >>>>>>> great!! and excellent work! >>>>>>> >>>>>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>>>>> >>>>>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>>>>> http://wiki.tcl.tk/28182.code >>>>>>> >>>>>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>>>>> tclsh8.6. >>>>>>> It worked perfect! >>>>>>> >>>>>>>> tclsh8.5 >>>>>>> % source hubs.tcl >>>>>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>>>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>>>>> ::my::slave >>>>>>> % ::my::slave eval {package require Itcl} >>>>>>> 4.0b5 >>>>>>> % >>>>>>> >>>>>>> I am pretty sure, we will use that in the project. >>>>>>> And thanks for providing all the wiki entries. >>>>>>> >>>>>>> Arnulf >>>>>>> >>>>>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>>>>> Hello Miachal, >>>>>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>>>>> is waiting. >>>>>>>>>> >>>>>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>>>>> for learning how we can use a modified part in our project. >>>>>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>>>>> >>>>>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>>>>> bear in mind that the scope of the problem that it set out to address is >>>>>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>>>>> issues considered that you're probably not so interested in. >>>>>>>> >>>>>>>> For a first experiment, you might want to try something like the following: >>>>>>>> >>>>>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>>>>> ::my::slave >>>>>>>> % ::my::slave eval {array get tcl_platform} >>>>>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>>>>> % exec ps -p 19741 >>>>>>>> PID TT STAT TIME COMMAND >>>>>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>>>>> % ::my::slave exit >>>>>>>> % exec ps -p 19741 >>>>>>>> Error: PID TT STAT TIME COMMAND >>>>>>>> child process exited abnormally >>>>>>>> % >>>>>>>> >>>>>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>>>>> anymore.) >>>>>>>> >>>>>>>> Lars Hellström >>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> Create and publish websites with WebMatrix >>>>>>>> Use the most popular FREE web apps or write code yourself; >>>>>>>> WebMatrix provides all the features you need to develop and >>>>>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>>>>> _______________________________________________ >>>>>>>> Tcl-gsoc mailing list >>>>>>>> Tcl...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Create and publish websites with WebMatrix >>>>>>> Use the most popular FREE web apps or write code yourself; >>>>>>> WebMatrix provides all the features you need to develop and >>>>>>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>>>>>> _______________________________________________ >>>>>>> Tcl-gsoc mailing list >>>>>>> Tcl...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >>>>>>> >>>>> >>>>> >>>> >> >> |
|
From: Colin M. <co...@ch...> - 2011-05-08 00:56:39
|
I haven't been following closely, but I noticed 'tcl parsing' and wanted to point out http://wiki.tcl.tk/9620 and also and especially http://wiki.tcl.tk/9649 (which I use and find very good.) Colin. On 07/05/11 22:39, Arnulf Wiedemann wrote: > Hello Michal, > I am happy that you make progress in understanding Tcl :) > > I also tried to use antlr for another project for parsing Tcl syntax, > but I gave up soon, as I could not setup the antlr environment. I am > pretty sure, you can do better there, as you understand java and the > build process there. > > One remark in that direction, think about the following, if that makes > sense to you: > > - what about using a tclsh for lexer/parser of the Tcl syntax, as Tcl is > mostly built on commands, normal lexing and parsing using parser tools > often makes problems. I made the same experience (parsing Tcl syntax) > when working on my itcl in Javascript project. > The parsing rules are exactly described in the dodekalogue > http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm > > - when using Tcl for parsing, you can use "info complete" command of Tcl > and http://wiki.tcl.tk/cmdSplit it should be possible to do most of the > parsing you need using those two (if you have problems understanding > these please let me know). I have a partially ready part, which also > saves comments etc. in my itclng project: > http://itclng.svn.sourceforge.net/viewvc/itclng/itclng/library/ > and in there mostly itclngDoc.tcl and itclngMember.tcl (these understand > normal Tcl and itcl Syntax and can be easily enhanced to understand > TclOO syntax). > > - and after that use some java part for setting up the editing environment. > > - for communication of the parser with Tcl you could use a similar > solution with ProcessBuilder > > Please let me know, what you think about that. > > Arnulf > > Am 07.05.2011 12:14, schrieb dmp: >> Hello Arnulf, >> >> Thanks for informations. Learning Tcl going fine, mostly thanks to Tcl >> tutorial: http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html If >> any problem appears, I'll tell you :) >> >> To update Netbeans part: I'll use Antlr lexer, because JavaCC solution >> (Generic Language Support) is marked as deprecated now. >> >> Thanks, >> Michal >> >> On 6 May 2011 09:01, Arnulf Wiedemann<ar...@wi...> wrote: >>> Hello Michal, >>> great to hear, you are making progress :) >>> >>> as Gerald already mentioned, license should be BSD. >>> as Jeff already mentioned: the lexer needs the core keywords, (I have >>> looked already into the sources) and you should add the itcl and TclOO >>> keywords too like method, class etc. If you provide a list of keywords >>> and the types thereof (command, comment, variable etc.), I will have a >>> look and add the ones, which I think should be used too. >>> >>> To start, you can use a tclsh and directly after starting type in: >>> join [lsort [info command]] \n >>> >>> For itcl you can find these here: >>> http://wiki.tcl.tk/itcl >>> http://wiki.tcl.tk/itcl-ng >>> >>> And for TclOO you can find info here: >>> http://wiki.tcl.tk/TclOO >>> >>> As a general rule: Tcl wiki can answer a lot of questions :) >>> >>> I also agree on starting from scratch because of license problems >>> (should be not so much a problem I think, also in terms of time) >>> >>> How are you doing in learning Tcl? If there are questions in that >>> direction, please let me know. >>> >>> Arnulf >>> >>> Am 05.05.2011 23:21, schrieb dmp: >>>> Hello Arnulf, >>>> >>>> I've checked Tcl plugin already available and its lexer to provide >>>> syntax hilight. >>>> >>>> Short tutorial to reproduce: >>>> $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm >>>> $ unzip org-netbeans-modules-languages-tcl.nbm >>>> $ cd netbeans/modules >>>> $ unzip org-netbeans-modules-languages-tcl.jar >>>> $ cd org/netbeans/modules/languages/tcl >>>> and there is TCL.nbs file - it contains lexer. >>>> >>>> I've got question about license, there are some restriction for this >>>> file. I pasted its license header here: http://wklej.org/id/524675/ >>>> (for other readers). >>>> >>>> Due possible restrictions I will prefer to write own version from >>>> scratch, It shouldn't be difficult to collect all Tcl keywords and >>>> prepare similar solution. And here comes my question: Which licence I >>>> should use for every project file? As far as I know, It depends on >>>> mentor and organization :) >>>> >>>> Thanks, >>>> Michal >>>> >>>> >>>> On 8 April 2011 14:16, dmp<dmp...@gm...> wrote: >>>>> Hello Tcl Community, >>>>> >>>>> Currently students posting here informations about their proposals. >>>>> I've submited my application, too. :) >>>>> >>>>> Thanks, >>>>> Michal >>>>> >>>>> On 2 April 2011 15:37, Arnulf Wiedemann<ar...@wi...> wrote: >>>>>> Hello Michal, >>>>>> see my comments below. >>>>>> >>>>>> Arulf >>>>>> >>>>>> Am 02.04.2011 12:32, schrieb dmp: >>>>>>> Hello Arnulf, >>>>>>> >>>>>>> I've tried code. Of course works here, too. >>>>>>> >>>>>>> Time to consider using JTCL. I agree with your idea to write >>>>>>> debugscript.tcl using JTCL. It may be better solution. Also >>>>>>> opportunity to make JTCL more popular. Probably there should also be >>>>>>> prepared separate JTCL plugin for netbeans like jython did it. >>>>>> I had a similar idea. >>>>>> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >>>>>> did not know that itcl is running in JTCL, so my fault to say it is not >>>>>> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >>>>>> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >>>>>> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >>>>>> for communication (that will also allow remote debugging, if I have >>>>>> understood correctly). >>>>>> >>>>>> Best would be to use the same mechanism/interface in both cases when >>>>>> using hubs started from JTCL for "not integrated" and using some tcl >>>>>> script running directly in JTCL in the other case. >>>>>> >>>>>> I am also happy, if that helps JTCL as a side effect. >>>>>> >>>>>> >>>>>>> Thank you very much Lars. It'll be helpfull. >>>>>>> >>>>>>> Thanks, >>>>>>> Michal >>>>>>> >>>>>>> 2011/4/1 Arnulf Wiedemann<ar...@wi...>: >>>>>>>> Hello Lars, >>>>>>>> great!! and excellent work! >>>>>>>> >>>>>>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>>>>>> >>>>>>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>>>>>> http://wiki.tcl.tk/28182.code >>>>>>>> >>>>>>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>>>>>> tclsh8.6. >>>>>>>> It worked perfect! >>>>>>>> >>>>>>>>> tclsh8.5 >>>>>>>> % source hubs.tcl >>>>>>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>>>>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>>>>>> ::my::slave >>>>>>>> % ::my::slave eval {package require Itcl} >>>>>>>> 4.0b5 >>>>>>>> % >>>>>>>> >>>>>>>> I am pretty sure, we will use that in the project. >>>>>>>> And thanks for providing all the wiki entries. >>>>>>>> >>>>>>>> Arnulf >>>>>>>> >>>>>>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>>>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>>>>>> Hello Miachal, >>>>>>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>>>>>> is waiting. >>>>>>>>>>> >>>>>>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>>>>>> for learning how we can use a modified part in our project. >>>>>>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>>>>>> >>>>>>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>>>>>> bear in mind that the scope of the problem that it set out to address is >>>>>>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>>>>>> issues considered that you're probably not so interested in. >>>>>>>>> >>>>>>>>> For a first experiment, you might want to try something like the following: >>>>>>>>> >>>>>>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>>>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>>>>>> ::my::slave >>>>>>>>> % ::my::slave eval {array get tcl_platform} >>>>>>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>>>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>>>>>> % exec ps -p 19741 >>>>>>>>> PID TT STAT TIME COMMAND >>>>>>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>>>>>> % ::my::slave exit >>>>>>>>> % exec ps -p 19741 >>>>>>>>> Error: PID TT STAT TIME COMMAND >>>>>>>>> child process exited abnormally >>>>>>>>> % >>>>>>>>> >>>>>>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>>>>>> anymore.) >>>>>>>>> >>>>>>>>> Lars Hellström |
|
From: Arnulf W. <ar...@wi...> - 2011-05-08 09:12:25
|
I am aware of both of these, and I have looked at both. Problem is: for editing syntax highlighting you need all info for reconstructing the original source and both of them remove white space (IIRC) and similar stuff. The stuff I have written in itclng itcldoc part allows you to reconstruct the original text identically. Arnulf Am 08.05.2011 02:56, schrieb Colin McCormack: > I haven't been following closely, but I noticed 'tcl parsing' and wanted > to point out http://wiki.tcl.tk/9620 and also and especially > http://wiki.tcl.tk/9649 (which I use and find very good.) > > Colin. > > On 07/05/11 22:39, Arnulf Wiedemann wrote: >> Hello Michal, >> I am happy that you make progress in understanding Tcl :) >> >> I also tried to use antlr for another project for parsing Tcl syntax, >> but I gave up soon, as I could not setup the antlr environment. I am >> pretty sure, you can do better there, as you understand java and the >> build process there. >> >> One remark in that direction, think about the following, if that makes >> sense to you: >> >> - what about using a tclsh for lexer/parser of the Tcl syntax, as Tcl is >> mostly built on commands, normal lexing and parsing using parser tools >> often makes problems. I made the same experience (parsing Tcl syntax) >> when working on my itcl in Javascript project. >> The parsing rules are exactly described in the dodekalogue >> http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm >> >> - when using Tcl for parsing, you can use "info complete" command of Tcl >> and http://wiki.tcl.tk/cmdSplit it should be possible to do most of the >> parsing you need using those two (if you have problems understanding >> these please let me know). I have a partially ready part, which also >> saves comments etc. in my itclng project: >> http://itclng.svn.sourceforge.net/viewvc/itclng/itclng/library/ >> and in there mostly itclngDoc.tcl and itclngMember.tcl (these understand >> normal Tcl and itcl Syntax and can be easily enhanced to understand >> TclOO syntax). >> >> - and after that use some java part for setting up the editing environment. >> >> - for communication of the parser with Tcl you could use a similar >> solution with ProcessBuilder >> >> Please let me know, what you think about that. >> >> Arnulf >> >> Am 07.05.2011 12:14, schrieb dmp: >>> Hello Arnulf, >>> >>> Thanks for informations. Learning Tcl going fine, mostly thanks to Tcl >>> tutorial: http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html If >>> any problem appears, I'll tell you :) >>> >>> To update Netbeans part: I'll use Antlr lexer, because JavaCC solution >>> (Generic Language Support) is marked as deprecated now. >>> >>> Thanks, >>> Michal >>> >>> On 6 May 2011 09:01, Arnulf Wiedemann<ar...@wi...> wrote: >>>> Hello Michal, >>>> great to hear, you are making progress :) >>>> >>>> as Gerald already mentioned, license should be BSD. >>>> as Jeff already mentioned: the lexer needs the core keywords, (I have >>>> looked already into the sources) and you should add the itcl and TclOO >>>> keywords too like method, class etc. If you provide a list of keywords >>>> and the types thereof (command, comment, variable etc.), I will have a >>>> look and add the ones, which I think should be used too. >>>> >>>> To start, you can use a tclsh and directly after starting type in: >>>> join [lsort [info command]] \n >>>> >>>> For itcl you can find these here: >>>> http://wiki.tcl.tk/itcl >>>> http://wiki.tcl.tk/itcl-ng >>>> >>>> And for TclOO you can find info here: >>>> http://wiki.tcl.tk/TclOO >>>> >>>> As a general rule: Tcl wiki can answer a lot of questions :) >>>> >>>> I also agree on starting from scratch because of license problems >>>> (should be not so much a problem I think, also in terms of time) >>>> >>>> How are you doing in learning Tcl? If there are questions in that >>>> direction, please let me know. >>>> >>>> Arnulf >>>> >>>> Am 05.05.2011 23:21, schrieb dmp: >>>>> Hello Arnulf, >>>>> >>>>> I've checked Tcl plugin already available and its lexer to provide >>>>> syntax hilight. >>>>> >>>>> Short tutorial to reproduce: >>>>> $ wget http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/extra/org-netbeans-modules-languages-tcl.nbm >>>>> $ unzip org-netbeans-modules-languages-tcl.nbm >>>>> $ cd netbeans/modules >>>>> $ unzip org-netbeans-modules-languages-tcl.jar >>>>> $ cd org/netbeans/modules/languages/tcl >>>>> and there is TCL.nbs file - it contains lexer. >>>>> >>>>> I've got question about license, there are some restriction for this >>>>> file. I pasted its license header here: http://wklej.org/id/524675/ >>>>> (for other readers). >>>>> >>>>> Due possible restrictions I will prefer to write own version from >>>>> scratch, It shouldn't be difficult to collect all Tcl keywords and >>>>> prepare similar solution. And here comes my question: Which licence I >>>>> should use for every project file? As far as I know, It depends on >>>>> mentor and organization :) >>>>> >>>>> Thanks, >>>>> Michal >>>>> >>>>> >>>>> On 8 April 2011 14:16, dmp<dmp...@gm...> wrote: >>>>>> Hello Tcl Community, >>>>>> >>>>>> Currently students posting here informations about their proposals. >>>>>> I've submited my application, too. :) >>>>>> >>>>>> Thanks, >>>>>> Michal >>>>>> >>>>>> On 2 April 2011 15:37, Arnulf Wiedemann<ar...@wi...> wrote: >>>>>>> Hello Michal, >>>>>>> see my comments below. >>>>>>> >>>>>>> Arulf >>>>>>> >>>>>>> Am 02.04.2011 12:32, schrieb dmp: >>>>>>>> Hello Arnulf, >>>>>>>> >>>>>>>> I've tried code. Of course works here, too. >>>>>>>> >>>>>>>> Time to consider using JTCL. I agree with your idea to write >>>>>>>> debugscript.tcl using JTCL. It may be better solution. Also >>>>>>>> opportunity to make JTCL more popular. Probably there should also be >>>>>>>> prepared separate JTCL plugin for netbeans like jython did it. >>>>>>> I had a similar idea. >>>>>>> for people who can live with tcl 8.4 and Itcl 3.3 (annotation from me: I >>>>>>> did not know that itcl is running in JTCL, so my fault to say it is not >>>>>>> existent) make a netbeans plugin and JTCL directly drive tcl 8.4 when >>>>>>> debugging from netbeans. For those who want to use tcl.8.5 with itcl 3.4 >>>>>>> or tcl8.6 with itcl 4.0 use JTCl as the interface and use Lars's Hubs >>>>>>> for communication (that will also allow remote debugging, if I have >>>>>>> understood correctly). >>>>>>> >>>>>>> Best would be to use the same mechanism/interface in both cases when >>>>>>> using hubs started from JTCL for "not integrated" and using some tcl >>>>>>> script running directly in JTCL in the other case. >>>>>>> >>>>>>> I am also happy, if that helps JTCL as a side effect. >>>>>>> >>>>>>> >>>>>>>> Thank you very much Lars. It'll be helpfull. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Michal >>>>>>>> >>>>>>>> 2011/4/1 Arnulf Wiedemann<ar...@wi...>: >>>>>>>>> Hello Lars, >>>>>>>>> great!! and excellent work! >>>>>>>>> >>>>>>>>> I extracted the code with: http://wiki.tcl.tk/28182.code >>>>>>>>> >>>>>>>>> @Michal: extracting code from Tcl wiki pages can be done like so: >>>>>>>>> http://wiki.tcl.tk/28182.code >>>>>>>>> >>>>>>>>> did comment out the first block and ran it with a tclsh8.5 starting a >>>>>>>>> tclsh8.6. >>>>>>>>> It worked perfect! >>>>>>>>> >>>>>>>>>> tclsh8.5 >>>>>>>>> % source hubs.tcl >>>>>>>>> % hubs::interp::local_spawn my -prog tclsh8.6 -shake 1 >>>>>>>>> Hello, I'm linux-19x1.site 8742 /home/arnulf/bin/tclsh8.6 8.6b1.2 >>>>>>>>> ::my::slave >>>>>>>>> % ::my::slave eval {package require Itcl} >>>>>>>>> 4.0b5 >>>>>>>>> % >>>>>>>>> >>>>>>>>> I am pretty sure, we will use that in the project. >>>>>>>>> And thanks for providing all the wiki entries. >>>>>>>>> >>>>>>>>> Arnulf >>>>>>>>> >>>>>>>>> Am 01.04.2011 18:19, schrieb Lars Hellström: >>>>>>>>>> Arnulf Wiedemann skrev 2011-04-01 09.04: >>>>>>>>>>>> Hello Miachal, >>>>>>>>>>>> sounds good from my point of view too. I agree on all what you have >>>>>>>>>>>> written down. Did not have to much time to think about it, as payed work >>>>>>>>>>>> is waiting. >>>>>>>>>>>> >>>>>>>>>>>> I would say: go ahead in that direction and let us see what Lars is >>>>>>>>>>>> answering, because I am interested on how he is doing that in detail, >>>>>>>>>>>> for learning how we can use a modified part in our project. >>>>>>>>>> The code I mentioned can now be found at http://wiki.tcl.tk/28182. >>>>>>>>>> >>>>>>>>>> Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but >>>>>>>>>> bear in mind that the scope of the problem that it set out to address is >>>>>>>>>> somewhat larger than just controlling a child tclsh, so there are a lot of >>>>>>>>>> issues considered that you're probably not so interested in. >>>>>>>>>> >>>>>>>>>> For a first experiment, you might want to try something like the following: >>>>>>>>>> >>>>>>>>>> % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 >>>>>>>>>> Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 >>>>>>>>>> ::my::slave >>>>>>>>>> % ::my::slave eval {array get tcl_platform} >>>>>>>>>> osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 >>>>>>>>>> platform unix os Darwin tip,280 1 user lars wordSize 4 >>>>>>>>>> % exec ps -p 19741 >>>>>>>>>> PID TT STAT TIME COMMAND >>>>>>>>>> 19741 ?? S 0:00.10 tclsh8.4 >>>>>>>>>> % ::my::slave exit >>>>>>>>>> % exec ps -p 19741 >>>>>>>>>> Error: PID TT STAT TIME COMMAND >>>>>>>>>> child process exited abnormally >>>>>>>>>> % >>>>>>>>>> >>>>>>>>>> (ps exits with a nonzero status, since the process 19741 wasn't around >>>>>>>>>> anymore.) >>>>>>>>>> >>>>>>>>>> Lars Hellström > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Tcl-gsoc mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-gsoc |
|
From: Lars H. <Lar...@re...> - 2011-05-08 10:34:25
|
Colin McCormack skrev 2011-05-08 02.56: > I haven't been following closely, but I noticed 'tcl parsing' and wanted > to point out http://wiki.tcl.tk/9620 and also and especially > http://wiki.tcl.tk/9649 (which I use and find very good.) Then I should point out http://abel.math.umu.se/~lars/tcl/parsetcl.pdf contains more documentation that the wiki page, and also has been updated to support the {*} feature of Tcl 8.5. Regarding Arnulf's worry about whitespace: Since character indices are kept track of, it is straightforward to record whitespace in a post-processing phase. parsetcl::reinsert_indentation shows how to do that for indentation, and the same technique can be applied to interword whitespace. Parsing is tricky in itself, so there is no need to further complicate it with whitespace when that is not needed. KISS. However, I suspect these Tcl-oriented approaches may be suboptimal for the Netbeans project; if a parser for context-free languages is available more natively, then using that is probably easier than operating Tcl parsing by remote. My reasoning is basically the following. 1. First distinguish the phases of lexing and parsing, for this discussion. (It is generally possible to unify them, but the resulting grammars don't tend to be something for human consumption.) 2. "Most" languages (well, C, Java, Pascal, and the like) tend to be regular at the lexing phase -- you could write a regexp for "the next token" -- but roughly context-free at the parsing phase. The latter is why people write BNFs when describing their syntax. 3. Tcl, on the other hand, is non-regular context-free at the lexing phase, and roughly regular[*] at the parsing phase. In fact, I think Tcl might be LR(0) at the lexing phase (which is probably why it was feasible to write parsetcl as an ad-hoc parser in the first place). Most of the Dodekalogue (Tcl(n) manpage) is about the lexing grammar, whereas the parsing grammar is presented on a per-command basis. [*] Since the set of "tokens" is infinite, some care is needed when defining what it means to be "regular" in this case. I think one could still have a requirement that there are only finitely many "token classes" for the grammar to distinguish. Of course, some of those token classes are things like "Tcl script" and "Tcl [expr]ession", so there is a recursion which makes things complicated. Whether it is a problem depends on what you want to do. Anyway, I think the basic point of "context-free lexer, regular parser" might provide some insight into the peculiarities of parsing Tcl. Lars Hellström |
|
From: Colin M. <co...@ch...> - 2011-05-08 10:49:17
|
On 08/05/11 20:34, Lars Hellström wrote: > 2. "Most" languages (well, C, Java, Pascal, and the like) tend to be > regular at the lexing phase -- you could write a regexp for "the next > token" -- but roughly context-free at the parsing phase. The latter is why > people write BNFs when describing their syntax. If by "C" you mean "C when it's been passed through cpp" then yeah, otherwise it's not really one language, but two. Colin. |
|
From: Arnulf W. <ar...@wi...> - 2011-05-08 18:43:18
|
I see that there are a lot of changes to the version of parsetcl I have seen, so my worries may no longer be true. @Michal: I think you should read the paper of Lars and think about the points Lars has written down here, to decide, which way to go. You know better what is needed from netbeans side, or if not, you should find it out :). You should make the decision what to use. Myself and others will give comments, if there are problems finding the decision, so please ask, if necessary. Arnulf Am 08.05.2011 12:34, schrieb Lars Hellström: > Colin McCormack skrev 2011-05-08 02.56: >> I haven't been following closely, but I noticed 'tcl parsing' and wanted >> to point out http://wiki.tcl.tk/9620 and also and especially >> http://wiki.tcl.tk/9649 (which I use and find very good.) > > Then I should point out http://abel.math.umu.se/~lars/tcl/parsetcl.pdf > contains more documentation that the wiki page, and also has been updated > to support the {*} feature of Tcl 8.5. > > Regarding Arnulf's worry about whitespace: Since character indices are > kept track of, it is straightforward to record whitespace in a > post-processing phase. parsetcl::reinsert_indentation shows how to do that > for indentation, and the same technique can be applied to interword > whitespace. Parsing is tricky in itself, so there is no need to further > complicate it with whitespace when that is not needed. KISS. > > However, I suspect these Tcl-oriented approaches may be suboptimal for the > Netbeans project; if a parser for context-free languages is available more > natively, then using that is probably easier than operating Tcl parsing by > remote. My reasoning is basically the following. > > 1. First distinguish the phases of lexing and parsing, for this > discussion. (It is generally possible to unify them, but the resulting > grammars don't tend to be something for human consumption.) > > 2. "Most" languages (well, C, Java, Pascal, and the like) tend to be > regular at the lexing phase -- you could write a regexp for "the next > token" -- but roughly context-free at the parsing phase. The latter is why > people write BNFs when describing their syntax. > > 3. Tcl, on the other hand, is non-regular context-free at the lexing > phase, and roughly regular[*] at the parsing phase. In fact, I think Tcl > might be LR(0) at the lexing phase (which is probably why it was feasible > to write parsetcl as an ad-hoc parser in the first place). Most of the > Dodekalogue (Tcl(n) manpage) is about the lexing grammar, whereas the > parsing grammar is presented on a per-command basis. > > [*] Since the set of "tokens" is infinite, some care is needed when > defining what it means to be "regular" in this case. I think one could > still have a requirement that there are only finitely many "token classes" > for the grammar to distinguish. Of course, some of those token classes are > things like "Tcl script" and "Tcl [expr]ession", so there is a recursion > which makes things complicated. Whether it is a problem depends on what > you want to do. > > Anyway, I think the basic point of "context-free lexer, regular parser" > might provide some insight into the peculiarities of parsing Tcl. > > Lars Hellström > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Tcl-gsoc mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-gsoc |
|
From: dmp <dmp...@gm...> - 2011-05-08 21:18:13
|
Hello Arnulf, Thanks for messages from all of you :) I spend today working with this tutorial: http://wiki.netbeans.org/SyntaxColoringANTLR to check its compability with Netbeans 7.0. Almost everything is working fine. Only .xml with colors definitions doesn't work as it should, I hope I solve it. I wasn't focusing on Tcl grammary, just playing today with antlr and netbeans api. I've been investigating org.netbeans.api.lexer and general solution to get syntax hilight. Still I'm not sure about parsing Tcl using Tcl in netbeans environment. Most plugins used antlr, older ones javaCC also for scripting languages like python and perl. For example using ProcessBuilder or sockets for retrieving information from Tcl parser may be too slow, lexer works during every textfield update to provide syntax hilight. But I don't want to judge now. One more question to all of you: Module and Tcl Filetype Definition in Netbeans needs Icon/Symbol. I found tcl's blue feather using Google images but Is there any official source for Tcl Logo to scale it to different sizes? Thanks, Michal On 8 May 2011 20:43, Arnulf Wiedemann <ar...@wi...> wrote: > I see that there are a lot of changes to the version of parsetcl I have > seen, so my worries may no longer be true. > > @Michal: I think you should read the paper of Lars and think about the > points Lars has written down here, to decide, which way to go. You know > better what is needed from netbeans side, or if not, you should find it > out :). You should make the decision what to use. Myself and others will > give comments, if there are problems finding the decision, so please > ask, if necessary. > > Arnulf > > Am 08.05.2011 12:34, schrieb Lars Hellström: >> Colin McCormack skrev 2011-05-08 02.56: >>> I haven't been following closely, but I noticed 'tcl parsing' and wanted >>> to point out http://wiki.tcl.tk/9620 and also and especially >>> http://wiki.tcl.tk/9649 (which I use and find very good.) >> >> Then I should point out http://abel.math.umu.se/~lars/tcl/parsetcl.pdf >> contains more documentation that the wiki page, and also has been updated >> to support the {*} feature of Tcl 8.5. >> >> Regarding Arnulf's worry about whitespace: Since character indices are >> kept track of, it is straightforward to record whitespace in a >> post-processing phase. parsetcl::reinsert_indentation shows how to do that >> for indentation, and the same technique can be applied to interword >> whitespace. Parsing is tricky in itself, so there is no need to further >> complicate it with whitespace when that is not needed. KISS. >> >> However, I suspect these Tcl-oriented approaches may be suboptimal for the >> Netbeans project; if a parser for context-free languages is available more >> natively, then using that is probably easier than operating Tcl parsing by >> remote. My reasoning is basically the following. >> >> 1. First distinguish the phases of lexing and parsing, for this >> discussion. (It is generally possible to unify them, but the resulting >> grammars don't tend to be something for human consumption.) >> >> 2. "Most" languages (well, C, Java, Pascal, and the like) tend to be >> regular at the lexing phase -- you could write a regexp for "the next >> token" -- but roughly context-free at the parsing phase. The latter is why >> people write BNFs when describing their syntax. >> >> 3. Tcl, on the other hand, is non-regular context-free at the lexing >> phase, and roughly regular[*] at the parsing phase. In fact, I think Tcl >> might be LR(0) at the lexing phase (which is probably why it was feasible >> to write parsetcl as an ad-hoc parser in the first place). Most of the >> Dodekalogue (Tcl(n) manpage) is about the lexing grammar, whereas the >> parsing grammar is presented on a per-command basis. >> >> [*] Since the set of "tokens" is infinite, some care is needed when >> defining what it means to be "regular" in this case. I think one could >> still have a requirement that there are only finitely many "token classes" >> for the grammar to distinguish. Of course, some of those token classes are >> things like "Tcl script" and "Tcl [expr]ession", so there is a recursion >> which makes things complicated. Whether it is a problem depends on what >> you want to do. >> >> Anyway, I think the basic point of "context-free lexer, regular parser" >> might provide some insight into the peculiarities of parsing Tcl. >> >> Lars Hellström >> >> >> ------------------------------------------------------------------------------ >> WhatsUp Gold - Download Free Network Management Software >> The most intuitive, comprehensive, and cost-effective network >> management toolset available today. Delivers lowest initial >> acquisition cost and overall TCO of any competing solution. >> http://p.sf.net/sfu/whatsupgold-sd >> _______________________________________________ >> Tcl-gsoc mailing list >> Tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Tcl-gsoc mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-gsoc > |
|
From: Arnulf W. <ar...@wi...> - 2011-05-09 08:59:09
|
Hello Michal, if antlr is working fine, you should use that. here a reference for the Tcl logos: http://wiki.tcl.tk/17045 Arnulf Am 08.05.2011 23:18, schrieb dmp: > Hello Arnulf, > > Thanks for messages from all of you :) > > I spend today working with this tutorial: > http://wiki.netbeans.org/SyntaxColoringANTLR to check its compability > with Netbeans 7.0. Almost everything is working fine. Only .xml with > colors definitions doesn't work as it should, I hope I solve it. I > wasn't focusing on Tcl grammary, just playing today with antlr and > netbeans api. > > I've been investigating org.netbeans.api.lexer and general solution to > get syntax hilight. Still I'm not sure about parsing Tcl using Tcl in > netbeans environment. Most plugins used antlr, older ones javaCC also > for scripting languages like python and perl. For example using > ProcessBuilder or sockets for retrieving information from Tcl parser > may be too slow, lexer works during every textfield update to provide > syntax hilight. But I don't want to judge now. > > One more question to all of you: Module and Tcl Filetype Definition in > Netbeans needs Icon/Symbol. I found tcl's blue feather using Google > images but Is there any official source for Tcl Logo to scale it to > different sizes? > > Thanks, > Michal > > On 8 May 2011 20:43, Arnulf Wiedemann <ar...@wi...> wrote: >> I see that there are a lot of changes to the version of parsetcl I have >> seen, so my worries may no longer be true. >> >> @Michal: I think you should read the paper of Lars and think about the >> points Lars has written down here, to decide, which way to go. You know >> better what is needed from netbeans side, or if not, you should find it >> out :). You should make the decision what to use. Myself and others will >> give comments, if there are problems finding the decision, so please >> ask, if necessary. >> >> Arnulf >> >> Am 08.05.2011 12:34, schrieb Lars Hellström: >>> Colin McCormack skrev 2011-05-08 02.56: >>>> I haven't been following closely, but I noticed 'tcl parsing' and wanted >>>> to point out http://wiki.tcl.tk/9620 and also and especially >>>> http://wiki.tcl.tk/9649 (which I use and find very good.) >>> >>> Then I should point out http://abel.math.umu.se/~lars/tcl/parsetcl.pdf >>> contains more documentation that the wiki page, and also has been updated >>> to support the {*} feature of Tcl 8.5. >>> >>> Regarding Arnulf's worry about whitespace: Since character indices are >>> kept track of, it is straightforward to record whitespace in a >>> post-processing phase. parsetcl::reinsert_indentation shows how to do that >>> for indentation, and the same technique can be applied to interword >>> whitespace. Parsing is tricky in itself, so there is no need to further >>> complicate it with whitespace when that is not needed. KISS. >>> >>> However, I suspect these Tcl-oriented approaches may be suboptimal for the >>> Netbeans project; if a parser for context-free languages is available more >>> natively, then using that is probably easier than operating Tcl parsing by >>> remote. My reasoning is basically the following. >>> >>> 1. First distinguish the phases of lexing and parsing, for this >>> discussion. (It is generally possible to unify them, but the resulting >>> grammars don't tend to be something for human consumption.) >>> >>> 2. "Most" languages (well, C, Java, Pascal, and the like) tend to be >>> regular at the lexing phase -- you could write a regexp for "the next >>> token" -- but roughly context-free at the parsing phase. The latter is why >>> people write BNFs when describing their syntax. >>> >>> 3. Tcl, on the other hand, is non-regular context-free at the lexing >>> phase, and roughly regular[*] at the parsing phase. In fact, I think Tcl >>> might be LR(0) at the lexing phase (which is probably why it was feasible >>> to write parsetcl as an ad-hoc parser in the first place). Most of the >>> Dodekalogue (Tcl(n) manpage) is about the lexing grammar, whereas the >>> parsing grammar is presented on a per-command basis. >>> >>> [*] Since the set of "tokens" is infinite, some care is needed when >>> defining what it means to be "regular" in this case. I think one could >>> still have a requirement that there are only finitely many "token classes" >>> for the grammar to distinguish. Of course, some of those token classes are >>> things like "Tcl script" and "Tcl [expr]ession", so there is a recursion >>> which makes things complicated. Whether it is a problem depends on what >>> you want to do. >>> >>> Anyway, I think the basic point of "context-free lexer, regular parser" >>> might provide some insight into the peculiarities of parsing Tcl. >>> >>> Lars Hellström >>> >>> >>> ------------------------------------------------------------------------------ >>> WhatsUp Gold - Download Free Network Management Software >>> The most intuitive, comprehensive, and cost-effective network >>> management toolset available today. Delivers lowest initial >>> acquisition cost and overall TCO of any competing solution. >>> http://p.sf.net/sfu/whatsupgold-sd >>> _______________________________________________ >>> Tcl-gsoc mailing list >>> Tcl...@li... >>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> >> >> ------------------------------------------------------------------------------ >> WhatsUp Gold - Download Free Network Management Software >> The most intuitive, comprehensive, and cost-effective network >> management toolset available today. Delivers lowest initial >> acquisition cost and overall TCO of any competing solution. >> http://p.sf.net/sfu/whatsupgold-sd >> _______________________________________________ >> Tcl-gsoc mailing list >> Tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> |
|
From: Arnulf W. <ar...@wi...> - 2011-05-09 09:07:57
|
Hello Michal, sorry, maybe I did use the wrong logos (from Tcl Association), perhaps you should use the Tcl/Tk core logos: http://wiki.tcl.tk/_//search?S=Tcl+Logo&submit=Search&_charset_=UTF-8 @all: or should we ask Clif Flynt (I don't have his email address) which ones to use? Arnulf Am 08.05.2011 23:18, schrieb dmp: > Hello Arnulf, > > Thanks for messages from all of you :) > > I spend today working with this tutorial: > http://wiki.netbeans.org/SyntaxColoringANTLR to check its compability > with Netbeans 7.0. Almost everything is working fine. Only .xml with > colors definitions doesn't work as it should, I hope I solve it. I > wasn't focusing on Tcl grammary, just playing today with antlr and > netbeans api. > > I've been investigating org.netbeans.api.lexer and general solution to > get syntax hilight. Still I'm not sure about parsing Tcl using Tcl in > netbeans environment. Most plugins used antlr, older ones javaCC also > for scripting languages like python and perl. For example using > ProcessBuilder or sockets for retrieving information from Tcl parser > may be too slow, lexer works during every textfield update to provide > syntax hilight. But I don't want to judge now. > > One more question to all of you: Module and Tcl Filetype Definition in > Netbeans needs Icon/Symbol. I found tcl's blue feather using Google > images but Is there any official source for Tcl Logo to scale it to > different sizes? > > Thanks, > Michal > > On 8 May 2011 20:43, Arnulf Wiedemann <ar...@wi...> wrote: >> I see that there are a lot of changes to the version of parsetcl I have >> seen, so my worries may no longer be true. >> >> @Michal: I think you should read the paper of Lars and think about the >> points Lars has written down here, to decide, which way to go. You know >> better what is needed from netbeans side, or if not, you should find it >> out :). You should make the decision what to use. Myself and others will >> give comments, if there are problems finding the decision, so please >> ask, if necessary. >> >> Arnulf >> >> Am 08.05.2011 12:34, schrieb Lars Hellström: >>> Colin McCormack skrev 2011-05-08 02.56: >>>> I haven't been following closely, but I noticed 'tcl parsing' and wanted >>>> to point out http://wiki.tcl.tk/9620 and also and especially >>>> http://wiki.tcl.tk/9649 (which I use and find very good.) >>> >>> Then I should point out http://abel.math.umu.se/~lars/tcl/parsetcl.pdf >>> contains more documentation that the wiki page, and also has been updated >>> to support the {*} feature of Tcl 8.5. >>> >>> Regarding Arnulf's worry about whitespace: Since character indices are >>> kept track of, it is straightforward to record whitespace in a >>> post-processing phase. parsetcl::reinsert_indentation shows how to do that >>> for indentation, and the same technique can be applied to interword >>> whitespace. Parsing is tricky in itself, so there is no need to further >>> complicate it with whitespace when that is not needed. KISS. >>> >>> However, I suspect these Tcl-oriented approaches may be suboptimal for the >>> Netbeans project; if a parser for context-free languages is available more >>> natively, then using that is probably easier than operating Tcl parsing by >>> remote. My reasoning is basically the following. >>> >>> 1. First distinguish the phases of lexing and parsing, for this >>> discussion. (It is generally possible to unify them, but the resulting >>> grammars don't tend to be something for human consumption.) >>> >>> 2. "Most" languages (well, C, Java, Pascal, and the like) tend to be >>> regular at the lexing phase -- you could write a regexp for "the next >>> token" -- but roughly context-free at the parsing phase. The latter is why >>> people write BNFs when describing their syntax. >>> >>> 3. Tcl, on the other hand, is non-regular context-free at the lexing >>> phase, and roughly regular[*] at the parsing phase. In fact, I think Tcl >>> might be LR(0) at the lexing phase (which is probably why it was feasible >>> to write parsetcl as an ad-hoc parser in the first place). Most of the >>> Dodekalogue (Tcl(n) manpage) is about the lexing grammar, whereas the >>> parsing grammar is presented on a per-command basis. >>> >>> [*] Since the set of "tokens" is infinite, some care is needed when >>> defining what it means to be "regular" in this case. I think one could >>> still have a requirement that there are only finitely many "token classes" >>> for the grammar to distinguish. Of course, some of those token classes are >>> things like "Tcl script" and "Tcl [expr]ession", so there is a recursion >>> which makes things complicated. Whether it is a problem depends on what >>> you want to do. >>> >>> Anyway, I think the basic point of "context-free lexer, regular parser" >>> might provide some insight into the peculiarities of parsing Tcl. >>> >>> Lars Hellström >>> >>> >>> ------------------------------------------------------------------------------ >>> WhatsUp Gold - Download Free Network Management Software >>> The most intuitive, comprehensive, and cost-effective network >>> management toolset available today. Delivers lowest initial >>> acquisition cost and overall TCO of any competing solution. >>> http://p.sf.net/sfu/whatsupgold-sd >>> _______________________________________________ >>> Tcl-gsoc mailing list >>> Tcl...@li... >>> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> >> >> ------------------------------------------------------------------------------ >> WhatsUp Gold - Download Free Network Management Software >> The most intuitive, comprehensive, and cost-effective network >> management toolset available today. Delivers lowest initial >> acquisition cost and overall TCO of any competing solution. >> http://p.sf.net/sfu/whatsupgold-sd >> _______________________________________________ >> Tcl-gsoc mailing list >> Tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-gsoc >> |
|
From: Arnulf W. <ar...@wi...> - 2011-05-14 17:39:42
|
Hello Michal, how are you doing with antlr, is it working as you expect, or do you have problems (I am just curious). Arnulf |
|
From: dmp <dmp...@gm...> - 2011-05-15 12:57:05
|
Hello Arnulf, Antlr is working fine. As I wrote previously, tutorial to create rich client based on netbeans worked fine. Yesterday, I created standard netbeans module which allows to open .tcl files and provides syntax hilight for example language. I've based on already available solutions: http://code.google.com/p/pl-sql-editor/ and http://code.google.com/p/scss-editor/. Today I will work with antlrworks to create grammary file for Tcl and I guess I will need your little help to identify all keywords :) I couldn't find any .svg file in tcl8.5.9-src.tar.gz. Is it in development version from repo? I guess scaled .eps version from http://wiki.tcl.tk/26707 should be used. I will commit initial project files to fossil repository. Thanks, Michal On 14 May 2011 19:39, Arnulf Wiedemann <ar...@wi...> wrote: > Hello Michal, > how are you doing with antlr, is it working as you expect, or do you > have problems (I am just curious). > > Arnulf > |
|
From: Arnulf W. <ar...@wi...> - 2011-05-15 16:37:13
|
Hello Michal, great that you are making progress!! I am not familiar with the .svg files, maybe patthoyts can tell more about that. Your reference seems also ok and another source is to search for "tcl logo" in the wiki with search in page titles and use one of the images found there (some of them are already scaled differently and in the pages source you can find where the image can be found: like for example: http://wiki.tcl.tk/_/image?N=26852 What do you mean with based? Did you only get inspired from that code, or did you use parts of it. I am just asking because of possible copy right problems, as it is a GNU GPL v2 license and not a BSD or similar license (I am no expert on that, so perhaps others on the list can tell more about possible problems). >From the technical side I am happy that you got that running. For the keywords you can use the mail I have written some weeks ago concerning how to figure out Tcl/itcl/TclOO command names. Best you try to make a list with a categorization and I will have a look over that and perhaps others on this list too. With categorization I mean, if it is a "normal" command or some itcl specific stuff or some TclOO specific stuff, so that you can color these perhaps differently. and within that different colors for example for method/proc variable/common and the itcl specials like delegate/option/component etc. We can also add more stuff during the project, when we find something, as I assume there is an editable syntax/grammar file, which can be easily enhanced. I will have a look at the repo, when your stuff is there. Just as a side note: I am on a business meeting from May, 19th to May 21st, where I will have no access to the internet. Arnulf Am 15.05.2011 14:56, schrieb dmp: > Hello Arnulf, > > Antlr is working fine. As I wrote previously, tutorial to create rich > client based on netbeans worked fine. Yesterday, I created standard > netbeans module which allows to open .tcl files and provides syntax > hilight for example language. I've based on already available > solutions: http://code.google.com/p/pl-sql-editor/ and > http://code.google.com/p/scss-editor/. Today I will work with > antlrworks to create grammary file for Tcl and I guess I will need > your little help to identify all keywords :) > > I couldn't find any .svg file in tcl8.5.9-src.tar.gz. Is it in > development version from repo? I guess scaled .eps version from > http://wiki.tcl.tk/26707 should be used. > > I will commit initial project files to fossil repository. > > Thanks, > Michal > > On 14 May 2011 19:39, Arnulf Wiedemann <ar...@wi...> wrote: >> Hello Michal, >> how are you doing with antlr, is it working as you expect, or do you >> have problems (I am just curious). >> >> Arnulf >> |
|
From: dmp <dmp...@gm...> - 2011-05-15 17:23:39
|
Hello Arnulf, I just got inspired by their solutions because of some issues with my layer.xml. Code was mostly adopted from different solutions at Netbeans Wiki. Here is an information about license: http://netbeans.org/about/legal/terms-of-use.html. All source codes are governed by the New BSD License, so I guess everything is ok :) I've just commited basic module's code. Currently as a symbol for .tcl files module uses Tcl icon from french wiki. It scaled well to 16x16 pixels (It's a standard for Netbeans filetypes). I guess official logo could be used but after modifications because it doesn't look good after scale to 16x16. Categorization is really nice idea for keywords from Tcl/itcl/TclOO and providing different colors is quite easy. Thanks, Michal On 15 May 2011 18:37, Arnulf Wiedemann <ar...@wi...> wrote: > Hello Michal, > great that you are making progress!! > > I am not familiar with the .svg files, maybe patthoyts can tell more > about that. Your reference seems also ok and another source is to search > for "tcl logo" in the wiki with search in page titles and use one of the > images found there (some of them are already scaled differently and in > the pages source you can find where the image can be found: like for > example: http://wiki.tcl.tk/_/image?N=26852 > > What do you mean with based? Did you only get inspired from that code, > or did you use parts of it. I am just asking because of possible copy > right problems, as it is a GNU GPL v2 license and not a BSD or similar > license (I am no expert on that, so perhaps others on the list can tell > more about possible problems). > > From the technical side I am happy that you got that running. For the > keywords you can use the mail I have written some weeks ago concerning > how to figure out Tcl/itcl/TclOO command names. Best you try to make a > list with a categorization and I will have a look over that and perhaps > others on this list too. With categorization I mean, if it is a "normal" > command or some itcl specific stuff or some TclOO specific stuff, so > that you can color these perhaps differently. and within that different > colors for example for method/proc variable/common and the itcl specials > like delegate/option/component etc. We can also add more stuff during > the project, when we find something, as I assume there is an editable > syntax/grammar file, which can be easily enhanced. > > I will have a look at the repo, when your stuff is there. > > Just as a side note: I am on a business meeting from May, 19th to May > 21st, where I will have no access to the internet. > > Arnulf > > > Am 15.05.2011 14:56, schrieb dmp: >> Hello Arnulf, >> >> Antlr is working fine. As I wrote previously, tutorial to create rich >> client based on netbeans worked fine. Yesterday, I created standard >> netbeans module which allows to open .tcl files and provides syntax >> hilight for example language. I've based on already available >> solutions: http://code.google.com/p/pl-sql-editor/ and >> http://code.google.com/p/scss-editor/. Today I will work with >> antlrworks to create grammary file for Tcl and I guess I will need >> your little help to identify all keywords :) >> >> I couldn't find any .svg file in tcl8.5.9-src.tar.gz. Is it in >> development version from repo? I guess scaled .eps version from >> http://wiki.tcl.tk/26707 should be used. >> >> I will commit initial project files to fossil repository. >> >> Thanks, >> Michal >> >> On 14 May 2011 19:39, Arnulf Wiedemann <ar...@wi...> wrote: >>> Hello Michal, >>> how are you doing with antlr, is it working as you expect, or do you >>> have problems (I am just curious). >>> >>> Arnulf >>> > > |