<div dir="ltr">Another question. I finally found the scope documentation in the shred page (obviously not my first guess or this thread wouldn't exist) where I also found machine.add() which together start to fill major holes in my understanding. From Lick documentation I deduce that machine.add() does more than simply create a shred. It is also a way of including various declarations and making them available to other shreds. (Note: That is such fundamental functionality that it is probably worth stating explicitly someplace in the ChucK documentation even if it is "just" a side effect of sporking.)<div>

<br><div>However:<h2 style="font-size:17px;font-weight:300;font-family:verdana,helvetica,sans-serif;text-align:justify"><strong style="background-color:rgb(255,255,255)"><font color="#9900ff">inter-shred communication</font></strong></h2>

<p style="font-size:13px;text-align:justify;font-family:verdana,helvetica,sans-serif"><span style="background-color:rgb(255,255,255)"><font color="#9900ff">Shreds sporked in the same file can share the same global variables. They can use time and events to synchronize to each other. (see <a href="http://chuck.cs.princeton.edu/doc/language/event.html">events</a>) Shreds sporked from different files can share data (including events). For now, this is done through a public class with static data (see <a href="http://chuck.cs.princeton.edu/doc/language/class.html">classes</a>). Static data is not completely implemented! We will fix this very soon!"</font></span></p>

<p style="text-align:justify;color:rgb(0,0,0);font-family:verdana,helvetica,sans-serif">This sounds ominous. Should I worry about what part of static data is not implemented? Are there restrictions to static data I should be wary of.</p>

<p style="font-size:13px;text-align:justify;color:rgb(0,0,0);font-family:verdana,helvetica,sans-serif"><br></p></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 3:24 AM, Steve Morris <span dir="ltr"><<a href="mailto:barbershopsteve@gmail.com" target="_blank">barbershopsteve@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you Spencer. That's very helpful. I haven't looked at Bitcrusher yet but besides being chuck full ;-) of useful toys Lick is also a goldmine of interesting programming examples. I really learn best by reading code. Lick should keep me busy for a while. <div>


<br></div><div>-steve</div><div>aka zencuke</div><div><br></div><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Oct 27, 2013 at 10:47 PM, Spencer Salazar <span dir="ltr"><<a href="mailto:spencer@ccrma.stanford.edu" target="_blank">spencer@ccrma.stanford.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Steve,<div><br></div><div>1. The scope of variables is more or less standard Java/C-like -- variables can be used anywhere in the scope in which they are declared or scopes enclosed within, and the underlying values can be passed around to other scopes. File-scope variables can be accessed in pretty much any shred created in that file. Sharing variables across files tends to be more complicated -- the basic paradigm is to make a public class and access static variables or methods within that. <div>



<br></div><div>2. Michael Heuer's LicK is one example of this: <a href="https://github.com/heuermh/lick" target="_blank">https://github.com/heuermh/lick</a></div><div><br></div><div>3. Depending on what your C++ code is doing, you could use a chugin (ChucK plugin). These are generally most appropriate for unit generators and relatively simple generic library functionality. One simple example, Bitcrusher:</div>



<div><a href="https://github.com/ccrma/chugins/tree/master/Bitcrusher" target="_blank">https://github.com/ccrma/chugins/tree/master/Bitcrusher</a><br></div><div><br></div><div>4. The installer should also have installed the command line executable -- you can check this by opening up a window in Terminal and entering a chuck command: </div>



<div>$ chuck --version</div><div><div><br></div><div>chuck version: 1.3.2.0 (chimera)</div><div>   mac os x : intel : 64-bit</div><div>   <a href="http://chuck.cs.princeton.edu/" target="_blank">http://chuck.cs.princeton.edu/</a></div>


<div>
   <a href="http://chuck.stanford.edu/" target="_blank">http://chuck.stanford.edu/</a></div><div><br></div></div><div>$ chuck --help</div><div>...</div><div>$ chuck path/to/<a href="http://file.ck" target="_blank">file.ck</a></div>


<div>etc.</div><div><br>
</div><div>spencer</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 4:20 PM, Steve Morris <span dir="ltr"><<a href="mailto:steve@judgement.com" target="_blank">steve@judgement.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm new to ChucK but am very excited. I have grand plans. I will likely have lots of questions (some unfortunately stupid, apologies in advance) although I have been pouring through manuals, examples, the wiki, git source code and forum archives. Hopefully my questions won't be too annoying. I'm always happy to receive answers in the form of pointers to documentation I should be reading before wasting the groups time. Here's my first pass.<div>





<br></div><div>1) I can't find any thing that documents the scope of variables and objects. Can I create variables that can be accessed in other files, other threads.</div><div><br></div><div>2) My first project will be fairly large hopefully split between many files. Where can I look to see how ChucK code should be broken down and organized. What is a good paradigm for a shared library.</div>





<div><br></div><div>3) Speaking of libraries I would like to bring a lot of existing C++ code into my project. Does dynamic linking actually work. I see vague (old) references to it being made to work again as if it was broken and other references to it just needing documentation which will come "soon." Lacking documentation is there an example library that does it. I can get a long ways with a working example. Working code may be confusing and slow to understand but it is its own most accurate documentation. I've looked at chuck_dll and I think I need to see the interface from the other side to really understand. I'm happy to be a reviewer for "preliminary" draft documentation.</div>





<div><br></div><div>4) The Mac install seems to have installed a single bundled app. How do I use the command line interface?<br><div><br></div></div><div>Thanks,</div><div><br></div><div>-steve (aka zencuke)</div><div><br>





</div></div>
<br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>