read image from url

I

Ian Collins

Frederick said:
Mark McIntyre posted:






C and C++ are extremely similar -- more similar than humans and orangutans.
This subject has been bludgeoned to death several times, mainly in the C
group, check the (recent) archives.
 
A

Andrew Poelstra

I would conjecture that it was because Martin Ambuhl and you ignored the
clause "if you take out C++ extensions". That phrase is a little vague and
requires interpretation. However, vagueness does not provide a license to
ignore the phrase completely and pretend the poster did not know about the
differences between C and C++.

Vagueness is indeed a licence for ignoring something. If I don't know what
something means because the poster was too lazy to put it into plain English,
I don't know why I should have to suffer.
Which ones (when you take out C++ extensions)?

bool, class, new, delete...
Isn't that a C++ extension?

What's a "C++ extension"? It's part of the language. You might as
well insist that malloc() is a C extension because it isn't a part
of Java.

Wait... Java isn't C, and neither is C++.
The stream IO, I would consider an extension. What are the huge (not minor)
differences between C and C++ with regard to the printf family?

I consider PRINT an extension, so therefore BASIC and C are the same.
Conversely, printf() is a C extension, and therefore can be ignored as
a non-BASIC contruct.
new/delete is an extension. What are the big differences in malloc/free
between C and C++?

malloc/free is an extension of C. See how flimsy that line of logic is?
 
K

Kai-Uwe Bux

Andrew said:
Vagueness is indeed a licence for ignoring something.

Not if you want to arrive at a correct interpretation. The technical term
is "principle of charity". If you don't care about correct interpretation,
you are of course free to ignore whatever you like. However, insulting
remarks about other posters intellectual abilities are more credible if
they are based on a sound understanding of what those posters actually
belive. (Of course, they are impolite in any case.)
If I don't know what
something means because the poster was too lazy to put it into plain
English, I don't know why I should have to suffer.

If avoidance of suffering is what your goal, you are right: you may ignore
whatever makes you feel better.
bool, class, new, delete...

See below for a definition of extension that takes care of your examples.
What's a "C++ extension"?

Ok, let me propose a definition of "C++ extension" appropriate for the
context of this thread: a valid C++ program uses a C++ extension if either
it does not compile as a C program or does not have the same observable
behavior when compiled as a C program.

I think this definition is appropriate in our context, because in the
original posting

Excuse me but the differences between C/C++ are like american
english and UK english, if you take out C++ extensions.

the poster does not claim that C++ and C are alike. The claim is that after
removing C++ extensions, they are alike. I propose to read this as: a
certain subset of C++ is somewhat like C. Now, we have to figure out, which
subset the poster had in mind. The subset I propose to consider consists of
exactly those well-formed C++ programs that are valid C programs with
identical observable behavior under both standards (one could call this set
of programs the intersection of C and C++).

Under this interpretation, jacob claims that C and the intersection of C and
C++ are very much alike. I do not know whether I should agree, but I think
this is the claim one needs to address to properly criticize jacob.
[remarks based upon non-understanding of the term extension snipped]


Best

Kai-Uwe Bux
 
F

Frederick Gotham

Kai-Uwe Bux posted:
The claim is that after removing C++ extensions, they are alike. I
propose to read this as: a certain subset of C++ is somewhat like C.
Now, we have to figure out, which subset the poster had in mind. The
subset I propose to consider consists of exactly those well-formed C++
programs that are valid C programs with identical observable behavior
under both standards (one could call this set of programs the
intersection of C and C++).

Under this interpretation, jacob claims that C and the intersection of
C and C++ are very much alike. I do not know whether I should agree,
but I think this is the claim one needs to address to properly
criticize jacob.


Very well worded.


The intersection of C and C++ are almost identical. One can easily memorise
the few inconsistencies. Here's a guide:


http://david.tribble.com/text/cdiffs.htm
 
O

Old Wolf

Mark said:
Smart move.

Welcome to the killfile of about half the regulars here.

The rest will be watching specially for your posts, so they can
correct the schoolboy errors.

Note for killfilers: this is the same person as "JKop" and "Tomas".
 
F

Frederick Gotham

