View · Search · Index
No registered users in community xowiki
in last 10 minutes

Weblog Page

Showing 931 - 940 of 1561 Postings (summary)

Re: [Xotcl] bug reports

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Fri, 08 Oct 2010 08:21:25 +0200

  If you find something strange, let us know. we might or
might not be aware
of this. It helps up as well to extend the regression test
(currently ~2400 test).

-gustaf

On 08.10.10 04:06, Victor Mayevski wrote:
> Is there any need to submit bug reports for XOTcl/Next at this stage of development?
> _______________________________________________
> Xotcl mailing list
> Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl

Re: [Xotcl] Mixins in XOTcl

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Adam Turoff <aturoff_at_bna.com>
Date: Mon, 24 May 2004 09:35:15 -0400

Uwe Zdun wrote:
> what about just extending the usually interfaces with new
> arguments, such as:
>
> A mixin X
> A mixin add Z 3
> A mixin add Y end
> A mixin delete Y
> A instmixin add T 1
> A superclass B
> A superclass add C

That's pretty much what I was thinking:

    A mixin X ;# current behavior
    A mixin -set X ;# A mixin X
    A mixin -set X Y Z ;# A mixin {X Y Z}

    A mixin -add X ;# A mixinappend X

Using -set, -add and -delete feels more Tcl-ish. Also, it
is somewhat bad style to name a class 'add', but even worse
style to name it '-add'. By using options, I can still
mixin a class 'add' into a definition. Preventing me from
mixing in a class '-add' is a good idea, for other reasons.

-- Adam

Re: [Xotcl] install problems

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Uwe Zdun <uwe.zdun_at_wu-wien.ac.at>
Date: Tue, 9 Dec 2003 10:22:26 +0100

MessageHi Marvin,

I'm not pretty sure what goes wrong here. I see a number of potential
problem .. perhaps the libxotcl is not on
your PATH. the library is named libxotcl1.1.dll, not libxotcl.dll ...
 Have you tried whether the installation works the way it is
described in the README file (using the installWin.tcl script and then do a
"package require XOTcl"??)

Uwe
  -----Ursprungliche Nachricht-----
  Von: xotcl-admin_at_alice.wu-wien.ac.at
[mailto:xotcl-admin_at_alice.wu-wien.ac.at]Im Auftrag von j_marvin_at_localnet.com
  Gesendet: Dienstag, 9. Dezember 2003 05:32
  An: xotcl_at_alice.wu-wien.ac.at
  Betreff: [Xotcl] install problems


  hi-
  i did a zip binary distribution for windows
  xotcl-1.1.0-win32-tcl8.4.5.zip

  my tcl directory was in c:\tcl . when the install took place it tried to
put xotcl in c:\program files\tcl directory.
  since that is not where i originally installed tcl i copied the files with
the file manager back over to c:\tcl and its subdirectories.
  i have an environment variable named tcllibpath that points to
c:\tcl\lib\xotcl. i moved the 4 include files over to c:\tcl\include .
  the libxotcl1.1.dll resides now in my c:\tcl\lib directory.

  when i run this code in ASED it prints out "failure" as it is not loaded
properly. I am using version 8.4.

  set fail [catch [load libxotcl.dll]]
  if {$fail} {
  puts "failure"

  }

  i wanted to expirement with xotcl. i have swig working and know a little
c++ but i thought i'd try out this new way of doing things.

  please let me know if you can think of any tricks i am not thinking of to
get this to load properly.
  i could reinstall TCL to c:\program files\tcl and then reinstall xotcl
from the beginning zip file. Is that necessary?

  thanks
  marvin

Re: [Xotcl] Static member functions?

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Michael A. Cleverly <michael_at_cleverly.com>
Date: Wed, 16 Apr 2003 14:35:32 -0600 (MDT)

On Wed, 16 Apr 2003, Gustaf Neumann wrote:

> Most of the important things were already answered by Neophytos and
> Kristoffer.

Thanks to all of you for the pointers. XOTcl seems to be much more
Tcl-ish than, say, [incr Tcl].

> XOTcl does not need a special construct, since every class is an object
> as well, and variables kept in a class are nothing special. Note that a
> programmer can decide what kind of class he is referring to:
> - the class which is the type of the object (via "my info class")
> - the current class, which is currently active (via "self class")
> The type variable you are refering to is the first one.

