macro error

17 views
Skip to first unread message

Damien Mattei

unread,
Apr 11, 2017, 11:36:23 AM4/11/17
to BiwaScheme
Hello,

i'm writing an online code ( https://sidonie.oca.eu/ )with various Scheme implementations (Kawa,Bigloo,BiwaScheme) , and i have an error with a "do while" macro,
it works with a simple macro but not with a more complex one.

The macro definitions are in this file:
https://sidonie.oca.eu/Sidonie/scheme/macrotic-sugar.scm

code is also here:
http://codepad.org/78p5P2Kj  

this is basically two versions of 'do while ' macros running BOTH with SIMPLE examples but with more COMPLEX arguments the second fails.



The good one can be tested here (it must print a list of observers code of 3 letters  ):

 https://sidonie.oca.eu/Sidonie/SidonieStatisticBiwa.htm

and the corresponding running code is :

https://sidonie.oca.eu/Sidonie/scheme/SidonieStatistic.scm

the difference with the other one is here:


http://lpaste.net/354513


the failing code can be tested here:

https://sidonie.oca.eu/Sidonie/SidonieStatisticBiwaTest.htm

the source code is:

https://sidonie.oca.eu/Sidonie/scheme/SidonieStatisticTest.scm

the failing part of code is in the macro use:

http://lpaste.net/354514

the error diplayed in firefox web console is in javascript:

TypeError: var_def.to_array is not a function
init_vars<()            biwascheme.js:4990
BiwaScheme.Pair<.map()         biwascheme.js:655
<anonyme>       biwascheme.js:4989
BiwaScheme.Syntax<.transform()      biwascheme.js:1510
BiwaScheme.Interpreter.expand()          biwascheme.js:3048
BiwaScheme.Interpreter<.resume()
BiwaScheme.Pause<.resume()         biwascheme.js:2313
<anonyme>          biwascheme.js:8060
f.Callbacks/n()     biwascheme.js:13
f.Callbacks/o.fireWith()   biwascheme.js:13
w()             biwascheme.js:15
.send/d()       biwascheme.js:15

what is cool is that almost all could be tested online, so if anyone has an idea?

Regards,
Damien

Yutaka Hara

unread,
Apr 13, 2017, 12:28:30 PM4/13/17
to biwas...@googlegroups.com
Hello,

> the failing part of code is in the macro use:
>
http://lpaste.net/354514

Definition of macro "do" is missing from https://sidonie.oca.eu/Sidonie/scheme/macrotic-sugar.scm . 
Maybe that is related to the error?

--
You received this message because you are subscribed to the Google Groups "BiwaScheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biwascheme+unsubscribe@googlegroups.com.
To post to this group, send email to biwas...@googlegroups.com.
Visit this group at https://groups.google.com/group/biwascheme.
For more options, visit https://groups.google.com/d/optout.



--
原 悠
Yutaka HARA

Damien Mattei

unread,
Apr 13, 2017, 1:57:18 PM4/13/17
to biwas...@googlegroups.com
bien vu...

hello,
yes i think i forgot to copy the source file from my private directory
to the web (NetBeans) directory, i could not verify it now at home but
i will try to see if it solve the problem tomorrow at office, this
explain why the web console debugger was in the biwascheme.js part of
your public macro definition of 'do', perheaps renaming my personnal
macro 'do' with another name could help also.
thank for you help i will try this soon.
regards,
Damien
>> email to biwascheme+...@googlegroups.com.
>> To post to this group, send email to biwas...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/biwascheme.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> 原 悠
> Yutaka HARA
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "BiwaScheme" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/biwascheme/NF7hMmJfhms/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> biwascheme+...@googlegroups.com.

Damien Mattei

unread,
Apr 14, 2017, 10:57:20 AM4/14/17
to BiwaScheme
hello,
it works now (all is still inline) it was a problem of sync between my git repository and my local development directory, i forgot to recopy the new modifications,
also when i was testing in firefox ,some caching effecthide me the new change and still displayed the errors but the macros were already ok
by security the my do ... while macro is now named do7 to avoid eny possible conflicts with the official do ... while macro of biwascheme
thank for your help again
damien
To unsubscribe from this group and stop receiving emails from it, send an email to biwascheme+...@googlegroups.com.

To post to this group, send email to biwas...@googlegroups.com.
Visit this group at https://groups.google.com/group/biwascheme.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages