Another spinoza challenge

S

spinoza1111

Oops. The clear answer is Visual Basic.

Well, that's *a* clear answer, at least. And it's the answer I think
the test setter probably intended. But Perl is another clear answer.
Just for fun, here's a Perl program I found on the Web:

    ''=~(        '(?{'        .('`'        |'%')        .('['        ^'-')
    .('`'        |'!')        .('`'        |',')        .'"'.        '\\$'
    .'=='        .('['        ^'+')        .('`'        |'/')        .('['
    ^'+')        .'||'        .(';'        &'=')        .(';'        &'=')
    .';-'        .'-'.        '\\$'        .'=;'        .('['        ^'(')
    .('['        ^'.')        .('`'        |'"')        .('!'        ^'+')
   .'_\\{'      .'(\\$'      .';=('.      '\\$=|'      ."\|".(      '`'^'.'
  ).(('`')|    '/').').'    .'\\"'.+(    '{'^'[').    ('`'|'"')    .('`'|'/'
 ).('['^'/')  .('['^'/').  ('`'|',').(  '`'|('%')).  '\\".\\"'.(  '['^('(')).
 '\\"'.('['^  '#').'!!--'  .'\\$=.\\"'  .('{'^'[').  ('`'|'/').(  '`'|"\&").(
 '{'^"\[").(  '`'|"\"").(  '`'|"\%").(  '`'|"\%").(  '['^(')'))..  '\\").\\"'.
 ('{'^'[').(  '`'|"\/").(  '`'|"\.").(  '{'^"\[").(  '['^"\/").(  '`'|"\(").(
 '`'|"\%").(  '{'^"\[").(  '['^"\,").(  '`'|"\!").(  '`'|"\,").(  '`'|(',')).
 '\\"\\}'.+(  '['^"\+").(  '['^"\)").(  '`'|"\)").(  '`'|"\.").(  '['^('/')).
 '+_,\\",'.(  '{'^('[')).  ('\\$;!').(  '!'^"\+").(  '{'^"\/").(  '`'|"\!").(
 '`'|"\+").(  '`'|"\%").(  '{'^"\[").(  '`'|"\/").(  '`'|"\.").(  '`'|"\%").(
 '{'^"\[").(  '`'|"\$").(  '`'|"\/").(  '['^"\,").(  '`'|('.'))..  ','.(('{')^
 '[').("\["^  '+').("\`"|  '!').("\["^  '(').("\["^  '(').("\{"^  '[').("\`"|
 ')').("\["^  '/').("\{"^  '[').("\`"|  '!').("\["^  ')').("\`"|  '/').("\["^
 '.').("\`"|  '.').("\`"|  '$')."\,".(  '!'^('+')).  '\\",_,\\"'  .'!'.("\!"^
 '+').("\!"^  '+').'\\"'.  ('['^',').(  '`'|"\(").(  '`'|"\)").(  '`'|"\,").(
 '`'|('%')).  '++\\$="})'  );$:=('.')^  '~';$~='@'|  '(';$^=')'^  '[';$/='`';

which is perhaps reminiscent of some IOCCC entries! But here's a more typical
Perl program (which does the same thing as the above):

use Acme::EyeDrops qw(sightly get_eye_string hjoin_shapes);
my $ninety_nine = <<'BURP';
$==pop||99;--$=;sub
_{($;=($=||No)." bottle"."s"x!!--$=." of beer")." on the wall"}
print+_,", $;!
Take one down, pass it around,
",_,"!

"while++$=
BURP
chop($ninety_nine); $ninety_nine =~ s/\nprint/print/;
print sightly( { Regex         => 1,
                 Compact       => 1,
                 ShapeString   => hjoin_shapes(2,
                                  (get_eye_string('bottle2'))x6),
                  SourceString  => $ninety_nine } );

And this is nothing like C's syntax. So Perl is also a clear answer.
All the others have a VERY
IMPORTANT feature, and this is explicit block structure.

VB uses block structure to some extent as well. As for Perl, it doesn't even
enclose the entry code in an explicit block!

Use your common sense and test-taking knowledge. Reason that in this
question, the narrower definition of C (which prohibits // comments,
as Heathfield reminded me) is meant.

I reminded you of no such thing. C does not prohibit // comments.
C90 requires the implementation to issue a diagnostic message if
the program contains any syntax errors, and // "comments" would
normally mean a syntax error - but the implementation is allowed
to accept them provided it issues that message. Furthermore, as
of C99 // comments have been codified as part of C.
If you can't deal with ambiguity, don't talk to end users.

If you don't know the language (and it is clear that you don't
know it very well), don't presume to make judgements about it.

I will so presume. This is because the language is just a bunch of
rather foolish decisions made in 1970 and compounded by unethical
decisions made in 1999. Your stunted personality and inability to
communicate even your valid points are evidence of what this
"knowledge" can do to a person.

There's something wrong going on if knowledge of a programming
language is correlated with high regard for a programming language.
The two "variables" should be independent. When they are not, this
means that the learning of the language has been zero-sum in the sense
that the programmer is loyal to the language because his knowledge has
been reduced to knowing-how, to do things in his favorite language.

The above program exhibits undefined behaviour because it calls a
variadic function without a valid prototype in scope, so only a
fool would draw conclusions about the language from that program.

You can't even tell the difference between a code example and working
code. Of course, the code works. I copied it from a program which had
stdio. You know that, and you are being PROFOUNDLY dishonest.
If I add the appropriate header and run the program on my
system, I get the following output:

me@here> ./foo
Goodbye, cruel worldme@here>

which is almost certainly not what was intended.

Then, you're incompetent, since it's incumbent on you to adapt the
program to your perverted environment.

We've been over this ground repeatedly. You constantly pretend to be
even dumber than you are in order to make more intelligent people look
stupid, and that's a classic yob trick. Most people see through this.
I think you'd be more successful in life if you stopped.

I saw "goodbye, cruel world" WITHOUT any extra characters, because I
run C from inside Microsoft C++ Express, a better development
platform, probably, than yours. I put a break right after the printf
and saw only "good-bye cruel world" on an otherwise black MS-DOS style
screen, and this is what I wanted. There are countless applications
where you DON'T want a carriage return/line feed or line feed.
No, it's based on the fact that #include is a preprocessor directive,
and anyone who presumes to set a test on C ought to be aware of this
fairly basic piece of information.

You constantly make global, and globally uncharitable, inferences
about people's understanding based on differential modes of
expression. You come, it's clear to me, from a lower middle class
abusive family environment where kids get slapped around if they talk
out of turn, in which Job One is hustling to please teachers and the
boss by never talking out of turn. It's Dickensian, and it makes me
puke.

You can sabotage an expression of knowledge, but you cannot yourself
communicate your knowledge.

People have a right to express their understanding of C in different
ways. Trivially, they have the right to use their own native language.
In the context of a discussion of preprocessor directives, in a group
effort such as a structured walkthrough or extreme programming, only a
nasty little CREEP goes around correcting usage save when the usage
corrected hides an important distinction.

Take your being right about call by value. You never thought to
explain properly the mechanism that accounts for the fact that all
values are on the stack when a procedure starts, and the fact that
there's no way of delaying evaluation. In fact, you made one of your
famous unfalsifiable negative claims: that gee it might be possible to
implement C without stacks.

You have "learned" C but you've forgotten how to write English, if
indeed you ever learned, and you have no business posting here
whatsoever. Go and implement C runtime without stacks, or something.

He's right on both counts.



I don't know of any experienced C programmer who does so.

Then you need to get out more.
True precision, however, is one - not the only, by any means, but
*one* - indicator of expertise.

True to what? C is not a thing, it's a form of life and a set of
social practices, some of which are deviant.
The criticisms of Herbert Schildt's code are the direct result of
Herbert Schildt's code being riddled with errors. Errors are of
course unavoidable, but he would be well advised to acknowledge
them via a comprehensive errata site.
As for Jacob Navia, he tends to interpret disagreement as
attack, so it's not surprising if he feels attacked. Nevertheless,
people have a right to disagree.

I saw the filth you posted about him. Unlike a lot of the cowards
here, he fought back.
No, it means that C is portable even to machines with a
fixed entry symbol.


No, many options are a sign of flexibility.

Unlearn that. Many options merely increase the space of possible
programs, and under the programming variant of Gresham's Law (99% of
everything is fucked), many options merely increase the probability of
errors.
 
D

Dik T. Winter

> I will so presume. This is because the language is just a bunch of
> rather foolish decisions made in 1970 and compounded by unethical
> decisions made in 1999.

We know your derision of RH well enough, it is not necessary to compound it.
On the other hand, what was unethical about the decisions in 1999, what was
foolish about the decisions in 1970? They did not match what you wanted?

Can you tell us anything about the foolish decisions and unethical decisions
in Fortran and Algol (60 or 68)?
> There's something wrong going on if knowledge of a programming
> language is correlated with high regard for a programming language.
> The two "variables" should be independent. When they are not, this
> means that the learning of the language has been zero-sum in the sense
> that the programmer is loyal to the language because his knowledge has
> been reduced to knowing-how, to do things in his favorite language.

Oh, come on. You can have derision of a programming language that you do
not know (I have a lot of derision for Perl), on the other hand it would
be helpful if you were able to express your derision with actual examples.
And that is something you are not doing. You derise C but all your
exampels are invalid. So, where does that put you? Derision due to lack
of knowledge?
 
F

Flash Gordon

James said:
Kelsey Bjarnason wrote:
...

Most strictly conforming C code can, with re-writes that are usually
relatively minor, be compiled with either C or C++ to generate the same
behavior as the original code. I'd say that's a fair amount of similarity.

However, a lot of C++ programs cannot be compiled as C to produce the
same behaviour without major rewrites.

I would actually say that syntactically there are a lot of similarities
between C, C++, JavaScript, Perl and Java (all the rest have a lot of
syntax based on the C syntax), and Perl and C++ have other similarities
(they make available a very similar library, although both also provide
a lot of other stuff).

Visual Basic is in some respects very similar to C++, both are languages
built by taking a procedural language and adding lots of other stuff on
top, including OO stuff. This also gives VB some similarity to C since
under all the OO and Windows specific stuff there is a simple procedural
language and C is a simple procedural language.

Has that muddied the water enough?

Personally, without thinking about it, I got the right answer. It was
only by thinking about it I could get lots of other possibilities, from
none being similar to C to all of them having some similarity! Had Lisp
been on the list I would have found it hard to give reason for it being
similar to C ;-)
 
S

spinoza1111

