Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-05-24
22:25 • Ticket [655176ffff] Reference implementation for TIP 123 status still Closed... artifact: 2955f9d9bc user: dgp
22:19 • Ticket [655176ffff]: 2 changes artifact: 8034170e99 user: dgp
22:19 • Ticket [655176ffff]: 4 changes artifact: 6ba4280b4c user: dgp
2009-01-24
22:39 • Ticket [655176ffff]: 6 changes artifact: afe432d3ec user: dkf
2003-09-15
17:14 • Ticket [655176ffff]: 4 changes artifact: 3dc5396b34 user: dkf
13:46 • Ticket [655176ffff]: 4 changes artifact: 2665e55ff6 user: arjenmarkus
2003-09-13
07:06 • Add attachment tcl_expon.patch to ticket [655176ffff] artifact: 38e9b293ae user: dkf
07:06 • Ticket [655176ffff] Reference implementation for TIP 123 status still Closed... artifact: d625febb10 user: dkf
07:06 • Closed ticket [655176ffff]. artifact: 2debf879d6 user: dkf
2003-09-12
20:18 • Ticket [655176ffff]: 3 changes artifact: 941372208b user: dkf
2002-12-17
20:23 • Ticket [655176ffff]: 4 changes artifact: b40ce4df54 user: arjenmarkus
20:23 • Add attachment tcl_expon.tar.gz to ticket [655176ffff] artifact: 93c1565bfc user: arjenmarkus
13:21 • New ticket [655176ffff] Reference implementation for TIP 123. artifact: 3edded422c user: arjenmarkus

Reference implementation for TIP 123

Closed655176ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 18 years ago
Descriptionplain2002-12-17 13:21:36
TIP 123 provides a new operator for [expr], **, that
does exponentiation.
The tar-file contains a reference implementation based
on Tcl 8.4.1
arjenmarkusplain2002-12-17 20:23:59
File Added - 37808: tcl_expon.tar.gz
dkf Ticket [655176ffff]: 3 changes [History diff]2003-09-12 20:18:24
dkfplain2003-09-13 07:06:29
Logged In: YES 
user_id=79902

Applied, and thanks for developing this code.  However...

There was a whole bunch of problems with the reference
implementation, so I had to rework a lot of it when applying
to the core.

First off, the reference was full files not a patch.  That's
really hard to work with given that the bytecode engine does
tend to evolve fairly quickly internally (just by virtue of
being a large piece of code!)Secondly, there were no tests.
 If there had been, the many technical problems with the
patch would have shown up for you (it's behaviour was plain
wrong in a number of aspects!)
Thirdly, it inserted an instruction in the middle of the
bytecode list.  Don't do that.  I know it means you have to
do some hacking inside IllegalExprOperandType() but that's
better than breaking backward compatability for tbcload...
Fourthly, it had no documentation.  Writing docs isn't hard
even in nroff; you can just copy the existing docs (that's
what I do normally!)

I attach the patch that I used. I don't know how easily it
will apply to anything, but it does fix all the faults I
know about so far.
dkfplain2003-09-13 07:06:30
File Added - 61395: tcl_expon.patch
arjenmarkusplain2003-09-15 13:46:14
Logged In: YES 
user_id=400048

Oh my, I do apologise for this - I had convinced myself that
all was okay. I will have to look into this more closely, so
as to learn from this!
dkfplain2003-09-15 17:14:24
Logged In: YES 
user_id=79902

I was convinced it was OK too, which is why it was an
unpleasant surprise when I hit problems when writing the
test suite!  :^/  (I suppose this can stand as testimony to
why TIP implementations require a test suite in the first
place; its not easy to write covering tests, but it catches
ever so many silly mistakes that it is ever so worth it.)
dkfplain2009-01-24 22:39:44
allow_comments - 1



data_type - 210894
dgpplain2009-05-24 22:19:09
IP - Comment Removed: 173.66.202.182
dgp Ticket [655176ffff]: 2 changes [History diff]2009-05-24 22:19:19
dgpplain2009-05-24 22:25:52
data_type - 310894
Log in (anonymous is fine) to add a comment.

Attachments: