Performance comparison

David Ross <drossruby@yahoo.com> writes:

>
> >
> > You can use C for anything you use ruby on.
> >
> Of course you are right. Ruby is written in C ..
> QED.
>
>
> >
> > I am sure most
> > people talk bad about C are not professional at
> all.
> >
>
> Ever worked as a maintenance programmer? Ever fixed
> bugs that other
> engineers had introduced into the code? Ever found
> that some of those
> bugs where simple stuff, like array bounds
> violations or null pointer
> assignments? Then, have you tried going up to the
> original coder and
> telling them that they are not professional?
>
> There are better ways of coding in C. Try, for
> example
>
>
> http://www-cs-faculty.stanford.edu/~knuth/cweb.html
>
> There are better ways of improving in any language
>
> http://www.sei.cmu.edu/tsp/psp.html
>
> Both of these approaches have been used by People
> Who Know A Lot (Knuth
> and Humphries) and both have been shown to work
> (I've used both and know
> they work).
>
> Why do more people not use them? Why is our code
> still riddled with
> basic errors?
>
> (Hint: it has nothing to do with the language,
> though the language will
> have an impact. C is less, errrr, helpful, to the
> less experienced).
>
> --
> -mark. (probertm @ acm dot org)
>
>
>

I agree on all points. It is humans who make errors.
To the experienced C is bliss. (* and assembly) (*even
if there is some stress figuring out what is wrong in
the program). After swearing some and hitting the
computer a few times it is okay. Oh and making fun of
the original code and all the bad hacks they did to
make the code work. (=

I love C. I think it's great for implementing designs. On the other
hand, it makes you do a lot of up-front work to get anything running.
That doesn't really encourage you to be agile. But to create original
software, you have to sketch a lot. Often you won't even know what you
want to create. You have to figure that out as you go.

Dynamic & high level languages attach less cost to changing. They
encourage you to experiment. That's not very valuable if you're just
implementing something you designed up-front. But it's absolutely
essential if you're not.

Using C to create original software isn't bliss. It's like being in a
straight-jacket. But considering you're a fan of Ada, I guess you like
that kinda stuff.

···

--- Mark Probert <probertm@nospam-acm.org> wrote:
> David Ross <drossruby@yahoo.com> wrote:

Lothar Scholz <mailinglists@scriptolutions.com> writes:

Hello Mark,

> There are better ways of coding in C. Try, for example

> http://www-cs-faculty.stanford.edu/~knuth/cweb.html

Sorry but the hole idea of literature programming is one of the most
stupid thing i've ever seen in the world of programming.
It does not work and it shows again that Donald E. Knuth is living in a
galaxy far far away.

Indeed. For one, he's a genius and you're not. He's a technical writer
with the Bible under his belt. You can't say ``it does not work'',
because it provably does: just look at TeX.

Adding the redundancy and ambiguity of natural languages is making
the problem worse. Real programs change a lot and under time pressure.

A specific subset of ``real programs'' do. TeX doesn't.

Sorry i doubt that Knuth has real world experience.

Conjuring into existance two different worlds and putting your opponent
in the unworthy one is a very clever trick. Actually, the phrase ``real
world'' has nearly become an argument in itself. You can use it to
disqualify anything. How convenient!

Even with a high IQ a person can be a huge fool

Of course, but why do you suppose this is the case with Knuth? Has CWEB
not worked for TeX?

Can you give me one example of a larger program that uses the CWeb
style, lets make it easy and say something with more then 100.000 lines
(a medium scale project) ?

If you can't answer this question yourself, I don't think you're
qualified to say zip about Knuth.

> Mauricio, good day!
Oops, wrong "Reply To". Sorry, list.

too funny,
I had it installed from RPA before your post showed up in the ML
:slight_smile:

···

--
--- vruz

Hello Mark,

Hi, Lothar.

Sorry but the hole idea of literature programming is one of the most
stupid thing i've ever seen in the world of programming.

Ok. It doesn't work for you. I assume that you have tried it then?

I looked at it about 10 years ago.

Can you give me one example of a larger program that uses the CWeb
style, lets make it easy and say something with more then 100.000
lines (a medium scale project) ?

TeX

Don't now enough about Tex to be sure that is a real world project,
but i deeply doubt that.
AFAIK it's not developed by multipe persons that change over time. And
did it really change a lot in the past.

True, it is language neutral. The point is that, irrespective of
language -- C, Ruby, ASM, Eiffel -- people will make errors. PSP will
help lower the error rate regardless of the medium. To me, that is step
forward.

Only as an education/training method. For experts it does not reduce
the error rate.

···

Lothar Scholz <mailinglists@scriptolutions.com> wrote:

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's

It does not work and it shows again that Donald E. Knuth is living in a
galaxy far far away.
Sorry i doubt that Knuth has real world experience.

I believe that Knuth invented and programmed Tex. I wish that I could do half as well.

I love C. I think it's great for implementing
designs. On the other
hand, it makes you do a lot of up-front work to get
anything running.
That doesn't really encourage you to be agile. But
to create original
software, you have to sketch a lot. Often you won't
even know what you
want to create. You have to figure that out as you
go.

I always spend a couple weeks on design before coding.
I refuse to code even one line before design. Its the
way I work.

Dynamic & high level languages attach less cost to
changing. They
encourage you to experiment. That's not very
valuable if you're just
implementing something you designed up-front. But
it's absolutely
essential if you're not.

Right, experimentation with the dynamic and latest
generation high level languages lead to more knowledge
in the computer science field. Some of the latest
achievements

Can you explain what you mean by up-front?

Using C to create original software isn't bliss.
It's like being in a
straight-jacket. But considering you're a fan of
Ada, I guess you like
that kinda stuff.

Programming in C or Ada isnt bad at all. The knowledge
is great to know. I have been learning programming and
scripting languages for a long time. I have been
through a lot and I see what I see. I know what I read
and experiment on how I can be faster. It really is
bliss though. When programming in per say C, I don't
have to think what I am doing at all, except make sure
that I am not writing buggy code which might have an
exploit.

As far as the striaght jacket goes.. I probably need
one since I am a crazy programming kook.

I would eventually like to get a Ruby compiler going.
I will have to rename rubycc to something else. I do
not plan on converting Ruby to C code. I plan on
learning the internals of Tendra (tendra.org, not the
ten15 fork) and I will try to make a massive runtime.
8) Will be Ruby to machine code. (*oh yes Lothar, I
know I am crazy)

