<div dir="ltr">Christos, I'm really looking forward to checking this out and using it. I'd love to get it working on Max too in their open GL context. I was out of town all day so have not had a chance to watch this, but I have checked out the repo and I'm really glad you're doing this work and sharing it.<div><br></div><div>That would have been me talking about Clojure I expect, and I agree wholeheartedly that something similar to Clojure's name-spacing and module system would be a great addition. I think an easy to use module/package system makes a massive difference to newbie users and is a really big part of Chicken's success as an accessible but real world usable scheme. To be honest, I think from what I've seen that there isn't going to be much for me to contribute there but I'll happily test and document any ideas for such a thing, and contribute in whatever way I can!</div><div><br></div><div>On the topic of Clojure, I wound up here on a circuitous route that started with me discovering Clojure as my lisp gateway drug, and then hunting for something similar for music. I did find things like Overtone (Clojure front end to Super Collider) and Pink (Steven Yi's Clojure music platform), and I got ClojureScript working in Max with the node.script object, but ultimately came to the conclusion that the JVM was just a deal breaker and that the node environment didn't give me enough. S7 has really been a fantastic fit for what I was looking for with pretty much everything I liked about Clojure but dead easy to use in a performance critical environment. I'm certain we will attract more people from the same place if we add documentation and examples like this that help raise awareness in the non-academic computer music world and make it easy to test the waters.</div><div><br></div><div>So yeah, that's my long-winded Canadian way of saying awesome work, and great to have you here! :-)</div><div>iain</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 2, 2020 at 3:25 PM <<a href="mailto:bil@ccrma.stanford.edu">bil@ccrma.stanford.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I think s7's let is very similar to clojure's namespace.<br>
(inlet 'x 1) creates a namespace with 'x bound<br>
to 1, and (eval '(+ x 1) (inlet 'x 1)) is 2. Unless<br>
otherwise specified, the "outlet" is the rootlet, so<br>
to make an instance (so to speak) of the class<br>
(inlet 'x 1), you could:<br>
<br>
(let ((class (inlet 'x 1)))<br>
(let ((instance (inlet 'y 2)))<br>
(set! (outlet instance) class)<br>
(with-let instance<br>
(+ x y))))<br>
<br>
(let ((instance (inlet 'floor (lambda (x) 3.14))))<br>
(with-let instance (floor 1.5)))<br>
<br>
By using openlet, these lets can specialize built-in<br>
functions (see mockery.scm) without having to change<br>
to the instance namespace via with-let:<br>
<br>
(let ((instance (inlet 'object->string (lambda (obj . rest) "hi"))))<br>
(openlet instance)<br>
(object->string instance))<br>
<br>
The hierarchy is the outlet chain. Locals can be added<br>
with varlet, removed with cutlet, mapped over etc.<br>
Another way to set up the chain is sublet:<br>
<br>
(let ((class (inlet 'x 1)))<br>
(with-let (sublet class 'y 2) ; class=outlet + y=2 locally<br>
(+ x y)))<br>
<br>
_______________________________________________<br>
Cmdist mailing list<br>
<a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" rel="noreferrer" target="_blank">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
</blockquote></div>