> +(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
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
> 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.
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
> 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
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–)
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
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
> 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.
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
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
> 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
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)
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
> 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
> [..
> 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
> 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
> 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
> 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
> 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
> 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
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
___
> 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
_
> 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
>> 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
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
> (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
> 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
_
> (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
> 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
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
>> 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
>>
>> 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 :
> 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
>> 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
> 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
>> 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
> 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
> 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. 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
> 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
>> 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
> 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
> 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
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
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
> 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
> 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
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
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
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
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
> 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
> 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
>> 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
> 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
> > 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.
> > 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
> > 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
> > 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
> 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
pushed, thanks!
--
attila
___
alexandria-devel mailing list
alexandria-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel
> > 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
> 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
> 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
> 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
> 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
> 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
> 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
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
> 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
> 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
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.
> 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
> 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
> (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
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
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
> 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
> 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
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
> 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
82 matches
Mail list logo