 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
server Guest
|
Posted: Sat Feb 04, 2006 1:46 am Post subject: Java sucks, Perl Rules. |
|
|
message unavailable |
|
| Back to top |
|
 |
Tassilo v. Parseval Guest
|
Posted: Sat Feb 04, 2006 1:46 am Post subject: Re: Java sucks, Perl Rules. |
|
|
Also sprach Oliver Wong:
| Quote: | "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de> wrote in message
news:448ibnFt1gtU1 (AT) news (DOT) dfncis.de...
A number of well known, free libraries were available before that.
Libraries don't count. For something to be used on a larger scale, it
must be in the core of a language or else many people will avoid it in
order to keep the list of prerequisites short.
Most of "Java" is in the libraries. There is no facility directly in the
Java language for outputting text to the console or making a GUI window
appear for example; they're implemented in Sun's library.
|
The OP I was responding do did not refer to the library that ships with
a Java distribution but third-party modules.
| Quote: | However, it does show that a Perl programmer might be more inclined to
think in terms of regular expressions. One should add that the domain of
text-processing is a huge one. Programs that don't process text one way
or the other are extremely rare.
It's not a coincidence that compiler construction is nowadays a standard
lecture in computer science, as is automata theory and formal languages.
There you'll invariably stumble over REs.
The domain of "regular expressions" and the domain of "text-processing"
are not equal, though. In the general sense of text-processing that you're
speaking of here (e.g. "almost all programs do text-processing in one form
or another"), REs for only a tiny portion of it.
|
This is probably one of those points where a Java and a Perl programmer
will always disagree. Granted that REs might not suffice to do all of
the processing (well, strictly speaking they can only find patterns but
not process text by themselves) but I have yet to see a text processing
task in which you couldn't use REs to a beneficial extent.
| Quote: | Parsing XML with regex is just plain dumb. I've seen Perl programmers
attempt it though.
That was not at all what I was saying.
I think the confusion comes from mixing "text-processing" in the general
sense, and "text-processing" in the "what regular expressions do" sense.
I'm written programs in Java which manipulate XML documents. Did I need
to employ any of my knowledge on regular expressions when writing those
programs? No. Can the manipulation of XML documents be considered a form of
text-processing? Yes. Could regular expressions come extremely in handy in
the text processing? Yes. Is this a contradiction? No. Why? Because the two
times the term "text-processing" appear earlier in this paragraph refer to
two different concepts.
|
I think the confusion rather comes from the implicit contention that in
Perl all text processing is necessarily carried out using REs. A good
Perl programmer is probably more inclined to throw a RE at a problem
than anybody else. But that's only because the majority of programmers
of other languages never really grokked the concept and power behind
REs.
This has something to do with the fact that Perl integrated them so
tightly into the language with its own set of operators and idioms that
make them so convenient to use. Naturally, when I first have to create a
'Pattern' object which has to be asked explicitely to return me a
'Matcher' with well over 20 methods, then it's no surprise that such a
concept hasn't yet taken off in the Java camp.
Incidentally, it is the REs that have given Perl the reputation of being
a cryptic language: They show up in Perl code more often than in any
other language's code. Quite understandably.
| Quote: | Because of the limitations of XML you'll often see embedded
mini-languages. In some situations you might want to use regexs for
parsing that, but as a general mechanism for parsing languages it makes
little sense to let them escape from lexical analysis.
Exactly, the lexical analysis. Parsing any context-free language begins
with the lexical analysis as the tokens of such a language are almost
always regular. So there we have yet another domain in which they are
used: parsing context-free languages.
This is incorrect. Parsing context-free languages is beyond the
capabilities of regular expressions. Probably what you meant is *lexing* is
a domain in which regular expressions are used. A compiler will use REs to
lex a string of characters into a string of tokens. It will then use some
computational model more powerful than a regular expression to parse the
string of tokens.
|
This is precisely what I meant. When I write about domains in which
something can be used, I don't mean that it's used exclusively. Similar
to building a house: Tricky to do with only a hammer, but in the process
of so doing, a hammer is certainly used here or there and it's probably
very inconvenient if you don't have it around.
| Quote: | Note, BTW, that "regular expressions" in Perl are actually more
expressive than what "regular expressions" refers to in computational
theory.
|
This is correct.
Tassilo
--
use bigint;
$n=71423350343770280161397026330337371139054411854220053437565440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+= <=200); |
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Sat Feb 04, 2006 3:52 am Post subject: Re: hair shirt literals |
|
|
On Fri, 03 Feb 2006 13:59:48 GMT, "Oliver Wong" <owong (AT) castortech (DOT) com>
wrote, quoted or indirectly quoted someone who said :
| Quote: |
Just as a heads up, some locales (e.g. Asia), group digits in fours
instead of in threes. E.g. "1112'2233'3444", so you might want to have the
flexibility to allow grouping into arbitrary sizes.
|
The parsing is done before I upload resulting in either HTML or token
files.
There is probably something in locale or NumberFormat that knows the
preferred grouping if I were to delay that decision until run time.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching. |
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Sat Feb 04, 2006 3:56 am Post subject: Re: Stupid Number Parsing And How To Fix It |
|
|
On Fri, 03 Feb 2006 17:00:04 GMT, The Ghost In The Machine
<ewill (AT) sirius (DOT) tg00suus7038.net> wrote, quoted or indirectly quoted
someone who said :
| Quote: | 2.99792458e8;
2.997_924_58e8;
(Or [2.997,924,58e8]. See below.)
|
the problem with retrofitting Java source to allow commas in numbers
is that comma is already taken to separate parameters.
Is doit( 4,555 ) the same as doit( 4555 ) or doit ( 4, 555 ) ?
It is too late to insist on comma space for parameters. You could
offer a tidier, but I don't think Sun would dare break that much code.
You would then have the ambiguity -- has this program been converted
already to the new way.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching. |
|
| Back to top |
|
 |
