C is fixed or not ?

J

James Kuyper

My understanding, from people who know a whole lot more about it than I
do, is that POSIX threads cannot be implemented on top of Windows
because it presupposes a bunch of POSIX features that Windows doesn't
provide, at least in the form that POSIX threads requires.

Could you ask those people to provide a more detailed explanation of the
problem? I doubt that a naked assertion will convince Rui Maciel, and
I'm curious about the reasons myself.
 
J

James Kuyper

The most important thing with C threading is that in C99, threads
_don't exist_.

The question was about C201X, not C99; your answer does not, as far as I
can tell, say anything significant about C201X.
 
N

Noob

James said:
Could you ask those people to provide a more detailed explanation of the
problem? I doubt that a naked assertion will convince Rui Maciel, and
I'm curious about the reasons myself.

Please note: I've added comp.unix.programmer (for the POSIX aspects)
and comp.programming.threads (for the threading aspect)

We've been discussing the next revision of the C standard (C1X)
http://en.wikipedia.org/wiki/C1X
Specifically, the inclusion of multi-threading support.

Apparently, Dinkumware's library is being considered, and some
are wondering why the committee did not consider adopting the
POSIX API itself, or a subset thereof.

Would enlightened people in either comp.unix.programmer or
comp.programming.threads comment on these aspects?

Regards.
 
R

Rui Maciel

Yes, and POSIX was from the start designed with portability in mind and
even Microsoft already provides a POSIX implementation. And absolutely
no one uses it.

Where do you base that claim?

pthreads was designed for Unix-like systems, period.

What? Do you even know what you are saying? For example, do you actually
know what the term "unix-like" refers to? Because even windows fits the
description of a "unix-like" system.

You see, a unix-like system is a system which conforms to some but not all
the requirements stated in the single unix specification. This means that
if some OS happens to offer support for pthreads then it automatically
enters the category of a unix-like system. Knowing this, your comment boils
down to "pthreads was designed for systems which may use pthreads". Do you
understand how silly this is?


Rui Maciel
 
R

Rui Maciel

My understanding, from people who know a whole lot more about it than I
do, is that POSIX threads cannot be implemented on top of Windows
because it presupposes a bunch of POSIX features that Windows doesn't
provide, at least in the form that POSIX threads requires.

Oh really?

Pthread Support in Microsoft Windows Services for UNIX Version 3.5
Published: June 15, 2004

http://technet.microsoft.com/en-us/library/bb463209.aspx


Rui Maciel
 
J

James Kuyper

Oh really?

Pthread Support in Microsoft Windows Services for UNIX Version 3.5
Published: June 15, 2004

http://technet.microsoft.com/en-us/library/bb463209.aspx

I looked that over, and couldn't find any direct statement about how
well it conforms with POSIX requirements for pthreads. I did find a
couple of comments which suggested that it might not meet all of them. I
look forward to hearing a detailed description of it's supposed flaws,
so I can evaluation the truth of the claim that it falls short of being
fully conforming.
 
W

Walter Banks

Ian said:
I agree with Keith. comp.std.c is a very low noise group. I don't see
anything there that wouldn't appear on a moderated group. It could be
used as a valuable source of ideas and feedback.

From what I've seen, compared to C the C++ standardisation process is
more open and inclusive.

It is not that there isn't good ideas in comp.std.c and comp.lang.c, there are.

Part of the filtering process is determining if an idea is good enough for
someone to commit themselves to detailing the specifics and defending it
as part of a C committee meeting. This is not a barrier to good ideas
and practices but a filter to minimize bad ones.

Jacob and others who have presented proposals here are often upset that
someone else has not come support to their ideas and technology. They
may have better proposals but no-one is prepared to do the work (considerable
work) on their behalf.

It is like walking into a publishing house and saying I have a great book idea
"Gone with the Waves" an adventure plotted between "Moby Dick" and "Gone
with the Wind" attached is the notes I wrote last week. I am sure that one of
your staff writers can fill in the details and create a manuscript in their
spare time.

w..
 
J