Ian Collins posted:

That list is pretty comprehensive and lists more than a "few"
differences..


The more you familiarise yourself with something and the more you use it,
the more you memorise. I regularly switch from coding C to coding C++, and
I am very familiar with the inconsistencies.

C++ is virtually an exact superset of C.

It takes less than one week for a proficient C++ programmer to become a
proficient C programmer.
 
F

Frederick Gotham

Old Wolf posted:

Note for killfilers: this is the same person as "JKop" and "Tomas".


Oh yes, more accusations of having posted under other aliases, although
this time on the C++ side of the water. Thankfully I was acquitted of any
wrongdoing on the C side of the water, and I can console myself that on
this occasion, the accusation is made by a troll who would prefer to
discuss a poster's posting history rather than computer programming.

Old Wolf, I have read yours and Tomas's posts regarding you accusing him
of previously posting under the alias of JKop, and I can relate to you
that you shall get no such discussion out of me. Whether I have in the
past posted under other aliases is my own business, and I am here to
discuss programming.

At the end of the day, there are participants here who judge a poster by
the quality of her posts, and it is these people with whom I was to
interact. The others may feel free to killfile me -- in fact, I welcome
it.

Old Wolf, comp.lang.c++ is for discussion of the C++ programming
language, so if you wish to make infantile accusations regarding
participants' posting habits (past or present), please take the
discussion elsewhere.
 
I

Ian Collins

Frederick said:
Ian Collins posted:






The more you familiarise yourself with something and the more you use it,
the more you memorise. I regularly switch from coding C to coding C++, and
I am very familiar with the inconsistencies.

C++ is virtually an exact superset of C.
Well it looks like our interpretations of the virtually differ somewhat.
It takes less than one week for a proficient C++ programmer to become a
proficient C programmer.
I guess that depends where you set the bar.
 
O

Old Wolf

Frederick said:
Old Wolf, comp.lang.c++ is for discussion of the C++ programming
language, so if you wish to make infantile accusations regarding
participants' posting habits (past or present), please take the
discussion elsewhere.

Well, I would if you would actually provide a valid email address,
or perhaps suggest some other forum where you would like to
discuss the matter.
 
F

Frederick Gotham

Old Wolf posted:
Well, I would if you would actually provide a valid email address,
or perhaps suggest some other forum where you would like to
discuss the matter.


Perhaps you misinterpreted me; I do not wish to discuss the topic. I
apologise for any inconvenience this causes you.

However I look forward to discussing computer programming with you, both
here and over on comp.lang.c.

I do not provide a valid e-mail address when posting on Usenet as I do not
wish to receive communications via e-mail. Programming can be discussed
right here, and participants need not contact me personally unless they
intend to discuss a topic orthogonal to programming. Given that I do not
wish to discuss a topic orthogonal to programming with the participants on
this newsgroup, I elect not to provide an extraneous means of
communication.

I hope you understand my choice.
 
R

Richard Heathfield

[Followups set to comp.lang.c]

Mark McIntyre said:
Smart move.

Welcome to the killfile of about half the regulars here.

The rest will be watching specially for your posts, so they can
correct the schoolboy errors.

He hasn't made that many schoolboy errors, actually. In fact, the worst
error he's made so far that I can recall is this one - i.e. describing the
differences between C and C++ as "minor". And the second-worst is in
picking a fight with Martin Ambuhl.

In fact, Frederick Gotham does seem rather bellicose all round, which
(together with his fondness for dragging C++ comparisons into C discussions
in a C newsgroup) is a bit of a shame, since he otherwise seems like quite
a reasonable fellow.
 
P

Phlip

Richard said:
(a) so what?
(b) you might be wrong.

If someone's going to troll, changing their name gets only a brief respite
from the kill-files. Then their habits come out again, and they go in the
kill-files again. No biggie.
 
R

Richard Heathfield

Phlip said:
If someone's going to troll, changing their name gets only a brief respite
from the kill-files. Then their habits come out again, and they go in the
kill-files again. No biggie.

