chiark / gitweb /
Mark Wooding [Mon, 1 May 2006 09:37:05 +0000 (10:37 +0100)]
mop: In print-object-with-slots, use write for the slot values.
Also print unbound slots as `#<unbound>'. This is what the SLIME
inspector does and it makes sense.
Mark Wooding [Mon, 1 May 2006 09:33:52 +0000 (10:33 +0100)]
mop: Use mdw.base, because it contains useful debugging stuff.
Not that there are any bugs which need fixing, of course.
Mark Wooding [Sun, 30 Apr 2006 18:32:43 +0000 (19:32 +0100)]
mop: Remove &allow-other-keys from methods.
A more careful reading of the CLOS method congruence rules suggests that
these mess up the keyword validity checking. Which is a shame.
Mark Wooding [Sun, 30 Apr 2006 14:37:53 +0000 (15:37 +0100)]
collect: Declare results as having type list.
It seems that CMU CL can't work this out on its own. I suppose that's
not completely surprising.
Mark Wooding [Sun, 30 Apr 2006 12:29:58 +0000 (13:29 +0100)]
base: Provide fixnump function.
CMU CL already implements fixnump in the extensions package Provide it
explicitly here anyway, for other implementations.
Quite why this function isn't in the Common Lisp spec anyway is still a
mystery.
Mark Wooding [Sun, 30 Apr 2006 02:48:20 +0000 (03:48 +0100)]
mop: Implement a class which automatically defines a predicate.
I've found myself typing
(defgeneric foop (thing)
(:method (((thing foo)) t))
(:method (((thing t)) nil)))
too many times. Now I just put `(:predicate foop)' in the class
definition and forget about it.
Mark Wooding [Sat, 29 Apr 2006 21:22:45 +0000 (22:22 +0100)]
mop: Don't pass filter functions the target object.
Firstly, it's now what the docstring for `filtered-slot-class-mixin'
says, and it seems to be less useful.
Mark Wooding [Sat, 29 Apr 2006 20:47:30 +0000 (21:47 +0100)]
anaphora: Rename package to just `anaphora'.
I think that, for once, nothing else needs to be updated for this
renaming. ;-)
Mark Wooding [Sat, 29 Apr 2006 17:09:49 +0000 (18:09 +0100)]
parse-body: Allow docstring to be mixed in among the declarations.
Ooops. I've just re-read CLtL, and found that the top of most forms
allows the docstring to be mixed in among the declarations in any old
order, rather than docstring-first, declarations-after. And I've also
just read Hyperspec 3.4.11, which explains that a final string isn't a
docstring, so handle that correctly too.
So rewrite the code to handle this case. It means that macros will
probably reorder the forms in their output, but that's all right.
While we're here, glue all the declarations into a single `declare'
form, which makes it easier to put the declarations into some other kind
of form such as `declaim'. And provide a keyword argument
:allow-docstring-p (defaulting true) to disallow docstrings.
Mark Wooding [Thu, 27 Apr 2006 09:25:55 +0000 (10:25 +0100)]
Add some MOP hacking.
* Abstract classes.
* Filtered slots -- i.e., all slot writes can be passed through a
canonifying filter.
Mark Wooding [Thu, 27 Apr 2006 10:57:40 +0000 (11:57 +0100)]
collect: Reduce consing.
The old collection system made a pair of cons cells: the metadata and a
random `head'.
,--------------------------.
| |
meta | head v tail
+---+-|-+ +---+---+ +---+---+
| * | * | |nil| *-----...--->| |nil|
+-|-+---+ +---+---+ +---+---+
| ^
| |
`-----------'
But we can do better: we can squidge the head and metadata nodes
together. If we start out at
head tail
+---+---+
,-->| * |nil|
| +-|-+---+
| |
`-----'
we can just insert more items by updating (cdar head)...
head tail
+---+---+ +---+---+ +---+---+
| * | *---->| | *----...--->| |nil|
+-|-+---+ +---+---+ +---+---+
| ^
| |
`-----------------------------'
Mark Wooding [Mon, 24 Apr 2006 14:30:23 +0000 (15:30 +0100)]
base, optparse: Various option-parsing enhancements.
* `case2' clauses can optionally bind a variable to its scrutinee.
* New function `option-parse-return' to return a value from
`option-parse-next'.
* Enhance `options' parse-option-form' to understand disambiguating
keywords arguments for all option slots. This also means that these
things can be set from expressions rather than constants.
* Default the `define-program' variables sensibly.
* Make `do-options' use `let*/gensyms'.
* Make the optparse test use the convenience macros.
* Rename `help-opts' to `help-options'. Just because. And tidy up
the code a bunch.
Mark Wooding [Sun, 23 Apr 2006 15:18:21 +0000 (16:18 +0100)]
Reformat all the docstrings.
Indent subsequent lines. Makes the code look prettier, and makes diff
function headers more useful.
Mark Wooding [Sun, 23 Apr 2006 00:58:45 +0000 (01:58 +0100)]
collect: Oops, forgot to export `collect-tail'.
Mark Wooding [Sun, 23 Apr 2006 00:57:42 +0000 (01:57 +0100)]
collect: Whitespace rearrangement.
Mark Wooding [Sun, 23 Apr 2006 00:19:04 +0000 (01:19 +0100)]
base: New macro for parsing function bodies.
Mark Wooding [Sat, 22 Apr 2006 23:59:07 +0000 (00:59 +0100)]
collect, unix: Rename `mdw.collect' package to just `collect'.
Mark Wooding [Sat, 22 Apr 2006 23:58:11 +0000 (00:58 +0100)]
base, optparse: Introduce `case2' macros.
* base: Add new `case2' macro, for fetching two values, switching on
one and binding the other. Also add `ecase2' to do the obvious
thing.
* optparse: Rewrite `do-options' to use `ecase2' (or `case2').
Mark Wooding [Sun, 23 Apr 2006 00:07:42 +0000 (01:07 +0100)]
base: Fix bug in `while'.
Did I ever use this?
Mark Wooding [Sun, 23 Apr 2006 00:02:28 +0000 (01:02 +0100)]
base: Reorder a bit.
Nothing significant actually changed.
Mark Wooding [Sun, 23 Apr 2006 00:00:59 +0000 (01:00 +0100)]
base: Export `nlet' and `while'.
Should have done this a while ago.
Mark Wooding [Thu, 20 Apr 2006 16:29:15 +0000 (17:29 +0100)]
unix: Fix crap typo in header comment.
Mark Wooding [Thu, 20 Apr 2006 16:09:57 +0000 (17:09 +0100)]
optparse: Various enhancements.
* General cleaning up.
* Removal of redundant handling of option docstrings in both options
macro and parse-option-form.
* New feature: option macros can insert several options.
* New suite of standard option-handling things for usual command-line
programs. Should be sufficient for most purposes. I'll probably
invent a subcommand system later when I get a feel for what's
wanted.
Mark Wooding [Thu, 20 Apr 2006 14:00:08 +0000 (15:00 +0100)]
infix: Reader macros for infix expressions.
Mark Wooding [Thu, 20 Apr 2006 13:50:43 +0000 (14:50 +0100)]
safely, optparse: Rename packages.
Mark Wooding [Thu, 20 Apr 2006 11:03:09 +0000 (12:03 +0100)]
General tidying and prettifying.
Mark Wooding [Thu, 20 Apr 2006 11:01:07 +0000 (12:01 +0100)]
Ignore boring files.
Mark Wooding [Thu, 20 Apr 2006 11:00:25 +0000 (12:00 +0100)]
mdw-base: Update-in-place macros.
These are largely here because the infix reader stuff wants them, but
it's handy enough, probably.
Mark Wooding [Tue, 11 Apr 2006 17:49:13 +0000 (18:49 +0100)]
optparse: Use parse-integer in parse-c-integer.
CMU CL's parse-integer has cleverness for parsing bignums relatively
quickly. It's not as scary as Catacomb, but not bad. Use it instead of
the grotty hack we had previously.
Mark Wooding [Tue, 11 Apr 2006 17:20:46 +0000 (18:20 +0100)]
syscall: Don't require (function ...) for the name argument.
In fact, don't allow it.
Mark Wooding [Tue, 11 Apr 2006 17:05:37 +0000 (18:05 +0100)]
safely: For -without-moaning functions, just do it and catch errors.
... rather than probing first and hoping for the best.
Mark Wooding [Tue, 11 Apr 2006 16:55:36 +0000 (17:55 +0100)]
Kill the unix-try macro.
Instead, export sys-* functions which do the right thing. Fix safely to
match.
Mark Wooding [Tue, 11 Apr 2006 17:06:28 +0000 (18:06 +0100)]
safely: Blank lines make code easier to read.
Mark Wooding [Mon, 13 Feb 2006 11:55:44 +0000 (11:55 +0000)]
Merge branch 'svn'
mdw [Mon, 13 Feb 2006 11:54:57 +0000 (11:54 +0000)]
anaphora: Add anaphoric macros.
mdw [Mon, 13 Feb 2006 11:54:33 +0000 (11:54 +0000)]
sys-base: Expand hard-exit a bit.
mdw [Mon, 13 Feb 2006 11:54:16 +0000 (11:54 +0000)]
base: Implement named-let and while.
Mark Wooding [Mon, 13 Feb 2006 11:52:27 +0000 (11:52 +0000)]
Extract Subversion ignore data.
mdw [Thu, 25 Aug 2005 08:46:18 +0000 (08:46 +0000)]
Initial checkin.