I come from a lower middle class family, though not an abusive one. I wasn't
physically disciplined in any severe way, but my parents were very strict
with me about manners and homework being in on time, in a way that working
class parents or richer parents aren't.
The reason is simple. Lower middle class parents can't insulate their
children from rough elements, and they can't afford to dig them out of
trouble if they get into it. So it's the local comprehensive school, and if
exams are failed you don't go to university at all instead of going to a
crammer to retake. The teachers are on rather more money than your parents,
so they can't be intimidated into giving you extra attention in the way that
rich parents can pull strings. However they will do their best for you if
you are a nice kid.
It's the same at work. If Dad loses his job there are no contacts to get
another one, there's no cushion of money to fall back on until the right
thing turns up, and his skills are unlikely to be those considered
irreplaceable.
Our financial and economic circumstances create our consciousness. That's as
true of you as it is of Richard Heathfield.

Yes, it is, but the fact that I grew up in a somewhat more coddled
environment meant that I was free to choose to educate myself rather
than have to swot for teachers who knew less than I.

I think you miss the fact that there are two "degrees of freedom".
Some kids, growing up in straitened circumstances, learn discipline.
Others learn a surface discipline but have unmanaged anger.

It is not a necessary truth that a strict and constrained lower middle
class environment produces healthy and successful people. It produces
such people along with creeps.

Malcolm, did you see the play and movie The History Boys?
 
S

spinoza1111

I come from a lower middle class family, though not an abusive one. I wasn't
physically disciplined in any severe way, but my parents were very strict
with me about manners and homework being in on time, in a way that working
class parents or richer parents aren't.
The reason is simple. Lower middle class parents can't insulate their
children from rough elements, and they can't afford to dig them out of
trouble if they get into it. So it's the local comprehensive school, and if
exams are failed you don't go to university at all instead of going to a
crammer to retake. The teachers are on rather more money than your parents,
so they can't be intimidated into giving you extra attention in the way that
rich parents can pull strings. However they will do their best for you if
you are a nice kid.
It's the same at work. If Dad loses his job there are no contacts to get
another one, there's no cushion of money to fall back on until the right
thing turns up, and his skills are unlikely to be those considered
irreplaceable.
Our financial and economic circumstances create our consciousness. That's as
true of you as it is of Richard Heathfield.

Not quite. I've seen more of the world (teaching at Princeton and
DeVry, a technical school in the USA) and have made different choices
than Heathfield, and am altogether a more interesting and better-
rounded chap than he, although he has a more serviceable understanding
of C. Also, Americans on the whole are less constrained by class than
Brits, and more free to self-create. Steve Jobs would have wound up in
prison in Britain.
 
S

spinoza1111

Given that the test was broken, your scores are meaningless (as I
realise you know already)...


Well, yes it was a stupid test, and no, nobody with any brains would
really use Int as an identifier, but it /is/ a legal identifier and
you should have spotted the difference (unless you were just sick to
the back teeth of the whole nonsense by then), and docking a mark for
getting it wrong is a perfectly reasonable thing to do. I suppose
it's a bit like clipping the edge of the track when you're going for
a perfect lap - you know you shouldn't do it, you know it will cost
you time, but hey, sometimes it just happens anyway.

Wouldn't it be nice if somebody competent came up with a C test?

Get busy.
 
S

spinoza1111

...
 > I will so presume. This is because the language is just a bunch of
 > rather foolish decisions made in 1970 and compounded by unethical
 > decisions made in 1999.

We know your derision of RH well enough, it is not necessary to compound it.
On the other hand, what was unethical about the decisions in 1999, what was
foolish about the decisions in 1970?  They did not match what you wanted?

Yes: they did not match what I "wanted". That is, since the 17th
century, the categories of "subjective" and "objective" have reversed
polarity. Any slob in the 17th century, like Spinoza, could be an
applied scientist insofar as he was willing to use the scientific
method. But today, you can't use it without all sorts of quasi-
religious genuflection to a lot of malarkey built up over time.

In 1973, having read Saul Rosen's collection of seminal papers
"Programming Systems and Languages", I'd tentatively decided that
getting AWAY from the machine, AT WARP SPEED, was very important, and
was willing to use a language implemented by way of an interpreter if
that was necessary, or recommend (as a sort of student member of the
university computer committee) that we get Burroughs' hardware, in
that it was software-friendly. I figured that Moore's Law would take
care of "speed", and by 1973 I'd done a lot of assembly language
hacking (self-modifying code, etc) to see that it was merely a way to
get my girlfriend sexually frustrated and lonely, and a waste of time.

As a sort of hippie I also felt that "efficiency" in production was
actually a way of making the working class work harder and harder to
keep up with machines, and this has certainly been borne out by
events. In 1970, you could sit and read Playboy in front of the old
360's console while it ground through the code, and I could see that
this was going to be eliminated by an overemphasis on speed.

When I read about C (probably circa 1976 in the old Byte Magazine), I
thought it counter-revolutionary, asking why on Earth would the
developers enable the use of a machine address in a "high-level"
language. I figured at the time that we knew how to write assemblers
for specific machines having done so myself, so what was the need?

I preferred Niklaus Worth's 1974 work in Pascal.

A Polish guy at my company in 1980 was all on fire about C, and his
rage for C, and his hatred of Cobol (which we both were using) seemed
curiously linked with his hatred of the Eastern Bloc and its
bureaucracy. Of course, he was right locally: C is better than Cobol.
But Eastern Europeans were also immiserated by the fall of the Berlin
Wall, if not by C. "Bureaucracy" was not ended, because "bureaucracy"
is just more efficient in C whereas Cobol is a sort of despotism
tempered by stupidity.

