Subject: RE: [hackers-il] Summary of a Bash Lecture

From: Chen Shapira <[email-masked]>
Date: Thu, 2 Nov 2000 08:55:35 +0200

> > Never implement yourself using shell what is already 
> implemented with C.
> 
> Though one should not forget the companion lesson: never 
> implement in C,
> what can be easily implemented with shell. 
> 
> the big paradox!

Not really.
C is most usefull when someone else already implemented it for you :-)
And when you have purify at hand.

Which reminds me of 2 projects I wanted to look into:

1) Open Source equivilent of Rational's Purify.
2) Purify for garbage collecting languages. 
Ofcource GC languages can't do evil memory violations, but we can do what we
call "misuse of system resources". meaning: running out of resources that
are not GCed like file-handles and db connections, and even things like
constantly writing long strings into a variable can cause system to fail
memory. I'd like to have a program that pointed things out and said - "This
looks wierd, it can cause Y and Z to happen, are you sure its ok?"

---

From: "Nadav Har'El" <[email-masked]>
Date: Thu, 2 Nov 2000 10:25:01 +0200

> 1) Open Source equivilent of Rational's Purify.

I don't know of a free Purify lookalike, but Digital Unix (a.k.a. OSF/1 or
Tru64 - they change its name every year...) has a very good utility called
'third' which instruments an already-compiled program and lets you find
memory leaks (memory areas still allocated when you exit the program),
reading from uninitialized stack or heap, writing into unallocated areas,
freeing unallocated/freed pointers, and all these things. From my experience,
it works very well.
And because unlike Purify this is not DEC's (Digital's? Compaq's? They change
their name every year too...) main income source, and because DEC seem
to have started selling Alpha machines with Linux (not only their proprietary
Unix), maybe someday they will free 'third' and port it to Linux. Let's
hope (or do something about it, if you have connections in Digital) :)

-- 
Nadav Har'El                        |     Thursday, Nov 2 2000, 4 Heshvan 5761
[email-masked]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Some people bring happiness wherever
http://nadav.harel.org.il           |they go, others whenever they go.

---

From: Moshe Zadka <[email-masked]>
Date: Thu, 2 Nov 2000 10:29:43 +0200 (IST)

On Thu, 2 Nov 2000, Chen Shapira wrote:

> are not GCed like file-handles and db connections

GC them too...it's not like it's impossible. (only a bit tricky <wink>)
Even with copy-collection, usually it is possible to go and check for
uncopied "system resources". Destructors and GC is a fascianting topic.

>, and even things like
> memory.

Say

x="moshe"
while 1:
	x=x+x

will fail pretty quickly. 
But you can't really claim it's buggy...
Not until you get a MemoryError

--
Moshe Zadka <[email-masked]> -- 95855124
http://advogato.org/person/moshez