From metawilm at gmail.com Sat Mar 15 17:09:05 2008 From: metawilm at gmail.com (Willem Broekema) Date: Sat, 15 Mar 2008 18:09:05 +0100 Subject: [gecol-devel] Gecol 2.0 fixes for Allegro Message-ID: Hello, Being interested in contraint programming, I had a look at Gecode using Gecol. Having Lisp as interface language is great! Here are a few patches to make the code in the "gecol20" branch compile, and the examples work, in Allegro 8.1. - "allegro" fixes warnings for top-level export calls, and a symbol case issue in Allegro's Modern mode - "allegro_macosx" fixes the gcc options, to look for both :darwin and :macosx in *features* for dynamiclib. (Allegro only includes :macosx) - "gecol_space_calls" fixes compile errors in the ffi calls (taking Gecode release-2.1.1 as target), though not sure this is the best way to solve it (where should the matching delete's be?) This is the first time I'm sending Darcs patches, so let me know if there's anything not quite right. Cheers, - Willem -------------- next part -------------- A non-text attachment was scrubbed... Name: allegro_macosx.patch Type: text/x-patch Size: 715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gecol_space_calls.patch Type: text/x-patch Size: 1120 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: allegro.patch Type: text/x-patch Size: 949 bytes Desc: not available URL: From kilian.sprotte at googlemail.com Wed Mar 19 09:38:07 2008 From: kilian.sprotte at googlemail.com (Kilian Sprotte) Date: Wed, 19 Mar 2008 10:38:07 +0100 Subject: [gecol-devel] Gecol 2.0 fixes for Allegro In-Reply-To: References: Message-ID: <1d26dc7e0803190238h65d3e43m49fd3847108774fc@mail.gmail.com> Hi Willem, thank you very much for helping with Allegro and the newest GECODE version. All the patches arrived fine! I have now pushed them to gecol20 - but committed a small change afterwards... You made this change: hunk ./gecol.asd 64 - (let ((loader (intern "LOAD-FOREIGN-LIBRARY" :cffi))) + (let ((loader (intern '#:load-foreign-library :cffi))) } For instance SBCL would complain if the first arg of intern is not a string (and according to the spec it should not be anything else). As I dont have Allegro, what is the exact error message / problem here? Maybe we could use find-symbol with a better chance for all lisps? - For the moment, I have changed it back to a string, sorry. Then there were these questions: hunk ./glue.cpp 564 + // WB: delete opt? hunk ./glue.cpp 1450 - return set->variable(); + // WB: was: return set->variable(); + return set->var(); } Right now, I am a bit out of business with gecol, as I am currently not using it and working on other things. Maybe Mauricio can help with this? Thanks again for your help, best, Kilian On Sat, Mar 15, 2008 at 6:09 PM, Willem Broekema wrote: > Hello, > > Being interested in contraint programming, I had a look at Gecode > using Gecol. Having Lisp as interface language is great! > Here are a few patches to make the code in the "gecol20" branch > compile, and the examples work, in Allegro 8.1. > > - "allegro" fixes warnings for top-level export calls, and a symbol > case issue in Allegro's Modern mode > - "allegro_macosx" fixes the gcc options, to look for both :darwin > and :macosx in *features* for dynamiclib. (Allegro only includes > :macosx) > - "gecol_space_calls" fixes compile errors in the ffi calls (taking > Gecode release-2.1.1 as target), though not sure this is the best way > to solve it (where should the matching delete's be?) > > This is the first time I'm sending Darcs patches, so let me know if > there's anything not quite right. > > Cheers, > - Willem > > _______________________________________________ > gecol-devel mailing list > gecol-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/gecol-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mauriciotorob at gmail.com Wed Mar 19 11:54:10 2008 From: mauriciotorob at gmail.com (Mauricio Toro) Date: Wed, 19 Mar 2008 12:54:10 +0100 Subject: [gecol-devel] Welcome Willem Message-ID: Hello, I am taking care of Gecol these days. Since Kilian is working on something else. I guess the changes on the lisp files are fine. I am going to check the ones in the .cpp with more detail and I will tell you later. By the way, is great that you want to help. Right now, I have 2 things in mind: 1) Give support to the RegExp class and the DFA class from Gecode in Gecol. Probably making functions for all methods, because using Lisp classes can be messy. 2) Give more support to sets, I made some examples but I think it is required to make something like what it was done with with-var-args for intVarArrays in the setVarArrays. Please contact me if you want to colaborate with some of that. You can also contact the Gecode team if you have specific questions about Gecode, they are helping with us. Mauricio -- Mauricio Toro Bermudez Estudiante de Ingenier?a de Sistemas Pontificia Universidad Javeriana, Colombia Stagiare ? l'Ircam 1, place Igor-Stravinsky 75004 Paris, France de 2008 ? 2009 From metawilm at gmail.com Sat Mar 22 20:55:22 2008 From: metawilm at gmail.com (Willem Broekema) Date: Sat, 22 Mar 2008 21:55:22 +0100 Subject: [gecol-devel] Gecol 2.0 fixes for Allegro In-Reply-To: <1d26dc7e0803190238h65d3e43m49fd3847108774fc@mail.gmail.com> References: <1d26dc7e0803190238h65d3e43m49fd3847108774fc@mail.gmail.com> Message-ID: On Wed, Mar 19, 2008 at 10:38 AM, Kilian Sprotte wrote: > thank you very much for helping with Allegro and the newest GECODE version. > All the patches arrived fine! > I have now pushed them to gecol20 - but committed a small change > afterwards... > > You made this change: > > hunk ./gecol.asd 64 > - (let ((loader (intern "LOAD-FOREIGN-LIBRARY" :cffi))) > + (let ((loader (intern '#:load-foreign-library :cffi))) > } > > For instance SBCL would complain if the first arg of intern is not a string > (and according to the spec it should not be anything else). As I dont have > Allegro, what is the exact error message / problem here? The problem is that in a case-sensitive Lisp (Allegro's "Modern" mode), the symbol is exported by cffi as lowercase. (intern "LOAD-FOREIGN-LIBRARY" :cffi) creates a second, different symbol. To solve this, the argument to intern (or find-symbol) should be given in lowercase. Allegro happens to also accept symbols as argument to intern, so I was not notified of the mistake (it is controlled by the switch excl:*intern-allows-symbol*, by default true). Now I'd like to propose (intern (string '#:load-foreign-library) :cffi), to fix the case issue. Cheers, - Willem From kilian.sprotte at googlemail.com Mon Mar 24 19:04:27 2008 From: kilian.sprotte at googlemail.com (Kilian Sprotte) Date: Mon, 24 Mar 2008 20:04:27 +0100 Subject: [gecol-devel] Gecol 2.0 fixes for Allegro In-Reply-To: References: <1d26dc7e0803190238h65d3e43m49fd3847108774fc@mail.gmail.com> Message-ID: <1d26dc7e0803241204p24bc1354y3e726607d71b8312@mail.gmail.com> Hi Willem, > Now I'd like to propose (intern (string '#:load-foreign-library) > :cffi), to fix the case issue. ok, now I understand, why you are insisting to read a symbol. It's pushed now. Thanks! Kilian From mauriciotorob at gmail.com Tue Mar 25 17:08:13 2008 From: mauriciotorob at gmail.com (Mauricio Toro) Date: Tue, 25 Mar 2008 18:08:13 +0100 Subject: [gecol-devel] About Willem's changes Message-ID: Hello Willem, I could not compile the gecol package with the changes you have made. I am getting those gcc errors: - Options is not in the Search namespace. - var is not a member of VarSet Any clues why? -- Mauricio Toro Bermudez Estudiante de Ingenier?a de Sistemas Pontificia Universidad Javeriana, Colombia Stagiare ? l'Ircam 1, place Igor-Stravinsky 75004 Paris, France de 2008 ? 2009 From metawilm at gmail.com Tue Mar 25 17:50:28 2008 From: metawilm at gmail.com (Willem Broekema) Date: Tue, 25 Mar 2008 18:50:28 +0100 Subject: [gecol-devel] About Willem's changes In-Reply-To: References: Message-ID: Mauricio, On Tue, Mar 25, 2008 at 6:08 PM, Mauricio Toro wrote: > I could not compile the gecol package > with the changes you have made. > I am getting those gcc errors: > - Options is not in the Search namespace. > - var is not a member of VarSet > > Any clues why? Could the difference be the Gecode version with which you are interfacing? My changes made things work with release-2.1.1 (as I indicated in my message). - Willem