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 experienc

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 of it is that if it is

Re: [Alexandria-devel] add COPY-STREAM-CONTENT-INTO-{STRING, BYTE-VECTOR}?

2017-08-14 Thread Attila Lendvai
> FYI, i'm planning to push a fresh version of this. whoever doesn't > want that to happen, please speak up! FTR, this has been pushed meanwhile.

Re: Alexandria version in ASD file

2017-08-14 Thread Attila Lendvai
nickname. i'm not sure what exactly was the plan, and whether it's written up somewhere, so i'll not jump into just overwriting the :version field in the .asd. is there anyone who remembers/knows? if not, then any suggestions what the next version should be in the .asd, and what

Re: Wrong handling of duplicate keys in alist-hash-table and plist-hash-table

2017-04-10 Thread Attila Lendvai
> apparently for association lists, it is possible to have 'new' entries in > front of the list 'shadow' old entries. i pushed a fix for this, thanks! -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “Somewhere in every process of taxation, a pistol is involved.” — Jim Rogers

Re: [PATCH] Add PARTIAL-APPLY and REVERSE-PARTIAL-APPLY as aliases for CURRY and RCURRY, respectively

2017-01-25 Thread Attila Lendvai
i like the idea of these aliases... if nobody opposes, i'll apply this eventually. -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “That which can be asserted without evidence, can be dismissed without evidence.” — Christopher Hitchens (1949–)

Re: [PATCH] Fix typos in XOR docstring and WITH-{INPUT-FROM, OUTPUT-TO}-FILE error messages

2016-11-22 Thread Attila Lendvai
pushed, thanks! -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “Forget conventionalisms; forget what the world thinks of you stepping out of your place; think your best thoughts, speak your best words, work your best works, looking to your own conscience for approval.” — Susan B

Re: [Alexandria-devel] add COPY-STREAM-CONTENT-INTO-{STRING, BYTE-VECTOR}?

2016-04-02 Thread Attila Lendvai
e go there) -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “You must understand the whole of life, not just one little part of it. That is why you must read, that is why you must look at the skies, that is why you must sing, and dance, and write poems, and suffer, and understand, for all th

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] [PATCH] Fix default ARRAY-INDEX and ARRAY-LENGTH.

2014-07-30 Thread Attila Lendvai
On Fri, Jul 25, 2014 at 5:51 PM, James M. Lawrence wrote: > ARRAY-DIMENSION-LIMIT is an exclusive upper bound. > --- > types.lisp |8 > 1 file changed, 4 insertions(+), 4 deletions(-) pushed, thanks! -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “The kin

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

2014-07-30 Thread Attila Lendvai
once again blindly beliving the patch author). but this time i also pushed a test at lest that tests for the removal of duplicate keys. sorry for blindly pushing the previous change. -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “Disregard for the preferences and interests of indivi

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 fi

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] Bug in gaussian-random

2014-02-15 Thread Attila Lendvai
oop. pushed (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 a

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] 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 thos

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

2012-04-08 Thread Attila Lendvai
> PROG1-LET is a binding macro modeled closely after WHEN-LET and my 0.02: i don't like prog1-let, because it's not substantially shorter than the alternatives, not a very regular pattern in my experience, makes code less readable in cases where a simple aprog1 is not desirable, and it adds quite

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 alexa

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

Re: [alexandria-devel] Add mkstr and simplify of 'symbolicate

2011-10-30 Thread Attila Lendvai
> I'm not fond of the name "strcat", but come to think of > it, I'm not fond of "mkstr" either -- they're more in a C naming > tradition. I don't have a good suggestion for a name though. +1 --  attila Notice the erosion of your (digital) freedom, and do something about it! PGP: 2FA1 A9DC 9C1E

Re: [alexandria-devel] Subfactorial is wrong starting from 11

2011-01-28 Thread Attila Lendvai
> Will this be fixed in the library repository? eventually for sure. i personally have starred the mail with the fix, but as i have no clue about subfactorial, i'm waiting for at least an amen from someone else before i push it. a random uninformed doubt: the new version seems to be twice as slo

Re: [alexandria-devel] Compilation failure

2010-06-02 Thread Attila Lendvai
i'm not sure it's related, but this change is missing from the git repo (or maybe i didn't push it or too late to the darcs repo): -#-sbcl(simple-error reader-error) +#-sbcl(reader-error simple-error) but it's only on #-sbcl, so... -- attila ___

Re: [alexandria-devel] Review cycle 2: SWITCH, ESCWITCH, and CSWITCH

2010-04-07 Thread Attila Lendvai
> Yes, there, are. Not many that I know of, but a couple. (This does > matter in this discussion some, but not very much, really.) +1 i personally used it in a couple of scattered places, but clear design is worth incomparably more than backwards compatibility. -- attila _

Re: [alexandria-devel] Alexandria in git?

2010-03-04 Thread Attila Lendvai
> I personally find git *much* more convenient to work with -- but this > is very likely just due to knowing it far better than Darcs. after getting a reasonably proficiency with git, i still prefer darcs, especially its ability to easily pull patches out of order. as we are running several insta

Re: [alexandria-devel] Maintenance

2010-03-03 Thread Attila Lendvai
>> a portable installer that can automatically check out and update >> source repositories would help a lot though! but that's a different >> story... > > What does "portable" mean?  Between Lisps or between OSes? portable between lisps. i can very well live without integration with the OS packa

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 th

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] conjoin bug fix

2009-11-02 Thread Attila Lendvai
> here is a new darcs patch that adds tests for all of DISJOIN, CONJOIN, > COMPOSE and MULTIPLE-VALUE-COMPOSE. > > It also includes the fix for CONJOIN from my last patch (which is now > obsolete). pushed, thanks! (also for Tobias for the audit) -- attila _

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 o

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

[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) rel

Re: [alexandria-devel] XCVB patch for Alexandria

2009-10-16 Thread Attila Lendvai
>> why is this eval-when needed? extract-function-name is not used >> anywhere in that file... >> >> or does xcvb need everything to be also eval-when'd at >> :compile-toplevel which is used at compile time (e.g. in a macro body) >> in any other file that depends on it? that sounds like a strong >>

Re: [alexandria-devel] XCVB patch for Alexandria

2009-10-09 Thread Attila Lendvai
>> Here's what I need to get Alexandria to compile under XCVB. if there's no objection against this patch, i'll eventually apply it. although, i myself have some questions: why is this eval-when needed? extract-function-name is not used anywhere in that file... +(eval-when (:compile-toplevel :

Re: [alexandria-devel] inline

2009-10-09 Thread Attila Lendvai
> Here's my patch to get alexandria to compile under CCL 12799 from > branch working-0711 without any nasty warning about not being able to > inline a forward reference. pushed, thanks! -- attila ___ alexandria-devel mailing list alexandria-devel@com

Re: [alexandria-devel] darcs patch: Add #.#+ readtime conditional functions.

2009-10-02 Thread Attila Lendvai
>>     Mon Oct 16 10:00:31 CEST 2006  ...@boinkor.net >>       * Add #.#+ readtime conditional functions. >> >>        * This adds functions that can be used in #+#. readtime conditionals, >> for example: >>          #+#.(alexandria:read-if (find-package :asdf-install)) :yay >>          #+#.(alexa

Re: [alexandria-devel] median function

2009-09-16 Thread Attila Lendvai
> If you want this: > > CL-USER> (float (alexandria:median '(1 2 3 4))) > 2.5 > > CL-USER> (alexandria:median '(100 0 99 1 98 2 97 96)) > 193/2 > > > Then you need this patch (the test is also wrong): pushed, thanks! -- attila ___ alexandria-devel m

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 se

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

2009-06-08 Thread Attila Lendvai
> I find them too long. Long names can distract from the intent of the > actual code. They're supposed to merely combine domain-level logic, but > being long they make the impression they're more than that. if i see PAPPLY (or any other abbreviated name for that matter), my brain first maps it to

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

2009-06-07 Thread Attila Lendvai
> Names partial-apply and partial-reverse-apply would be my preferred when looking at the issue with a clean mind, without having read any papers about currying (there are newborns every day!), the long versions of the proposed names are much more intuitive. just one more 0.02, -- attila

Re: [alexandria-devel] ensure-functionf

2008-12-09 Thread Attila Lendvai
> Re. CALLF: I'll think about it properly sometime during next week. (I > am torn about it: half the time I can't remember why I like it, and > half the time I can't remember why I *don't* like it.) i'm also torn about it, but after re-reading the thread i think the consensus leans towards that en

Re: [alexandria-devel] COPY-FILE conflict.

2008-11-23 Thread Attila Lendvai
> WITH-INPUT-FROM-FILE, WITH-OUTPUT-TO-FILE: don't like. :DIRECTION > :INPUT / :OUTPUT is just as good, saved keypresses not worth the > opacity. (This is something a lot of people end up macroexpanding, I > think, because it is not obvious that there isn't additional magic > going on.) fwiw, sin

Re: [alexandria-devel] COPY-FILE conflict.

2008-11-22 Thread Attila Lendvai
>> it appears that since June Alexandria exports COPY-FILE, >> as well as a bunch of other file-related primitives. >> >> Is the resulting loss of simultaneous :use-ability of cl-fad and alexandria >> being regarded as something undesirable by the project maintainers? i have a lot of :shadowing-i

Re: [alexandria-devel] ensure-functionf

2008-11-17 Thread Attila Lendvai
> I did not understand how you plan to use this macro. Maybe there is a > reason you made it a macro, and not a function. > Can you explain? the typical use-case is a mapping function that accepts various function designators like &key (test 'eq) (key 'identity). if it loops a lot and it's suppos

Re: [alexandria-devel] ensure-functionf

2008-11-16 Thread Attila Lendvai
> Shouldn't you be using define-modify-macro and/or setf-macro-expander for > that? > > e.g. > (define-macro-expander ensure-functionf/1 (x) ensure-function) > (defmacro ensure-functionf (&rest places) > `(progn ,@(mapcar (lambda (x) `(ensure-functionf/1 ,x) good point! so, i'll push this e

[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

[alexandria-devel] io.lisp platform dependance

2008-06-23 Thread Attila Lendvai
hi! io.lisp has some problems with regards to external-format, and i don't really know how to fix this. for now it only works on lisps that understand :exernal-format :default. the problem is that the external-format keyword arg is platform dependent, and so is its default value. we could add ton

Re: [alexandria-devel] Re: Review cycle 2: SWITCH, ESCWITCH, and CSWITCH

2008-06-07 Thread Attila Lendvai
> Documentation is insufficient: I don't see how someone can *know* how > to use these from just reading the docstrings. That is easy to fix, > however. my opinion is so different than the consensus, that it probably doesn't matter much in this respect... but i'd rather spend the same time on w

Re: [alexandria-devel] symbolicate

2008-06-05 Thread Attila Lendvai
> FWIW, I think FORMAT-SYMBOL is almost always preferable, but I admit > SYMBOLICATE is a classic of sorts. for the record, cffi is full of these: (symbolicate '#:foo- name '#:-bar) which looks like this using format-symbol: (format-symbol t "~A-~A-~A" '#:foo name '#:bar) which is much more v

[alexandria-devel] symbolicate

2008-06-04 Thread Attila Lendvai
hi, fyi, i've pushed symbolicate. irc rumour has it, that Nikodemus was pretty favorable to adding it... so, i hope it won't initiate a veto fury... :) it seemed to be the most forward looking way to fix cffi-grovel. -- attila ___ alexandria-devel m

[alexandria-devel] approval request

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 publically? thanks in advance, - alexandria developer team ___ alexandria-devel mailing list a

[alexandria-devel] approval request

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? thanks is advance, - alexandria developer team ___ alexandria-devel mailing list alex

[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 maili

Re: [alexandria-devel] Pending patches

2008-06-01 Thread Attila Lendvai
> There are still several patches pending in my repository: > > http://common-lisp.net/~trittweiler/darcs/alexandria/ i've pushed the ones that i felt are not up for debate. i leave the rest to be pushed by someone else... :) thanks! -- attila ___ a

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 short

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

2008-05-27 Thread Attila Lendvai
>> then i thought of turning length= into a function that takes &rest >> arguments and each argument can be either an integer or a sequence. >> you can find the current implementation at the end of the mail, but >> i'm not sure vetoers will like it... it's somewhat dwim-ish in that it >> accep

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

2008-04-03 Thread Attila Lendvai
> then i thought of turning length= into a function that takes &rest > arguments and each argument can be either an integer or a sequence. > you can find the current implementation at the end of the mail, but > i'm not sure vetoers will like it... it's somewhat dwim-ish in that it > accepts bo

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 http://common-lisp.

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: [PATCH] COPY-HASH-TABLE

2008-03-14 Thread Attila Lendvai
> > Also, I find :copy-fn ugly in comparison to :key, but YMMV. > > I personally do not care much. Attached is a patch that calls it :KEY. pushed, thanks! -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lis

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

2008-03-14 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. > > It's not a question of length of plists, but of number of plists. It's a > FIXME. i've pushed the second variant and kept the FIXME. thanks, -- att

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... :) > (def

Re: [alexandria-devel] [PATCH] fix docstring typos in numbers.lisp

2008-03-11 Thread Attila Lendvai
pushed, thanks! -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel

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 lit

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 alexand

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

2008-03-09 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. -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lisp.net/cgi-bi

Re: [alexandria-devel] [PATCH] remove-from-plistf

2008-03-08 Thread Attila Lendvai
> remove-from-plistf is show as having arglist (at least with SBCL, > similarly with OpenMCL): > (remove-from-plistf place plist &rest keys) > > which is wrong. Attached patch fixes it. pushed, thanks! -- attila ___ alexandria-devel mailing li

Re: [alexandria-devel] [PATCH] fix featurep

2008-03-01 Thread Attila Lendvai
> The attached patch makes FEATUREP accept any compound test specifier, > not just the keywords :AND, :OR and :NOT . pushed, thanks! -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/l

Re: [alexandria-devel] cdr 5

2008-03-01 Thread Attila Lendvai
> Fine with me, though note that the definition for ARRAY-INDEX given in CDR 5 > is bogus -- ARRAY-TOTAL-SIZE is wrong. > > (And I kind of prefer our old definition otherwise as well.) i've pushed an almost complete cdr5 implementation. i've tried to check it properly but it's lacking a complet

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 le

[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. -- attila

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

2008-02-22 Thread Attila Lendvai
> Ditch SEQUENCE-OF-LENGTH-P alltogether. It's an absurdily long name for > something conceptually simple. it's optimized for lists -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/l

Re: [alexandria-devel] length=1

2008-02-22 Thread Attila Lendvai
> On Feb 22, 2008, at 12:30, Nikodemus Siivola wrote: > > How about LENGTH= ? > > > > ;; stupid version > > (defun length= (n seq) > > (= n (length seq))) > > I think the idea is to have something you can use as an argument to > functions like find-if. My own solution when I wanted that wa

[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.

Re: [alexandria-devel] [PATCH] fix generate-switch-body

2008-02-09 Thread Attila Lendvai
> The attached patch makes GENERATE-SWITCH-BODY extract the function name > of KEY too, not just TEST. pushed, thanks! -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/alexand

Re: [alexandria-devel] format-mixed-radix-number, format-duration

2008-01-25 Thread Attila Lendvai
> wonder whether the functions below are candidates for alexandria: > > ;;; Examples > (format-duration nil 86401.5) => "1d0h0m1.50s" > > (format-duration nil 86401 :format '(" ~,2F second~:P" " ~D > minute~:P" " ~D hour~:P" " ~D day~:P")) => " 1 day 0 hours 0 minutes > 1.00 second" imho, such fun

Re: [alexandria-devel] MAYBECALL

2008-01-17 Thread Attila Lendvai
> (maybecall (not (listp thing)) #'list thing) == (ensure-list thing) i don't see in which aspect it is better than writing (unless (listp thing) (list thing)) note that the rationale for ensure-list is that it's actually a bit shorter and also encodes the intention in a way that is much eas

[alexandria-devel] remove-from-plist argument order

2007-12-19 Thread Attila Lendvai
hi, Nikodemus, i've seen your comment regarding r-f-p. i have more or less copied r-f-p from arnesi and unfortunately didn't give it enough thoughts and therefore the current argument order just a heritage. the (r-f-p plist &rest keys) signature looks much better and performance can be have throu

[alexandria-devel] starts-with and starts-with-subseq argument order

2007-11-26 Thread Attila Lendvai
dear list, i've made a silly mistake and defined starts-with-subseq so that the order or the arguments is the opposite of starts-with: (defun starts-with (object sequence &key (test #'eql) (key #'identity)) (defun ends-with-subseq (sequence suffix &key (test #'eql)) i will correct this mistake i

Re: [alexandria-devel] a few changes

2007-10-15 Thread Attila Lendvai
> i've pushed the non-controversial patches, see below for details. fyi, without much disagreement, i've pushed the rest of the patches. -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailma

Re: [alexandria-devel] a few changes

2007-10-02 Thread Attila Lendvai
> I'm not sure what you find confusing: can you give a short example. I > think I'm fine with both. you must keep in mind that the result is stored in the first argument, even though concatenation can easily be visualized. this, with a little sloppyness, can easily lead to a refactoring that tran

Re: [alexandria-devel] a few changes

2007-10-01 Thread Attila Lendvai
On 9/27/07, Stelian Ionescu <[EMAIL PROTECTED]> wrote: > please pull from http://common-lisp.net/~loliveira/darcs/alexandria , > the repository contains a few changes made by Luis during the last > SoC. there a re a few conflicts which I tried to resolv here: > http://common-lisp.net/~sionescu/darc

Re: [alexandria-devel] Alexandria no longer exports SANS.

2007-09-24 Thread Attila Lendvai
> Why doesn't alexandria export SANS any more? some of us thought that sans is a too generic name, see alexandria:remove-from-plist and friends. -- attila ___ alexandria-devel mailing list alexandria-devel@common-lisp.net http://common-lisp.net/cgi-bi