[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Diverse Subjects



I have several thoughts and suggestions to communicate.

1) Should T objects have default method for handling unknown
operations? This is a little obscure, but applications do exist.
Consider a T object which contains information amounting to
a reference to an object outside the T heap - eg., one of
Mishkin's OMjects, for the cognoscenti. One wants to be able to perform
object oriented dispatches on it. It has its own "handler", defined
and maintained by OM, not T. Currently, the only way is to make
a T handler for OMjects, and place on it a secondary dispatch
under every operation which could ever be conceivably be applied to an
OMject -- and all these secondary dispatches would be identical (a dispatch
on the OMject's OM handler) but one would nonetheless have to search through
the list of them for every application of an operation to an OMject.
With a default method for unknown operations, the T OMject handler
would be the secondary dispatch, and no searching would be needed.
I realize I could hack this together by redefining OBJECT, but I think
the problem is interesting. Is it general enough to warrant modifying
official T objects to allow default methods?

2) TC Nodes: With all these extra Apollos around, why don't we splice
one or two into the ring and dedicate them to running TC?
We could then provide a T call which would send a compilation request
to such a node using mailboxes. At the other end it would be queued up,
eventually compiled, perhaps even assembled, a notice sent back to the
requestor, and the (error-output) written to a file. This would save
people from having to crippple their machines for hours at a time
with onerous compilation.

3) I notice the meta-circular evaluator in the T manual treats
apply as primitve. I have taken the li berty of redressing this lack.
Comments on semantic correctness will be appreciated.

(define-macro (^ p . b)
    `(object ()
        ((params self) p)
        ((body self) b)
        ((defining-env self) (the-environment))))

(define (apply fn args)
    (let ((internal (make-locale (defining-env self) 'id)))
       (*destructure! internal (params fn) args)
       (evaluate-sequence (body fn) internal)))

       ; evaluate-sequence is defined in the T-manual p.111

(define (*destructure! loc pat lst)
    (cond ((list? pat)
           (*destructure! loc (car pat) (car lst))
           (*destructure! loc (cdr pat) (cdr lst)))
          (t (*lset loc pat lst))))

This interest is not entirely frivolous, as I will be constructing
a metacircular T emulator as part of an advanced debugging tool.
-------