From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11184 invoked by alias); 22 Feb 2017 09:10:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40614 Received: (qmail 11784 invoked from network); 22 Feb 2017 09:10:53 -0000 X-Qmail-Scanner-Diagnostics: from new1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.221):SA:0(-0.4/5.0):. Processed in 1.452044 secs); 22 Feb 2017 09:10:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint2@fastmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.221 as permitted sender) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=SGe5bf0ciTAxVW5PuGBdCkO7LM o=; b=cbXVHOfuPOS93nFjLsFlBUXsGiwYfA7QDemjmQvwImdOgso9m+iKBSt3QN lYgrZBKilvkEg0NVXcFV7OukkFHqWxQZ45WeUk/Hfyk5qdPl+wFpPXONDfXk8MOf FMaaI58ty7RhMuBGqvyhFLlwub7I0cie3pUC682Gj5yvqLZ5U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=SG e5bf0ciTAxVW5PuGBdCkO7LMo=; b=mo3Irg2NdAk2yGkhoFQo0BHKL8c4a5jezI 14eZEbqqXXE1O/NsNqPxE5VfqmI+I6xH4RZCXh6c20j3uuPLCnqmn6j+F5ws/QMN 5UCjbekTwXQj6/BOL1aL1imaWZqwad3WguLW9UAn1Pajh8/1ANyI86fWeY6cnFYs Y+6BiTRdk= X-ME-Sender: Message-Id: <1487754648.2910142.888918792.4BD9197F@webmail.messagingengine.com> From: Sebastian Gniazdowski To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-715c2c0c In-Reply-To: <170221204132.ZM15938@torch.brasslantern.com> Date: Wed, 22 Feb 2017 01:10:48 -0800 Subject: Re: Gdbm module References: <170221092506.ZM14329@torch.brasslantern.com> <1487706736.1879125.888350120.03C172EE@webmail.messagingengine.com> <170221204132.ZM15938@torch.brasslantern.com> On Tue, Feb 21, 2017, at 08:41 PM, Bart Schaefer wrote:=20 > Depends entirely on the licensing Oracle specifies. It's GNU Affero General Public License. Apparently it's like GPL, but aimed at resolving issues with server software "distributed" (that's the point) over network. Just built it, configure runs fast, compilation is long (2:35) but code is C. > ztie -d db/sqlite -Q "SELECT ..." ... queryresult >=20 > and define queryresult in a manner similar to the way Perl DBI does > with fetchall_hashref. Interesting, it assumes single row to be selected in Zsh conditions, as far I understand. It is towards "tie", close or at conforming ztie. > This theoretical -Q option could be extended to GDBM as a way to > filter the set of keys fetched so the hash does not have to load the > entire dbmfile. However, at first we might prefer to restrict things > to flatter single-table access. If a way of specifying keys would have been developed (in above it's for filtering keys) it could be also used to stick ~PM_UPTODATE to that keys. This might somehow translate to SQL. Interesting. Not that I want to patch my up-to-date solution, it allocates via zalloc() and hashtable is always in good shape, previous code was doing hcallloc() and returning internal GDBM string pointers. > Also note I'm only trying to offer some guidelines here; I've seen no > evidence that this is needed or more than academically interesting. I've found use case. Turns out managing plugins via zshrc is rather a pain. If I want to disable single plugin for a while, then `vim ~/.zshrc`, search, comment =E2=80=93=C2=A0it's much tiring. I will provide = TUI configurator for Zplugin. Each plugin will have .gdbm file. For TUI I will use my 70% finished Zcurses UI library: https://asciinema.org/a/aner2l63zm6bhmie3nxy3jkc7 It's based on (z) flag :) Having a text-box will mean "zcurses string win ${(q)text}", i.e. quoting, but that's shellish. Bottom line is =E2=80=93 it might be possible to map some of Zshrc to gdbm = file, to be able to avoid whole `vim ~/.zshrc`, search, etc. cycle. Provided that the cycle is really tiring. So developing DBM modules would be boosted. I would go for writing new module now, to hold ztie, zuntie, ... and route to db_gdbm, but I'm busy with the ZUI lib. Maybe there's time before next release. Good that gdbm is a gem, but Oracle dbm is also very interesting, then there's the "non-existent" Berkley DB (it's probably installed on FreeBSD, a ghost software if not available via tarball with configure, I couldn't find it). --=20 Sebastian Gniazdowski psprint2@fastmail.com