 21 Aug, 2020 2 commits


Philipp Marek authored
A purely cosmetic issue.

Philipp Marek authored

 06 Jul, 2020 1 commit


Philipp Marek authored

 17 Jun, 2020 1 commit


Philipp Marek authored
Should fix #16.

 31 Mar, 2020 3 commits


Philipp Marek authored

Philipp Marek authored

Philipp Marek authored

 27 Mar, 2020 4 commits


Philipp Marek authored

Philipp Marek authored
That way the function definition order doesn't matter.

Philipp Marek authored

Philipp Marek authored

 25 Mar, 2020 3 commits


Samuel Freilich authored
properlistlength and related functions claim to signal an error if the input is not a proper list, and are careful to safely check that the cdr is a cons (with safeendp). However, they call cdr on the input without checking that it is a list in the first place, resulting in memoryerror when compiled with safety 0 instead of typeerror as the tests expect.

Philipp Marek authored

Philipp Marek authored

 16 Mar, 2020 1 commit


Philipp Marek authored
Symbols in :alexandria proper should be using that package name, after all.

 05 Mar, 2020 1 commit


Andrea Richiardi authored
This patch introduces the lineupfirst and lineuplast macros in controlflow. The macros have been popularized by Clojure and afterwards adopted in Emacs Lisp (see threadfirst and threadlast in subrx.el). This implementation is a port of the latter, where we use a common lineupiter(ative) tail recursive function for computing the results. The choice of the full name was made in the spirit of the library, conservatively avoiding new syntax like > or >>.

 04 Mar, 2020 7 commits


Philipp Marek authored

Philipp Marek authored

Philipp Marek authored

Philipp Marek authored

Philipp Marek authored

Philipp Marek authored

Philipp Marek authored

 25 Jan, 2020 1 commit


Philipp Marek authored

 10 Jan, 2020 1 commit


Philipp Marek authored

 06 Dec, 2019 1 commit


Philipp Marek authored
Reimplement median function using the quickselect algorithm I wanted to submit a reimplementation of alexandria:median. Currently the function works by fully sorting the sequence, which has a complexity of O(n log n). This commit implements it as a special case of the quick select algorithm, which brings its complexity down to O(n). The new implementation is more complicated, though I think it's still simpler than some other algorithms in alexandria. Anyways, the performance gains are dramatic enough that I thought I'd at least submit the patch. I did some testing via the timing code below, and observed speedups of 510x even on sequences with just 100 elements. I could also provide the quick select algorithm as its own function if there's any interest, though it seems like this would have to go into the alexandria2 branch. ``` ;; Speedtesting function (defun testmedianspeed (mag) (labels ((getvecmedian (vec) (if (oddp (length vec)) (aref vec (ash (length vec) 1)) (* 1/2 (+ (aref vec (ash (length vec) 1)) (aref vec (1 (ash (length vec) 1)))))))) (let ((arr (loop for i from 0 upto (expt 10 mag) collect (random 1000000)))) (assert (= (time (getvecmedian (sort (alexandria:copysequence 'vector arr) #'<))) (time (alexandria:median arr))))))) ``` See merge request !17

 27 Nov, 2019 1 commit


Anish Moorthy authored
The previous implementation of alexandria:median sorted the entire sequence and chose/averaged the relevant elements, yielding an O(n log n) runtime. This commit implements a lineartime algorithm as a special case of the quickselect algorithm (https://en.wikipedia.org/wiki/Quickselect).

 29 May, 2019 3 commits


Philipp Marek authored
By using an explicit PROGN we can interpolate straight into the LET. The PROGN shouldn't matter, as the WHEN interferes with DECLAREs anyway.

Philipp Marek authored

Philipp Marek authored

 28 May, 2019 1 commit


Philipp Marek authored
Remove the orphaned export ORDINARYLAMBDALISTKEYWORDS Closes #8 See merge request !16

 25 May, 2019 3 commits


lovrolu authored

Philipp Marek authored
Improve docstrings for WITHGENSYMS and ONCEONLY See merge request alexandria/alexandria!15

lovrolu authored

 20 May, 2019 1 commit


lovrolu authored

 03 Dec, 2018 1 commit


Philipp Marek authored
Correct the documentation string of the SWITCH macro See merge request !8

 02 Dec, 2018 1 commit


Momchil Ivanov authored

 19 Nov, 2018 1 commit


Philipp Marek authored
This reverts commit 612700cd.

 08 Nov, 2018 2 commits


Philipp Marek authored

Philipp Marek authored
By using an explicit PROGN we can interpolate straight into the LET. The PROGN shouldn't matter, as the WHEN interferes with DECLAREs anyway.
