From: Alex Mizrahi
Subject: alternative to CLOS
Date: 
Message-ID: <4561acda$0$49195$14726298@news.sunsite.dk>
Hello, All!

what alternatives to CLOS are there available for Common Lisp?

With best regards, Alex Mizrahi. 

From: ······@gmail.com
Subject: Re: alternative to CLOS
Date: 
Message-ID: <1164029768.708969.280500@b28g2000cwb.googlegroups.com>
Alex Mizrahi wrote:
> Hello, All!
>
> what alternatives to CLOS are there available for Common Lisp?
>
> With best regards, Alex Mizrahi.

For example, KR.
It can be found in garnet's cvs tree (
http://sourceforge.net/projects/garnetlisp )
From: Pascal Bourguignon
Subject: Re: alternative to CLOS
Date: 
Message-ID: <87r6vyyw14.fsf@thalassa.informatimago.com>
······@gmail.com writes:

> Alex Mizrahi wrote:
>> Hello, All!
>>
>> what alternatives to CLOS are there available for Common Lisp?
>>
>> With best regards, Alex Mizrahi.
>
> For example, KR.
> It can be found in garnet's cvs tree (
> http://sourceforge.net/projects/garnetlisp )=

Somebody mentionned recently a KR version extracted from Garnet:

http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/kr_2.3.4.tar.gz


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"You question the worthiness of my code? I should kill you where you
stand!"
From: ······@corporate-world.lisp.de
Subject: Re: alternative to CLOS
Date: 
Message-ID: <1164031799.235246.297910@f16g2000cwb.googlegroups.com>
Alex Mizrahi wrote:
> Hello, All!
>
> what alternatives to CLOS are there available for Common Lisp?

Are you interested in something like CLOS (MCS, CELOS, Flavors, ...) or
something more different (ObjectLisp, KR, FRL, LOOM, MacFrames, ABCL,
CycL,  ...)?