The Ghost In The Machine Guest
|
Posted: Sat Feb 04, 2006 6:00 am Post subject: Re: Stupid Number Parsing And How To Fix It |
|
|
In comp.lang.java.advocacy, Roedy Green
<my_email_is_posted_on_my_website (AT) munged (DOT) invalid>
wrote
on Fri, 03 Feb 2006 22:56:07 GMT
<9mn7u15m2lufnd91hfnuctsbv5oak1srsk (AT) 4ax (DOT) com>:
| Quote: | On Fri, 03 Feb 2006 17:00:04 GMT, The Ghost In The Machine
ewill (AT) sirius (DOT) tg00suus7038.net> wrote, quoted or indirectly quoted
someone who said :
2.99792458e8;
2.997_924_58e8;
(Or [2.997,924,58e8]. See below.)
the problem with retrofitting Java source to allow commas in numbers
is that comma is already taken to separate parameters.
Is doit( 4,555 ) the same as doit( 4555 ) or doit ( 4, 555 ) ?
|
doit(4 555) might be preferable in that case.
| Quote: |
It is too late to insist on comma space for parameters. You could
offer a tidier, but I don't think Sun would dare break that much code.
|
java -oldcomma might work for such issues.
| Quote: |
You would then have the ambiguity -- has this program been converted
already to the new way.
|
doit( 4,555 ) would not be ambiguous to the computer, though
it might confuse the casual human code browser.
--
#191, ewill3 (AT) earthlink (DOT) net
It's still legal to go .sigless. |
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Sat Feb 04, 2006 9:01 am Post subject: Re: Stupid Number Parsing And How To Fix It |
|
|
On Sat, 04 Feb 2006 01:00:02 GMT, The Ghost In The Machine
<ewill (AT) sirius (DOT) tg00suus7038.net> wrote, quoted or indirectly quoted
someone who said :
| Quote: | already to the new way.
doit( 4,555 ) would not be ambiguous to the computer, though
it might confuse the casual human code browser.
|
the confusion who be a heavy price to pay -- paper listings, Internet
posts...
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching. |
|
| Back to top |
|
 |
Tor Iver Wilhelmsen Guest
|
Posted: Sat Feb 04, 2006 2:55 pm Post subject: Re: Java sucks, Perl Rules. |
|
|
"Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de> writes:
| Quote: | The OP I was responding do did not refer to the library that ships with
a Java distribution but third-party modules.
|
Does that also mean you do not count the libraries on CPAN when
talking about the qualities of Perl? |
|
| Back to top |
|
 |
Otis Mukinfus Guest
|
Posted: Sat Feb 04, 2006 10:04 pm Post subject: Re: Java finally has a fantastic gui builder |
|
|
On 3 Feb 2006 09:03:49 -0800, surabhi <surabhi (AT) example (DOT) com> wrote:
| Quote: | A while ago I evaluated Eclipse vs Visual Studio, and settled on
Visual Studio 2005. Eclipse is better in many ways, but the lack of
a gui builder was the deciding factor. Visual Studio 2005 has an
excellent gui builder. Eclipse doesn't, and in fact, none of the
Java IDEs had a half-decent gui builder. Our apps will have lots of
dialogs, and we didn't waste our careers hand-coding GridBagLayouts.
But the new NetBeans Java IDE has the best gui builder in the world.
From this demo at least, it seems to be ahead of Microsoft's GUI
builder even:
http://www.netbeans.org/files/documents/4/475/matisse.html
Too late for me though; we are not going back to Java.
What was your question? |
Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com |
|
| Back to top |
|
 |
Hal Rosser Guest
|
Posted: Sun Feb 05, 2006 2:38 am Post subject: Re: hair shirt literals |
|
|
"Roedy Green" <my_email_is_posted_on_my_website (AT) munged (DOT) invalid> wrote in
message news:ag05u15s5sbb2fj67lm9q4cnlas4gcuhv5 (AT) 4ax (DOT) com...
| Quote: | On Thu, 02 Feb 2006 21:57:52 GMT, Roedy Green
my_email_is_posted_on_my_website (AT) munged (DOT) invalid> wrote, quoted or
indirectly quoted someone who said :
int timingIterations = 200000000;
By eye, without touching the screen with your fingers, is that 200
million, 20 million or 2 billion?
What is with this hair shirt, cowboys-don't-use-spoons-to-eat-soup
mentality?
Surely at least IDES should DISPLAY these literals to make them easier
to proofread even if it is too late to fix the language itself.
That format is INVITING error. Laziness means people will look at
it, and say "yeah, that looks right" when it could EASILY be off by a
factor of 10.
Here is my proposal to fix with minimal effort.
An IDE has colourising of numeric literals anyway. For numeric
literals, use two slightly different shades of red for each triple
starting at the right. I will implement this in JDisplay later on
today to seed the idea.
e.g.
111222333444
111 and 333 would be crimson and 222 and 444 would be red.
|
why not different font sizes - (to accomodate the minority) - the minority
is color blind.
you understand. |
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Sun Feb 05, 2006 5:36 am Post subject: Re: hair shirt literals |
|
|
On Sat, 4 Feb 2006 16:38:28 -0500, "Hal Rosser"
<hmrosser (AT) bellsouth (DOT) net> wrote, quoted or indirectly quoted someone
who said :
| Quote: | why not different font sizes - (to accomodate the minority) - the minority
is color blind.
you understand.
|
that's easily done.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching. |
|
| Back to top |
|
 |