This is a very helpful explanation. A light bulb just went on in my mind.
Thanks.

> Often, when people start to use XOTcl, there come requests how to achieve
> private instance variables. These can be easily achived through variable
> traces. Maybe someone finds the following code helpful or interesting....

Very interesting. But, I'm confused by the results I'm seeing (both
before & after applying the patch). It seems that even though [o1 test0]
and [o1 test1] throw an error the variable is updated. And [o1 test3]
does unset the variable.

% c1 show
x=100
% c1 test
10
% c1 show
x=10
% o1 test0
error: Can't find result of set x
% c1 show
x=13
% c1 test
10
% c1 show
x=10
% o1 test1
error: can't set "x": private member x of ::c1 written from ::o1->test1
% c1 show
x=13
% c1 test
10
% c1 show
x=10
% o1 test2
error: can't read "x": private member x of ::c1 read from ::01->test2
% c1 show
x=10
% o1 test3
% c1 show
can't read "x": no such variable

I'm using XOTcl 1.0.2 (compiled from source) & Tcl 8.4.2 (.deb) on Linux.

(Neophytos: yes, I am the author of nstcl fame, though I didn't realize
that would make me famous anywhere. :-)

Michael

[Xotcl] The debian packages

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Thu, 11 Jan 2001 19:15:42 +0200 (EET)

Just tested the debian packages for XOTcl 0.83 by Teemu and they seem to
be working fine now, including the pkgIndex.tcl generation, which was a
problem before.

         - ---------- = = ---------//--+
         | / Kristoffer Lawson | www.fishpool.fi|.com
         +-> | setok_at_fishpool.com | - - --+------
             |-- Fishpool Creations Ltd - / |
             +-------- = - - - = --------- /~setok/

[Xotcl] Precedence Order

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Scott Gargash <scottg_at_atc.creative.com>
Date: Tue, 29 Aug 2006 11:21:23 -0600

As I understand it, precedence order is computed as filters then mixins
the superclasses, and this sort order is applied "globally" to an object.

In other words:

Class create Base
Class create Derived -superclass Base
Derived d
d info precedence ==> ::Derived ::Base ::xotcl::Object

Class create BaseMixin
Base instmixin add BaseMixin
d info precedence ==> ::BaseMixin ::Derived ::Base ::xotcl::Object

This behavior seems to violate encapsulation. BaseMixin is intended to
intercept messages to Base. Derived doesn't know about BaseMixin and
BaseMixin doesn't know about Derived, yet BaseMixin ends up being the
first interceptor of messages to Derived.

Since BaseMixin is intended to modify the behavior of Base, it would be
better BaseMixin preceeded Base (and only Base) in the sort order.

d info precedence ==> ::Derived ::BaseMixin ::Base ::xotcl::Object

The current behavior means you can't really add a mixin without
understanding everywhere that the object being extended is used. Is there
some benefit to the current behavior that I don't understand?

[Xotcl] Re: [Xotcl] abstract method difference 0.83->0.84

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Uwe Zdun <uwe.zdun_at_uni-essen.de>
Date: Wed, 9 May 2001 09:17:31 +0200

Ok. First: we didn't realize there is a change from 0.83->0.84 ... we thought
the error message would occur in 0.83 as well.

Second: I agree, the behavior with "next" is undesirable ... I remember,
we've found this problem before. I wonder why we haven't changed the behavior
yet. Anyway, I think a good solution is to change the behvaior of "abstract"
accordingly. In 0.84 (and 0.83?) it was:


Object instproc abstract {methtype methname arglist} {
  if {$methtype != "proc" && $methtype != "instproc"} {
    error "invalid method type '$methtype', \
        must be either 'proc' or 'instproc'."
  }
  [self] $methtype $methname $arglist \
    [list error "Abstract method $methname $arglist called"]
}


I would propose to change it to:


Object instproc abstract {methtype methname arglist} {
  if {$methtype != "proc" && $methtype != "instproc"} {
    error "invalid method type '$methtype', \
        must be either 'proc' or 'instproc'."
  }
  [self] $methtype $methname $arglist "
    if {\[self callingproc\] != \[self proc\] &&
        \[self callingobject\] != \[self\]} {
      error \"Abstract method $methname $arglist called\"
    }
  "
}


