Snd 12.8

View: New views
5 Messages — Rating Filter:   Alert me  

Snd 12.8

by Bill Schottstaedt :: Rate this Message:

| View Threaded | Show Only this Message

Snd 12.8:

s7: added logbit? (using gmp arg order, not CL)

    added reverse argument (in C) to s7_new_type_x and (in scheme) to make-type.  
      This is needed because an object might implement the apply and set methods,
      but they might refer to different things (I should have noticed this a long
      time ago).

    s7_environment_to_list and environment->list return just the local environment's
      bindings.  They used to crawl up the environment chain, but that can now be
      done with outer-environment.

    outer-environment returns the environment enclosing its argument (an environment).

    added an object system example in the environments section of s7.html.
      It's based on environments as classes/instances.

checked: sbcl 1.0.55, gtk 3.3.8|10|12

Thanks!: Mike Scholz, Rick Taube.

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: Snd 12.8

by Heinrich Taube-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Feb 1, 2012, at 11:47 AM, Bill Schottstaedt wrote:

>    added an object system example in the environments section of  
> s7.html.
>      It's based on environments as classes/instances.

wow. this this strong enough to implment tiny-clos with call-next-
method and make-instance?  If that were possible i could load cm2 into  
s7 !


_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: Snd 12.8

by Bill Schottstaedt :: Rate this Message:

| View Threaded | Show Only this Message

> call-next-method and make-instance?

hmm... where's my copy of CLtL2...

(make-instance should be no problem, but I can't remember
how call-next-method actually worked).

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: Snd 12.8

by Heinrich Taube-2 :: Rate this Message:

| View Threaded | Show Only this Message

guile, gauch, stklos, chicken all support (to one degree or another)  
a variant of cltl2 called tiny-clos that implemnted basic  
functionality of clos

as i recall the stklos doc was pretty good,

http://www.stklos.net/Doc/html/stklos-ref-8.html#STklos-Object-System

also gauche:

http://practical-scheme.net/gauche/man/gauche-refe_64.html#Introduction-to-the-object-system

and 'goops' in guile:

http://www.gnu.org/software/guile/manual/html_node/GOOPS.html

these tiny-clos derivatives didnt have lots of the bells and whistles  
but you could do 95% of typical cltl2 functionality. for example t--  
rather than cltl2's :around :before and :after methods -- these  
systems  let you call (call-next-method) when you want the next method.

i think make-instance was actually called make, ie

(make-instance 'foo)
is
(make <foo> )

and ininitialize-instance is called initialize.

so to implement an after method on initialize you would do


(define-method* (initialize (obj <mysuperclass>) args)
   (next-method)
   ....)


my cm2 sources are actually written in tiny-clos and works in  these  
shemes. cltl2 sources are autogenerated from the scheme code if you  
load the cm system into common lisp.


_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: Snd 12.8

by Bill Schottstaedt :: Rate this Message:

| View Threaded | Show Only this Message

tiny-clos has always worked in s7 -- it used to be a part of
my test suite.  I think you just need to add s7 to the list of
scheme implementations, and add its sort! to the table of sort
variations.  I can send my copy if you want it.  

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist