<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel">
    <title>gmane.lisp.alexandria.devel</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/538"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/537"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/536"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/535"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/533"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/532"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/531"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/530"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/529"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/528"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/527"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/526"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/525"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/524"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/523"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/522"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/521"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/520"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/519"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.alexandria.devel/518"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/538">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/538</link>
    <description>&lt;pre&gt;Apologies to Robert for stealing his thunder.
_______________________________________________
alexandria-devel mailing list
alexandria-devel&amp;lt; at &amp;gt;common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel
&lt;/pre&gt;</description>
    <dc:creator>James M. Lawrence</dc:creator>
    <dc:date>2013-02-27T02:10:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/537">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/537</link>
    <description>&lt;pre&gt;Looks good! Much cleaner/better.

-Robert

On Sun, Feb 24, 2013 at 6:30 AM, James M. Lawrence &amp;lt;llmjjmll&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-24T23:11:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/536">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/536</link>
    <description>&lt;pre&gt;
If striving for shortness:

(defun delete-from-plist (plist &amp;amp;rest keys)
  (dolist (key keys plist)
    (remf plist key)))

&lt;/pre&gt;</description>
    <dc:creator>Stas Boukarev</dc:creator>
    <dc:date>2013-02-24T16:03:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/535">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/535</link>
    <description>&lt;pre&gt;

I mention this for completeness and novelty, not for suitability:

  (defun sans (plist &amp;amp;rest keys)
    (let ((sans ()))
      (loop
        (let ((tail (nth-value 2 (get-properties plist keys))))
          ;; this is how it ends
          (unless tail
            (return (nreconc sans plist)))
          ;; copy all the unmatched keys
          (loop until (eq plist tail) do
                (push (pop plist) sans)
                (push (pop plist) sans))
          ;; skip the matched key
          (setq plist (cddr plist))))))

I don't think I've seen GET-PROPERTIES and NRECONC outside this
function.

I got it from here:
http://xach.com/naggum/articles/3247672165664225%40naggum.no.html

Zach
&lt;/pre&gt;</description>
    <dc:creator>Zach Beane</dc:creator>
    <dc:date>2013-02-24T15:56:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/533">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/533</link>
    <description>&lt;pre&gt;Fair enough, I feel sufficiently convinced.

If only we could construct NIL from a cons cell, eh?

Thanks,

Robert

On Sat, Feb 23, 2013 at 5:23 PM, Stas Boukarev &amp;lt;stassats&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-24T01:27:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/532">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/532</link>
    <description>&lt;pre&gt;
Well, those people should learn that it's not possible in
general. Particularly with lists, because of NIL.

What if the key you want to remove is NIL?

There's no other way to obtain the correct results otherwise. Having it
to work in 99% is worse than having it not to work at all, because
people might forget about the remaining 1% case more easily. So you end
up with doing extra work which has no use. The goal is simplicity, not
having to memorize in which cases it's alright and which it's not. Just
use the return value and be merry.

There's no trading, delete-from-plistf is just a define-modify-macro for
delete-from-plist.

&lt;/pre&gt;</description>
    <dc:creator>Stas Boukarev</dc:creator>
    <dc:date>2013-02-24T01:23:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/531">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/531</link>
    <description>&lt;pre&gt;
1. Because some people like or prefer to modify data structures
(especially when you have elaborate data structures), and not
bindings.

2. Having to prepend two NILs is fine I think. Yes it is hacky, but I
don't see any inherent issue with it. It just establishes a (few)
conses that act as the "head" or "entry point" to the list.


I suppose you're correct here. I was implicitly assuming that we would
want to never modify the CAR, but that is a sort of useless
assumption.


I don't think it's erroneous. We aren't conflating the ideas of
modifying a data structure and modifying a binding. By not doing that
extra mutation, we rely on the user to "finish the job" by re-setting
their variable to the new value.

The only thing "weird" about it is that there are a lot of Lisp
functions which don't "completely" mutate the data structure, and
expect the user to modify the binding. As far as I can tell, then, the
really only argument against such a thing is "that's not how other CL
functions work, so for consistenc&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-24T00:55:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/530">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/530</link>
    <description>&lt;pre&gt;
It's wrong because it's completely useless, why would anyone use
delete-from-plist without using the value returned by it, if the
original list it modifies has the wrong result? Having to prepend two
NILs is just bogus.

Although, that's not true that there's no way to have (:D 4), but the
problem just shifts to when it deletes everything and it's a NIL:

(unless (eq first plist)
  (psetf (car plist) (car first)
         (cdr plist) (cdr first)))

But that part shouldn't be in alexandria (or any sane library, for that
matter) either way, because it encourages erroneous usage, seemingly
doing the right thing, but breaks when it comes to returning NIL.

