Shelton/C# should be able to match my HTM_TXT.EXE .

J

Jeff_Relf

Yet again, Bailo, you've posted a link to something you didn't read,
Sure it's called: << The Code Project
- A Macro Preprocessor in C# - C# Programming This library supplies
the same macro substitution facilities as the C/C++ preprocessor. >>
http://www.codeproject.com/csharp/prepro.asp

But, I'm sad to say, it's mislabled,
....it's not like C's preprocessor, it's more like a call to RegEx,
with the result sent to an interpreter.
 
J

Jeff_Relf

Hi Bailo, Ya told me: << The bottom line is:
Q: can c# implement a fast, flexible string parser in seven easy steps,
with far more robustness than whatever it is your doing ?
A: YES ! ! ! ! ! >>

That's Your asinine question.

My question was could any of the self-proclaimed programmers reading me now
possibly use their So_Callled Bad_Ass tools like String, RegEx and the STL
to transform AA.HTM into something as good as the AA.TXT HTM_TXT.EXE produced
with it's mostly plain_C... memmove, fprintf, #define LoopTo(), etc. ?

http://www.Cotse.NET/users/jeffrelf/AA.HTM
http://www.Cotse.NET/users/jeffrelf/AA.TXT

http://www.Cotse.NET/users/jeffrelf/HTM_TXT.EXE
http://www.Cotse.NET/users/jeffrelf/HTM_TXT.CPP
http://www.Cotse.NET/users/jeffrelf/HTM_TXT.VCPROJ

I know the answer already... it's No.
 
J

Jeff_Relf

Hi Bailo Re: This Pre_Interpreter_Expander: <<
A Macro Preprocessor in C# - C# Programming This library supplies
the same macro substitution facilities as the C/C++ preprocessor. >>
http://www.codeproject.com/csharp/prepro.asp

Your asked me: << Superb !
Just exactly what is called for to do the work ! >>

I don't care enough about it to look it up.

The thing about #define LoopTo(), for example,
is that it makes my code more readable.

Your Pre_Interpreter_Expander can't do that,
all it can do is send stuff of an interpreter... It's chicken wire at best.

More readable code is what I want, not C#.
 
S

Super Panavision 70

Jeff_Relf said:
The thing about #define LoopTo(), for example,
is that it makes my code more readable.

Well -- given that I have yet to see a single person claim to be able to
'read' your code, I find that unlikely.

Jeff -- don't get me wrong.

I think the underlying effort is good.

Like you, I think that /readability/ of Web pages is the most neglected
facet of them. It's somewhere at about 98 on a list of 100. The top
entry being "looks cool". Yet, the Web is in fact a literary medium.

I still think that text with well organized hyperlinks is better than
the totally stripped down format that you offer in AA.TXT ( which I
actually find quite *unreadable* ).

One must walk a balance between some nostalgia for the printed page --
which is not what a computer screen is -- and the overbearing,
javascripted, animated gifted format that we are stuck with.

I think as an exercise, what you are doing is good. However, as a
be-all and end-all, I can't really give it my blessing. The effort is
to find the deep reality of what this media, The Web, is really about.
It took almost three decades of filmmaking for directors to start
making films and not recordings of plays. In the same way, Art
Directors will make the Web a magazine...and writers will make the Web a
book.

But it is neither.
 
J

Jeff_Relf

Hi Bailo,
Re: AA.HTM --> AA.TXT, in
You told me: << Any idiot can subtract value.
Adding value is what is needed here. >>

Like so many others, I don't want HTM_Only e-mails,
but Hotmail.COM and vendors send HTML_Only e-mails to me,
so I convert them to plain text.

Besides, You, with your not_so_amazing C#, can't convert HTML like I can,
....and that's the bigger point, in my book.

Re: My comment that #define's like LoopTo() make my code more readable,

You replied: << Well -- given that I have yet to see a single person
claim to be able to read your code, I find that unlikely. >>

None of the self_proclaimed coders here could read my code if they tried,
....Hence they never spent 10 seconds trying.

That fact, along with the parcity of quality code shown,
tells me They lack of competence... not me.

#define's like LoopTo() make my code more readable To_Me,
and to other qualified coders... none of which are here.

You added: << Jeff -- don't get me wrong.
I think the underlying effort is good.

Like you, I think that readability of Web pages
is the most neglected facet of them.
It's somewhere at about 98 on a list of 100.
The top entry being looks cool .
Yet, the Web is in fact a literary medium.

I still think that text with well organized hyperlinks is better than
the totally stripped down format that you offer in AA.TXT
( which I actually find quite unreadable ). >>