Loyalty to the perfection of machines is loyalty to one's own
destruction. It would have been better if we'd all figured out Algol
and used it interpretively so that anytime there was an error, we
could get diagnostics. Elvis Costello's verdict on Thatcher was "all
this useless beauty": my verdict on software is "all this useless
efficiency".

You may think I'm a dreamer but I'm not the only one. The hippie
computer community in Menlo Park and on the pages of Byte magazine was
able to create Club of Rome style simulations of environmental
disaster and empower small progressive businesses. It was destroyed
because of the need for a small number of people to get filthy rich.
Can you tell us anything about the foolish decisions and unethical decisions
in Fortran and Algol (60 or 68)?

Are you kidding? Fortran was pushed down the throat of the US defense
community without strings, with its own floating point idiom, with the
DO10I=3 problem and with broken idiomatic compilers and runtimes. This
was because IBM wanted to dominate the market place. The Dutch went
along but the Swedes said no. The Soviets copied the worst of
everything with unerring Communist instincts for utter dreck although
some dissidents preferred Algol. I used to have a hilarious collection
of papers from Springer on Algol compiler writing in which Ershov is
engaged in a cover up. Remember him?
 
N

Nick Keighley

spinoza1111 wrote:
This is because the [C] language is just a bunch of
rather foolish decisions made in 1970

No, it isn't. And I cheerfully offer as much hard evidence in support
of the rebuttal as you do in support of the claim - i.e. none.

Linux was written in C so presumably someone thought it had its
good points. I understand large chunks of Windows is/was written in C


what unethical decisions?

I communicate my points just fine. Learn to read.


I actually agree with this. I have perfect knowledge of at least one
programming language, since I designed it (I know that doesn't
necessarily follow, but in this case it does because it was an
amazingly simple language, albeit TC). Not C, obviously. Just a toy
language. And yet, having perfect knowledge thereof, I have no regard
for it whatsoever.

whilst I disagree to an extent. What is the point of mastering a
language
you hate? Though familiarity tends to reduce the dislike. I thought C
looked horrid when i first saw it. I was coming from pascal. Knowledge
of a language is quite likely to engender a liking. Though I never
really
loved Fortran...

ROTFL! There are so many misconceptions in that single sentence that
it's practically worth framing.

for instance:-

1. failure to understand what undefined behaviour means
2. that MVC is a "better development environment"
3. that it is better for UB to give "expected" behaviour
If you are content to stick to a single platform AND require all your
users to pay Microsoft for a copy of Visual C (or, more likely, don't
have any users),

The Express edition is free

that's fine. Some of us write code that can run
anywhere, not just on one compiler on one platform and then only in
debug mode.

debug mode?


isn't that Sturgeon's law?

It is true that increasing available power and flexibility also
increases available capacity to err. That doesn't mean, however, that
extra power and flexibility are bad things.

a sensible set of defaults can help. My mother's old Box Brownie
camera is far simpler than my digital camera. Is it therefore
"better"?


--
"Hello everybody out there using minix - I'm doing a (free) operating
system (just a hobby, won't be big and professional like gnu) for
386(486) AT clones"

- Linus Torvalds, August 1991
 
N

Nick Keighley

Yes: they did not match what I "wanted". That is, since the 17th
century, the categories of "subjective" and "objective" have reversed
polarity. Any slob in the 17th century, like Spinoza, could be an
applied scientist insofar as he was willing to use the scientific
method. But today, you can't use it without all sorts of quasi-
religious genuflection to a lot of malarkey built up over time.

could you re-phrase that so us mere computer programmers can
understand it.
What were the unethical decisions?


In 1973, having read Saul Rosen's collection of seminal papers
"Programming Systems and Languages", I'd tentatively decided that
getting AWAY from the machine, AT WARP SPEED, was very important,

there are still times we need to get close to the bare metal.
And twenty years ago (13 Moore cycles- divide everything by 8000)
even more often. The kernels of OSs still needs that bare metal
access. So do quite a few other things.

When I read about C (probably circa 1976 in the old Byte Magazine), I
thought it counter-revolutionary, asking why on Earth would the
developers enable the use of a machine address in a "high-level"
language. I figured at the time that we knew how to write assemblers
for specific machines having done so myself, so what was the need?

to save learning a new assembler with each machine? To write
portable programs?

I preferred Niklaus Worth's 1974 work in Pascal.

I was a pascal fan. But many pascal dialects also allowed this
low level access. I've written Pascal for the old Mac. And used
various Borland products.

Are you kidding? Fortran was pushed down the throat of the US defense
community without strings, with its own floating point idiom, with the
DO10I=3 problem and with broken idiomatic compilers and runtimes.

but to say the language was foolish is just whigism. The people in
1960
didn't know what we know now. Things that turned out not too good
include
the computed goto, the bizzare limits on expressions, rigid layout,
type determined by the form of the identifier (though perl does
that...),
nasty hard to parse syntax etc. But non of these were "foolish".

To call these decisions unethical is to imply the people who made
them not only wrong, but were knowingly building a bad language.
This I don't believe.

How about a go at Algol-60? :)

Call by name is a nightmare and the FOR
constuct must have been invented under the influence of drugs.
I've written code to translate CORAL to C (CORAL inherited some of
Algol's wierd stuff) and it just emitted "Too Hard" diagnostics if
the FOR loop did anything clever (fortunatly very little of the code
did that).

<snip>
 
C

Chris Dollin

Nick said:
isn't that Sturgeon's law?

For values of 99 equal to 90, yes.