And there's alexandria:delete-from-plistf for people who are afraid of
an extra SETF.
&lt;/pre&gt;</description>
    <dc:creator>Stas Boukarev</dc:creator>
    <dc:date>2013-02-24T00:19:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/529">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/529</link>
    <description>&lt;pre&gt;How is (:A 1 :D 4) wrong? There is no way to get it to just (:D 4) via
mutation when passing to a function. If we want to have just (:D 4),
we will need to either pass in

(nil nil &amp;lt;plist&amp;gt;)

which will give

(nil nil :D 4)

or we will need to encapsulate or box the value before going in, by
using something like https://bitbucket.org/tarballs_are_good/cl-ref .

All in all, it still returns (:D 4), but it just modifies as much of
the list structure as it can.

-Robert

On Sat, Feb 23, 2013 at 11:53 AM, Stas Boukarev &amp;lt;stassats&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-23T21:55:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/528">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/528</link>
    <description>&lt;pre&gt;
I don't see how (:A 1 :D 4) is useful, it's less wrong, but it's still
wrong.

&lt;/pre&gt;</description>
    <dc:creator>Stas Boukarev</dc:creator>
    <dc:date>2013-02-23T19:53:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/527">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/527</link>
    <description>&lt;pre&gt;Good style remarks, I suppose, which I can change.

On Sat, Feb 23, 2013 at 8:08 AM, Stas Boukarev &amp;lt;stassats&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

The point of that was for more DWIMness.

Without it, we have:

CL-USER&amp;gt; (let ((x (list :a 1 :b 2 :c 3 :d 4)))
           (print (delete-from-plist x :a :b :c))
           x)

(:D 4)
(:A 1 :B 2 :C 3 :D 4)

And with it, we have:

CL-USER&amp;gt; (let ((x (list :a 1 :b 2 :c 3 :d 4)))
           (print (delete-from-plist x :a :b :c))
           x)

(:D 4)
(:A 1 :D 4)

If your typical mode of operation is to (setf x (delete-from...)),
then of course either are fine. If your goal is to use
DELETE-FROM-PLIST for its side effects, then I think the latter is
more useful. In fact, for really simple and efficient imperative
maintenance of a plist, just prepend (nil nil), and use the function
purely for mutation.

Cheers,

Robert
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-23T19:46:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/526">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/526</link>
    <description>&lt;pre&gt;
Alexandria is not using :keyword style for LOOP.
DO in loop has an implicit progn, no need for an explicit one.
unless (prog1 ... (assert)) can be better expressed as
do (assert)
unless ... return cons
and finally (return nil) is not needed.

And I don't quite understand the purpose of
(unless (eq first plist)
        (setf (cddr plist)
              first))
&lt;/pre&gt;</description>
    <dc:creator>Stas Boukarev</dc:creator>
    <dc:date>2013-02-23T16:08:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/525">
    <title>Re: flatten depth param</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/525</link>
    <description>&lt;pre&gt;I apologize all, I stupidly didn't realize that there was a patch
already written.

Well, it can't hurt to have another implementation to compare with, right? :)

Cheers,

Robert

On Sat, Feb 23, 2013 at 1:57 AM, Robert Smith &amp;lt;quad&amp;lt; at &amp;gt;symbo1ics.com&amp;gt; wrote:
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-23T10:02:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/524">
    <title>Re: flatten depth param</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/524</link>
    <description>&lt;pre&gt;Hello:

I've created a patch for this. The only difference is that instead of
flattening to a particular depth, it flattens by a particular number
of levels. I thought this was more in the spirit of FLATTEN. If we
want to flatten to a particular depth, it is a trivial computation.

I've attached a patch for the function, as well as tests.

Cheers,

Robert Smith

On Sat, Jan 26, 2013 at 6:12 AM, Nikodemus Siivola
&amp;lt;nikodemus&amp;lt; at &amp;gt;random-state.net&amp;gt; wrote:
_______________________________________________
alexandria-devel mailing list
alexandria-devel&amp;lt; at &amp;gt;common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-23T09:57:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/523">
    <title>Re: Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/523</link>
    <description>&lt;pre&gt;Attached is a proper patch.

-Robert

On Sat, Feb 23, 2013 at 1:09 AM, Robert Smith &amp;lt;quad&amp;lt; at &amp;gt;symbo1ics.com&amp;gt; wrote:
_______________________________________________
alexandria-devel mailing list
alexandria-devel&amp;lt; at &amp;gt;common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-23T09:15:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/522">
    <title>Implementation of DELETE-FROM-PLIST</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/522</link>
    <description>&lt;pre&gt;Hey:

Here's a destructive/non-consing version of DELETE-FROM-PLIST. I've
tested with (I think) all corner cases from the REPL, but I ought to
write tests proper.

The function is here http://tinyurl.com/adqkssu ;or the following huge
link, in case the last one is invalidated
https://bitbucket.org/tarballs_are_good/lisp-random/src/3db634111d35e788c6ea2f4a1b3ab38334e24cde/miscellaneous_exercises/delete-from-plist.lisp?at=default#cl-30
.

