DIS: A short eulogy for a Python script

2009-08-26 Thread comex
A few days ago, I mistakenly untarred a large bunch of files into my
home directory.  I tried to delete the files by piping the output of a
listing to xargs rm -r... I had a bit too much success.  The first
entry in the list was '.', and a significant chunk of my home
directory was deleted...

I was working on a system intended to compete with BobTHJ's
Agora-tracking database, and had completed a large chunk of
functionality before the incident.  It looked like this:

A web page amounted to a simple email client; two panes, on the left a
list of public messages, on the right the message view, and a text box
to edit the message's effects.  The main script was written in Python,
and evaluated the gamestate by starting at a base state, then going
through each message sequentially and running its associated code.
For, say, economic actions, the associated code would be an idiomatic
snippet to harvest a crop or transfer a currency or whatever.  For a
rules change, the associated code would load a new version of the
relevant module(s).

Thus, in theory, all platonic actions would be tracked through the
system; if the success of an action was ambiguous, you could simply
comment or uncomment the action, have all future actions recalculated
and get a current report.  The usefulness of this might be limited in
practice, but I think it's a very interesting goal.

More practically, as in this system you would recordkeep an action by
going to the specific message and noting its effects, responsibilities
could be divided in time rather than space.  Rather than having an IBA
recordkeepor and an AAA recordkeepor and so on, anyone involved could
take care of the outstanding messages, avoiding duplicate work...

Anyway, it wasn't complete, and the system may well have been
overambitious-- might have collapsed under its own weight-- but losing
the data before I could even try it out sucks.  And I really don't
feel like rewriting it all, so I'm giving up on economic automation
for now.

-- 
-c.


Re: DIS: A short eulogy for a Python script

2009-08-26 Thread Elliott Hird
2009/8/27 comex :
> A few days ago, I mistakenly untarred a large bunch of files into my
> home directory.  I tried to delete the files by piping the output of a
> listing to xargs rm -r... I had a bit too much success.  The first
> entry in the list was '.', and a significant chunk of my home
> directory was deleted...

Do I *really* have to say the obvious thing right now? I would like to
say the obvious thing right now. Also, try ext3grep or whatever; one
o' them thingies.


Re: DIS: A short eulogy for a Python script

2009-08-27 Thread Kerim Aydin

On Thu, 27 Aug 2009, Elliott Hird wrote:
> 2009/8/27 comex :
>> A few days ago, I mistakenly untarred a large bunch of files into my
>> home directory.  I tried to delete the files by piping the output of a
>> listing to xargs rm -r... I had a bit too much success.  The first
>> entry in the list was '.', and a significant chunk of my home
>> directory was deleted...
>
> Do I *really* have to say the obvious thing right now? I would like to
> say the obvious thing right now. Also, try ext3grep or whatever; one
> o' them thingies.

No, no, it's hopeless.  And the obvious wouldn't have mattered.  Once a 
system crosses a certain threshold of attempting to track a certain % of 
the platonic gamestate, it releases The Curse of Agora.





Re: DIS: A short eulogy for a Python script

2009-08-27 Thread ais523
On Thu, 2009-08-27 at 06:27 -0700, Kerim Aydin wrote:
> On Thu, 27 Aug 2009, Elliott Hird wrote:
> > 2009/8/27 comex :
> >> A few days ago, I mistakenly untarred a large bunch of files into my
> >> home directory.  I tried to delete the files by piping the output of a
> >> listing to xargs rm -r... I had a bit too much success.  The first
> >> entry in the list was '.', and a significant chunk of my home
> >> directory was deleted...
> >
> > Do I *really* have to say the obvious thing right now? I would like to
> > say the obvious thing right now. Also, try ext3grep or whatever; one
> > o' them thingies.
> 
> No, no, it's hopeless.  And the obvious wouldn't have mattered.  Once a 
> system crosses a certain threshold of attempting to track a certain % of 
> the platonic gamestate, it releases The Curse of Agora.
> 
Incidentally, this sort of thing is the reason that nowadays I set my
editors to save backups in a completely different directory to the
actual file, although it wouldn't have helped in this case.

-- 
ais523



Re: DIS: A short eulogy for a Python script

2009-08-27 Thread comex
On Wed, Aug 26, 2009 at 11:55 PM, Elliott
Hird wrote:
> 2009/8/27 comex :
>> A few days ago, I mistakenly untarred a large bunch of files into my
>> home directory.  I tried to delete the files by piping the output of a
>> listing to xargs rm -r... I had a bit too much success.  The first
>> entry in the list was '.', and a significant chunk of my home
>> directory was deleted...
>
> Do I *really* have to say the obvious thing right now? I would like to
> say the obvious thing right now. Also, try ext3grep or whatever; one
> o' them thingies.

It was on my Mac, but I tried some data recovery software, no avail,
tried strings, but by that time I'd probably overwritten it.  This is
the kind of thing I shouldn't have to do.  There's no good reason rm
shouldn't be reversible... I think I'm going to switch /home/comex and
/usr/src on my desktop to ext3cow.

-- 
-c.


Re: DIS: A short eulogy for a Python script

2009-08-27 Thread Ian Kelly
On Thu, Aug 27, 2009 at 8:05 AM, ais523 wrote:
> Incidentally, this sort of thing is the reason that nowadays I set my
> editors to save backups in a completely different directory to the
> actual file, although it wouldn't have helped in this case.

This sort of thing is the main reason I use a VCS running on an
entirely separate system.

-root


Re: DIS: A short eulogy for a Python script

2009-08-27 Thread Elliott Hird
2009/8/27 comex :
> It was on my Mac, but I tried some data recovery software, no avail,
> tried strings, but by that time I'd probably overwritten it.  This is
> the kind of thing I shouldn't have to do.

Buy an external HD for like $50 and set it up with time machine.

> There's no good reason rm shouldn't be reversible... I think I'm going to 
>switch /home/comex and /usr/src on my desktop to ext3cow.

I'm a huge proponent of ubiquitous, permanent versioning of every
single change to every object in a system.

One day I'll get to you, my perfect OS. One day.