--
"It is impossible to predict when better methods - James Blish
will emerge, or what they will be." /A Life for the Stars/

Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England
 
J

James Kuyper

Kelsey said:
[snips]

spinoza1111 wrote: ....
Use your common sense and test-taking knowledge.

My common sense tells me that if, in fact, C99 ratified // comments, which
I'm fairly certain it did, the only possible correct answer is *both* /**/
and // type comments, which is not an allowed answer.

Your common sense should also tell you that since only one answer is
allowed, the test writer was either ignoring C99, or unaware of it (it
might not even have existed yet at the time he wrote the test).
In this case, it means "required, by the standard, in order to qualify as a
(strictly?) conforming C program."

Yes, the word "strictly" is required. A conforming C program is not
required to generate the terminal newline. Only a strictly conforming
one is so restricted. The only meaningful restriction on a "conforming"
C program is that it cannot contain a #error directive that is
guaranteed to survive conditional compilation, because that's the only
kind of program that all implementations are required to reject.
 
D

Dik T. Winter

>
> Yes: they did not match what I "wanted".

Thanks, so everything you do not want is unethical. That at least is a
clear answer. BTW, why do you name yourself after a slob?
> I figured that Moore's Law would take
> care of "speed", and by 1973 I'd done a lot of assembly language
> hacking (self-modifying code, etc) to see that it was merely a way to
> get my girlfriend sexually frustrated and lonely, and a waste of time.

Oh, I have done quite a bit of assembly hacking, but never reverted to
self-modifying code. It must have been your exposure to the 1401 of
which even the manuals (and, yes, I have read them) did support it
(together with multiple use of characters as either opcode or printing
character).
> As a sort of hippie I also felt that "efficiency" in production was
> actually a way of making the working class work harder and harder to
> keep up with machines, and this has certainly been borne out by
> events.

Hm. My experience is different. Efficiency in "programs" at least was
(and is) a way to make predictions before the fact. At least, I like to
have the weatherforcast for tomorrow today and not the day after tomorrow
(even when it is wrong on occasion).
> In 1970, you could sit and read Playboy in front of the old
> 360's console while it ground through the code, and I could see that
> this was going to be eliminated by an overemphasis on speed.

Well, back in about 1970 I had to proceed with a survey of the housing in
Amsterdam, running statistical methods. The input was about 20,000
punch cards, and the program ran for about 12 days (24 hours a day). I
would have liked if it could have gone on a bit faster.
> When I read about C (probably circa 1976 in the old Byte Magazine), I
> thought it counter-revolutionary, asking why on Earth would the
> developers enable the use of a machine address in a "high-level"
> language. I figured at the time that we knew how to write assemblers
> for specific machines having done so myself, so what was the need?
>
> I preferred Niklaus Worth's 1974 work in Pascal.

Didn't he do the same with his pointers? I have used the Pascal compiler
by Urs Ammann, and have even hacked it to do some additional optimisations
(and allow some additional things, like using ASCII text in addition to the
traditional CDC 64 character set). Pointers where nothing more than, yes,
machine addresses.
> Are you kidding? Fortran was pushed down the throat of the US defense
> community without strings, with its own floating point idiom, with the
> DO10I=3 problem and with broken idiomatic compilers and runtimes.

Apparently you do not even know what the problem was. The problem was
something like:
DO10I=3.1
where the period was an accidental replacement for a comma, changing the
start of a DO loop to an assignment.
DO10I=3,1
is a perfect start for a DO loop in Fortran.
> This
> was because IBM wanted to dominate the market place. The Dutch went
> along but the Swedes said no.

