Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #59944 > unrolled thread
| Started by | asetofsymbols@gmail.com |
|---|---|
| First post | 2015-04-13 00:56 -0700 |
| Last post | 2015-04-13 15:02 -0700 |
| Articles | 20 on this page of 86 — 22 participants |
Back to article view | Back to comp.lang.c
primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 00:56 -0700
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-13 09:24 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 01:59 -0700
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-13 10:32 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 02:53 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 11:04 +0100
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-13 14:10 +0200
Re: primitive instruction for programming Emiliano Gomes Padilha <egpadilha@gmail.com> - 2015-04-20 14:27 -0700
Re: primitive instruction for programming Emiliano Gomes Padilha <egpadilha@gmail.com> - 2015-04-20 15:12 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-21 00:17 +0100
Re: primitive instruction for programming Emiliano Gomes Padilha <egpadilha@gmail.com> - 2015-04-22 11:07 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-21 09:04 +0200
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-21 03:02 -0500
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-21 01:34 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-21 11:34 +0200
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-21 11:48 +0100
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-21 13:10 +0200
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-21 10:53 +0100
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 20:09 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 12:48 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 09:40 +0200
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-14 11:24 +0100
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-14 05:39 -0500
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 13:29 +0200
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 10:59 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 03:28 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 03:33 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 03:59 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 04:23 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 11:36 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 04:26 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 12:41 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 06:26 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-13 15:33 +0200
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 06:44 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-13 16:30 +0200
Re: primitive instruction for programming Ian Collins <ian-news@hotmail.com> - 2015-04-14 07:52 +1200
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 09:47 +0200
Re: primitive instruction for programming raltbos@xs4all.nl (Richard Bos) - 2015-04-14 08:10 +0000
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 10:40 +0200
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-13 17:52 +0000
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-13 18:20 -0500
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-13 18:33 -0500
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-14 19:51 +0000
Re: primitive instruction for programming Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-16 09:04 -0700
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-17 02:25 +0000
Re: primitive instruction for programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-17 08:34 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-17 17:49 +0100
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-17 19:06 +0000
Re: primitive instruction for programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-17 20:45 -0700
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-18 16:43 +0000
Re: primitive instruction for programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-18 09:56 -0700
Re: primitive instruction for programming Stephen Sprunk <stephen@sprunk.org> - 2015-04-17 17:52 -0500
Re: primitive instruction for programming Morris Dovey <mrdovey@iedu.com> - 2015-04-17 18:02 -0500
Re: primitive instruction for programming Stephen Sprunk <stephen@sprunk.org> - 2015-04-17 19:26 -0500
Re: primitive instruction for programming Morris Dovey <mrdovey@iedu.com> - 2015-04-17 20:04 -0500
Re: primitive instruction for programming Michael Angelo Ravera <maravera@prodigy.net> - 2015-04-19 14:59 -0700
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-20 00:19 +0100
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-20 02:06 +0100
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-20 02:26 +0100
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-20 02:18 +0100
Re: primitive instruction for programming Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-18 18:59 -0700
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-19 16:28 +0000
Re: primitive instruction for programming Richard Damon <Richard@Damon-Family.org> - 2015-04-19 17:16 -0400
Re: primitive instruction for programming Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-22 15:28 -0700
Re: primitive instruction for programming John Bode <jfbode1029@gmail.com> - 2015-04-23 07:20 -0700
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 03:07 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 09:47 -0700
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 11:09 -0700
Re: primitive instruction for programming Noob <root@127.0.0.1> - 2015-04-13 20:43 +0200
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 12:09 -0700
Re: primitive instruction for programming Xcott Craver <xcottcraver@gmail.com> - 2015-04-14 07:11 -0700
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-14 07:28 -0700
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-14 15:57 +0100
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-14 08:13 -0700
Re: primitive instruction for programming fir <profesor.fir@gmail.com> - 2015-04-13 14:02 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 14:28 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 22:51 +0100
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 14:58 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 23:25 +0100
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 15:37 -0700
Re: primitive instruction for programming James Kuyper <jameskuyper@verizon.net> - 2015-04-13 19:09 -0400
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 16:20 -0700
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-13 18:03 -0500
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 20:58 -0700
Re: primitive instruction for programming fir <profesor.fir@gmail.com> - 2015-04-13 15:02 -0700
Page 2 of 5 — ← Prev page 1 [2] 3 4 5 Next page →
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-04-14 09:40 +0200 |
| Message-ID | <mgig8f$uhs$1@dont-email.me> |
| In reply to | #59980 |
On 13/04/15 21:09, Bartc wrote:
> On 13/04/2015 09:24, Richard Heathfield wrote:
>
>> You might find it instructive to attempt to rewrite the following
>> without resorting to non-goto diversions of control flow (such as
>> function calls):
>>
>> unsigned long f(unsigned long m, unsigned long n)
>> {
>> return m == 0 ? n + 1 : n == 0 ? f(m - 1, 1) : f(m - 1, f(m, n - 1));
>> }
>>
>
> Trickier than I expected:
>
Did you not recognise the function? It has turned up in this group
before - it's the Ackerman function, well-known for being a computable
function that is not primitive recursive and cannot be turned into a
simple loop. You have to use recursion - or simulate it (as you did)
with explicit stacks.
Richard's idea was to give the OP a hard problem, to force him to cheat
- he said his G macro was sufficient to replicate /any/ control
structure, and it clearly is not. You either have to use the additional
control structure of call/return (as the OP did), or introduce
additional data to track simulated recursion (as you did).
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-04-14 11:24 +0100 |
| Message-ID | <mgiprh$v06$1@dont-email.me> |
| In reply to | #60008 |
On 14/04/2015 08:40, David Brown wrote:
> On 13/04/15 21:09, Bartc wrote:
>> On 13/04/2015 09:24, Richard Heathfield wrote:
>>> unsigned long f(unsigned long m, unsigned long n)
>>> {
>>> return m == 0 ? n + 1 : n == 0 ? f(m - 1, 1) : f(m - 1, f(m, n - 1));
>>> }
>>>
>>
>> Trickier than I expected:
>>
>
> Did you not recognise the function? It has turned up in this group
> before - it's the Ackerman function,
Yes of course. But Richard didn't identify it so neither did I. I also
took it out of a function completely.
(The code is necessarily inside a main() function as that is harder to
avoid. I also made use of printf() as writing my own output routine
using only G macros was too challenging...)
> Richard's idea was to give the OP a hard problem, to force him to cheat
> - he said his G macro was sufficient to replicate /any/ control
> structure, and it clearly is not.
I don't agree that the call/return mechanism of a function is a control
statement like everything else (think also about passing arguments and
returning results).
Machine instruction sets generally don't provide control structures
other than jumps and conditional jumps like the OP's G macro. But they
do usually provide call and return instructions. It would be odd to try
and program in a higher-level language without taking advantage of those.
--
Bartc
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2015-04-14 05:39 -0500 |
| Message-ID | <oirpiah193qgj1te5i2j7rvphif2v8ji3h@4ax.com> |
| In reply to | #60019 |
On Tue, 14 Apr 2015 11:24:39 +0100, Bartc <bc@freeuk.com> wrote:
>On 14/04/2015 08:40, David Brown wrote:
>> On 13/04/15 21:09, Bartc wrote:
>>> On 13/04/2015 09:24, Richard Heathfield wrote:
>
>>>> unsigned long f(unsigned long m, unsigned long n)
>>>> {
>>>> return m == 0 ? n + 1 : n == 0 ? f(m - 1, 1) : f(m - 1, f(m, n - 1));
>>>> }
>>>>
>>>
>>> Trickier than I expected:
>>>
>>
>> Did you not recognise the function? It has turned up in this group
>> before - it's the Ackerman function,
>
>Yes of course. But Richard didn't identify it so neither did I. I also
>took it out of a function completely.
>
>(The code is necessarily inside a main() function as that is harder to
>avoid. I also made use of printf() as writing my own output routine
>using only G macros was too challenging...)
>
>> Richard's idea was to give the OP a hard problem, to force him to cheat
>> - he said his G macro was sufficient to replicate /any/ control
>> structure, and it clearly is not.
>
>I don't agree that the call/return mechanism of a function is a control
>statement like everything else (think also about passing arguments and
>returning results).
That is, however, the usual view, all of those are lumped under
control flow.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-04-14 13:29 +0200 |
| Message-ID | <mgitkc$cqj$1@dont-email.me> |
| In reply to | #60019 |
On 14/04/15 12:24, Bartc wrote:
> On 14/04/2015 08:40, David Brown wrote:
>> On 13/04/15 21:09, Bartc wrote:
>>> On 13/04/2015 09:24, Richard Heathfield wrote:
>
>>>> unsigned long f(unsigned long m, unsigned long n)
>>>> {
>>>> return m == 0 ? n + 1 : n == 0 ? f(m - 1, 1) : f(m - 1, f(m, n -
>>>> 1));
>>>> }
>>>>
>>>
>>> Trickier than I expected:
>>>
>>
>> Did you not recognise the function? It has turned up in this group
>> before - it's the Ackerman function,
>
> Yes of course. But Richard didn't identify it so neither did I. I also
> took it out of a function completely.
>
> (The code is necessarily inside a main() function as that is harder to
> avoid. I also made use of printf() as writing my own output routine
> using only G macros was too challenging...)
>
>> Richard's idea was to give the OP a hard problem, to force him to cheat
>> - he said his G macro was sufficient to replicate /any/ control
>> structure, and it clearly is not.
>
> I don't agree that the call/return mechanism of a function is a control
> statement like everything else (think also about passing arguments and
> returning results).
call/return are not control /statements/, as that refers to keywords in
a language (and in C you don't use keywords to define or call
functions), but they are still control /structures/.
>
> Machine instruction sets generally don't provide control structures
> other than jumps and conditional jumps like the OP's G macro. But they
> do usually provide call and return instructions. It would be odd to try
> and program in a higher-level language without taking advantage of those.
>
I certainly agree that it would be odd to make a high-level language
without using some form of function call and return mechanism. But
then, it is also extremely odd to try to make a high-level language
using only a conditional goto as an additional control mechanism. It's
the kind of thing people do when trying to make their mark on this page:
<http://en.wikipedia.org/wiki/Esoteric_programming_language>
Reducing control flow (other than calls/returns) to a simple conditional
jump is clearly pointless from the human viewpoint - it is also
pointless from a compiler's viewpoint, as it throws away useful
structure and information. But it can sometimes be fun as a brainteaser.
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-04-13 10:59 +0100 |
| Message-ID | <mgg401$mdk$1@dont-email.me> |
| In reply to | #59944 |
On 13/04/2015 08:56, asetofsymbols@gmail.com wrote:
> The primitive instruction for
> programming wrote in C
> it would be defined as:
>
> #define G(a,b) if(a)goto b
>
> With that and using labels
> each if() or loops
> can be made.
> There is not need other control
> path structure...
> Goto win 🏆:)
> G(1,m) would be goto
>
> If it is better than loop we can
> try... Post some C code and I
> would translate that in
> code use that macro...
You're right, I took this simple set of loops:
int count,n,a,b,c;
count=0;
n=500;
for (a=1; a<=n; ++a)
for (b=a; b<=n; ++b)
for (c=b; c<=n*2; ++c)
if (a*a+b*b==c*c)
++count;
printf("Count = %d\n",count);
and turned it into this:
#define G(a,b) if(a) goto b
int a;
int b;
int c;
int n;
int m;
int count;
n = 500;
count = 0;
L2:
a = 1;
G (n < 1, L5);
L3:
b = a;
G (b > n, L9);
L7:
c = b;
G (c > n*2, L13);
L11:
G (a*a+b*b != c*c, L14);
++count;
L14:
++c;
G (c <= n*2, L11);
L13:
++b;
G (b <= n, L7);
L9:
++a;
G (a <= n, L3);
L5:
printf("Count= %d\n",count);
It works perfectly! Thanks.
--
Bartc
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2015-04-13 03:28 -0700 |
| Message-ID | <cdd18dd0-0c8b-4904-9590-daedd0bdaa39@googlegroups.com> |
| In reply to | #59950 |
Bartc wrote:
"
count=0;
n=500;
for (a=1; a<=n; ++a)
for (b=a; b<=n; ++b)
for (c=b; c<=n*2; ++c)
if (a*a+b*b==c*c)
++count;
printf("Count = %d\n",count);
"
Easy would be something as:
count=0; n=500;
a=1; G(1,l0);
a0: b=0; G(1,l1);
a1: c=b; G(1,l3);
a3: G(!(a*a+b*b==c*c),l4); ++count;
l4: ++c;
l3: G(c<=n*2, a3);
++b;
l2: G(b<=n, a1);
++a;
l0: G(a<=n, a0);
printf("Count = %d\n",count);
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2015-04-13 03:33 -0700 |
| Message-ID | <c2abacb7-4d35-4554-9c86-2004fb7a9940@googlegroups.com> |
| In reply to | #59953 |
Easy would be something as:
count=0; n=500;
a=1; G(1,l0);
a0: b=a; G(1,l1);
a1: c=b; G(1,l2);
a2: G(!(a*a+b*b==c*c),l3); ++count;
l3: ++c;
l2: G(c<=n*2, a2);
++b;
l1: G(b<=n, a1);
++a;
l0: G(a<=n, a0);
printf("Count = %d\n",count);
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2015-04-13 03:59 -0700 |
| Message-ID | <8f42eb48-cc98-4acf-acfa-f8d881370fa4@googlegroups.com> |
| In reply to | #59954 |
In the few I understand this google sys for to speak in NG: use one font for send one for see the message etc So it is miss indentation even when I see it here...
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2015-04-13 04:23 -0700 |
| Message-ID | <2cea35b0-b0f9-4adf-ba45-c3576318336a@googlegroups.com> |
| In reply to | #59957 |
I wrote: "In the few I understand this google sys for to speak in NG: use one font for send one for see the message etc So it is miss indentation even when I see it here..." All ok. I see the indentation with one other news reader It seems that I write in a font that is ok for indentation. Google all ok thank you
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-04-13 11:36 +0100 |
| Message-ID | <mgg66h$u4r$1@dont-email.me> |
| In reply to | #59953 |
On 13/04/2015 11:28, asetofsymbols@gmail.com wrote:
> Bartc wrote:
> "
> count=0;
> n=500;
> for (a=1; a<=n; ++a)
> for (b=a; b<=n; ++b)
> for (c=b; c<=n*2; ++c)
> if (a*a+b*b==c*c)
> ++count;
>
>
> printf("Count = %d\n",count);
> "
> Easy would be something as:
> count=0; n=500;
> a=1; G(1,l0);
> a0: b=0; G(1,l1);
> a1: c=b; G(1,l3);
> a3: G(!(a*a+b*b==c*c),l4); ++count;
> l4: ++c;
> l3: G(c<=n*2, a3);
> ++b;
> l2: G(b<=n, a1);
> ++a;
> l0: G(a<=n, a0);
> printf("Count = %d\n",count);
>
"label l1 not defined".
This style of code is more error-prone. It's not even obvious where l1
needs to go; I can put it in several places and it would still compile,
but the program won't work.
This is something that just isn't a problem when using conventional
control structures; why do you want to introduce a new source of bugs?
--
Bartc
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2015-04-13 04:26 -0700 |
| Message-ID | <9eb1ec27-82da-441e-b70e-736cb69907be@googlegroups.com> |
| In reply to | #59956 |
Bart wrote:... The right code it is in post, by me that here result date today:12:33 It result 456
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-04-13 12:41 +0100 |
| Message-ID | <mgg9v4$bp0$1@dont-email.me> |
| In reply to | #59960 |
On 13/04/2015 12:26, asetofsymbols@gmail.com wrote: > Bart wrote:... > > The right code it is in post, by me > that here result date today:12:33 Yes, but that's not the point, which is that using only gotos vastly increases the opportunities for error. It is also much harder to see if something is wrong when reading someone else's code. This kind of thing can be fine for machine-generated code which you rarely have to read. But not when humans are involved. > It result 456 (That's right at least. Something to do with the number of Pythagorean right-angled triangles with integer sides up to n units.) -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2015-04-13 06:26 -0700 |
| Message-ID | <70a6835e-2caf-4710-9efb-a2d557985f01@googlegroups.com> |
| In reply to | #59961 |
Bart wrote: "Yes, but that's not the point, which is that using only gotos vastly increases the opportunities for error. It is also much harder to see if something is wrong when reading someone else's code." If code is not indented in a meaningful way [were one see code path how are organized ] it is difficult to understand and to correct Both using G(,) macro, or in loop + if() constructs Your code using macro G(,) here result with no indentation
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-04-13 15:33 +0200 |
| Message-ID | <mggggo$3ou$1@dont-email.me> |
| In reply to | #59965 |
On 13/04/15 15:26, asetofsymbols@gmail.com wrote: > Bart wrote: > "Yes, but that's not the point, which is that using only gotos vastly > increases the opportunities for error. It is also much harder to see if > something is wrong when reading someone else's code." > > If code is not indented in a meaningful way > [were one see code path > how are organized ] > it is difficult to understand > and to correct > Both using G(,) macro, or in > loop + if() constructs > > Your code using macro G(,) > here result with no indentation > Are you seriously suggesting that indentation is relevant for code mangled with your G macro? The macro makes code incomprehensible for normal use - it's only practical application is for making obfuscated source code. Lack of indentation might make it even less understandable, but that's just icing on the cake.
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2015-04-13 06:44 -0700 |
| Message-ID | <028757cb-94c8-4d58-a102-3e8ee042c586@googlegroups.com> |
| In reply to | #59966 |
Yes indentation is fundamental (at last for a good readability)
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-04-13 16:30 +0200 |
| Message-ID | <mggjrr$fhk$1@dont-email.me> |
| In reply to | #59967 |
On 13/04/15 15:44, asetofsymbols@gmail.com wrote: > Yes indentation is fundamental > (at last for a good readability) > Please learn to quote properly! Indentation is important to readability. But when you go so far as to use this G macro to obfuscate the code, indentation or lack thereof makes no significant difference. Indentation is only /part/ of making code comprehensible. When everything else is wrong, it is not enough to make line noise readable.
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2015-04-14 07:52 +1200 |
| Message-ID | <cp2l3pFj91aU1@mid.individual.net> |
| In reply to | #59969 |
David Brown wrote: > On 13/04/15 15:44, asetofsymbols@gmail.com wrote: >> Yes indentation is fundamental >> (at last for a good readability) >> > > Please learn to quote properly! > > Indentation is important to readability. But when you go so far as to > use this G macro to obfuscate the code, indentation or lack thereof > makes no significant difference. > > Indentation is only /part/ of making code comprehensible. When > everything else is wrong, it is not enough to make line noise readable. Do you really think you are going to convince someone who appears incapable of learning how to quote? -- Ian Collins
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-04-14 09:47 +0200 |
| Message-ID | <mgigk3$vjj$1@dont-email.me> |
| In reply to | #59983 |
On 13/04/15 21:52, Ian Collins wrote: > David Brown wrote: >> On 13/04/15 15:44, asetofsymbols@gmail.com wrote: >>> Yes indentation is fundamental >>> (at last for a good readability) >>> >> >> Please learn to quote properly! >> >> Indentation is important to readability. But when you go so far as to >> use this G macro to obfuscate the code, indentation or lack thereof >> makes no significant difference. >> >> Indentation is only /part/ of making code comprehensible. When >> everything else is wrong, it is not enough to make line noise readable. > > Do you really think you are going to convince someone who appears > incapable of learning how to quote? > It's a long shot, I agree. But it is not /entirely/ inconceivable that he will eventually realise that his posting style is different from everyone else's, and that it annoys other people. I have seen people on Usenet to change their styles after enough complaints - it's rare, but it does happen. But don't worry - I'm not going to fuss about his quoting unless I am reply to him anyway, and that doesn't happen often. Few of his posts (in C or English) are comprehensible enough for a reply.
[toc] | [prev] | [next] | [standalone]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2015-04-14 08:10 +0000 |
| Message-ID | <552ccb2b.422859@news.xs4all.nl> |
| In reply to | #60010 |
David Brown <david.brown@hesbynett.no> wrote: > On 13/04/15 21:52, Ian Collins wrote: > > David Brown wrote: > >> On 13/04/15 15:44, asetofsymbols@gmail.com wrote: > >>> Yes indentation is fundamental > >>> (at last for a good readability) > >> > >> Please learn to quote properly! > >> > >> Indentation is important to readability. But when you go so far as to > >> use this G macro to obfuscate the code, indentation or lack thereof > >> makes no significant difference. > >> > >> Indentation is only /part/ of making code comprehensible. When > >> everything else is wrong, it is not enough to make line noise readable. > > > > Do you really think you are going to convince someone who appears > > incapable of learning how to quote? > > It's a long shot, I agree. But it is not /entirely/ inconceivable that > he will eventually realise that his posting style is different from > everyone else's, and that it annoys other people. He's spent several years not learning that defining single-letter macros for C's keywords is a stupid, stupid, stupid idea. He is _not_ going to learn to use Goggle Grippes semi-properly, let alone a real newsreader properly. Richard
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-04-14 10:40 +0200 |
| Message-ID | <mgijnm$9u5$1@dont-email.me> |
| In reply to | #60011 |
On 14/04/15 10:10, Richard Bos wrote: > David Brown <david.brown@hesbynett.no> wrote: > >> On 13/04/15 21:52, Ian Collins wrote: >>> David Brown wrote: >>>> On 13/04/15 15:44, asetofsymbols@gmail.com wrote: >>>>> Yes indentation is fundamental >>>>> (at last for a good readability) >>>> >>>> Please learn to quote properly! >>>> >>>> Indentation is important to readability. But when you go so far as to >>>> use this G macro to obfuscate the code, indentation or lack thereof >>>> makes no significant difference. >>>> >>>> Indentation is only /part/ of making code comprehensible. When >>>> everything else is wrong, it is not enough to make line noise readable. >>> >>> Do you really think you are going to convince someone who appears >>> incapable of learning how to quote? >> >> It's a long shot, I agree. But it is not /entirely/ inconceivable that >> he will eventually realise that his posting style is different from >> everyone else's, and that it annoys other people. > > He's spent several years not learning that defining single-letter macros > for C's keywords is a stupid, stupid, stupid idea. He is _not_ going to > learn to use Goggle Grippes semi-properly, let alone a real newsreader > properly. > > Richard > I won't be put off that easily! As General Melchett says in Black Adder, "if nothing else works, then a total pig-headed unwillingness to look facts in the face will see us through." (Of course I know you are right about the likelihood of his changing. But if one is replying to someone with bad style, it is not unreasonable to complain about it occasionally, and frame that complaint as a polite request.)
[toc] | [prev] | [next] | [standalone]
Page 2 of 5 — ← Prev page 1 [2] 3 4 5 Next page →
Back to top | Article view | comp.lang.c
csiph-web