Article View: comp.lang.tcl
Article #22Re: Experiment: inline bytecode for [lrange] with variable indices (written by Claude)
From: saito
Date: Thu, 08 Oct 2026 18:34
Date: Thu, 08 Oct 2026 18:34
25 lines
2427 bytes
2427 bytes
On 10/6/2026 9:19 PM, et99 wrote: > > I asked Claude (Anthropic's AI assistant), working in its sandbox with > access to the GitHub mirror of the Tcl source, to add a new listRange > instruction that always takes exactly three values from the stack: the > list and both indices. It took about 20 minutes to get a complete patch > with tests, after many build and test runs in the sandbox, including > AddressSanitizer, Tcl's memory-debug build and the TCL_COMPILE_DEBUG > build. I copied the changed files into my own tree, built, and ran the > tests and a benchmark on two of my machines. Claude ran the same > benchmark in its sandbox, which is the third column below. > An AI assistant already knows about bytecodes to the degree that it can optimize it? Truly impressive. Question/Suggestion: Expect on Windows is basically abandoned software at this point, and other platforms may follow suit soon. It is a nice piece of software and it seems to be popular enough to receive attention in articles and blogs here and there. I wonder with your experience in directing Claude if it can offer a solution.
Technical Details
Message-ID:
<11a8nn7$3sdl$2@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-mailReferences:
<11a46mp$2f14b$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: saito <saitology9@gmail.com> Newsgroups: comp.lang.tcl Subject: Re: Experiment: inline bytecode for [lrange] with variable indices (written by Claude) Date: Thu, 8 Oct 2026 14:34:12 -0400 Organization: A noiseless patient Spider Lines: 25 Message-ID: <11a8nn7$3sdl$2@dont-email.me> References: <11a46mp$2f14b$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 08 Oct 2026 18:34:16 +0000 (UTC) Injection-Info: dont-email.me; logging-data="127413"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19b8gC6bQYrHN2NgH0ezk0d"; posting-host="256cbc3c0831a8757e76062f6ee2c30a" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:63OAREO0WpXieedwzrR6KBCLZ+8= sha256:e8sdijoEM/5Il8aB8HN0V7BQn2ogUJN9etYIUB+4w40= sha1:kiM2YhqxSJBGx8EGjYf1EEEKFC4= sha256:+g3iSCeMpYMODZ6NJ53cv1eELc5RtaokLnOOHCOf4S8= In-Reply-To: <11a46mp$2f14b$1@dont-email.me> Content-Language: en-US