[CM] S7 & graphics with ImGui

Iain Duncan iainduncanlists at gmail.com
Sun Aug 2 20:12:41 PDT 2020

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.

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!

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.

So yeah, that's my long-winded Canadian way of saying awesome work, and
great to have you here! :-)

On Sun, Aug 2, 2020 at 3:25 PM <bil at ccrma.stanford.edu> wrote:

> I think s7's let is very similar to clojure's namespace.
> (inlet 'x 1) creates a namespace with 'x bound
> to 1, and (eval '(+ x 1) (inlet 'x 1)) is 2. Unless
> otherwise specified, the "outlet" is the rootlet, so
> to make an instance (so to speak) of the class
> (inlet 'x 1), you could:
> (let ((class (inlet 'x 1)))
>    (let ((instance (inlet 'y 2)))
>      (set! (outlet instance) class)
>      (with-let instance
>        (+ x y))))
> (let ((instance (inlet 'floor (lambda (x) 3.14))))
>    (with-let instance (floor 1.5)))
> By using openlet, these lets can specialize built-in
> functions (see mockery.scm) without having to change
> to the instance namespace via with-let:
> (let ((instance (inlet 'object->string (lambda (obj . rest) "hi"))))
>    (openlet instance)
>    (object->string instance))
> The hierarchy is the outlet chain.  Locals can be added
> with varlet, removed with cutlet, mapped over etc.
> Another way to set up the chain is sublet:
> (let ((class (inlet 'x 1)))
>    (with-let (sublet class 'y 2) ; class=outlet + y=2 locally
>      (+ x y)))
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20200802/1d9e8a48/attachment-0001.html>

More information about the Cmdist mailing list