copy/pass a va_list to another thread

D

Dombo

Op 10-Mar-12 14:47, Mike McCarty schreef:
I've never used it but it sounds like Thunderbird is what really really sucks,
being unable to reasonably display an "archaic" format like
quoted-printable.

Word-wrap is hardly a novel concept. I was using newsreaders in 1992 that
were capable of it (I know because people bitched about this problem then too).

Christophers posting looks just fine on the version of Thunderbird I'm
using.
 
A

Alf P. Steinbach

How? There may be other problems with the posting
<7509868.1455.1331236446852.JavaMail.geo-discussion-forums@ynjd19>
but the overlong lines was the immediate problem I saw. Perhaps your reader
fixes such things for you?

The posting you're reading now doesn't have any newlines in its
paragraphs (after decoding, which presumably is what's meant above).

That is not a problem.

I'm pretty sure that your slrn newsreader renders this in a reasonable
way, as opposed to the Quoted Printable postings earlier in this thread.


Cheers & hth.,

- Alf
 
A

Alf P. Steinbach

Op 10-Mar-12 14:47, Mike McCarty schreef:

Christophers posting looks just fine on the version of Thunderbird I'm
using.

Since you know that what you're saying is wrong (since you're using the
exact same version of Thunderbird as I am), why are you posting this as
an unqualified general assertion instead of posting it is as a question
about what you're failing to check or failing to look at?

Not that an answer to that will do much good; I'm not actually seeking
an answer.

I'm only asking, in a rhetorical way, to make other readers aware that
your observations and statements can not be relied on.


Cheers & hth.,

- Alf
 
M

Miles Bader

Alf P. Steinbach said:
That is incorrect.

What is incorrect?

Let's look at what I said; I said three things:

(1) "Quoted-printable is a _transfer encoding_."

That's obviously true -- note the header where QP is enabled:
"Content-Transfer-Encoding: quoted-printable"

(2) "It shouldn't affect the way the article content is displayed by
your newsreader."

This is true, simply by the meaning of a "transfer encoding" -- an
encoding which is intended to avoid problems in transit, but which is
entirely undone before the mail/news-reader interprets the underlying
text. It is intended to make sure the underlying text is
transparently transferred.

(3) "... looking at the article you're complaining about, the problem
isn't with quoted-printable at all, it's that the original article
doesn't have any newlines in its paragraphs."

This is can be verified by examination. Here's a paragraph from the
QP-encoded form of the original article:

Maybe. I am hoping for some boost or C++ standard mechanism, which I haven'=
t heard of yet, that solves this problem that I presume many developers hav=
e run across, when dealing with a function that takes a variable argument l=
ist parameter.

Notice that there's a "=" at the end of each line? In the QP
encoding, that means "remove this newline", and is only used if the
_original_ text had a line which was "too long".

Thus in the sender's original text, that whole paragraph was one long
line. QP split that long line into short lines for transfer, and when
the receiver undoes the QP-encoding, the original long line is
restored -- but note that the problem is that the long line was there
in the first place, which is a problem that is orthogonal to the
transfer-encoding used.

After the QP-encoding is _removed_, the original paragraph should look
like this:

Maybe. I am hoping for some boost or C++ standard mechanism, which I haven't heard of yet, that solves this problem that I presume many developers have run across, when dealing with a function that takes a variable argument list parameter.

We'll see what my software does with this, but what you end up seeing
should have no connection with the transfer encoding, because the
latter is intended to be transparent.
That is dumb.

Wait, that's your argument...?

A little more detail, perhaps?
You are posting with text/plain, not quoted printable

Sorry, I tried to make my software use QP, but failed to do so (note
my followup to my previous message).
and your paragraphs are not paragraphs but individual lines.

Yes, that's what I meant by "My lines are properly wrapped."

In other words, I made sure that my post was in a reasonably standard
form for news (shortish lines) _before_ it was sent; if QP had been
applied on top (I tried...), it wouldn't have made any difference.

-miles
 
M

Miles Bader

Yes. See headers.

Heh; I remember trying that for a few days ... in like 1991!