Noodles Jefferson Guest
|
Posted: Sun Feb 05, 2006 9:44 am Post subject: Re: Java finally has a fantastic gui builder |
|
|
In article <pkn9u1tdfbcu8h0cfdr1000njoquo2bf4a (AT) 4ax (DOT) com>, Otis Mukinfus
took the hamburger, threw it on the grill, and I said "Oh wow"...
| Quote: | On 3 Feb 2006 09:03:49 -0800, surabhi <surabhi (AT) example (DOT) com> wrote:
A while ago I evaluated Eclipse vs Visual Studio, and settled on
Visual Studio 2005. Eclipse is better in many ways, but the lack of
a gui builder was the deciding factor. Visual Studio 2005 has an
excellent gui builder. Eclipse doesn't, and in fact, none of the
Java IDEs had a half-decent gui builder. Our apps will have lots of
dialogs, and we didn't waste our careers hand-coding GridBagLayouts.
But the new NetBeans Java IDE has the best gui builder in the world.
From this demo at least, it seems to be ahead of Microsoft's GUI
builder even:
http://www.netbeans.org/files/documents/4/475/matisse.html
Too late for me though; we are not going back to Java.
What was your question?
|
Why are they using flash for the page?
--
Noodles Jefferson
mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM
NP: "Jellyroll" -- Blue Murder
"Now, technology's getting better all the time and that's fine,
but most of the time all you need is a stick of gum,
a pocketknife, and a smile."
-- Robert Redford "Spy Game" |
|
| Back to top |
|
 |
Intel Inside Guest
|
Posted: Sun Feb 05, 2006 3:45 pm Post subject: Re: Java finally has a fantastic gui builder |
|
|
Don't you see? ... he didn't have a question, it was just a ranting whinge
at Java.
Poor soul 'Mukinfus' - even the name adds to the sadness.
"Otis Mukinfus" <phony (AT) emailaddress (DOT) com> wrote in message
news:pkn9u1tdfbcu8h0cfdr1000njoquo2bf4a (AT) 4ax (DOT) com...
| Quote: | On 3 Feb 2006 09:03:49 -0800, surabhi <surabhi (AT) example (DOT) com> wrote:
A while ago I evaluated Eclipse vs Visual Studio, and settled on
Visual Studio 2005. Eclipse is better in many ways, but the lack of
a gui builder was the deciding factor. Visual Studio 2005 has an
excellent gui builder. Eclipse doesn't, and in fact, none of the
Java IDEs had a half-decent gui builder. Our apps will have lots of
dialogs, and we didn't waste our careers hand-coding GridBagLayouts.
But the new NetBeans Java IDE has the best gui builder in the world.
From this demo at least, it seems to be ahead of Microsoft's GUI
builder even:
http://www.netbeans.org/files/documents/4/475/matisse.html
Too late for me though; we are not going back to Java.
What was your question?
Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com |
|
|
| Back to top |
|
 |
William Stacey [MVP] Guest
|
Posted: Mon Feb 06, 2006 8:41 pm Post subject: Re: Java finally has a fantastic gui builder |
|
|
| But the new NetBeans Java IDE has the best gui builder in the world.
| From this demo at least, it seems to be ahead of Microsoft's GUI
| builder even:
Your willing to give it that distinction based on a short video demo? |
|
| Back to top |
|
 |
The Ghost In The Machine Guest
|
Posted: Mon Feb 06, 2006 9:00 pm Post subject: Re: hair shirt literals |
|
|
In comp.lang.java.advocacy, Roedy Green
<my_email_is_posted_on_my_website (AT) munged (DOT) invalid>
wrote
on Sun, 05 Feb 2006 00:36:28 GMT
<14iau11uifgn2bgc218d709rukqol33165 (AT) 4ax (DOT) com>:
| Quote: | On Sat, 4 Feb 2006 16:38:28 -0500, "Hal Rosser"
hmrosser (AT) bellsouth (DOT) net> wrote, quoted or indirectly quoted someone
who said :
why not different font sizes - (to accomodate the minority) - the minority
is color blind.
you understand.
that's easily done.
|
Presumably this would be doable on a case-by-case basis; the system
would have settable options. Eclipse already does, though it doesn't
have this particular capability. (Yet. )
--
#191, ewill3 (AT) earthlink (DOT) net
It's still legal to go .sigless. |
|
| Back to top |
|
 |
Tor Iver Wilhelmsen Guest
|
Posted: Mon Feb 06, 2006 10:04 pm Post subject: Re: Java finally has a fantastic gui builder |
|
|
Otis Mukinfus <phony (AT) emailaddress (DOT) com> writes:
| Quote: | What was your question?
|
Since when did Usenet news articles have to include a question? This
isn't rec.humor.oracle. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|