Unlike AA.HTM, I can Edit AA.TXT,
that makes it infinitely more readable... Right_There .

Editable mediums are the future, not Read_Only HTML.
Plain text is best, followed by .DOC files.

You concluded: <<
It took almost three decades of filmmaking for directors to start
making films and not recordings of plays. In the same way, Art
Directors will make the Web a magazine
...and writers will make the Web a book.

But it is neither. >>

Then go watch some more of those movies then, and let us be.
 
S

Søren Reinke

Jeff_Relf said:
Re: My comment that #define's like LoopTo() make my code more readable,

You replied: << Well -- given that I have yet to see a single person
claim to be able to read your code, I find that unlikely. >>

Maybe you think your code is readable, but your posting in the newsgroups
are not very readable.

Please use a newsreader program that indent's the text you are replaying to
and put a > in front of the line.

/Søren
 
J

Jeff_Relf

Hi Soren_Reinke, You asked me: <<
Please use a newsreader program that indent's
the text you are replaying to and put a > in front of the line. >>

Maybe you find automated contextualizing, such as: > > > > >
to be more readable, but I, for one, do not... I call that spam,
....and my newsreader, X.CPP, duly removes all such lines.

X.CPP also removes PGP sigs, vcards and other spam_like attachments.
Further, This automated crap from you unforgivible: <<
>>

That is that bullshit anyways ? !
Why didn't you just tell me: <<
Hello Jeff, Re: Your superior contextualizing, >>

Handcrafted contextualizing, handcrafted quoting, rules... always will.
Now do us all a favor and get lost... you Shit_Twag.
 
S

Søren Reinke

Jeff_Relf said:
Hi Soren_Reinke, You asked me: <<
Please use a newsreader program that indent's
the text you are replaying to and put a > in front of the line. >>

Maybe you find automated contextualizing, such as: > > > > >
to be more readable, but I, for one, do not... I call that spam,
...and my newsreader, X.CPP, duly removes all such lines.

Then rewrite your newsreader so it follows the netiquette.
See http://www.netmeister.org/news/learn2quote3.html#ss3.1

3.1 Which character should I use to mark the quoted text?
Use the "Greater-Than" character (">"). This character is recognized as a
quotationmark by almost every newsreader and is mentioned in the netiquette
as such for technical reasons (Son-Of-RFC 1036 and successors).
X.CPP also removes PGP sigs, vcards and other spam_like attachments.
Further, This automated crap from you unforgivible: <<
>>

That is that bullshit anyways ? !
Why didn't you just tell me: <<
Hello Jeff, Re: Your superior contextualizing, >>

Handcrafted contextualizing, handcrafted quoting, rules... always will.
Now do us all a favor and get lost... you Shit_Twag.

Sure sure, mister flamebait.
 
J

Johannes Bauer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Søren Reinke said:

Bye, Relffeeder, bye! *PLONK*

Greetings,
Johannes

- --
PLEASE verify my signature. Some forging troll is claiming to be me.
My GPG key id is 0xCC727E2E (dated 2004-11-03). You can get it from
wwwkeys.pgp.net or random.sks.keyserver.penguin.de.
Also: Messages from "Comcast Online" are ALWAYS forged.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCY6JSCseFG8xyfi4RAnBTAJ9qeFODE+kq/y+UlNtrZnaNGq5I7wCfe7Rl
mUl8DNMaFC2XXRTP6IJO6Oc=
=M2q/
-----END PGP SIGNATURE-----
 
J

Jeff_Relf

Hi Tom, Re: How my index.htm should become like this:
http://www.Cotse.NET/users/jeffrelf/index.TXT

You told me: <<
Hmmm - other then entity translations - mine is exactly the same
...I told you i didn't do entity translations. >>

But your copy of index.htm is very different from mine,
to see what it looks like unaltered, you must do:
View_Source --> File --> Save_Page_As

At any rate, try handling <> chevrons embeded inside quoted strings,
removing lines with just whitespace and tags,
and preserving blank lines that didn't have tags, i.e. preserving whitespace.

If String and RegEx are as powerful as you claim,
you should be able to do that while your clothes are in the dryer.

This is the input, View_Source --> File --> Save_Page_As
http://www.Cotse.NET/users/jeffrelf/AA.HTM
This is what HTM_TXT.EXE outputs:
http://www.Cotse.NET/users/jeffrelf/AA.TXT

http://www.Cotse.NET/users/jeffrelf/HTM_TXT.EXE
http://www.Cotse.NET/users/jeffrelf/HTM_TXT.CPP
http://www.Cotse.NET/users/jeffrelf/HTM_TXT.VCPROJ
 