Strange, my memory about computers in the Netherlands is completely
different. Scientific computing used Algol 60 on various makes. Telefunken
(Technical University of Delft), Zebra (Philips), Electrologica (Fokker),
to name a few. Leiden University was the first that had gone to IBM, I
still have a report that describes how to redo the old programs to the
IBM version. At a somewhat later date, the Universities of Amsterdam (both),
Utrecht and Groningen decided to go with CDC. The first bank that had gone
electronic was the Giro system of Amsterdam that used Bull (i.e. French)
equipment and presumably Cobol. I have still some punched cards of that time
with the Bull punch card codes (that were very different from IBM's codes).
So, do not talk about things about which you do not know a thing. When I
started programming in the Netherlands (back in 1968), Algol 60 was the
language to do. And one of the reasons that the universities above have
gone with CDC was because it promised to provide a better Algol 60 compiler
than they already had and also an Algol 68 compiler. They did comply with
both promises.
> The Soviets copied the worst of
> everything with unerring Communist instincts for utter dreck although
> some dissidents preferred Algol. I used to have a hilarious collection
> of papers from Springer on Algol compiler writing in which Ershov is
> engaged in a cover up. Remember him?

I do not know Ershov. But as far as I know, in most of Europe, including the
Soviet Union, Algol 60 was the basic language in scientific computing. You
appear to have a very strange view. But I wonder in what part of "unerring
Communist instincts for utter dreck" fals the design of the beautiful
ternary computer.
 
N

Nick Keighley

 > On Aug 30, 12:34 am, "Dik T. Winter" <[email protected]> wrote:

Oh, I have done quite a bit of assembly hacking, but never reverted to
self-modifying code.

I've used machines where you were pretty well forced to use self
modifying
code. Sadly I can't find the manual. But my (unreliable) memory seems
to
say you get set a flag on an instruction that caused the contents of
the B
register to be added to the instuction. This modified the address part
of the
instruction that gave you an indexing capability. There was also a
separate
MODY instuction that modified the *next* instuction. The normal
function
return mechanism consisted of hacking the first instuction in a
function
so it jumped back to the caller. Return consisted of jumping to that
first
instruction. Recursion? Who he?

 >                               The Soviets copied the worst of
 > everything with unerring Communist instincts for utter dreck although
 > some dissidents preferred Algol. I used to have a hilarious collection
 > of papers from Springer on Algol compiler writing in which Ershov is
 > engaged in a cover up. Remember him?

I do not know Ershov.  But as far as I know, in most of Europe, including the
Soviet Union, Algol 60 was the basic language in scientific computing.  You
appear to have a very strange view.  But I wonder in what part of "unerring
Communist instincts for utter dreck" fals the design of the beautiful
ternary computer.

they built a ternary computer?! Cool!
 
S

spinoza1111

...
 > > On the other hand, what was unethical about the decisions in 1999, what
 > > was foolish about the decisions in 1970?  They did not match what you
 > > wanted?
 >
 > Yes: they did not match what I "wanted".

Thanks, so everything you do not want is unethical.  That at least is a
clear answer.  BTW, why do you name yourself after a slob?

Spinoza wasn't a slob.
 >                                I figured that Moore's Law would take
 > care of "speed", and by 1973 I'd done a lot of assembly language
 > hacking (self-modifying code, etc) to see that it was merely a way to
 > get my girlfriend sexually frustrated and lonely, and a waste of time.

Oh, I have done quite a bit of assembly hacking, but never reverted to
self-modifying code.  It must have been your exposure to the 1401 of
which even the manuals (and, yes, I have read them) did support it
(together with multiple use of characters as either opcode or printing
character).

....and alphanumeric "modify address" addresses past 1000, and the
ability to use the field delimiter bit or "word mark" as data giving
you a word size of 7 bits, and much else that was weird.
 > As a sort of hippie I also felt that "efficiency" in production was
 > actually a way of making the working class work harder and harder to
 > keep up with machines, and this has certainly been borne out by
 > events.

Hm.  My experience is different.  Efficiency in "programs" at least was
(and is) a way to make predictions before the fact.  At least, I like to
have the weatherforcast for tomorrow today and not the day after tomorrow
(even when it is wrong on occasion).

From the point of view of the consumer, nothing else matters. But I
didn't know that Holland has a lottery, nor did I know that you won
it.

 >         In 1970, you could sit and read Playboy in front of the old
 > 360's console while it ground through the code, and I could see that
 > this was going to be eliminated by an overemphasis on speed.

Well, back in about 1970 I had to proceed with a survey of the housing in
Amsterdam, running statistical methods.  The input was about 20,000
punch cards, and the program ran for about 12 days (24 hours a day).  I
would have liked if it could have gone on a bit faster.

Did you have a look at the code?
 > When I read about C (probably circa 1976 in the old Byte Magazine), I
 > thought it counter-revolutionary, asking why on Earth would the
 > developers enable the use of a machine address in a "high-level"
 > language. I figured at the time that we knew how to write assemblers
 > for specific machines having done so myself, so what was the need?
 >
 > I preferred Niklaus Worth's 1974 work in Pascal.

Didn't he do the same with his pointers?  I have used the Pascal compiler
by Urs Ammann, and have even hacked it to do some additional optimisations
(and allow some additional things, like using ASCII text in addition to the
traditional CDC 64 character set).  Pointers where nothing more than, yes,
machine addresses.

 > Are you kidding? Fortran was pushed down the throat of the US defense
 > community without strings, with its own floating point idiom, with the
 > DO10I=3 problem and with broken idiomatic compilers and runtimes.

Apparently you do not even know what the problem was.  The problem was
something like:
   DO10I=3.1
where the period was an accidental replacement for a comma, changing the
start of a DO loop to an assignment.
   DO10I=3,1
is a perfect start for a DO loop in Fortran.

I knew what the problem was. It sounds like you had a different
problem in Yourup, where commas are sometimes periods. Some compilers
allowed the end and step values to be eliminated meaning that DO10I=3
was ambiguous.

Of course, we all used spaces between lexemse even though Fortran
didn't require it.
 
S

spinoza1111

[snips]

spinoza1111wrote:
Oops. The clear answer is Visual Basic.

Not so clear at all, as all the others have significant differences from C
in at least one respect each.
All the others have a VERY
IMPORTANT feature, and this is explicit block structure. VB doesn't
have explicit block structure:

That may be _a_ similarity, but it's hardly sufficient to qualify an entire
language as having "similar syntax".  By this reasoning, one could add
explicit block structures to, say, Brainf**k and voila, it's magically
syntactically similar to C.

I'm really unimpressed by an inability to see forests.
My common sense tells me that if, in fact, C99 ratified // comments, which
I'm fairly certain it did, the only possible correct answer is *both* /**/
and // type comments, which is not an allowed answer.

On a test select the best.
In this case, it means "required, by the standard, in order to qualify as a
(strictly?) conforming C program."

Or, in other words, without it the compiler is free to reject the code
entirely, making the question of output moot.




What, your implementation now defines the standard?  Funny, I thought ISO
did that.



Look, someone wrote a quiz/test/whatever on C.  The implication is that it
is in some manner useful in learning, or testing one's knowledge of, C.  In
order to do that, it has to actually be at least *reasonably* close to being
correct.  This test fails, repeatedly.  Don't blame me because the test
writer doesn't know the subject.

People who demand perfect tests basically don't want to be tested,
IMO.
We're examining a test in a technical subject  where correctness and
attention to detail actually matters.  The test persists in failing to
achieve such correctness and attention to detail.  

Fairness is probably more important in testing.
Hmm?  Troubles?


Absolutely.  And achieving this is done by strict and careful attention to
detail, because, with computers in particular, attention to detail actually
matters.  Being sloppy and careless achieves nothing.

Fine words, but my observation of programmers here and elsewhere shows
me that they are not any more detail minded than the general public.
Their very tools degrade attention to detail since so many automated
crutches.
If C doesn't require that standard includes even _be_ files, asking "what
standard include file do you need" is completely nonsensical.  It's about
like asking "What odd value of 2 should we use?"  There is no correct way to
answer an incorrect question.

Actually, there is. And what is an "incorrect" question? I should have
thought that the modifier applies only to answers.
Not competent ones.  I've been in the coding game nigh-on three decades, and
the *only* people I've ever heard use such sloppy terminology are total
newbies, who can be forgiven for it as they're still learning, and those
hatful of folks who should have long ago learned how to understand the
subject matter, but failed, miserably.  

I was in your "coding game" for thirty years, and I found it a mark of
incompetence for a developer to fail to listen to and parse complete
sentences and texts, and focus instead on lexemes. It is in fact a
mark of incompetence to confuse language and reality. I don't give a
**** whether a programmer calls #include a "command". I'm more
interested in whether he parenthesesizes the formal parameter in
#define.

People who should have been tradesmen, artisans and factory workers
invaded programming and owing to their lack of education, transformed
it into "terminology" and a systematic anti-intellectualism. The
result is that while they talk big actual data systems generally
fail.
Most of the places I've worked, programmers of that sort get put in tech
support, as they're simply not competent to work as programmers.

The night terror of people who should have been little clerks,
tradesmen and factory workers is the exposure of their own
incompetence and sense of worthlessness, which emerges here in
bullying. For this reason, the mythos of programming is all about the
floating label of "incompetence" from which nobody is safe.
Of course not.  Correct precision, especially in fields which mandate
precision in order to achieve even simple goals - e.g. programming -
generally does tend to suggest, if not actual intelligence, then at least
sufficient attention to detail.


We're not discussing human language here, we're discussing C, a very
formalized, very limited and very, very carefully defined computer language
- and we're discussing a test or quiz about that very carefully defined
language.  This is programming, not poetry.

Insofar as we're discussing language as opposed to the physics of
computers, we are discussing human language here, and results such as
de Saussure's (the demystification of magical associations of words
with things) are germane. Programming appeals to entirely too many
people for the wrong reason because it allows them to prolong
childhood, and the childhood theory of language in which there is a
magical connection between word and thing.

