zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: db module
Date: Sun, 6 Oct 2002 13:03:53 -0400	[thread overview]
Message-ID: <20021006170353.GA531@dman.com> (raw)
In-Reply-To: <1021006164658.ZM11928@candle.brasslantern.com>

> It would seem to me that all of this stuff can be accomplished by the
> equivalent of ksh discipline functions (plus, in the DB case, a module
> to do the actual database access).  Rather than implementing each of
> these things as different typeset variants, we should work on adding
> discipline functions.

So, if I grasp the concept correctly, one could do something like

db.get() { .sh.value=$(db_get thisdb "$.sh.subscript"); }
print $db[key]

> (Was it Andrej who's working on a parameter code rewerite?)

Oliver, I thought.  Maybe both of them.

> You mean "print $twice[2]", yes?

Yes.

> On Oct 6,  8:24am, Hans Dieter Pearcey wrote:
> } Subject: Re: db module
> }
> } However, if the function got an extra argument when an element was
> } assigned to, it could be pretty neat, e.g.:
> } 
> } f() { [ "$2" ] && echo $2 > $1; cat $1 }
> 
> I confess to having no idea what that's supposed to mean.

I think he's trying to say that var[5]=xyz would call $(f 5 xyz).
Only I don't know what the cat's about.

Using var.set() would seem much cleaner.


  reply	other threads:[~2002-10-06 17:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-30 14:39 Oliver Kiddle
2002-10-02  7:37 ` Clint Adams
2002-10-06  5:32 ` Clint Adams
2002-10-06 12:24   ` Hans Dieter Pearcey
2002-10-06 16:46     ` Bart Schaefer
2002-10-06 17:03       ` Clint Adams [this message]
2002-10-06 17:14         ` Bart Schaefer
2002-10-06 17:31           ` Clint Adams
2002-10-06 20:19             ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2002-10-07 13:58 Oliver Kiddle
2002-09-12  5:19 Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021006170353.GA531@dman.com \
    --to=clint@zsh.org \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).