Re: Guile + SWIG

2021-04-05 Thread Matt Wette
When scripts with load-extension are compiled, the compiler does not know what symbols are defined in the extension so you may get warnings. Are you getting an error or just the warning? On 4/5/21 10:44 AM, Paul Emsley wrote: Hi Linas, Thanks for your reply. Let me clarify if I can. I have

Re: Guile + SWIG

2021-04-05 Thread Paul Emsley
Hi Linas, Thanks for your reply. Let me clarify if I can. I have many C++ functions that I would like to use from scheme. I am using SWIG to generate wrappers for these functions, and these get added at the "root module" http://www.swig.org/Doc3.0/Guile.html The default linkage is the

Re: Syntax-Case macro that selects the N-th element from a list

2021-04-05 Thread Dr. Arne Babenhauserheide
Hi Linus, thank you for your tipps! Linus Björnstam writes: > Can you use the procedural part of syntax-rules? You have the power of > using scheme at expansion time, which means you could do list-ref all > you want. > > That "syntax-rules" is of course syntax-case. > > The only thing is

Guile + SWIG

2021-04-05 Thread Paul Emsley
Hi, I am bringing my swigged Gtk2 + guile 1.8.8 + guile-gtk application up to date and I'd like some help please. My SWIG usage wraps many function, including enhanced_coot_ligand_p(). I am confused between the difference between functions that are available from C/C++ and those from a scheme

Re: Guile + SWIG

2021-04-05 Thread Linas Vepstas
Hi Paul, Conventionally, a guile module would look something like (define-module (test-embedding)) (use-modules (srfi srfi-1)) ; .. etc (define (enahanced-ligand-coot-p) #t) ; etc. (export enahanced-ligand-coot-p) In your example, you never explained how "enahanced-ligand-coot-p"

Re: Syntax-Case macro that selects the N-th element from a list

2021-04-05 Thread Taylan Kammer
On 05.04.2021 13:30, Dr. Arne Babenhauserheide wrote: > Hi, > > In dryads-wake I need selection of the element in a list in a macro from > user-input. Currently I have multiple macros, and the correct one (which > strips the non-selected choices) is selected in a simple cond: > >

Re: Syntax-Case macro that selects the N-th element from a list

2021-04-05 Thread Tim Van den Langenbergh
On Monday, 5 April 2021 13:30:21 CEST you wrote: > Hi, > > In dryads-wake I need selection of the element in a list in a macro from > user-input. Currently I have multiple macros, and the correct one (which > strips the non-selected choices) is selected in a simple cond: > > (define-syntax-rule

Re: Syntax-Case macro that selects the N-th element from a list

2021-04-05 Thread Linus Björnstam
That "syntax-rules" is of course syntax-case. Try writing it first with unhygienic macros and get that working before porting to syntax-case if you don't know the ins-and-outs of syntax-case. -- Linus Björnstam On Mon, 5 Apr 2021, at 14:21, Linus Björnstam wrote: > Can you use the

Re: Syntax-Case macro that selects the N-th element from a list

2021-04-05 Thread Linus Björnstam
Can you use the procedural part of syntax-rules? You have the power of using scheme at expansion time, which means you could do list-ref all you want. The only thing is that guile lacks syntax->list, so sometimes you have to manually turn it into a list. Say you are matching ((_ stuff ...)

Syntax-Case macro that selects the N-th element from a list

2021-04-05 Thread Dr. Arne Babenhauserheide
Hi, In dryads-wake I need selection of the element in a list in a macro from user-input. Currently I have multiple macros, and the correct one (which strips the non-selected choices) is selected in a simple cond: (define-syntax-rule (Choose resp . choices) "Ask questions, apply consequences"

Guile + SWIG

2021-04-05 Thread Paul Emsley
Hi, I am trying to bring my swigged Gtk2 + guile 1.8.8 + guile-gtk application up to date and I'd like some help please. My SWIG usage wraps many function, including enhanced_coot_ligand_p(). I am confused between the difference between functions that are available from C/C++ and those from a