On Sat, Feb 12, 2011 at 16:51, Peter Bex wrote:
> This imports module-a (which can be internal and nobody has to know it's
> there) both for syntax and normally, and then re-exports the convenience
> function.
Pardon the interruption, but I wanted to check for my own
understanding: is import-for-
Thanks Peter. That's perfectly good enough. As long as I'm not repeating
myself and it's transparent to the user, I can live with it. You've been
very helpful.
-Patrick
On Sat, Feb 12, 2011 at 4:51 PM, Peter Bex wrote:
> On Sat, Feb 12, 2011 at 04:35:23PM -0500, Patrick Li wrote:
> >
> > I hav
On Sat, Feb 12, 2011 at 04:35:23PM -0500, Patrick Li wrote:
>
> I have a *very* ugly workaround right now.
> I define the convenience function twice. Once normally. And again within a
> begin-for-syntax form.
You can do the same trick as before:
(module module-a (convenience-function)
(import
Hello everyone,
I'm creating a module that exports two things, a macro and a function. The
definition of the macro happens to require the use of the function. I am
having problems creating this module. The defined macro cannot access the
function.
--Example
Thank you for everyone's help!
I scrounged together a half-working implementation of macroexpand-all. It
recursively macroexpands all the subforms within a form until there are
absolutely no macros left in the expression. This is a temporary solution
for whoever needs it, as I think Felix probably
Thanks for the help! I upgraded to 4.6.0 and everything's fine now.
-Patrick
On Sat, Feb 12, 2011 at 12:55 PM, Peter Bex wrote:
> On Sat, Feb 12, 2011 at 12:18:30PM -0500, Patrick Li wrote:
> > Ah I'm using Chicken 4.4.0.
> > I'm a beginner to Chicken and just typed "port install chicken" into
On Sat, Feb 12, 2011 at 12:18:30PM -0500, Patrick Li wrote:
> Ah I'm using Chicken 4.4.0.
> I'm a beginner to Chicken and just typed "port install chicken" into my
> MacOSX terminal.
> I'll figure out how to upgrade Chicken.
If you have more questions, it may be more efficient to continue the
conv
C_word is the fundamental scheme object type. The underlying type of int or
long is just used to make the width of this type 32-bit or 64-bit, and the
actual representation is indicated by a type tag (some subset of bits in that
word). So it actually can return an arbitrary result. See Data R
Ah I'm using Chicken 4.4.0.
I'm a beginner to Chicken and just typed "port install chicken" into my
MacOSX terminal.
I'll figure out how to upgrade Chicken.
-Patrick
On Sat, Feb 12, 2011 at 12:04 PM, Peter Bex wrote:
> On Sat, Feb 12, 2011 at 11:52:40AM -0500, Patrick Li wrote:
> > I didn't un
On Sat, Feb 12, 2011 at 11:52:40AM -0500, Patrick Li wrote:
> I didn't understand what you mean by this part. How do I perform a "full
> expansion"?
> eg.
> (define-syntax mymacro (syntax-rules () ((mymacro) (lambda () 3
>
> (expand '(mymacro))
> => (lambda1020 () 3)
What version of Chicken a
>
> After full expansion, you should get ##core#lambda, which is the "core"
> lambda.
>
I didn't understand what you mean by this part. How do I perform a "full
expansion"?
eg.
(define-syntax mymacro (syntax-rules () ((mymacro) (lambda () 3
(expand '(mymacro))
=> (lambda1020 () 3)
(expand (
On Sat, Feb 12, 2011 at 11:15:31AM -0500, Patrick Li wrote:
> Thanks for the help Felix!
>
> There's one more question I stumbled upon actually. Do you know of some way
> I can tell if a symbol *actually* refers to lambda or let?
>
> eg. after some macro expansions, a form might look like (lambda
Thanks for the help Felix!
There's one more question I stumbled upon actually. Do you know of some way
I can tell if a symbol *actually* refers to lambda or let?
eg. after some macro expansions, a form might look like (lambda89 (x y) body
...)
where lambda89 is equivalent to lambda.
Given a symb
Thanks for the help.
The module workaround will work fine for what I'm doing!
-Patrick
On Sat, Feb 12, 2011 at 5:36 AM, Felix <
fe...@call-with-current-continuation.org> wrote:
> >
> > There may be a shorter way involving begin-for-syntax or something.
> >
>
> (begin-for-syntax (define-syntax .
Thanks Felix,
Mt question wasn't clear. What about C_word's use here:
int CHICKEN_eval_string (char *str, C_word *result)
Wouldn't this be able to return arbitrary results? I was thinking
that this is like CHICKEN_eval_string_to_string except an actual
scheme expression is returned instead of
>
> There may be a shorter way involving begin-for-syntax or something.
>
(begin-for-syntax (define-syntax ...)) should actually work, but it
doesn't. I have to investigate this.
cheers,
felix
___
Chicken-users mailing list
Chicken-users@nongnu.org
> Does anyone know which forms introduce new bindings? How can I check this
> up?
`let' and `lambda' introduce new bindings. `let' is not transformed into
`lambda', it is handled as a primitive.
cheers,
felix
___
Chicken-users mailing list
Chicken-use
From: David Dreisigmeyer
Subject: [Chicken-users] C_word type / Cython (warning: passing argument 2 from
incompatible pointer type)
Date: Fri, 11 Feb 2011 17:47:24 -0500
> Here's the solution on the Cython side.
>
> Is C_word a long (or int) though?
>
A long on 64-bit platforms and an int on
18 matches
Mail list logo