Hi there,<br>
<br>
Yes, please do send me the new release as soon as you are done fixing the bug.<br>
Very glad to hear about your extensive regression testing. Yes, I will definitely do my own testing too.<br><br>
Regards,<br>
Taral<br>
<br><div><span class="gmail_quote">On 9/8/05, <b class="gmail_sendername">Gustaf Neumann</b> <<a href="mailto:neumann@wu-wien.ac.at">neumann@wu-wien.ac.at</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Taral schrieb:<br><br>> Well, I will be in touch with you guys on further development on my side.<br><br>good. i'll send you soon a version of xotcl with the "...foward ...<br>expr..." problem resolved, if you
<br>are interested.<br>
</blockquote><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> By the way, I can not resist myself asking you guys about testing done
<br>> for XOTcl. I'm planning to use it for implantable Medical Device<br>> hard-real time firmware system where bugs are not allowed at all.<br>> Reading you note about the bug in expr method, do you mind giving me a
<br>> small update on what type of testing is done on this library and how<br>> much stable is it from your experience?<br><br>we have a constantly growing regression test suite. in general i think<br>it is generally
<br>perceived that xotcl has a very high stability. there is at least on<br>company that depends<br>on xotcl in their multi threaded mission critical product; we use xotcl<br>in our e-learning<br>environment, which is (based on publications) the most intensely used
<br>e-learning<br>system on universities world wide (up to more than 4 mio requests from<br>registered<br>users per day). The OACS community has recentlyTIPed that xotcl should<br>become<br>part of every standard OACS installation.
<br><br>before every release, we run all the regression test and complex systems<br>around and we<br>send pre-releases to core users. If you look at the changelog you will<br>see that most bugs<br>are either in "new features" or show up in "erroneous xotcl code". In
<br>your situation i would<br>certainly do my own testing with my code and xotcl before burning the<br>code into proms.<br>The community will help you with problems, if you are interested in<br>commercial support,<br>we have founded recently a small company for providing support for
<br>various of our<br>research products.<br><br>> Are there any plans to provide more of object relation management<br>> functionality in the library itself? When are you planning the next<br>> release?<br><br>in the next weeks.
<br><br>> I was wondering about whom I'm talking to. You guys are obviously from<br>> Germany/Austria based on my guess from your email address. It would be<br>> nice to know you guys little more to help the communication. Do you
<br>> guys have any personal webpage? I don't have one myself :( But now I<br>> feel like I should have one. So I will try to put up one sometime soon.<br><br>you will find my face (and uwe's) easily via google<br>
<br>best regards<br>-gustaf neumann<br><br>><br>> On 9/5/05, *Gustaf Neumann* <<a href="mailto:neumann@wu-wien.ac.at">neumann@wu-wien.ac.at</a><br>> <mailto:<a href="mailto:neumann@wu-wien.ac.at">neumann@wu-wien.ac.at
</a>>> wrote:<br>><br>> Taral schrieb:<br>><br>> > Hello,<br>> ><br>> > I recently came across XOTcl and found it very very useful. I am<br>> > working on optimizing some legacy compiler code which is written in
<br>> > TCL. I would like to make it object-oritented and so I started<br>> using<br>> > XOTcl. So far I have found aouut 90% reduction in execution time.<br>> > Overall I'm getting great performance by using XOTcl.
<br>><br>> wow, this is an impressive number; good to hear that.<br>><br>> > I would like to Thank You guys for writing such a great library.<br>> ><br>> > Of course I have couple of questions for you. I will really
<br>> appreciate<br>> > it if you can help me here.<br>> ><br>> > (1) Is there any way to all the objects or instances based on<br>> > parameter value? For example, I would like to request object
<br>> names of<br>> > all objects where given parameter's value is equal to 5.<br>><br>> There is no built-in support for this. a straigthforward approach<br>> is the<br>> following which might
<br>> be sufficient in many situations:<br>><br>> ===========<br>> # define method expr for all Objects, the operands are taken from<br>> # the instance variables<br>> Object instforward expr -objscope
<br>><br>> # define method select with some abitrary tcl expression. All objects,<br>> # for which the expression returns 1 are returned<br>> Class instproc select {expr} {<br>> set result_list [list]
<br>> foreach o [my allinstances] {<br>> if {![catch {$o expr $expr} result]} {<br>> puts "$o expr {$expr} -> $result"<br>> if {$result} {<br>> lappend result_list $o
<br>> }<br>> }<br>> }<br>> return $result_list<br>> }<br>> ===========<br>><br>> so, now we define a view classes and objects with some instance<br>> variables
<br>><br>> Class C -parameter {{x 10}}<br>> Class D -superclass C<br>><br>> C c1<br>> C c2 -x 11<br>> D d1 -x 100<br>> D d2<br>> D d3<br>> d3 unset x
<br>><br>> finally, we try it out with some demo queries<br>><br>> foreach q {<br>> {$x > 10}<br>> {$x >= 10}<br>> {$x < 1}<br>> {[string match *00* $x]}
<br>> } {<br>> puts "C select $q --> {[lsort [C select $q]]}\n"<br>> }<br>><br>> Note that in this example, all instances of C are checked for the<br>> expression, if
<br>> you use "... [Object select {$x > 10}]", all objects will be checked.<br>><br>> This approach might be good enough for small examples and medium<br>> speed requirements. If you have larger number of objects, and you
<br>> cant<br>> restrict the query to smaller classes, you should try to build an<br>> index<br>> based on associative arrays, which could replace the "allinstances"<br>> in the code above.
<br>><br>> > (2) Do you have more example code pieces? I would like to see more<br>> > sample implementation to help me with the syntax. I'm also learning<br>> > TCL language at the same time using XOTcl :)
<br>><br>> i am sure, you have seen the tutorial and the examples in xotcl*/apps<br>> and xotcl*/library. There are a few more on:<br>><br>> <a href="http://mini.net/tcl/XOTcl">http://mini.net/tcl/XOTcl
</a><br>> <a href="http://wiki.tcl.tk/references/10971">http://wiki.tcl.tk/references/10971</a>!<br>><br>> > (3) Is there any way to represent relationship across two<br>> classes? For<br>> > example, Class A is related to Class B with one-to-many
<br>> relationship.<br>><br>> a few class/class relations and object/class relations are<br>> maintained<br>> by xotcl (e.g. superclass,<br>> class, mixins). A start point might be ::xotcl::Relations,
<br>> which is<br>> used to implement a<br>> uniform interface to mixins (and instmixins ...), which allows to<br>> specify "... mixin add ...", #<br>> "... mixin delete ...", "... mixin set ...", etc. In principle, the
<br>> same interface could be used<br>> for application level relations as well...<br>><br>> In current applications, the classes use and maintain a list of<br>> related<br>> object/classes.
<br>> Often, it is conveniant to use aggregations to express 1:1 or 1:n<br>> relationships.<br>><br>> > (4) If there is a way to define relationship, is it possible to<br>> query<br>> > objects of classes in the relationship? For example, I would like to
<br>> > get all the objects of Class B related to given object of Class A<br>> > (like a1) across given one-to-many relationship. In this case result<br>> > would be list of object handles of Class B that matches based on
<br>> given<br>> > primary key (identifier) value between class A and B.<br>><br>> a good key identifier is the object name. see the following snipplet,<br>> how such behavior<br>> could be obtained. We define class A, which maintains the relationship
<br>> to some other<br>> objects. if an instances exists that relates e.g. to object c1, we<br>> could<br>> check there some<br>> properties with expr like above...<br>><br>> Class A -parameter {relates_to}
<br>><br>> A a1<br>> A a2<br>><br>> a1 set relates_to {c1 c2}<br>><br>> foreach o [A allinstances] {<br>> catch {<br>> if {[lsearch -exact [$o relates_to] c2] > -1} {
<br>> puts "could check $o"<br>> }<br>> }<br>> }<br>><br>> hope theses examples help a little.<br>><br>> -gustaf<br>><br>> PS: when i was writing this mail i saw that the classtack information
<br>> within methods called via the method "expr" is not correct. It will<br>> be fixed in the next release....<br>><br>> ><br>> > Please provide some guidance to implement above functionality
<br>> using XOTcl.<br>> ><br>> > Thanks a lot in advance.<br>> ><br>> > May be in future I would like to contribute to XOTcl. I wish to<br>> be in<br>> > touch with you guys.
<br>> ><br>> > Regards,<br>> > Taral<br>><br>><br>><br><br></blockquote></div><br>