jacob navia

Le 07/07/11 17:13, Walter Banks a écrit :
Jacob and others who have presented proposals here are often upset that
someone else has not come support to their ideas and technology. They
may have better proposals but no-one is prepared to do the work (considerable
work) on their behalf.

I have repeatedly said that I CAN'T go to another continent
(or even within Europe) 3 or 4 times a year paying MYSELF
the plane ticket, the 5 nights at the hotel and all the
associated expenses.

Obviously your company does better than mine and you can afford it
(and many meetings are in the U.S. anyway so for you is much
cheaper). I just CAN'T AFFORD IT.

If the committee had a place where I could write my proposals
and discuss it with them through email that would be enough.
I have repeatedly said that I am ready to do that work.

If you see (for instance) my work for the container library
for C you will see that the doc is 300 pages and the source code
is more than 20 thousand lines. The lcc-win compiler has an
almost complete imlementation of C99 and I have been working
in that project for more than 10 years. It is not the work that
scares me.
 
C

Chris H

In message <[email protected]
s.com> said:
Speak for yourself. Just as an example, just about every application
running on an iPhone is written using a compiler that will compile C
with variable-sized arrays by default (either LLVM / GCC4.2 or LLVM/
Clang). So how big is the "user community" that _you_ are talking
about?

How about the vast majority that don't use those compilers?
 
P

Phil Carmody

Chris H said:
That is the crux of the problem. C99 was very slow in it's uptake and
then only partially. IF C1X is also not what the industry wants then
it too will be ignored.

I'm not sure I agree with all this anti-C99-uptake guff. There
were plenty of people using C99 features even before C99 was
compiled, simply because many of the features were accepted
into C99 because of their prior proof in the field. I know I
barely changed my coding style at all after C99 came in, all
I did was change my compiler options to vary what I would get
diagnostics for.

Phil
 
I

Ian Collins

Where do you base that claim?


What? Do you even know what you are saying? For example, do you actually
know what the term "unix-like" refers to? Because even windows fits the
description of a "unix-like" system.

Not only windows, a large number of RTOS (all that I use) have a POSIX
API. So I agree the statement is silly.
 
I

Ian Collins

POSIX threads can be implemented quite comprehensively on Windows:

http://sourceware.org/pthreads-win32/conformance.html

But anyone who has used POSIX threads and Windows' native API quickly learns
that they're quite different approaches. The biggest difference that I'm
aware of is that Windows' mutexes cannot be statically initialized.
pthreads-win32 handles this with a global Windows' CriticalSection in
pthread_mutex_lock(). AFAIK, the C1x proposal doesn't allow statically
initialized objects, presumably so the interface can be implemented atop
Windows' API without such ugliness.

Does the windows API support process shared mutexes? The C1x proposal
doesn't include them probably because the process model is beyond the C
standard.
 
M

MikeP

