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.
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.
--
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
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
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
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
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:
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
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
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
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
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
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)
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
(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
(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
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
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)))
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
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
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
[...]
(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
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)
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
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.
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
> +(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
27 matches
Mail list logo