Blame TODO

Packit 575503
Mon Jul  3 21:05:03 IDT 2017
Packit 575503
============================
Packit 575503
Packit 575503
There were too many files tracking different thoughts and ideas for
Packit 575503
things to do, or consider doing.  This file merges them into one. As
Packit 575503
tasks are completed, they should be removed.
Packit 575503
Packit 575503
This file should exist only in the master branch or branches based off
Packit 575503
of it for development, but not in the stable branch. This may require some
Packit 575503
careful work with Git.
Packit 575503
Packit 575503
TODO
Packit 575503
====
Packit 575503
Packit 575503
Minor Cleanups and Code Improvements
Packit 575503
------------------------------------
Packit 575503
Packit 575503
	API:
Packit 575503
		??? #if !defined(GAWK) && !defined(GAWK_OMIT_CONVENIENCE_MACROS)
Packit 575503
Packit 575503
	?? Add debugger commands to reference card
Packit 575503
Packit 575503
	Look at function order within files.
Packit 575503
Packit 575503
	Consider removing use of and/or need for the protos.h file.
Packit 575503
Packit 575503
	Recheck if gnulib regex can be dropped in
Packit 575503
Packit 575503
	Fully synchronize whitespace tests (for \s, \S in Unicode
Packit 575503
	environment) with those of GNU grep.
Packit 575503
Packit 575503
	See if something like  b = a "" can be optimized to not do
Packit 575503
	a concatenation, but instead just set STRCUR on a.
Packit 575503
Packit 575503
Minor New Features
Packit 575503
------------------
Packit 575503
Packit 575503
	Enable command line source text in the debugger.
Packit 575503
Packit 575503
	Enhance extension/fork.c waitpid to allow the caller to specify
Packit 575503
	the options.  And add an optional array argument to wait and
Packit 575503
	waitpid in which to return exit status information.
Packit 575503
Packit 575503
	Consider relaxing the strictness of --posix.
Packit 575503
Packit 575503
	? Add an optional base to strtonum, allowing 2-36.
Packit 575503
Packit 575503
	? Optional third argument for index indicating where to start the
Packit 575503
	search.
Packit 575503
Packit 575503
Major New Features
Packit 575503
------------------
Packit 575503
Packit 575503
	Think about how to generalize indirect access. Manuel Collado
Packit 575503
	suggests things like
Packit 575503
Packit 575503
		foo = 5
Packit 575503
		@"foo" += 4
Packit 575503
Packit 575503
	Also needed:
Packit 575503
Packit 575503
		Indirect through array elements, not just scalar variables
Packit 575503
Packit 575503
	Add ability to do decimal arithmetic.
Packit 575503
Packit 575503
	Rework management of array index storage. (Partially DONE.)
Packit 575503
Packit 575503
	Consider using an atom table for all string array indices.
Packit 575503
Packit 575503
	DBM storage of awk arrays. Try to allow multiple dbm packages.
Packit 575503
Packit 575503
	?? A RECLEN variable for fixed-length record input. PROCINFO["RS"]
Packit 575503
	would be "RS" or "RECLEN" depending upon what's in use.
Packit 575503
	*** Could this be done as an extension?
Packit 575503
Packit 575503
	?? Use a new or improved dfa and/or regex library.
Packit 575503
Packit 575503
	Rewrite in C++.
Packit 575503
Packit 575503
Things To Think About That May Never Happen
Packit 575503
-------------------------------------------
Packit 575503
Packit 575503
	Consider making shadowed variables a warning and not
Packit 575503
	a fatal warning when --lint=fatal.
Packit 575503
Packit 575503
	Similar for extra parameters in a function call.
Packit 575503
Packit 575503
	Look at code coverage tools, like S2E: https://s2e.epfl.ch/
Packit 575503
	
Packit 575503
	Try running with diehard. See http://www.diehard-software.org,
Packit 575503
	https://github.com/emeryberger/DieHard
Packit 575503
Packit 575503
	Implement namespaces.  Arnold suggested the following in an email:
Packit 575503
	- Extend the definition of an 'identifier' to include "." as a valid
Packit 575503
	  character although an identifier can't start with it.
Packit 575503
	- Extension libraries install functions and global variables with names
Packit 575503
	  that have a "." in them:  XML.parse(), XML.name, whatever.
Packit 575503
	- Awk code can read/write such variables and call such functions,
Packit 575503
	  but they cannot define such functions
Packit 575503
	 function XML.foo() { .. }	# error
Packit 575503
	  or create a variable with such a name if it doesn't exist. This would
Packit 575503
	  be a run-time error, not a parse-time error.
Packit 575503
	- This last rule may be too restrictive.
Packit 575503
	I don't want to get into fancy rules a la perl and file-scope visibility
Packit 575503
	etc, I'd like to keep things simple.  But how we design this is going
Packit 575503
	to be very important.
Packit 575503
Packit 575503
	Include a sample rpm spec file in a new packaging subdirectory.
Packit 575503
	(Really needed?)
Packit 575503
Packit 575503
	Patch lexer for @include and @load to make quotes optional.
Packit 575503
	(Really needed?)
Packit 575503
Packit 575503
	Add a lint check if the return value of a function is used but
Packit 575503
	the function did not supply a value.
Packit 575503
Packit 575503
	Consider making gawk output +nan for NaN values so that it
Packit 575503
	will accept its own output as input.
Packit 575503
		NOTE: Investigated this.  GLIBC formats NaN as '-nan'
Packit 575503
		and -NaN as 'nan'.  Dealing with this is not simple.
Packit 575503
Packit 575503
	Review the bash source script for working with shared libraries in
Packit 575503
	order to nuke the use of libtool. [ Partially started in the
Packit 575503
	dead-branches/nolibtool branch. ]
Packit 575503
Packit 575503
Things That We Decided We Will Never Do
Packit 575503
=======================================
Packit 575503
Packit 575503
	Consider moving var_value info into Node_var itself to reduce
Packit 575503
	memory usage. This would break all uses of get_lhs in the
Packit 575503
	code. It's too sweeping a change.
Packit 575503
Packit 575503
	Add macros for working with flags instead of using & and |
Packit 575503
	directly.
Packit 575503
Packit 575503
	FIX regular field splitting to use FPAT algorithm.
Packit 575503
		Note: Looked at this. Not sure it's with the trouble:
Packit 575503
		If it ain't broke...
Packit 575503
Packit 575503
	Scope IDs for IPv6 addresses
Packit 575503
Packit 575503
	Gnulib
Packit 575503
Packit 575503
	Make FIELDWIDTHS be an array?
Packit 575503
Packit 575503
	"Do an optimization pass over parse tree?"
Packit 575503
	This isn't relevant now that we are using a byte code engine.
Packit 575503
Packit 575503
	"Consider integrating Fred Fish's DBUG library into gawk."
Packit 575503
	I did this once as an experiment. But I don't see a lot of value
Packit 575503
	to this at this stage of the development. Stepping through things
Packit 575503
	in a debugger is generally enough. Also, I would have to try to
Packit 575503
	track down the latest version of this.
Packit 575503
Packit 575503
	"Make 	awk '/foo/' files...	run at egrep speeds" (How?)
Packit 575503
	This has been on the list since the early days (gawk 1.x or early
Packit 575503
	2.x).  But I am not sure how to really do this, nor have I done
Packit 575503
	timings, nor does there seem to be any real demand for this.
Packit 575503
Packit 575503
	Change from dlopen to using the libltdl library (i.e. lt_dlopen).
Packit 575503
	This may support more platforms.  If we move off of libtool
Packit 575503
	then this is the wrong direction.