9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] a quick and simple minded study of configure.
@ 2007-06-15 21:15 ron minnich
  2007-06-15 21:18 ` Francisco J Ballesteros
  2007-06-15 21:23 ` Rob Pike
  0 siblings, 2 replies; 10+ messages in thread
From: ron minnich @ 2007-06-15 21:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Plan 9 ports is portable to many systems. I did the following very
stupid command:
wc `find . -print  | egrep
'Darwin|freebsd|FreeBSD|linux|Linux|power|386|NetBSD|OpenBSD|SunOS'`

I.e. just wc all the files that have  a name that looks in any way os
or architecture dependent.

Note how unfair this is. It may count the same file twice, it counts
CVS, and so on. Very, very unfair.

Sum:
  11219   34549  240528 total

Now, two popular MPIs:
first, LAM
rminnich@xcpu lam-7.1.3]$ wc ./configure
  45815  164201 1362823 ./configure

Yes, that is not a typo: 45KLOC. The configure script is about 4x the
size of ALL the portability support in p9p. Makefiles are around 1029
lines. Most of that is configure goo.

For openmpi, a popular mpi:
[rminnich@xcpu openmpi-1.2.2]$ wc configure
 152939  581569 5028307 configure
[rminnich@xcpu openmpi-1.2.2]$ wc Makefile
 1541  5368 62023 Makefile
[rminnich@xcpu openmpi-1.2.2]$

Yes, 153KLOC of shell script for the configure. A factor of 3 growth
over the one done four years ago for LAM.

Yow. The generated makefiles average about 1500 lines. The configure
scripts take about 5 minutes to run.

I know we have some faculty on this list. Please talk to your students :-)

This is nuts.

ron


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-15 21:15 [9fans] a quick and simple minded study of configure ron minnich
@ 2007-06-15 21:18 ` Francisco J Ballesteros
  2007-06-15 21:23 ` Rob Pike
  1 sibling, 0 replies; 10+ messages in thread
From: Francisco J Ballesteros @ 2007-06-15 21:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

>
> I know we have some faculty on this list. Please talk to your students :-)

I promise. That's impressive. Cannot believe it.
Thanks a lot for the info.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-15 21:15 [9fans] a quick and simple minded study of configure ron minnich
  2007-06-15 21:18 ` Francisco J Ballesteros
@ 2007-06-15 21:23 ` Rob Pike
  2007-06-16  1:18   ` David Leimbach
  1 sibling, 1 reply; 10+ messages in thread
From: Rob Pike @ 2007-06-15 21:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-15 21:23 ` Rob Pike
@ 2007-06-16  1:18   ` David Leimbach
  2007-06-16  4:39     ` Skip Tavakkolian
  0 siblings, 1 reply; 10+ messages in thread
From: David Leimbach @ 2007-06-16  1:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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 <robpike@gmail.com> 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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-16  1:18   ` David Leimbach
@ 2007-06-16  4:39     ` Skip Tavakkolian
  2007-06-16  5:58       ` Bruce Ellis
  2007-06-16 15:34       ` David Leimbach
  0 siblings, 2 replies; 10+ messages in thread
From: Skip Tavakkolian @ 2007-06-16  4:39 UTC (permalink / raw)
  To: 9fans

> 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>());

it is impressive that you typed that on a blackberry!

it's not short, if you count the class implementation.  it doesn't
convey the idea - the solution is not understood unless you
understand each piece.

i think what Ron is bringing up is having/learning the ability to
see through layers of filters to the exact need and providing a
design that is just the right distance between "pie in the sky" and
"failure of vision".



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-16  4:39     ` Skip Tavakkolian
@ 2007-06-16  5:58       ` Bruce Ellis
  2007-06-16 15:34       ` David Leimbach
  1 sibling, 0 replies; 10+ messages in thread
From: Bruce Ellis @ 2007-06-16  5:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

i've asked this before .. who are we hiding the imformation from?
you reap what you do sow (grunt).  built your house on sand?

brucee

On 6/16/07, Skip Tavakkolian <9nut@9netics.com> wrote:
> > 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>());
>
> it is impressive that you typed that on a blackberry!
>
> it's not short, if you count the class implementation.  it doesn't
> convey the idea - the solution is not understood unless you
> understand each piece.
>
> i think what Ron is bringing up is having/learning the ability to
> see through layers of filters to the exact need and providing a
> design that is just the right distance between "pie in the sky" and
> "failure of vision".
>
>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-16  4:39     ` Skip Tavakkolian
  2007-06-16  5:58       ` Bruce Ellis
@ 2007-06-16 15:34       ` David Leimbach
  2007-06-17  7:06         ` Martin Neubauer
  1 sibling, 1 reply; 10+ messages in thread
From: David Leimbach @ 2007-06-16 15:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]

On 6/15/07, Skip Tavakkolian <9nut@9netics.com> wrote:
>
> > 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>());
>
> it is impressive that you typed that on a blackberry!


I'm not going to tell you that it was easy :-)


it's not short, if you count the class implementation.  it doesn't
> convey the idea - the solution is not understood unless you
> understand each piece.


I disagree, to the extent that it really is short, in that it's one line :-)

I agree as your point is 100% valid that if you don't know distance,
istream_iterator, what cin is, and how it deals with "std::string", that you
wouldn't know how to write that line, and you possibly wouldn't understand
how it works.

But I suspect any person dealing with C++ has an idea how the STL and
Standard C++ Library works.  What might still not be obvious is that that
you need certain restrictions on iterators for STL to work (don't
stable_sort on list iterators, as you probably need something with random
access, not bi-directional iterators).  (ok that was a bit tongue-in-cheek)

No wonder there's so much money in C++ books  :-)

i think what Ron is bringing up is having/learning the ability to
> see through layers of filters to the exact need and providing a
> design that is just the right distance between "pie in the sky" and
> "failure of vision".
>
> Yep, I was trying to point out that sometimes less code is more headache
:-)

Of course when the plane door closes you have to shut off your phone so I
don't think I got that across very well :-).

At any rate, I'm hoping that's NOT what was meant by "Bell Labs Lines"  :-)

Dave

[-- Attachment #2: Type: text/html, Size: 2977 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-16 15:34       ` David Leimbach
@ 2007-06-17  7:06         ` Martin Neubauer
  2007-06-17 23:58           ` Uriel
  0 siblings, 1 reply; 10+ messages in thread
