Re: srand() troubles
From: Merrill & Michele (beckjensen_at_comcast.net)
Date: 09/18/04
- Next message: jgcrawford_at_gmail.com: "linux speaker beep"
- Previous message: CBFalconer: "Re: [OT?] What is (a) "plunger"?"
- In reply to: Chris Barts: "Re: srand() troubles"
- Next in thread: pete: "Re: srand() troubles"
- Reply: pete: "Re: srand() troubles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: jgcrawford_at_gmail.com: "linux speaker beep"
- Previous message: CBFalconer: "Re: [OT?] What is (a) "plunger"?"
- In reply to: Chris Barts: "Re: srand() troubles"
- Next in thread: pete: "Re: srand() troubles"
- Reply: pete: "Re: srand() troubles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|