That is, when the calling method name equals the current method and the
calling object is self, then the call is done with next. In this cases we
omit the error message. An example:


Class Foo
Foo abstract instproc blah {}
Class Bar -superclass Foo
Bar instproc blah {} {
  puts "Bar--blah"
  next
}

puts [Foo info instbody blah]

# here no error occurs:
Bar b
b blah

# here we still get an error:
Foo a
a blah


I'll attach my predefined.xotcl for your convenience (that is, you have to
recompile XOTcl with it in order to use the change ...)

--Uwe


On Wednesday 09 May 2001 02:13, you wrote:
> Just wanted to note a change I noticed from 0.83->0.84 which doesn't seem
> to be in the changes file? It's to do with abstract methods and code like
> the following:
>
> Class Foo
> Foo abstract instproc blah {}
>
> Class Bar -superclass Foo
> Bar instproc instproc blah {
> puts "blah"
> next
> }
>
> With 0.83 this worked but it gives an error about an abstract method
> being called in 0.84. The reason the "next" is there in the first place is
> basically because if someone decides to add a class to the chain after Bar
> then the "next" commands will already be in place. Are there other
> arguments for/against the 0.84 model?
>
> - ---------- = = ---------//--+
>
> | / Kristoffer Lawson | www.fishpool.fi|.com
>
> +-> | setok_at_fishpool.com | - - --+------
>
> |-- Fishpool Creations Ltd - / |
>
> +-------- = - - - = --------- /~setok/
>
>
> _______________________________________________
> Xotcl mailing list - Xotcl_at_wi.wu-wien.ac.at
> http://wi.wu-wien.ac.at/mailman/listinfo/xotcl

