[gambit-list] iTunes plugin success.. not so much
neil.baylis at gmail.com
Sat Nov 8 11:38:53 EST 2008
On Sat, Nov 8, 2008 at 6:50 AM, Marc Feeley <feeley at iro.umontreal.ca> wrote:
> 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
> 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 (##repl-debug-main).
> 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
> It will be neat when this remote debugging system is fully integrated into
> Gambit and Jedi!
Wow, that is very cool. Supposedly, apple prevents gdb from attaching to
iTunes, so this is an interesting way to make plugins easier to debug.
BTW, I tried exiting from one of the popped up REPLs (by typing ctrl-d a few
times). When I did so, iTunes crashed with a bus error.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list