[To be fair, the newsreader I use now, Gnus, originally dates in some
sense from about 1988 (tho along the way, it's been rewritten
completely at least once).]

-miles
 
J

Jorgen Grahn

What is incorrect?

Let's look at what I said; I said three things: ....
(2) "It shouldn't affect the way the article content is displayed by
your newsreader."

This is true, simply by the meaning of a "transfer encoding" -- an
encoding which is intended to avoid problems in transit, but which is
entirely undone before the mail/news-reader interprets the underlying
text. It is intended to make sure the underlying text is
transparently transferred.

As I've said elsewhere in the thread, this is debatable since no RFC
specified MIME for NetNews until 2005. I still don't understand Alf's
position, but I'm guessing the difference lies here.

/Jorgen
 
M

Miles Bader

Jorgen Grahn said:
As I've said elsewhere in the thread, this is debatable since no RFC
specified MIME for NetNews until 2005. I still don't understand Alf's
position, but I'm guessing the difference lies here.

What's debatable? The meaning of "transfer encoding" is clear enough
for software that support MIME, so the crucial question is whether
both the sender and receiver support it or not -- and in this
particular case, they appear to (Alf is using Thunderbird, which
certainly claims to support MIME, and the sender's mail appears to
have been correctly MIME-encoded).

-miles
 
J

Jorgen Grahn

What's debatable?

It's debatable if quoted-printable should affect the way the article
content is displayed by a newsreader. If it doesn't support MIME it
will look one way; if it does support MIME it will look another way.
The meaning of "transfer encoding" is clear enough
for software that support MIME, so the crucial question is whether
both the sender and receiver support it or not -- and in this
particular case, they appear to (Alf is using Thunderbird, which
certainly claims to support MIME, and the sender's mail appears to
have been correctly MIME-encoded).

I was under the impression that we were discussing posting formats in
general, not just what Alf sees. But I may be mistaken.

/Jorgen
 
D

Dombo

Op 10-Mar-12 21:23, Alf P. Steinbach schreef:
Since you know that what you're saying is wrong (since you're using the
exact same version of Thunderbird as I am), why are you posting this as
an unqualified general assertion instead of posting it is as a question
about what you're failing to check or failing to look at?

Considering you don't see what I'm seeing on my screen you are the one
making unqualified assertions. Like I said before Christophers posting
looks just fine on my screen. Since you are using the same version of
Thunderbird it might be a settings issue.

Is it really that hard for you to respond in civil, polite way?
 
M

Miles Bader

Jorgen Grahn said:
It's debatable if quoted-printable should affect the way the article
content is displayed by a newsreader. If it doesn't support MIME it
will look one way; if it does support MIME it will look another way.

Er, well, sure. The "should" is what the protocol specifies; clearly
newsreaders that don't support the protocol at all won't follow such
rules... :)
I was under the impression that we were discussing posting formats in
general, not just what Alf sees. But I may be mistaken.

Certainly Alf's original complaint was phrased generally (though
against QP in particular, not against using MIME). But he then later
explained that he was annoyed because thunderbird was showing the
paragraphs in the complained-about article as long unwrapped lines.
Of course, that has nothing to do with QP, but how the original sender
formatted his article (prior to it being encoded by his software).

Anyway, I'm not really even sure what the actual argument is
anymore.... [Nothing to do with C++, that's for sure! :]

-miles
 
R

Rui Maciel

Mike said:
I've never used it but it sounds like Thunderbird is what really really
sucks, being unable to reasonably display an "archaic" format like
quoted-printable.

As a thunderbird user, I have to say that, at least in some aspects,
thunderbird does suck. One of the main pet peeves I have with Thunderbird
is how it is configured by default to force people to compose messages in
HTML, instead of plain text. I don't know if this is done by the people
packaging Thunderbird for specific distros or by Mozilla folks, but it does
suck. No user should be forced to rummage through the web to learn how to
disable a behaviour that goes against well established bits of netiquette.

Yet, in spite of this, it is still the best email client out there.


Rui Maciel
 
R

Rui Maciel

Alf said:
Since you know that what you're saying is wrong (since you're using the
exact same version of Thunderbird as I am), why are you posting this as
an unqualified general assertion instead of posting it is as a question
about what you're failing to check or failing to look at?