-- 
Uwe Zdun
Specification of Software Systems, University of Essen
Phone: +49 201 81 00 332, Fax: +49 201 81 00 398
zdun_at_xotcl.org, uwe.zdun_at_uni-essen.de




    [Xotcl] document operation

    Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

    From: Kristoffer Lawson <setok_at_fishpool.com>
    Date: Fri, 9 Feb 2001 22:47:24 +0200 (EET)

    Am I right in assuming that currently xodoc doesn't generate documentation
    for classes within namespaces, if these classes aren't exported from the
    namespace? Normally this would be correct (I think I suggested it myself),
    but when another exported class is a sub-class of the non-exported one the
    user of the exported class still needs to see the non-exported one (to
    check method definitions etc.). So for this situation documentation should
    still be generated. Would this work in xodoc? Maybe the
    non-exported one would be marked somehow so as the reader knows that the
    class is not meant for direct use.

             - ---------- = = ---------//--+
             | / Kristoffer Lawson | www.fishpool.fi|.com
             +-> | setok_at_fishpool.com | - - --+------
                 |-- Fishpool Creations Ltd - / |
                 +-------- = - - - = --------- /~setok/

    [Xotcl] Announcement: Next Scripting Framework 2.0b5 available

    Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

    From: Gustaf Neumann <neumann_at_wu.ac.at>
    Date: Mon, 10 Jun 2013 14:12:05 +0200

    Dear Community,

    Since the last release of the the Next Scripting Framework
    (NSF 2.0b3), we have received feedback from early adopters.
    Many thanks for the helpful and the constructive comments!

    This feedback triggered an internal discussion and led to
    revising
    some earlier design decisions and naming conventions,
    especially
    in NX. The new naming conventions improve the orthogonality and
    the clarity of NX programs.

    Since the release of 2.0b3, there have been more than 250
    commits to
    our code repository. The implementation is very stable and
    has been
    used for more than two years in production of our large-scale,
    multi-threaded web environment inside NaviServer. Most of
    the changes
    happened in NX and, therefore, on the NSF scripting level,
    without the
    need to modify the NSF C layer. The implementation of XOTcl
    2 has
    changed very little. The Next Scripting Framework was tested
    with Tcl
    8.5.14 and Tcl 8.6.0 on Linux, Mac OS X, and in windows
    environments
    (MinGW, VC11).

    This beta-release is supposed to be the last release before
    the final 2.0 is out, which should be soon.

    Below are the most notable differences in 2.0b5 as compared to
    2.0b3:

    a) NX 2.0b3 used the following conventions to define methods for
        instances, object-specific methods and class-object specific
        methods:

          /cls/ method foo {args} {...}
          /obj/ method bar {args} {...}
          /cls/ class method baz {args} {...}

        Introspection was possible via (in the same order):

          /cls/ info methods
          /obj/ info methods
          /cls/ class info methods

        The problem with this convention is that e.g. "info methods"
        operates on different method records, depending on
    whether it is
        called on a class or on an object. This breaks a basic
    inheritance
        contract with the programmer: As nx::Class is a
    specialization of
        the most general class nx::Object, the same
    introspection operation
        (e.g., "info methods") should return e.g.
    object-specific methods
        for both class objects and ordinary, non-class objects.

        Therefore, we adopted the following more orthogonal
        conventions to define methods for instances and
        for object-specific methods

          /cls/ method foo {args} {...}
          /obj/ object method bar {args} {...}

        Introspection:

          /cls/ info methods
          /obj/ info object methods

        Note that we can now use the same mechanism to define
        or query object-specific methods on objects and classes.
        The same applies for aliases, forwards, mixins, and filters.

        The new convention imposes a little typing burden for
    the code
        writer, but reduces the potential ambiguity for the code
    reader,
        who is trying to understand what exactly "$x method FOO
    {args}
        {...}" means.

        For convenience, we provide two packages
    "nx::plain-object-method"
        and "nx::class-method" to switch to the old conventions.
    A verbose
        tracing mode can report usages to ease migration.


    b) Parametrization:

        NX 2.0b3 followed the XOTcl conventions of registering
    by default
        same-named getter/setter methods for configuration
    parameters used
        in object creation. These getter/setter methods bloat
    the method
        interface and risk shadowing inherited methods, leading to
        unexpected behaviors for beginners.

        NX 2.0b5 adopts a Tk/itcl/... idiom by offering a
    cget/configure
        interface to objects as generic getters/setters. To obtain
        parameter-specific getters/setters (i.e., the old
    behavior), the
        flag "-accessor public|protected|private" can be set
    when defining
        properties and variables.

    c) Further clean-ups of the introspection interface ("info").

        In order to streamline the interface further, we
    followed the idea
        to use "... info /plural word/" to obtain a set of
    handles, and
        then to make a separate call to retrieve the details.
    Therefore, we
        now provide ...

          /cls/ info methods
          /obj/ info object methods

          /cls/ info variables
          /obj/ info object variables

          /cls/ info slots
          /obj/ info object slots

          /cls/ info method parameters /methodName/
          /obj/ info object method parameters /methodName/

          /cls/ info configure parameters
          /obj/ info lookup configure parameters

        ... to return a list of handles. The result list can be
    filtered in
        each case by specifying a match pattern. Each result
    handle can
        then be used in a separate call to obtain details:

          /obj/ info method definition /methodHandle/
          /obj/ info variable definition /varHandle/
          /obj/ info parameter name /paramHandle/

        These are just a few examples.

        In NX 2.0b3, we had e.g. "... info parameter definitions
    ..."
        leaving a beginner in the dark about the parameters actually
        meant. Also, the introspection interface made mixed use
    of plural
        and singular wordings for different purposes (e.g.,
    retrieving
        collections and/or detailed information on one item).

    Below is a more detailed summary of the changes.

    The Next Scripting Framework 2.0b5 (containing NX and XOTcl
    2.0b5) can
    be obtained from http://next-scripting.org/

    Best regards
    - Gustaf Neumann
    - Stefan Sobernig

    ===============================================

    Announcing NSF 2.0b5
    *************************

    Major changes relative to NSF 2.0b3 are (in addition of
    the items (a), (b), and (c) above) are:

        * Additional Features:

          - Serializer:
            * Added flag -objmap to Serializer method deepSerialize
              to make serializer to provide mapping only for
              object names. This makes the serializer
              usable for object/class copying (-map is too coarse)
            * Made "ignore" method public
            * Due to the split between serializer and object
              system serializer, the "ignore" settings were lost

           - Allow explicit unsetting of -per-object flag in
    0-argument
         "-flag=value" notation (all built-in commands accepting
    this flag)

          - Better compatibility with XOTcl 1.*:

          - Added "/obj/ info name" (as alternative to
            "namespace tail [self]")

          - Test-suite: added summary with statistics

          - Traits: added property/variable inheritance

          - MongoDB
         - Added "nx::mongo::db drop collection /name/"
         - Returning status from "nx::mongo::db remove" as
    success (0 or 1)
         - Adjust to object interface
         - Reduce verbosity
         - Add error messages for slot lookup failures

         Updated MongoDB interface
         - Upgraded to c-driver 0.7.1
         - Zested with MongoDB 2.4.4-pre
         - New commands:
           * mongo::run
           * mongo::cursor::find
           * mongo::cursor::next
           * mongo::cursor::close
         - Adapted interface for c-driver 0.7.1 (e.g. new
               optional name for mongo::index)


        * Improved Code Quality:

          - Fixed functional bugs:
            * Copy did not copy aliases and ensemble methods
            * Automatic object destroy for half-baked objects
              (when e.g. configure raises an exception)
            * Handling of required configure parameters
              on later calls to "configure"
            * Fixed potential infinite loop in pattern matching for
          precedence lists
            * Handling of full-qualified name patterns
              for private slots
            * Invalidation of per-object parameter cache
           - on mixin changes and
           - on deletion/adding of per-object slots
            * Handle cyclical superclass/class dependencies
    during object
          system finalize
            * Fixed a bad interaction between Tcl's apply
    (pushing lambda
          frames) and the variable resolvers. The variable
    resolver was
          not able to resolve variables, while the command
    resolver was
          still working correctly.
            * Don't allow "method" to overwrite child objects

          - Fixed potential crashes:
            * Avoid crash on object destroy, when the same
    wrapper-less
              aliases was registered on more than one object/class
            * Fix crash on "nsf::my", when this is called with a
    single
              argument outside an object context (many thanks
              to Markus Moser for reporting)
            * Avoid crash in case NsfParameterGetCmd() is passed
              a plain value (without a parameter spec)
            * Fix potential crash in method caching when commands
              are renamed by Tcl (many thanks to Arthur Schreiber
              for reporting)

           - More code cleanup and refactoring

           - Released version runs all regression tests
             without memory leaks with Tcl 8.5.14 and
             Tcl 8.6.0

          - Build system:
            * Improved compatibility for windows compilations.
    NX can now
              be compiled under windows with the native window
    tool chain
              (VC11) and as well with MinGW (Many thanks to Stephan
              Adelsberger)
             * Update to latest TEA
         * Follow new naming convention for auto-tools
               (using configure.ac)
         * Fix compilation when DTrace is activated (missing
               parenthesis, many thanks to Victor Guerra for
    noticing)
         * Added compile macro NSF_STACKCHECK to provide stack
           monitoring/debugging (especially useful for multi-
               threaded programs, where stack is more limited)
         - Fix compilation when compiled without threads
               (many thanks for r.Zaumseil for noting this)

        * Improved documentation
          - Fixed typos, improve wordings
          - Updated tutorial and migration guide
          - Use slashes in generated syntax to distinguish
            between constants and placeholders.
            Example:
              /obj/ info method definition /methodName/

         * Extended regression tests

    MORE INFO
       General and more detailed information about the
       Next Scripting Framework and its components can be
       found at http://next-scripting.org

    Re: [Xotcl] Small compatiblity problems with XOTcl 1.5.2 - tk bind

    Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

    From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
    Date: Mon, 20 Nov 2006 09:52:38 +0100

    Artur Trzewik schrieb:
    > Hi XOTcl friends!
    >
    > I have found some small incompatibility between XOTcl 1.4 and 1.5 by
    > using XOTclIDE.
    > It considers tk binding
    > ...
    >
    > the "return -code break" have caused that the event is not propagated
    > more.
    > See more in Tk bind command manual.
    >
    > It does not work with XOTcl 1.5.2.
    Artur, thanks for the report. I have fixed this in my development
    version and
    added a test to the regression test suite. For the time being, it looks
    best
    to me when you keep the little hack with the tcl proc wrapper.

    -gustaf neumann

    Next Page