China said:
[QUOTE=""MikeP said:
Hello,

I am a french speaker but i will try to be clear.

My question is : The C langage is it fixed or still in change ?

Algol 60 is fixed. It's also not used anymore.

But Algol was surely a woman (note the complexity).

She was a lady.

http://portal.acm.org/citation.cfm?id=358046&dl=ACM&coll=DL&CFID=32796428&CFTOKEN
=95170792

The faded majesty of Lady Algol
Peter Brown continues his exploration of Babel Street with a visit to
the aging Lady Algol who, despite her great fecundity, still retains
a measure of the beauty that won her much success abroad.
Lady Algol has a shop at number 60. A rival shop, run by a relative,
is at number 68 but has not, as yet, had much effect on her business.
The shop impressed me, but when I went inside I was even more
impressed by Lady Algol herself. Although she is getting old now, I
was still struck by her grace and beauty. One could well understand
how she appealed to the youth of her day. Yet there were signs of old
age--a few wrinkles and a very slightly faded look about her. Perhaps
this is why her appeal is not so strong to today's youth.
We talked of the past. She reminisced enthusi- astically of the times
when every eager academic in Europe sought after her.[/QUOTE]

Did she speak of her children? As faces only a mother could love? As
bastards or perverts perhaps?
 
M

MikeP

Chris said:
[QUOTE="MikeP said:
In message <[email protected]>, David Remacle
Hello,

I am a french speaker but i will try to be clear.

My question is : The C langage is it fixed or still in change ?

Thank's.

ps I would not be a throll it is just a question.

The C language is still in change. There should be a new version in
2012

C cannot be changed, it can only be replaced.

Wrong.... We are constantly updating C[/QUOTE]

For the niches it is used in now. Remember though, it started out being
called a "general purpose language" and saw some usage as such until
people realized that it failed miserably at that.
 
M

MikeP

jacob said:
Le 05/07/11 06:28, MikeP a écrit :

The point is that it is another distinct computer language that has
several advantages from its bloated counterpart.

I GET "simplicity". I also get TOO SIMPLE/INADEQUATE.

Yes, that is why I am trying to preserve its simplicity without
keeping its inadequacies.

But its inadequacies are at the foundations, so, it can't be done. It's
the old "same axe I've used for 30 years... had to replace the handle 3
times and the head twice" thing. If you keep either the handle or the
head, you still have the inadequacy, if you replace both, you have
something new. So you see, what you are proposing is indeed impossible.
C programmers

Who like their axes and don't want to become C++, D, E, F, G, C+-, C--,
C+--C++... programmers? C + (--C++). Or is it C + (--(C++) that you are
conjuring?
ell, I am programmming applications for the iphone in C99 and
objective C. Both languages go very well together and yes
there isn't any C++ that I can see.



Adopter of the wrong language.


Excuse me but that will never go away. The C api is the only glue
that can hold two C++ applicatons compiled with different compilers.

Once there was C and C++, now there are many more languages that are
useful, and moreso. C and C++ are niche languages now, though some of the
oldtimers still use them outside of their increasingly smaller domains.
(OK, that seems a bit futuristic in a C NG, that I grant you. But it will
happen... maybe after you replace the handle and the head a few more
times?).
 
M

MikeP

Rui said:
Your comment sounds a bit like zealotry.

What would the alleged zealotry be for/about?
Regarding the reference to «ubiquitous "C API"», one of the main
reasons some APIs were mainly written in C is because linking to C
code from any language is a relatively simple and easy task which is
widely understood, and due to this feature the API providers avoided
wasting time providing APIs for other languages. In comparisson,
linking to C++ code from within any programming language is a
daunting task.

I was just noting that that was then, this is now.
So, as you can see, the reason why C was frequently adopted for this
particular task wasn't some irrational, fanboyish stance. There were
and are very strong motives to do it this way.

That was then, this is now.
 
M

MikeP

jacob said:
Le 05/07/11 06:20, MikeP a écrit :

WOW !

I am scared, completely shaken by your terrible words.

When I am done with this message I will immediately commit suicide
obviously, since you have just sealed my fate.

:)

I've seen nothing compelling, new or of quality yet from you, hence I
suggest you are operating from an "ignorance is bliss" mode. Else produce
or prove something already instead of just ranting. Is it done yet? Why
not? When will it be? BTW, what is it? Yesterday it was a library, today
it's a simple and better C (aka, C + (--(C++))? ), tomorrow it will be
what? It's all very vague, and doesn't the committee codify solid, known,
proven, ubiquitous stuff? If so, where is this solid, known, proven,
ubiquitous "stuff" you want the committee to consider for preparation or
inclusion in the standard?
 
S

Shao Miller

Yes, and POSIX was from the start designed with portability in mind and
even Microsoft already provides a POSIX implementation. And absolutely
no one uses it. pthreads was designed for Unix-like systems, period.

Heheheh. I use it (Interix POSIX subsystem for NT-descended Windows),
but haven't used pthreads on it.
 
P

Phil Carmody

Ian Collins said:
It doesn't. There is nothing threading related in C99.

So *all* types are lock-free? Likewise, all functions are banana-free.
And no structures have any hint of purple.

Phil
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top