Troubles?  Was there something wrong with my answer?


I don't recall saying it was depending upon compiler switches.  I said that
the ISO C standard, to the best of my recollection, does not require that
freestanding implementations use main as the starting point of the code.



It is effectively impossible to pass or fail a test which is so
fundamentally flawed that many of the questions simply *cannot* be answered
as stated.

This reply crystallizes for me what was fundamentally wrong with the
corporate world, divided as it was between people (managers) who
thought in sloppy English and programmers who could not think outside
of "terminology", in which any attempt to get out of this false
disjunction was labeled "academic".

The fact is that (cf Zizek) capitalism has destroyed the super-ego to
the extent that actually paying attention to the "detail" to which you
give lip service rarely appears, being replaced for the most part by
bullshit on stilts, office politics, and male language games.
"Attention to detail" means today the spirit in which Kernighan's
article on a "regex" was written-in, one of priding oneself for taking
minimal time, and eliminating considerations rather than facing them.

I am not interested in your opinions of the test makers. Their
"attention to detail" is not your business. Instead, you needed to
figure out the context of each and every word used and to use it in a
parallel fashion. This is a basic language skill which in my
observation is beat out of people in capitalism, such that they form
groups and subgroups around shibboleths rather than working on common
projects. The result is negative politics and the politics of personal
destruction.
 
S

spinoza1111

...
 > > On the other hand, what was unethical about the decisions in 1999, what
 > > was foolish about the decisions in 1970?  They did not match what you
 > > wanted?
 >
 > Yes: they did not match what I "wanted".

Thanks, so everything you do not want is unethical.  That at least is a
clear answer.  BTW, why do you name yourself after a slob?

 >                                I figured that Moore's Law would take
 > care of "speed", and by 1973 I'd done a lot of assembly language
 > hacking (self-modifying code, etc) to see that it was merely a way to
 > get my girlfriend sexually frustrated and lonely, and a waste of time.

Oh, I have done quite a bit of assembly hacking, but never reverted to
self-modifying code.  It must have been your exposure to the 1401 of
which even the manuals (and, yes, I have read them) did support it
(together with multiple use of characters as either opcode or printing
character).

 > As a sort of hippie I also felt that "efficiency" in production was
 > actually a way of making the working class work harder and harder to
 > keep up with machines, and this has certainly been borne out by
 > events.

Hm.  My experience is different.  Efficiency in "programs" at least was
(and is) a way to make predictions before the fact.  At least, I like to
have the weatherforcast for tomorrow today and not the day after tomorrow
(even when it is wrong on occasion).

 >         In 1970, you could sit and read Playboy in front of the old
 > 360's console while it ground through the code, and I could see that
 > this was going to be eliminated by an overemphasis on speed.

