lisp
5 years agodep.lisp: Report out-of-date deps as being `stale'. master
Mark Wooding [Sat, 30 Jun 2018 21:13:16 +0000 (22:13 +0100)]
dep.lisp: Report out-of-date deps as being `stale'.

It's just shorter.

5 years agodep.lisp: Prefix diagnostic output with `;;'.
Mark Wooding [Sat, 30 Jun 2018 20:26:32 +0000 (21:26 +0100)]
dep.lisp: Prefix diagnostic output with `;;'.

5 years agodep.lisp: Fix formatting in docstrings and messages.
Mark Wooding [Sat, 30 Jun 2018 20:24:55 +0000 (21:24 +0100)]
dep.lisp: Fix formatting in docstrings and messages.

Literal symbols go in quotes and lowercase, rather than capitals.

5 years agodep.lisp (recompute-dep-value): Refactor the flag calculation.
Mark Wooding [Sat, 30 Jun 2018 20:38:43 +0000 (21:38 +0100)]
dep.lisp (recompute-dep-value): Refactor the flag calculation.

Not sure why I wrote it like that.

5 years agodep.lisp (%dep-value): Document why this is a separate function.
Mark Wooding [Sat, 30 Jun 2018 20:37:07 +0000 (21:37 +0100)]
dep.lisp (%dep-value): Document why this is a separate function.

I almost committed a change which folded this into `dep-value' before
noticing that the latter is marked `inline'.

5 years agodep.lisp (%dep-value): Force the dep before registering a dependents.
Mark Wooding [Sat, 30 Jun 2018 20:35:15 +0000 (21:35 +0100)]
dep.lisp (%dep-value): Force the dep before registering a dependents.

Otherwise we'll add the dependent to the list, and then `propagate-to-
dependents' will clear the list, forgetting about us.

6 years agosys-base.lisp (set-command-line-arguments): Rewrite to use `uiop' properly.
Mark Wooding [Wed, 20 Sep 2017 21:39:42 +0000 (22:39 +0100)]
sys-base.lisp (set-command-line-arguments): Rewrite to use `uiop' properly.

