<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello!<br>
<br>
This will have to wait for a technical board meeting. I will let you
know as soon as the meeting has been held.<br>
<br>
<br>
Thank you for the contribution!<br>
<br>
<br>
On 02/09/2012 04:24 AM, Fred Hebert wrote:
<blockquote
cite="mid:CA+R0eySqOQnsVwx0FkZ4ikTKnZJpRKjze+TAeCTKZ2R7o6+y-A@mail.gmail.com"
type="cite">
<div>Hi there,<br>
</div>
<div><br>
</div>
<div>I have made a hack named erlang-history available a few
months ago and since then I've kept maintaining it in a public
repo on github (<a moz-do-not-send="true"
href="https://github.com/ferd/erlang-history">https://github.com/ferd/erlang-history</a>).</div>
<div><br>
</div>
<div>It's basically just a small modification to kernel/group.erl
and a new module called group_history.erl. I've used DETS tables
at this point in time, as it was (at first) easy to store stuff
that way. The old requests are injected into the shell when it
first starts up (and it does so for all instances of the shell
on a given node). They're saved to disk when the command
stack/zipper gets saved after a new line.</div>
<div><br>
</div>
<div>The other reason for using DETS, aside for not reinventing
stuff, is that it's part of stdlib, which is always there
anyway. The only downside is that repairing DETS tables uses the
group leader and when the group.erl group leader calls it, it
can get stuck in a loop -- that's accounted for in the code.</div>
<div><br>
</div>
<div>Anyway, it also supports a full set of options, added to
'kernel': number of lines saved, where to save them, terms to
drop from history, etc. They're described in the README of the
repository.</div>
<div><br>
</div>
<div>To make a long story short, I'm wondering if this kind of
material has any chance of making it into OTP proper, rather
than just being a hack/patch to apply after installing Erlang.</div>
<div><br>
</div>
<div>I know there are no tests, but then, group.erl also has no
tests and it's difficult to test it all (which I figure could
make the OTP team reluctant to including it). I could add tests
for the group_history.erl module itself if required though, but
some features would definitely be hard to properly test (such as
the group leader stuff above).</div>
<div><br>
</div>
<div>Regards,</div>
<div>Fred Hebert.</div>
<div><br>
</div>
<div><br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-patches mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-patches@erlang.org">erlang-patches@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-patches">http://erlang.org/mailman/listinfo/erlang-patches</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
/Henrik Nord Erlang/OTP</pre>
</body>
</html>