From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16334 invoked from network); 1 Dec 1996 14:21:48 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 1 Dec 1996 14:21:48 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id JAA05581; Sun, 1 Dec 1996 09:02:42 -0500 (EST) Resent-Date: Sun, 1 Dec 1996 09:02:42 -0500 (EST) From: Zefram Message-Id: <9971.199612011402@stone.dcs.warwick.ac.uk> Subject: Re: Autoloading of compctl from dbm database file. To: schaefer@brasslantern.com Date: Sun, 1 Dec 1996 14:02:51 +0000 (GMT) Cc: zefram@dcs.warwick.ac.uk, fclim@singnet.com.sg, zsh-workers@math.gatech.edu In-Reply-To: <961130151728.ZM16366828@srf-75.nbn.com> from "Bart Schaefer" at Nov 30, 96 03:16:26 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]8507.92 X-US-Congress: Moronic fuckers Content-Type: text Resent-Message-ID: <"Tpkno.0.7N1.__Oeo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2505 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >Seems to me that this idea has "module" written on it, in large flashing >purple neon letters. That it does. But autoloading will require some changes to the base code anyway. >Compctls aren't very expensive to store either, are they? The slow >part of loading compctls and functions is parsing. If we're going >to introduce a database, we might as well also introduce a binary >storage format and put pre-"compiled" functions, compctls, etc. in >there. Using a database just to store text that zsh then has to parse >and execute anyway doesn't seem very helpful. True. Interpretation of byte-compiled compctls could be done entirely in a module. And if we're going to abandon autoloading, there's no real point in using a database. How about an interface like % compctl -L exec compctl -l '' exec % bcompctl -L exec bcompctl '35!^Az^@^@^@' exec % bcompctl '35!^Az^@^@^@' command % compctl -L command compctl -l '' command That is, bcompctl does the same job as compctl, but using a byte- compiled form instead of the normal options. "bcompctl -L > file" could be used to save byte-compiled compctls in a form that can be sourced quickly later. The challenge is to come up with a binary form of compctls that is architecture- and version-independent, and can be turned into the internal form rapidly without risking a crash. This is getting pretty far from the original idea of a database. -zefram