The code is taken from commit 6e21a5d25bca57a78f052d6a24b97b88e83cc6fb
of Sod (https://git.distorted.org.uk/~mdw/sod/).

6 years agooptparse.lisp: Fix spurious indentation after the usage message.
Mark Wooding [Wed, 20 Sep 2017 21:19:34 +0000 (22:19 +0100)]
optparse.lisp: Fix spurious indentation after the usage message.

6 years agomdw-base.lisp: Export `case2' correctly.
Mark Wooding [Wed, 20 Sep 2017 21:19:06 +0000 (22:19 +0100)]
mdw-base.lisp: Export `case2' correctly.

Alas, `optparse.lisp' miscompiles hopelessly if we don't do this.

7 years agooptparse.lisp: Fix stupid paren-positioning blunders.
Mark Wooding [Mon, 27 Jun 2016 09:22:17 +0000 (10:22 +0100)]
optparse.lisp: Fix stupid paren-positioning blunders.

8 years agoMerge slippers:src/lisp
Mark Wooding [Fri, 15 Apr 2016 13:55:06 +0000 (14:55 +0100)]
Merge slippers:src/lisp

* slippers:src/lisp:
  sys-base.lisp: Support for newer `uiop'-based `cl-launch'.
  sys-base.lisp: Use not-deprecated function for quitting SBCL.

8 years agoLots of tidying up.
Mark Wooding [Fri, 15 Apr 2016 13:54:50 +0000 (14:54 +0100)]
Lots of tidying up.

8 years agosys-base.lisp: Support for newer `uiop'-based `cl-launch'.
Mark Wooding [Thu, 14 Apr 2016 14:39:49 +0000 (15:39 +0100)]
sys-base.lisp: Support for newer `uiop'-based `cl-launch'.

The new version stashes things in somewhat different places, so be
willing to hunt about for a bit.

8 years agosys-base.lisp: Use not-deprecated function for quitting SBCL.
Mark Wooding [Thu, 14 Apr 2016 14:38:24 +0000 (15:38 +0100)]
sys-base.lisp: Use not-deprecated function for quitting SBCL.

It turns out that `sb-ext:exit' is supported in all versions that I care
about, so just go with that.

8 years agoanaphora.lisp: Rewrite `asetf' to use `with-places/gensyms'.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
anaphora.lisp: Rewrite `asetf' to use `with-places/gensyms'.

This adds a dependency on `mdw-base.lisp'.  That's what the base package
is for.

8 years agoanaphora.lisp: Export symbols near their definitions.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
anaphora.lisp: Export symbols near their definitions.

8 years agomdw-base.lisp: Rewrite `setf-default' using `with-places/gensyms'.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
mdw-base.lisp: Rewrite `setf-default' using `with-places/gensyms'.

Now that we have `with-places' and friends, there's no reason to write a
`setf'-like macro out longhand ever again.

8 years agomdw-base.lisp: Move `with-places' to earlier in the file.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
mdw-base.lisp: Move `with-places' to earlier in the file.

8 years agomdw-base.lisp: Make locative slots be read-only.
Mark Wooding [Wed, 21 Oct 2015 23:46:00 +0000 (00:46 +0100)]
mdw-base.lisp: Make locative slots be read-only.

8 years agomdw-base.lisp: Export symbols near their definitions.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
mdw-base.lisp: Export symbols near their definitions.

8 years agomdw-base.lisp: Fix `inline' proclamation for `ref'.
Mark Wooding [Wed, 21 Oct 2015 23:44:45 +0000 (00:44 +0100)]
mdw-base.lisp: Fix `inline' proclamation for `ref'.

This function must have had a different name during development, and the
proclamation just got missed.

8 years agomdw-base.lisp: Refactor `with-places' incompatibly.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
mdw-base.lisp: Refactor `with-places' incompatibly.

Now there are two macros.

  * `with-places' is a simple macro which does the hard work of
    capturing places with symbol-macros.

  * `with-places/gensyms' is a hairy nested-backquote macro helper which
    does the job of the old `with-places'.

Because of this split of responsibilities, no callers of these macros
have to mess with environments explicitly, which simplifies
`update-place' and `update-place-after' slightly.

8 years agomdw-base.lisp: Allow multiple arguments in `update-place' etc.
Mark Wooding [Wed, 21 Oct 2015 23:29:58 +0000 (00:29 +0100)]
mdw-base.lisp: Allow multiple arguments in `update-place' etc.

There doesn't seem to be a reason to require exactly one argument.  So
don't.

8 years agomdw-base.lisp: Make section heading for `with-places' more useful.
Mark Wooding [Wed, 21 Oct 2015 23:25:56 +0000 (00:25 +0100)]
mdw-base.lisp: Make section heading for `with-places' more useful.

9 years agooptparse.lisp: Move `ignorable' declaration into the right place.
Mark Wooding [Sat, 20 Dec 2014 22:26:05 +0000 (22:26 +0000)]
optparse.lisp: Move `ignorable' declaration into the right place.

9 years agoWhitespace cleanups across the board.
Mark Wooding [Sat, 20 Dec 2014 22:18:25 +0000 (22:18 +0000)]
Whitespace cleanups across the board.

12 years agosafely.lisp: Explicitly state which library to get rename(2) from.
Mark Wooding [Mon, 18 Jul 2011 12:14:28 +0000 (13:14 +0100)]
safely.lisp: Explicitly state which library to get rename(2) from.

I think this is Debian changing the dynamic linking rules rather than
CLisp being crap; but it's still annoying.

12 years agosafely.lisp: More on the CLisp RENAME-FILE mess.
Mark Wooding [Sun, 17 Jul 2011 20:51:16 +0000 (21:51 +0100)]
safely.lisp: More on the CLisp RENAME-FILE mess.

The :IF-EXISTS option is only in very new versions of CLisp.  It turns
out that the bizarre double-pathname-merging bug in POSIX:COPY-FILE
doesn't cause trouble if the source is absolute (unsurprising, in
retrospect) so I could use TRUENAME to dig my way out of this mess; but
COPY-FILE will clobber the target file before looking to see whether the
source succeeds (unless persuaded otherwise with :IF-EXISTS, which only
works if RENAME-FILE understands that option).