From: Martin Neubauer @ 2007-06-17  7:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* David Leimbach (leimy2k@gmail.com) wrote:
> it's not short, if you count the class implementation.  it doesn't
> >convey the idea - the solution is not understood unless you
> >understand each piece.
>
>
> I disagree, to the extent that it really is short, in that it's one line :-)

So is

	word_count(text);

And a much simpler one at that.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-17  7:06         ` Martin Neubauer
@ 2007-06-17 23:58           ` Uriel
  2007-06-18  2:25             ` David Leimbach
  0 siblings, 1 reply; 10+ messages in thread
From: Uriel @ 2007-06-17 23:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I was going mention that a 'word counter' is not two 'Bell Labs
lines', but two Bell Labs *characters*: wc

And the tools programming model trounces everything else once more.

uriel

P.S.: For http://gsoc.cat-v.org and http://9p.cat-v.org I wrote (with
the help of Kris) a whole website engine, including multi-domain
handling, a blog with rss feeds and and other junk in two hundred
lines of rc and awk. After this, thinking about building websites with
python or any other language makes me cringe.

On 6/17/07, Martin Neubauer <m.ne@gmx.net> wrote:
> * David Leimbach (leimy2k@gmail.com) wrote:
> > it's not short, if you count the class implementation.  it doesn't
> > >convey the idea - the solution is not understood unless you
> > >understand each piece.
> >
> >
> > I disagree, to the extent that it really is short, in that it's one line :-)
>
> So is
>
>         word_count(text);
>
> And a much simpler one at that.
>
>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] a quick and simple minded study of configure.
  2007-06-17 23:58           ` Uriel
@ 2007-06-18  2:25             ` David Leimbach
  0 siblings, 0 replies; 10+ messages in thread
From: David Leimbach @ 2007-06-18  2:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

No doubt about it

I wrote a soap client with nothing but curl perl and pipes glued with
a little sh

Took about 30 minutes and each piece does a very small and well
defined task.  If it hadn't been soap based I would not have used
perl.

That's another reason why I like languages like limbo or erlang.
Seems to encourage breaking even serial problems into communicating
tasks.  Then in some cases if you need to distribute the problem over
many machines you've got less work to do.



On 6/17/07, Uriel <uriel99@gmail.com> wrote:
> I was going mention that a 'word counter' is not two 'Bell Labs
> lines', but two Bell Labs *characters*: wc
>
> And the tools programming model trounces everything else once more.
>
> uriel
>
> P.S.: For http://gsoc.cat-v.org and http://9p.cat-v.org I wrote (with
> the help of Kris) a whole website engine, including multi-domain
> handling, a blog with rss feeds and and other junk in two hundred
> lines of rc and awk. After this, thinking about building websites with
> python or any other language makes me cringe.
>
> On 6/17/07, Martin Neubauer <m.ne@gmx.net> wrote:
> > * David Leimbach (leimy2k@gmail.com) wrote:
> > > it's not short, if you count the class implementation.  it doesn't
> > > >convey the idea - the solution is not understood unless you
> > > >understand each piece.
> > >
> > >
> > > I disagree, to the extent that it really is short, in that it's one line
> :-)
> >
> > So is
> >
> >         word_count(text);
> >
> > And a much simpler one at that.
> >
> >
>


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-06-18  2:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-15 21:15 [9fans] a quick and simple minded study of configure ron minnich
2007-06-15 21:18 ` Francisco J Ballesteros
2007-06-15 21:23 ` Rob Pike
2007-06-16  1:18   ` David Leimbach
2007-06-16  4:39     ` Skip Tavakkolian
2007-06-16  5:58       ` Bruce Ellis
2007-06-16 15:34       ` David Leimbach
2007-06-17  7:06         ` Martin Neubauer
2007-06-17 23:58           ` Uriel
2007-06-18  2:25             ` David Leimbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).