Re: srand() troubles

From: Merrill & Michele (beckjensen_at_comcast.net)
Date: 09/18/04


Date: Sat, 18 Sep 2004 00:52:03 -0500

snip
> $32 is not a bad price for a good book. (The fact that most programming
> books are crap is a different topic.)
>
> > I would like to announce that my demographic and I would gladly
> > pay $2^6 for a book entitled: Essential Knuth in C. MPJ

Scott Nudds flies out of somebody's hard drive last week and my lamentation
of the lack of goals and direction for this forum and this language are
going to win a "weird" award? I'd bet dollars to donuts that my wholesale
detractors don't know mittelhoch from windloch.

> Knuth is best grasped free of the accidental limitations of any specific
> language. He focuses on algorithm design, and any primitive-recursive
> algorithm can be expressed in any Turing-complete language. There's a huge
> advantage to decoupling algorithms from implementations.
>
> (Plus, C is full of accidental limitations, related to the low-level
> semantics and the popularity of nonstandard extensions. Another great
> book, "Structure and Interpretation of Computer Programs", uses Scheme (a
> minimalistic Lisp dialect) as its pedagogical tool, but its focus is
> different from Knuth's books.)

Thank you for your response. Certainly, one recognizes the value of
algorithms in "programmese." I just find too many gotchas on the road to
getting those programs running on my implementation. srand() is a good
example. I thought I was being all kinds of clever to determine whether the
numbers 0 and 32767 turned up on ensuing rand() calls. I would have
blithely assumed that my code would port in complete ignorance of RAND_MAX.
I doubt that Knuth addresses this, and if K&R does, here's your chance to
say I told you so.

C has limitations, as any language must. I would make the analogy that it
is like Russia, which "the world" shifted away from but now looks poised
very nicely and has extraordinary assests. I'll take a look at that book.
MPJ



Relevant Pages

  • Re: Are natural languages secure ciphers?
    ... > The algorithm and its key are just variations of the same thing. ... >> The point was that the rules governing a language (including the ... How would you crack a cryptosystem without knowing the algorithm? ... if there were no speakers of the language then _no-one_ ...
    (sci.crypt)
  • Re: Translations from UK to US
    ... : No - I have no gone to the extent of saying directly what the British: idiotshave regularly: posted as insults to the intelligence of the American children reading: the books. ... I have made it clear that there was NO effort by the editors: and author to simplify the books. ... Titles have been changed regularly -: the first books in France uses the title Levine suggested for the: American Version - and I have not heard your outrage about that. ... So it does not reflect on the language itself. ...
    (alt.fan.harry-potter)
  • Re: SCWC 32: Discussion: IMPLEMENT
    ... Latin to English, such as "don't split infinitives" or "don't use ... language can be changed deliberately. ... I've got two books by Roy Harris that I ... must get around to reading. ...
    (rec.puzzles.crosswords)
  • Re: How did C++ beat the competition?
    ... > This brings up a really interesting point in language design. ... > performance is due more to choice of algorithm rather than ... A naive application may view memory as a global ... You do a certain amount of work in a realm (a ...
    (comp.lang.cpp)
  • Re: Cantors diagonal proof wrong?
    ... Yes, the problem is *language*; ... The algorithm is trivial, ... >about how some important things are formally defined in mathematics. ... >hardware, whether that's computer hardware, or neural brain hardware. ...
    (sci.math)