Give up, and use rename(2) through the FFI.

12 years agosafely.lisp: SAFE-COPY shouldn't make two copies under CLisp.
Mark Wooding [Sun, 19 Jun 2011 18:23:57 +0000 (19:23 +0100)]
safely.lisp: SAFE-COPY shouldn't make two copies under CLisp.

The condition on the fallback portable code wasn't fixed to exclude
CLisp when the POSIX:COPY-FILE change was made.  The result is a steady
buildup of MUMBLE-GORP-old.FOO files, which is no fun.

12 years agosafely.lisp: CLisp's POSIX:COPY-FILE :METHOD :RENAME is a disaster.
Mark Wooding [Thu, 9 Jun 2011 14:06:25 +0000 (15:06 +0100)]
safely.lisp: CLisp's POSIX:COPY-FILE :METHOD :RENAME is a disaster.

It seems to do two separate pathname merges.  Use RENAME-FILE instead:
it may be mad, but at least it's mad in a well-understood way.  We still
need :IF-EXISTS :OVERWRITE because CLisp makes life unnecessarily
difficult.

12 years agosafely.lisp: Fix RENAME to cope with nontrivial directory components.
Mark Wooding [Sun, 5 Jun 2011 00:07:44 +0000 (01:07 +0100)]
safely.lisp: Fix RENAME to cope with nontrivial directory components.

The mad Lisp RENAME-FILE rules strike again.

12 years agosafely.lisp: Fix an indentation error.
Mark Wooding [Sun, 5 Jun 2011 00:07:35 +0000 (01:07 +0100)]
safely.lisp: Fix an indentation error.

12 years agoMerge branch 'master' of metalzone:public-git/lisp
Mark Wooding [Wed, 1 Jun 2011 21:34:41 +0000 (22:34 +0100)]
Merge branch 'master' of metalzone:public-git/lisp

* 'master' of metalzone:public-git/lisp:
  safely.lisp: Fixes for later SBCL.
  safely.lisp: More CLisp fixing.
  safely.lisp: Hacking for CLisp support.
  str: Handy functions for testing prefixes/suffixes.
  safely: Fix useless use of APPLY in SAFELY-WRITING.

12 years agooptparse.lisp: Light reformatting.
Mark Wooding [Wed, 1 Jun 2011 21:31:20 +0000 (22:31 +0100)]
optparse.lisp: Light reformatting.

Also, use PRINT-UNREADABLE-OBJECT in the printer for OPTION, rather than
printing the delimiters by hand.  Nothing especially substantial,
though.

12 years agoMerge branch 'master' of metalzone.distorted.org.uk:~mdw/public-git/lisp
Mark Wooding [Tue, 31 May 2011 12:13:17 +0000 (13:13 +0100)]
Merge branch 'master' of metalzone.distorted.org.uk:~mdw/public-git/lisp

* 'master' of metalzone.distorted.org.uk:~mdw/public-git/lisp:
  safely.lisp: More CLisp fixing.
  safely.lisp: Hacking for CLisp support.

12 years agosafely.lisp: Fixes for later SBCL.
Mark Wooding [Tue, 31 May 2011 12:12:04 +0000 (13:12 +0100)]
safely.lisp: Fixes for later SBCL.

SBCL killed UNIX-NAMESTRING, so we'd better use NATIVE-NAMESTRING.
We fake up an implementation of NATIVE-NAMESTRING for CMUCL.

12 years agosafely.lisp: More CLisp fixing.
Mark Wooding [Mon, 30 May 2011 15:42:49 +0000 (16:42 +0100)]
safely.lisp: More CLisp fixing.

It seems that UNIX:LINK has vanished in a later version of CLisp.  Use
POSIX:COPY-FILE instead.

