alexandria merge requestshttps://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests2024-01-31T09:41:44Zhttps://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/37Type= test fixes2024-01-31T09:41:44ZAlexander FedorovType= test fixesReopening https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/36 with only test fixes.Reopening https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/36 with only test fixes.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/36Fix type=2023-10-18T11:27:27ZAlexander FedorovFix type=Addresses #26, fixes #34 and #35.Addresses #26, fixes #34 and #35.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/35Fix switch with zero clauses2023-10-18T10:44:00ZAlexander FedorovFix switch with zero clausesFixes #39.Fixes #39.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/34Draft: Implements #402023-10-18T17:14:19ZAlexander FedorovDraft: Implements #40Implements https://gitlab.common-lisp.net/alexandria/alexandria/-/issues/40.
Adds IF-DUPLICATE-DOC-STRING argument to PARSE-BODY.
Provides possible restarts if an continuable error is signalled.Implements https://gitlab.common-lisp.net/alexandria/alexandria/-/issues/40.
Adds IF-DUPLICATE-DOC-STRING argument to PARSE-BODY.
Provides possible restarts if an continuable error is signalled.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/33test: fix tests on SBCL2023-10-16T01:32:27ZHraban Luyattest: fix tests on SBCLFixes #38Fixes #38https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/32Draft: Simple tester2023-10-18T10:55:10ZPhilipp MarekDraft: Simple testerHere's a simple tester that handles both unexpected result classes as well;
I hope to avoid implementation-specific trouble with this.
Feedback is welcome!Here's a simple tester that handles both unexpected result classes as well;
I hope to avoid implementation-specific trouble with this.
Feedback is welcome!https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/31Handle expected failures2024-01-31T16:38:49ZRobert GoldmanHandle expected failuresMarked a number of failures that seem to be the fault of implementations, instead of Alexandria, as expected failures. Originally, tried to use `rt:*expected-failures*`, but that didn't work: expected failures still fail the test suite, ...Marked a number of failures that seem to be the fault of implementations, instead of Alexandria, as expected failures. Originally, tried to use `rt:*expected-failures*`, but that didn't work: expected failures still fail the test suite, meaning that they also fail our GitLab actions tests. So I had to replace the use of `rt:*expected-failures*` with reader macros that disable individual tests.
With this merged, Alexandria should build cleanly on GitLab. Hoping that this makes future enhancements and maintenance easier.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/30Mark CURRY.3 test as XFAIL on CMUCL.2023-09-09T03:53:21ZRobert GoldmanMark CURRY.3 test as XFAIL on CMUCL.For whatever reason, CMUCL is unable to retrieve the value of
COMPILER-MACRO-FUNCTION for CURRY after the DEFINE-COMPILER-MACRO
call. I believe that this is a violation of the spec.
At any rate, to get the tests to pass on CMUCL, I have...For whatever reason, CMUCL is unable to retrieve the value of
COMPILER-MACRO-FUNCTION for CURRY after the DEFINE-COMPILER-MACRO
call. I believe that this is a violation of the spec.
At any rate, to get the tests to pass on CMUCL, I have marked this as
XFAIL on CMUCL.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/29Fix the modal logic of TYPE=.2023-10-18T11:36:03ZRobert GoldmanFix the modal logic of TYPE=.Computing the correct return value of TYPE= requires combining the
primary and secondary returns of SUBTYPEP correctly. Previously the
return value for combining (NIL NIL) and (T T) was incorrectly (NIL T)
instead of (NIL NIL).
I was u...Computing the correct return value of TYPE= requires combining the
primary and secondary returns of SUBTYPEP correctly. Previously the
return value for combining (NIL NIL) and (T T) was incorrectly (NIL T)
instead of (NIL NIL).
I was unable to make a test for this, because I couldn't find examples for all the cases that were consistent across the various lisp implementations, and my attempts to provide a portable mock implementation of `subtypep` have failed.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/28Fix issue 30 - testing value of `hash-table-size`.2023-05-05T10:21:32ZRobert GoldmanFix issue 30 - testing value of `hash-table-size`.As far as I can tell from the spec, the meaning of `hash-table-size`
is not dictated, and implementations are free to return just about
anything; it's just a way to provide useful information (hints) when
creating a new hash-table.
I di...As far as I can tell from the spec, the meaning of `hash-table-size`
is not dictated, and implementations are free to return just about
anything; it's just a way to provide useful information (hints) when
creating a new hash-table.
I disabled this test on Allegro originally, but Attila Lendvai
proposes we simply remove it altogether, as this commit does.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/27fix some tests2023-05-03T13:35:21ZRobert Goldmanfix some testsFixed three tests (see #30, #31, and #32), which were failing (incorrectly, as far as I can tell) on Allegro, and clisp. Tests still all pass on SBCL.Fixed three tests (see #30, #31, and #32), which were failing (incorrectly, as far as I can tell) on Allegro, and clisp. Tests still all pass on SBCL.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/26Use modern ASDF style and define all systems in alexandria.asd2022-02-04T06:45:50ZStelian IonescuUse modern ASDF style and define all systems in alexandria.asdhttps://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/25Add Gitlab CI2024-01-31T22:59:02ZEric TimmonsAdd Gitlab CIThis adds Gitlab CI to Alexandria using my (still WIP) Gitlab CI helpers that I announced at <https://mailman.common-lisp.net/pipermail/clo-devel/2021-November/001508.html>
These are still not quite complete, but I'm pretty confident th...This adds Gitlab CI to Alexandria using my (still WIP) Gitlab CI helpers that I announced at <https://mailman.common-lisp.net/pipermail/clo-devel/2021-November/001508.html>
These are still not quite complete, but I'm pretty confident that the features I've enabled in this MR will not change (and if they do, I'll reach out again).
I've enabled Allegro testing because my understanding is that using it for this complies with the [Allegro Express license](https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf). Let me know if you're happy with that decision as well.
The main feature not currently enabled is the "release" feature. It integrates with Gitlab to mark pushed tags as releases. We can enable it if you want, but as currently written it requires a Changelog to be kept.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/24Fix READ-STREAM-CONTENT-INTO-STRING on abcl and cmucl2022-02-25T06:48:28ZGábor MelisFix READ-STREAM-CONTENT-INTO-STRING on abcl and cmuclPaper over implementation incompatibilities in WITH-OPEN-FILE*.Paper over implementation incompatibilities in WITH-OPEN-FILE*.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/23Be smarter about element types2022-01-17T06:51:53ZTim BradshawBe smarter about element typesMerge the two changes mentioned in #25 to improve element-type handling.
I've tested this merge as well as this merge combined with !22 (for #24) with LW 7.1.3 (mac) CCL 1.12.1 (mac), SBCL 2.1.9 (Linux), and I think they're both fine. ...Merge the two changes mentioned in #25 to improve element-type handling.
I've tested this merge as well as this merge combined with !22 (for #24) with LW 7.1.3 (mac) CCL 1.12.1 (mac), SBCL 2.1.9 (Linux), and I think they're both fine. I think someone else should probably check them though.
Closes #25https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/22read-stream-content-into-string element-type fix2021-10-25T08:15:53ZTim Bradshawread-stream-content-into-string element-type fixDefault the element type of the string being created from the element
type of the stream being read.
This has two advantages: it will make things work for implementations
which have a mode where the default string element type is a subt...Default the element type of the string being created from the element
type of the stream being read.
This has two advantages: it will make things work for implementations
which have a mode where the default string element type is a subtype
of `character`, and it will also mean that if the stream's element type
is a subtype of `character` you may get thinner strings.
In addition the element type of the buffer is also made to be the same as the element type of the string.
Closes #24https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/21Use linear-time SHUFFLE if supplied with many list items to shuffle2021-03-15T09:27:22ZMichał Herdaphoe@disroot.orgUse linear-time SHUFFLE if supplied with many list items to shuffleCloses https://gitlab.common-lisp.net/alexandria/alexandria/-/issues/21
`(asdf:test-system :alexandria)` gives me the following output:
```lisp
...
ALEXANDRIA2-TESTS::LINE-UP-FIRST.FUNCTION-NAMES-ARE-THREADED
ALEXANDRIA2-TESTS::LINE-...Closes https://gitlab.common-lisp.net/alexandria/alexandria/-/issues/21
`(asdf:test-system :alexandria)` gives me the following output:
```lisp
...
ALEXANDRIA2-TESTS::LINE-UP-FIRST.FUNCTION-NAMES-ARE-THREADED
ALEXANDRIA2-TESTS::LINE-UP-FIRST.LIST-PROMOTION
ALEXANDRIA2-TESTS::LINE-UP-FIRST.MULTIPLE-ARGS
ALEXANDRIA2-TESTS::LINE-UP-FIRST.SEVERAL-EXAMPLES
ALEXANDRIA2-TESTS::LINE-UP-LAST.NO-FORMS
ALEXANDRIA2-TESTS::LINE-UP-LAST.FUNCTION-NAMES-ARE-THREADED
ALEXANDRIA2-TESTS::LINE-UP-LAST.LISP-PROMOTION
ALEXANDRIA2-TESTS::LINE-UP-LAST.SEVERAL-EXAMPLES ALEXANDRIA2-TESTS::SUBSEQ*.1
No tests failed.;
; compilation unit finished
; caught 2 ERROR conditions
; printed 11 notes
T
```https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/20Add functions relating to multidimensional array indexing conversions2021-03-15T09:35:11ZAnish MoorthyAdd functions relating to multidimensional array indexing conversionsSimilar functions are provided in CL, but they operate on *arrays* when all they really need are the *dimensions*. This sometimes proves an annoyance, and I thought I'd submit the more general functions here. The behavior should exactly ...Similar functions are provided in CL, but they operate on *arrays* when all they really need are the *dimensions*. This sometimes proves an annoyance, and I thought I'd submit the more general functions here. The behavior should exactly mimic that of the CL counterparts, except that the error which `array-in-bounds-p` signals is implementation-dependent and `dim-in-bounds-p` always signals a `SIMPLE-ERROR`.
This PR implements associated tests as well.
EDIT: I have also implemented a function to convert a row-major index to axis indices based on a given set of dimensions, and have implemented a test for that as well
-----------------------------------------------------------------------------
I wanted to further propose extending these functions to cases when fewer indices than the rank of the array are given, ie something like
```
(defvar a #2A((a b c) (d e f))
(row-major-index (array-dimensions a) 0 0) ;; 0
(row-major-index (array-dimensions a) 0) ;; 0 . Currently an error
(row-major-index (array-dimensions a) 1) ;; 3 . Also currently an error
(dim-in-bounds-p '(4 3 2 1) 0) ;; t . Currently an error
```
This behavior (unimplemented, to be clear) diverges more from the spec, but I often find it useful when working with multi-dimensional arrays. I can update the PR if we decide to support it.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/19add list-to-array2020-03-02T08:23:45ZCyrus Harmonadd list-to-arrayI added a list-to-array function that takes a list of lists l and returns a 2-d array whose first dimension is the length of l and whose second dimension is the max length of the lists in l and whose contents are the elements of the list...I added a list-to-array function that takes a list of lists l and returns a 2-d array whose first dimension is the length of l and whose second dimension is the max length of the lists in l and whose contents are the elements of the lists in l.https://gitlab.common-lisp.net/alexandria/alexandria/-/merge_requests/18Introduce line-up-first and line-up-last macros2021-10-25T08:10:56ZAndrea RichiardiIntroduce line-up-first and line-up-last macrosThis patch introduces the line-up-first and line-up-last macros in control-flow. The macros have been popularized by Clojure and afterwards adopted in Emacs Lisp (see `thread-first` and `thread-last` in subr-x.el).
This implement...This patch introduces the line-up-first and line-up-last macros in control-flow. The macros have been popularized by Clojure and afterwards adopted in Emacs Lisp (see `thread-first` and `thread-last` in subr-x.el).
This implementation is a port of the latter, where we use a common `line-up-iter`(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 `->>`.Andrea RichiardiAndrea Richiardi