Programming in C is nice to experience. Other
languages like Scheme, Lisp, Ada, Eiffel, and
Smalltalk are nice languages to practice in as well.
Each language gives you some form of thought and
increases your performance in other languages.

Oh all the pitfalls and inconviences. Oh my! =)

--David Ross

···

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

Hello Mikael,

Sorry i doubt that Knuth has real world experience.

Conjuring into existance two different worlds and putting your opponent
in the unworthy one is a very clever trick. Actually, the phrase ``real
world'' has nearly become an argument in itself. You can use it to
disqualify anything. How convenient!

Excuse me but there are two worlds. Denying this means to ignore
facts.

This is because TeX is from the other world. Written out of pure
interest by one person to satisfy his needs. Without any pressure of
time or money. And after it could do what Knuth wanted it was frozen
and never modified again (only bug fixes). And it is a pure
algorithm driven program [Input] --> [Output] (aka Compiler), very easy
to write and much different from what i see in any real large programs.

And it is not a large program.

LaTeX has thousands of other tools that were created to work around the
problems and bad design errors (useability) in TeX. So if you talk
about TeX in real word you must say LaTeX and then you enter a different
world.

I think this are some facts you missed.

And by the way, Knuth has written the bible because he was simply the
first one. Not more and not less. The fourth part of the bible is not
really amazing and there is nothing really new in it.

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's

Hello Mark,

> Hi, Lothar.

Sorry but the hole idea of literature programming is one of the most
stupid thing i've ever seen in the world of programming.

It is called literate programming.

