[Chicken-users] Re: obscure error message after refactoring
On Thu, Jan 20, 2011 at 12:20:29PM -0700, Alan Post wrote: > On Thu, Jan 20, 2011 at 08:46:16AM -0700, Alan Post wrote: > > On Thu, Jan 20, 2011 at 06:58:27AM -0700, Alan Post wrote: > > > I've been refactoring the interface between 3 of the subsystems in > > > my egg, genturfa'i. I've made a ton of changes to the code, and > > > am at the point where I'm ready to compile everything and figure > > > out what is broken. I run chicken-install -s, and as it tries > > > to compile my library, gives me the following error: > > > > > > Error: (caddr) bad argument type: * > > > > > > Call history: > > > > > > (##core#begin (define > > > genturfahi-version-major 0) (define genturfahi-version-minor 0) (define > > > gentur.. > > > (define genturfahi-version-major 0) > > > (##core#set! genturfahi-version-major 0) > > > (define genturfahi-version-minor 0) > > > (##core#set! genturfahi-version-minor 0) > > > (define genturfahi-version-patch 1) > > > (##core#set! genturfahi-version-patch 1) > > > (define genturfahi-version "trunk") > > > (##core#set! genturfahi-version "trunk") > > > (##core#undefined)<-- > > > > > > Error: shell command terminated with non-zero exit status 17920: > > > /opt/chicken-master/bin/chicken chicken-ext.scm -output-file > > > genturfahi.c -dynamic -feature chicken-compile-shared -feature > > > compiling-extension -setup-mode -debug-level 2 -emit-import-library > > > genturfahi > > > > > > I don't have an explicit call to caddr anywhere in my code, and I > > > believe the following line: > > > > > > (##core#set! genturfahi-version "trunk") > > > > > > Refers to the last line in the last file of my library. > > > > > > I've been looking over diffs trying to see if I've introduced a > > > subtle scope or syntax error somewhere, but I'm not having much > > > luck. > > > > > > What do I do with an error message like the one above? It isn't > > > obvious to me where I need to look to fix the problem. > > > > I've narrowed this down to any of the four uses of |match| I now > > have in my code. I don't understand yet why it is giving me this > > error message, but debugging one pattern in four functions feels > > less burdensome that looking for a misplaced token somewhere in the > > library. > > > > I've attached a testing egg that demonstrates what is going on. I > can't quite tell what I'm doing wrong: the code works in csi, but > when I run chicken-install I get an error message. > > Am I using match incorrectly? > With the help of C-Keen on IRC, we've narrowed down this problem to an interaction between -scrutinize and the match macro. I've filed a ticket: https://bugs.call-cc.org/ticket/484 I just pulled down and updated experimental, so this problem wasn't fixed by the recent changes to the scrutinizer. -Alan -- .i ko djuno fi le do sevzi ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Re: obscure error message after refactoring
On Thu, Jan 20, 2011 at 08:46:16AM -0700, Alan Post wrote: > On Thu, Jan 20, 2011 at 06:58:27AM -0700, Alan Post wrote: > > I've been refactoring the interface between 3 of the subsystems in > > my egg, genturfa'i. I've made a ton of changes to the code, and > > am at the point where I'm ready to compile everything and figure > > out what is broken. I run chicken-install -s, and as it tries > > to compile my library, gives me the following error: > > > > Error: (caddr) bad argument type: * > > > > Call history: > > > > (##core#begin (define genturfahi-version-major > > 0) (define genturfahi-version-minor 0) (define gentur.. > > (define genturfahi-version-major 0) > > (##core#set! genturfahi-version-major 0) > > (define genturfahi-version-minor 0) > > (##core#set! genturfahi-version-minor 0) > > (define genturfahi-version-patch 1) > > (##core#set! genturfahi-version-patch 1) > > (define genturfahi-version "trunk") > > (##core#set! genturfahi-version "trunk") > > (##core#undefined)<-- > > > > Error: shell command terminated with non-zero exit status 17920: > > /opt/chicken-master/bin/chicken chicken-ext.scm -output-file > > genturfahi.c -dynamic -feature chicken-compile-shared -feature > > compiling-extension -setup-mode -debug-level 2 -emit-import-library > > genturfahi > > > > I don't have an explicit call to caddr anywhere in my code, and I > > believe the following line: > > > > (##core#set! genturfahi-version "trunk") > > > > Refers to the last line in the last file of my library. > > > > I've been looking over diffs trying to see if I've introduced a > > subtle scope or syntax error somewhere, but I'm not having much > > luck. > > > > What do I do with an error message like the one above? It isn't > > obvious to me where I need to look to fix the problem. > > I've narrowed this down to any of the four uses of |match| I now > have in my code. I don't understand yet why it is giving me this > error message, but debugging one pattern in four functions feels > less burdensome that looking for a misplaced token somewhere in the > library. > I've attached a testing egg that demonstrates what is going on. I can't quite tell what I'm doing wrong: the code works in csi, but when I run chicken-install I get an error message. Am I using match incorrectly? -Alan -- .i ko djuno fi le do sevzi ((author "\".alyn.post.\" ") (category parsing) (doc-from-wiki) (license "ISC") (depends matchable) (synopsis "testing egg")) (module testegg (make-foo make-bar) (import scheme) (import matchable) (define (make-foo cmene valsi) `(,cmene ,valsi)) (define (make-bar cmene nastura porjahe) (write `(,nastura ,porjahe)) (newline) (match `(,nastura ,porjahe) ((#t #t) (lambda (ignore-valsi) (lambda () `(,(make-foo cmene #f) ((#t #f) (lambda (ignore-valsi) (lambda () (make-foo cmene #f ((#f #t) (lambda (valsi) (lambda () `(,(make-foo cmene valsi) ((#f #f) (lambda (valsi) (lambda () (make-foo cmene valsi)) (write (((make-bar "aisa" #f #f) "baz"))) (newline)) (define testegg-version "trunk") (define (dynld-name fn) (make-pathname #f fn ##sys#load-dynamic-extension)) (define testegg-cscflags `(-d2)) (make (((dynld-name "testegg") ("testegg.scm" "testegg.meta" "testegg.setup") (begin (compile -s ,@testegg-cscflags -j testegg -o ,(dynld-name "testegg") testegg.scm) (compile -s ,@testegg-cscflags -o ,(dynld-name "testegg.import") testegg.import.scm `(,(dynld-name "testegg"))) (install-extension ; lo cmene vi pagbu 'testegg ; lo datnyvei vi pagbu `(,(dynld-name "testegg") ,(dynld-name "testegg.import")) ; lo se ckaji vi pagbu `((version ,testegg-version))) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Re: obscure error message after refactoring
On Thu, Jan 20, 2011 at 06:58:27AM -0700, Alan Post wrote: > I've been refactoring the interface between 3 of the subsystems in > my egg, genturfa'i. I've made a ton of changes to the code, and > am at the point where I'm ready to compile everything and figure > out what is broken. I run chicken-install -s, and as it tries > to compile my library, gives me the following error: > > Error: (caddr) bad argument type: * > > Call history: > > (##core#begin (define genturfahi-version-major 0) > (define genturfahi-version-minor 0) (define gentur.. > (define genturfahi-version-major 0) > (##core#set! genturfahi-version-major 0) > (define genturfahi-version-minor 0) > (##core#set! genturfahi-version-minor 0) > (define genturfahi-version-patch 1) > (##core#set! genturfahi-version-patch 1) > (define genturfahi-version "trunk") > (##core#set! genturfahi-version "trunk") > (##core#undefined)<-- > > Error: shell command terminated with non-zero exit status 17920: > /opt/chicken-master/bin/chicken chicken-ext.scm -output-file > genturfahi.c -dynamic -feature chicken-compile-shared -feature > compiling-extension -setup-mode -debug-level 2 -emit-import-library > genturfahi > > I don't have an explicit call to caddr anywhere in my code, and I > believe the following line: > > (##core#set! genturfahi-version "trunk") > > Refers to the last line in the last file of my library. > > I've been looking over diffs trying to see if I've introduced a > subtle scope or syntax error somewhere, but I'm not having much > luck. > > What do I do with an error message like the one above? It isn't > obvious to me where I need to look to fix the problem. I've narrowed this down to any of the four uses of |match| I now have in my code. I don't understand yet why it is giving me this error message, but debugging one pattern in four functions feels less burdensome that looking for a misplaced token somewhere in the library. -Alan -- .i ko djuno fi le do sevzi ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] coops
Felix scripsit: > In Common Lisp and Dylan, pairs are subclasses of list, btw. That's because LISTP doesn't do what LIST? does; it simply checks its input for being either a cons or NIL, so that's the definition of class LIST in CL. If Scheme's LIST? is being used to define a class, that class cannot be a superclass of the class of pairs. -- Even a refrigerator can conform to the XML John Cowan Infoset, as long as it has a door sticker co...@ccil.org saying "No information items inside". http://www.ccil.org/~cowan --Eve Maler ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] obscure error message after refactoring
* Alan Post [110120 15:28]: > increasing the call chain size doesn't affect the output, it seems. > Can you explain what you mean by "look at the continuation of all > this code"? I don't understand yet. I am refering to the location where the code shown in the call-chain is expanded. It might also be a macro that causes an error during expansion though. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] obscure error message after refactoring
On Thu, Jan 20, 2011 at 03:08:53PM +0100, Christian Kellermann wrote: > * Alan Post [110120 14:59]: > > I've been looking over diffs trying to see if I've introduced a > > subtle scope or syntax error somewhere, but I'm not having much > > luck. > > > > What do I do with an error message like the one above? It isn't > > obvious to me where I need to look to fix the problem. > > First of all try to increase the call-chain size with -:aN where N > is the number of entries. > > Then it also might be that the error occurs after your stuff has > been expanded by syntax. So have a look at the continuation of all > this code. It may give some hints. > > I hope you can identify the culprit soon. > increasing the call chain size doesn't affect the output, it seems. Can you explain what you mean by "look at the continuation of all this code"? I don't understand yet. -Alan -- .i ko djuno fi le do sevzi ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] obscure error message after refactoring
On Thu, Jan 20, 2011 at 09:09:25AM -0500, Felix wrote: > From: Alan Post > Subject: [Chicken-users] obscure error message after refactoring > Date: Thu, 20 Jan 2011 06:58:27 -0700 > > > > > I don't have an explicit call to caddr anywhere in my code, and I > > believe the following line: > > > > (##core#set! genturfahi-version "trunk") > > > > Refers to the last line in the last file of my library. > > > > I've been looking over diffs trying to see if I've introduced a > > subtle scope or syntax error somewhere, but I'm not having much > > luck. > > > > What do I do with an error message like the one above? It isn't > > obvious to me where I need to look to fix the problem. > > > > This is an expansion error in a macro, or it's an internal > compiler error. The code runs correctly when interpreted? > The code runs differently when interpreted! It isn't currently matching any of my .peg files, but it does run to completion. I keep in my tests/ directory both .peg and .scm versions of my parsers. Normally, I use the .scm versions of my parsers to pinpoint precise problems in the code, as a failure to compile a .peg file is really just "there's a problem somewhere." I haven't tried yet running my tests from the interpreter to see exactly what is not working like I expect. I did, for this change, include the matchable egg. I took some extra time checking to make sure I was using it correctly, though the error could still be in how I'm using that API. I believe it is the only difference in macro-using code I've changed. It's a fair hint anyway. -Alan -- .i ko djuno fi le do sevzi ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] coops
From: Christian Kellermann Subject: Re: [Chicken-users] coops Date: Wed, 19 Jan 2011 15:48:47 +0100 > * sch...@uni-potsdam.de [110119 15:35]: >> Hi, >> >> >all pairs are subtypes of the type of lists >> >> Then all pairs are lists? What about (cons 1 2)? I thought a list is >> a pair which cdr is a list (or the empty list -- exclude that case >> for a moment). Perhaps I have misunderstood you. I am not that firm >> with types and i am a little confused by 'pairs are types'. In >> general i would say: pairs are not lists and lists are not pairs >> (because of the empty list). > > You are right, pairs are not lists. I wonder whether this hierarchy > makes sense at all. Changing it so that lists are specialisations > of pairs is also wrong obviously. Thanks to elf on #chicken for the > hint. In Common Lisp and Dylan, pairs are subclasses of list, btw. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] invalid typedef syntax using bind
From: Vilson Vieira Subject: Re: [Chicken-users] invalid typedef syntax using bind Date: Thu, 20 Jan 2011 12:02:49 -0200 > 2011/1/20 Felix : >> Yes, bind doesn't handle this (common) form of typedef yet, >> due to obscure technical details of the C parser (Christian >> Kellermann pointed this problem out earlier). >> >> I will try to implement this. I can't say when, though. > > Thanks Felix. The good news is bind works for everything else I need. Very good. > I'll try to look at bind implementation. I must warn you - it is a mess. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] obscure error message after refactoring
From: Alan Post Subject: [Chicken-users] obscure error message after refactoring Date: Thu, 20 Jan 2011 06:58:27 -0700 > > I don't have an explicit call to caddr anywhere in my code, and I > believe the following line: > > (##core#set! genturfahi-version "trunk") > > Refers to the last line in the last file of my library. > > I've been looking over diffs trying to see if I've introduced a > subtle scope or syntax error somewhere, but I'm not having much > luck. > > What do I do with an error message like the one above? It isn't > obvious to me where I need to look to fix the problem. > This is an expansion error in a macro, or it's an internal compiler error. The code runs correctly when interpreted? cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] obscure error message after refactoring
* Alan Post [110120 14:59]: > I've been looking over diffs trying to see if I've introduced a > subtle scope or syntax error somewhere, but I'm not having much > luck. > > What do I do with an error message like the one above? It isn't > obvious to me where I need to look to fix the problem. First of all try to increase the call-chain size with -:aN where N is the number of entries. Then it also might be that the error occurs after your stuff has been expanded by syntax. So have a look at the continuation of all this code. It may give some hints. I hope you can identify the culprit soon. Good luck hunting, Christian ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] invalid typedef syntax using bind
2011/1/20 Felix : > Yes, bind doesn't handle this (common) form of typedef yet, > due to obscure technical details of the C parser (Christian > Kellermann pointed this problem out earlier). > > I will try to implement this. I can't say when, though. Thanks Felix. The good news is bind works for everything else I need. I'll try to look at bind implementation. All the best. -- Vilson Vieira vil...@void.cc ((( http://automata.cc ))) ((( http://musa.cc ))) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] obscure error message after refactoring
I've been refactoring the interface between 3 of the subsystems in my egg, genturfa'i. I've made a ton of changes to the code, and am at the point where I'm ready to compile everything and figure out what is broken. I run chicken-install -s, and as it tries to compile my library, gives me the following error: Error: (caddr) bad argument type: * Call history: (##core#begin (define genturfahi-version-major 0) (define genturfahi-version-minor 0) (define gentur.. (define genturfahi-version-major 0) (##core#set! genturfahi-version-major 0) (define genturfahi-version-minor 0) (##core#set! genturfahi-version-minor 0) (define genturfahi-version-patch 1) (##core#set! genturfahi-version-patch 1) (define genturfahi-version "trunk") (##core#set! genturfahi-version "trunk") (##core#undefined)<-- Error: shell command terminated with non-zero exit status 17920: /opt/chicken-master/bin/chicken chicken-ext.scm -output-file genturfahi.c -dynamic -feature chicken-compile-shared -feature compiling-extension -setup-mode -debug-level 2 -emit-import-library genturfahi I don't have an explicit call to caddr anywhere in my code, and I believe the following line: (##core#set! genturfahi-version "trunk") Refers to the last line in the last file of my library. I've been looking over diffs trying to see if I've introduced a subtle scope or syntax error somewhere, but I'm not having much luck. What do I do with an error message like the one above? It isn't obvious to me where I need to look to fix the problem. Thank you, -Alan -- .i ko djuno fi le do sevzi ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users