On Tuesday 13 January 2004 08:13, Kjetil Svalastog Matheussen wrote:
On Mon, 12 Jan 2004, Larry Troxler wrote:
Kjetil, I'm very confused now, upon reading the source for k_guille: what's the point of the "global_scm.txt" and "local_scm.txt" files that are included in the source and evaluated. Why not just (load) the corresponding scheme files instead?
Oops, global_scm.txt and local_scm.txt isn't supposed to be in the repository. They are autogenerated by the gen_c_scheme.py program. Will remove.
Yep, this much I understand.
But, local.scm can't be (load)-ed, because its inside a function called "pd-instance-func" (see k_guile_load). The function works like this:
(define (pd-instance-func pd-instance) (eval-file "local.scm") (eval-file file) (pd-set-inlet-func) (pd-set-cleanup-func))
and is created and defined for each time a file is loaded in k_guile.
Hmm, I guess I have to learn more about Scheme to understand this - until now, I've been used to using Common Lisp, and have never really learned the standard Scheme language.
I have to say, it does seem very strange that you would have to resort to such a horrible klugde to boot up your scheme code. Does it have something to do with the fact that you want a seperate interpreter for each object?
Incidently, I'm really doubting about how using seperate interpreters for each object could work for someone who wants to use Common Music in scheme within PD.
But hopefully other people who are more experienced in Scheme as a opposed to Common Lisp, will chime in here. It could well be that I'm missing some level of understanding, or am simply of the minority opinion.
The second reason is that by including global.scm and local.scm directly into the k_guile.pd-linux binary instead of loading the files somehow, there is no problem finding those files when running the k_guile external. local.scm and global.scm aren't supposed to be changed very often anyway.
I personally don't agree with this argument. No matter what, in order to make use of your external, those scheme files need to be available. The only distinction is whether you need them at the time you build the external, or whether they need to be there at the time you load the external into PD. Either way, they need to be there.
Whatever, I think I'm probably confused based on my lack of knowledge of Scheme as opposed to Common Lisp, and/or we have different goals.
Larry Troxler