Can you give me one example of a larger program that uses the CWeb
style, lets make it easy and say something with more then 100.000
lines (a medium scale project) ?

> TeX

Don't now enough about Tex to be sure that is a real world project, but
i deeply doubt that.
AFAIK it's not developed by multipe persons that change over time. And
did it really change a lot in the past.

People are still using TeX, more than 20 years after it was written. I
find that pretty amazing for a user-program. If it doesn't qualify as a
real world project then I don't know what does. I wonder if people would
be still using the software that you write now over 20 years (I doubt it).

Maybe we should be very grateful that Knuth isn't writing what you
call "real world programs". Did you ever have a look in "The Art
of Computer Programming"?

> True, it is language neutral. The point is that, irrespective of
> language -- C, Ruby, ASM, Eiffel -- people will make errors. PSP
will MP> help lower the error rate regardless of the medium. To me, that
is step MP> forward.

Only as an education/training method. For experts it does not reduce the
error rate.

Regards,
KB

···

On Tue, 31 Aug 2004 05:51:27 +0900, Lothar Scholz wrote:

> Lothar Scholz <mailinglists@scriptolutions.com> wrote:

"Kristof Bastiaensen" <kristof@vleeuwen.org> schrieb im Newsbeitrag
news:pan.2004.08.30.22.22.18.554612@vleeuwen.org...

> > TeX
>
> Don't now enough about Tex to be sure that is a real world project, but
> i deeply doubt that.
> AFAIK it's not developed by multipe persons that change over time. And
> did it really change a lot in the past.

People are still using TeX, more than 20 years after it was written. I
find that pretty amazing for a user-program. If it doesn't qualify as a
real world project then I don't know what does.

Right so. And it can be easily verified in every bookstore that has but the
barest minimum of science litertature - especially Math and CS. You'll find
a lot books made with TeX there.

Maybe we should be very grateful that Knuth isn't writing what you
call "real world programs".

:slight_smile:

btw: Kristof, are you located in Leuven, Belgium? That's a really nice
town! Lovely bars, strong beer and the marvellous "Couvert Couvert".
Mmmmh...

Kind regards

    robert

···

On Tue, 31 Aug 2004 05:51:27 +0900, Lothar Scholz wrote:

Hello Robert,

"Kristof Bastiaensen" <kristof@vleeuwen.org> schrieb im Newsbeitrag
news:pan.2004.08.30.22.22.18.554612@vleeuwen.org...

> > TeX
>
> Don't now enough about Tex to be sure that is a real world project, but
> i deeply doubt that.
> AFAIK it's not developed by multipe persons that change over time. And
> did it really change a lot in the past.

People are still using TeX, more than 20 years after it was written. I
find that pretty amazing for a user-program. If it doesn't qualify as a
real world project then I don't know what does.

Right so. And it can be easily verified in every bookstore that has but the
barest minimum of science litertature - especially Math and CS. You'll find
a lot books made with TeX there.

Once again, i don't know anybody working with TeX. And i don't know
any book in the last years that where published about TeX.

All goes into LaTex, TeTex etc. and the reasons are that TeX is really
only an outdated type setting kernel. LaTex is developed very
differently.

But nobody in this thread seems to be interested in precise wording
and so the basic math rule applies: "false" implies "true".

···

On Tue, 31 Aug 2004 05:51:27 +0900, Lothar Scholz wrote:

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's

btw: Kristof, are you located in Leuven, Belgium? That's a really nice
town! Lovely bars, strong beer and the marvellous "Couvert Couvert".
Mmmmh...

It is, isn't it? But no, I am from Antwerp, which is a very
nice town too (beer, restaurants, ...) :slight_smile:

Kind regards

    robert

Regards,
KB

···

On Tue, 31 Aug 2004 12:10:11 +0200, Robert Klemme wrote:

Hi --

Hello Robert,

> "Kristof Bastiaensen" <kristof@vleeuwen.org> schrieb im Newsbeitrag
> news:pan.2004.08.30.22.22.18.554612@vleeuwen.org...

