sks-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sks-devel] Support per something like pksclient


From: Phil Pennock
Subject: Re: [Sks-devel] Support per something like pksclient
Date: Fri, 25 May 2012 10:53:00 -0400

On 2012-05-25 at 13:14 +0200, Kristian Fiskerstrand wrote:
> Ok, I've pushed it to my repo for now, so it is available at [0].
> 
> Note that if it is to be used for high-frequency jobs, another approach
> should probably be considered than opening and closing the DB each
> time. And not doing any validation at this time, so input has to be
> proper.

Attached patch for sksclient.ml lets it take multiple keys on argv and
strips an optional 0x from the front of a keyid.

I only ever learnt any O'Caml for SKS and I'm struggling to remember the
little I learnt last time.  I'm trying to figure out how to create the
equivalent of a Python "generator function", which lets a function
return an iterable object.  The idea being that the startup bit looking
at Sys.argv could check if Sys.argv[1] = "-" and then return something
which iterates over stdin, returning a line at a time (stripping
whitespace) otherwise returning each element of Sys.argv from 1 to the
end.

After all, if Sys.argv won't do then it'll be because of the limits on
size of argv+envp in Unix, so stdin is potentially large, so reading all
of stdin at once is unwise.

I'm trying another approach now but am running into "This expression is
not a function; it cannot be applied" and so am sending what I have that
works.

-Phil

Attachment: sksclient_multiple.diff
Description: Text Data

Attachment: pgpyHAk9zTkLM.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]