1 Calc Enhancement Wish List:
3 Send calc comments, suggestions, bug fixes, enhancements and
4 interesting calc scripts that you would like you see included in
5 future distributions to:
7 calc-contrib at asthe dot com
9 The following items are in the calc wish list. Programs like this
10 can be extended and improved forever.
12 Calc bug reports, however, should be sent to:
14 calc-bugs at asthe dot com
16 [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]]
17 [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]]
19 See the 'todo' help file for higher priority todo items.
23 * In general use faster algorithms for large numbers when they
24 become known. In particular, look at better algorithms for
25 very large numbers -- multiply, square and mod in particular.
27 * Implement an autoload feature. Associate a calc resource filename
28 with a function or global variable. On the first reference of
29 such item, perform an automatic load of that file.
31 * Add error handling statements, so that QUITs, errors from the
32 'eval' function, division by zeroes, and so on can be caught.
33 This should be done using syntax similar to:
35 ONERROR statement DO statement;
37 Something like signal isn't versatile enough.
39 * Add a debugging capability so that functions can be single stepped,
40 breakpoints inserted, variables displayed, and so on.
42 * Figure out how to write all variables out to a file, including
43 deeply nested arrays, lists, and objects.
45 Add the ability to read and write a value in some binary form.
46 Clearly this is easy for non-neg integers. The question of
47 everything else is worth pondering.
49 * Eliminate the need for the define keyword by doing smarter parsing.
51 * Allow results of a command (or all commands) to be re-directed to a
52 file or piped into a command.
54 * Add some kind of #include and #define facility. Perhaps use
55 the C pre-processor itself?
57 * Support a more general input and output base mode other than
58 just dec, hex or octal.
60 * Implement a form of symbolic algebra. Work on this has already
61 begun. This will use backquotes to define expressions, and new
62 functions will be able to act on expressions. For example:
64 x = `hello * strlen(mom)`;
65 x = sub(x, `hello`, `hello + 1`);
66 x = sub(x, `hello`, 10, `mom`, "curds");
71 * Place the results of previous commands into a parallel history list.
72 Add a binding that returns the saved result of the command so
73 that one does not need to re-execute a previous command simply
76 If you have a command that takes a very long time to execute,
77 it would be nice if you could get at its result without having
78 to spend the time to reexecute it.
80 * Add a binding to delete a value from the history list.
82 One may need to remove a large value from the history list if
83 it is very large. Deleting the value would replace the history
84 entry with a null value.
86 * Add a binding to delete a command from the history list.
88 Since you can delete values, you might as well be able to
91 * All one to alter the size of the history list thru config().
93 In some cases, 256 values is too small, in others it is too large.
95 * Add a builtin that returns a value from the history list.
100 returns the 10th value on the history value list, if such
101 a value is in the history list (null otherwise). And:
105 return the value of the 23rd command given to calc, if
106 such a value is in the history list (null otherwise).
108 It would be very helpful to use the history values in
109 subsequent equations.
111 * Add a builtin that returns command as a string from the
112 history list. As an example:
116 returns a string containing the 10th command on the
117 history list, if a such a value is in the history list
118 (empty string otherwise). And:
122 return the string containing the 23rd command given to calc, if
123 such a value is in the history list (empty string otherwise).
125 One could use the eval() function to re-evaluate the command.
127 * Allow one to optionally restore the command number to calc
128 prompts. When going back in the history list, indicate the
129 command number that is being examined.
131 The command number was a useful item. When one is scanning the
132 history list, knowing where you are is hard without it. It can
133 get confusing when the history list wraps or when you use
134 search bindings. Command numbers would be useful in
135 conjunction with positive args for the history() and histval()
136 functions as suggested above.
138 * Add a builtin that returns the current command number.
143 returns the current command number.
145 This would allow one to tag a value in the history list. One
146 could save the result of cmdnum() in a variable and later use
147 it as an arg to the histval() or history() functions.
149 * Add a factoring builtin functions. Provide functions that perform
150 multiple polynomial quadratic sieves, elliptic curve, difference
151 of two squares, N-1 factoring as so on. Provide a easy general
152 factoring builtin (say factor(foo)) that would attempt to apply
153 whatever process was needed based on the value.
155 Factoring builtins would return a matrix of factors.
157 It would be handy to configure, via config(), the maximum time
158 that one should try to factor a number. By default the time
159 should be infinite. If one set the time limit to a finite
160 value and the time limit was exceeded, the factoring builtin
161 would return whatever if had found thus far, even if no new
162 factors had been found.
164 Another factoring configuration interface, via config(), that
165 is needed would be to direct the factoring builtins to return
166 as soon as a factor was found.
168 * Allow one to config calc break up long output lines.
170 The command: calc '2^100000' will produce one very long
171 line. Many times this is reasonable. Long output lines
172 are a problem for some utilities. It would be nice if one
173 could configure, via config(), calc to fold long lines.
175 By default, calc should continue to produce long lines.
177 One option to config should be to specify the length to
178 fold output. Another option should be to append a trailing
179 \ on folded lines (as some symbolic packages use).
181 * Allow one to use the READ and WRITE commands inside a function.
183 * Remove or increase limits on factor(), lfactor(), isprime(),
184 nextprime(), and prevprime(). Currently these functions cannot
185 search for factors > 2^32.
187 * Add read -once -try "filename" which would do nothing
188 if "filename" was not a readable file.
190 ## Copyright (C) 1999 Landon Curt Noll
192 ## Calc is open software; you can redistribute it and/or modify it under
193 ## the terms of the version 2.1 of the GNU Lesser General Public License
194 ## as published by the Free Software Foundation.
196 ## Calc is distributed in the hope that it will be useful, but WITHOUT
197 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
198 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
199 ## Public License for more details.
201 ## A copy of version 2.1 of the GNU Lesser General Public License is
202 ## distributed with calc under the filename COPYING-LGPL. You should have
203 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
204 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
206 ## @(#) $Revision: 30.1 $
207 ## @(#) $Id: wishlist,v 30.1 2007/03/16 11:10:42 chongo Exp $
208 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/wishlist,v $
210 ## Under source code control: 1991/07/21 04:37:24
211 ## File existed as early as: 1991
213 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
214 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/