Well, back in about 1970 I had to proceed with a survey of the housing in
Amsterdam, running statistical methods.  The input was about 20,000
punch cards, and the program ran for about 12 days (24 hours a day).  I
would have liked if it could have gone on a bit faster.

 > When I read about C (probably circa 1976 in the old Byte Magazine), I
 > thought it counter-revolutionary, asking why on Earth would the
 > developers enable the use of a machine address in a "high-level"
 > language. I figured at the time that we knew how to write assemblers
 > for specific machines having done so myself, so what was the need?
 >
 > I preferred Niklaus Worth's 1974 work in Pascal.

Didn't he do the same with his pointers?  I have used the Pascal compiler
by Urs Ammann, and have even hacked it to do some additional optimisations
(and allow some additional things, like using ASCII text in addition to the
traditional CDC 64 character set).  Pointers where nothing more than, yes,
machine addresses.

 > Are you kidding? Fortran was pushed down the throat of the US defense
 > community without strings, with its own floating point idiom, with the
 > DO10I=3 problem and with broken idiomatic compilers and runtimes.

Apparently you do not even know what the problem was.  The problem was
something like:
   DO10I=3.1
where the period was an accidental replacement for a comma, changing the
start of a DO loop to an assignment.
   DO10I=3,1
is a perfect start for a DO loop in Fortran.

 >                                                                     This
 > was because IBM wanted to dominate the market place. The Dutch went
 > along but the Swedes said no.

Strange, my memory about computers in the Netherlands is completely
different.  Scientific computing used Algol 60 on various makes.  Telefunken
(Technical University of Delft), Zebra (Philips), Electrologica (Fokker),
to name a few.  Leiden University was the first that had gone to IBM, I
still have a report that describes how to redo the old programs to the
IBM version.  At a somewhat later date, the Universities of Amsterdam (both),
Utrecht and Groningen decided to go with CDC.  The first bank that had gone
electronic was the Giro system of Amsterdam that used Bull (i.e. French)
equipment and presumably Cobol.  I have still some punched cards of that time
with the Bull punch card codes (that were very different from IBM's codes).
So, do not talk about things about which you do not know a thing.  When I
started programming in the Netherlands (back in 1968), Algol 60 was the
language to do.  And one of the reasons that the universities above have
gone with CDC was because it promised to provide a better Algol 60 compiler
than they already had and also an Algol 68 compiler.  They did comply with
both promises.

Not exactly a tour d'horizon, is it? More like a view from the
trenches. And what has happened BTW to CDC?

Today, those universities no longer use Algol, do they?
 
B

Beej Jorgensen

Richard Heathfield said:
"Any slob in the 17th century, like Spinoza, could be an
applied scientist". - Edward G Nilges

Language can be so unmercifully subtle.

-Beej
 
R

Richard Bos

Dik T. Winter said:
Thanks, so everything you do not want is unethical. That at least is a
clear answer. BTW, why do you name yourself after a slob?

Because it is an itinerant troll. For ****'s sake, Dik, you are not
normally stupid enough to fall for this kind of game.

Richard
 
S

spinoza1111

Because it is an itinerant troll. For ****'s sake, Dik, you are not

"It?" "It?" Hey, you fucking asshole, nothing could more prove my
repeated statement that "troll" is a RACIST term applied by RACISTS
without the courage to use "Jew" or "n*r" but in the same fashion.
 
S

spinoza1111

spinoza1111wrote:
On a test select the best.

Wrong.  On a multiple-choice test, when there is more than one correct
answer, and you are not allowed to select more than one, the question cannot
be answered correctly.

For example:

   Which of the following will increment the value of the integer variable x?

     a) x++;
     b) x = x + 1;
     c) x = 1 + x;
     d) None of the above.

[...]
People who demand perfect tests basically don't want to be tested,
IMO.

I don't think anyone here is looking for "perfection".  But, a supposed test
on a technical subject should at least make an attempt at being precise.

[...]
Fairness is probably more important in testing.

Ah.  The old "let's make the test 'fair' by trying to make it so that even
the people who don't know the subject can pass, so that they don't feel bad
about failing" method?

[...]
Actually, there is. And what is an "incorrect" question? I should have
thought that the modifier applies only to answers.

An example of an "incorrect" question:

   When using "pass by reference", what does the following C program output?

     #include <stdio.h>

     void Increment(int j)
         {
         j++;
         }
     int main(void)
         {
         float i = 42;
         Increment(i);
         printf("i is now %d\n",i);
         }

Since C doesn't have "pass by reference", the question itself is meaningless.

The question is poorly worded (it should be "IF C had pass by
reference..." but not meaningless. The answer is it returns a munged
floating point value. The fact that the code probably will compile and
run doesn't mean the question is bad. It means that C sucks.
I was in your "coding game" for thirty years, and I found it a mark of
incompetence for a developer to fail to listen to and parse complete
sentences and texts, and focus instead on lexemes. It is in fact a
mark of incompetence to confuse language and reality. I don't give a
**** whether a programmer calls #include a "command". I'm more
interested in whether he parenthesesizes the formal parameter in
#define.

When talking to a person, I would take into account (when possible) the
errors and ambiguities in their terminology.  (Even if I do cringe if I hear
something like "can I 'ax' you a question", or words like "irregardless".)
When taking a supposed "test" in a technical field, there shouldn't be so
many blatant errors and ambiguities.

[...]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top