🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.tcl
Article #21

Re: Experiment: inline bytecode for [lrange] with variable indices (written by Claude)

#21
From: Rich
Date: Thu, 08 Oct 2026 14:07
16 lines
2182 bytes
et99 <et99@rocketship1.me> wrote:
> One interesting find along the way: when a command's compile routine 
> hits an error (for example [format %d notanumber] or [string is bogus 
> x]), the compiler doesn't raise a script-level error.  It bakes a 
> "syntax" bytecode into the code, which I found in about 8 places in 
> the source.  The error only appears at run time, and only if that 
> code is reached, so a mistake can sit dormant in production code for 
> years.

That is likely to match Tcl interpreted script behavior.  An 'if' 
clause (say for checking for an incorrect data in a var) that is not 
exercised by an explicit test can also hold a syntax error (the 
interpreter will only care that the 'if' body has matching curly braces 
at parse time) that can lay dormant until one day, years in the future, 
the incorrect data being tested for finally makes the 'if' test true, 
then the body is executed, and the syntax error can manifest itself.
Technical Details
Message-ID: <11a882k$3sq6e$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11a46mp$2f14b$1@dont-email.me> <1791401131-1108@newsgrouper.org> <11a77uh$3gpfh$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Rich <rich@example.invalid>
Newsgroups: comp.lang.tcl
Subject: Re: Experiment: inline bytecode for [lrange] with variable indices (written by Claude)
Date: Thu, 8 Oct 2026 14:07:16 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <11a882k$3sq6e$1@dont-email.me>
References: <11a46mp$2f14b$1@dont-email.me> <1791401131-1108@newsgrouper.org> <11a77uh$3gpfh$1@dont-email.me>
Injection-Date: Thu, 08 Oct 2026 14:07:17 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="4090062"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+NlDZTxNfC1YqX9pwXTVlw"; posting-host="4ed7bc1c6aa987cd0594bede4f36b4fe"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.193 (x86_64))
Cancel-Lock: sha1:7n5GZ8NaPdY0lNUmu4Q+lwMXpR0= sha256:EkICkaY+7EluK69Bd0LJ1XynEukNZVCQKxBWCnueqeM=
	sha1:vdlBH0Q7RBsajtC6l8D1PHrovy8= sha256:JZs2hXAuvd+PKXCITreRHNqDjOKSsqNcyTmK5zmRmOA=