[gambit-list] iTunes plugin success.. not so much

Marc Feeley feeley at iro.umontreal.ca
Sat Nov 8 09:50:03 EST 2008

On 7-Nov-08, at 11:48 PM, Neil Baylis wrote:

> Ah well, egg on face and all that.
> I've uploaded a new version of my iTunes visualizer with Scheme REPL.
> The version I uploaded previously was accidentally linked against  
> libgambc.dylib and required that to be in the right place to work.
> This version is correctly linked against libgambc.a and should work  
> even if you don't have Gambit installed.
> For anyone interested, you can download scmviz.tar.gz
> If you download it and unpack the archive, you'll find a README file  
> with instructions.

Great! I got the original version working by configuring with --enable- 
shared and doing a "make install".

I also hooked up your plugin to the remote debugger I am working on  
with Guillaume Cartier, which will be integrated in his Jedi IDE.  The  
debugger and the program being debugged (the debuggee) are separate  
processes which communicate over TCP.  Currently the debugger is  
rather simplistic; it pops up a new xterm for each REPL that is  
created.  Conceptually each Gambit thread has its own REPL, but the  
actual REPL is created lazily when there is an error, a REPL output,  
such as with (pp 123), or an explicit call to create a REPL, such as  

The code is attached below.  To try it out you need to have Gambit  
v4.3.0 and X11 installed (for xterm), then do this:

% cd ~
% tar zxf rm.tar.gz
% cd rm
% gsi debugger -   # final dash is important!

then start iTunes, start playing some music and the visualizer by  
typing clover-T and ask the plugin for a REPL by typing ctrl-R.  In  
that REPL type

(load "~/rm/itunes")

This creates 2 threads which each start a REPL (so 2 xterms will pop  
up).  In REPL #1 enter (top) to get a continuously update of the state  
of the threads.  You might want to widen the window a bit to avoid  
scrolling problems.  Then in REPL #2 you can evaluate expressions  
concurrently with the music playing.  For example (expt 3 1000000).   
Note that the thread's state shows up in REPL #1 and that this does  
not stop iTunes from playing music or refreshing the visualizer.

The debugger can also start REPLs for any other Gambit programs.  For  
example, in a different shell you can run

% gsi ~/rm/debuggee -

And an xterm will popup with the REPL of the primordial thread.  You  
can type (start-new-repl) to create a new thread which starts a REPL  
in a new xterm.

It will be neat when this remote debugging system is fully integrated  
into Gambit and Jedi!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rm.tar.gz
Type: application/x-gzip
Size: 4947 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20081108/ebf4d53e/attachment.bin>
-------------- next part --------------

More information about the Gambit-list mailing list