>> > > TeX
>> >
>> > Don't now enough about Tex to be sure that is a real world project, but
>> > i deeply doubt that.
>> > AFAIK it's not developed by multipe persons that change over time. And
>> > did it really change a lot in the past.
>>
>> People are still using TeX, more than 20 years after it was written. I
>> find that pretty amazing for a user-program. If it doesn't qualify as a
>> real world project then I don't know what does.

> Right so. And it can be easily verified in every bookstore that has but the
> barest minimum of science litertature - especially Math and CS. You'll find
> a lot books made with TeX there.

Once again, i don't know anybody working with TeX. And i don't know
any book in the last years that where published about TeX.

All goes into LaTex, TeTex etc. and the reasons are that TeX is really
only an outdated type setting kernel. LaTex is developed very
differently.

Sorry to dwell on the OT stuff, but I'd like to clarify this a little.

teTeX is a TeX distribution. LaTeX is a package of macros written in
TeX. I don't think teTeX is relevant here; you can't blame people who
want to use software for packaging and distributing it :slight_smile:

As for LaTeX: much of the point and power of TeX is that you can write
macros in it. Knuth has done some; other people have done some,
including Leslie Lamport, the creator of LaTeX. Macros are what TeX
is for; they're not something people have come up with as a workaround
for the low-levelness of TeX. LaTeX is a large and popular set of
macros. It's not a fork of TeX. A better way to view it is that it's
a TeX application.

When you use LaTeX, you are using TeX. There is nothing more "real"
about using TeX without macros -- in fact, I don't think it's possible
to get much done that way. (I suppose you could inline everything,
but that was never the goal of TeX.)

