<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
FWIW The Common Music 2 code base is 100% CLOS. &nbsp;The Grace code base uses Bil’s record structure to implement its Scheme pattern objects and it works quite well.
<div class=""><br class="">
</div>
<div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class="">C Side...</font></span><br class="">
<div class=""><br class="">
<div class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(38, 71, 75); background-color: rgb(255, 255, 255);" class="">
<span style="color: #3f6e74" class="">pattern_tag</span><span style="color: #000000" class=""> =
</span>s7_make_c_type<span style="color: #000000" class="">(s7, </span><span style="color: #c41a16" class="">&quot;&lt;pattern&gt;&quot;</span><span style="color: #000000" class="">);</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 14px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(196, 26, 22); background-color: rgb(255, 255, 255);" class="">
<span style="color: #26474b" class="">s7_define_function</span><span style="color: #000000" class="">(s7,
</span>&quot;make-pattern&quot;<span style="color: #000000" class="">, </span><span style="color: #26474b" class="">ffi_make_pattern</span><span style="color: #000000" class="">,
</span><span style="color: #1c00cf" class="">14</span><span style="color: #000000" class="">,
</span><span style="color: #1c00cf" class="">0</span><span style="color: #000000" class="">,
</span><span style="color: #aa0d91" class="">false</span><span style="color: #000000" class="">,
</span>&quot;pattern constructor”<span style="color: #000000" class="">);</span></div>
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Menlo;" class="">[...]</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">
<font face="Menlo" class=""><br class="">
</font></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
Scheme Side...</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
(define-record pattern flags data length datum period value state&nbsp;</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
&nbsp; repeat returning counting traversing next mapr cache)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 14px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">(define (%alloc-pattern)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; ;; flags data length datum period value state limit returning counting traversing next mapr cache</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; (make-pattern 0 (list) #f +nad+ #f +nad+ +nad+ most-positive-fixnum #f #:periods #:depth-first</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span class="Apple-tab-span" style="white-space: pre;"></span>#f #f #f))</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">(define (initialize-pattern obj data for rep flags len dper getr mapr)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; (pattern-data-set! obj data)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; (pattern-length-set! obj len)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; (pattern-mapr-set! obj mapr)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; (pattern-next-set! obj getr)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; ;; map data to see if it is constant data or has subpatterns</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; (let ((con? #t))</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; &nbsp; (map-pattern-data (lambda (x) (if (pattern? x) (set! con? #f)))&nbsp;</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; &nbsp; &nbsp; obj)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">&nbsp; &nbsp; (if con? (set! flags (logior flags +constant-data+))))</div>
<div class="">&nbsp; &nbsp;[...]</div>
<div class="">)</div>
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
[...]</div>
<div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
(define (make-cycle data . args)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
&nbsp; (unless (pair? data) (set! data (list data)))</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
&nbsp; (with-optkeys (args for limit)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
&nbsp; &nbsp; (let ((obj (%alloc-pattern))</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; (flags 0)</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; (len (length data)))</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
&nbsp; &nbsp; &nbsp; (initialize-pattern obj (cons data data) for limit</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; flags len len next-in-cycle</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; (lambda (fn obj)&nbsp;</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; &nbsp; (for-each fn (car (pattern-data obj)))))</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
&nbsp; &nbsp; &nbsp; obj)))</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
[...]</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<br class="">
</div>
<blockquote type="cite" class="">
<div class="">On Feb 14, 2021, at 10:17 AM, Iain Duncan &lt;<a href="mailto:iainduncanlists@gmail.com" class="">iainduncanlists@gmail.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Oh great, I hadn't looked there yet. Thanks! Is there any particular implementation or resource you based the class system in there on? (ie, place to read more about how you did it)
<div class=""><br class="">
</div>
<div class="">iain<br class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Feb 14, 2021 at 2:33 AM &lt;<a href="mailto:bil@ccrma.stanford.edu" class="">bil@ccrma.stanford.edu</a>&gt; wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
stuff.scm has define-class and friends with some examples<br class="">
in s7test.scm.&nbsp; It has some similarities to CLOS.<br class="">
<br class="">
</blockquote>
</div>
_______________________________________________<br class="">
Cmdist mailing list<br class="">
<a href="mailto:Cmdist@ccrma.stanford.edu" class="">Cmdist@ccrma.stanford.edu</a><br class="">
https://urldefense.com/v3/__https://cm-mail.stanford.edu/mailman/listinfo/cmdist__;!!DZ3fjg!vlx95wjWmKfGndRV-oOKnf1WnD1TzGmD7FIKM6HTtoIAyd5rLoZ3G8sO8ulQhA$
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>