<div>Hi,</div><div><br></div>2010/6/15 Andrew C. Smith <span dir="ltr"><<a href="mailto:andrewchristophersmith@gmail.com">andrewchristophersmith@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">Oh yes, love it. This may actually do all I need.<div><br></div></div></blockquote><div><br></div><div>I was thinking that it was a pretty simple solution to something that was bugging me about the system too!  But I think that means we're on the right track rather than "done."</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div></div><div>In particular, I like how "killall chuck" restarting the libraries will make it so much quicker to try out public classes. I mean, even though it's kind of slow, at least with a scripting language like Python it'll run on other computers.</div>
</div></blockquote><div><br></div><div>yeah, with Python, it's about as cross platform as Chuck itself.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div>One improvement I can think of is to figure out what chuck kicks back when it's fully loaded, and use that rather than time.sleep(1). It could just run into some problems depending one any kind of lags in the load time. And, considering this is totally based on crashing chuck, it should assume that not everything will work properly.</div>
</div></blockquote><div><br></div><div>Totally.  That's the hackiest part of it.  Chuck needs time to load up and be running.  It's a much better idea to have some sort of handshaking going on there.  Even if we just add a file that prints something out that we can grab from stdout would be better than just waiting.  I've noticed with files that do a lot of Machine.add("<a href="http://etc.ck">etc.ck</a>"); certain systems required a some::time => now; in between the add statements because they took too long...  it was an older Linux machine.  Anyway, it would be much better to get feed back from the VM, you're right.</div>
<div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>Maybe kick back a warning if chuck doesn't start after 5 seconds or so. I don't know, just more ideas. And finally, maybe just have setupfile set to an optional argument. That would allow multiple chuck handles to run at once using different libraries (if, for example, you want different chucks on different osc ports).</div>
</div></blockquote><div><br></div><div>Yeah, we should add a bunch of arguments to the session handler so that it can run OSC on different ports and all that jazz.  Different setup files is also a good idea.  I can also see this working on a network and keeping a VM running on a different machine than the one you're coding from.  Maybe the session handler itself could receive OSC commands...</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>For the record, I've also got a Mac with Snow Leopard, so we've deduced nothing so far about compatibility. Great work, though--let me know if I can help.</div>
</div></blockquote><div><br></div><div>You are helping!  :)</div><div><br></div><div>I'm going to keep working at this.  Maybe I'll add it to github...  </div><div><br></div><div>Mike</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div><br></div><div>-Andrew</div><div><br><div><div><div></div><div class="h5"><div>On Jun 15, 2010, at 5:58 PM, mike clemow wrote:</div><br></div></div><blockquote type="cite"><div>
<div></div><div class="h5">Okay folks,<div><br></div><div>It's hacky and slow, but it does technically work (on my Mac with Snow Leopard...)  </div><div><br></div><div>how to: </div><div><br></div><div>1) make sure chuck is installed ;)</div>
<div>
2) unzip the archive, open a terminal window</div><div>3) cd /path/to/chuck-session-handler_v01</div><div>4) python csh-v1r0.py - notice that the script starts chuck and adds the <a href="http://setup.ck/" target="_blank">setup.ck</a> and <a href="http://mylib.ck/" target="_blank">mylib.ck</a> files</div>

<div>5) open another terminal window</div><div>6) in that terminal window cd /path/to/chuck-session-handler_v01</div><div>7) chuck + <a href="http://test.ck/" target="_blank">test.ck</a></div><div>8) verify that the output (in the first window) prints "5 :(int)"</div>

<div>9) killall chuck</div><div>10) notice that the script reboots chuck and adds the <a href="http://setup.ck/" target="_blank">setup.ck</a> and <a href="http://mylib.ck/" target="_blank">mylib.ck</a> files</div><div>11) chuck + <a href="http://test.ck/" target="_blank">test.ck</a></div>

<div>12) verify that the output (in the first window) prints "5 :(int)"</div><div>13) rinse, repeat...</div><div><br></div><div>Questions, comments, concerns?  I think that something like this could be very interesting as part of an incremental programming system that would keep track of the classes that were written and add them to the list of classes that are included in <a href="http://setup.ck/" target="_blank">setup.ck</a>.  I think that this would be interesting for building and maintaining libraries for live-coding.</div>

<div><br></div><div>Anyway, it's a start... of something.</div><div><br></div><div>Best,</div><div>Mike</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jun 15, 2010 at 2:57 PM, mike clemow <span dir="ltr"><<a href="mailto:michaelclemow@gmail.com" target="_blank">michaelclemow@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>> By the way: good programmers enforce legible code, not languages. :)<br><br></div><div>Yes, Joe, but if *I* write it in Perl, it will be crap code.  :)</div>

<div><br></div><div>I'm working on a Python stub application for this session handler idea.  We can use it as a basis and build on it, if you guys like it.  What Andrew and I were talking about doing is actually quite different than what Scott Wheeler's original Perl script did.  I'm much more interested in the session handler idea, but I'm sure there's a way to combine them.  I personally don't think it makes much difference what language they two are written in as long as they play nice together.</div>


<div><br></div><font color="#888888"><div>Mike</div></font><div><div><div></div><div><br><div class="gmail_quote">On Sat, Jun 12, 2010 at 10:29 PM, Joe McMahon <span dir="ltr"><<a href="mailto:mcmahon@ibiblio.org" target="_blank">mcmahon@ibiblio.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2010/6/12 mike clemow <<a href="mailto:michaelclemow@gmail.com" target="_blank">michaelclemow@gmail.com</a>>:<br>
<div>> I would be happy to help make something too, although I would say we should<br>
> use Python for two reasons:<br>
> 1) I know Python much better than Perl.<br>
> 2) Python enforces much more legible code.<br>
</div>Okay, well, I'll take a look at the Perl version; let's see what we<br>
can come up with.<br>
<br>
By the way: good programmers enforce legible code, not languages. :)<br>
Programming languages can help out, but it's possible to write crap<br>
code in any language. Having written both, I think that writing good<br>
Perl does indeed require more discipline, but the power advantages<br>
(especially CPAN) help a lot.<br>
<div><div></div><div>_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div>-- <br><a href="http://michaelclemow.com/" target="_blank">http://michaelclemow.com</a><br><a href="http://semiotech.org/" target="_blank">http://semiotech.org</a><br>

<br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://michaelclemow.com/" target="_blank">http://michaelclemow.com</a><br><a href="http://semiotech.org/" target="_blank">http://semiotech.org</a><br><br>
</div>
</div></div><span><chuck-session-handler_v01.zip></span>_______________________________________________<div class="im"><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></div></blockquote></div><br></div></div></div><br>_______________________________________________<br>

chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">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><br clear="all"><br>-- <br><a href="http://michaelclemow.com">http://michaelclemow.com</a><br><a href="http://semiotech.org">http://semiotech.org</a><br><br>