|
|
Orchid XP v7 wrote:
> Well, it's famously hard to check *everything* that could possibly go
> wrong at every possible moment in your program. The code is unreadable
> enough already... :-(
If you're going to fill up the disk, you need to check you're not going
to fill up the disk, or you need to catch all errors, or you need to
accept you're going to bomb out. I don't see any way around that.
> It's a backup script. It backed up so much data that there was no furter
> space available. Not really Tcl's fault, but it didn't handle it
> terribly gracefully.
Tcl handles it fine. You didn't write code to account for filling up the
disk, so you probably got stuck in a loop trying to write data and
having it fail, is my guess.
> ....event...loop...?
Yeah, OK. You know, that thing you use with Tk, vwait, fileevent, that
stuff?
Not knowing what the event loop is in Tcl is like using C and saying
"Wait, function? Header file? What's that?"
> Doesn't actually store the data anywhere. It's just trying to delete a
> folder recursively. (I discovered that if you don't manually walk the
> thing yourself, it gives up at the first file it hits that can't be
> deleted. I want it to delete EVERYTHING that can be deleted.)
Obviously, if you're recursing, you're at least storing the list of
entries in each directory from where you are to where you started. 8M
doesn't seem like a lot, depending on the directories.
> Well, I was under the impression that local variables get automatically
> freed when you exit a procedure - maybe I was wrong?
Yes, they do. But the memory gets reused rather than being freed, so the
process will grow to the biggest size you allocate at one time.
> Define "extensible language".
One where you can change the syntax of the language, basically. FORTH,
LISP, Tcl, etc.
When you can redefine the meaning of "if" or "proc" at runtime, it's
fairly difficult to have a code checker that will check you're passing
the right types.
On the gripping hand, there *are* code checkers for Tcl, if that's your
thing.
> I would question the sanity of that too. ;-)
Me too. I'd much rather have runtime checks than no runtime checks.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
|