Re: Guile and C++

2010-05-18 Thread David Fang
ors in the guile library. I usually write the initialization function in the extern "C" namespace to avoid symbol name mangilng. Also, global statics in C++ modules are initialized upon loading, from what I've seen. Fang David Fang http://www.csl.cornell.edu/~fang/ http://www.achronix.com/

Re: Is Guile Useful to a Scheme Noob

2009-12-20 Thread David Fang
#x27;ll be able to find along the way. I wish I wrote all those down as I went along, but they were easy enough to figure out. Happy scheme-ing. Fang David Fang http://www.csl.cornell.edu/~fang/ http://www.achronix.com/

exit upon first error?

2007-05-08 Thread David Fang
Hi, Is there a way to force guile to exit upon first error (uncaught dynwind), analogous to "sh -e"? Though this isn't something one would want interactively, it might be useful for non-interactive scripts to bail out as soon as something goes wrong, rather than continue generating errors.

Re: Loading modules.

2007-04-22 Thread David Fang
> I'm having a little trobule loading modules: > > guile> (version) > "1.8.1" > guile> (use-modules (srfi-64 srfi-64)) Did you mean the following?: guile> (use-modules (srfi srfi-64)) That should reflect how the libraries are installed in /prefix/share/guile/1.8/ > Backtrace: > In stan

Re: modules and C,C++

2007-03-22 Thread David Fang
> > > What do I need to do to export my scm_c_define_gsubr'd > > functions to the module? Must I wrap them into another module in C, and > > use-module it? (Would I expect the same problem with mixing > > load-extensions with modules?) > > You will want to read about scm_c_export() and scm_

Re: C++ and stack unwinding/destruction

2007-03-21 Thread David Fang
> > So this means I should be able to stop the dynwind from > > plowing through any pure C++ function, in theory, right? > > Yes. > > > (I'm still itching to upgrade the libguile API for C++, > > if I only had the time to futz with it...) > > IMHO this is possible only by wrapping libguile with > a

modules and C

2007-03-21 Thread David Fang
Hi, I'm having a bit of trouble using a symbol I defined in C from a module: In a .cc file, I've defined some_C_function(), and exposed it to guile via scm_c_define_gsubr("some-C-function", ...), which is called upon initialization as part of an inner_main() passed to scm_shell().

Re: C++ and stack unwinding/destruction

2007-03-19 Thread David Fang
> "David Fang" wrote: > > C++ relies heavily on constructor-destructor duality > > [...] > > The implementation of guile's C-style exceptions using > > setjmp/longjmp, however breaks this universal law. > > [...] > > In the event of scm_error

C++ and stack unwinding/destruction

2007-03-16 Thread David Fang
ing a template library to simplify conversions between statically-typed STL containers and SCM types. Has this already been done, or is there any interest in the community? Fang David Fang Computer Systems Laboratory Electrical & Computer Engineering Cornell University http://www.csl.cornell.edu/~fan

libguile/__scm.h patchlet

2007-03-08 Thread David Fang
nly problem with the headers I've found, so the headers are in quite good shape. Thanks. David Fang Computer Systems Laboratory Electrical & Computer Engineering Cornell University http://www.csl.cornell.edu/~fang/ -- (2400 baud? Netscape 3.0?? lynx??? No problem!) ___