Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #57948 > unrolled thread
| Started by | Chad <cdalten@gmail.com> |
|---|---|
| First post | 2015-03-06 23:41 -0800 |
| Last post | 2015-03-09 11:32 -0400 |
| Articles | 6 on this page of 46 — 15 participants |
Back to article view | Back to comp.lang.c
What constitutes "standard" C? Chad <cdalten@gmail.com> - 2015-03-06 23:41 -0800
Re: What constitutes "standard" C? Morris Dovey <mrdovey@iedu.com> - 2015-03-07 02:57 -0600
Re: What constitutes "standard" C? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-07 02:51 -0800
Re: What constitutes "standard" C? Richard Heathfield <rjh@cpax.org.uk> - 2015-03-07 11:25 +0000
Re: What constitutes "standard" C? Richard Heathfield <rjh@cpax.org.uk> - 2015-03-07 18:34 +0000
Re: What constitutes "standard" C? James Kuyper <jameskuyper@verizon.net> - 2015-03-09 11:21 -0400
Re: What constitutes "standard" C? Richard Heathfield <rjh@cpax.org.uk> - 2015-03-09 16:08 +0000
Re: What constitutes "standard" C? "Bill Cunningham" <nospam@nspam.invalid> - 2015-03-07 15:07 -0500
Re: What constitutes "standard" C? Richard Heathfield <rjh@cpax.org.uk> - 2015-03-07 11:21 +0000
Re: What constitutes "standard" C? James Kuyper <jameskuyper@verizon.net> - 2015-03-07 11:24 -0500
Re: What constitutes "standard" C? Richard Heathfield <rjh@cpax.org.uk> - 2015-03-07 17:09 +0000
Re: What constitutes "standard" C? James Kuyper <jameskuyper@verizon.net> - 2015-03-07 12:47 -0500
Re: What constitutes "standard" C? Richard Damon <Richard@Damon-Family.org> - 2015-03-07 17:47 -0500
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-07 15:43 -0800
Re: What constitutes "standard" C? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-03-08 01:03 +0000
Re: What constitutes "standard" C? Richard Damon <Richard@Damon-Family.org> - 2015-03-07 21:02 -0500
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-07 18:51 -0800
Re: What constitutes "standard" C? Tim Rentsch <txr@alumni.caltech.edu> - 2015-03-24 16:02 -0700
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-25 08:52 -0700
Re: What constitutes "standard" C? Tim Rentsch <txr@alumni.caltech.edu> - 2015-03-25 15:55 -0700
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-25 16:33 -0700
Re: What constitutes "standard" C? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-03-27 20:14 +0000
Re: What constitutes "standard" C? fir <profesor.fir@gmail.com> - 2015-03-27 17:19 -0700
Re: What constitutes "standard" C? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-27 17:30 -0700
Re: What constitutes "standard" C? Tim Rentsch <txr@alumni.caltech.edu> - 2015-03-28 14:27 -0700
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-28 20:43 -0700
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-04-04 12:15 -0700
Re: What constitutes "standard" C? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-04-05 01:13 +0000
Re: What constitutes "standard" C? James Kuyper <jameskuyper@verizon.net> - 2015-04-05 13:43 -0400
Re: What constitutes "standard" C? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-04-05 20:14 +0000
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-04-05 13:28 -0700
Re: What constitutes "standard" C? James Kuyper <jameskuyper@verizon.net> - 2015-04-05 17:56 -0400
Re: What constitutes "standard" C? Lőrinczy Zsigmond <nospam@for.me> - 2015-03-07 14:03 +0100
Re: What constitutes "standard" C? Richard Heathfield <rjh@cpax.org.uk> - 2015-03-07 13:30 +0000
Re: What constitutes "standard" C? Bartc <bc@freeuk.com> - 2015-03-07 14:42 +0000
Re: What constitutes "standard" C? fir <profesor.fir@gmail.com> - 2015-03-07 08:33 -0800
Re: What constitutes "standard" C? "Bill Cunningham" <nospam@nspam.invalid> - 2015-03-07 18:53 -0500
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-07 16:42 -0800
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-07 15:49 -0800
Re: What constitutes "standard" C? fir <profesor.fir@gmail.com> - 2015-03-07 05:13 -0800
Re: What constitutes "standard" C? Kaz Kylheku <kaz@kylheku.com> - 2015-03-07 15:35 +0000
Re: What constitutes "standard" C? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-03-07 10:49 -0500
Re: What constitutes "standard" C? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-03-07 10:52 -0500
Re: What constitutes "standard" C? James Kuyper <jameskuyper@verizon.net> - 2015-03-07 11:21 -0500
Re: What constitutes "standard" C? Keith Thompson <kst-u@mib.org> - 2015-03-07 17:10 -0800
Re: What constitutes "standard" C? James Kuyper <jameskuyper@verizon.net> - 2015-03-09 11:32 -0400
Page 3 of 3 — ← Prev page 1 2 [3]
| From | Kaz Kylheku <kaz@kylheku.com> |
|---|---|
| Date | 2015-03-07 15:35 +0000 |
| Message-ID | <20150307073255.339@kylheku.com> |
| In reply to | #57948 |
On 2015-03-07, Chad <cdalten@gmail.com> wrote:
> fork() doesn't because it's not mentioned in the various C standards. Then
> what about data structures like linked lists and sorting algorithms like
> selection sort?
Fork is perfectly topical in C, just not the aspects of its semantics that
have to do with an address space being copied.
As far as C is concerned, it's just a function that returns a number and
has no visible effect otherwise, so even though it doesn't exist in the
library, we can supply a working definition like this:
#include <stdlib.h>
int fork(void) { return rand(16384); }
[toc] | [prev] | [next] | [standalone]
| From | Lew Pitcher <lew.pitcher@digitalfreehold.ca> |
|---|---|
| Date | 2015-03-07 10:49 -0500 |
| Message-ID | <I6FKw.1552898$W25.150279@fx02.iad> |
| In reply to | #57960 |
On Saturday March 7 2015 10:35, in comp.lang.c, "Kaz Kylheku"
<kaz@kylheku.com> wrote:
> On 2015-03-07, Chad <cdalten@gmail.com> wrote:
>> fork() doesn't because it's not mentioned in the various C standards.
>> Then what about data structures like linked lists and sorting algorithms
>> like selection sort?
>
> Fork is perfectly topical in C, just not the aspects of its semantics that
> have to do with an address space being copied.
>
> As far as C is concerned, it's just a function that returns a number and
> has no visible effect otherwise, so even though it doesn't exist in the
> library, we can supply a working definition like this:
>
> #include <stdlib.h>
>
> int fork(void) { return rand(16384); }
#include <stdlib.h>
typedef pid_t int;
pid_t fork(void)
{
pid_t pid = rand();
if (pid == RAND_MAX)
pid = -1;
return pid;
}
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
[toc] | [prev] | [next] | [standalone]
| From | Lew Pitcher <lew.pitcher@digitalfreehold.ca> |
|---|---|
| Date | 2015-03-07 10:52 -0500 |
| Message-ID | <69FKw.671344$rq4.32597@fx27.iad> |
| In reply to | #57961 |
On Saturday March 7 2015 10:49, in comp.lang.c, "Lew Pitcher"
<lew.pitcher@digitalfreehold.ca> wrote:
> On Saturday March 7 2015 10:35, in comp.lang.c, "Kaz Kylheku"
> <kaz@kylheku.com> wrote:
>
>> On 2015-03-07, Chad <cdalten@gmail.com> wrote:
>>> fork() doesn't because it's not mentioned in the various C standards.
>>> Then what about data structures like linked lists and sorting algorithms
>>> like selection sort?
>>
>> Fork is perfectly topical in C, just not the aspects of its semantics
>> that have to do with an address space being copied.
>>
>> As far as C is concerned, it's just a function that returns a number and
>> has no visible effect otherwise, so even though it doesn't exist in the
>> library, we can supply a working definition like this:
>>
>> #include <stdlib.h>
>>
>> int fork(void) { return rand(16384); }
>
> #include <stdlib.h>
>
> typedef pid_t int;
> pid_t fork(void)
> {
> pid_t pid = rand();
> if (pid == RAND_MAX)
> pid = -1;
> return pid;
> }
Alternately (and probably better)
#include <stdlib.h>
typedef pid_t int;
pid_t fork(void)
{
return (pid_t) (rand() - 1);
}
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2015-03-07 11:21 -0500 |
| Message-ID | <mdf8gr$lg$1@dont-email.me> |
| In reply to | #57948 |
On 03/07/2015 02:41 AM, Chad wrote: > fork() doesn't because it's not mentioned in the various C standards. Then what about data structures like linked lists and sorting algorithms like selection sort? Shouldn't they also be barred from discussion since the various C standards don't cover them also? Just curious because I don't recall anyone here shouting "It's not in the standard" when the topic of linked lists and queues showed up on here. This is an unmoderated newsgroup, with no official charter, so you're free to discuss anything that you want here. Discuss UFOs, religion, other computer languages only distantly related to C - no problem. The worst that can happen is that this is not a particularly good place to discuss your topic. But that is precisely the case if your question involves the way a given function works, and that function is a part of a library other than the C standard library. You're more likely to get reliable answers to your question if you ask it in a forum devoted to that library. comp.unix.programmer is just such a forum for the fork() function, and it's quite active. Questions about data structures described using the C language, are a different matter. There's no better place to discuss such questions than right here (it would be nice if comp.lang.c.moderated could be such a place - but the slow pace of the moderation mechanism has made it unpopular). The same is true of questions about sorting algorithms, so long as the discussion is about how to implement them in C. If the discussion ends up being about sorting algorithms in an abstract, language-independent way, then there are better forums for such a discussion. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-03-07 17:10 -0800 |
| Message-ID | <87h9tw47l2.fsf@kst-u.example.com> |
| In reply to | #57964 |
James Kuyper <jameskuyper@verizon.net> writes:
> On 03/07/2015 02:41 AM, Chad wrote:
>> fork() doesn't because it's not mentioned in the various C
>> standards. Then what about data structures like linked lists and
>> sorting algorithms like selection sort? Shouldn't they also be
>> barred from discussion since the various C standards don't cover
>> them also? Just curious because I don't recall anyone here shouting
>> "It's not in the standard" when the topic of linked lists and queues
>> showed up on here.
>
> This is an unmoderated newsgroup, with no official charter, so you're
> free to discuss anything that you want here. Discuss UFOs, religion,
> other computer languages only distantly related to C - no problem. The
> worst that can happen is that this is not a particularly good place to
> discuss your topic.
I disagree with the "no problem" part of that. There no enforcement
mechanism to prevent or even discourage off-topic posts here, apart
from peer pressure (and I'm not suggesting that there should be).
But the lack of enforced moderation or an official charter doesn't
imply that topics other than C *should* be discussed here.
The worst that can happen is that the group descends into chaos,
and becomes useless for its intended purpose of discussing C.
I would hate to see that happen.
[...]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2015-03-09 11:32 -0400 |
| Message-ID | <54FDBD01.3060701@verizon.net> |
| In reply to | #57986 |
On 03/07/2015 08:10 PM, Keith Thompson wrote: > James Kuyper <jameskuyper@verizon.net> writes: ... >> This is an unmoderated newsgroup, with no official charter, so you're >> free to discuss anything that you want here. Discuss UFOs, religion, >> other computer languages only distantly related to C - no problem. The >> worst that can happen is that this is not a particularly good place to >> discuss your topic. > > I disagree with the "no problem" part of that. ... Sorry - I should probably have marked that as sarcasm - except sarcasm isn't precisely the right word. I meant every word that I said, but I was describing facts that I strongly disapprove of, and my words did not express that disapproval very well. > ... There no enforcement > mechanism to prevent or even discourage off-topic posts here, apart > from peer pressure (and I'm not suggesting that there should be). > But the lack of enforced moderation or an official charter doesn't > imply that topics other than C *should* be discussed here. I'm in full agreement, though I expressed that sentiment a little more weakly: "this is not a particularly good place to discuss your topic".
[toc] | [prev] | [standalone]
Page 3 of 3 — ← Prev page 1 2 [3]
Back to top | Article view | comp.lang.c
csiph-web