From khaelin at gmail.com Sun Apr 24 22:19:43 2011 From: khaelin at gmail.com (Nicolas Martyanoff) Date: Mon, 25 Apr 2011 00:19:43 +0200 Subject: [postmodern-devel] patch for array slicing Message-ID: <87pqobthq8.fsf@gmail.com> Hi, I wrote a tiny patch to add support for array slicing: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-modify-to-allow-array-slicing.patch Type: text/x-patch Size: 2099 bytes Desc: array slicing patch URL: -------------- next part -------------- So now: (:[] #(1 2 4 8) 3) ? "(ARRAY[1,2,4,8])[3]" (:[] #(1 2 4 8) 2 4) ? "(ARRAY[1,2,4,8])[2:4]" I hope you will find it useful. Best regards, -- Nicolas Martyanoff http://codemore.org khaelin at gmail.com From khaelin at gmail.com Sun Apr 24 22:39:05 2011 From: khaelin at gmail.com (Nicolas Martyanoff) Date: Mon, 25 Apr 2011 00:39:05 +0200 Subject: [postmodern-devel] patch to make postmodern compile Message-ID: <87ipu3tgty.fsf@gmail.com> The last git version of postmodern doesn't compile on SBCL 1.0.47 because there are declaration order issues in postmodern/table.lisp. The following patch fixes these problems: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-fix-declaration-order-to-make-postmodern-compile.patch Type: text/x-patch Size: 3369 bytes Desc: compilation patch URL: -------------- next part -------------- Best regards, -- Nicolas Martyanoff http://codemore.org khaelin at gmail.com From xach at xach.com Sun Apr 24 23:04:09 2011 From: xach at xach.com (Zach Beane) Date: Sun, 24 Apr 2011 19:04:09 -0400 Subject: [postmodern-devel] patch to make postmodern compile In-Reply-To: <87ipu3tgty.fsf@gmail.com> (Nicolas Martyanoff's message of "Mon, 25 Apr 2011 00:39:05 +0200") References: <87ipu3tgty.fsf@gmail.com> Message-ID: <877hajl09i.fsf@hangup.portland.xach.com> Nicolas Martyanoff writes: > The last git version of postmodern doesn't compile on SBCL 1.0.47 > because there are declaration order issues in postmodern/table.lisp. I can't reproduce with 1.0.47.14 - is it just 1.0.47 that's affected? What error do you get? Zach From khaelin at gmail.com Sun Apr 24 23:13:01 2011 From: khaelin at gmail.com (Nicolas Martyanoff) Date: Mon, 25 Apr 2011 01:13:01 +0200 Subject: [postmodern-devel] patch to make postmodern compile In-Reply-To: <877hajl09i.fsf@hangup.portland.xach.com> (Zach Beane's message of "Sun, 24 Apr 2011 19:04:09 -0400") References: <87ipu3tgty.fsf@gmail.com> <877hajl09i.fsf@hangup.portland.xach.com> Message-ID: <87ei4rtf9e.fsf@gmail.com> Zach Beane writes: > Nicolas Martyanoff writes: > >> The last git version of postmodern doesn't compile on SBCL 1.0.47 >> because there are declaration order issues in postmodern/table.lisp. > > I can't reproduce with 1.0.47.14 - is it just 1.0.47 that's affected? > What error do you get? I feel kind of stupid, loading postmodern in a fresh sbcl yields no error, I must have fucked up something before. Sorry for the noise :( Regards, -- Nicolas Martyanoff http://codemore.org khaelin at gmail.com From khaelin at gmail.com Sun Apr 24 23:18:48 2011 From: khaelin at gmail.com (Nicolas Martyanoff) Date: Mon, 25 Apr 2011 01:18:48 +0200 Subject: [postmodern-devel] patch to make postmodern compile In-Reply-To: <877hajl09i.fsf@hangup.portland.xach.com> (Zach Beane's message of "Sun, 24 Apr 2011 19:04:09 -0400") References: <87ipu3tgty.fsf@gmail.com> <877hajl09i.fsf@hangup.portland.xach.com> Message-ID: <877hajtezr.fsf@gmail.com> Zach Beane writes: > Nicolas Martyanoff writes: > >> The last git version of postmodern doesn't compile on SBCL 1.0.47 >> because there are declaration order issues in postmodern/table.lisp. > > I can't reproduce with 1.0.47.14 - is it just 1.0.47 that's affected? > What error do you get? I'm obviously really tired? So: - Run sbcl 1.0.47. - Call (asdf:load-system :postmodern) - Get the following error: Class not yet defined: EFFECTIVE-COLUMN-SLOT I really need to get some sleep? Best regards, -- Nicolas Martyanoff http://codemore.org khaelin at gmail.com From khaelin at gmail.com Sun Apr 24 23:58:53 2011 From: khaelin at gmail.com (Nicolas Martyanoff) Date: Mon, 25 Apr 2011 01:58:53 +0200 Subject: [postmodern-devel] bug in the array interpreter Message-ID: <8739l7td4y.fsf@gmail.com> I think I found a pretty nasty bug; the array parser loop foreven on empty arrays, eating all the RAM it can. Triggering it is really simple, just select an empty array. The effect is directly visible with: (funcall (cl-postgres::read-array-value #'parse-integer) "{}") I think there's something wrong in the following sexp in READ-ARRAY-VALUE: (loop :for x := arr :then (car x) :while (listp x) :collect (length x)) If ARR is nil, it loops forever since both (listp nil) and (car nil) yield t. I'm not sure I understand how the code works for multi-dimensional arrays, so I'd prefer not to break something trying a fix; would you mind fix it ? Thank you. Best regards, -- Nicolas Martyanoff http://codemore.org khaelin at gmail.com From marijnh at gmail.com Mon Apr 25 06:09:44 2011 From: marijnh at gmail.com (Marijn Haverbeke) Date: Mon, 25 Apr 2011 08:09:44 +0200 Subject: [postmodern-devel] bug in the array interpreter In-Reply-To: <8739l7td4y.fsf@gmail.com> References: <8739l7td4y.fsf@gmail.com> Message-ID: Thanks for the report. This was a bug in the dimension-counting code. I've pushed a fix. Best, Marijn From marijnh at gmail.com Mon Apr 25 06:11:26 2011 From: marijnh at gmail.com (Marijn Haverbeke) Date: Mon, 25 Apr 2011 08:11:26 +0200 Subject: [postmodern-devel] patch for array slicing In-Reply-To: <87pqobthq8.fsf@gmail.com> References: <87pqobthq8.fsf@gmail.com> Message-ID: Thanks, looks good. Applied. Best, Marijn From marijnh at gmail.com Mon Apr 25 06:12:58 2011 From: marijnh at gmail.com (Marijn Haverbeke) Date: Mon, 25 Apr 2011 08:12:58 +0200 Subject: [postmodern-devel] patch to make postmodern compile In-Reply-To: <877hajtezr.fsf@gmail.com> References: <87ipu3tgty.fsf@gmail.com> <877hajl09i.fsf@hangup.portland.xach.com> <877hajtezr.fsf@gmail.com> Message-ID: Hi Nicolas, I'm not getting this error on SBCL 1.0.47, and in fact it would be quite strange for a CL not to accept forward uses of classes. Best, Marijn