Goal of this gist: make a drafty list of ideas for CDR (Common Lisp Document Repository) (see also Zenodo Community CDR)
Put the ideas (possibly with links) in the comments
Goal of this gist: make a drafty list of ideas for CDR (Common Lisp Document Repository) (see also Zenodo Community CDR)
Put the ideas (possibly with links) in the comments
I think I found another bad MOP edge case: http://clhs.lisp.se/Body/04_cf.htm says
If a class is redefined in such a way that the set of local slots accessible in an instance of the class is changed, a two-step process of updating the instances of the class takes place. The process may be explicitly started by invoking the generic function make-instances-obsolete. This two-step process can happen in other circumstances in some implementations. For example, in some implementations this two-step process is triggered if the order of slots in storage is changed.
The first step modifies the structure of the instance by adding new local slots and discarding local slots that are not defined in the new version of the class. The second step initializes the newly-added local slots and performs any other user-defined actions. These two steps are further specified in the next two sections.
so the first step is internal to the implementation, the second one is programmable, see http://clhs.lisp.se/Body/04_cfb.htm:
The second step initializes the newly added local slots and performs any other user-defined actions. This step is implemented by the generic function update-instance-for-redefined-class, which is called after completion of the first step of modifying the structure of the instance.
the spec says nothing on what happens if u-i-f-r-c signals an error.
on SBCL right now this results in half-baked updates where the slots are in there but uninitialized, and I see no good way to try to initialize them again even after knowing that u-i-f-r-c failed.
From myself, on discord
Here's an idea: most RFC could in fact be a library/test-suite. (We already have tons of trivial-* libraries also... thinking )
Package locks
make-string-output-stream
doesn't accept an existing string with a fill-pointer
Relevant blog post:
http://within-parens.blogspot.com/2022/01/cdr-is-next.html
Advising functions
There's no way to define your own (defun (compound name) ...)
sleep with sub-second precision
Already in the standard, my bad
environments
http://metamodular.com/SICL/environments.pdf
symbol aliases
https://discord.com/channels/297478281278652417/297478350145060875/966815899711582208
declaratively, through defpackage
:
(defpackage #:pkg
(:import-from #:alexandria
#:unionf #:removef
(#:line-up-last #:->>)
(#:line-up-first #:->)))
Where the car is the original symbol and the cdr is the list of aliases
Another list
from me:
It could be nice if digit-char could take a third argument for the alphabet
Extensible intern
There should be a CDR for package-local nicknames. (see https://github.com/Gleefre/cdr-package-local-nicknames/ for a draft I wrote some time ago -- a rewrite is probably needed)
Structures should be less under-specified. For example slot-...
functions should work on those (unless :type
is vector or list); it should be possible to meaningfully use structure-class
; there should be ensure-struct
function.
symbol aliases
See also https://github.com/Gleefre/symbol-links ; https://github.com/tfeb/symbol-nicknames
[ until cl-car is fully up, will continue writing ideas here ]
There should be compiler-macro-let
or similar.
[ until cl-car is fully up, will continue writing ideas here ]
I think it would be better to just create a discussion in cl-car
Maybe the title could be just "compiler-macro-let"
This is an existing list of suggestions gathered by somebody else:
https://discord.com/channels/297478281278652417/734079862066642944/905492234542121030