Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #10309 > unrolled thread
| Started by | jacob navia <jacob@spamsink.net> |
|---|---|
| First post | 2011-09-16 08:30 +0200 |
| Last post | 2011-09-22 06:59 -0700 |
| Articles | 20 on this page of 127 — 27 participants |
Back to article view | Back to comp.lang.c
Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-16 08:30 +0200
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-16 08:33 +0200
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-16 12:51 +0100
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-16 14:18 +0200
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-16 14:26 +0200
Re: Reversing a linked list Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-16 07:09 -0700
Re: Reversing a linked list ImpalerCore <jadill33@gmail.com> - 2011-09-16 08:28 -0700
Re: Reversing a linked list falk@rahul.net (Edward A. Falk) - 2011-09-16 16:34 +0000
Re: Reversing a linked list Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-16 09:28 -0700
Re: Reversing a linked list ImpalerCore <jadill33@gmail.com> - 2011-09-16 11:12 -0700
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 20:01 -0500
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-16 21:56 +0100
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 20:16 -0500
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-17 02:48 +0100
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 22:15 -0500
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-17 07:40 +0200
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-17 01:24 -0500
Re: Reversing a linked list cri@tiac.net (Richard Harter) - 2011-09-17 15:07 +0000
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-17 17:47 +0200
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-17 17:54 +0200
Re: Reversing a linked list Michael Press <rubrum@pacbell.net> - 2011-09-27 19:21 -0700
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-17 12:00 +0100
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-17 23:53 -0500
Re: Reversing a linked list ImpalerCore <jadill33@gmail.com> - 2011-09-16 07:21 -0700
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-16 16:47 +0200
Re: Reversing a linked list Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-16 08:20 -0700
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 20:25 -0500
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-16 22:32 +0100
Re: Reversing a linked list pete <pfiland@mindspring.com> - 2011-09-16 17:53 -0400
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 19:48 -0500
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-17 02:41 +0100
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 22:57 -0500
Re: Reversing a linked list "BartC" <bc@freeuk.com> - 2011-09-17 12:48 +0100
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-17 13:55 +0200
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-17 23:39 -0500
Re: Reversing a linked list HENRY Eshbaugh <henryeshbaugh@gmail.com> - 2011-09-16 16:56 -0700
Re: Reversing a linked list Ian Collins <ian-news@hotmail.com> - 2011-09-17 12:09 +1200
Re: Reversing a linked list HENRY Eshbaugh <henryeshbaugh@gmail.com> - 2011-09-16 19:53 -0700
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 23:00 -0500
Re: Reversing a linked list Jonathan Leffler <jleffler@earthlink.net> - 2011-09-16 23:20 -0700
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-17 13:46 -0700
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-17 19:51 -0700
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-18 01:28 -0700
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-18 15:39 -0700
Re: Reversing a linked list Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-18 22:43 +0000
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-18 17:54 -0700
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-18 21:20 -0400
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-18 17:30 -0700
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-18 17:51 -0700
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-18 21:34 -0400
Re: Reversing a linked list Robert Wessel <robertwessel2@yahoo.com> - 2011-09-18 21:25 -0500
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-19 09:56 -0700
Re: Reversing a linked list gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-19 17:16 +0000
Re: Reversing a linked list Willem <willem@toad.stack.nl> - 2011-09-19 17:25 +0000
Re: Reversing a linked list Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-19 23:40 -0700
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-20 17:55 -0700
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-20 17:48 -0700
Re: Reversing a linked list Geoff <geoff@invalid.invalid> - 2011-09-20 19:12 -0700
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-21 10:15 -0700
Re: Reversing a linked list David Resnick <lndresnick@gmail.com> - 2011-09-22 08:43 -0700
Re: Reversing a linked list Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-23 02:45 -0700
Re: Reversing a linked list David Resnick <lndresnick@gmail.com> - 2011-09-23 05:38 -0700
Re: Reversing a linked list Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-23 07:58 -0700
Re: Reversing a linked list David Resnick <lndresnick@gmail.com> - 2011-09-23 08:15 -0700
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-23 18:00 +0100
Re: Reversing a linked list David Resnick <lndresnick@gmail.com> - 2011-09-23 10:49 -0700
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-23 20:05 +0100
Re: Reversing a linked list pete <pfiland@mindspring.com> - 2011-09-23 18:05 -0400
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-24 00:19 +0100
Re: Reversing a linked list ImpalerCore <jadill33@gmail.com> - 2011-09-23 09:25 -0700
Re: Reversing a linked list Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-22 22:49 +0300
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-20 19:51 -0700
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-21 09:51 -0700
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-21 11:21 -0700
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-20 23:00 -0400
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-21 09:47 -0700
Re: Reversing a linked list Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 11:22 +0300
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-23 08:20 -0700
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-23 18:12 +0100
Re: Reversing a linked list Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-24 13:13 -0800
Re: Reversing a linked list Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 23:49 +0300
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-24 08:15 -0400
Re: Reversing a linked list Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-24 20:15 +0300
Re: Reversing a linked list Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-24 13:28 -0800
Re: Reversing a linked list Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-02-12 01:41 +0200
Re: Reversing a linked list Tim Rentsch <txr@alumni.caltech.edu> - 2012-03-08 09:08 -0800
Re: Reversing a linked list Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-03-13 17:21 +0200
Re: Reversing a linked list Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-24 13:04 -0800
Re: Reversing a linked list Seebs <usenet-nospam@seebs.net> - 2011-09-23 01:46 +0000
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-18 21:17 -0400
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-17 23:50 -0500
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-18 01:29 -0700
Re: Reversing a linked list Seebs <usenet-nospam@seebs.net> - 2011-09-18 07:03 +0000
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-17 02:13 +0100
Re: Reversing a linked list HENRY Eshbaugh <henryeshbaugh@gmail.com> - 2011-09-16 19:52 -0700
Re: Reversing a linked list Willem <willem@toad.stack.nl> - 2011-09-17 08:58 +0000
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-18 15:32 -0700
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-18 21:36 -0400
Re: Reversing a linked list cri@tiac.net (Richard Harter) - 2011-09-19 05:24 +0000
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-19 08:21 -0400
Re: Reversing a linked list cri@tiac.net (Richard Harter) - 2011-09-19 14:28 +0000
Re: Reversing a linked list Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-19 17:01 +0100
Re: Reversing a linked list cri@tiac.net (Richard Harter) - 2011-09-19 16:25 +0000
Re: Reversing a linked list henry eshbaugh <henryeshbaugh@gmail.com> - 2011-09-21 10:41 -0700
Re: Reversing a linked list Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-21 17:58 +0000
Re: Reversing a linked list James Kuyper <jameskuyper@verizon.net> - 2011-09-21 14:07 -0400
Re: Reversing a linked list Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-21 11:15 -0700
Re: Reversing a linked list Keith Thompson <kst-u@mib.org> - 2011-09-21 11:37 -0700
Re: Reversing a linked list Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 11:50 +0300
Re: Reversing a linked list Seebs <usenet-nospam@seebs.net> - 2011-09-23 01:46 +0000
Re: Reversing a linked list Geoff <geoff@invalid.invalid> - 2011-09-18 18:22 -0700
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-16 19:37 -0500
Re: Reversing a linked list jacob navia <jacob@spamsink.net> - 2011-09-17 07:52 +0200
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-17 02:09 -0500
Re: Reversing a linked list Ian Collins <ian-news@hotmail.com> - 2011-09-17 19:35 +1200
Re: Reversing a linked list "Tony" <nospamme@ever.net> - 2011-09-17 03:35 -0500
Programming languages jacob navia <jacob@spamsink.net> - 2011-09-17 22:14 +0200
Re: Programming languages "Tony" <nospamme@ever.net> - 2011-09-18 00:11 -0500
Re: Programming languages jacob navia <jacob@spamsink.net> - 2011-09-18 08:37 +0200
Re: Programming languages Seebs <usenet-nospam@seebs.net> - 2011-09-18 07:03 +0000
Re: Programming languages jacob navia <jacob@spamsink.net> - 2011-09-18 09:50 +0200
Re: Programming languages Keith Thompson <kst-u@mib.org> - 2011-09-18 01:31 -0700
Re: Programming languages James Kuyper <jameskuyper@verizon.net> - 2011-09-18 06:43 -0400
Re: Programming languages Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-18 07:42 -0700
Re: Programming languages "Tony" <nospamme@ever.net> - 2011-09-18 04:05 -0500
Re: Programming languages Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-18 07:40 -0700
Re: Reversing a linked list Gene <gene.ressler@gmail.com> - 2011-09-22 06:59 -0700
Page 5 of 7 — ← Prev page 1 2 3 4 [5] 6 7 Next page →
| From | Phil Carmody <thefatphil_demunged@yahoo.co.uk> |
|---|---|
| Date | 2011-09-23 23:49 +0300 |
| Message-ID | <87hb43yoeu.fsf@bazspaz.fatphil.org> |
| In reply to | #10764 |
Keith Thompson <kst-u@mib.org> writes: > Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes: > > henry eshbaugh <henryeshbaugh@gmail.com> writes: > >> > "coding style" is not a term ordinarily used to describe deliberate > >> > adoption of practices that, according to the C standard, have undefined > >> > behavior. > >> > >> I used a term where you didn't expect to see it. Deal with it. > >> > >> > Guess what: the Linux kernal is part of a C implementation. The key > >> > reason why you're not supposed to use these names is because they ARE > >> > supposed to use them. They're NOT supposed to use the names that are > >> > reserved for your use. > >> > >> The Linux kernel is _not_ a C implementation. Glibc is a C > >> implementation. > > > > You think the linux kernel links to glibc? So you believe that > > kernel code could just include a call to, say strtok(), and > > that would get resolved to glibc's implementation? > > [...] > > I didn't see anything in what henry eshbaugh wrote that implies > that the Linux kernel links to glibc. He was merely refuting > (correctly, I believe) someone else's claim that the kernel is part > of a C implementation. The kernel contains part of a C implementation at least as much as glibc does. Henry magically disappeared the word "part of" in his response. 'is' was perhaps overstating the claim, but there is undeniably C implementation in the linux kernel (e.g. in the include and lib directories). Phil -- "Religion is what keeps the poor from murdering the rich." -- Napoleon
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-09-24 08:15 -0400 |
| Message-ID | <j5khka$1i1$1@dont-email.me> |
| In reply to | #10804 |
On 09/23/2011 04:49 PM, Phil Carmody wrote: > Keith Thompson <kst-u@mib.org> writes: >> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes: >>> henry eshbaugh <henryeshbaugh@gmail.com> writes: ... >>>>> Guess what: the Linux kernal is part of a C implementation. The key >>>>> reason why you're not supposed to use these names is because they ARE >>>>> supposed to use them. They're NOT supposed to use the names that are >>>>> reserved for your use. >>>> >>>> The Linux kernel is _not_ a C implementation. Glibc is a C >>>> implementation. >>> >>> You think the linux kernel links to glibc? So you believe that >>> kernel code could just include a call to, say strtok(), and >>> that would get resolved to glibc's implementation? >> >> [...] >> >> I didn't see anything in what henry eshbaugh wrote that implies >> that the Linux kernel links to glibc. He was merely refuting >> (correctly, I believe) someone else's claim that the kernel is part >> of a C implementation. > > The kernel contains part of a C implementation at least as much > as glibc does. Henry magically disappeared the word "part of" in > his response. 'is' was perhaps overstating the claim, ... I hadn't even noticed that confusion on his part. > ... but there > is undeniably C implementation in the linux kernel (e.g. in the > include and lib directories). The relevant question is not whether it's part of the implementation, but whether identifiers used in the kernel could interfere with names used in ordinary C code. Quite frankly, I have no idea, since I've never had to deal with the kernel directly. A quick web search didn't resolve that question in my mind: I didn't get too few hits, but rather way too many, and I couldn't find one that clearly addressed that issue. I'm a little surprised that no one other than Henry has directly commented on that - I'm not inclined to take his opinions on the matter as gospel. It was my annoyance at Henry's pig-headedness which led me to make the mistake of speaking authoritatively on a subject on which I am not at all an authority; I regretted that mistake within minutes of sending the message. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Phil Carmody <thefatphil_demunged@yahoo.co.uk> |
|---|---|
| Date | 2011-09-24 20:15 +0300 |
| Message-ID | <87zkhtyi91.fsf@bazspaz.fatphil.org> |
| In reply to | #10851 |
James Kuyper <jameskuyper@verizon.net> writes: > On 09/23/2011 04:49 PM, Phil Carmody wrote: > > Keith Thompson <kst-u@mib.org> writes: > >> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes: > >>> henry eshbaugh <henryeshbaugh@gmail.com> writes: > ... > The relevant question is not whether it's part of the implementation, > but whether identifiers used in the kernel could interfere with names > used in ordinary C code. They cannot any more than identifiers in different userspace programs can interfere with each other. However, identifiers in separate libraries can interfere with each other, and with the program they're being loaded into. Phil -- "Religion is what keeps the poor from murdering the rich." -- Napoleon
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2012-01-24 13:28 -0800 |
| Message-ID | <kfnmx9cg59b.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #10804 |
Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes: > Keith Thompson <kst-u@mib.org> writes: >> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes: >> > henry eshbaugh <henryeshbaugh@gmail.com> writes: >> >> > "coding style" is not a term ordinarily used to describe deliberate >> >> > adoption of practices that, according to the C standard, have undefined >> >> > behavior. >> >> >> >> I used a term where you didn't expect to see it. Deal with it. >> >> >> >> > Guess what: the Linux kernal is part of a C implementation. The key >> >> > reason why you're not supposed to use these names is because they ARE >> >> > supposed to use them. They're NOT supposed to use the names that are >> >> > reserved for your use. >> >> >> >> The Linux kernel is _not_ a C implementation. Glibc is a C >> >> implementation. >> > >> > You think the linux kernel links to glibc? So you believe that >> > kernel code could just include a call to, say strtok(), and >> > that would get resolved to glibc's implementation? >> >> [...] >> >> I didn't see anything in what henry eshbaugh wrote that implies >> that the Linux kernel links to glibc. He was merely refuting >> (correctly, I believe) someone else's claim that the kernel is part >> of a C implementation. > > The kernel contains part of a C implementation at least as much > as glibc does. Henry magically disappeared the word "part of" in > his response. 'is' was perhaps overstating the claim, but there > is undeniably C implementation in the linux kernel (e.g. in the > include and lib directories). A Linux distribution can include parts of a C implementation; a Linux kernel does not.
[toc] | [prev] | [next] | [standalone]
| From | Phil Carmody <thefatphil_demunged@yahoo.co.uk> |
|---|---|
| Date | 2012-02-12 01:41 +0200 |
| Message-ID | <877gztuedo.fsf@bazspaz.fatphil.org> |
| In reply to | #16126 |
Tim Rentsch <txr@alumni.caltech.edu> writes:
> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
> > Keith Thompson <kst-u@mib.org> writes:
> >> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
> >> > henry eshbaugh <henryeshbaugh@gmail.com> writes:
> >> >> > "coding style" is not a term ordinarily used to describe deliberate
> >> >> > adoption of practices that, according to the C standard, have undefined
> >> >> > behavior.
> >> >>
> >> >> I used a term where you didn't expect to see it. Deal with it.
> >> >>
> >> >> > Guess what: the Linux kernal is part of a C implementation. The key
> >> >> > reason why you're not supposed to use these names is because they ARE
> >> >> > supposed to use them. They're NOT supposed to use the names that are
> >> >> > reserved for your use.
> >> >>
> >> >> The Linux kernel is _not_ a C implementation. Glibc is a C
> >> >> implementation.
> >> >
> >> > You think the linux kernel links to glibc? So you believe that
> >> > kernel code could just include a call to, say strtok(), and
> >> > that would get resolved to glibc's implementation?
> >>
> >> [...]
> >>
> >> I didn't see anything in what henry eshbaugh wrote that implies
> >> that the Linux kernel links to glibc. He was merely refuting
> >> (correctly, I believe) someone else's claim that the kernel is part
> >> of a C implementation.
> >
> > The kernel contains part of a C implementation at least as much
> > as glibc does. Henry magically disappeared the word "part of" in
> > his response. 'is' was perhaps overstating the claim, but there
> > is undeniably C implementation in the linux kernel (e.g. in the
> > include and lib directories).
>
> A Linux distribution can include parts of a C implementation;
> a Linux kernel does not.
The one I maintain for ${DAYJOB} does. And as I pull from Greg KH's
tree, I think I can speak for his one too, and almost certainly Linus's.
Did you have some other Linux kernel in mind?.
Phil
--
Unix is simple. It just takes a genius to understand its simplicity
-- Dennis Ritchie (1941-2011), Unix Co-Creator
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2012-03-08 09:08 -0800 |
| Message-ID | <kfnobs7t402.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #17156 |
Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
> Tim Rentsch <txr@alumni.caltech.edu> writes:
>> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
>> > Keith Thompson <kst-u@mib.org> writes:
>> >> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
>> >> > henry eshbaugh <henryeshbaugh@gmail.com> writes:
>> >> >> > "coding style" is not a term ordinarily used to describe deliberate
>> >> >> > adoption of practices that, according to the C standard, have undefined
>> >> >> > behavior.
>> >> >>
>> >> >> I used a term where you didn't expect to see it. Deal with it.
>> >> >>
>> >> >> > Guess what: the Linux kernal is part of a C implementation. The key
>> >> >> > reason why you're not supposed to use these names is because they ARE
>> >> >> > supposed to use them. They're NOT supposed to use the names that are
>> >> >> > reserved for your use.
>> >> >>
>> >> >> The Linux kernel is _not_ a C implementation. Glibc is a C
>> >> >> implementation.
>> >> >
>> >> > You think the linux kernel links to glibc? So you believe that
>> >> > kernel code could just include a call to, say strtok(), and
>> >> > that would get resolved to glibc's implementation?
>> >>
>> >> [...]
>> >>
>> >> I didn't see anything in what henry eshbaugh wrote that implies
>> >> that the Linux kernel links to glibc. He was merely refuting
>> >> (correctly, I believe) someone else's claim that the kernel is part
>> >> of a C implementation.
>> >
>> > The kernel contains part of a C implementation at least as much
>> > as glibc does. Henry magically disappeared the word "part of" in
>> > his response. 'is' was perhaps overstating the claim, but there
>> > is undeniably C implementation in the linux kernel (e.g. in the
>> > include and lib directories).
>>
>> A Linux distribution can include parts of a C implementation;
>> a Linux kernel does not.
>
> The one I maintain for ${DAYJOB} does. And as I pull from Greg KH's
> tree, I think I can speak for his one too, and almost certainly Linus's.
> Did you have some other Linux kernel in mind?.
I think we're talking about two different things. What I
think you are talking about is maintaining (part of) a C
implementation as part of Linux kernel /sources/. What I am
talking about is a Linux kernel /executable/, ie, a boot
image. Certainly I can believe that you work on, eg,
various standard header files, as part of work on kernel
source files. However, that has no bearing on whether (part
of) a C implemention is provided by a Linux boot image;
normally all the various C-implementation parts are just
files scattered around the file system of a distribution --
nothing comes directly out of the actual boot image.
It's possible of course that some of the C implementation source
files you work on get shipped along with the boot image, to make
up part of an implementation in that distribution (using
"shipped" and "distribution" as appropriate to your environment).
That still doesn't make them part of the boot image, even if it
happens to be true that both sets of source files were worked on
in concert and simultaneously. All that matters is where the
various pieces of an implementation come from, and normally all
those pieces come out of the file system of the distribution, not
out of the kernel boot image.
Does that make more sense now?
[toc] | [prev] | [next] | [standalone]
| From | Phil Carmody <thefatphil_demunged@yahoo.co.uk> |
|---|---|
| Date | 2012-03-13 17:21 +0200 |
| Message-ID | <8762e8cyse.fsf@bazspaz.fatphil.org> |
| In reply to | #18329 |
Tim Rentsch <txr@alumni.caltech.edu> writes: > Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes: > I think we're talking about two different things. ... > Does that make more sense now? It does, yes; thanks for the clarification. Phil -- > I'd argue that there is much evidence for the existence of a God. Pics or it didn't happen. -- Tom (/. uid 822)
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2012-01-24 13:04 -0800 |
| Message-ID | <kfnvco0g6ca.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #10625 |
James Kuyper <jameskuyper@verizon.net> writes: > On 09/20/2011 08:48 PM, henry eshbaugh wrote: >> On Sep 19, 12:56 pm, Keith Thompson <ks...@mib.org> wrote: >>> The only code it would break is already broken. >>> >>> It's completely pointless to use identifiers starting with "__". >>> By doing so, you risk colliding with identifiers used by the >>> implementation. By using identifiers that start with letters, >>> you avoid that risk -- at no cost. >>> >>> I don't *care* whether any compilers use the name "__foo" internally, >>> because I don't define reserved identifiers in my own code. >>> >>> Exactly what benefit do you get by calling your own function "__foo" >>> (rather than, say, "foo__")? >>> >>> You have a choice between writing code with well defined behavior and >>> writing code with undefined behavior. Why do you chose the latter? >> >> It's a coding style issue. I use them for internal functions. > > "coding style" is not a term ordinarily used to describe deliberate > adoption of practices that, according to the C standard, have undefined > behavior. > >> And it's not just me. You know who else happens to do that? The small >> army of Linux kernel programmers. > > Guess what: the Linux kernal is part of a C implementation. [snip] No, it isn't. A Linux _distribution_ may include parts of a C implmentation, but just the kernel does not.
[toc] | [prev] | [next] | [standalone]
| From | Seebs <usenet-nospam@seebs.net> |
|---|---|
| Date | 2011-09-23 01:46 +0000 |
| Message-ID | <slrnj7nouj.124n.usenet-nospam@guild.seebs.net> |
| In reply to | #10622 |
On 2011-09-21, henry eshbaugh <henryeshbaugh@gmail.com> wrote: > It's a coding style issue. I use them for internal functions. It's a style issue such that if I see something like that in code I assume that code is where the bug is. And usually I'm right. > And it's not just me. You know who else happens to do that? The small > army of Linux kernel programmers. I think it may not be too extreme a speculation to suggest that the Linux kernel is not expecting to be run as a userspace application against someone else's C library. > The point is, it's not some bizarre coding style choice I made. Yes, it is. > It's used by an army of highly skilled programmers (kernel code is > PAINFUL.) These people know what they're doing, more so than you or I. > And they use it. I would not particularly be inclined to bet that any given Linux kernel programmer knows more about writing C than Keith does. I would also not consider the Linux kernel to be a good sample of general coding style. The kernel is not concerned with the behavior of its host library. :) -s -- Copyright 2011, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated! I am not speaking for my employer, although they do rent some of my opinions.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-09-18 21:17 -0400 |
| Message-ID | <j5656s$v2a$1@dont-email.me> |
| In reply to | #10450 |
On 09/18/2011 06:39 PM, henry eshbaugh wrote:
> On Sep 18, 4:28�am, Keith Thompson <ks...@mib.org> wrote:
>> What do you mean, it "isn't too bad"?
>
> It's not unreadable. Sorry for not being clear.
>
>> It's not merely coding style. �The identifier "__reverse_list" is
>> reserved to the implementation. �Using it in your own code makes your
>> program's behavior undefined.
>
> Nope. Here's an example C program:
>
>
> void __foo(void)
> {
> return;
> }
>
> int main()
> {
> ___foo();
> return 0;
> }
>
> And here's the assembly generated by GCC:
> .text
> .globl ___foo
> ___foo:
...
> Note ".globl ___foo". Like I said, GCC generates assembly with
> identifiers _[name], so you can prefix names with "__." So, again,
> it's largely a coding style issue.
What does it matter what GCC does? "undefined behavior" has a very
specific meaning in the C standard, and it doesn't mean "will fail when
compiled using gcc".
You cannot determine whether the behavior of a piece of code is
undefined by compiling it with one particular implementation, because
one permissible consequence of compiling code with undefined behavior is
that it will compile without a error or warning message, and produce
exactly the results that you mistakenly thought it was required to produce.
You cannot determine whether the behavior is undefined by compiling it
with a dozen different compilers, or even with every single compiler
that's ever been written, because it's permissible for code with
undefined behavior to coincidentally happen to work fine with every
single compiler in existence.
The one and only way to determine whether the behavior is defined is to
compare the code with the standard, and find out whether it meets the
requirements imposed by the standard for defined behavior. Keith has
already cited for you the parts of the standard which specify
requirements violated by your code.
Because the behavior is undefined, it is permissible for a fully
conforming implementation to use __foo() for some purpose other than the
one you used it for, and for that other purpose to have side effects
that you never dreamed of. It would be perfectly permissible, for
instance, for an implementation to treat __foo() as a predefined
function-like macro, and to replace every occurrence of __foo() in your
code with the expansion of that macro.
--
James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | "Tony" <nospamme@ever.net> |
|---|---|
| Date | 2011-09-17 23:50 -0500 |
| Message-ID | <uMedq.22391$9w.18239@newsfe18.iad> |
| In reply to | #10409 |
Keith Thompson wrote: > "Tony" <nospamme@ever.net> writes: >> HENRY Eshbaugh wrote: >>> On Sep 16, 8:09 pm, Ian Collins <ian-n...@hotmail.com> wrote: >>>> You shouldn't use names starting with a double underscore, they are >>>> reserved for the implementation. >>> >>> If that's not the implementation of the algorithm, then what is it? >> >> By "implementation", Ian meant "the compiler". That is what is >> typically understood as "the implementation". As in, "the >> implementation of the language". > > The "implementation" includes the compiler, the standard library, the > linker, and probably some other things. Bah! I'm supposed to feel sorry for you? > >> (Aside: Isn't a single underscore suggested for use by libraries?). > > The simple rule is Don't you EVEN dare me. "Bring your 'simple rule' before me, so that I can "judge", what is right and what is wrong, as if there was ever confusion, I assure you that I am appointed by the highest (er, uh, ...) I owe you what?! You have a "president". Don't you dare graft poliitics upon me. Because you will be "pushing my buttons". > to avoid defining *any* identifier starting with an > identifier, unless you're writing a C implementation. > > It's not quite that simple. Don't you dare put that "star of simplicity" on me, because I do know what you did.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-18 01:29 -0700 |
| Message-ID | <lnd3ey6yoo.fsf@nuthaus.mib.org> |
| In reply to | #10422 |
"Tony" <nospamme@ever.net> writes:
> Keith Thompson wrote:
[...]
>> The simple rule is
>
> Don't you EVEN
*plonk*
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Seebs <usenet-nospam@seebs.net> |
|---|---|
| Date | 2011-09-18 07:03 +0000 |
| Message-ID | <slrnj7b3ua.h9f.usenet-nospam@guild.seebs.net> |
| In reply to | #10373 |
On 2011-09-17, HENRY Eshbaugh <henryeshbaugh@gmail.com> wrote: > On Sep 16, 8:09?pm, Ian Collins <ian-n...@hotmail.com> wrote: >> You shouldn't use names starting with a double underscore, they are >> reserved for the implementation. > If that's not the implementation of the algorithm, then what is it? The phrase "the implementation" refers to the compiler and standard library. If you are not the person who is responsible for implementing printf() and fopen(), you are not working on the implementation. -s -- Copyright 2011, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated! I am not speaking for my employer, although they do rent some of my opinions.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2011-09-17 02:13 +0100 |
| Message-ID | <0.f1339677dbe12dfef275.20110917021342BST.87mxe4vum1.fsf@bsb.me.uk> |
| In reply to | #10361 |
HENRY Eshbaugh <henryeshbaugh@gmail.com> writes:
<snip>
> A recursive function is a lot more readable, plus more elegant.
>
> void reverse_list(ListElement *head)
> {
> if (head == NULL) return;
>
> __reverse_list(head->next, head);
>
> return;
> }
>
> void __reverse_list(ListElement *next, ListElement *this)
> {
> if (this == NULL) return;
>
> if (next->next) __reverse_list(next, next->next);
>
> next->next = this;
> return;
> }
Readable, elegant, correct: pick any two!
--
Ben.
[toc] | [prev] | [next] | [standalone]
| From | HENRY Eshbaugh <henryeshbaugh@gmail.com> |
|---|---|
| Date | 2011-09-16 19:52 -0700 |
| Message-ID | <9b78a505-b6fa-4939-8631-ef2151822344@cd4g2000vbb.googlegroups.com> |
| In reply to | #10367 |
On Sep 16, 9:13 pm, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
> Readable, elegant, correct: pick any two!
I just noticed the bug. My bad.
void reverse_list(ListElement *head)
{
if (head == NULL) return;
__reverse_list(head->next, head);
return;
}
void __reverse_list(ListElement *this, ListElement *next)
{
if (this == NULL) return;
if (next->next) __reverse_list(next, next->next);
next->next = this;
}
Now it works.
[toc] | [prev] | [next] | [standalone]
| From | Willem <willem@toad.stack.nl> |
|---|---|
| Date | 2011-09-17 08:58 +0000 |
| Message-ID | <slrnj78oa3.k0t.willem@toad.stack.nl> |
| In reply to | #10372 |
HENRY Eshbaugh wrote:
) On Sep 16, 9:13?pm, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
)> Readable, elegant, correct: pick any two!
)
) I just noticed the bug. My bad.
)
)
) void reverse_list(ListElement *head)
) {
) if (head == NULL) return;
) __reverse_list(head->next, head);
) return;
) }
)
) void __reverse_list(ListElement *this, ListElement *next)
) {
) if (this == NULL) return;
)
) if (next->next) __reverse_list(next, next->next);
)
) next->next = this;
) }
)
) Now it works.
Doesn't that effectively push the entire linked list up the stack first,
and then go down the stack again to build the reversed list ?
Seems wasteful to me, when it can be done in O(1) space.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
[toc] | [prev] | [next] | [standalone]
| From | henry eshbaugh <henryeshbaugh@gmail.com> |
|---|---|
| Date | 2011-09-18 15:32 -0700 |
| Message-ID | <a03d963a-a36f-4579-a266-9478c44bc0cd@n40g2000yqb.googlegroups.com> |
| In reply to | #10389 |
On Sep 17, 4:58 am, Willem <wil...@toad.stack.nl> wrote:
> HENRY Eshbaugh wrote:
>
> ) On Sep 16, 9:13?pm, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
> )> Readable, elegant, correct: pick any two!
> )
> ) I just noticed the bug. My bad.
> )
> )
> ) void reverse_list(ListElement *head)
> ) {
> ) if (head == NULL) return;
> ) __reverse_list(head->next, head);
> ) return;
> ) }
> )
> ) void __reverse_list(ListElement *this, ListElement *next)
> ) {
> ) if (this == NULL) return;
> )
> ) if (next->next) __reverse_list(next, next->next);
> )
> ) next->next = this;
> ) }
> )
> ) Now it works.
>
> Doesn't that effectively push the entire linked list up the stack first,
> and then go down the stack again to build the reversed list ?
> Seems wasteful to me, when it can be done in O(1) space.
>
> SaSW, Willem
> --
> Disclaimer: I am in no way responsible for any of the statements
> made in the above text. For all I know I might be
> drugged or something..
> No I'm not paranoid. You all think I'm paranoid, don't you !
> #EOT
Yeah. It's impossible to do it in O(1) time, considering that for
every node in the list, there's a pointer to change. Ramming it up the
stack and popping it off runs in O(n) time, which is acceptable, but
could cause a stack overflow.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-09-18 21:36 -0400 |
| Message-ID | <j566bp$426$2@dont-email.me> |
| In reply to | #10451 |
On 09/18/2011 06:32 PM, henry eshbaugh wrote: > On Sep 17, 4:58�am, Willem <wil...@toad.stack.nl> wrote: ... >> ... it can be done in O(1) space. ... > ... It's impossible to do it in O(1) time, Compare the last words in those two sentences, and then think about it for a while. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | cri@tiac.net (Richard Harter) |
|---|---|
| Date | 2011-09-19 05:24 +0000 |
| Message-ID | <4e76d200.304383815@text.giganews.com> |
| In reply to | #10466 |
On Sun, 18 Sep 2011 21:36:59 -0400, James Kuyper <jameskuyper@verizon.net> wrote: >On 09/18/2011 06:32 PM, henry eshbaugh wrote: >> On Sep 17, 4:58�am, Willem <wil...@toad.stack.nl> wrote: >... >>> ... it can be done in O(1) space. >... >> ... It's impossible to do it in O(1) time, > >Compare the last words in those two sentences, and then think about it >for a while. It is quite clear from his post that he understands the difference. Do you have a point?
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-09-19 08:21 -0400 |
| Message-ID | <j57c3p$vo4$1@dont-email.me> |
| In reply to | #10474 |
On 09/19/2011 01:24 AM, Richard Harter wrote: > On Sun, 18 Sep 2011 21:36:59 -0400, James Kuyper > <jameskuyper@verizon.net> wrote: > >> On 09/18/2011 06:32 PM, henry eshbaugh wrote: >>> On Sep 17, 4:58�am, Willem <wil...@toad.stack.nl> wrote: >> ... >>>> ... it can be done in O(1) space. >> ... >>> ... It's impossible to do it in O(1) time, >> >> Compare the last words in those two sentences, and then think about it >> for a while. > > It is quite clear from his post that he understands the difference. Not to me. It read to me like something that was intended to contradict the previous claim. I've just tried re-reading it on the assumption that he did understand the difference, and it come across as a complete non-sequitur. I've seen people post non-sequiturs before, so I'll concede that it's entirely possible that's what he did. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
Page 5 of 7 — ← Prev page 1 2 3 4 [5] 6 7 Next page →
Back to top | Article view | comp.lang.c
csiph-web