[iterate-devel] Latest stable iterate for cl-pdf
Hoehle, Joerg-Cyril
Joerg-Cyril.Hoehle at t-systems.com
Mon Dec 13 13:40:50 UTC 2004
Hi,
>>Nevertheless, I can send that to you.
>Yes, please do. I will test it on Lispworks and ACL.
I've sent that to you separately (the mailing-list software once rejected attachments >40KB).
>I just released & uploaded iterate 1.3.pre1.
>This release features Joerg-Cyril's patch set
What I sent you a month ago is olda already :-)
I've since applied more patches.
I believe that's a good base for a stable version (despite I know of some more bugs, but nobody noticed in ten years, so it's probably not that harming).
The next thing to change is the documentation, which only got very few updates.
The code is still based on iterate-1.0.9, without the augment-environment extension (which I haven't yet tested).
o TODO .tex:
+ document in-packages
+ document else clause
+ document & test (next var N), note that
(iter(generate i in '(1 2 3 4 5)) (princ (next i 2))) \yields 24
+ explain loop epilogue:
The clauses TERMINATE aka. FINISH, WHILE and UNTIL FINDING-SUCH-THAT
cause normal termination of the iteration. FINISH is also used by
all of Iterate's FOR clauses. Upon normal termination, the loop
epilogue is executed. The FINALLY clause is be used to add to the
epilogue. Some other clauses, like LEAVE, ALWAYS or NEVER cause
immediate termination of the iteration, without going through the
epilogue.
Here's most of my changes:
; ---------------- ChangeLog
o package.lisp
+ use declaim
+ use (export list): (export +clause-names+ '#:iterate)
+ export defsynonym defmacro-driver
o iterate.lisp
+ (declaim (declaration declare-variables))
+ listp -> consp
+ (prog1 (car body) (pop body)) -> (pop body)
+ (code-char 0) is portable, #\nul or #\null is not
+ counting uses '(subst (var exp) #) instead of expr
+ bang-vars-1: tail-call optimized
o for in-package(s) evaluates package(s) argument
o for in-package(s) work as generators
+ use #:start/beginning to (hopefully) work with Allegro modern style
+ walk-flet: accepts declarations
+ remove walk-identity and use (x . nil) consistently in *special-form-alist*
+ ELSE special clause also needs local-binding-check
+ locally accepts [0..N] declarations
+ constant? and self-evaluating? accept all self-evaluating forms, including
keywords and T/NIL, but no other symbols.
+ avoid ~< pretty-printer (not in Cormanlisp) in error messages, leave that to
the implementation
+ if-1st-time & special-clause ELSE: type 'boolean instead of symbol
+ (collect i at 'beginning) barfs, despite man says "may be quoted".
+ #+clisp "explicit declarations are always placed in the generated code" as
the manual says.
+ #+lispworks multiple-value-bind is recognized (again)
+ make-next-code N <> 1 generates correct code
+ (collect i at 'beginning) barfs, despite man says "may be quoted".
-> probably change manual: it's not evaluated, so don't quote
Same for type: remove code
Also here: "(As with ~place~, quoting ~type~ is optional.)"
Don't make people believe it could be evaluated!
o iter-man.tex
+ drop note about future with-hashtable/package-iterator
+ document dsetq value
o iterate-pg.lisp
+ use multiple-value-prog1
o iterate-test.lisp
+ some testcases
; ---------------- DONE
o minor CL optimizations: consp, pop, export, declaim
o FOR IN-PACKAGE(S) evaluates package(s) argument
o GENERATE IN-PACKAGE(S) works
o GENERATE IN-HASHTABLE works
o FOR IN-HASHTABLE supports destructuring
o FOR IN-PACKAGES was broken because of 'pkgs
symbol-types are not evaluated in with-package-iterator
and must not be empty => consp
o (for vars DO-NEXT) now binds vars
o ALWAYS + NEVER work together
o FINDING SUCH-THAT may be used with ALWAYS/NEVER or THEREIS
o correctly report incompatible accumulation for FINDING SUCH THAT with
other clauses, e.g. COLLECT
o use DSETQ instead of destructuring-bind for consistency of templates
o a few more package exports
o added more testcases
o (DSETQ (values x nil y)) works
o restore v 1.0/2 special/macro order, e.g. change special-form? etc.
o in-vector/in-sequence downwards by 2 did not start with last element
(iter (for i index-of-vector #(0 1 2 3 4) downto 0 by 2) (collect i))
yields (3 1), expect (4 2 0) by similarity with
(iter (for i downfrom 4 by 2) (collect i)) and
(iter (for i from 4 downto 0 by 2) (collect i))
Regards,
Jörg Höhle
More information about the iterate-devel
mailing list