For simplicity or ease of review from an email client, I've pasted the
function at the end of this email.

Additionally, this function would make it pretty easy to write
DELETE-FROM-PLIST-IF{-NOT}, since the function to determine if a key
is bad is factored out. If one did write this function, then it would
be easy to define DELETE-FROM-PLIST in terms of it.

Let me know if there are any changes that should be made.

Cheers,

Robert Smith


;;;; from delete-from-plist.lisp

(defun delete-from-plist (plist &amp;amp;rest keys)
  "Delete all keys and pairs indicated by KEYS from the pli&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-02-23T09:09:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/521">
    <title>Bug in gaussian-random</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/521</link>
    <description>&lt;pre&gt;Hello,

Four months ago, I reported a bug in gaussian-random when either optional
parameter min or max is nil but not both are nil. The docstring has been
modified since then but the code is still the same and the bug remains. In
such a situation it is possible to enter an infinite loop.

This is easy to demonstrate by the call (gaussian-random 0 nil). You may
need to repeat the call a few times because the bug depends on the values
returned by the first call to the local function gauss.  An infinite loop
will occur if gauss returns a negative number.

I have attached a patch which fixes the bug.

Sincerely,

Andy Peterson
_______________________________________________
alexandria-devel mailing list
alexandria-devel&amp;lt; at &amp;gt;common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel
&lt;/pre&gt;</description>
    <dc:creator>Andy Peterson</dc:creator>
    <dc:date>2013-02-04T18:14:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/520">
    <title>Re: Add SUBDIVIDE to alexandria</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/520</link>
    <description>&lt;pre&gt;Hello,

I finally conjured up a patch for SUBDIVIDE. Feel free to edit it. I wasn't
sure if using CHECK-TYPE was preferred style. Anyway, have fun.

The patch also exports the symbol SUBDIVIDE and also includes a battery of
tests.

Cheers,

Robert Smith

On Sat, Jan 26, 2013 at 6:14 AM, Nikodemus Siivola &amp;lt;
nikodemus&amp;lt; at &amp;gt;random-state.net&amp;gt; wrote:

_______________________________________________
alexandria-devel mailing list
alexandria-devel&amp;lt; at &amp;gt;common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel
&lt;/pre&gt;</description>
    <dc:creator>Robert Smith</dc:creator>
    <dc:date>2013-01-29T05:37:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/519">
    <title>Re: [PATCH] Added Scheme's LET as LET&lt; at &gt;</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/519</link>
    <description>&lt;pre&gt;


Here's the thing: I think if you want to code Scheme style you should use
Scheme - or at least a library that tries to integrate schemey idioms into
CL. I do not believe Alexandria should try to incorporate scheme idioms -
not because they're bad, but because they're not CL idioms.

I find named-let mostly useful for quick initial ports of code written in
Scheme.




I don't really care if people think it a matter of taste or objective
truth. The fact remains that I'm opposed to single-character suffixes or
prefixes denoting variants of standard operators in general purpose
libraries. (I'm much more lenient about special purpose libs.)




Depends. Labels, do, dolist, do*, loop, tagbody, mutually recursive
toplevel defuns, dotimes, prog, y-combinator. Whatever seems most
appropriate for the task at hand.




&lt;/pre&gt;</description>
    <dc:creator>Nikodemus Siivola</dc:creator>
    <dc:date>2013-01-27T15:17:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/518">
    <title>Re: [PATCH] Added Scheme's LET as LET&lt; at &gt;</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/518</link>
    <description>&lt;pre&gt;Scribit Nikodemus Siivola dies 26/01/2013 hora 16:21:

The thing is, if you want to code with a scheme style, you'll use
named lets very often, so it ought to have a rather short name. Why
the issue with let&amp;lt; at &amp;gt;, for my curiosity's sake? (for me, &amp;lt; at &amp;gt; looks a lot
like a spiral or something like an ongoing loop)


Ever since I understood recursion, I've always found this way more
readable than anything else, to what would you usually rewrite a named
let?

Curiously,
Pierre
&lt;/pre&gt;</description>
    <dc:creator>Pierre Thierry</dc:creator>
    <dc:date>2013-01-27T14:25:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.alexandria.devel/517">
    <title>Re: More open development</title>
    <link>http://permalink.gmane.org/gmane.lisp.alexandria.devel/517</link>
    <description>&lt;pre&gt;Scribit Nikodemus Siivola dies 26/01/2013 hora 19:24:

Do you think that having an unstable-like (as in Debian) version of
alexandria where there are none of the alexandria rules would be
detrimental to alexandria?

Curiously,
Pierre
&lt;/pre&gt;</description>
    <dc:creator>Pierre Thierry</dc:creator>
    <dc:date>2013-01-26T18:39:33</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.lisp.alexandria.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.lisp.alexandria.devel</link>
  </textinput>
</rdf:RDF>
