Heh. Reminds me of when I wrote an assembler as an undergrad in
college in C++ in 1200 lines. I was pretty impressed with myself at
the time till I saw my professor's 600 line version.

I think that's what got me into learning these higher level languages
and higher order functional programming languages - the desire to
write less code.

I'm pretty sure I'm not good at it yet but I always found this one
line. "word counter" impressive.

std::distance(std::istream_iterator<std::string>(std::cin),
std::istream_iterator<std::string>());

I think that's corect but I'm on my blackberry.

I think I got that from a newsgroup back in the 90s



On 6/15/07, Rob Pike <[EMAIL PROTECTED]> wrote:
When porting the Plan 9 kernel to Sun, I struggled a bit with the MMU.
Someone offered to send me the code for Spring (I think) to help me
understand it.  The relevant code was far bigger than the entire Plan
9 kernel code I was porting.  It didn't help at all.

Dave Cheriton gave a talk, I think at the first OSDI, where he spoke
about a system he'd written. He said it was small, only 100K lines.
I said I considered that large; our kernel at the time was about 25K
lines and was far more complete than his research toy. "Yeah," he
said, "but those are Bell Labs lines."  I took that as a compliment,
but he might not have meant it that way.

-rob



--
- Passage Matthew 5:37:
  But let your communication be, Yea, yea; Nay, nay: for whatsoever
is more than these cometh of evil.

Reply via email to