I've checked out Christopher's posts with both knode and thunderbird, and I
have to say that they do look just fine on each client.

What issues did you experienced?


Rui Maciel
 
A

Alf P. Steinbach

Certainly Alf's original complaint was phrased generally (though
against QP in particular, not against using MIME). But he then later
explained that he was annoyed because thunderbird was showing the
paragraphs in the complained-about article as long unwrapped lines.
Of course, that has nothing to do with QP, but how the original sender
formatted his article (prior to it being encoded by his software).

Anyway, I'm not really even sure what the actual argument is
anymore.... [Nothing to do with C++, that's for sure! :]

First and foremost the case against QP on news is just that you *can't
expect* QP to work on news, because (1) QP really sucks, and (2)
therefore, it was not supported for news articles until September had
already been going on for a long while, and therefore, (3) newsreaders
such as Thunderbird don't support it properly, causing real problems.

But it's also about other things such as readability where QP is not
supported, and the sheer idiocy of gobbledegook-encoding text that would
be all OK without that extra and needless encoding.

This should not be hard to understand or remember. However, in the old
days Microsoft fanboys often trolled by posting with QP and VCard info.
Then the *nix and fanboys responded by posting with digital signatures.
The Microsofties' QP postings appeared broken in the *nix fanboys'
newsreaders. The *nix fanboys' postings did not appear at all in
Microsoft's Outlook Express (now Windows Mail). So it was a bit of fun
for while, both sides had a technical means to at least frustrate the
other side a little. Still, anyone posting today with QP, or with
digital signature, is either clueless, or a troll, or has no tools.

Cheers & hth.,

- Alf
 
A

Alf P. Steinbach

Op 10-Mar-12 21:23, Alf P. Steinbach schreef:

Considering you don't see what I'm seeing on my screen you are the one
making unqualified assertions. Like I said before Christophers posting
looks just fine on my screen.

Why don't you ask about what you're failing to look at, or failing to
check, since you know that your observations and/or understanding are
wrong or incomplete, instead of making such unqualified general (and
known to be wrong) assertions that your observations are correct?

Since you are using the same version of
Thunderbird it might be a settings issue.
Nope.


Is it really that hard for you to respond in civil, polite way?

Why do you feel the need to attack my person?

Anyway, that marks you as a troll.


- Alf
 
A

Alf P. Steinbach

I've checked out Christopher's posts with both knode and thunderbird, and I
have to say that they do look just fine on each client.

What issues did you experienced?

When you reply to such a posting, all text in each "paragraph" becomes a
single quoted line, which then needs manual formatting.

That is rather annoying.



Cheers & hth.,

- Alf
 
R

Rui Maciel

Alf said:
When you reply to such a posting, all text in each "paragraph" becomes a
single quoted line, which then needs manual formatting.

That is rather annoying.

I see what you mean. This also happens with knode, if it isn't configured
to add quotes and line breaks to text lines which have more than 76
characters.

The thing is, it looks like thunderbird doesn't offer these options, and so
it is unable to add quotes and line breaks to long, continuous lines.

Maybe a bug report is in order.


Rui Maciel
 
D

Dombo

Op 11-Mar-12 18:33, Alf P. Steinbach schreef:
Why don't you ask about what you're failing to look at, or failing to
check, since you know that your observations and/or understanding are
wrong or incomplete, instead of making such unqualified general (and
known to be wrong) assertions that your observations are correct?

My observation was, and is, that Christophers posting looked just fine
in Thunderbird. That was intended as response to "I've never used it but
it sounds like Thunderbird is what really really sucks" by Mike McCarty,
it was not about you or to discredit you.

Only your response to Rui makes clear what the real problem is you are
experiencing. That you failed to communicate that before is not my
fault. You could have just replied with: "Yeah, it may look normal at
first, but when you reply you get ridiculously long lines which takes a
lot of editing to get it back to normal again.". That would have made
your point much more clearly and would it leave a lot more reasonable
impression about you, as opposed to the impression of some frustrated
guy bitching about things for the sake of bitching.
Why do you feel the need to attack my person?

That describes exactly my impression about you after reading your
replies here. It is you who implied that I was lying. The fact that you
consider a mere observation how a piece of software displays a posting
made by someone else to be a personal attack says a lot about you.
Anyway, that marks you as a troll.

You have a funny definition of a troll. Your abrasive, provocative style
of communicating seems to fit the definition of a troll better.

For your sake I hope you are just trolling a bit here and that your
behaviour on usenet is not a reflection of your behaviour in real life.
If it is a reflection how you are in real life I feel really sorry for you.

I hope you are not posting under your real name here (or a real name of
someone else). Future employers might not get a very positive impression
about you, and in particular your social skills, after a bit of Googling.

If you really think I'm troll, feel free to PLOINK me.
 
A

Alf P. Steinbach

You have a funny definition of a troll. Your abrasive, provocative style
of communicating seems to fit the definition of a troll better.

It was more fun in the old days. Many of the trollers posted under their
real names. And they didn't just spew out silly characterizations, they
were intelligent in a way.

Anyway.

- Alf
 
R

Robert Miles

Maybe. I am hoping for some boost or C++ standard mechanism, which I haven't heard of yet, that solves this problem that I presume many developers have run across, when dealing with a function that takes a variable argument list parameter.


I think you are reading to much into it and want to look at the design for a fix. I don't blame you. I already accept that the design is flawed, the code sucks, and I'd never use a variable argument list in the first place. Such is often life when dealing with other people's real life code and manager's rules and time allotments vs academic examples. Given those constants, it doesn't matter what the context is, but here:

// Creates a database log record
// \param sprintf like message string including placeholders
// \param ... - takes tuples
// 1- string; name of argument
// 2- string; formatting code string
// 3- any type; identified by previous formatting code
//<list of 500 formatting codes and argument types>
void SomeFunction(std::wstring message, ...) // Cannot change
{
va_list va; // May change anything here down
va_start(va, x);

SomeDataStructure myOutput; // Contains arguments for a database call
// to create a log record
// which is also crappy design
// with tons of params
// and encoded, formatted, strings

// 4000 lines of parsing custom format codes and arguments,
// converting to types
// using those types to build strings
// ala sprintf
// With a dump truck of business rules applied to string encoding
// AKA long and tedious stuff that I want to do on another thread
// Including actually making a call to write to database which is
// also time consuming
//
// i.e. This is a logging type method and should return immediatly

va_end(va);
}

The actual conversion from unknown types into usuable typed objects using format codes in strings is what is taking a long time. I really don't think I mentioned copying as you say. There is no copying yet. I envision copying as a means to pass them to another thread. As obviously I can't give something to another thread from the stack without blocking the first thread or they will no longer be valid.

The problem itself is how to copy something of unknown type and length from the "stack pointer?" given by va_list, without actually processing the list to find the types first.

performance analysis revealed that the processing of the list, just to extract the types and use them to build the output to make the database call with, took longer than the database call itself!

Is there a way to split the list of format codes in half, then quickly
test which half is used? If so, consider splitting it in quarters or
eighths with more quick tests of which part of the list. That's likely
to be much faster than testing for every possibility, one at a time.
 
R

Robert Miles

I apologize as this is inevitably also in the format you spoke of, as I have yet to find a means to access usenet without paying an extra $10/20 a month and see no means of configuring google to not be retarded. I also know little about said format, although I looked it up. I assume it makes jumbled reading on your side that expects ASCII? Is there a known free alternative that you might suggest?

Have you tried Eternal September?

http://www.eternal-september.org/

Free Usenet access, text only. However, it required that you
use a non-ATT email address to sign up. A free Gmail or
Hotmail account should be sufficient, even if it isn't your
primary email account.

Have you tried individual.net?

http://www.news.individual.net/

Rather cheap, also text-only.

Both also filter out most spam.

Your newsreader should have settings to decide if you use
Quoted Printable or not.

As for Google Groups, see if starting here makes it a little
less retarded:

https://groups.google.com/forum/?fromgroups#!overview

Note that some browsers are not good at handling URLs that
contain a # character. You may then need to click on My
Groups, if you have already subscribed to a list of
newsgroups.
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top