Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/describe-coops|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. == describe-coops Display textual descriptions of built-in objects, user-created records, and coops objects. == Overview {{describe-coops}} provides the same API as {{describe}} but additionally supports [[/egg/coops|coops]] objects. The only API difference is the addition of a {{describe-object}} generic procedure, with a useful default implementation for coops classes and objects. If {{coops-primitive-objects}} is loaded, you can specialize on primitive objects as well. == Usage (use describe-coops) There's no need to load {{describe}}, as this egg loads {{describe}} itself and exports a compatible API. Loading {{describe}} after {{describe-coops}} will wipe out the REPL shortcuts. == REPL The REPL shortcuts -- {{,d}} and friends -- provided by the ''describe'' egg are extended to support coops objects. == API <procedure>(describe obj #!optional out)</procedure> Prints a textual description of {{OBJ}} to output port {{OUT}}, which defaults to {{(current-output-port)}}. For coops objects, this dispatches to {{describe-object}}; otherwise it calls {{describe}} from the [[/egg/describe|describe egg]]. Note that this is not a generic procedure. <procedure>(describe-object obj out)</procedure> Generic procedure specialized on {{OBJ}}, responsible for printing the textual description of {{OBJ}}. {{describe}} calls this under the hood. #;> (define-class <point> () (x y z)) #;> (describe <point>) coops standard-class <point> class precedence list: (<standard-object>) slots: (x y z) #;> (describe (make <point> 'x 1 'y 2 'z 3)) coops instance of class <point>: x : 1 y : 2 z : 3 #;> (define-method (describe-object (obj <point>) out) (fprintf out "<point> object with coordinates (~A, ~A, ~A)~%" (slot-value obj 'x) (slot-value obj 'y) (slot-value obj 'z))) #;> (describe (make <point> 'x 1 'y 2 'z 3)) <point> object with coordinates (1, 2, 3) If {{coops-primitive-objects}} is loaded, you can specialize on primitive objects such as fixnums; the default implementation prints both the object's class and the ''describe'' egg's description. For example: #;> (describe 3) exact integer 3 (#x3 #o3 #b11 #\x3) #;> (use coops-primitive-objects) #;> (describe 3) coops instance of primitive class <fixnum> exact integer 3 (#x3 #o3 #b11 #\x3) <parameter>(describe-sequence-limit n)</parameter> <procedure>(set-describer! tag proc)</procedure> <procedure>(dump obj #!optional offset length out)</procedure> <procedure>(hexdump bv start end ref out)</procedure> Same as their [[/egg/describe|describe egg]] equivalents. They are exported for convenience, so {{(use describe)}} is not required when using this egg. It's not currently possible to dump a coops object. == Version history ; 0.1 : Initial release == Author [[/users/jim-ursetto|Jim Ursetto]], [[http://ursetto.com|Ursetto Consulting, Inc.]] Some code was taken from Kon Lovett's [[/egg/coops-utils|coops-utils]] egg. == License [[https://bitbucket.org/ursetto/describe-coops/raw/tip/LICENSE.txt|MIT]].
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you multiply 3 by 3?