[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Switch gschem to another scripting language?



On Nov 24, 2009, at 4:48 AM, Peter TB Brett wrote:
>>> Regular readers will recall that back in 2008 I had a stab at  
>>> swapping
>>> Guile for TinyScheme.  I came to the conclusion that if we used
>>> TinyScheme
>>> we'd be dooming ourselves to reimplementing half of Guile, badly.
>>
>>    That sucks. :-(
>>
>>    You were actually the one who turned me on to TinyScheme; I've
>> used it in two projects so far.  One of them wouldn't have been
>> possible with Guile because of its lack of encapsulation of runtime
>> data structures.
>
> Guile smobs provide encapsulation of runtime data structures,  
> surely?  Or
> do I fail to grasp what you mean by this?

   I meant embedding multiple independent interpreters in the same  
binary, running in different threads.

>> You can embed multiple independent TinyScheme
>> interpreters in the same executable.
>
> It turns out that you can do something similar in Guile using its  
> module
> system -- although you only have one interpreter, you can have  
> multiple
> independent environments. This actually works out to be more
> memory-efficient than running multiple interpreters.  See this thread:
> http://thread.gmane.org/gmane.lisp.guile.user/7375

   I ran across that awhile back.  This would work for one of my  
applications, but the other seems (IMO) better suited to multiple  
interpreters.  They're both already written with TinyScheme though.   
Which is fine with me, because it's a really nice little system.

> Additionally, we can avoid the need for apps that use libgeda to  
> run in
> Guile mode (as currently required) by using scm_with_guile() to  
> enter Guile
> mode only when necessary:
> http://www.gnu.org/software/guile/manual/html_node/Initialization.html

   Wow, neat...I've never messed with that; I will check it out.

              -Dave

-- 
Dave McGuire
Port Charlotte, FL



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user