12 years agosafely.lisp: Hacking for CLisp support.
Mark Wooding [Sun, 22 May 2011 14:30:41 +0000 (15:30 +0100)]
safely.lisp: Hacking for CLisp support.

CLisp's RENAME-FILE doesn't like it if the target exists.  Insert a
shim function, and get it to use low-level hacking on CLisp.

14 years agostr: Handy functions for testing prefixes/suffixes.
Mark Wooding [Tue, 10 Jun 2008 11:07:52 +0000 (12:07 +0100)]
str: Handy functions for testing prefixes/suffixes.

14 years agosafely: Fix useless use of APPLY in SAFELY-WRITING.
Mark Wooding [Tue, 28 Apr 2009 10:19:09 +0000 (11:19 +0100)]
safely: Fix useless use of APPLY in SAFELY-WRITING.

Not quite sure what I was thinking.

14 years agooptparse-test: Use better launch magic.
Mark Wooding [Wed, 18 Nov 2009 12:12:58 +0000 (12:12 +0000)]
optparse-test: Use better launch magic.

14 years agoMerge branch 'master' of metalzone.distorted.org.uk:~mdw/public-git/lisp
Mark Wooding [Wed, 18 Nov 2009 12:03:16 +0000 (12:03 +0000)]
Merge branch 'master' of metalzone.distorted.org.uk:~mdw/public-git/lisp

* 'master' of metalzone.distorted.org.uk:~mdw/public-git/lisp:
  sys-base: Fix collection of command-line options for CLisp.
  mdw-mop: Move DEFGENERIC of SLOT-DEFINITION-FILTER.
  optparse-test: Fix to use cl-launch with /bin/sh hack.

Conflicts:
sys-base.lisp

14 years agosys-base: Fix support for CL-LAUNCH.
Mark Wooding [Wed, 18 Nov 2009 11:57:17 +0000 (11:57 +0000)]
sys-base: Fix support for CL-LAUNCH.

Firstly, I got the feature wrong.  Secondly, fix the `defpackage' form
for `set-command-line-arguments'.

15 years agosys-base: Fix collection of command-line options for CLisp.
Mark Wooding [Mon, 9 Feb 2009 00:02:08 +0000 (00:02 +0000)]
sys-base: Fix collection of command-line options for CLisp.

I don't like runlisp any more, and looking for its `--' marker is just
unsound.

Also zap *RAW-COMMAND-LINE* because it just isn't a very useful thing
to have around.

15 years agomdw-mop: Move DEFGENERIC of SLOT-DEFINITION-FILTER.
Mark Wooding [Mon, 9 Feb 2009 00:00:26 +0000 (00:00 +0000)]
mdw-mop: Move DEFGENERIC of SLOT-DEFINITION-FILTER.

For some reason, it was between the two (implicit) method definitions
rather than before them.  This causes warnings, particularly from CLisp.

15 years agooptparse-test: Fix to use cl-launch with /bin/sh hack.
Mark Wooding [Tue, 13 Jan 2009 22:29:49 +0000 (22:29 +0000)]
optparse-test: Fix to use cl-launch with /bin/sh hack.

15 years agosys-base: Further cl-launch improvement.
Mark Wooding [Wed, 26 Nov 2008 21:23:09 +0000 (21:23 +0000)]
sys-base: Further cl-launch improvement.

If CL_LAUNCH_FILE is unset, assume that we've been invoked with the
program name as the first argument anyway.  We can arrange for this to
be the case fairly easily.

The problem is that

  #! /usr/bin/cl-launch -X ... --

doesn't work on Linux because cl-launch is a script.  Besides, it
hard-codes the path of cl-launch.  Putting

  #! /bin/sh
  #|
  exec cl-launch -f "$0" -- "$0" "$@"
  |#
  ... lisp here ...

seems sufficient for one-off Lisp scripts.

15 years agosys-base: Improve cl-launch support.
Mark Wooding [Wed, 26 Nov 2008 21:03:58 +0000 (21:03 +0000)]
sys-base: Improve cl-launch support.

In particular, collect the command line and script name accurately.

15 years agomdw-base: Replace (FORMAT T "~&") by (FRESH-LINE).
Mark Wooding [Mon, 10 Nov 2008 11:41:13 +0000 (11:41 +0000)]
mdw-base: Replace (FORMAT T "~&") by (FRESH-LINE).

No idea why I wrote it like that in the first place.

15 years agodep: Major overhaul.
Mark Wooding [Mon, 16 Jun 2008 22:27:44 +0000 (23:27 +0100)]
dep: Major overhaul.

The previous implementation was just fundamentally incorrect.  The new
version is somewhat better organized (though fairly similar
superficially) and documented, and actually (I think) correct.

Changes include:

  * DELAY-RECOMPUTING-DEPS has been renamed to WITH-DEPS-FROZEN.  The
    new version is semantically slightly different: it's the only point
    which actually triggers recomputation.  It has also grown the
    ability to defer its body until after the current recomputation
    phase is complete.

  * It is now a (diagnosed) error to attempt to modify a dep during
    recomputation; modifications can be deferred explicitly, though
    doing this sort of thing automatically seems a bad idea.

15 years agoqueue: Allow stuff to be pushed on the front.
Mark Wooding [Mon, 16 Jun 2008 22:27:32 +0000 (23:27 +0100)]
queue: Allow stuff to be pushed on the front.

15 years agoweak: Kill race condition in ECL weak pointer implementation.
Mark Wooding [Tue, 10 Jun 2008 18:33:06 +0000 (19:33 +0100)]
weak: Kill race condition in ECL weak pointer implementation.

15 years agodep: Use weak pointers for maintaining dependents.
Mark Wooding [Tue, 10 Jun 2008 11:36:50 +0000 (12:36 +0100)]
dep: Use weak pointers for maintaining dependents.

15 years agoweak: Uniform interface to weak pointers.
Mark Wooding [Tue, 10 Jun 2008 11:36:10 +0000 (12:36 +0100)]
weak: Uniform interface to weak pointers.

15 years agodep: Provide semantics for setting the value of a non-leaf dep.
Mark Wooding [Mon, 9 Jun 2008 22:50:35 +0000 (23:50 +0100)]
dep: Provide semantics for setting the value of a non-leaf dep.

The behaviour is that we recompute the rest of the system as usual, but
retain dependencies on the deps that the value-function examines.

We do more: it's now possible for cycles to occur in the dependency
graph, as long as a value is explicitly set somewhere in the cycle,
which effectively breaks it.  Cycles of purely computational deps are
still considered to be meaningless, and therefore forbidden.

Finally, we note that DELAY-RECOMPUTING-DEPS can be used to set
explicitly the values of a number of deps simultaneously, even if their
value functions would otherwise forbid it.

15 years agoqueue, dep: Dependent-value management.
Mark Wooding [Tue, 3 Jun 2008 11:27:51 +0000 (12:27 +0100)]
queue, dep: Dependent-value management.

Queues are useful data structures in their own right and a Lisp
implementation is handy.

Deps were inspired by Ken Tilton's Cells, but lack the latter's CLOS
trappings and probably its hairier features.  In particular, cyclic
dependencies are not permitted.

15 years agosys-base: Support for cl-launch.
Mark Wooding [Tue, 3 Jun 2008 09:25:25 +0000 (10:25 +0100)]
sys-base: Support for cl-launch.

runlisp is hereby deprecated.

16 years agooptparse: Hack pretty-printing for CLisp.
Mark Wooding [Sat, 19 Apr 2008 21:33:51 +0000 (22:33 +0100)]
optparse: Hack pretty-printing for CLisp.

CLisp's pretty printing is buggy, but we can get much closer by
doing some simple reordering of the existing code.

16 years agooptparse: Prettify the error reporting.
Mark Wooding [Sat, 19 Apr 2008 21:33:08 +0000 (22:33 +0100)]
optparse: Prettify the error reporting.

Rather than have enormous strings in the source, use #.(concatenate ...)
to build them out of smaller bits.

16 years agoTrack changes to runlisp.
Mark Wooding [Sat, 19 Apr 2008 21:32:08 +0000 (22:32 +0100)]
Track changes to runlisp.

sys-base is now less dependent on runlisp for setting itself up.
It doesn't run as well as it does through runlisp but it does at
least work.  (The code in sys-base is a clone-and-hack job of
the guts of runlisp: try to keep them in sync.)

Runlisp renamed its command-line arguments variable, to avoid the
annoying conflict with CMU CL's ext:*command-line-strings*; track
this change.

16 years agoFix constant-resetting.
Mark Wooding [Mon, 14 Apr 2008 09:32:08 +0000 (10:32 +0100)]
Fix constant-resetting.

There's a new macro defconstant* which checks a predicate before
actually resetting.  But alas the only offender is in infix.lisp, for
which we have a policy of not requiring external dependencies, so I've
expanded the macro by hand.

16 years agoUpgrade everything for SBCL.
Mark Wooding [Sun, 30 Mar 2008 23:16:26 +0000 (00:16 +0100)]
Upgrade everything for SBCL.

16 years agooptparse: Expose function for printing options.
Mark Wooding [Tue, 3 Jul 2007 12:04:45 +0000 (13:04 +0100)]
optparse: Expose function for printing options.

Also don't fail if no help is defined, and make the test program output
a little more useful.

16 years agoheap: Simple binary heaps for priority queues and so on.
Mark Wooding [Tue, 3 Jul 2007 11:18:14 +0000 (12:18 +0100)]
heap: Simple binary heaps for priority queues and so on.

16 years agoaa-tree: Simple balanced binary tree.
Mark Wooding [Tue, 3 Jul 2007 10:45:24 +0000 (11:45 +0100)]
aa-tree: Simple balanced binary tree.

I've implemented Andersson trees, which are a particularly simple kind
of balanced binary tree, with the usual performance guarantees for such
things.

16 years agomdw-base (functionify): Coerce function designator to function.
Mark Wooding [Tue, 3 Jul 2007 12:18:25 +0000 (13:18 +0100)]
mdw-base (functionify): Coerce function designator to function.

16 years agoKill trailing spaces.
Mark Wooding [Tue, 3 Jul 2007 12:17:21 +0000 (13:17 +0100)]
Kill trailing spaces.

17 years agoMerge branch 'master' of /home/mdw/public-git/lisp
Mark Wooding [Sat, 27 Jan 2007 16:33:40 +0000 (16:33 +0000)]
Merge branch 'master' of /home/mdw/public-git/lisp

* 'master' of /home/mdw/public-git/lisp:
  base: with-parsed-body, different interface.
  collect: Provide functional interface for collectors.

17 years agobase: with-parsed-body, different interface. public
Mark Wooding [Sun, 24 Dec 2006 18:27:34 +0000 (18:27 +0000)]
base: with-parsed-body, different interface.

17 years agocollect: Provide functional interface for collectors.
Mark Wooding [Sun, 24 Dec 2006 18:27:05 +0000 (18:27 +0000)]
collect: Provide functional interface for collectors.

17 years agomdw-base (stringify): Use princ-to-string.
Mark Wooding [Tue, 19 Dec 2006 16:11:45 +0000 (16:11 +0000)]
mdw-base (stringify): Use princ-to-string.

17 years agomdw-base (whitespace-char-p): Work out the whitespace characters.
Mark Wooding [Tue, 19 Dec 2006 15:00:46 +0000 (15:00 +0000)]
mdw-base (whitespace-char-p): Work out the whitespace characters.

This saves us needing a list of the whitespace characters known by
each individual implementation.

17 years agobase: New macro setf-default.
Mark Wooding [Fri, 2 Jun 2006 15:26:33 +0000 (16:26 +0100)]
base: New macro setf-default.

I've thought about adding this for a while, and it just became worth it.
Deployed where sensible.

17 years agobase: compile-time-defun should define in the interpreter.
Mark Wooding [Thu, 1 Jun 2006 16:00:19 +0000 (17:00 +0100)]
base: compile-time-defun should define in the interpreter.

17 years agoMerge branch 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/lisp
Mark Wooding [Thu, 1 Jun 2006 15:51:09 +0000 (16:51 +0100)]
Merge branch 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/lisp

* 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/lisp:
  sys-base: Portability fixes again.
  Porting stuff.

17 years agocollect: New functions collect-append and collect-nconc.
Mark Wooding [Thu, 1 Jun 2006 15:26:31 +0000 (16:26 +0100)]
collect: New functions collect-append and collect-nconc.

17 years agosys-base: Portability fixes again.
Mark Wooding [Wed, 24 May 2006 17:50:26 +0000 (18:50 +0100)]
sys-base: Portability fixes again.

  * Make sure *command-line-strings* is bound to something sane, even if
    runlisp isn't doing its thing.

  * As a result, use *lisp-interpreter* to decide whether runlisp is
    actually present.

17 years agoPorting stuff.
Mark Wooding [Wed, 24 May 2006 16:39:51 +0000 (17:39 +0100)]
Porting stuff.

  * Change to use new runlisp system (rather than the bizarre hackery of
    the same name which we had previously).

  * Support ECL, as much as is sensible.

17 years agoMerge branch 'master' of /home/mdw/public-git/lisp
Mark Wooding [Wed, 24 May 2006 08:12:14 +0000 (09:12 +0100)]
Merge branch 'master' of /home/mdw/public-git/lisp

* 'master' of /home/mdw/public-git/lisp:
  optparse: Process docstring and declarations correctly in defopthandler.
  gitignore: Ignore CLisp FASL files.
  Various: Try porting the code to CLisp.

Conflicts:

mdw-mop.lisp: Trivial conflict in the defpackage stanza.

17 years agooptparse: Process docstring and declarations correctly in defopthandler.
Mark Wooding [Wed, 24 May 2006 08:12:17 +0000 (09:12 +0100)]
optparse: Process docstring and declarations correctly in defopthandler.

Previously, the docstring got left inside the with-locatives form, which
is a shame.

17 years agogitignore: Ignore CLisp FASL files.
Mark Wooding [Wed, 24 May 2006 08:09:04 +0000 (09:09 +0100)]
gitignore: Ignore CLisp FASL files.

17 years agoVarious: Try porting the code to CLisp.
Mark Wooding [Wed, 24 May 2006 08:07:35 +0000 (09:07 +0100)]
Various: Try porting the code to CLisp.

Not entirely successful, largely because the CLisp pretty-printer seems
quite badly broken.

17 years agomop: New macro with-slot-variables.
Mark Wooding [Thu, 18 May 2006 08:43:29 +0000 (09:43 +0100)]
mop: New macro with-slot-variables.

The docstring describes it pretty well: the idea is to cache slots in
correctly-typed lexical variables and then write them back after
processing the body forms.

17 years agomop: Rearrange a bit.
Mark Wooding [Thu, 18 May 2006 08:41:29 +0000 (09:41 +0100)]
mop: Rearrange a bit.

Put the miscellaneous stuff before the metaclass hacking.

17 years agoMerge branch 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/lisp
Mark Wooding [Wed, 17 May 2006 19:25:30 +0000 (20:25 +0100)]
Merge branch 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/lisp

* 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/lisp:
  asdf: Provide more package information and dependencies.
  sys-base: Only use the extensions package from CMUCL.
  base: Export unsigned-fixnum as a handy type to have.
  mop: Use CMUCL's `mop' package instead of `pcl'.
  base: New `until' macro does the obvious thing.

17 years agooptparse: Make enum opthandler take an evaluated list.
Mark Wooding [Wed, 17 May 2006 19:15:16 +0000 (20:15 +0100)]
optparse: Make enum opthandler take an evaluated list.

... rather than an unevaluated &rest argument.  This makes it rather
more suitable for dynamic lists of things.

17 years agoasdf: Provide more package information and dependencies.
Mark Wooding [Wed, 17 May 2006 18:56:27 +0000 (19:56 +0100)]
asdf: Provide more package information and dependencies.

17 years agosys-base: Only use the extensions package from CMUCL.
Mark Wooding [Wed, 17 May 2006 18:55:14 +0000 (19:55 +0100)]
sys-base: Only use the extensions package from CMUCL.

We'll have to do something special for other Lisp systems.

17 years agobase: Export unsigned-fixnum as a handy type to have.
Mark Wooding [Wed, 17 May 2006 18:48:05 +0000 (19:48 +0100)]
base: Export unsigned-fixnum as a handy type to have.

17 years agoMerge branch 'master' of git+ssh://guvnor.distorted.org.uk/~mdw/src/lisp
Mark Wooding [Wed, 17 May 2006 18:40:26 +0000 (19:40 +0100)]
Merge branch 'master' of git+ssh://guvnor.distorted.org.uk/~mdw/src/lisp

17 years agobase: New `until' macro does the obvious thing.
Mark Wooding [Wed, 17 May 2006 18:40:14 +0000 (19:40 +0100)]
base: New `until' macro does the obvious thing.

17 years agoinfix: Overhaul the readtable installer.
Mark Wooding [Sat, 13 May 2006 00:19:59 +0000 (01:19 +0100)]
infix: Overhaul the readtable installer.

Let it cope properly with different start and end characters (including
marking the end character as a terminating macro), and be willing to
install as a dispatching macro character if requested.  Also changed
the defaults to {...}, since these are explicitly reserved, and look
appropriate.

17 years agoinfix: Replace multiple-value constructs with a single bind.
Mark Wooding [Sat, 13 May 2006 00:13:52 +0000 (01:13 +0100)]
infix: Replace multiple-value constructs with a single bind.

This lets you do several layers of binding in one swoop, which is quite
shiny, really.  This covers multiple-value-bind and let (both the
single and multiple variable cases, if you're willing to use `values')
and multiple-value-setq is unnecessary since values is setf-able.

17 years agoinfix: Remove redundant progn in loop expander
Mark Wooding [Sat, 13 May 2006 00:08:53 +0000 (01:08 +0100)]
infix: Remove redundant progn in loop expander

17 years agoinfix: Make delim's requiredp argument optional rather than keyword.
Mark Wooding [Sat, 13 May 2006 00:07:43 +0000 (01:07 +0100)]
infix: Make delim's requiredp argument optional rather than keyword.

This makes the code rather less messy, I think.

17 years agomop: Use CMUCL's `mop' package instead of `pcl'.
Mark Wooding [Fri, 12 May 2006 09:37:43 +0000 (10:37 +0100)]
mop: Use CMUCL's `mop' package instead of `pcl'.

I must have gotten that name from an old source of information.

17 years agosafely: Temporary file name changes.
Mark Wooding [Thu, 11 May 2006 18:41:58 +0000 (19:41 +0100)]
safely: Temporary file name changes.

  * Use CL pathname magic to mess only with the name component of paths
    rather than putting extensions on the end, which seems to confuse
    CMU CL.

  * Use a Scsh-like fresh-name generator where it matters, rather than
    hoping (in the case of move-aside names).  This means generating old
    names later on in the process, but that seems OK.

  * Do the file copy in plain Lisp using read/write-sequence rather than
    Unix hacking.  There's a hack here for CMU CL to use link(2) for
    efficiency's sake, but it's not strictly necessary.

This means that the whole package is, in fact, standard Common Lisp.
Yay.

17 years agomop: New metaclass for singleton classes: ensures only one instance.
Mark Wooding [Thu, 11 May 2006 13:04:59 +0000 (14:04 +0100)]
mop: New metaclass for singleton classes: ensures only one instance.

17 years agoshow: Handle multiple values correctly.
Mark Wooding [Thu, 11 May 2006 13:04:54 +0000 (14:04 +0100)]
show: Handle multiple values correctly.

While we're at it, make sure the output is pretty-printed in an
attractive way, and print semicolons down the left hand side to protect
any weird characters which appear from messing up the REPL state.

17 years agomop: Handy function for making modified copies of instances.
Mark Wooding [Sun, 7 May 2006 17:34:47 +0000 (18:34 +0100)]
mop: Handy function for making modified copies of instances.