(I believe the Pickaxe was prepared in LaTeX, so maybe it's not 100%
off-topic :slight_smile:

David

···

On Tue, 31 Aug 2004, Lothar Scholz wrote:

>> On Tue, 31 Aug 2004 05:51:27 +0900, Lothar Scholz wrote:

--
David A. Black
dblack@wobblini.net

Every book published with LaTeX is published with TeX. It is not
hard to push the limits of LaTeX. Everyone I know who has done
serious work in LaTeX has had to resort to using some other macro
packages, and quite often, raw-TeX, to get parts of the job done. For
straight-forward things, LaTeX rocks. But if you don't like
the decisions it makes, it can be really hard to get it to change.
Probably because the whole paradigm is that you are not supposed
to care how it looks. Rather, you should trust the computer, er,
LaTeX. LaTeX is your friend.

As for your future comments about literate programming, no development,
etc... with respect I have to say I'm not sure I get the point.
TeX, as another reader pointed out, really does do what it is supposed
to do. All of the core typesetting functionality is there. TeX
is like Xlib in the X11 libraries. LaTeX is like the X Intrisics.
I'd rather use the intrisics, but when necessary I can go
to the raw Xlib.

X11 is still under development, but it's final display output and
hardware is constantly changing, whereas 8x11" sheets of paper
have been consistent for quite awhile. :wink:

-Rob

···

On Aug 31, 2004, at 3:27 AM, Lothar Scholz wrote:

Once again, i don't know anybody working with TeX. And i don't know
any book in the last years that where published about TeX.

Hello David,

teTeX is a TeX distribution. LaTeX is a package of macros written in
TeX. I don't think teTeX is relevant here; you can't blame people who
want to use software for packaging and distributing it :slight_smile:

Sorry you missunderstand something. I don't blame anyone. I'm just
building and defending a chain or arguments to prove my opinion
against a so called general purpose programming process theory
- literate programming.

When you use LaTeX, you are using TeX. There is nothing more "real"
about using TeX without macros -- in fact, I don't think it's possible
to get much done that way. (I suppose you could inline everything,
but that was never the goal of TeX.)

I know this. But the question was is TeX still under development.
Maybe i'm wrong but i doubt this. The many many macro packages out
there are under heavy development. Sure. But are whey written not only
Tex but also CWeb applications ?

We were talking in this thread (a long time ago) about the argument if
TeX is a valid example that the literate programming process works, or
better is able to be maintained in programs that change.
I doubt that, others told me that TeX is an "real world" example.

From the version numbering (how close is the version number now
compared to the euler number ?) i simply don't think that TeX is
developed anymore. Are still feature added ? Again to the core, not to
the 3rd party programs or macro packages.

And so my argument is that this is not valid example that the literate
programming modell works.

But i think everybody simply lost interest in the original question.

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's

Hi --

Hello David,

> teTeX is a TeX distribution. LaTeX is a package of macros written in
> TeX. I don't think teTeX is relevant here; you can't blame people who
> want to use software for packaging and distributing it :slight_smile:

Sorry you missunderstand something. I don't blame anyone. I'm just
building and defending a chain or arguments to prove my opinion
against a so called general purpose programming process theory
- literate programming.

> When you use LaTeX, you are using TeX. There is nothing more "real"
> about using TeX without macros -- in fact, I don't think it's possible
> to get much done that way. (I suppose you could inline everything,
> but that was never the goal of TeX.)

I know this. But the question was is TeX still under development.
Maybe i'm wrong but i doubt this. The many many macro packages out
there are under heavy development. Sure. But are whey written not only
Tex but also CWeb applications ?

We were talking in this thread (a long time ago) about the argument if
TeX is a valid example that the literate programming process works, or
better is able to be maintained in programs that change.
I doubt that, others told me that TeX is an "real world" example.

From the version numbering (how close is the version number now
compared to the euler number ?) i simply don't think that TeX is
developed anymore. Are still feature added ? Again to the core, not to
the 3rd party programs or macro packages.

TeX isn't developed any more; that's official. It's interesting that
you view that as a sign of failure :slight_smile: I think it just means that
the program does what Knuth wants it to do -- not a concept we
encounter much, but it's certainly plausible. It doesn't mean that
TeX is perfect, or that it will please everyone. But of course no
program, even those with completely open-ended development, every
pleases everyone.

And so my argument is that this is not valid example that the literate
programming modell works.

Using TeX certainly does not mean you're using the literate
programming model (in case it sounded like I meant that, given the
context). But the success of TeX certainly means that a program
written using that model (i.e., TeX itself) can be successful.
Literate programming itself doesn't seem to have caught on very much,
at least in the circles I move in. I've never studied it deeply
enough to analyze it further.

David

···

On Tue, 31 Aug 2004, Lothar Scholz wrote:

--
David A. Black
dblack@wobblini.net

Hi, Lothar.

And so my argument is that this is not valid example that the literate
programming modell works.

Backing up a little, and leaving the words "literate programming" aside.

As a coder, I assume that you use comments in your real-world code. As
an experienced real-world coder, who has done some maintenance work, you
would also have come to appreciate the value of other peoples' comments.
Often the more the better, particularly in those "optimised" sections.

I also assume that you have discovered that if you use RDoc or Doxygen or
similar, you can have comments in your code formatted nicely. You
produce your detailed implementation documentation as you go. It save
you a lot of time in the long run, avoids having to go back and work out
what you did when it was time to document your code at code review time.
The reviewers are happy. Your fellow coders are happy. Managment is
happy because they realise that your production code will be supportable
from India. You get the idea.

So, where do you think this "code + documentation = Good", comes from?
Does it help to reduce maintenance costs? My experience says yes.
Empirical evidence seems to support that conclusion as well. Is it
taught in universities etc.? No. Does it make "real world" sense? Yep.
Is it used within my organisation? No. Should it be? Yes. How come?
'Cause coders, code, they don't write documentation. 'Cause, on the
whole, those writing the code don't have to maintain it.

"A rose by any other name ..."

Regards,

···

Lothar Scholz <mailinglists@scriptolutions.com> wrote:

--
-mark. (probertm @ acm dot org)

Hi, Lothar.

And so my argument is that this is not valid example that the literate
programming modell works.

Backing up a little, and leaving the words "literate programming" aside.

As a coder, I assume that you use comments in your real-world code. As
an experienced real-world coder, who has done some maintenance work, you
would also have come to appreciate the value of other peoples' comments.
Often the more the better, particularly in those "optimised" sections.

I also assume that you have discovered that if you use RDoc or Doxygen or
similar, you can have comments in your code formatted nicely. You
produce your detailed implementation documentation as you go. It save
you a lot of time in the long run, avoids having to go back and work out
what you did when it was time to document your code at code review time.
The reviewers are happy. Your fellow coders are happy. Managment is
happy because they realise that your production code will be supportable
from India. You get the idea.

So, where do you think this "code + documentation = Good", comes from?
Does it help to reduce maintenance costs? My experience says yes.
Empirical evidence seems to support that conclusion as well. Is it
taught in universities etc.? No. Does it make "real world" sense? Yep.
Is it used within my organisation? No. Should it be? Yes. How come?
'Cause coders, code, they don't write documentation. 'Cause, on the
whole, those writing the code don't have to maintain it.

Seems like Lothar is doing most of his coding in Eiffel which uses Design by Contract. IMHO contracts generally provide good documentation and as a bonus the coder writes the contract. Also contracts are check at runtime - so they stay current, which means the docs stay current (if they are generated from the contracts/code).
-Charlie

···

On Aug 31, 2004, at 11:10 AM, Mark Probert wrote:

Lothar Scholz <mailinglists@scriptolutions.com> wrote:

"A rose by any other name ..."

Regards,

--
-mark. (probertm @ acm dot org)

Hello Charles,

So, where do you think this "code + documentation = Good", comes from?
Does it help to reduce maintenance costs? My experience says yes.
Empirical evidence seems to support that conclusion as well. Is it
taught in universities etc.? No. Does it make "real world" sense?
Yep.

In my university i got a lot of courses where
this was taught with many different modells, most of them UML and Z (a
specification language).

Is it used within my organisation? No. Should it be? Yes. How come?
'Cause coders, code, they don't write documentation. 'Cause, on the
whole, those writing the code don't have to maintain it.

I agree. But i think very often they also have to maintain it.

Seems like Lothar is doing most of his coding in Eiffel which uses
Design by Contract. IMHO contracts generally provide good
documentation and as a bonus the coder writes the contract. Also
contracts are check at runtime - so they stay current, which means the
docs stay current (if they are generated from the contracts/code).
-Charlie

Write the only technique that guarantees to stay in sync with the
code.

And one word to the API /Doxygen documentation: Yes this is used
intensively in some companies but it still becomes very hard to
maintain if people use it not for the static but the dynamic modell.
I mean message flow, algorithms etc. This changes much more then most
API functions. I found that it is almost impossible to keep the
documentation for this up to date. I'm also only writting UML class
diagrams and never Sequence/Collaboration Diagrams etc.

So instead of writing embedded documentation people should write
better code: using long identifier names, avoid 10 times nested
loops, use small methods and no tricks to save a few keystrokes.

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's

Hi, Lothar.

···

Lothar Scholz <mailinglists@scriptolutions.com> wrote:

So instead of writing embedded documentation people should write
better code: using long identifier names, avoid 10 times nested
loops, use small methods and no tricks to save a few keystrokes.

Another option is to use generators.

For more, check out Jack Herrington's excellent "Code Generation in
Action", published by Manning. The examples are in Ruby and Java (so we
real-world and back on topic :slight_smile:

--
-mark. (probertm @ acm dot org)

Yup, and he's got his code generation framework on RubyForge:

http://rubyforge.org/projects/rna/

Good times...

Tom

···

On Wed, 2004-09-01 at 01:45, Mark Probert wrote:

Hi, Lothar.

Lothar Scholz <mailinglists@scriptolutions.com> wrote:

>
> So instead of writing embedded documentation people should write
> better code: using long identifier names, avoid 10 times nested
> loops, use small methods and no tricks to save a few keystrokes.
>
Another option is to use generators.

For more, check out Jack Herrington's excellent "Code Generation in
Action", published by Manning. The examples are in Ruby and Java (so we
real-world and back on topic :slight_smile: