Permalink
Browse files

Release candidate for v.2.0.0 - a backweards incompatible re-thinking…

… of RUTILS
  • Loading branch information...
1 parent c11fde8 commit 94175a06524b7bf0a92823cb893531d6f984e51c @vseloved committed Oct 30, 2011
Showing with 1,989 additions and 4,521 deletions.
  1. +1 −4 AUTHORS
  2. +8 −0 CHANGELOG
  3. +14 −45 README
  4. +0 −12 TODO
  5. +0 −106 anaphoric.lisp
  6. +0 −24 array.lisp
  7. +0 −291 bind.lisp
  8. +0 −16 condition.lisp
  9. +0 −128 control.lisp
  10. +0 −152 core.lisp
  11. +93 −0 core/anaphoric.lisp
  12. +84 −0 core/hash-table.lisp
  13. +721 −744 { → core}/iter.lisp
  14. +146 −0 core/list.lisp
  15. +88 −0 core/misc.lisp
  16. +205 −0 core/packages.lisp
  17. +101 −0 core/readtable.lisp
  18. +17 −0 core/rutils.lisp
  19. +248 −0 core/sequence.lisp
  20. +91 −0 core/string.lisp
  21. +118 −0 core/symbol.lisp
  22. +31 −0 core/tree.lisp
  23. +0 −44 experimental.lisp
  24. +0 −172 function.lisp
  25. +0 −271 genhash.lisp
  26. +0 −154 hash-table.lisp
  27. +0 −17 impl.lisp
  28. +0 −33 iter.txt
  29. +0 −206 list.lisp
  30. +0 −290 number.lisp
  31. +0 −46 object.lisp
  32. +0 −430 packages.lisp
  33. +0 −164 pkg.lisp
  34. +0 −257 pkg.txt
  35. +23 −35 rutils.asd
  36. +0 −11 rutils.lisp
  37. +0 −251 seq.lisp
  38. +0 −87 seq.txt
  39. +0 −318 sequence.lisp
  40. +0 −39 short.lisp
  41. +0 −51 split-sequence.txt
  42. +0 −80 string.lisp
  43. +0 −19 tree.lisp
  44. +0 −24 user.lisp
View
@@ -20,10 +20,7 @@ The authors and contributors to the utilities in this system include (in alphabe
Though it seems impossible to determine precisely the original author of every function or macro, at least some of the most important utilities' authors can be listed:
* Arthur Lemmens: SPLIT-SEQUENCE
-* Ingvar Mattsson: GENHASH
* Jonathan Amsterdam, Andreas Fuchs, Joerg Hoehle, Denis Budyak: ITERATE
-* Kaz Kylheku: PKG
* Marco Baringer: DO-/MAPTREE, PARSE-FLOAT
-* Vsevolod Dyomkin: BIND, SEQ, DISTRO
-Besides, all of the utilities were at least minorly modified by Vsevolod Dyomkin to ensure consistency of documentation, use the same set of basic utilities and sometimes in other ways as well.
+Besides, all of the utilities were at least minorly modified by Vsevolod Dyomkin to ensure consistency of documentation, use the same set of basic utilities and sometimes in other ways as well.
View
@@ -1,3 +1,11 @@
+2011/11/01 - v. 2.0.0-rc1
+Backwards incompatible re-thinking of the library
+
+=====================
+
+2011/10/27 - v. 1.0.0
+Bug fixes
+
2010/08/07 - v. 0.3.1
Bug fixes:
* control:less
View
59 README
@@ -4,14 +4,10 @@ REASONABLE-UTILITIES (RUTILS) is yet another general purpose utilities package f
The other utility packages in CL-land include: CL-UTILITIES, METATILITIES, ARNESI and ALEXANDRIA to name a few. There are following motivations for creating another collection:
- 1. Virtually everyone talks about utilities in CL (probably, due to Paul Graham's "On Lisp", that starts with a chapter on the importance of utilities). But the existing utility packages are not enough visible and widespread either due to: not enough utility :), poor names, or lack of community involvement. The best and, probably, quite usable package is, in my opinion, ALEXANDRIA, which has a great team of developers, but basically suffers from 2 shortcommings:
- - bad name (not recognized as a utilities package)
- - the idea to be a "good citizen" in the CL world and not include code from other well-established, but specific utilities packages (SPLIT-SEQUENCE, ITERATE, ANAPHORA, ...)
+ 1. Virtually everyone talks about utilities in CL (probably, due to Paul Graham's "On Lisp", that starts with a chapter on the importance of utilities). But the existing utility packages are not enough visible and widespread either due to: not enough utility :), poor names, or lack of community involvement. The best and, probably, quite usable package is, in my opinion, ALEXANDRIA, which has a great team of developers, but suffers from a shortcomming of the idea to be a "good citizen" in the CL world and not include code from other well-established, but specific utilities packages (SPLIT-SEQUENCE, ITERATE, ANAPHORA, ...) But the utility package should be as much all-around, all-encompasing as possible. Because it should be used in most of the libraries, and library authors, for obvious reasons, don't like to add dependencies. This is one of the causes of not enough spread of such very useful packages, as ITERATE: one or two usages of the ITER macro often don't justify the dependency on an additional package. Yet, if all various utilities are collected under one roof, it should be a much more reasonable choice to depend on them.
-The second problem is most important, for the utility package should be as much all-around, all-encompasing one as possible. Because it should be used in most of the libraries, and library authors, for obvious reasons, don't like to add dependencies. This is one of the causes of not enough spread of such very useful packages, as ITERATE: one or two usages of the ITER macro often don't justify the dependency on an additional package. Yet, if all various utilities are collected under one roof, it should be a much more reasonable choice to depend on them.
-
- 2. Yet the reverse of coin of all-encompassing utilities' package is bloat. It is a common complain about the CL standard, that it lacks modularity, and the utilities' package can as well suffer from the same problem. But the solution to it is found and implementated using the CL package mechanism: every part of functionality (like list or hash-table handling) is segmented into it's own package. Every package name is formed according to the following template: RUTILS.<functionality> (like: RUTILS.LIST, RUTILS.ITER). So it's a 1 dependency (1 ASDF system) - multiple packages, that can be used on demand, depending on the project's needs. Besides, there are umbrella packages, that include most of the useful functionality, omiting only experimental stuff. A style distinction of different naming conventions is also taken into consideration, so both long and short names are allowed to coexist and be selected according to one's preferences. So there are such umbrella packages as: RUTILS.USER and RUTILS.USR.
+ 2. Yet the reverse of coin of all-encompassing utilities' package is bloat. It is a common complaint about the CL standard, that it lacks modularity, and the utilities' package can as well suffer from the same problem. But the solution to it is found and implementated using the CL package mechanism: every part of functionality (like list or hash-table handling) is segmented into it's own package. Every package name is formed according to the following template: RUTILS.<functionality> (like: RUTILS.LIST, RUTILS.ITER). So it's a 1 dependency (1 ASDF system) - multiple packages, that can be used on-demand, depending on the project's needs. Besides, there are umbrella packages, that include most of the useful functionality, omiting only experimental stuff. A style distinction of different naming conventions is also taken into consideration, so both long and short names are allowed to co-exist and be selected according to one's preferences. So there are such umbrella packages as: RUTILS, which includes all the core functions, and RUTIL, which also includes shorter names.
3. Support for growth of CL
@@ -22,38 +18,23 @@ Besides we want to support some (or several) community process for developing th
One of such processes is CDR (http://cdr.eurolisp.org) and we aim to provide an implementation of every CDR proposal, that targets "user-space" (i.e. does not require efforts on the implementation side).
-Besides there is RUTILS.EXPERIMENTAL package, that will include some of the ideas, that are not yet tested enough, but might become valuable in the future.
-
-Finally, the most important goal of this project is to gather around it a big community of Lisp enthusiasts, that will be able to make their impact in improving it. That is why it is planned to establish a web-site, that will allow posting and dicussing of the suggestions of features to be added to the collection.
-
-As well additional maintainers for the project are needed.
+All that will be first put into RUTILS-CONTRIB and moved to core after its presence is justified by user demand.
4. What is included and excluded
Included
--------
-Additional control constructs:
+ - 'Modern' readtable with supoort for literal syntax for hash-tables, lambdas and heredoc strings
+ - Basic common contol utilities, like WITH-GENSYMS, ONCE-ONLY, EVAL-ALWAYS etc.
- Anaphoric utilities
- - Basic (control.lisp)
- - Symbols' and literals' manipulation (core.lisp)
- - A general BIND macro
- - ITER macro with keywords support (see iter.txt)
- - PKG: read time manipulation of package visibility (see pkg.txt)
-
-Enhanced handling of:
- - Arrays
- - Conditions
- - Lists
- - Functions
- - Hash-tables (+ GENHASH, CDR 2)
- - Numbers (incl. CDR 5)
- - Objects
- - Sequences
- (+ an implementation of the SEQ protocol, loosely based on Clojure, see seq.txt
- + SPLIT-SEQUENCE, see split-sequence.txt)
- - String handling
- - Tree handling
+ - ITER macro with keywords support
+ - Symbol manipulation utilities
+ - List manipulation utilities
+ - Sequence manipulation utilities (including SPLIT-SEQUENCE)
+ - Hash-table manipulation utilities
+ - String manipulation utilities
+ - Tree manipulation utilities
Excluded
--------
@@ -63,7 +44,6 @@ Look at:
- PCALL
- PORTABLE-FUTURES
- CL-MUPROC
- - BUTTERFLY (proprietary)
* Functional features. As in the above, it's as well a whole other paradigm. It has a limited, but reasonable support in CL. Other features should be unified in it's own package, and maybe RUTILS can serve as a model for such package or even accomodate it in the future.
Look at:
@@ -85,16 +65,5 @@ See LICENSE for usage permissions.
See AUTHORS for credits.
The following symbols are added to *FEATURES*:
- - :iter
- - :split-sequence
- - :seq
-
-
-=== TODO ===
-
- - finish documenting (85% done)
- - implement a test-suite
- - establish documentation extraction process
- - put up on the Net and publish the code of Community Process website
- - engage new maintainers
- - see TODO for plans of new utilities integration
+ - :iter (by RUTILS.ITER, RUTILS, RUTIL)
+ - :split-sequence (by RUTILS.SEQUENCE, RUTILS, RUTIL)
View
12 TODO
@@ -1,12 +0,0 @@
-Utilities, cinsidered for integration:
-
- - add literal syntax for short lambdas of more than one argument (involving %1 %2 ...)
- - DLISTS (http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/a44fb824bf659c00?scoring=d&pli=1)
- - DLAMBDA (http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/34192536f61e18f2?pli=1)
- - SETF'ers for NTHCDR, LAST etc (http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/497f71d67f07a93d?pli=1)
- - Anonymous packages (http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/aad37c2a0a76af0c?pli=1)
- - DEFV (http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/ccc7bad0d82942a4?pli=1)
- - HashCons (http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/d2b4c2ebb97c820c?pli=1)
- - MACROEXPAND-DAMMIT (http://john.freml.in/macroexpand-dammit)
- - Some Cybertiggr utilities (http://cybertiggyr.com/gene/tigris/tigris.html#SECTION00610000000000000000) -- seem to be orphaned
- - List comprehensions (http://blog.superadditive.com/2007/11/09/list-comprehensions-in-common-lisp/)
View
@@ -1,106 +0,0 @@
-;;; RUTILS anaphoric utils
-;;; see LICENSE file for permissions
-
-
-(in-package #:reasonable-utilities.anaphoric/it)
-
-(locally-enable-literal-syntax :sharp-backq)
-
-(eval-always
- (defmacro if-it (test then &optional else)
- "Like <_:fun if />. IT is bound to <_:arg test />"
- `(let ((it ,test))
- (if it ,then ,else))))
-
-(eval-always
- (defmacro when-it (test &body body)
- "Like <_:fun when />. IT is bound to <_:arg test />"
- `(let ((it ,test))
- (when it
- ,@body))))
-
-(eval-always
- (defmacro and-it (&rest args)
- "Like <_:fun and />. IT is bound to the value of
-the previous <_:fun and /> form"
- (cond ((null args) t)
- ((null (cdr args)) (car args))
- (t `(when-it ,(car args) (and-it ,@(cdr args)))))))
-
-(eval-always
- (defmacro dowhile-it (test &body body)
- "Like <_:fun dowhile />. IT is bound to <_:arg test />"
- `(do ((it ,test ,test))
- ((not it))
- ,@body)))
-
-(eval-always
- (defmacro cond-it (&body body)
- "Like <_:fun cond />. IT is bound to the passed <_:fun cond /> test"
- `(let (it)
- (cond
- ,@(mapcar #``((setf it ,(car _)) ,(cadr _))
- ;; uses the fact, that SETF returns the value set
- body)))))
-
-
-(in-package #:reasonable-utilities.anaphoric/a)
-
-(abbrev aand rutils.anaphoric/it:and-it)
-(abbrev acond rutils.anaphoric/it:cond-it)
-(abbrev adowhile rutils.anaphoric/it:dowhile-it)
-(abbrev aif rutils.anaphoric/it:if-it)
-(abbrev awhen rutils.anaphoric/it:when-it)
-
-
-(in-package #:reasonable-utilities.anaphoric/let)
-
-(eval-always
- (defmacro if-let (var test then &optional else)
- "Like <_:fun if />. <_:arg Var /> will be bound to <_:arg test />"
- `(let ((,var ,test))
- (if ,var ,then ,else))))
-
-(eval-always
- (defmacro when-let (var test &body body)
- "Like <_:fun when />. <_:arg Var /> will be bound to <_:arg test />"
- `(let ((,var ,test))
- (when ,var
- ,@body))))
-
-(eval-always
- (defmacro and-let (var &rest args)
- "Like <_:fun and />. <_:arg Var /> will be bound to the value of
-the previous <_:fun and /> form"
- (cond ((null args) t)
- ((null (cdr args)) (car args))
- (t `(when-let ,var ,(car args) (and-let ,@(cdr args)))))))
-
-(eval-always
- (defmacro dowhile-let (var test &body body)
- "Like <_:fun dowhile />. <_:arg Var /> will be bound to <_:arg test />"
- `(do ((,var ,test ,test))
- ((not ,var))
- ,@body)))
-
-(eval-always
- (defmacro cond-let (var &body body)
- "Like <_:fun cond />. <_:arg Var /> will be bound to
-the passed <_:fun cond /> test"
- `(let (,var)
- (cond
- ,@(mapcar #``((setf ,var ,(car _)) ,(cadr _))
- ;; uses the fact, that SETF returns the value set
- body)))))
-
-
-(in-package #:reasonable-utilities.anaphoric/bind)
-
-(abbrev and-bind rutils.anaphoric/let:and-let)
-(abbrev cond-bind rutils.anaphoric/let:cond-let)
-(abbrev dowhile-bind rutils.anaphoric/let:dowhile-let)
-(abbrev if-bind rutils.anaphoric/let:if-let)
-(abbrev when-bind rutils.anaphoric/let:when-let)
-
-
-;;; end
View
@@ -1,24 +0,0 @@
-;;; RUTILS array handling
-;;; see LICENSE file for permissions
-
-(in-package #:reasonable-utilities.array)
-
-
-(defun copy-array (array &key
- (element-type (array-element-type array))
- (fill-pointer (and (array-has-fill-pointer-p array)
- (fill-pointer array)))
- (adjustable (adjustable-array-p array)))
- "Returns an undisplaced copy of <_:arg array />, with same
-<_:arg fill-pointer /> and <_:arg adjustab />ility (if any)
-as the original, unless overridden by the keyword arguments"
- (let ((dims (array-dimensions array)))
- ;; Dictionary entry for ADJUST-ARRAY requires adjusting a
- ;; displaced array to a non-displaced one to make a copy
- (adjust-array
- (make-array dims
- :element-type element-type :fill-pointer fill-pointer
- :adjustable adjustable :displaced-to array)
- dims)))
-
-;;; end
Oops, something went wrong.

0 comments on commit 94175a0

Please sign in to comment.