J
No, I'm sure your Usenet provider correctly indicated that I said "it's
not your grandfather's ASCII" and you then altered the quotation.
Your personal opinions of others are not the topic of this newsgroup. Do
you have anything Java-related to say?
Your personal opinions of others are not the topic of this newsgroup. Do
you have anything Java-related to say?
*sigh*
Will you people give it a FUCKING REST ALREADY?
Sheesh!
You've made your "point" (such as it is) already; there is no need for
endless carping repetitions of your *opinions*.
So you claim.
But even if there was some truth to that claim, where would
your typical user *get* these apps?
Lew said:In this forum people all the time try to make the claim that an OP meant
something not in the original post. For example, the other thread where the
OP asked how to produce a 'List <String1>' and everyone (except me) assumed
and argued that they *must* have meant 'List <String>', even though they took
great pains not to say so.
[...]
Better googling skills bark bark bark bark bark!
Bark bark bark bark bark bark bark bark bark!
If you jump up at me, I will take action to defend myself, and I
outmass all terriers by *at least* a factor of 20 to 1, so you *will*
get the raw end of it!
Bark bark bark bark bark bark bark bark bark bark bark bark bark bark
bark bark bark bark bark bark bark bark bark!
Bark bark bark bark bark bark bark bark bark bark bark bark bark bark
bark bark!
Bark bark bark bark bark bark bark bark bark bark bark bark bark bark
bark bark bark bark bark bark bark bark bark bark bark bark bark bark
bark bark bark bark bark bark bark bark bark bark bark bark bark bark
bark bark bark bark bark bark bark bark bark bark bark bark
bark bark bark bark bark bark bark bark bark bark bark bark bark bark
bark bark bark bark bark bark bark bark!
Bark!
Just how many fucking yappers ARE there around here anyway? Are there
actually any *human beings*, aside from myself, that are actually capable
of engaging in civil discourse and even sometimes disagreeing with what
somebody says *without* turning it into a personal fight full of barks,
growls, name-calling, and general hystrionics of a most unseemly nature?
Evasion noted. But people don't use i to play games or fileshare or run
web services, which are the most usual places I see Java being used. They
play Java games on Java phones and Windows, fileshare with Limewire on
(mainly) Windows, and run Java web services on Unix.
What do people do on i boxes?
Then I do hope you will drop this particular part of the argument now.
But it's entirely in-band structure. Line breaks are a natural part of
texts.
But you're looking at the wrong unit of granularity here. A line
delimiter is part of the *text* itself. But a count prefix is not. Read a
page of a novel. You will notice many line breaks, but no count prefixes,
if your selection was at all typical.
I suppose you're right, and my idea was basically a buffered backwardsThat's a form of seeking backwards.
I suppose you're right, and my idea was basically a buffered backwards seek.
If so, then that editor is broken. And if you edit it on a working editor
(say, by mounting the file system over the network and using vi on it
from the comfort of your nice, sane Unix work station)
Not at all.
Because market share is counted in dollars.
It bloody well is not!
Or are you saying that non-commercial distributions of Linux have zero
market share *by definition*?
In this forum people all the time try to make the claim that an OP meant
something not in the original post. For example, the other thread where
the OP asked how to produce a 'List <String1>' and everyone (except me)
assumed and argued that they *must* have meant 'List <String>', even
though they took great pains not to say so.
So I would expand your advice to add that one eschew assuming anything
outside the problem statement.
Beyond that, because this is a discussion forum and not a help desk, it
is entirely appropriate to discuss the general applicability of
principles elicited from a specific problem. Thus, even if the OP did
want to speak only of log files, it is important and highly relevant to
point out that "text files" (about which they actually did ask) have a
wider and fuzzer meaning that certain ignorant trolls would believe.
It is pretty much meaningless unless you're referring to the way a
programs handles data. Consider a file containing nothing but printable
characters:
- if a C or Java program reads the file byte by byte or parses it
by reading words separated by whitespace then line delimiters are
utterly meaningless and the program doesn't care whether the file
contains records or not.
- OTOH if a different program reads the same file a line at a time, e.g
C using fgets(), Java using BufferedReader.readLine(), then this is
pure record-level access.
But the text file itself is not "record-based". You can implement a
record-based format *on top of text* -- CSV goes further that way -- but
the resulting file, crucially, can still be manipulated with tools
designed for generic operations on arbitrary text files properly. In
particular, this should be lossless on it:
import java.io.*;
public class TextFileCopier {
public static void main (String[] args) throws IOException {
if (args.length< 3) {
System.out.println("Please specify source and" +
"destination file.");
return;
}
File f = new File(args[1]);
InputStream is = new FileInputStream(f);
Reader rdr = new InputStreamReader(is);
File g = new File(args[2]);
OutputStream os = new FileOutputStream(g);
Writer wtr = new OutputStreamWriter(os);
int c;
while ((c = rdr.read()) != -1) wtr.write(c);
}
}
But this won't be lossless on the strange file formats Arne has become
obsessed with. At the reading stage, the record boundaries in those file
formats will be translated into some newline character or another, likely
\u000A. When that happens, the distinction between those and literal
\u000A characters in the source file will be lost and can never be
regained.
Surely you agree that a file format cannot be regarded as a true text
file format unless the above TextFileCopier can copy all files in that
format faithfully?
I suggest you look at Java BufferedReader readLine, Pascal readln etc. -
they do not return the line break as part of the line.
So which is it -- a tar-like archive of multiple text files, each with
internal newlines, or a single text file with a funny representation of
newlines? Arne indicated the latter while you seem to be indicating the
former.
Of course, neither are true text files -- both fail the TextFileCopier
test, in particular, and yours doesn't even pass the most elementary
sniff test -- calling that a text file would be like expecting
They belong to the Unicode (and indeed even the base ASCII) character
set, so by definition they *can* be included in text files.
Oddly, Pythons's file.readline() does. I believe it's so that readline()
is the inverse of write(), which does not add a line terminator. You
might think that it would be more sensible that readline() should strip
the terminator, and that there should be a writeline() that adds one,
but that's not how it is.
Now, who can point me at this atypical novel with count prefixes?
Don't get me wrong - your idea is quite good.
No. Those editors, at minimum, will strip some information from the file,
even if you just open it and then save out a copy. If the original had my
hypothetical hidden message "the attack begins at midnight" encoded in a
pattern of actual 0x0A characters and record boundaries, the output will
not, and will generally have converted all 0x0A characters in the
original into record boundaries specifically, in that
foo<0x0A>bar<boundary>baz
would probably have ended up in the vi buffer (or emacs buffer, or
whatever) as
foo<0x0A>bar<0x0A>baz
ArrayList said:and then output would be converted to
foo<boundary>bar<boundary>baz.
If a text editor like vi cannot losslessly load and re-save the file then
it is not a text file by any sane definition, including particularly
Arved's pretty darn good definition.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.