Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Re:Please... (Score 1) 106

I work daily with humongous text files. I have found no other editor that performs as well when you work with text files that are in several gigabytes range.

Not in Debian (or maybe all of Linux?) it doesn't.

Sorry, I view that link you gave as less of a bug report than a Twit Alert. Seriously, when was the last time you ran across a 2.7 GB file of nulls and thought of it as a text file to be edited?

The relevant section of the Vim docs explains that the maximum length of a line and the maximum number of lines per file depends on the local size of long integers, typically 32 bits. So if your box is limited to 2G lines per file and 2GB per line, is it any wonder there's an error message upon encountering 2.7 GB of nulls?

This evening I edited a 3.1 GB text file (generated from the dictionaries on my Ubuntu 8.04.2, AKA Debian Linux box) without any problems at all. 334M lines of text, averaging what, 9 characters per line? So to run into vim's limit I'd have to be editing close to 20 GB of dictionary words. Or for 90-character log file line lengths, somewhere in the vicinity of 200 GB of text.

So. no, I don't think that special case of a null file warrants real-world concern.

Tyler

Comment Re:Please... (Score 1) 106

"sed" - could work, but why bother if vim works? Personally, I can never remember the sed syntax.

*sputters* You can't remember the sed syntax? It's the same as vi.

Mostly likely, if you're editting a several gig text file, you're doing bulk edits, not single edits. ala:

:%s/hamburger/cheeseburger/g

A perfectly good point, unfortunately marred by the remarks that follow.

Mostly likely, if you're editting a several gig text file, you're doing bulk edits, not single edits.

You're assuming conditions not previously specified. What if the poster only changes hamburger to cheeseburger depending on the values of relish and pickle on nearby lines? Are you one of those manly men who use sed to repair mismatched braces in your source files?

My point being that if the previous posters in the subthread find vim satisfactory for the problems they're thinking of, it might be because they understand their typical problems better than you do.

And since vi is just a fancy tui on top of ed, you already know sed.

Why bother? Just because vi can edit large files, it's still painfully slow. Large and/or many edits are very slow to apply and undo. The same commands executed in sed can be done order of magnitude faster.

Yes, if they're bulk edits. But it depends on the context. The last time I looked through the sed man pages I missed the part that covered "query changes" and "undo".

Finally, your experiences with the performance of vi are pretty much irrelevant to a thread on vim. I just used vim on a 3.1 GB text file this evening in a test. Loading and saving the file took a while, but once the file had loaded moving from one end to another, searching for strings, making edits, etc. were pretty damn fast. Not appreciably slower than I've experienced with 100k text files, in other words.

Tyler

Comment Dodgy history (Score 1) 220

Others have remarked on the dubious idea of equating a decline in watching television with a "cognitive surplus" that will transform society.

My pet peeve lies with Shirky's Web 2.0 presentation and his taking huge licenses with history. He starts off a claim about the importance of gin in helping Brits get over their future shock at the beginning of the Industrial Revolution and links it to his point thusly:

"And it wasn't until society woke up from that collective bender that we actually started to get the institutional structures that we associate with the industrial revolution today. Things like public libraries and museums, increasingly broad education for children, elected leaders -- a lot of things we like -- didn't happen until having all of those people together stopped seeming like a crisis and started seeming like an asset."

One big problem with that assessment is that the chronology doesn't fit his thesis. Municipal public libraries, for example, started appearing in the US and UK in the early 1600s -- a century and a half before the Industrial Revolution. The British gin boom had a lot to do with tax policies and occurred at least a generation before the IR. And if by elected leaders he means an elected head of state (the House of Commons idea had been around long before the IR), it seems a tenuous link at best. The US Constitution is in roughly the same time frame as the start of the IR, but the new country was hardly overwhelmed with and reacting to issues of industrialization.

My conclusion: if he has such a loose grasp of history, why should I give any credence to his take on the future?

Tyler

Censorship

Submission + - Livejournal extends censorship to linked content (livejournal.com)

An anonymous reader writes: Many of you might remember the previous story about Livejournal erroneously deleting hundreds of users as suspected paedophiles, spurred on by pressure from right-wing group Warriors for innocence. Since then, they've been taking action against users hosting material on their servers that they believe to be illegal. Today, Livejournal management have demonstrated a serious lack of understanding in how the internet works, declaring that users are responsible for the content of the webpages that they link to in their blog entries. A user points out the obvious flaw; "I get ToS'd because the link's been redirected to a page full o' porn, even though context clearly shows that when I originally put up the link that it didn't actually land on a page of porn?". One wonders how such a long-established blogging company be so ignorant about the nature of the world wide web?

Slashdot Top Deals

"Just the facts, Ma'am" -- Joe Friday

Working...