The problem I have with "my kind of splitting a line" is not that it
 does not work -- it is the "deadly side effect" it caused.

 My opinion is, that it should not be possible to "kill a system"
 (...too big words, I know, but...) by simply submitting
 a sub-optimal command to a text editor.

As you killed it, there's no way to know if the process would have been seen to completion. *nix-like OSes shouldn't allow you to drag the system to its knees without affording other processes (such as X) timeslices of the CPU. You didn't mention how much memory your system has, but the specs are otherwise well within tolerances. I suspect you may have found a pessimal (opposite of "optimal") solution to your problem and that Vim+Gentoo would have happily carried out your instructions, even if it involved heaps of memory and hours of CPU burn. Additionally, as your line(s) got shorter, I suspect the time to process each subsequent line would diminish.

So no, in general, it shouldn't "kill a system", but it sounded like your system was doing exactly what you asked of it. X responded (albeit slowly) and you were able to get to a console and start bustin' heads. That's kudos to an OS that can be functional even under heavy load. It also sounded like Vim was doing what you asked of it (though perhaps not optimally), which caused it chug on the CPU.

It would be akin to writing a Python program that spun in a tight infinite loop:

        while True: pass

and dragged your system to its knees...it's not Python's problem per-se, as it's your script/commands that are the problem. Thus, I recommend a "better" algorithm, such as a ":s" as suggested before.

Just my perspective.

-tim



Reply via email to