M

Master Control Program

Jeff_Relf said:
Hi Tom, Re: How my index.htm should become like this:
http://www.Cotse.NET/users/jeffrelf/index.TXT

You told me: <<
Hmmm - other then entity translations - mine is exactly the same
...I told you i didn't do entity translations. >>

Jeff,

I find it funny you questioning people's productivity when you're a
deadbeat who can spend 24 hours a day twiddling your bits while the rest
of us work hard at paying jobs all day, and then dust your code off in
like 5 minutes in the evening.
 
J

Jeff_Relf

Hi Bailo, Re: Shelton's claim that C# allows him to breezily write code
that matches HTM_TXT.EXE's functionality,

You told me: << I find it funny you questioning people's productivity
when you're a deadbeat who can spend 24 hours a day twiddling your bits
while the rest of us work hard at paying jobs all day,
and then dust your code off in like 5 minutes in the evening. >>

No one here has Dusted_Off my code, or otherwise matched it,
lots say they can... but no one has demonstrated it to me.
Are you serious programmers... I don't think so.

Now playing: Sole's Da_Baddest_Poet
 
M

Master Control Program

Jeff_Relf wrote:
and then dust your code off in like 5 minutes in the evening. >>
No one here has Dusted_Off my code, or otherwise matched it,
lots say they can... but no one has demonstrated it to me.
Are you serious programmers... I don't think so.

Yes, in fact they did.

Simply by using Regex.

Why? Because writing a program that way, allows any valid Regex
expression to be used within the program. So, we wrote code that is
essentially open and can be immediately changed by oher users.

Your code is closed, single purpose. It is not extensible and serves no
purpose.
 
J

Jeff_Relf

Hi John, I don't care what you think,
no one matched the Results that I produced.

Kelsey's code trashed my home page,
and Shelton couldn't even downloand my home page.

The challange was simple, you udder moron ( mooo ),
given AA.HTM, produce something as good as HTM_TXT.EXE's AA.TXT.

You concluded: << Your code is closed, single purpose.
It is not extensible and serves no purpose. >>

My HTM --> TXT code works, John. Yours doesn't even exist.
X.CPP, which HTM_TXT.EXE partially demonstrates, has serious utility.
You, Kelsey and Shelton judge code my how easy it is for you to write,
....but I judge code by what it does.
 
S

Stefan Simek

Jeff_Relf said:
Hi John, I don't care what you think,
no one matched the Results that I produced.

Kelsey's code trashed my home page,
and Shelton couldn't even downloand my home page.

The challange was simple, you udder moron ( mooo ),
given AA.HTM, produce something as good as HTM_TXT.EXE's AA.TXT.

You concluded: << Your code is closed, single purpose.
It is not extensible and serves no purpose. >>

My HTM --> TXT code works, John. Yours doesn't even exist.
X.CPP, which HTM_TXT.EXE partially demonstrates, has serious utility.
You, Kelsey and Shelton judge code my how easy it is for you to write,
...but I judge code by what it does.

what about this?

using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;

namespace htm_txt
{
class Program
{
static void Main(string[] args)
{
string input;

using (StreamReader sr = new StreamReader(args[0]))
input = sr.ReadToEnd();

string output = Regex.Replace(input,
@"(?'entity'&((\w+)|(#[0-9]+)|(#x[0-9a-fA-F]+));?)|(?'tag'<[/?]?\w+(([^\][^""])|(\""[^\][^""]*?\""))*?>)|(?'comment'<!--.*?-->)",

delegate (Match m)
{
// convert entities
if (m.Groups["entity"].Success)
{
if (m.Value == "&nbsp;")
return " ";
return System.Web.HttpUtility.HtmlDecode(m.Value);
}

// convert the <br> tag into a \n
if (m.Groups["tag"].Success && m.Value.ToLower() ==
"<br>")
return "\n";

// clear the rest
return "";
}, RegexOptions.Singleline); // the singleline
option is required in order to match commends and/or tags spanning
multiple lines

// strip excess empty lines
output = Regex.Replace(output, @"(([ \t]*\r?\n){2})([
\t]*\r?\n)+", "$1");
// strip empty lines at beginning and end
output = Regex.Replace(output, @"(^([ \t]*\r?\n)+)|([
\t]*\r?\n)+$", "");

// write output
using (StreamWriter sw = new StreamWriter(args[1]))
sw.Write(output);
}
}
}
 
J

Jeff_Relf

Top