Yes, where rational people are concerned, it's the /behaviour/ that is being
killfiled, not the person. If someone wishes to ameliorate their behaviour,
a quick ID change may well help facilitate that and enable them to have
meaningful interactions with people in whose killfiles they would otherwise
have rotted. In cases where former trolls are attempting to rehabilitate
themselves under a new name and we happen to notice (e.g. through some
trick of consistent misspelling or whatever), it may be more constructive
to pretend we didn't.
 
R

rob.kirkpatrick

Hi, can anyone point me a library that can read image to memory from a
URL? It is very easy in Java, but it is hard to find an complete
solution in c/c++.

Thanks,

You could try the magick++ library. This lets you read a variety of
image formats from a url into memory and provides lots of functions to
manipulate and export.

http://www.imagemagick.org/

Hope this reply is more useful than some of the others you have had :)

Rob
 
P

Phlip

Richard said:
Yes, where rational people are concerned, it's the /behaviour/ that is
being
killfiled, not the person. If someone wishes to ameliorate their
behaviour,
a quick ID change may well help facilitate that and enable them to have
meaningful interactions with people in whose killfiles they would
otherwise
have rotted. In cases where former trolls are attempting to rehabilitate
themselves under a new name and we happen to notice (e.g. through some
trick of consistent misspelling or whatever), it may be more constructive
to pretend we didn't.

And when they change their name to "Troll4", just to say "hah hah - you
can't resist me!", then it might just be less constructive...
 
C

Christopher Benson-Manica

In comp.lang.c jacob said:
This people are NOT representative of this group nor of the
majority of C users.

I personally find that to be unfortunate.
 
K

Kevin Handy

Murali said:
That's a lengthy discussion with no particular reason.

What is there in saying C/C++ and C or C++? I don't want to start an
argument. If you can understand what other's want to say, that's
enough. You are brilliant.

If you/rapist want to discuss/whine the usage/idiotacy of
how a slash is interpreted, think/whine about how it
would work/smell in normal English/pornography.

Using a slash in order to save a couple of letters of typing
doesn't improve the ability to communicate; doesn't make your
meaning clear; and it doesn't save any typing, because you
have to deal with the flame-war that it generates.
I think Frederick is with the person who started the thread. Funniest
thing is that he is asking Fred to go away.

I think the funniest thing so far is: C and C++ are the same,
as long as you ignore the differences.

English and Russian are also the same, as long as you ignore
the differences.
 
K

Kevin Handy

Frederick said:
Ian Collins posted:





The 5 consecutive characters, "C/C++", refer to "C or C++".

If you/complete-moron believe that, than you/poser
should not take any offense at this message.
If I were to write a program which didn't use the extended features which
C++ provides over C, then I'd call it a C program.

Then why are you insisting on calling it a "C or C++" program?

You could also call it a C/Cobal or a Fortran/C program,
using your definition of '/'.
Makes me think of how race car manufacturers try to get a "road
worthiness stamp" for their race vehicles; these vehicles are primarily
race vehicles, not road vehicles, but if they can get a road-worthiness
stamp for it aswell, then that's great!

Why, you could try to call your code a C/Java program to see
if you could increase its marketability.
If you start off writing a program with no intention of prohibiting
yourself from using C++ features, and still end up with a finished
product which doesn't use C++ features, then it's quite like setting out
to design a race car, and ending up with a car that's also road-worthy.

If you start out to write a C++ program, but end up with
something that compiles with a Cobal compiler, would you
still call it C++?
I compare the ability to "compile as C" with a "road worthiness stamp" --
it's the icing on the cake!

Add more icing and make it compile under Fortran.
That could also be a "road worthiness stamp".
I *never* hesitate to use C++ features, (and I actually use them quite
often), but if I did some day produce a program which didn't use any C++
features at all, I'd consider going back through it and changing
everything to C.

If it doesn't use "C++ features", as they have been called in
this discussion, than what would you be changing to make it "C"
If you're after versatility, it's better to have C code than C++ code.

And for even more versitility, advertise it as
C/Cobal/Basic/Perl/Python/Awk/Sed/Bliss/Intercal/Fortran/Pascal/C++
code (remember, '/' means 'or').
 

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,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148

Latest Threads

Top