> 
> With best regards, Alex Mizrahi.
From: Alex Mizrahi
Subject: Re: alternative to CLOS
Date: 
Message-ID: <45620527$0$49196$14726298@news.sunsite.dk>
(message (Hello ·······@corporate-world.lisp.de)
(you :wrote  :on '(20 Nov 2006 06:09:59 -0800))
(

 ??>> what alternatives to CLOS are there available for Common Lisp?

 j> Are you interested in something like CLOS (MCS, CELOS, Flavors, ...) or
 j> something more different (ObjectLisp, KR, FRL, LOOM, MacFrames, ABCL,
 j> CycL,  ...)?

something more different.
i'd like OO that can specify a protocol for objects, in sense which 
functions can be called on object.
somewhat like Java interfaces or Haskell classes.
for example, in CLOS it could look like:

(defclass foo ())
(defgeneric foo-get-at ((f foo) (x integer) (y integer)))
(defgeneric foo-enumerate ((f foo) (x integer)))

(defclass foo-a-impl (foo) ... )

(defmethod foo-get-at ((f foo-a-impl) (x integer) (y integer))  ...)

that's somewhat clumsy..

i'm afraid such thing doesn't exist in Common Lisp, and only CLOS 
alternatives are prototype-based..

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity") 
From: ······@corporate-world.lisp.de
Subject: Re: alternative to CLOS
Date: 
Message-ID: <1164055533.933466.256920@k70g2000cwa.googlegroups.com>
Alex Mizrahi wrote:
> (message (Hello ·······@corporate-world.lisp.de)
> (you :wrote  :on '(20 Nov 2006 06:09:59 -0800))
> (
>
>  ??>> what alternatives to CLOS are there available for Common Lisp?
>
>  j> Are you interested in something like CLOS (MCS, CELOS, Flavors, ...) or
>  j> something more different (ObjectLisp, KR, FRL, LOOM, MacFrames, ABCL,
>  j> CycL,  ...)?
>
> something more different.
> i'd like OO that can specify a protocol for objects, in sense which
> functions can be called on object.
> somewhat like Java interfaces or Haskell classes.
> for example, in CLOS it could look like:
>
> (defclass foo ())
> (defgeneric foo-get-at ((f foo) (x integer) (y integer)))
> (defgeneric foo-enumerate ((f foo) (x integer)))
>
> (defclass foo-a-impl (foo) ... )
>
> (defmethod foo-get-at ((f foo-a-impl) (x integer) (y integer))  ...)
>
> that's somewhat clumsy..

Okay, so your original question was not just any alternative for CLOS,
but an object system with protocols? Maybe even an implementation
of protocols for CLOS?

You can add support for protocols to CLOS. If you have some google-foo
then you
might find implementations.

(The CLIM 2 implementation had one. But that's not 'free'.)

> i'm afraid such thing doesn't exist in Common Lisp, and only CLOS
> alternatives are prototype-based..

The last half-sentence is wrong.

>
> )
> (With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
> "People who lust for the Feel of keys on their fingertips (c) Inity")
From: Pascal Costanza
Subject: Re: alternative to CLOS
Date: 
Message-ID: <4sefa7Fur1s7U1@mid.individual.net>
Alex Mizrahi wrote:
> (message (Hello ·······@corporate-world.lisp.de)
> (you :wrote  :on '(20 Nov 2006 06:09:59 -0800))
> (
> 
>  ??>> what alternatives to CLOS are there available for Common Lisp?
> 
>  j> Are you interested in something like CLOS (MCS, CELOS, Flavors, ...) or
>  j> something more different (ObjectLisp, KR, FRL, LOOM, MacFrames, ABCL,
>  j> CycL,  ...)?
> 
> something more different.
> i'd like OO that can specify a protocol for objects, in sense which 
> functions can be called on object.
> somewhat like Java interfaces or Haskell classes.
> for example, in CLOS it could look like:
> 
> (defclass foo ())
> (defgeneric foo-get-at ((f foo) (x integer) (y integer)))
> (defgeneric foo-enumerate ((f foo) (x integer)))
> 
> (defclass foo-a-impl (foo) ... )
> 
> (defmethod foo-get-at ((f foo-a-impl) (x integer) (y integer))  ...)
> 
> that's somewhat clumsy..
> 
> i'm afraid such thing doesn't exist in Common Lisp, and only CLOS 
> alternatives are prototype-based..

A macro of the following form...

(defprotocol class-name
   (some-method ((x integer) (y integer))
     ...)
   (some-other-method ((x integer))
     ...))

...that expands into code similar to the above should be a 
straightforward exercise...


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Matthew D Swank
Subject: Re: alternative to CLOS
Date: 
Message-ID: <pan.2006.11.22.04.28.54.295668@c.net>
On Mon, 20 Nov 2006 21:42:26 +0200, Alex Mizrahi wrote:


> i'd like OO that can specify a protocol for objects, in sense which 
> functions can be called on object.
> somewhat like Java interfaces or Haskell classes.
> for example, in CLOS it could look like:
> 
> (defclass foo ())
> (defgeneric foo-get-at ((f foo) (x integer) (y integer)))
> (defgeneric foo-enumerate ((f foo) (x integer)))
> 
> (defclass foo-a-impl (foo) ... )
> 
> (defmethod foo-get-at ((f foo-a-impl) (x integer) (y integer))  ...)
> 

Swank has a light OO system for defining the protocols that are
implemented by its various back-ends.  It used to be implemented using
CLOS, but now is a collection of macros and a simple custom dispatch
system.

Matt

-- 
"You do not really understand something unless you
 can explain it to your grandmother." — Albert Einstein.
From: Timofei Shatrov
Subject: Re: alternative to CLOS
Date: 
Message-ID: <4561bf19.195701093@news.readfreenews.net>
On Mon, 20 Nov 2006 15:25:40 +0200, "Alex Mizrahi"
<········@users.sourceforge.net> tried to confuse everyone with this message:

>Hello, All!
>
>what alternatives to CLOS are there available for Common Lisp?
>

What is wrong with CLOS? If you think it's too bloated, CL supports structures,
symbol plists, assoc lists, hash tables, closures and so on. If you think it
lacks some features, there is MOP.

-- 
|Don't believe this - you're not worthless              ,gr---------.ru
|It's us against millions and we can't take them all... |  ue     il   |
|But we can take them on!                               |     @ma      |
|                       (A Wilhelm Scream - The Rip)    |______________|
From: Ken Tilton
Subject: Re: alternative to CLOS
Date: 
Message-ID: <opm8h.645$_p3.423@newsfe10.lga>
Timofei Shatrov wrote:
> On Mon, 20 Nov 2006 15:25:40 +0200, "Alex Mizrahi"
> <········@users.sourceforge.net> tried to confuse everyone with this message:
> 
> 
>>Hello, All!
>>
>>what alternatives to CLOS are there available for Common Lisp?
>>
> 
> 
> What is wrong with CLOS?

I would phrase it differently: why do you (the OP) ask? Kinda curious. 
Is the OP just curious, or do they have specific problem, etc etc.

I might also refer The Storm to Scheme, which AIUI has several OO 
packages to chose form since Scheme was too snooty to specify one.

Finally, doesn't PG toss off an OO in a chapter in On Lisp?

kt

-- 
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon
From: Alex Mizrahi
Subject: Re: alternative to CLOS
Date: 
Message-ID: <45621e79$0$49197$14726298@news.sunsite.dk>
(message (Hello 'Ken)
(you :wrote  :on '(Mon, 20 Nov 2006 13:24:19 -0500))
(

 KT> I would phrase it differently: why do you (the OP) ask? Kinda curious.
 KT> Is the OP just curious,

ye, i'm curious -- i'd like to see alternative object system

 KT>  or do they have specific problem, etc etc.

yes, i have a problem -- CLOS does not work well in ABCL.
it causes code being really slow in ABCL.
also it's suspected to cause some crashes (in case of ABCL they are 
null-pointer and other exceptions).
CLOS is quite bloated so i'm unlikely to fix it myself.

so i'm looking for something small and simple.

i want OO thing because i want my program to be modular -- i'm doing 
experiments, so i can re-implement some module -- and other stuff  should 
work with new module as long as implements same module interface. thus i 
want an interface-defining thingie. not actually interface for modules, but 
for objects they produce. so i can combine modules into some processing 
pipeline..

 KT> Finally, doesn't PG toss off an OO in a chapter in On Lisp?

indeed, haven't read it yet..

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity") 
From: Bill Atkins
Subject: Re: alternative to CLOS
Date: 
Message-ID: <m2zmalsrvb.fsf@weedle-24.dynamic.rpi.edu>
"Alex Mizrahi" <········@users.sourceforge.net> writes:

>  KT> Finally, doesn't PG toss off an OO in a chapter in On Lisp?
>
> indeed, haven't read it yet..

I don't think you'll regret it.  There is an even better introduction
to building your own stripped-down CLOS in PAIP, if I remember
correctly.
From: Victor Kryukov
Subject: Re: alternative to CLOS
Date: 
Message-ID: <m2y7q53558.fsf@wireless-229-28.uchicago.edu>
Bill Atkins <······@rpi.edu> writes:

> "Alex Mizrahi" <········@users.sourceforge.net> writes:
>
>>  KT> Finally, doesn't PG toss off an OO in a chapter in On Lisp?
>>
>> indeed, haven't read it yet..
>
> I don't think you'll regret it.  There is an even better introduction
> to building your own stripped-down CLOS in PAIP, if I remember
> correctly.

You remember correctly :). I have a copy of PAIP in front of me -
Chapter 13 covers Object Oriented Programming and provides "macros to
make the object-oriented style easier to read and write" (source code
is at http://norvig.com/paip/clos.lisp).

Regards,
Victor.
From: Alex Mizrahi
Subject: Re: alternative to CLOS
Date: 
Message-ID: <45621f55$0$49197$14726298@news.sunsite.dk>
(message (Hello 'Timofei)
(you :wrote  :on '(Mon, 20 Nov 2006 14:47:22 GMT))
(

 ??>> what alternatives to CLOS are there available for Common Lisp?

 TS> What is wrong with CLOS?

implementation i'm working in (ABCL) doesn't support it well.
and it does not provide exactly what do i want, anyway.

 TS>  If you think it's too bloated, CL supports structures, symbol plists,
 TS> assoc lists, hash tables, closures and so on.

ye, i know, i'm already using them, but i'd like some more regular object 
interface definitions.
if i'll use low-level structures, i'd need to make those definitions in 
plain english -- that's not what i want.

 TS>  If you think it lacks some features, there is MOP.

there's no MOP in ABCL, and it would be suboptimal anyway.

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity") 
From: Ken Tilton
Subject: Re: alternative to CLOS
Date: 
Message-ID: <Gxp8h.69$Dg5.34@newsfe12.lga>
Alex Mizrahi wrote:
> (message (Hello 'Timofei)
> (you :wrote  :on '(Mon, 20 Nov 2006 14:47:22 GMT))
> (
> 
>  ??>> what alternatives to CLOS are there available for Common Lisp?
> 
>  TS> What is wrong with CLOS?
> 
> implementation i'm working in (ABCL) doesn't support it well.
> and it does not provide exactly what do i want, anyway.
> 
>  TS>  If you think it's too bloated, CL supports structures, symbol plists,
>  TS> assoc lists, hash tables, closures and so on.
> 
> ye, i know, i'm already using them, but i'd like some more regular object 
> interface definitions.
> if i'll use low-level structures, i'd need to make those definitions in 
> plain english -- that's not what i want.

Based on this and your direct reply to my query, methinks macrology is 
in order, not another OO implementation that still will not do exactly 
what you want anyway. Esp. since we are in the Optimization Zone and you 
have a target implementation seemingly locked in (ABCL). By rolling your 
own (perhaps atop defstruct to give you a head start?) you can /really/ 
tailor things to keep ABCL happy, and it will be /exactly/ the OO system 
you want. Start with something else and you gotta learn it (which may 
take as long as would rolling your own) and then you have to work around 
it (or hack it) when it does not do what you want. And once you get it 
built you may discover it knocks ABCL to its knees (taking your word for 
it) as badly as CLOS.

my2. kt

-- 
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon
From: Javier
Subject: Re: alternative to CLOS
Date: 
Message-ID: <m2u00twsg7.fsf@ordenador-de-javier.local>
"Alex Mizrahi" <········@users.sourceforge.net> writes:

> and it does not provide exactly what do i want, anyway.

I'm curious to know what is exactly what you want and that CLOS cannot
provide.


> there's no MOP in ABCL, and it would be suboptimal anyway.

If you need ABCL because its conectivity to Java, I would recommend
you to look at http://www.cliki.net/Java and use a more complete and
supported implementation of Lisp (for example SBCL, CLISP or ECL).
From: Pascal Costanza
Subject: Re: alternative to CLOS
Date: 
Message-ID: <4sdt1pFthfi6U1@mid.individual.net>
Alex Mizrahi wrote:
> Hello, All!
> 
> what alternatives to CLOS are there available for Common Lisp?

See 
http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/oop/non_clos/0.html 
for some examples. 
http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/scheme/oop/0.html 
is also related.


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: nvt
Subject: Re: alternative to CLOS
Date: 
Message-ID: <4sf3lqFv2v67U1@mid.individual.net>
Alex Mizrahi wrote:

> what alternatives to CLOS are there available for Common Lisp?

Yours.

Mark