[Chicken-users] what does "##core#check" do?

2019-05-13 Thread Marco Maggi
Ciao, in the "record-variants" egg there is: (##core#check (##sys#check-structure x ',original-name)) I understand what: (##sys#check-structure x ',original-name) does, but what is the "##core#check" for? In other code I see "##sys#check-structure" uses without it. TIA --

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Martin Ward
On 13/05/19 19:35, Peter Bex wrote: On Mon, May 13, 2019 at 07:11:40PM +0100, Martin Ward wrote: Chicken scheme does not appear to have defmacro or define-macro but does have define-syntax. Is there a way to define defmacro using define-syntax? This is of course highly discouraged (because

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Martin Ward
On 13/05/19 19:28, Phil Bewig wrote: From the Standard Prelude at my blog : (define-syntax (define-macro x) (syntax-case x () ((_ (name . args) . body) (syntax (define-macro name (lambda args .

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Peter Bex
On Mon, May 13, 2019 at 07:11:40PM +0100, Martin Ward wrote: > Chicken scheme does not appear to have defmacro or define-macro > but does have define-syntax. > > Is there a way to define defmacro using define-syntax? This is of course highly discouraged (because defmacro is inherently

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Phil Bewig
>From the Standard Prelude at my blog : (define-syntax (define-macro x) (syntax-case x () ((_ (name . args) . body) (syntax (define-macro name (lambda args . body ((_ name transformer) (syntax

[Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Martin Ward
The FermaT program transformation system is implemented in WSL and translated to Scheme for compiling or interpreting. It was originally developed using SCM scheme which uses defmacro to define macros, eg: (defmacro floop (name . body) `(call-with-current-continuation (lambda (,name)

[Chicken-users] FFI and callbacks -- in Scheme?!

2019-05-13 Thread Christoph Lange
I'm still busy trying to get MQTT (using Mosquitto MQTT) running for me in Scheme. I have the following code, and this works fine when compiling. Note, that I have defined the `on_message` callback as external, so basically a C function in the end. This forces me to use this code compiled.