[alexandria-devel] length=1

2008-02-22 Thread Attila Lendvai
dear list, is there any objections against this? (declaim (inline length=1)) (defun length=1 (sequence) (if (listp sequence) (and sequence (null (rest sequence))) (= 1 (length sequence in optimized code, where type information is available, it drops the type check.

[alexandria-devel] cdr 5

2008-02-28 Thread Attila Lendvai
dear list, any objections against adding the types listed in cdr 5 to alexandria? it already has array-index and the rest seems useful, too. http://cdr.eurolisp.org/document/5/extra-num-types.html if noone does that before me and there's no objection either, i'll push it eventually. --

Re: [alexandria-devel] Re: length=1

2008-03-01 Thread Attila Lendvai
Exporting LENGTH=1 and LENGTH=2 may be debateable, the only use case is the one Andreas Fuchs mentioned, i.e. as arguments to FIND-IF c. i've got this recorded and ready to be pushed. unless soemone has additional comments, i'll push it eventually. (note: i've not included the debatable

Re: [alexandria-devel] [PATCH] DEFINE-CONSTANT

2008-03-10 Thread Attila Lendvai
Anyway, my patch moves most of the macroexpansion of DEFINE-CONSTANT to its own function which is prettier anyway. This also makes the warnings go away. pushed a patch based on this, thanks. -- attila ___ alexandria-devel mailing list

Re: [alexandria-devel] Re: length=1

2008-03-10 Thread Attila Lendvai
i've got this recorded and ready to be pushed. unless soemone has additional comments, i'll push it eventually. ok, seems like i wasn't really that happy with it after all. i almost pushed it when i tried to use it in a situation where the sequence argument was a bigger form and the

Re: [alexandria-devel] remove-from-plist

2008-03-11 Thread Attila Lendvai
I would also remove the FIXME, on grounds that if plists are long enough for that to matter, one shouldn't be using them anyway. i'll remove the FIXME, but sticking to my conventions, i'll leave the (searchable) comment there if somebody is bored and looking for things to do... :) (defun

Re: [alexandria-devel] UNWIND-PROTECT-CASE

2008-03-14 Thread Attila Lendvai
UNWIND-PROTECT-CASE can be used to conveniently control on what circumstances cleanup operations are supposed to be performed. +1 from me. i'd be happy to push this, but imho the extra argument is unnecessary. i understand that it is a tiny bit more flexible in rare situations like:

Re: [alexandria-devel] Re: UNWIND-PROTECT-CASE

2008-03-27 Thread Attila Lendvai
I actually consider it to be a feature because it's easier to distinguish these two syntactically. Makes sense to me, +1! pushed, thanks! -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net

Re: [alexandria-devel] Re: Review cycle 1: binding constructs

2008-05-31 Thread Attila Lendvai
In my experience short-circuiting is what you actually need far more often. my 0.02 about short-circuiting: when using a conditional form (like when-let), people should be prepared for some of their code not being evaluated. and you should try to stay sideffect-free anyway, so i vote for

[alexandria-devel] request for using your code in alexandria

2008-06-03 Thread Attila Lendvai
hi Marco, we would like to copy and/or modify some of your work you have done in Arnesi and add it to Alexandria. if you approve it, could you please answer publicly to the list? thanks in advance, - alexandria developer team ___ alexandria-devel

[alexandria-devel] ensure-functionf

2008-11-16 Thread Attila Lendvai
dear list, i've got this patch pending: (defmacro ensure-functionf (rest places) Call ENSURE-FUNCTION for each place in PLACES and store back the results. `(progn ,@(mapcar (lambda (place) `(setf ,place (ensure-function ,place))) places))) it might be

Re: [alexandria-devel] curry and rcurry - papply and rpapply?

2009-08-06 Thread Attila Lendvai
Alright, but don't you agree that partial-apply and esp. reverse-partial-apply are names that are too long for such a basic function? No. Clarity is far more important than being terse: they are no slower to read, and meaning is that much more immediately obvious. Note if people second the

[alexandria-devel] eval-always, defun-always, etc...

2009-10-16 Thread Attila Lendvai
dear list, i know that this is a subject that has strong feelings attached to, but with recent developments in XCVB the need for (eval-when (:compile-toplevel :load-toplevel :execute) ...) has rose, and seeing numerous eval-when noise in the code is potentially annoying. related material: a)

Re: [alexandria-devel] eval-always, defun-always, etc...

2009-10-16 Thread Attila Lendvai
Don't add any of these kludges, and instead reorganize code such that EVAL-WHEN is not sprinkled throughout the code. IOW, you propose that the current way of categorizing definitions into separate files should be changed so that it is based on evaluation stages. this is certainly a cleaner

Re: [alexandria-devel] eval-always, defun-always, etc...

2009-10-28 Thread Attila Lendvai
(I do agree foo-syntax.lisp and foo.lisp (or early-foo.lisp and foo.lisp -- whatever) style has much to recommend itself.) ok, i seem to read out an agreement from the last few mails... so, how about this: - where required, split files to foo.lisp, foo-early.lisp and use :compile-depends

Re: [alexandria-devel] cdr assoc (now called alist-get)

2009-11-25 Thread Attila Lendvai
(If alexandria wakes up then I have a patch to fix some other stuff too.) it's awake, but things here work based on consensus, so no one is hasty of pushing new stuff. so, please do send whatever you have! i, and many others, mark mails with pending patches and eventually get to it. as of this

Re: [alexandria-devel] Maintenance

2010-03-03 Thread Attila Lendvai
i'm not happy with the current situation (no one-click installation of lisp libraries), but i don't think bundling alexandria, or other libraries would help much on the situation. a portable installer that can automatically check out and update source repositories would help a lot though! but

Re: [alexandria-devel] PARSE-BODY printing its argument

2012-03-02 Thread Attila Lendvai
SBCL: * (parse-body '((declare (optimize speed)) (+ x y))) (DECLARE (OPTIMIZE SPEED)) (+ X Y) ((+ X Y)) ((DECLARE (OPTIMIZE SPEED))) NIL FYI, can't reproduce on alexandria head: CL-USER (alexandria:parse-body '((declare (optimize speed)) (+ x y))) ((+ X Y)) ((DECLARE (OPTIMIZE SPEED)))

Re: [alexandria-devel] ALEXANDRIA:COPY-STREAM broken

2012-03-07 Thread Attila Lendvai
ALEXANDRIA:COPY-STREAM currently calls ( start end) even when END is NIL. This breaks COPY-FILE unconditionally and COPY-STREAM whenever END (or, less likely, START) is NIL. for the record, it's fixed now. and also for the record, there's no consensus in keeping the entire io.lisp in

Re: [alexandria-devel] Reminder alexandria:curry is not currying

2012-04-12 Thread Attila Lendvai
Unfortunately, the wrong usage of the term curry has been going on in the Common Lisp world for years now, and many people have moved over to using Alexandria's CURRY and RCURRY instead of the versions in their private library.  At this point, it would be really upsetting to remove those

Re: [alexandria-devel] [PATCH] PROG1-LET

2012-04-12 Thread Attila Lendvai
Certainly. I've been experimenting with a compiler backed by LLVM, and using its IR builder, I often wish to create a function, define its body, then return the function. This usually takes the form of: (prog1-let (func (llvm:add-function ...))  (setf (llvm:linkage func) :internal [...]

Re: [alexandria-devel] Bug in gaussian-random

2014-02-15 Thread Attila Lendvai
(with some whitespace changes), and committed a test also that demonstrates the failure. http://common-lisp.net/gitweb?p=projects/alexandria/alexandria.git;a=summary thanks, and sorry for the delay! -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “It's better to walk alone, than with a crowd

Re: [alexandria-devel] Implementation of DELETE-FROM-PLIST

2014-03-03 Thread Attila Lendvai
pushed, thanks! and sorry for the delay! -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “It ain’t what you don’t know that gets you in trouble. It’s what you know for sure that ain’t so.” — Mark Twain (1835–1910)

Re: [Alexandria-devel] BISECT-BIG in %MULTIPLY-RANGE is never called

2014-05-11 Thread Attila Lendvai
attached patch does that and adds a test pushed, thanks! -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “To put the world in order, we must first put the nation in order; to put the nation in order, we must first put the family in order; to put the family in order; we must first

Re: [PATCH] Fix for ensure-gethash macro

2015-04-27 Thread Attila Lendvai
Updated patch is attached. thanks! pushed. -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- It is better to keep your mouth shut and be thought a fool, than to open it and remove all doubt.

Re: [alexandria-devel] latest alexandria doesn't build on ECL due to non-standard LOOP

2018-01-18 Thread Attila Lendvai
FTR, this has been fixed by: https://gitlab.common-lisp.net/alexandria/alexandria/commit/49555427d8019a56132def9a4440663c66339131 -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “If a nation values anything more than freedom, it will lose its freedom; and the irony

Re: [PATCH] alexandria-1/io.lisp: (read-stream-content-into-string): fix recent regression

2022-08-21 Thread Attila Lendvai
> +(unless (subtypep element-type 'character) > + (setq element-type 'character)) just a quick note: SUBTYPEP calls can be *very* costly. -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “We do not learn from experience… we learn from reflecting on experience.” — John