[Info-vax] Removing the leading $ from commands in a new DCL language
Paul Sture
nospam at sture.ch
Wed May 20 04:38:19 EDT 2015
On 2015-05-19, Simon Clubley <clubley at remove_me.eisner.decus.org-Earth.UFP>
wrote:
> On 2015-05-08, Paul Sture <nospam at sture.ch> wrote:
>>
>> Moving on to something more recent, IPython has log replay
>> functionality. See "Session logging and restoring" at
>>
>><http://ipython.org/ipython-doc/stable/interactive/reference.html>
>>
>> Now *that* type of functionality could be very useful in "New DCL",
>> whether it be used for simple regression testing[3] or auditing.
>>
>
> Yes, that's nice.
>
> It sort of looks like sourcing a file in bash if you had the ability
> to select the starting and finish point for the commands to write
> out in the current bash session (and to write them to something other
> than $HISTFILE of course).
IPython has the concept of profiles, which are implemented as
subdirectory trees of ~/.ipython. Amongst other things in there is
a per-profile SQLite database which stores the command history. This is
what the history database contains:
sqlite> .schema
CREATE TABLE sessions (session integer
primary key autoincrement, start timestamp,
end timestamp, num_cmds integer, remark text);
CREATE TABLE history
(session integer, line integer, source text, source_raw text,
PRIMARY KEY (session, line));
CREATE TABLE output_history
(session integer, line integer, output text,
PRIMARY KEY (session, line));
The inclusion of the raw source text as well as the source text
is intuitively a useful thing to have, though I don't currently
have any examples that demonstrate this.
While we are here, Julia's command history has timestamps, e.g
# time: 2015-05-17 20:03:14 CEST
# mode: julia
z = open(readall, "data.txt")
# time: 2015-05-17 20:04:00 CEST
# mode: julia
typeof(z)
If you are wondering about the syntax of that open command, the readall
clause sucks the file in in one go and does the close for you. I/O out
of the way, you can devote your attention to the data, not how to get
it in.
--
Nobody has demonstrated a HTTP/2.0 implementation that approached
contemporary wire speeds. -- Poul-Henning Kamp
<http://queue.acm.org/detail.cfm?id=2716278>
More information about the Info-vax
mailing list