Index: doc/help.md ================================================================== --- doc/help.md +++ doc/help.md @@ -65,13 +65,13 @@ To add a new TIP, 1. Create a file in the `tip` subdirectory. Choose a name of the format `NNN.md`, for example 467.md. The TIP numbering is currently not enforced by the system, so pick the next unused number based on -the [current TIPs](https://core.tcl-lang.org/tips/doc/trunk/index.md). +the [current TIPs](https://core.tcl-lang.org/tips/doc/main/index.md). -1. [TIP 2](https://core.tcl-lang.org/tips/doc/trunk/tip/2.md) +1. [TIP 2](https://core.tcl-lang.org/tips/doc/main/tip/2.md) specifies guidelines for writing a TIP. Write up the text, using [Markdown mark-up](/md_rules) (plenty of examples are available - pay attention to the header as described below). **NOTE:** if you already have the TIP text written in the old TIP format, you can use the `tip2md.tcl` script in the `scripts` subdirectory @@ -109,7 +109,7 @@ ------ The meta-data is terminated by `------` and indented with tabs (for nicer display in fossil). -See [TIP 3](https://core.tcl-lang.org/tips/doc/trunk/tip/3.md) for a detailed +See [TIP 3](https://core.tcl-lang.org/tips/doc/main/tip/3.md) for a detailed specification of the header format and meaning of each header field. Index: index.json ================================================================== --- index.json +++ index.json @@ -1,104 +1,207 @@ {"tip": { - "591":{"url":"./tip/591.md","keywords":"Tk, bindings","created":"13-Nov-2020","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 591: Rotate ttk::notebook window wtih mousewheel on tab","author":["Harald Oehlmann "],"is-jest":false}, - "590":{"url":"./tip/590.md","keywords":"package","created":"4-Nov-2020","post-history":"","state":"Draft","tcl-branch":"tip-590","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 590: Recommend lowercase Package Names","author":["Jan Nijtmans "],"is-jest":false}, + "694":{"url":"./tip/694.md","created":"2024-04-11","votes-against":"","votes-for":"","vote-summary":"","state":"Draft","tcl-version":"any","vote":"Pending","type":"Project","title":"# TIP 694: Define a definite test environment","votes-present":"","author":["chw"],"is-jest":false}, + "693":{"url":"./tip/693.md","created":"27-Mar-2024","votes-against":"none","votes-for":"DP, BG, AK, KW, MC, SL, FV, JN","vote-summary":"Accepted 8/0/0","state":"Final","tcl-version":"8.7 and 9.0","vote":"Done","type":"Project","title":"# TIP 693: Restart the changes files","votes-present":"none","author":["Don Porter "],"is-jest":false}, + "692":{"url":"./tip/692.md","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"AK, FV, JN, MC, KW, SL","votes-against":"None","created":"21-03-2024","title":"# TIP 692: Revise Tcl_GetAliasObj, remove Tcl_GetAlias()","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-692","votes-present":"None","is-jest":false}, + "691":{"url":"./tip/691.md","state":"Draft","vote-summary":"","type":"Project","author":["Jan Nijtmans "],"votes-for":"","votes-against":"","created":"21-03-2024","title":"# TIP 691: Setting -profile for tclsh/wish and the \"source\"/\"open\" commands.","vote":"Pending","tcl-version":"8.7 and 9.0","tcl-branch":"tip-691","votes-present":"","is-jest":false}, + "690":{"url":"./tip/690.md","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Jan Nijtmans , Rolf Ade "],"votes-for":"AK, FV, JN, MC, KW, SL","votes-against":"None","created":"20-03-2024","title":"# TIP 690: Make \"clock scan -valid 1\" the default","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-690","votes-present":"None","is-jest":false}, + "689":{"url":"./tip/689.md","state":"Draft","vote-summary":"","type":"Project","author":["Harald Oehlmann ","Jan Nijtmans ","Sergey G. Brester "],"votes-for":"","votes-against":"","created":"13-03-2024","title":"# TIP 689: \"namespace unknown\" independent on caller namespace","vote":"Pending","tcl-version":"8.7 and 9.0","tcl-branch":"tip-689","votes-present":"","is-jest":false}, + "688":{"url":"./tip/688.md","state":"Final","vote-summary":"3 / 0 / 0","type":"Project","author":["Harald Oehlmann ","Sergey G. Brester "],"votes-for":"JN, MC, SL","votes-against":"none","created":"27-02-2024","title":"# TIP 688: clock command revision and speedup","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-688","votes-present":"none","is-jest":false}, + "687":{"url":"./tip/687.md","state":"Draft","vote-summary":"","type":"Project","tk-branch":"tip-687","author":["Jan Nijtmans "],"votes-for":"","votes-against":"","created":"30-1-2024","title":"# TIP 687: locale support for word handling in text and entry","vote":"Pending","tcl-version":"9.1","votes-present":"","is-jest":false}, + "686":{"url":"./tip/686.md","state":"Final","vote-summary":"3 / 0 / 0","type":"Project","tk-branch":"tip-686","author":["Jan Nijtmans "],"votes-for":"FV, JN, SL","votes-against":"none","created":"29-1-2024","title":"# TIP 686: Make NextWord/SelectNextWord behavior platform-independant","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "685":{"url":"./tip/685.md","state":"Final","vote-summary":"4 / 2 / 0","type":"Project","author":["Harald Oehlmann"],"votes-for":"BG, KW, MC, SL","votes-against":"DP, JN","created":"10-01-2024","obsoleted-by":"652","title":"# TIP 685: rename \"string is unicode\" to \"string is transferable\"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-685","votes-present":"none","is-jest":false}, + "684":{"url":"./tip/684.md","state":"Final","vote-summary":"7 / 0 / 0","type":"Project","tk-branch":"touchpad_events","author":["Marc Culler"],"votes-for":"MC,KW,FV,SL,JN,DF,AK","votes-against":"none","created":"28-11-2023","title":"# TIP 684: Add Support for Touchpad Scrolling to Tk","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "683":{"url":"./tip/683.md","state":"Final","vote-summary":"6 / 0 / 0","type":"Project","tk-branch":"tk-legacy","author":["Jan Nijtmans "],"votes-for":"AK, DKP, FV, JN, KW, SL","votes-against":"none","created":"17-11-2023","title":"# TIP 683: Remove legacy \"pack\" and \"scrollbar\" syntax","vote":"Done","tcl-version":"9.0","votes-present":"none","is-jest":false}, + "682":{"url":"./tip/682.md","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 682: Create tmp. widget in \"option get\" call","author":["René Zaumseil "],"is-jest":false}, + "681":{"url":"./tip/681.md","state":"Final","vote-summary":"Accepted 4/0/0","type":"Project","tk-branch":"gripsize","author":["Jan Nijtmans "],"votes-for":"FV, JN, KW, SL","votes-against":"none","created":"07-11-2023","title":"# TIP 681: Ttk \"size\"-related options","vote":"Done","tcl-version":"9.0","votes-present":"none","is-jest":false}, + "680":{"url":"./tip/680.md","state":"Withdrawn","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 680: Enhance definition of a \"number\" in Tcl","author":["Brian Griffin"],"is-jest":false}, + "679":{"url":"./tip/679.md","keywords":"tk, window manager","created":"22-Sep-2023","state":"Draft","tk-branch":"tip-679","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 679: General access to X window properties","author":["Schelte Bron "],"is-jest":false}, + "678":{"url":"./tip/678.md","keywords":"Tk, Ttk","created":"07-Sep-2023","state":"Final","tk-branch":"treeview-list-detached","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 678: Better API for Detached Treeview Items","author":["Donal Fellows "],"is-jest":false}, + "677":{"url":"./tip/677.md","state":"Final","vote-summary":"4/0/2","type":"Project","author":["Donal Fellows "],"votes-for":"DKF, BG, MC, KW","votes-against":"","created":"29-Jun-2023","title":"# TIP 677: Constant Variables","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-677","votes-present":"SL, DGP","is-jest":false}, + "676":{"url":"./tip/676.md","created":"23-Jun-2023","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 676: An \"expr\" alternative - \"calc\" command aliased to \"=\"","author":["Colin Macleod "],"is-jest":false}, + "675":{"url":"./tip/675.md","keywords":"Tk, Ttk, cursor, blink","state":"Final","vote-summary":"4/0/0","tk-branch":"tip-675","type":"Project","author":["Francois Vogel "],"votes-for":"BG, SL, FV, KW","votes-against":"none","created":"13-Jun-2023","title":"# TIP 675: Control cursor blinking cycle in Ttk widgets.","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "674":{"url":"./tip/674.md","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 674: a new multiple expression command","author":["René Zaumseil "],"is-jest":false}, + "673":{"url":"./tip/673.md","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","author":["Don Porter "],"votes-for":"AK, BG, DGP, JN, SL","votes-against":"none","created":"07-Jun-2023","title":"# TIP 673: Remove deprecated [trace] subcommands","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-673","votes-present":"none","is-jest":false}, + "672":{"url":"./tip/672.md","created":"2023-06-06","":"","state":"Draft","tcl-branch":"tip-672","tcl-version":"9.1","type":"Project","title":"# TIP 672: Extend $ substitution to include expressions as $(expression)","author":["Eric Taylor"],"is-jest":false}, + "671":{"url":"./tip/671.md","created":"2023-06-04","state":"Draft","tcl-branch":"tip-671","tcl-version":"9.1","type":"Project","title":"# TIP 671: New encoding profile - lossless","author":["Ashok P. Nadkarni "],"is-jest":false}, + "670":{"url":"./tip/670.md","created":"29-05-2023","state":"Final","tcl-branch":"tip-670","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 670: Simple Extra Procedures for File Access","author":["Donal Fellows "],"is-jest":false}, + "669":{"url":"./tip/669.md","created":"24-05-2023","state":"Draft","tcl-branch":"tip-669","tcl-version":"9.1","type":"Project","title":"# TIP 669: Pipe PIDs as Channel Property","author":["Donal Fellows "],"is-jest":false}, + "668":{"url":"./tip/668.md","created":"11-05-2023","state":"Draft","tcl-branch":"tip-668","tcl-version":"9.1","type":"Project","title":"# TIP 668: Consolidate all Tcl_Attempt* functions.","author":["Jan Nijtmans "],"is-jest":false}, + "667":{"url":"./tip/667.md","obsoleted-by":"657","state":"Draft","tcl-branch":"tip-667","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 667: Make \"strict\" the default encoding profile.","author":["Nathan Coulter "],"is-jest":false}, + "666":{"url":"./tip/666.md","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"AK, BG, JN, KW, SL","votes-against":"none","created":"03-05-2023","title":"# TIP 666: Change ptrdiff_t → Tcl_Size in Tcl 8.7 (and 9.0)","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-666","votes-present":"none","is-jest":false}, + "665":{"url":"./tip/665.md","state":"Final","vote-summary":"Accepted 4/0/1","type":"Project","author":["Jan Nijtmans "],"votes-for":"AK, JN, KW, SL","votes-against":"none","created":"02-05-2023","title":"# TIP 665: Remove support for internal utf-16 for Tcl 8.7 (and 9.0)","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-665","votes-present":"BG","is-jest":false}, + "664":{"url":"./tip/664.md","state":"Withdrawn","vote-summary":"Accepted 7/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"AF, AK, DKF, JN, KW, MC, SL","votes-against":"none","created":"02-05-2023","obsoleted-by":"661","title":"# TIP 664: Enable compiler warnings for missing int → Tcl_Size conversions","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-664","votes-present":"none","is-jest":false}, + "663":{"url":"./tip/663.md","":"Vote-Summary Accepted 9/0/0","state":"Final","type":"Project","author":["Don Porter "],"votes-for":"DP, BG, KW, AK, FV, JN, JD, MC, SL","votes-against":"none","created":"26-Apr-2023","title":"# TIP 663: Cease distribution of the ChangeLog files","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-663","votes-present":"none","is-jest":false}, + "662":{"url":"./tip/662.md","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","author":["Don Porter "],"votes-for":"AK, BG, DGP, JN, SL","votes-against":"none","created":"26-Apr-2023","title":"# TIP 662: Un-deprecate Tcl_VarEval","vote":"Done","tcl-version":"8.6","tcl-branch":"tip-662","votes-present":"none","is-jest":false}, + "661":{"url":"./tip/661.md","state":"Final","vote-summary":"3 / 0 / 0","type":"Project","author":["Rolf Ade ","Harald Oehlmann "],"votes-for":"SL, AK, KW","votes-against":"none","created":"25-04-2023","title":"# TIP 661: Disable the Tcl 8 compatibility macros in Tcl 9 by default","vote":"Done","tcl-version":"9.0","tcl-branch":"disabletcl8api","votes-present":"none","is-jest":false}, + "660":{"url":"./tip/660.md","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"SL, BG, DF, KK, MC, KW, JD, FV, AK","votes-against":"none","created":"30-03-2023","title":"# TIP 660: Use signed types for lengths and indices","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-660","votes-present":"none","is-jest":false}, + "659":{"url":"./tip/659.md","state":"Withdrawn","tcl-branch":"tip-659","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 659: Allow other default profiles than \"strict\"","author":["Jan Nijtmans "],"is-jest":false}, + "658":{"url":"./tip/658.md","keywords":"tk menu","state":"Final","vote-summary":"Accepted 4/0/0","type":"Project","tk-branch":"tip-658","author":["Schelte Bron "],"votes-for":"BG, SL, FV, KW","votes-against":"none","created":"16-Mar-2023","title":"# TIP 658: Attach identifiers to Tk menu entries","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "657":{"url":"./tip/657.md","votes-against":"none","votes-for":"AF, AK, JN, KW, MC, SL","vote-summary":"Accepted 6/0/1","state":"Final","tcl-branch":"tip-657","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 657: Make \"-profile strict\" the default in Tcl 9.0","votes-present":"DKF","author":["Jan Nijtmans ","Nathan Coulter "],"is-jest":false}, + "656":{"url":"./tip/656.md","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"AK, JD, JN, KW, MC, SL","votes-against":"none","created":"2023-02-13","title":"# TIP 656: A revised proposal for encodings","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-656","votes-present":"none","is-jest":false}, + "655":{"url":"./tip/655.md","keywords":"Tk, Aqua","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","tk-branch":"655","author":["Marc Culler"],"votes-for":"FV, JN, KW, MC, SL","votes-against":"none","created":"28-Jan-2023","title":"# TIP 655: Support the styleMask property for NSWindow and NSPanel in Aqua","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "654":{"url":"./tip/654.md","created":"10-Jan-2023","obsoleted-by":"656","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 654: Profiles for character encoding/decoding behaviour","author":["Nathan Coulter "],"is-jest":false}, + "653":{"url":"./tip/653.md","state":"Final","vote-summary":"3/0/0","type":"Project","author":["Jan Nijtmans ","Harald Oehlmann "],"votes-for":"AK, JN, SL","votes-against":"none","created":"08-Jan-2023","title":"# TIP 653: Handle consumed data of channel commands in case of encoding errors","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-653","votes-present":"none","is-jest":false}, + "652":{"url":"./tip/652.md","created":"26-Dec-2022","votes-against":"none","votes-for":"BG, DP, JN, KW, MC, SL","vote-summary":"6 / 0 / 0","state":"Final","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 652: Remove \"string is unicode\" and Tcl_CharIsUnicode\"","votes-present":"none","author":["Nathan Coulter "],"is-jest":false}, + "651":{"url":"./tip/651.md","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"BG, JN, SL","votes-against":"none","created":"17-Nov-2022","title":"# TIP 651: Expose TclDStringToObj via stubs table","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-651","votes-present":"none","is-jest":false}, + "650":{"url":"./tip/650.md","state":"Final","vote-summary":"Accepted 2/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"BG, JN","votes-against":"none","created":"15-Nov-2022","title":"# TIP 650: New function Tcl_GetWideUIntFromObj()","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-650","votes-present":"none","is-jest":false}, + "649":{"url":"./tip/649.md","keywords":"list","created":"14-Nov-2022","state":"Draft","tcl-branch":"tip-649","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 649: Expose additional list functionality in the C API","author":["Ashok P. Nadkarni "],"is-jest":false}, + "648":{"url":"./tip/648.md","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"AK, FV, JN, MC, KW, SL","votes-against":"None","created":"04-Nov-2022","title":"# TIP 648: New functions Tcl_NewWideUIntObj()/Tcl_SetWideUIntObj()","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-648","votes-present":"None","is-jest":false}, + "647":{"url":"./tip/647.md","state":"Final","vote-summary":"4 / 0 / 0","type":"Project","tk-branch":"tip-647","author":["Jan Nijtmans "],"votes-for":"BG, DKF, JN, SL","votes-against":"none","created":"04-11-2022","title":"# TIP 647: Change Tk_ConfigureWidgets signature, abandon TK_CONFIG_OBJS","vote":"Done","tcl-version":"9.0","votes-present":"none","is-jest":false}, + "646":{"url":"./tip/646.md","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"JN, KBK, KW, SL","votes-against":"none","created":"17-Oct-2022","title":"# TIP 646: Change -eofchar handling","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-646","votes-present":"none","is-jest":false}, + "645":{"url":"./tip/645.md","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","tk-branch":"tip-645","author":["Patrick May "],"votes-for":"JN, KBK, KW, SL","votes-against":"none","created":"11-Oct-2022","title":"# TIP 645: ttk color palette support","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "644":{"url":"./tip/644.md","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"BG JN SL","votes-against":"none","created":"10-Oct-2022","title":"# TIP 644: Make Tcl_ObjType extensible","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-644","votes-present":"none","is-jest":false}, + "643":{"url":"./tip/643.md","keywords":"encoding","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"JN, KBK SL","votes-against":"none","created":"09-Oct-2022","title":"# TIP 643: Provide a public API to retrieve nul terminator length for an encoding","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-643","votes-present":"none","is-jest":false}, + "642":{"url":"./tip/642.md","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","tk-branch":"tip-642","author":["Jan Nijtmans "],"votes-for":"JN, KBK SL","votes-against":"none","created":"05-Oct-2022","title":"# TIP 642: Let TK_OPTION_BOOL/TK_OPTION_STRING_TABLE handle (C99) bool/enum.","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "641":{"url":"./tip/641.md","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"JN, KBK SL","votes-against":"none","created":"02-Oct-2022","title":"# TIP 641: Let Tcl_GetBoolean(FromObj) handle (C99) bool.","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-641","votes-present":"none","is-jest":false}, + "640":{"url":"./tip/640.md","keywords":"Tcl","":"Vote-Summary Accepted 5/0/0","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-for":"FV, JN, KW, MC, SL","votes-against":"none","created":"21-09-2022","title":"# TIP 640: Remove Tcl_SaveResult","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-640","votes-present":"none","is-jest":false}, + "639":{"url":"./tip/639.md","keywords":"Tk, Aqua","":"Vote-Summary Accepted 4/0/0","state":"Final","type":"Project","tk-branch":"mac_styles_87","author":["Marc Culler"],"votes-for":"FV, JN, KW, MC","votes-against":"none","created":"18-Sep-2022","title":"# TIP 639: Include the mac_styles features in Tk 8.7","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "638":{"url":"./tip/638.md","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Don Porter "],"votes-for":"DP, JN, SL, FV, KK, KW","votes-against":"none","created":"18-Sep-2022","title":"# TIP 638: New public routines Tcl_GetNumber(FromObj)","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-getnumber","votes-present":"none","is-jest":false}, + "637":{"url":"./tip/637.md","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Don Porter "],"votes-for":"DP, JN, SL, FV, KK, KW","votes-against":"none","created":"17-Sep-2022","title":"# TIP 637: Make [glob] always -nocomplain","vote":"Done","tcl-version":"9.0","tcl-branch":"novem","votes-present":"none","is-jest":false}, + "636":{"url":"./tip/636.md","":"","state":"Final","type":"Project","author":["Brian Griffin "],"votes-summary":"4/0/0","votes-for":"SL, DF, KW, BG","votes-against":"none","created":"1-Sep-2022","title":"# TIP 636: Expand List Flexibility with Abstract List Tcl_Obj Type","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-636-tcl9-644","votes-present":"none","is-jest":false}, + "635":{"url":"./tip/635.md","keywords":"upvar,namespace upvar","created":"26-Aug-2022","state":"Withdrawn","tcl-branch":"tip-635","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 635: Introspection for 'upvar' and 'namespace upvar'","author":["Schelte Bron "],"is-jest":false}, + "634":{"url":"./tip/634.md","keywords":"upvar,trace,array","state":"Final","type":"Project","author":["Schelte Bron "],"vote-results":"4/0/0 accepted","votes-for":"FV, KW, JN, SL","votes-against":"none","created":"21-Aug-2022","title":"# TIP 634: Remove inconsistency in variable tracing of an array","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-634","votes-present":"none","is-jest":false}, + "633":{"url":"./tip/633.md","keywords":"channel encoding","":"Vote-Summary Accepted 4/0/1","state":"Final","type":"Project","author":["Harald Oehlmann "],"votes-for":"JN, KW, MC, SL","votes-against":"none","created":"12-Aug-2022","title":"# TIP 633: configure channel about channel encoding error reporting mode","vote":"Done","tcl-version":"8.7","tcl-branch":"tip633-tcl9-fconfigure-strictencoding","votes-present":"FV","is-jest":false}, + "632":{"url":"./tip/632.md","keywords":"tk image","state":"Final","vote-summary":"Accepted 6/0/0","tk-branch":"rfe-f285ddcd-animated-gif-metadata","type":"Project","author":["Harald Oehlmann "],"votes-for":"MC, BG, SL, JN, FV, KW","votes-against":"none","created":"12-Aug-2022","tk-ticket":"f285ddcd23","title":"# TIP 632: return gif animated metadata","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "631":{"url":"./tip/631.md","keywords":"list","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"BG, KW, KK, MC, SL, FV","votes-against":"none","created":"6-Aug-2022","title":"# TIP 631: ledit - a generalized insert/delete command for list variables","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-631","votes-present":"none","is-jest":false}, + "630":{"url":"./tip/630.md","keywords":"Tcl","":"Vote-Summary Accepted 3/0/1","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-for":"JN, KBK, KW","votes-against":"none","created":"05-07-2022","title":"# TIP 630: TclOO commands > 2^31 (for 8.7)","vote":"Done","tcl-version":"8.7","tcl-branch":"tcloo-64bit","votes-present":"FV","is-jest":false}, + "629":{"url":"./tip/629.md","state":"Final","vote-summary":"Accepted 8/0/0","type":"Project","author":["Eric Taylor ","Brian Griffin "],"votes-for":"SL, MC, KK, AK, JN, FV, KW, BG","votes-against":"none","created":"28-06-2022","title":"# TIP 629: Add a lseq (formally \"range\") command to the core of list commands","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-629","votes-present":"none","is-jest":false}, + "628":{"url":"./tip/628.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"JN, KBK SL","votes-against":"none","created":"22-06-2022","title":"# TIP 628: Shared 8.7/9.0 build environment","vote":"Done","tcl-version":"9.0","tcl-branch":"tcl8-compat","votes-present":"none","is-jest":false}, + "627":{"url":"./tip/627.md","keywords":"Tcl","":"Vote-Summary Accepted 3/0/1","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-for":"JN, KBK, KW","votes-against":"none","created":"01-06-2022","title":"# TIP 627: New functions for handling commands > 2^31 elements (for 8.7)","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-627","votes-present":"FV","is-jest":false}, + "626":{"url":"./tip/626.md","keywords":"Tcl","created":"24-05-2022","state":"Draft","tcl-branch":"tip-626","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 626: Command arguments > 2^31 elements","author":["Jan Nijtmans "],"is-jest":false}, + "625":{"url":"./tip/625.md","keywords":"Tcl","":"Vote-Summary Accepted 3/0/0","state":"Final","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"BG, JN, KW","votes-against":"none","created":"17-05-2022","title":"# TIP 625: Re-implementation of lists","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-625","votes-present":"none","is-jest":false}, + "624":{"url":"./tip/624.md","keywords":"Tcl","":"Vote-Summary Accepted 5/0/1","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-for":"DGP, FV, JN, KBK, SL","votes-against":"none","created":"06-April-2022","title":"# TIP 624: Deprecate Tcl_MakeSafe","vote":"Done","tcl-version":"8.7","tcl-branch":"rfe-655300","votes-present":"MC","is-jest":false}, + "623":{"url":"./tip/623.md","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Don Porter "],"votes-for":"DGP, JN, SL","votes-against":"none","created":"24-Mar-2022","title":"# TIP 623: Bless negative index arguments to Tcl_GetRange","vote":"Done","tcl-version":"8.6.13","tcl-branch":"tip-623","votes-present":"none","is-jest":false}, + "622":{"url":"./tip/622.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 5/0/1","type":"Project","author":["Jan Nijtmans "],"votes-for":"AK, JN, KBK, KW, SL","votes-against":"none","created":"23-Mar-2022","title":"# TIP 622: Full Unicode for Tcl 8.7","vote":"Done","tcl-version":"8.7","tcl-branch":"full-utf-for-87","votes-present":"JD","is-jest":false}, + "621":{"url":"./tip/621.md","keywords":"Tk, ICU","":"Vote-Summary Accepted 3/0/1","state":"Final","type":"Project","tk-branch":"glyph_indexing_2","author":["Jan Nijtmans "],"votes-for":"FV, JN, KW","votes-against":"none","created":"16-Mar-2022","title":"# TIP 621: Glyph clustering for Tk","vote":"Done","tcl-version":"8.7","votes-present":"KBK","is-jest":false}, + "620":{"url":"./tip/620.md","keywords":"Tk, treeview","state":"Final","vote-summary":"Accepted 8/0/0","tk-branch":"pspjuth-treeview","type":"Project","author":["Peter Spjuth "],"votes-for":"MC, BG, KBK, AKU, SL, JN, FV, KW","votes-against":"none","created":"9-Mar-2022","title":"# TIP 620: Treeview cell padding.","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "619":{"url":"./tip/619.md","keywords":"Tcl Tcl_UniCharToUtf()","state":"Final","vote-summary":"Accepted 4/0/1","type":"Project","author":["Jan Nijtmans "],"votes-for":"AK, JN, KW, SL","votes-against":"none","title":"# TIP 619: New TCL\\_COMBINE flag for Tcl\\_UniCharToUtf()","post-history":"","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-619","votes-present":"FV","is-jest":false}, + "618":{"url":"./tip/618.md","keywords":"Tcl Tcl_GetBoolFromObj() Tcl_GetBool()","":"Vote-Summary Accepted 5/0/0","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-for":"FV, JN, KW, MC, SL","votes-against":"none","title":"# TIP 618: New Tcl\\_GetBool* functions with TCL\\_NULL\\_OK flag","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-618","votes-present":"none","is-jest":false}, + "617":{"url":"./tip/617.md","votes-against":"none","votes-for":"JN, MC, KW","vote-summary":"Accepted 3/0/2","state":"Final","tcl-branch":"tip-617","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 617: Tcl_WCharLen/Tcl_Char16Len","votes-present":"FV, SL","author":["Jan Nijtmans "],"is-jest":false}, + "616":{"url":"./tip/616.md","votes-against":"none","votes-for":"JN, KBK, KW","vote-summary":"Accepted 3/0/2","state":"Final","tcl-branch":"tip-616","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 616: Tcl lists > 2^31 elements","votes-present":"FV, SL","author":["Jan Nijtmans "],"is-jest":false}, + "615":{"url":"./tip/615.md","state":"Draft","tcl-branch":"tip-615","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 615: string is index","author":["Jan Nijtmans "],"is-jest":false}, + "614":{"url":"./tip/614.md","":"","state":"Rejected","vote-summary":"Rejected 1/2/2","type":"Project","tk-branch":"tip614-win-wtssession-change","author":["Harald Oehlmann "],"votes-for":"JN","votes-against":"FV, KW","created":"14-Jan-2022","tk-ticket":"8a49f43b","title":"# TIP 614: Windows: OS: WTSSESSION change notification","vote":"Done","tcl-version":"8.7","votes-present":"MC, SL","is-jest":false}, + "613":{"url":"./tip/613.md","":"","keywords":"Tcl Tcl_GetIndexFromObj() Tcl_GetIndexFromObjStruct()","state":"Final","vote-summary":"Accepted 7/0/0","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"BG, FV, JD, JN, KW, MC, SL","created":"09-Dec-2021","title":"# TIP 613: New INDEX\\_NULL\\_OK flag for Tcl_GetIndexFromObj*()","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-613","votes-present":"none","is-jest":false}, + "612":{"url":"./tip/612.md","keywords":"Tk","created":"9-Dec-2021","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 612: Setting WM_CLASS for main/root window","author":["Benjamin Schnitzler "],"is-jest":false}, + "611":{"url":"./tip/611.md","created":"2-Sep-2021","post-history":"","state":"Draft","implementation-url":"https://wiki.tcl-lang.org/page/rphoto","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 611: Add subcommands to the \"photo image\" command to rotate and reflect an image","author":["Arjen Markus , Richard Suchenwirth "],"is-jest":false}, + "610":{"url":"./tip/610.md","keywords":"Tk, desktop integration","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","author":["Kevin Walzer "],"votes-for":"MC, SL, JN, FV, KW","votes-against":"none","created":"21-August-2021","title":"# TIP 610: Icon Badges","tcl-version":"8.7","vote":"Done","votes-present":"none","is-jest":false}, + "609":{"url":"./tip/609.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 4/0/1","type":"Project","author":["Christian Werner "],"votes-against":"none","votes-for":"AK, JN, KW, SL","created":"06-August-2021","title":"# TIP 609: Enhance Tcl_ThreadQueueEvent()","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-609","votes-present":"FV","is-jest":false}, + "608":{"url":"./tip/608.md","keywords":"Tk,font,WorldChanged,event","":"Vote-Summary Accepted 5/0/0","state":"Final","type":"Project","author":["Brian Griffin "],"votes-against":"none","votes-for":"BG, FV, KW, SL, JN","created":"07-Aug-2021","tk-ticket":"3049518","title":"# TIP 608: Add virtual event when font configuration changes","post-history":"","vote":"Done","tcl-version":"8.6","votes-present":"none","is-jest":false}, + "607":{"url":"./tip/607.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"AK, FV, JN, KW, SL","created":"30-Jul-2021","title":"# TIP 607: -failindex option for encoding convertto/convertfrom","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip607-encoding-failindex","votes-present":"none","is-jest":false}, + "606":{"url":"./tip/606.md","":"","keywords":"Tk","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","tk-branch":"tip-606","author":["René Zaumseil "],"votes-against":"none","votes-for":"BG, FV, JN, MC, SL, KW","created":"15-Jul-2021","title":"# TIP 606: Export more private Tk functions","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "605":{"url":"./tip/605.md","keywords":"Tcl","":"Vote-Summary Accepted 7/0/0","state":"Final","type":"Project","author":["René Zaumseil "],"votes-against":"none","votes-for":"AK, FV, JN, KBK, KW, MC, SL","created":"15-Jul-2021","title":"# TIP 605: Function to get class name from object","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-605","votes-present":"none","is-jest":false}, + "604":{"url":"./tip/604.md","keywords":"Tk, desktop integration","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","author":["Kevin Walzer "],"votes-for":"MC, JD, KK, FV, DKF, JN, SL, BG, KW","votes-against":"none","created":"03-July-2021","title":"# TIP 604: Printing Support for Text and Canvas Widgets","tcl-version":"8.7","vote":"Done","votes-present":"none","is-jest":false}, + "603":{"url":"./tip/603.md","keywords":"Tcl, file","state":"Final","vote-summary":"Accepted 5/1/1","type":"Project","author":["Donal K. Fellows "],"votes-against":"KW","votes-for":"AK, DKF, JN, KBK, SL","created":"19-Jun-2021","title":"# TIP 603: Get 'stat' Information of Open Files","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-603","votes-present":"FV","is-jest":false}, + "602":{"url":"./tip/602.md","votes-against":"none","votes-for":"AK, JN, KBK, KW, MC, SL","vote-summary":"Accepted 6/0/0","state":"Final","tcl-branch":"tip-602","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 602: Remove tilde expansion in file paths.","votes-present":"none","author":["Harald Oehlmann ","Ashok P. Nadkarni "],"is-jest":false}, + "601":{"url":"./tip/601.md","":"Vote-Summary Accepted 6/0/0","votes-against":"none","votes-for":"FV, JD, JN, KW, MC, SL","state":"Withdrawn","tcl-branch":"encodings-with-flags","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 601: Make \"encoding convertto/convertfrom\" throw exceptions","votes-present":"none","author":["Harald Oehlmann ","Jan Nijtmans "],"is-jest":false}, + "600":{"url":"./tip/600.md","state":"Draft","vote":"No voting","type":"Informative","title":"# TIP 600: Migration guide for Tcl 8.6/8.7/9.0","author":["Jan Nijtmans "],"is-jest":false}, + "599":{"url":"./tip/599.md","":"Vote-Summary Accepted 5/0/0","votes-against":"none","votes-for":"BG, JN, KW, MC, SL","state":"Final","tcl-branch":"build-info","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 599: Extended build information","votes-present":"none","author":["Jan Nijtmans "],"is-jest":false}, + "598":{"url":"./tip/598.md","votes-against":"none","votes-for":"JN, KW, KK","vote-summary":"Accepted 3/0/5","state":"Final","tcl-branch":"rfe-800716","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 598: export TclWinConvertError","votes-present":"AK, DP, FV, MC, SL","author":["Jan Nijtmans "],"is-jest":false}, + "597":{"url":"./tip/597.md","votes-against":"none","votes-for":"DGP, JN, MC","vote-summary":"Accepted 3/0/0","state":"Final","tcl-branch":"tip-597","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 597: \"string is unicode\" and better utf-8/utf-16/cesu-8 encodings","votes-present":"none","author":["Jan Nijtmans "],"is-jest":false}, + "596":{"url":"./tip/596.md","votes-against":"none","votes-for":"BG, JN, KBK, KW, MC","vote-summary":"Accepted 5/0/0","state":"Final","tcl-branch":"rfe-854941","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 596: Stubs support for Embedding Tcl in other applications","votes-present":"none","author":["Jan Nijtmans "],"is-jest":false}, + "595":{"url":"./tip/595.md","votes-against":"none","votes-for":"AK, DP, JN, KW, KK, MC, SL","vote-summary":"Accepted 7/0/1","state":"Final","tcl-branch":"bug-ea39ab591e","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 595: Unicode-aware/case-sensitive Loadable Library handling","votes-present":"FV","author":["Jan Nijtmans "],"is-jest":false}, + "594":{"url":"./tip/594.md","keywords":"Tcl, file","":"Vote-Summary Accepted 4/0/2","state":"Final","type":"Project","author":["Emiliano Gavilán ","aspect "],"votes-against":"none","votes-for":"FV, JN, KBK, SL","created":"13-Jan-2021","title":"# TIP 594: Modernize \"file stat\" interface","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-594","votes-present":"DGP, MC","is-jest":false}, + "593":{"url":"./tip/593.md","keywords":"Tcl, lists","created":"31-Dec-2020","obsoleted-by":"631","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 593: Efficient List Item Existence-Test-and-Take","author":["Donal Fellows "],"is-jest":false}, + "592":{"url":"./tip/592.md","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Ashok P. Nadkarni "],"votes-for":"FV, JN, KW, KK, MC, SL","votes-against":"none","created":"12-Dec-2020","title":"# TIP 592: Stop support for Windows XP, Server 2003, Vista, Server 2008","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-592","votes-present":"none","is-jest":false}, + "591":{"url":"./tip/591.md","keywords":"Tk, bindings","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","tk-branch":"tip-591","author":["Harald Oehlmann "],"votes-for":"JN, FV, KW, MC, SL","votes-against":"none","created":"13-Nov-2020","title":"# TIP 591: Rotate ttk::notebook window with mousewheel on tab","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "590":{"url":"./tip/590.md","keywords":"package","state":"Final","vote-summary":"Accepted 3/0/2","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"JN, KW, MC","created":"4-Nov-2020","title":"# TIP 590: Recommend lowercase Package Names","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-590","votes-present":"FV, SL","is-jest":false}, "589":{"url":"./tip/589.md","created":"27-Oct-2020","post-history":"","state":"Withdrawn","tk-branch":"deprecate-bd-bg-fg","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 589: Deprecate \"-fg\", \"-bg\", \"-bd\" options in Tk.","author":["Jan Nijtmans "],"is-jest":false}, - "588":{"url":"./tip/588.md","keywords":"X11","created":"23-Oct-2020","post-history":"","state":"Draft","tk-branch":"keysym-unicode","tcl-version":"8.7","vote":"In progress","type":"Project","title":"# TIP 588: Unicode for (X11) keysyms","author":["Jan Nijtmans "],"is-jest":false}, + "588":{"url":"./tip/588.md","keywords":"X11","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","tk-branch":"keysym-unicode","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"DKF, FV, JN, KBK, KW, SL","created":"23-Oct-2020","title":"# TIP 588: Unicode for (X11) keysyms","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "587":{"url":"./tip/587.md","keywords":"Tcl source","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","author":["Jan Nijtmans "],"votes-for":"BG, DGP, DKF, FV, JN, KBK, KW, MC, SL","votes-against":"none","created":"20-Sept-2020","title":"# TIP 587: Default utf-8 for source command","post-history":"","tcl-branch":"tip-587","tcl-version":"9.0","vote":"Done","votes-present":"none","is-jest":false}, - "586":{"url":"./tip/586.md","keywords":"binary","created":"18-Sep-2020","post-history":"","state":"Draft","tcl-branch":"tip-586-binary-scan-c-string","tcl-version":"8.7","vote":"In progress","type":"Project","title":"# TIP 586: C String Parsing Support for binary scan","author":["Christian Werner "],"is-jest":false}, + "586":{"url":"./tip/586.md","keywords":"binary","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Christian Werner "],"votes-against":"none","votes-for":"DKF, FV, JN, KBK, KW, SL","created":"18-Sep-2020","title":"# TIP 586: C String Parsing Support for binary scan","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-586-binary-scan-c-string","votes-present":"none","is-jest":false}, "585":{"url":"./tip/585.md","keywords":"Tcl Tcl_GetIndexFromObj() Tcl_GetIndexFromObjStruct()","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Francois Vogel "],"votes-for":"DGP, FV, JN, KW, MC, SL","votes-against":"none","created":"30-Aug-2020","title":"# TIP 585: Promote the INDEX\\_TEMP\\_TABLE flag of Tcl_GetIndexFromObj*() to the public interface","post-history":"","tcl-branch":"tip-585","tcl-version":"8.7","vote":"Done","votes-present":"none","is-jest":false}, "584":{"url":"./tip/584.md","keywords":"Tk ttk introspection","state":"Final","vote-summary":"Accepted 6/0/0","tk-branch":"tip-584","type":"Project","author":["Francois Vogel "],"votes-for":"MC, JD, DKF, FV, KW","votes-against":"none","created":"24-Aug-2020","title":"# TIP 584: Better introspection for ttk","post-history":"","tcl-version":"8.7","vote":"Done","votes-present":"none","is-jest":false}, - "583":{"url":"./tip/583.md","keywords":"Tcl","created":"15-Aug-2020","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 583: Add Option to Limit Depth of Execution Step Traces for Procs","author":["Eric Taylor "],"is-jest":false}, + "583":{"url":"./tip/583.md","keywords":"Tcl","created":"15-Aug-2020","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 583: Add Option to Limit Depth of Execution Step Traces for Procs","author":["Eric Taylor "],"is-jest":false}, "582":{"url":"./tip/582.md","keywords":"Tcl","state":"Final","type":"Project","author":["Donal K. Fellows "],"votes-for":"DKF, JN, KBK, KW, MC, SL, FV","votes-against":"none","created":"13-Aug-2020","title":"# TIP 582: Comments in Expressions","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-582","votes-present":"none","is-jest":false}, "581":{"url":"./tip/581.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"BG, DKF, FV, JD, JN, KBK, KW, MC, SL","created":"17-July-2020","title":"# TIP 581: Master/Slave","post-history":"","vote":"Done","tcl-version":"8.6","tcl-branch":"tip-581","votes-present":"none","is-jest":false}, - "580":{"url":"./tip/580.md","keywords":"export","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","tk-version":"8.7","tk-branch":"tip-580","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"BG, DKF, FV, JD, JN, KBK, KW, MC, SL","created":"14-July-2020","title":"# TIP 580: Export Tk_GetDoublePixelsFromObj and 5 more","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, - "579":{"url":"./tip/579.md","keywords":"safe interp auto_path access_path","created":"07-Jul-2020","post-history":"","state":"Draft","tcl-branch":"tip-579-8-7","tcl-version":"8.7","version":"25-Jul-2020","vote":"Pending","type":"Project","title":"# TIP 579: Improved auto_path for Safe Base interpreters","author":["Keith Nash "],"is-jest":false}, + "580":{"url":"./tip/580.md","keywords":"export","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","tk-branch":"tip-580","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"BG, DKF, FV, JD, JN, KBK, KW, MC, SL","created":"14-July-2020","title":"# TIP 580: Export Tk_GetDoublePixelsFromObj and 5 more","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, + "579":{"url":"./tip/579.md","keywords":"safe interp auto_path access_path","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Keith Nash "],"votes-against":"none","votes-for":"JN, KBK, SL","created":"07-Jul-2020","title":"# TIP 579: Improved auto_path for Safe Base interpreters","post-history":"","vote":"Done","version":"31-Aug-2022","tcl-version":"8.7","tcl-branch":"tip-579-8-7","votes-present":"none","is-jest":false}, "578":{"url":"./tip/578.md","keywords":"Tcl index","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"AK, DKF, FV, JN, KW, SL","created":"10-June-2020","title":"# TIP 578: Death to TCL_DBGX","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"death-to-dbgx","votes-present":"none","is-jest":false}, - "577":{"url":"./tip/577.md","keywords":"Tcl index","created":"8-June-2020","post-history":"","state":"Draft","tk-branch":"strict-index","tcl-version":"8.7","type":"Project","title":"# TIP 577: Enhanced index values for Tk","author":["Jan Nijtmans "],"is-jest":false}, - "576":{"url":"./tip/576.md","keywords":"Tk listbox","created":"25-May-2020","post-history":"","state":"Draft","tk-version":"8.7","tcl-version":"8.7","type":"Project","title":"# TIP 576: Poor-mans Table listbox enhancement","author":["Brian Griffin "],"is-jest":false}, - "575":{"url":"./tip/575.md","state":"Draft","tcl-branch":"tip-575","tcl-version":"8.7","type":"Project","title":"# TIP 575: Switchable Tcl\\_UtfCharComplete()/Tcl\\_UtfNext()/Tcl\\_UtfPrev()","author":["Jan Nijtmans "],"is-jest":false}, + "577":{"url":"./tip/577.md","keywords":"Tcl index","":"Vote-Summary Accepted 5/0/1","state":"Final","type":"Project","tk-branch":"enhanced-index","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"BG, JN, KW, MC, SL","created":"8-June-2020","title":"# TIP 577: Enhanced index values for Tk","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"KBK","is-jest":false}, + "576":{"url":"./tip/576.md","keywords":"Tk listbox","created":"25-May-2020","post-history":"","state":"Draft","tcl-version":"9.1","type":"Project","title":"# TIP 576: Poor-mans Table listbox enhancement","author":["Brian Griffin "],"is-jest":false}, + "575":{"url":"./tip/575.md","votes-against":"none","votes-for":"JN, KW, SL","vote-summary":"Accepted 3/0/0","state":"Final","tcl-branch":"tip-575","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 575: Switchable Tcl\\_UtfCharComplete()/Tcl\\_UtfNext()/Tcl\\_UtfPrev()","votes-present":"none","author":["Jan Nijtmans "],"is-jest":false}, "574":{"url":"./tip/574.md","keywords":"Tk Ttk treeview tag","state":"Final","vote-summary":"Accepted 7/0/0","type":"Project","tk-branch":"bug-1bb2f1d7ab","author":["Emiliano Gavilan , Francois Vogel "],"votes-against":"none","votes-for":"MC, JD, DKF, BG, KBK, SL, FV","created":"8-May-2020","title":"# TIP 574: Add a 'tag delete' command to the ttk::treeview widget","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, - "573":{"url":"./tip/573.md","state":"Draft","tcl-branch":"tip-573","tcl-version":"8.7","type":"Project","title":"# TIP 573: Surrogates are invalid","author":["Jan Nijtmans "],"is-jest":false}, - "572":{"url":"./tip/572.md","state":"Draft","tcl-version":"9.0","type":"Project","title":"# TIP 572: Implement a mechanism to specify the procedure/lambda/method argument call types (Evaluation strategy)","author":["Rami Khaldi "],"is-jest":false}, + "573":{"url":"./tip/573.md","state":"Withdrawn","tcl-branch":"tip-573","tcl-version":"8.7","type":"Project","title":"# TIP 573: Surrogates are invalid","author":["Jan Nijtmans "],"is-jest":false}, + "572":{"url":"./tip/572.md","state":"Draft","tcl-version":"9.1","type":"Project","title":"# TIP 572: Implement a mechanism to specify the procedure/lambda/method argument call types (Evaluation strategy)","author":["Rami Khaldi "],"is-jest":false}, "571":{"url":"./tip/571.md","state":"Withdrawn","tcl-version":"8.6","type":"Project","title":"# TIP 571: Make TclX's profiler work properly with Tcl 8.6","author":["Rami Khaldi "],"is-jest":false}, - "570":{"url":"./tip/570.md","keywords":"Tk, bindings","created":"18-Mar-2020","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 570: Gesture Support for Finger Scrolling and \"Pinch to Zoom\"","author":["Harald Oehlmann "],"is-jest":false}, + "570":{"url":"./tip/570.md","keywords":"Tk, bindings","created":"18-Mar-2020","post-history":"","state":"Draft","tk-branch":"pspjuth-touch","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 570: Gesture Support for Finger Scrolling and \"Pinch to Zoom\"","author":["Harald Oehlmann "],"is-jest":false}, "569":{"url":"./tip/569.md","keywords":"lint","state":"Final","vote-summary":"Accepted 8/0/0","type":"Project","author":["Don Porter "],"votes-for":"DP, JD, KK, KW, SL, FV, DF, JN","votes-against":"none","created":"6-Mar-2020","title":"# TIP 569: Eliminate Comments That Serve Lint","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, - "568":{"url":"./tip/568.md","keywords":"bytearray","created":"4-Mar-2020","post-history":"","state":"Draft","tcl-branch":"dgp-properbytearray","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 568: Revise ByteArray Routines To Support Proper Value Extraction","author":["Don Porter "],"is-jest":false}, - "567":{"url":"./tip/567.md","keywords":"Tcl, TclOO, slots","created":"22-Feb-2020","post-history":"","state":"Draft","tcl-branch":"tip-567","tcl-version":"8.7","vote":"In progress","type":"Project","title":"# TIP 567: Add Operation to Support Set-like Slots","author":["Donal K. Fellows "],"is-jest":false}, + "568":{"url":"./tip/568.md","keywords":"bytearray","state":"Final","vote-summary":"Accepted 6/0/1","type":"Project","author":["Don Porter "],"votes-against":"none","votes-for":"DP, KK, JN, SL, AK, KW","created":"4-Mar-2020","title":"# TIP 568: Revise ByteArray Routines To Support Proper Value Extraction","post-history":"","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-568","votes-present":"FV","is-jest":false}, + "567":{"url":"./tip/567.md","keywords":"Tcl, TclOO, slots","state":"Final","vote-summary":"4/0/2","type":"Project","author":["Donal K. Fellows "],"votes-for":"DF, JN, MC, KW","votes-against":"none","created":"22-Feb-2020","title":"# TIP 567: Add Operation to Support Set-like Slots","post-history":"","tcl-branch":"tip-567","vote":"Done","tcl-version":"8.7","votes-present":"DP,SL","is-jest":false}, "566":{"url":"./tip/566.md","keywords":"lset","created":"19-Feb-2020","post-history":"","state":"Withdrawn","tcl-branch":"lset-index","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 566: Index usage in lset","author":["Jan Nijtmans "],"is-jest":false}, "565":{"url":"./tip/565.md","keywords":"Tk canvas","created":"10-Feb-2020","post-history":"","state":"Final","tcl-branch":"bug-3552805fff","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 565: Gracefully ignore non-existent tags in canvas raise/lower","author":["Francois Vogel "],"is-jest":false}, "564":{"url":"./tip/564.md","keywords":"Tk Ttk x11 font size","created":"9-Feb-2020","post-history":"","state":"Final","tcl-branch":"bug-dccd82bdc7","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 564: Specify ttk font sizes in points on X11","author":["Francois Vogel "],"is-jest":false}, "563":{"url":"./tip/563.md","keywords":"Tk, bindings","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","tk-branch":"tip-563-scrollbar-scrollwheel","author":["Harald Oehlmann "],"votes-for":"FV, SL, KK, JD, BG, JN, KW","votes-against":"none","created":"02-Feb-2020","title":"# TIP 563: Scrollwheel on Horizontal Scrollbar Scrolls Without Shift too","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "562":{"url":"./tip/562.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 3/0/4","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"DGP, DKF, JN","created":"31-Jan-2020","title":"# TIP 562: Deprecate channel types 1-4","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"deprecate-channel-type-1-4","votes-present":"FV, KBK, KW, SL","is-jest":false}, - "561":{"url":"./tip/561.md","keywords":"Tk","created":"23-Jan-2020","post-history":"","state":"Draft","tk-branch":"tip-561","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 561: Add console Command to Unix","author":["Eric Taylor "],"is-jest":false}, - "560":{"url":"./tip/560.md","keywords":"Tk, TclOO, configuration, properties, options","created":"23-Jan-2020","post-history":"","state":"Draft","tk-branch":"tip-560","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 560: Megawidget Configure/Property Support","author":["Donal K. Fellows "],"is-jest":false}, + "561":{"url":"./tip/561.md","keywords":"Tk","created":"23-Jan-2020","post-history":"","state":"Draft","tk-branch":"tip-561","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 561: Add console Command to Unix","author":["Eric Taylor "],"is-jest":false}, + "560":{"url":"./tip/560.md","keywords":"Tk, TclOO, configuration, properties, options","created":"23-Jan-2020","post-history":"","state":"Draft","tk-branch":"tip-560","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 560: Megawidget Configure/Property Support","author":["Donal K. Fellows "],"is-jest":false}, "559":{"url":"./tip/559.md","keywords":"Tcl, result","state":"Final","vote-summary":"Accepted 8/0/0","type":"Project","author":["Don Porter "],"votes-against":"none","votes-for":"DP, JD, MC, KW, SL, FV, DF, JN","created":"13-Jan-2020","title":"# TIP 559: Eliminate public routine `Tcl_FreeResult`","post-history":"","tcl-version":"9.0","vote":"Done","tcl-branch":"tip-599","votes-present":"none","is-jest":false}, - "558":{"url":"./tip/558.md","keywords":"Tcl, TclOO, properties","created":"22-Dec-2019","post-history":"","state":"Draft","tcl-branch":"tip-558","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 558: Basic Configure Support for TclOO","author":["Donal K. Fellows "],"is-jest":false}, + "558":{"url":"./tip/558.md","keywords":"Tcl, TclOO, properties","created":"22-Dec-2019","post-history":"","state":"Final","tcl-branch":"tip-558","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 558: Basic Configure Support for TclOO","author":["Donal K. Fellows "],"is-jest":false}, "557":{"url":"./tip/557.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 2/0/3","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"JN, KW","created":"13-Dec-2019","title":"# TIP 557: C++ support for Tcl","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"cplusplus","votes-present":"DGP, FV, SL","is-jest":false}, - "556":{"url":"./tip/556.md","keywords":"Tk","created":"26-Nov-2019","post-history":"","state":"Deferred","tk-branch":"tip-556","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 556: Add oo like widgets to Tk","author":["René Zaumseil "],"is-jest":false}, + "556":{"url":"./tip/556.md","keywords":"Tk","created":"26-Nov-2019","post-history":"","state":"Deferred","tk-branch":"tip-556","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 556: Add oo like widgets to Tk","author":["René Zaumseil "],"is-jest":false}, "555":{"url":"./tip/555.md","created":"19-Nov-2019","obsoleted-by":"584","post-history":"","state":"Withdrawn","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 555: Enable listing of layouts in ttk::Themes","author":["Manfred Rosenberger"],"is-jest":false}, - "554":{"url":"./tip/554.md","created":"14-Nov-2019","post-history":"","state":"Draft","tcl-branch":"tip-554","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 554: Library file system for Tcl and Tk core using an C-based VFS","author":["Sean Woods ","Roy Keene"],"is-jest":false}, - "553":{"url":"./tip/553.md","keywords":"Tk, label, listbox, entry","created":"07-Nov-2019","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 553: Ellipses: the Alternative to Scrolling and Wrapping","author":["Donal K. Fellows "],"is-jest":false}, - "552":{"url":"./tip/552.md","keywords":"Tk, treeview","created":"19-Sep-2019","post-history":"","state":"Draft","tk-branch":"pspjuth-treeview","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 552: Extended treeview functionality.","author":["Peter Spjuth "],"is-jest":false}, + "554":{"url":"./tip/554.md","created":"14-Nov-2019","post-history":"","state":"Draft","tcl-branch":"tip-554","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 554: Library file system for Tcl and Tk core using an C-based VFS","author":["Sean Woods ","Roy Keene"],"is-jest":false}, + "553":{"url":"./tip/553.md","keywords":"Tk, label, listbox, entry","created":"07-Nov-2019","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 553: Ellipses: the Alternative to Scrolling and Wrapping","author":["Donal K. Fellows "],"is-jest":false}, + "552":{"url":"./tip/552.md","keywords":"Tk, treeview","state":"Final","vote-summary":"Accepted 5/0/0","tk-branch":"pspjuth-treeview","type":"Project","author":["Peter Spjuth "],"votes-for":"BG, SL, JN, FV, KW","votes-against":"none","created":"19-Sep-2019","title":"# TIP 552: Extended treeview functionality.","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "551":{"url":"./tip/551.md","keywords":"numbers, readability","state":"Final","vote-summary":"Accepted 6/0/2","vote-against":"none","vote-for":"BG,KW,MC,FV,JN,SL","type":"Project","author":["Eric Taylor "],"created":"16-Sep-2019","title":"# TIP 551: Permit underscore in numerical literals in source code","vote-present":"DP,KK","sponsor":"Brian Griffin ","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-551","is-jest":false}, - "550":{"url":"./tip/550.md","keywords":"Tcl, memory","created":"11-Jun-2019","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 550: Garbage Collection for TclOO","author":["Donal K. Fellows "],"is-jest":false}, - "549":{"url":"./tip/549.md","keywords":"Tcl","created":"7-June-2019","post-history":"","state":"Draft","tcl-branch":"tip-549","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 549: Make configure --enable-64bit the default","discussions-to":"Tcl Core list","author":["Jan Nijtmans ","Jan Nijtmans "],"is-jest":false}, + "550":{"url":"./tip/550.md","keywords":"Tcl, memory","created":"11-Jun-2019","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 550: Garbage Collection for TclOO","author":["Donal K. Fellows "],"is-jest":false}, + "549":{"url":"./tip/549.md","keywords":"Tcl","created":"7-June-2019","post-history":"","state":"Withdrawn","tcl-branch":"tip-549","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 549: Make configure --enable-64bit the default","discussions-to":"Tcl Core list","author":["Jan Nijtmans ","Jan Nijtmans "],"is-jest":false}, "548":{"url":"./tip/548.md","keywords":"Tcl","state":"Final","type":"Project","author":["Jan Nijtmans ","Jan Nijtmans "],"votes-against":"none","votes-for":"JN, DKF, KW, KBK","vote-results":"4/2/0 accepted","created":"3-June-2019","title":"# TIP 548:Support `wchar_t` conversion functions and deprecate `Tcl_WinUtfToTChar()` and `Tcl_WinTCharToUtf()`","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-548","votes-present":"DGP, SL","discussions-to":"Tcl Core list","is-jest":false}, "547":{"url":"./tip/547.md","keywords":"Tcl","created":"31-May-2019","post-history":"","state":"Final","tcl-branch":"tip-547","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 547: New encodings: UTF-16, UCS-2","discussions-to":"Tcl Core list","author":["Jan Nijtmans ","Jan Nijtmans "],"is-jest":false}, "546":{"url":"./tip/546.md","keywords":"Tcl, traces","created":"20-May-2019","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 546: Typedefs to Support Source-Compatible Migration","author":["Don Porter "],"is-jest":false}, "545":{"url":"./tip/545.md","keywords":"Tk, image","state":"Final","type":"Project","tk-branch":"tip-545-svg-options","author":["Harald Oehlmann "],"vote-results":"6/0/0 accepted","votes-for":"BG, DKF, FV, KW, JN, MC","votes-against":"none","created":"19-May-2019","title":"# TIP 545: image photo SVG options: remove -unit and add target height/width option","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "544":{"url":"./tip/544.md","keywords":"Tcl","created":"15-May-2019","post-history":"","state":"Final","tcl-branch":"tip-544","vote":"Done","tcl-version":"8.7","type":"Project","title":"# TIP 544: Export TclGetIntForIndex()","discussions-to":"Tcl Core list","author":["Jan Nijtmans ","François Vogel "],"is-jest":false}, "543":{"url":"./tip/543.md","keywords":"Tcl, traces","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","author":["Don Porter "],"votes-against":"none","votes-for":"DP, JD, MC, KW, SL, KK, FV, DF, JN","created":"10-May-2019","title":"# TIP 543: Eliminate `TCL_INTERP_DESTROYED` flag value","post-history":"","tcl-version":"9.0","vote":"Done","tcl-branch":"tip-543-9","votes-present":"none","is-jest":false}, "542":{"url":"./tip/542.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","author":["Jan Nijtmans ","Jan Nijtmans "],"votes-against":"none","votes-for":"FV, JN, KBK, KW, MC, SL","created":"10-May-2019","title":"# TIP 542:Support for switchable Full Unicode support","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"utf-max","votes-present":"none","discussions-to":"Tcl Core list","is-jest":false}, "541":{"url":"./tip/541.md","keywords":"Tcl","created":"8-May-2019","post-history":"","state":"Final","tcl-branch":"bug-2858503fff","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 541: Add support for 'end' index in ttk::combobox current","author":["Francois Vogel "],"is-jest":false}, - "540":{"url":"./tip/540.md","keywords":"Tcl, Unix, pipeline","created":"03-May-2019","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 540: Add -signal Channel Configure Option to POSIX Pipes","author":["Donal K. Fellows "],"is-jest":false}, + "540":{"url":"./tip/540.md","keywords":"Tcl, Unix, pipeline","created":"03-May-2019","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 540: Add -signal Channel Configure Option to POSIX Pipes","author":["Donal K. Fellows "],"is-jest":false}, "539":{"url":"./tip/539.md","tcl-ticket":"2370575","keywords":"Tcl, dict filter, set intersection","created":"27-Nov-2008","obsoleted-by":"341","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 539: Multiple dict filter patterns","author":["Lars Hellström "],"is-jest":false}, "538":{"url":"./tip/538.md","keywords":"Tcl","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","vote-results":"5/0/0 accepted","votes-for":"JN, KBK, KW, MC, SL","created":"9-April-2019","title":"# TIP 538: Externalize libtommath","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"digit-bit-60","votes-present":"none","is-jest":false}, "537":{"url":"./tip/537.md","keywords":"Tcl","created":"7-April-2019","post-history":"","state":"Final","tcl-branch":"regexp-api-64bit","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 537: Enable 64-bit indexes in regexp matching","author":["Jan Nijtmans "],"is-jest":false}, "536":{"url":"./tip/536.md","keywords":"Tk","state":"Final","type":"Project","tk-branch":"mac_services","author":["Kevin Walzer "],"votes-for":"DKF, BG, JN, SL, AK","votes-against":"none","created":"29-March-2019","title":"# TIP 536: Improvements to Mac-specific IPC in Tk","post-history":"","vote":"Done","tcl-version":"8.6","votes-present":"KBK, FV","is-jest":false}, "535":{"url":"./tip/535.md","keywords":"Tcl","created":"10-March-2019","post-history":"","state":"Final","tcl-branch":"scale-tick-format","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 535: Remove trailing zeroes in scale ticks","author":["François Vogel "],"is-jest":false}, - "534":{"url":"./tip/534.md","keywords":"Tcl","created":"02-March-2019","post-history":"","state":"Draft","tcl-branch":"dkf-experimental-fast-number-hash","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 534: Faster Hashing of Small Integers","author":["Donal K. Fellows "],"is-jest":false}, + "534":{"url":"./tip/534.md","keywords":"Tcl","created":"02-March-2019","post-history":"","state":"Draft","tcl-branch":"dkf-experimental-fast-number-hash","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 534: Faster Hashing of Small Integers","author":["Donal K. Fellows "],"is-jest":false}, "533":{"url":"./tip/533.md","keywords":"Tk, menubutton","":"","[menu man page](https":"//www.tcl.tk/man/tcl/TkCmd/menu.htm).","state":"Final","type":"Project","tk-branch":"bug-70e531918e","author":["Marc Culler"],"three arguments":"two coordinates and an index. That function uses the","[70e531918e](https":"//core.tcl-lang.org/tk/tktview/70e531918e6d99cbdd8b527386fec15872c64216).","created":"13-Jan-2019","by calling ":":tk::PostOverPoint which, like the proposed extension, accepts","a method [nsmenu popupmenupositioningitem":"atLocation:inView] which draws the","title":"# TIP 533: Extension of the menu post command","the [bug-70e531918e](https":"//core.tcl-lang.org/tk/timeline?r=bug-70e531918e)","post-history":"","vote":"Done","tcl-version":"8.6","is-jest":false}, "532":{"url":"./tip/532.md","manual (`man bind`) says":"","moreover the following issues have been solved":"","":"","keywords":"Tk, bind, event, event loop","this has been observed in applications [scid](http":"//scid.sourceforge.net), and","state":"Final","says (`man bind`)":"","type":"Project","tk-branch":"bug6e8afe516d","author":["Gregor Cramer "],"(same with applications [scid](http":"//scid.sourceforge.net), and","5. legacy implementation cannot handle homogeneous equal sequences properly, see this script":"","votes-for":"DKF, BG, KBK, JN, FV, SL","votes-against":"none","2. immediately after startup of application [scidb](http":"//scidb.sourceforge.net)","created":"09-Jan-2019","title":"# TIP 532: Re-implementation of event loop processing","how to choose the most specific binding, has to be changed":"","4. see following code":"","can be expressed in a different way":"","this problem occurs often in application [scidb](http":"//scidb.sourceforge.net),","post-history":"","vote":"Done","tcl-version":"8.6","[scid vs pc](http":"//scidvspc.sourceforge.net).","the following problems, caused by event ring overflow, have been solved":"","votes-present":"DGP, AK","is-jest":false}, - "531":{"url":"./tip/531.md","keywords":"Tcl, stubs","":"","state":"Draft","type":"Project","author":["Shannon Noe "],"created":"14-Dec-2018","title":"# TIP 531: Static Tcl Interpreter Creation Function","post-history":"","vote":"Pending","tcl-version":"8.7","tcl-branch":"tip-531","/usr/local/include/tcl8.6/tcldecls.h":"#define Tcl_CreateInterp \\","is-jest":false}, + "531":{"url":"./tip/531.md","":"","keywords":"Tcl, stubs","state":"Rejected","vote-summary":"Rejected 0/4/1","type":"Project","author":["Shannon Noe "],"votes-against":"JN, KBK, KW, MC","votes-for":"none","created":"14-Dec-2018","title":"# TIP 531: Static Tcl Interpreter Creation Function","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-531","/usr/local/include/tcl8.6/tcldecls.h":"#define Tcl_CreateInterp \\","votes-present":"BG","is-jest":false}, "530":{"url":"./tip/530.md","created":"13-Dec-2018","post-history":"","state":"Draft","tcl-branch":"tip-530","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 530: Control over performance impact of TIP 280","author":["Leon Manukyan "],"is-jest":false}, - "529":{"url":"./tip/529.md","keywords":"Tk, image","created":"07-Dec-2018","state":"Draft","tk-branch":"tip-529-image-metadata","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 529: Add metadata dict property to tk photo image","author":["Harald Oehlmann "],"is-jest":false}, + "529":{"url":"./tip/529.md","keywords":"Tk, image","state":"Final","vote-summary":"Accepted 7/0/1","tk-branch":"tip529-image-metadata-no-match-method","type":"Project","author":["Harald Oehlmann "],"votes-for":"AK, FV, JD, JN, KW, MC, SL","votes-against":"None","created":"07-Dec-2018","title":"# TIP 529: Add metadata dictionary property to tk photo image","vote":"Done","tcl-version":"8.7","votes-present":"KK","is-jest":false}, "528":{"url":"./tip/528.md","state":"Final","type":"Project","tk-branch":"offsetof","author":["Jan Nijtmans "],"votes-for":"DKF, BG, KBK, JN, DGP, FV, SL, AK","votes-against":"none","created":"05-Dec-2018","title":"# TIP 528: Deprecate Tk_Offset()","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "527":{"url":"./tip/527.md","state":"Final","type":"Project","author":["Sergey G. Brester "],"votes-against":"None","vote-results":"5/0 accepted","votes-for":"KBK, DKF, AK, SL, FV","created":"26-Nov-2018","title":"# TIP 527: New measurement facilities in TCL: New command timerate","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"sebres-8-6-timerate","discussions-to":"news:comp.lang.tcl","is-jest":false}, - "526":{"url":"./tip/526.md","created":"08-Nov-2018","post-history":"","state":"Draft","tcl-branch":"tip-526","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 526: Make [expr] Only Accept One Argument","author":["Donal K. Fellows "],"is-jest":false}, + "526":{"url":"./tip/526.md","created":"08-Nov-2018","post-history":"","state":"Draft","tcl-branch":"tip-526","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 526: Make [expr] Only Accept One Argument","author":["Donal K. Fellows "],"is-jest":false}, "525":{"url":"./tip/525.md","keywords":"Tcl, testing, continuous integration","state":"Final","type":"Project","author":["Donal K. Fellows "],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"24-Oct-2018","title":"# TIP 525: Make Tcltest Report Overall Success in a Machine-Readable Way","post-history":"","vote":"Done","tcl-version":"8.5","votes-present":"none","is-jest":false}, "524":{"url":"./tip/524.md","keywords":"Tcl, object orientation, customization","state":"Final","vote-summary":"Accepted 2/0/4","type":"Project","author":["Donal K. Fellows "],"votes-against":"none","votes-for":"DKF, JN","created":"23-Oct-2018","title":"# TIP 524: Custom Definition Dialects for TclOO","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-524","votes-present":"BG, KBK, FV, SL","is-jest":false}, "523":{"url":"./tip/523.md","keywords":"queue, stack, pop","state":"Final","vote-summary":"Accepted 7/0/0","type":"Project","author":["Peter Spjuth "],"votes-against":"none","votes-for":"DKF, BG, KBK, JN, DGP, FV, SL","created":"22-Oct-2018","title":"# TIP 523: New lpop command","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-523","votes-present":"none","is-jest":false}, "522":{"url":"./tip/522.md","keywords":"tcltest, error codes","state":"Final","type":"Project","author":["Peter Spjuth "],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"22-Oct-2018","title":"# TIP 522: Test error codes with Tcltest","post-history":"","tcl-branch":"tip-522","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "521":{"url":"./tip/521.md","keywords":"Tcl, floating point, NaN, not a number","state":"Final","type":"Project","author":["Kevin B. Kenny "],"votes-for":"DKF, BG, KBK, JN, DGP, FV, AK","votes-against":"none","created":"21 October 2018","title":"# TIP 521: Floating Point Classification Functions","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-521","votes-present":"SL","is-jest":false}, - "520":{"url":"./tip/520.md","keywords":"Tcl, floating point, NaN, not a number","created":"18 October 2018","post-history":"","state":"Draft","tcl-branch":"tip-520","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 520: Make NaN Quiet","author":["Kevin B. Kenny "],"is-jest":false}, + "520":{"url":"./tip/520.md","keywords":"Tcl, floating point, NaN, not a number","created":"18 October 2018","post-history":"","state":"Draft","tcl-branch":"tip-520","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 520: Make NaN Quiet","author":["Kevin B. Kenny "],"is-jest":false}, "519":{"url":"./tip/519.md","":"","keywords":"TclOO","state":"Final","vote-summary":"Accepted 4/0/2","this tip proposes to extend the `method` subcommand of the `oo":":define` command","type":"Project","author":["Pietro Cerutti "],"votes-against":"none","votes-for":"DKF, KBK, JN, SL","follows":"","oo":":define RPCClient {","created":"18-Oct-2018","title":"# TIP 519: Inline export/unexport option to TclOO method definition","the class definition in the previous example would then be as follows":"","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-519","votes-present":"BG, FV","is-jest":false}, "518":{"url":"./tip/518.md","keywords":"Tk","state":"Final","vote-summary":"Accepted 6/0/0","type":"Project","tk-branch":"tip518-event-last-child-unmanaged","author":["Harald Oehlmann "],"votes-against":"none","votes-for":"DKF, BG, KBK, JN, FV, SL","created":"22-Sep-2018","title":"# TIP 518: Virtual Event when Last Child is not Managed any more","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "517":{"url":"./tip/517.md","keywords":"tk menu","created":"13-Sept-2018","post-history":"","state":"Final","tk-branch":"tip-517","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 517: Add -activerelief Configuration Option to the menu widget","author":["François Vogel "],"is-jest":false}, "516":{"url":"./tip/516.md","keywords":"Tcl, TclOO","state":"Final","type":"Project","author":["Donal K. Fellows "],"vote-results":"4/0/5 accepted","votes-for":"DKF, JN, JD, AK","votes-against":"none","created":"7-Sept-2018","title":"# TIP 516: More OO Slot Operations","post-history":"","tcl-branch":"tip-516","vote":"Done","tcl-version":"8.7","votes-present":"BG, KBK, DGP, FV, SL","is-jest":false}, "515":{"url":"./tip/515.md","state":"Final","type":"Project","author":["Jan Nijtmans "],"vote-results":"8/0/1 accepted","votes-for":"DKF, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"7-Sept-2018","title":"# TIP 515: Level Value Reform","post-history":"","tcl-branch":"tip-515","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false}, - "514":{"url":"./tip/514.md","keywords":"Tcl","created":"20-Aug-2018","post-history":"","state":"Final","tcl-branch":"tip-514","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 514: Platform differences in handling int/wide","author":["Jan Nijtmans "],"is-jest":false}, - "513":{"url":"./tip/513.md","keywords":"Tcl,data structure","created":"02-Aug-2017","post-history":"","state":"Draft","implementation-url":"https://core.tcl-lang.org/tips/doc/trunk/attach/513/agendas.tcl","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 513: Better support for 'agendas' as arrays, dictionaries or lists","author":["Florian Murr "],"is-jest":false}, + "514":{"url":"./tip/514.md","keywords":"Tcl","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","vote-results":"3/0/2 accepted","votes-for":"DKF, JN, KBK","created":"20-Aug-2018","title":"# TIP 514: Platform differences in handling int/wide","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-514","votes-present":"JD, SL","is-jest":false}, + "513":{"url":"./tip/513.md","keywords":"Tcl,data structure","created":"02-Aug-2017","post-history":"","state":"Draft","implementation-url":"https://core.tcl-lang.org/tips/doc/main/attach/513/agendas.tcl","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 513: Better support for 'agendas' as arrays, dictionaries or lists","author":["Florian Murr "],"is-jest":false}, "512":{"url":"./tip/512.md","keywords":"Tcl","created":"25-June-2018","post-history":"","state":"Final","tcl-branch":"tip-512","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 512: No stub for Tcl_SetExitProc()","author":["Jan Nijtmans "],"is-jest":false}, - "511":{"url":"./tip/511.md","keywords":"Tcl,threads","state":"Accepted","type":"Project","author":["Christian Werner "],"vote-results":"4/0/5 accepted","votes-for":"DKF, BG, KBK, JN, JD, SL","votes-against":"none","created":"14-June-2018","title":"# TIP 511: Implement Tcl_AsyncMarkFromSignal()","post-history":"","implementation-url":"https://www.androwish.org/index.html/info/40790af1e8e4ec9f","vote":"Done","tcl-version":"8.7","votes-present":"DGP, FV, AK","is-jest":false}, - "510":{"url":"./tip/510.md","":"might be to just co-distribute, just as TDBC is with Tcl","keywords":"Tk","state":"Deferred","vote-summary":"Rejected 1/3/1","type":"Project","tk-branch":"tip-510","author":["René Zaumseil "],"votes-against":"KBK, JN, FV","votes-for":"DKF","created":"5-Jun-2018","vote-comments":"code not yet ready, needs porting to macOS; alternate","title":"# TIP 510: Add Rbc and Tkpath widgets to Tk","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false}, + "511":{"url":"./tip/511.md","keywords":"Tcl,threads","state":"Final","type":"Project","author":["Christian Werner "],"votes-against":"none","vote-results":"4/0/5 accepted","votes-for":"DKF, BG, KBK, JN, JD, SL","created":"14-June-2018","title":"# TIP 511: Implement Tcl_AsyncMarkFromSignal()","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-511","votes-present":"DGP, FV, AK","is-jest":false}, + "510":{"url":"./tip/510.md","":"might be to just co-distribute, just as TDBC is with Tcl","keywords":"Tk","state":"Deferred","vote-summary":"Rejected 1/3/1","type":"Project","tk-branch":"tip-510","author":["René Zaumseil "],"votes-against":"KBK, JN, FV","votes-for":"DKF","created":"5-Jun-2018","vote-comments":"code not yet ready, needs porting to macOS; alternate","title":"# TIP 510: Add Rbc and Tkpath widgets to Tk","post-history":"","vote":"Done","tcl-version":"9.0","votes-present":"BG","is-jest":false}, "509":{"url":"./tip/509.md","keywords":"Tcl,threads","state":"Final","type":"Project","author":["Frédéric Bonnet "],"vote-results":"8/0/1 accepted","votes-for":"DKF, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"24-May-2018","title":"# TIP 509: Implement reentrant mutexes on all platforms","post-history":"","tcl-branch":"tip-509","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false}, "508":{"url":"./tip/508.md","keywords":"Tcl,array","state":"Final","type":"Project","author":["Frédéric Bonnet "],"vote-results":"9/0/0 accepted","votes-for":"DKF, BG, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"13-May-2018","title":"# TIP 508: New subcommand [array default]","post-history":"","tcl-branch":"tip-508","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "507":{"url":"./tip/507.md","keywords":"Tk","state":"Final","type":"Project","tk-branch":"tip-507","author":["René Zaumseil "],"votes-for":"DKF, JN, FV, SL, AK","votes-against":"none","created":"9-May-2018","title":"# TIP 507: Include simple SVG support with nanosvg","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "506":{"url":"./tip/506.md","state":"Final","vote-summary":"Accepted 5/0/1","type":"Project","author":["Don Porter "],"votes-for":"DKF, KBK, JN, DGP, SL","votes-against":"none","created":"30-Mar-2018","title":"# TIP 506: Purge RefCount Macros","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-506","votes-present":"BG, FV","is-jest":false}, "505":{"url":"./tip/505.md","state":"Final","type":"Project","author":["Don Porter "],"vote-results":"8/0/1 accepted","votes-for":"DKF, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"26-Mar-2018","title":"# TIP 505: Make [lreplace] Accept All Out-of-Range Index Values","post-history":"","tcl-branch":"tip-505","vote":"Done","tcl-version":"8.6.9","votes-present":"BG","is-jest":false}, "504":{"url":"./tip/504.md","keywords":"Tcl,string,insert","state":"Final","type":"Project","author":["Don Porter "],"votes-against":"none","votes-for":"DKF, JN, DGP, FV, SL, AK","created":"21-Mar-2018","obsoletes":"475","title":"# TIP 504: New subcommand [string insert]","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"dgp-string-insert","votes-present":"none","is-jest":false}, "503":{"url":"./tip/503.md","created":"05-Feb-2018","post-history":"","state":"Final","tcl-branch":"tip-503","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 503: End Tcl 8.3 Source Compatibility Support","author":["Don Porter "],"is-jest":false}, - "502":{"url":"./tip/502.md","created":"26-Feb-2018","post-history":"","state":"Final","tcl-branch":"tip-502","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 502: Index Value Reform","author":["Don Porter "],"is-jest":false}, + "502":{"url":"./tip/502.md","state":"Final","type":"Project","author":["Don Porter "],"vote-results":"5/0/0 accepted","votes-for":"DKF, JN, JD, KBK, SL","votes-against":"none","created":"26-Feb-2018","title":"# TIP 502: Index Value Reform","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-502","votes-present":"none","is-jest":false}, "501":{"url":"./tip/501.md","keywords":"Tcl,string","state":"Final","vote-summary":"Accepted 5/0/1","type":"Project","author":["Sean Woods "],"votes-against":"none","votes-for":"DKF, KBK, JN, FV, SL","created":"12-Feb-2018","title":"# TIP 501: string is dict","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-501","votes-present":"BG","is-jest":false}, "500":{"url":"./tip/500.md","keywords":"Tcl, object orientation, visibility","state":"Final","type":"Project","author":["Donal K. Fellows "],"votes-for":"DKF, JN, AF, JD, SL, AK, KBK","votes-against":"none","created":"10-Feb-2018","title":"# TIP 500: Private Methods and Variables in TclOO","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-500","is-jest":false}, "499":{"url":"./tip/499.md","keywords":"msgcat, oo","created":"07-Dec-2017","post-history":"","state":"Final","tcl-branch":"tip499-msgcat-custom-preferences","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 499: Custom locale search list for msgcat","author":["Harald Oehlmann "],"is-jest":false}, - "498":{"url":"./tip/498.md","keywords":"tcl","created":"18-Jan-2016","post-history":"","state":"Draft","tcl-branch":"bug-e593adf103-core-8","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 498: Simplify Tcl_DeleteNamespace","author":["Nathan Coulter "],"is-jest":false}, + "498":{"url":"./tip/498.md","keywords":"tcl","created":"18-Jan-2016","post-history":"","state":"Draft","tcl-branch":"bug-e593adf103-core-8","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 498: Simplify Tcl_DeleteNamespace","author":["Nathan Coulter "],"is-jest":false}, "497":{"url":"./tip/497.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 6/0/1","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"DKF, FV, JN, KBK, KW, SL","created":"23-Jan-2018","title":"# TIP 497: Full support for Unicode planes 1-16.","post-history":"","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-497","votes-present":"DGP","discussions-to":"Tcl Core list","is-jest":false}, "496":{"url":"./tip/496.md","keywords":"Tk","created":"17-Jan-2018","post-history":"","state":"Final","tk-branch":"tip-496","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 496: Display hints in ::entry ::spinbox ::ttk::entry ::ttk::spinbox and ::ttk::combobox","author":["René Zaumseil ","François Vogel "],"is-jest":false}, - "495":{"url":"./tip/495.md","keywords":"Tcl,build system,extension building","created":"14-Jan-2018","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 495: Tcl Based Build System for TEA projects","author":["Sean Woods "],"is-jest":false}, - "494":{"url":"./tip/494.md","keywords":"tcl","created":"29-Dec-2017","post-history":"","state":"Final","tcl-branch":"memory-API","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 494: More use of size_t in Tcl 9","author":["Jan Nijtmans "],"is-jest":false}, + "495":{"url":"./tip/495.md","keywords":"Tcl,build system,extension building","created":"14-Jan-2018","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 495: Tcl Based Build System for TEA projects","author":["Sean Woods "],"is-jest":false}, + "494":{"url":"./tip/494.md","keywords":"tcl","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","vote-results":"3/0/2 accepted","votes-for":"DKF, JN, KBK","created":"29-Dec-2017","title":"# TIP 494: More use of size_t/ptrdiff_t in Tcl 9","post-history":"","vote":"Done","tcl-version":"9.0","tcl-branch":"memory-API","votes-present":"JD, SL","is-jest":false}, "493":{"url":"./tip/493.md","created":"29-Dec-2017","post-history":"","state":"Final","tcl-branch":"tip-493","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 493: Cease Distribution of http 1.0","author":["Don Porter "],"is-jest":false}, "492":{"url":"./tip/492.md","keywords":"tk busy","created":"19-Dec-2017","post-history":"","state":"Final","tk-branch":"tip-492","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 492: Introspection for 'tk busy'","author":["François Vogel "],"is-jest":false}, "491":{"url":"./tip/491.md","keywords":"threads","created":"11-Dec-2017","post-history":"","state":"Final","tcl-branch":"tip-491","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 491: Threading Support: phasing out non-threaded builds","author":["Jan Nijtmans "],"is-jest":false}, "490":{"url":"./tip/490.md","keywords":"msgcat, oo","created":"07-Dec-2017","post-history":"","state":"Final","tcl-branch":"tip490-msgcat-oo-2","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 490: msgcat for TclOO","author":["Harald Oehlmann "],"is-jest":false}, "489":{"url":"./tip/489.md","keywords":"canvas, image","created":"02-Dec-2017","post-history":"","state":"Final","tk-branch":"canvas_image","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 489: Add image widget command to the Tk canvas","author":["Scott Pitcher "],"is-jest":false}, @@ -107,53 +210,53 @@ "486":{"url":"./tip/486.md","created":"13-Nov-2017","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 486: Thread 3.0 is for Tcl 9","author":["Jan Nijtmans "],"is-jest":false}, "485":{"url":"./tip/485.md","created":"08-Nov-2017","post-history":"","state":"Final","tcl-branch":"tip-485","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 485: Remove Deprecated API","author":["Jan Nijtmans "],"is-jest":false}, "484":{"url":"./tip/484.md","keywords":"Tcl","created":"06-Nov-2017","post-history":"","state":"Final","tcl-branch":"no-wideint","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 484: Merge 'int' and 'wideInt' Obj-type to a single 'int'","author":["Jan Nijtmans "],"is-jest":false}, "483":{"url":"./tip/483.md","keywords":"Tk, configuration","created":"03-Nov-2017","post-history":"","state":"Final","tk-branch":"tk-stu-pkg","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 483: Improved TIP #59 implementation for Tk","author":["Stuart Cassoff "],"is-jest":false}, "482":{"url":"./tip/482.md","keywords":"Tk, demos, configuration","created":"03-Nov-2017","post-history":"","state":"Final","tk-branch":"tk-stu-pkg","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 482: Record Tk demo directory information","author":["Stuart Cassoff "],"is-jest":false}, - "481":{"url":"./tip/481.md","keywords":"Tcl","created":"27-Oct-2017","post-history":"","state":"Draft","tcl-branch":"tip-481","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 481: `Tcl_GetStringFromObj()` with `size_t` length parameter","author":["Jan Nijtmans "],"is-jest":false}, - "480":{"url":"./tip/480.md","keywords":"assertion, pragma, type, alias, compilation","created":"25-Oct-2017","post-history":"","state":"Draft","tcl-branch":"tip-480","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 480: Type and Alias Assertions for Tcl","author":["Kevin B. Kenny "],"is-jest":false}, - "479":{"url":"./tip/479.md","keywords":"Tcl,procedure,argument handling","created":"23-Oct-2017","post-history":"","state":"Draft","tcl-branch":"tip479","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 479: Add Named Procedures as a New Command in Tcl (dictargs::proc)","author":["Sean Woods "],"is-jest":false}, + "481":{"url":"./tip/481.md","keywords":"Tcl","state":"Final","vote-summary":"Accepted 4/0/2","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"JN, KW, KK, MC","created":"27-Oct-2017","title":"# TIP 481: `Tcl_GetStringFromObj()` with `ptrdiff_t` length parameter","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-481","votes-present":"FV, SL","is-jest":false}, + "480":{"url":"./tip/480.md","keywords":"assertion, pragma, type, alias, compilation","created":"25-Oct-2017","post-history":"","state":"Draft","tcl-branch":"tip-480","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 480: Type and Alias Assertions for Tcl","author":["Kevin B. Kenny "],"is-jest":false}, + "479":{"url":"./tip/479.md","keywords":"Tcl,procedure,argument handling","created":"23-Oct-2017","post-history":"","state":"Draft","tcl-branch":"tip479","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 479: Add Named Procedures as a New Command in Tcl (dictargs::proc)","author":["Sean Woods "],"is-jest":false}, "478":{"url":"./tip/478.md","keywords":"Tcl","state":"Final","type":"Project","author":["Gerald Lester ","Donal K. Fellows "],"votes-for":"DKF, AK, JD, SL, JN","votes-against":"none","created":"18-Oct-2017","title":"# TIP 478: Add Expected Class Level Behaviors to oo::class","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-478","is-jest":false}, "477":{"url":"./tip/477.md","keywords":"Windows nmake build","created":"30-Sep-2017","post-history":"","state":"Final","tcl-branch":"vc-reform","tcl-version":"8.6.8","vote":"Done","type":"Project","title":"# TIP 477: Modernize the nmake build system","author":["Ashok P. Nadkarni "],"is-jest":false}, "476":{"url":"./tip/476.md","keywords":"scan, printf","created":"27-Sep-2017","post-history":"PM","state":"Final","tcl-branch":"z_modifier","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 476: Scan/Printf format consistency","author":["Jan Nijtmans (jan.nijtmans@gmail.com)"],"is-jest":false}, "475":{"url":"./tip/475.md","keywords":"Tcl,string,insert","created":"22-Sep-2017","post-history":"","state":"Rejected","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 475: Add [string insert] Command and C API","author":["Andy Goth (andrew.m.goth@gmail.com)"],"is-jest":false}, "474":{"url":"./tip/474.md","keywords":"Tk, events","state":"Final","vote-summary":"Accepted 7/0/2","tk-branch":"tip474","type":"Project","author":["Arjen Markus ","Jan Nijtmans "],"votes-for":"BG, DKF, FV, JN, KW, MC, SL","votes-against":"none","created":"25-Aug-2017","title":"# TIP 474: Treat the mouse wheel events in a uniform way","post-history":"PM","vote":"Done","tcl-version":"8.7","votes-present":"DGP, KBK","is-jest":false}, "473":{"url":"./tip/473.md","keywords":"Tcl, missing functionality, bugfix","created":"06-Jun-2017","post-history":"","state":"Final","tcl-branch":"oo-copy-ns","vote":"Done","tcl-version":"8.6.7","type":"Project","title":"# TIP 473: Allow a Defined Target Namespace in oo::copy","author":["Donal Fellows "],"is-jest":false}, "472":{"url":"./tip/472.md","created":"25-May-2017","post-history":"","state":"Final","tcl-branch":"bsg-0d-radix-prefix","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 472: Add Support for 0d Radix Prefix to Integer Literals","author":["Venkat Iyer ","Brian Griffin "],"is-jest":false}, - "471":{"url":"./tip/471.md","":"rethink it (talk to TCT to help resolve)","state":"Draft","vote-summary":"Rejected 2/2/3","type":"Project","author":["Mathieu Lafon "],"votes-for":"DKF, JN","votes-against":"KBK, DGP","created":"05-May-2017","vote-comments":"feature provides insufficient information to be useful,","title":"# TIP 471: Add [info linkedname] Introspection Command","post-history":"","tcl-version":"8.7","vote":"Done","tcl-branch":"info-linkedname","votes-present":"BG, FV, SL","is-jest":false}, + "471":{"url":"./tip/471.md","":"rethink it (talk to TCT to help resolve)","state":"Draft","vote-summary":"Rejected 2/2/3","type":"Project","author":["Mathieu Lafon "],"votes-for":"DKF, JN","votes-against":"KBK, DGP","created":"05-May-2017","vote-comments":"feature provides insufficient information to be useful,","title":"# TIP 471: Add [info linkedname] Introspection Command","post-history":"","tcl-version":"9.1","vote":"Done","tcl-branch":"info-linkedname","votes-present":"BG, FV, SL","is-jest":false}, "470":{"url":"./tip/470.md","keywords":"TclOO, metaprogramming","created":"23-Apr-2017","post-history":"","state":"Final","tcl-branch":"tip-470","vote":"Done","tcl-version":"8.7","type":"Project","title":"# TIP 470: Reliable Access to OO Definition Context Object","author":["Donal Fellows "],"is-jest":false}, - "469":{"url":"./tip/469.md","keywords":"Tcl,event handling","created":"16-Apr-2017","post-history":"","state":"Draft","tcl-branch":"tip-469","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 469: A Callback for Channel-Exception Conditions","author":["Andreas Leitgeb "],"is-jest":false}, - "468":{"url":"./tip/468.md","keywords":"Tcl, socket, SOMAXCONN","created":"03-Apr-2017","post-history":"","state":"Draft","tcl-branch":"tip-468","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 468: Support Passing TCP listen Backlog Size Option to TCP Socket Creation","author":["Shannon Noe "],"is-jest":false}, + "469":{"url":"./tip/469.md","keywords":"Tcl,event handling","created":"16-Apr-2017","post-history":"","state":"Draft","tcl-branch":"tip-469","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 469: A Callback for Channel-Exception Conditions","author":["Andreas Leitgeb "],"is-jest":false}, + "468":{"url":"./tip/468.md","keywords":"Tcl, socket, SOMAXCONN","state":"Final","vote-summary":"Accepted 3/0/0","type":"Project","author":["Shannon Noe "],"votes-against":"none","votes-for":"JN, KBK, KW, SL","created":"03-Apr-2017","title":"# TIP 468: Support Passing TCP listen Backlog Size Option to TCP Socket Creation","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-468","votes-present":"none","is-jest":false}, "467":{"url":"./tip/467.md","keywords":"migration","created":"14-Mar-2017","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 467: Move TIP Collection to Fossil","author":["Mark Janssen "],"is-jest":false}, - "466":{"url":"./tip/466.md","keywords":"Tk,text widget","created":"10-Mar-2017","post-history":"","state":"Draft","tk-branch":"revised_text","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 466: Revised Implementation of the Text Widget","author":["François Vogel ","Gregor Cramer "],"is-jest":false}, - "465":{"url":"./tip/465.md","created":"03-Mar-2017","post-history":"","state":"Draft","tcl-branch":"tip-465","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 465: Change Rule 8 of the Dodekalogue to Cut Some Corner Cases","author":["Andreas Leitgeb "],"is-jest":false}, + "466":{"url":"./tip/466.md","keywords":"Tk,text widget","created":"10-Mar-2017","post-history":"","state":"Draft","tk-branch":"revised_text","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 466: Revised Implementation of the Text Widget","author":["François Vogel ","Gregor Cramer "],"is-jest":false}, + "465":{"url":"./tip/465.md","state":"Final","type":"Project","author":["Andreas Leitgeb "],"vote-results":"4/0/0 accepted","votes-for":"FV, KW, JN, SL","votes-against":"none","created":"03-Mar-2017","title":"# TIP 465: Change Rule 8 of the Dodekalogue to Cut Some Corner Cases","post-history":"","vote":"Done","tcl-version":"9.0","tcl-branch":"tip-465","votes-present":"none","is-jest":false}, "464":{"url":"./tip/464.md","keywords":"Tk,keyboard,keycode","created":"28-Jan-2017","post-history":"","state":"Final","tcl-branch":"tip-464","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 464: Support for Multimedia Keys on Windows","author":["Ralf Fassel ","Andreas Leitgeb "],"is-jest":false}, "463":{"url":"./tip/463.md","keywords":"Tcl, regular expression","created":"11-Feb-2017","post-history":"","state":"Final","tcl-branch":"tip-463","vote":"Done","tcl-version":"8.7","type":"Project","title":"# TIP 463: Command-Driven Substitutions for regsub","author":["Donal Fellows "],"is-jest":false}, "462":{"url":"./tip/462.md","created":"23-Jan-2017","post-history":"","state":"Final","tcl-branch":"tip-462","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 462: Add New [::tcl::process] Ensemble for Subprocess Management","author":["Frédéric Bonnet "],"is-jest":false}, "461":{"url":"./tip/461.md","keywords":"Tcl,expression","state":"Final","type":"Project","author":["Kevin B Kenny ","Kevin B Kenny ","Kevin Kenny "],"votes-for":"DKF, BG, KBK, JN, DGP, FV, SL, AK","votes-against":"none","created":"24-Jan-2017","title":"# TIP 461: Separate Numeric and String Comparison Operators","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-461","votes-present":"none","is-jest":false}, - "460":{"url":"./tip/460.md","keywords":"Tcl,variable,link,upvar","created":"08-Dec-2016","post-history":"","state":"Draft","tcl-branch":"dah-proc-arg-upvar","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 460: An Alternative to Upvar","author":["Don Hathway "],"is-jest":false}, + "460":{"url":"./tip/460.md","keywords":"Tcl,variable,link,upvar","created":"08-Dec-2016","post-history":"","state":"Draft","tcl-branch":"dah-proc-arg-upvar","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 460: An Alternative to Upvar","author":["Don Hathway "],"is-jest":false}, "459":{"url":"./tip/459.md","keywords":"Tcl,package","created":"08-Dec-2016","post-history":"","state":"Final","tcl-branch":"package_files","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 459: Tcl Package Introspection Improvements","author":["Jan Nijtmans "],"is-jest":false}, "458":{"url":"./tip/458.md","keywords":"event loop,scalability","created":"24-Nov-2016","post-history":"","state":"Final","tcl-branch":"tip-458","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 458: Add Support for epoll() and kqueue() in the Notifier","author":["Lucio Andrés Illanes Albornoz ","Lucio Andrés Illanes Albornoz "],"is-jest":false}, - "457":{"url":"./tip/457.md","keywords":"Tcl,procedure,argument handling","created":"21-Nov-2016","post-history":"","state":"Draft","tcl-branch":"tip-457","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 457: Add Support for Named Arguments","author":["Mathieu Lafon ","Andreas Leitgeb "],"is-jest":false}, + "457":{"url":"./tip/457.md","keywords":"Tcl,procedure,argument handling","created":"21-Nov-2016","post-history":"","state":"Draft","tcl-branch":"tip-457","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 457: Add Support for Named Arguments","author":["Mathieu Lafon ","Andreas Leitgeb "],"is-jest":false}, "456":{"url":"./tip/456.md","keywords":"Tcl,socket,SO_REUSEPORT,SO_REUSEADDR","created":"18-Nov-2016","post-history":"","state":"Final","tcl-branch":"tip-456","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 456: Extend the C API to Support Passing Options to TCP Server Creation","author":["LemonBoy ","lime boy "],"is-jest":false}, - "455":{"url":"./tip/455.md","keywords":"Tcl, event loop","created":"07-Oct-2016","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 455: Extensions to [vwait]: Variable Sets and Scripted Access to Tcl_DoOneEvent","author":["Christian Werner "],"is-jest":false}, + "455":{"url":"./tip/455.md","keywords":"Tcl, event loop","state":"Final","vote-summary":"Accepted 4/0/2","type":"Project","author":["Christian Werner "],"votes-for":"BG, JN, KW, SL","votes-against":"none","created":"07-Oct-2016","title":"# TIP 455: Extensions to [vwait]: Variable Sets and Scripted Access to Tcl_DoOneEvent","tcl-version":"8.7","vote":"Done","tcl-branch":"tip-455","votes-present":"KBK, MC","is-jest":false}, "454":{"url":"./tip/454.md","keywords":"Tk","created":"21-Sep-2016","post-history":"","state":"Withdrawn","tcl-version":"8.6.6","vote":"Done","type":"Project","title":"# TIP 454: Automatically Resize Frames After Last Child Removed","author":["Harald Oehlmann ","Harald Oehlmann ","François Vogel "],"is-jest":false}, - "453":{"url":"./tip/453.md","keywords":"Build tooling","created":"13-Sep-2016","post-history":"","state":"Draft","implementation-url":"https://core.tcl-lang.org/tclconfig/timeline?r=practcl","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 453: Tcl Based Automation for tcl/pkgs","author":["Sean Woods "],"is-jest":false}, - "452":{"url":"./tip/452.md","state":"Draft","type":"Project","author":["Gerald Lester ","Gerald W. Lester ","Gerald W. Lester "],"vote-results":"2/4/3 rejection in favour of further work","votes-for":"KBK, JD","votes-against":"DKF, JN, DGP, AK","created":"10-Aug-2016","title":"# TIP 452: Add \"stubs\" Package to or Along Side of TclTest","post-history":"","tcl-branch":"tip-452","vote":"Pending","tcl-version":"8.7","votes-present":"BG, FV, SL","is-jest":false}, - "451":{"url":"./tip/451.md","keywords":"Tcl,event loop","created":"10-Aug-2016","post-history":"","state":"Draft","tcl-branch":"updateextended","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 451: Modify [update] to Give Full Script Access to Tcl_DoOneEvent","author":["Colin McCormack "],"is-jest":false}, - "450":{"url":"./tip/450.md","keywords":"Tcl, binary data","created":"18-Jul-2016","post-history":"","state":"Draft","tcl-branch":"tip-450","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 450: Add [binary] subcommand \"set\" for in-place modification","author":["Arjen Markus ","Donal K. Fellows "],"is-jest":false}, + "453":{"url":"./tip/453.md","keywords":"Build tooling","created":"13-Sep-2016","post-history":"","state":"Draft","implementation-url":"https://core.tcl-lang.org/tclconfig/timeline?r=practcl","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 453: Tcl Based Automation for tcl/pkgs","author":["Sean Woods "],"is-jest":false}, + "452":{"url":"./tip/452.md","state":"Draft","type":"Project","author":["Gerald Lester ","Gerald W. Lester ","Gerald W. Lester "],"vote-results":"2/4/3 rejection in favour of further work","votes-for":"KBK, JD","votes-against":"DKF, JN, DGP, AK","created":"10-Aug-2016","title":"# TIP 452: Add \"stubs\" Package to or Along Side of TclTest","post-history":"","tcl-branch":"tip-452","vote":"Pending","tcl-version":"9.1","votes-present":"BG, FV, SL","is-jest":false}, + "451":{"url":"./tip/451.md","keywords":"Tcl,event loop","created":"10-Aug-2016","obsoleted-by":"455","post-history":"","state":"Draft","tcl-branch":"updateextended","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 451: Modify [update] to Give Full Script Access to Tcl_DoOneEvent","author":["Colin McCormack "],"is-jest":false}, + "450":{"url":"./tip/450.md","keywords":"Tcl, binary data","created":"18-Jul-2016","post-history":"","state":"Draft","tcl-branch":"tip-450","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 450: Add [binary] subcommand \"set\" for in-place modification","author":["Arjen Markus ","Donal K. Fellows "],"is-jest":false}, "449":{"url":"./tip/449.md","keywords":"Tk","created":"07-Jun-2016","post-history":"","state":"Final","tk-branch":"tip-449","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 449: [text] undo/redo to Return Range of Characters","author":["François Vogel "],"is-jest":false}, - "448":{"url":"./tip/448.md","keywords":"Tcl, C API","created":"24-May-2016","post-history":"","state":"Draft","implementation-url":"http://fossil.etoyoc.com/sandbox/tcllib/artifact/b2b272a285811272","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 448: Update Tcl_SetNotifier to Reinitialize Event Loop","author":["Jeff Rogers "],"is-jest":false}, + "448":{"url":"./tip/448.md","keywords":"Tcl, C API","created":"24-May-2016","post-history":"","state":"Draft","implementation-url":"http://fossil.etoyoc.com/sandbox/tcllib/artifact/b2b272a285811272","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 448: Update Tcl_SetNotifier to Reinitialize Event Loop","author":["Jeff Rogers "],"is-jest":false}, "447":{"url":"./tip/447.md","keywords":"Tcl,tcltest","created":"20-Apr-2016","post-history":"","state":"Final","tcl-branch":"gahr-tip-447","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 447: Execution Time Verbosity Levels in tcltest::configure","author":["Pietro Cerutti "],"is-jest":false}, "446":{"url":"./tip/446.md","keywords":"Tk","created":"05-Apr-2016","post-history":"","state":"Final","tk-branch":"tip-446","tcl-version":"8.6.6","vote":"Done","type":"Project","title":"# TIP 446: Introspect Undo/Redo Stack Depths","author":["François Vogel "],"is-jest":false}, "445":{"url":"./tip/445.md","state":"Final","vote-summary":"Accepted 4/0/3","type":"Project","author":["Don Porter "],"votes-for":"DKF, KBK, JN, DGP","votes-against":"none","created":"18-Mar-2016","title":"# TIP 445: Tcl_ObjType Utility Routines","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-445","votes-present":"BG, FV, SL","is-jest":false}, "444":{"url":"./tip/444.md","created":"23-Feb-2016","post-history":"","state":"Final","tcl-branch":"tip-444","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 444: Add \"weekdays\" unit in clock add","author":["Pietro Cerutti "],"is-jest":false}, "443":{"url":"./tip/443.md","keywords":"Tk","created":"09-Feb-2016","post-history":"","state":"Final","tk-branch":"tip-443","tcl-version":"8.6.6","vote":"Done","type":"Project","title":"# TIP 443: More Tag Configuration Options for the Text Widget","author":["François Vogel "],"is-jest":false}, "442":{"url":"./tip/442.md","keywords":"Tk","created":"17-Feb-2016","post-history":"","state":"Final","tk-branch":"tip-442","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 442: Display text in progressbars","author":["René Zaumseil ","Kevin B Kenny ","Andreas Leitgeb ","Kevin Kenny "],"is-jest":false}, "441":{"url":"./tip/441.md","keywords":"Tk,listbox","created":"18-Jan-2016","post-history":"","state":"Final","tk-branch":"tip-441","tcl-version":"8.6.5","vote":"Done","type":"Project","title":"# TIP 441: Add -justify Configuration Option to the listbox Widget","author":["François Vogel ","François Vogel "],"is-jest":false}, "440":{"url":"./tip/440.md","keywords":"language implementation,platform","created":"14-Jan-2016","post-history":"","state":"Final","tcl-branch":"tclPlatformEngine","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 440: Add engine to tcl_platform Array","author":["Joe Mistachkin ","Jan Nijtmans "],"is-jest":false}, - "439":{"url":"./tip/439.md","created":"08-Dec-2015","post-history":"","state":"Draft","tcl-branch":"semver","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 439: Semantic Versioning","author":["Jan Nijtmans "],"is-jest":false}, + "439":{"url":"./tip/439.md","created":"08-Dec-2015","obsoleted-by":"628","post-history":"","state":"Draft","tcl-branch":"semver","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 439: Semantic Versioning","author":["Jan Nijtmans "],"is-jest":false}, "438":{"url":"./tip/438.md","keywords":"Tk,text","created":"01-Nov-2015","post-history":"","state":"Final","tk-branch":"tip-438","tcl-version":"8.6.5","vote":"Done","type":"Project","title":"# TIP 438: Ensure Line Metrics are Up-to-Date","author":["François Vogel ","Jan Nijtmans "],"is-jest":false}, "437":{"url":"./tip/437.md","keywords":"Tk","created":"14-Jul-2015","post-history":"","state":"Final","tk-branch":"tip-437","vote":"Done","tcl-version":"8.5.18","type":"Project","title":"# TIP 437: Tk panedwindow options for proxy window","author":["Eric Boudaillier ","François Vogel "],"is-jest":false}, "436":{"url":"./tip/436.md","created":"30-Jun-2015","post-history":"","state":"Final","implementation-url":"https://core.tcl-lang.org/tcloo/info/5fa1374aa026d4c7","vote":"Done","tcl-version":"8.6.5","type":"Project","title":"# TIP 436: Improve TclOO isa Introspection","author":["Donal Fellows "],"is-jest":false}, "435":{"url":"./tip/435.md","created":"16-May-2015","post-history":"","state":"Rejected","vote":"Done","tcl-version":"8.6.5","type":"Project","title":"# TIP 435: Safe Mutex Disposal API","author":["Donal Fellows ","Joe Mistachkin "],"is-jest":false}, "434":{"url":"./tip/434.md","created":"26-Feb-2015","post-history":"","state":"Withdrawn","vote":"Pending","tcl-version":"8.6","type":"Project","title":"# TIP 434: Specify Event Sources for 'vwait'","author":["Jos Decoster "],"is-jest":false}, @@ -160,95 +263,95 @@ "433":{"url":"./tip/433.md","created":"25-Feb-2015","post-history":"","state":"Final","tk-branch":"bindScriptCount","tcl-version":"8.6.4","vote":"Done","type":"Project","title":"# TIP 433: Add %M binding substitution","author":["Joe Mistachkin ","Brian Griffin ","Don Porter "],"is-jest":false}, "432":{"url":"./tip/432.md","created":"20-Sep-2014","post-history":"","state":"Final","tk-branch":"apn-win-filedialogs","tcl-version":"8.6.3","vote":"Done","type":"Project","title":"# TIP 432: Support for New Windows File Dialogs in Vista and Later","author":["Ashok P. Nadkarni "],"is-jest":false}, "431":{"url":"./tip/431.md","keywords":"Tcl, directory, file","state":"Final","type":"Project","author":["Kevin Pasko "],"votes-for":"DKF, FV, KBK, JN, SL","votes-against":"none","created":"10-Sep-2014","title":"# TIP 431: Add 'tempdir' Subcommand to 'file'","post-history":"","tcl-version":"8.7","vote":"Done","tcl-branch":"tip-431","votes-present":"none","is-jest":false}, "430":{"url":"./tip/430.md","keywords":"virtual filesystem,zip,tclkit,boot,bootstrap","state":"Final","type":"Project","author":["Sean Woods ","Donal Fellows ","Poor Yorick ","Harald Oehlmann "],"votes-for":"DKF, KBK, SL, AK, JD, JN (partially)","votes-against":"JN (partially)","created":"03-Sep-2014","present":"JN (partially)","title":"# TIP 430: Add basic ZIP archive support to Tcl","post-history":"","tcl-branch":"core_zip_vfs","vote":"Done","tcl-version":"8.7","is-jest":false}, "429":{"url":"./tip/429.md","keywords":"Tcl,cat,scriptlet result","created":"27-Jul-2014","post-history":"","state":"Final","tcl-branch":"tip-429","tcl-version":"8.6.2","vote":"Done","type":"Project","title":"# TIP 429: A 'string' Subcommand for Concatenation","author":["Andreas Leitgeb ","Alexandre Ferrieux "],"is-jest":false}, - "428":{"url":"./tip/428.md","keywords":"socket,non-blocking,error reporting,option dictionary","created":"16-Mar-2014","post-history":"","state":"Draft","tcl-branch":"tip-428","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 428: Produce Error Dictionary from 'fconfigure -error'","author":["Harald Oehlmann ","Harald Oehlmann "],"is-jest":false}, + "428":{"url":"./tip/428.md","keywords":"socket,non-blocking,error reporting,option dictionary","created":"16-Mar-2014","post-history":"","state":"Draft","tcl-branch":"tip-428","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 428: Produce Error Dictionary from 'fconfigure -error'","author":["Harald Oehlmann ","Harald Oehlmann "],"is-jest":false}, "427":{"url":"./tip/427.md","keywords":"async socket connect,introspection,IPV6","created":"16-Mar-2014","post-history":"","state":"Final","tcl-branch":"tip-427","tcl-version":"8.6.4","vote":"Done","type":"Project","title":"# TIP 427: Introspection of Asynchronous Socket Connection","author":["Reinhard Max ","Harald Oehlmann ","Reinhard Max "],"is-jest":false}, "426":{"url":"./tip/426.md","keywords":"introspection, commands, Tcl, Tk","state":"Final","type":"Project","author":["Donal K. Fellows "],"vote-results":"4/2/3 accepted","votes-for":"DKF, BG, JN, JD","votes-against":"DGP, AK","created":"31-Jul-2013","title":"# TIP 426: Determining the \"Type\" of Commands","post-history":"","tcl-branch":"dkf-command-type","tcl-version":"8.7","vote":"Done","votes-present":"KBK, FV, SL","is-jest":false}, "425":{"url":"./tip/425.md","keywords":"Tcl,platform integration,i18n","created":"17-Jul-2013","post-history":"","state":"Final","tcl-branch":"win-console-panic","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 425: Correct use of UTF-8 in Panic Callback (Windows only)","author":["Jan Nijtmans "],"is-jest":false}, - "424":{"url":"./tip/424.md","keywords":"Tcl,subprocess,execution","created":"07-Jul-2013","post-history":"","state":"Draft","tcl-branch":"tip-improve-exec","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 424: Improving [exec]","author":["Alexandre Ferrieux "],"is-jest":false}, - "423":{"url":"./tip/423.md","keywords":"Tcl, time, millisecond resolution","created":"07-Jun-2013","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 423: Formatting Timestamps with Milliseconds","author":["Thomas Perschak "],"is-jest":false}, + "424":{"url":"./tip/424.md","keywords":"Tcl,subprocess,execution","created":"07-Jul-2013","post-history":"","state":"Draft","tcl-branch":"tip-improve-exec","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 424: Improving [exec]","author":["Alexandre Ferrieux "],"is-jest":false}, + "423":{"url":"./tip/423.md","keywords":"Tcl, time, millisecond resolution","created":"07-Jun-2013","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 423: Formatting Timestamps with Milliseconds","author":["Thomas Perschak "],"is-jest":false}, "422":{"url":"./tip/422.md","keywords":"Tcl, API removal, varargs","created":"02-Jan-2013","post-history":"","state":"Final","tcl-branch":"tip-422","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 422: Don't Use stdarg.h/va_list in Public API","author":["Jan Nijtmans "],"is-jest":false}, "421":{"url":"./tip/421.md","state":"Final","type":"Project","author":["Karl Lehenbauer ","Brad Lanam ","Donal K. Fellows "],"updated":"24-Oct-2017","created":"28-Nov-2012","present":"none","title":"# TIP 421: A Command for Iterating Over Arrays","post-history":"","tcl-branch":"tip-421","tcl-version":"8.7","vote":"Done","for":"DKF, AF, JN, SL, KBK, DGP, AK","against":"none","is-jest":false}, - "420":{"url":"./tip/420.md","created":"15-Nov-2012","post-history":"","state":"Draft","implementation-url":"http://www.etoyoc.com/tclmatrix3d","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 420: 'vexpr', a Vector Expression Command","author":["Sean Woods ","Andreas Kupries "],"is-jest":false}, - "419":{"url":"./tip/419.md","created":"28-Aug-2012","post-history":"","state":"Draft","implementation-url":"http://wiki.tcl.tk/tkevent","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 419: A New Command for Binding to Tk Events","author":["Jeff Rogers "],"is-jest":false}, - "418":{"url":"./tip/418.md","keywords":"Tcl,binary data","created":"27-Aug-2012","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 418: Add [binary] Subcommands for In-Place Modification","author":["Jeff Rogers "],"is-jest":false}, - "417":{"url":"./tip/417.md","keywords":"Tcl, future expansion, extensibility","created":"16-Nov-2012","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 417: Use Explicit Option Names for \"file tempfile\"","author":["Christophe Curis "],"is-jest":false}, + "420":{"url":"./tip/420.md","created":"15-Nov-2012","post-history":"","state":"Draft","implementation-url":"http://www.etoyoc.com/tclmatrix3d","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 420: 'vexpr', a Vector Expression Command","author":["Sean Woods ","Andreas Kupries "],"is-jest":false}, + "419":{"url":"./tip/419.md","created":"28-Aug-2012","post-history":"","state":"Draft","implementation-url":"http://wiki.tcl.tk/tkevent","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 419: A New Command for Binding to Tk Events","author":["Jeff Rogers "],"is-jest":false}, + "418":{"url":"./tip/418.md","keywords":"Tcl,binary data","created":"27-Aug-2012","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 418: Add [binary] Subcommands for In-Place Modification","author":["Jeff Rogers "],"is-jest":false}, + "417":{"url":"./tip/417.md","keywords":"Tcl, future expansion, extensibility","created":"16-Nov-2012","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 417: Use Explicit Option Names for \"file tempfile\"","author":["Christophe Curis "],"is-jest":false}, "416":{"url":"./tip/416.md","created":"31-Oct-2012","post-history":"","state":"Final","tcl-branch":"frq-3579001","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 416: New Options for 'load': -global and -lazy","author":["Christian Delbaere ","Jan Nijtmans ","Jan Nijtmans "],"is-jest":false}, "415":{"url":"./tip/415.md","keywords":"Tk","state":"Final","vote-summary":"Accepted 5/0/1","type":"Project","tk-branch":"tip-415","author":["Simon Geard "],"votes-against":"none","votes-for":"DKF, KBK, JN, FV, SL","created":"16-Oct-2012","title":"# TIP 415: Enable Easy Creation of Circular Arc Segments","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false}, "414":{"url":"./tip/414.md","keywords":"Tcl, library initialisation","state":"Final","type":"Project","author":["Brian Griffin ","Jan Nijtmans "],"votes-against":"none","vote-results":"5/1/0 accepted","votes-for":"JN, DKF, KW, KBK, DGP","created":"15-Oct-2012","title":"# TIP 414: Add (back) Tcl_InitSubsystems as Public API","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"initsubsystems","votes-present":"SL","is-jest":false}, "413":{"url":"./tip/413.md","keywords":"Tcl","created":"08-Oct-2012","post-history":"","state":"Final","tcl-branch":"tip-318-update","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 413: Unicode Support for 'string is space' and 'string trim'","discussions-to":"Tcl Core list","author":["Jan Nijtmans "],"is-jest":false}, "412":{"url":"./tip/412.md","obsoletes":"399","keywords":"Tcl,localization,msgcat","created":"27-Mar-2012","post-history":"","state":"Final","tcl-branch":"msgcat_dyn_locale","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 412: Dynamic Locale Changing for msgcat with On-Demand File Load","author":["Harald Oehlmann ","Harald Oehlmann "],"is-jest":false}, - "411":{"url":"./tip/411.md","created":"31-Aug-2012","post-history":"","state":"Draft","implementation-url":"http://sqlitestudio.pl/tcl/patches/tip-411-chan_info.patch","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 411: Improved Channel Introspection via \"chan info\"","author":["Pawel Salawa "],"is-jest":false}, - "410":{"url":"./tip/410.md","created":"26-Aug-2012","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 410: Three Features of scan Adapted for binary scan/format","author":["Andreas Leitgeb "],"is-jest":false}, - "409":{"url":"./tip/409.md","obsoletes":"391","keywords":"udp,datagram,message","created":"17-Aug-2012","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 409: UDP in Tcl","author":["Alexandre Ferrieux ","Colin McCormack "],"is-jest":false}, - "408":{"url":"./tip/408.md","created":"17-Aug-2012","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 408: Allow Any Command for expr Functions","author":["Brian Griffin "],"is-jest":false}, + "411":{"url":"./tip/411.md","created":"31-Aug-2012","post-history":"","state":"Draft","implementation-url":"http://sqlitestudio.pl/tcl/patches/tip-411-chan_info.patch","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 411: Improved Channel Introspection via \"chan info\"","author":["Pawel Salawa "],"is-jest":false}, + "410":{"url":"./tip/410.md","created":"26-Aug-2012","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 410: Three Features of scan Adapted for binary scan/format","author":["Andreas Leitgeb "],"is-jest":false}, + "409":{"url":"./tip/409.md","obsoletes":"391","keywords":"udp,datagram,message","created":"17-Aug-2012","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 409: UDP in Tcl","author":["Alexandre Ferrieux ","Colin McCormack "],"is-jest":false}, + "408":{"url":"./tip/408.md","created":"17-Aug-2012","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 408: Allow Any Command for expr Functions","author":["Brian Griffin "],"is-jest":false}, "407":{"url":"./tip/407.md","created":"06-Aug-2012","post-history":"","state":"Draft","vote":"No voting","type":"Informative","title":"# TIP 407: The String Representation of Tcl Lists: the Gory Details","author":["Donal K. Fellows ","Kevin Kenny ","Don Porter "],"is-jest":false}, "406":{"url":"./tip/406.md","state":"Final","vote-summary":"Accepted 5/0/1","type":"Project","author":["Donal K. Fellows "],"votes-for":"DKF, KBK, JN, FV, SL","votes-against":"none","created":"01-Aug-2012","title":"# TIP 406: \"C\" is for Cookie","post-history":"","tcl-version":"8.7","vote":"Done","tcl-branch":"dkf-http-cookies","votes-present":"BG","is-jest":false}, "405":{"url":"./tip/405.md","tcl-ticket":"3163961","keywords":"Tcl,mapeach,loop,accumulator","created":"31-Jul-2012","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 405: Add Collecting Loops, the 'lmap' and 'dict map' Commands","author":["Trevor Davel ","Donal K. Fellows "],"is-jest":false}, "404":{"url":"./tip/404.md","tcl-ticket":"3544988","keywords":"msgcat, convention","created":"17-Jul-2011","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 404: Let Message Catalogs get the Locale from their File Name","discussions-to":"Tcl Core list","author":["Harald Oehlmann "],"is-jest":false}, "403":{"url":"./tip/403.md","keywords":"Tk","created":"17-Jul-2011","post-history":"","state":"Final","tk-branch":"jn-web-colors","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 403: Web Colors for Tk","discussions-to":"Tcl Core list","author":["Jan Nijtmans "],"is-jest":false}, - "402":{"url":"./tip/402.md","keywords":"Tcl","created":"16-Jul-2011","post-history":"","state":"Draft","tcl-branch":"jn-unc-vfs","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 402: General Platform UNC Support","discussions-to":"Tcl Core list","author":["Jan Nijtmans "],"is-jest":false}, - "401":{"url":"./tip/401.md","created":"29-Apr-2012","post-history":"","state":"Draft","tcl-branch":"tip-401","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 401: Comment Words with Leading {#}","author":["Lars Hellström "],"is-jest":false}, + "402":{"url":"./tip/402.md","keywords":"Tcl","state":"Final","type":"Project","author":["Jan Nijtmans "],"votes-against":"none","votes-for":"FV, KW, JN","vote-results":"3/0/2 accepted","created":"16-Jul-2011","title":"# TIP 402: General Platform UNC Support","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-402","votes-present":"DGP, SL","discussions-to":"Tcl Core list","is-jest":false}, + "401":{"url":"./tip/401.md","created":"29-Apr-2012","post-history":"","state":"Draft","tcl-branch":"tip-401","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 401: Comment Words with Leading {#}","author":["Lars Hellström "],"is-jest":false}, "400":{"url":"./tip/400.md","keywords":"Tcl, zlib","created":"30-Mar-2012","post-history":"","state":"Final","tcl-branch":"tip-400-impl","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 400: Setting the Compression Dictionary and Other 'zlib' Updates","author":["Donal K. Fellows "],"is-jest":false}, "399":{"url":"./tip/399.md","keywords":"Tcl,localization,msgcat","created":"27-Mar-2012","obsoleted-by":"412","post-history":"","state":"Accepted","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 399: Dynamic Locale Changing for msgcat","author":["Harald Oehlmann "],"is-jest":false}, "398":{"url":"./tip/398.md","keywords":"close,exit,flush,blocking,nonblocking","created":"24-Feb-2012","post-history":"","state":"Final","tcl-branch":"tip-398-impl","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 398: Quickly Exit with Non-Blocking Blocked Channels","author":["Alexandre Ferrieux "],"is-jest":false}, "397":{"url":"./tip/397.md","keywords":"Tcl, TclOO, copy, clone","created":"13-Feb-2012","post-history":"","state":"Final","implementation-url":"https://core.tcl-lang.org/tcloo/timeline?r=development-rfe3485060","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 397: Extensible Object Copying","author":["Donal K. Fellows "],"is-jest":false}, "396":{"url":"./tip/396.md","obsoletes":"372","keywords":"coroutine,yield,yieldto","created":"11-Feb-2012","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 396: Symmetric Coroutines, Multiple Args, and yieldto","author":["Kevin Kenny "],"is-jest":false}, "395":{"url":"./tip/395.md","keywords":"Tcl","state":"Final","type":"Project","author":["Jos Decoster "],"created":"13-Dec-2011","obsoletes":"347","title":"# TIP 395: New 'string is entier' Command","post-history":"","vote":"Done","tcl-version":"8.6","implementation-url":"http://sites.google.com/site/josdecoster/Home/tip_string_is_entier.diff","discussions-to":"news:comp.lang.tcl","is-jest":false}, - "394":{"url":"./tip/394.md","created":"30-Nov-2011","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 394: Platform-Independent Handling of Contemporary Mice","author":["Andreas Leitgeb "],"is-jest":false}, - "393":{"url":"./tip/393.md","created":"25-Apr-2011","post-history":"","state":"Draft","implementation-url":"http://sqlitestudio.pl/tcl/patches/tip-393-lsearch-command.patch","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 393: Add -command Option to lsearch","author":["Pawel Salawa "],"is-jest":false}, - "392":{"url":"./tip/392.md","keywords":"bignum,runaway,safe,math,precision,integer,tcl","created":"30-Oct-2011","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 392: Allow Bignums to be Disabled at Runtime on a Per-Interp Basis","author":["Joe Mistachkin "],"is-jest":false}, + "394":{"url":"./tip/394.md","created":"30-Nov-2011","post-history":"","obsoleted-by":"474","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 394: Platform-Independent Handling of Contemporary Mice","author":["Andreas Leitgeb "],"is-jest":false}, + "393":{"url":"./tip/393.md","created":"25-Apr-2011","post-history":"","state":"Draft","implementation-url":"http://sqlitestudio.pl/tcl/patches/tip-393-lsearch-command.patch","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 393: Add -command Option to lsearch","author":["Pawel Salawa "],"is-jest":false}, + "392":{"url":"./tip/392.md","keywords":"bignum,runaway,safe,math,precision,integer,tcl","created":"30-Oct-2011","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 392: Allow Bignums to be Disabled at Runtime on a Per-Interp Basis","author":["Joe Mistachkin "],"is-jest":false}, "391":{"url":"./tip/391.md","created":"26-Oct-2011","obsoleted-by":"409","post-history":"","state":"Withdrawn","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 391: Support for UDP Sockets in Tcl","author":["Jeff Rogers "],"is-jest":false}, - "390":{"url":"./tip/390.md","created":"27-Oct-2011","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 390: A Logging API for Tcl","author":["Jeff Rogers ","Donal K. Fellows "],"is-jest":false}, + "390":{"url":"./tip/390.md","created":"27-Oct-2011","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 390: A Logging API for Tcl","author":["Jeff Rogers ","Donal K. Fellows "],"is-jest":false}, "389":{"url":"./tip/389.md","keywords":"Tcl","created":"23-Aug-2011","post-history":"","state":"Final","tcl-branch":"tip-389","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 389: Full support for Unicode 10.0 and later (part 1)","discussions-to":"Tcl Core list","author":["Jan Nijtmans ","Jan Nijtmans "],"is-jest":false}, "388":{"url":"./tip/388.md","keywords":"Tcl","created":"10-Aug-2011","post-history":"","state":"Final","tcl-branch":"tip-388-impl","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 388: Extending Unicode literals past the BMP","discussions-to":"Tcl Core list","author":["Jan Nijtmans ","Jan Nijtmans "],"is-jest":false}, "387":{"url":"./tip/387.md","keywords":"Tcl, coroutine","created":"30-May-2011","post-history":"","obsoleted-by":"396","state":"Withdrawn","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 387: Unified Yield Command Syntax","author":["Lars Hellström "],"is-jest":false}, "386":{"url":"./tip/386.md","keywords":"Fossil,DVCS","created":"01-Mar-2011","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 386: Relocation of Tcl/Tk Source Control Repositories","author":["Kevin B. Kenny ","Kevin Kenny "],"is-jest":false}, - "385":{"url":"./tip/385.md","keywords":"Tcl, traces","created":"13-Feb-2011","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 385: Functional Traces On Variables","author":["Alexandre Ferrieux "],"is-jest":false}, - "384":{"url":"./tip/384.md","keywords":"kqueue,inotify,dnotify,gamin,FSevents,fam","created":"02-Dec-2010","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 384: Add File Alteration Monitoring to the Tcl Core","author":["Reinhard Max ","Gerald W. Lester "],"is-jest":false}, + "385":{"url":"./tip/385.md","keywords":"Tcl, traces","created":"13-Feb-2011","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 385: Functional Traces On Variables","author":["Alexandre Ferrieux "],"is-jest":false}, + "384":{"url":"./tip/384.md","keywords":"kqueue,inotify,dnotify,gamin,FSevents,fam","created":"02-Dec-2010","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 384: Add File Alteration Monitoring to the Tcl Core","author":["Reinhard Max ","Gerald W. Lester "],"is-jest":false}, "383":{"url":"./tip/383.md","keywords":"debugging,coroutine,yielded","state":"Final","type":"Project","author":["Alexandre Ferrieux ","Miguel Sofer ","Donal K. Fellows "],"votes-for":"DKF, KBK, JN","votes-against":"none","created":"03-Dec-2010","title":"# TIP 383: Injecting Code into Suspended Coroutines","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-383","votes-present":"FV, SL","is-jest":false}, "382":{"url":"./tip/382.md","keywords":"Tk, dialog","created":"02-Nov-2010","post-history":"","state":"Final","tk-branch":"tip-382","vote":"Done","tcl-version":"8.5.11","type":"Project","title":"# TIP 382: Let tk_getSaveFile ignore file overwrites","author":["Pawel Salawa ","Don Porter "],"is-jest":false}, "381":{"url":"./tip/381.md","keywords":"TclOO, iTcl","created":"20-Oct-2010","post-history":"","state":"Final","implementation-url":"https://core.tcl-lang.org/tcloo/timeline?r=development-next2","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 381: Call Chain Introspection and Control","author":["Donal K. Fellows "],"is-jest":false}, "380":{"url":"./tip/380.md","tcl-ticket":"3084339","created":"20-Oct-2010","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 380: TclOO Slots for Flexible Declarations","author":["Donal K. Fellows "],"is-jest":false}, - "379":{"url":"./tip/379.md","keywords":"event","created":"17-Oct-2010","post-history":"","state":"Draft","implementation-url":"http://www.wjduquette.com/notifier/hook-0.1.zip","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 379: Add a Command for Delivering Events Without Tk","author":["Will Duquette "],"is-jest":false}, + "379":{"url":"./tip/379.md","keywords":"event","created":"17-Oct-2010","post-history":"","state":"Draft","implementation-url":"http://www.wjduquette.com/notifier/hook-0.1.zip","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 379: Add a Command for Delivering Events Without Tk","author":["Will Duquette "],"is-jest":false}, "378":{"url":"./tip/378.md","tcl-ticket":"3081184","created":"04-Oct-2010","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 378: Fixing the Performance of TIP 280","author":["Andreas Kupries ","Jeff Hobbs "],"is-jest":false}, "377":{"url":"./tip/377.md","created":"13-Sep-2010","post-history":"","state":"Withdrawn","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 377: Portably Determining the Number of Processors in the System","author":["Andreas Kupries "],"is-jest":false}, "376":{"url":"./tip/376.md","created":"14-Sep-2010","post-history":"","state":"Final","implementation-url":"https://core.tcl-lang.org/tdbc/","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 376: Bundle sqlite3 and tdbc::sqlite3 Packages","author":["Don Porter ","D. Richard Hipp ","Kevin Kenny "],"is-jest":false}, "375":{"url":"./tip/375.md","obsoletes":"373","keywords":"coroutine,yield","created":"12-Aug-2010","obsoleted-by":"396","post-history":"","state":"Draft","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 375: Symmetric Coroutines and Yieldto","author":["Miguel Sofer "],"is-jest":false}, - "374":{"url":"./tip/374.md","created":"13-Aug-2010","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 374: Stackless Vwait","author":["Thomas Perschak ","Trevor Davel "],"is-jest":false}, + "374":{"url":"./tip/374.md","created":"13-Aug-2010","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 374: Stackless Vwait","author":["Thomas Perschak ","Trevor Davel "],"is-jest":false}, "373":{"url":"./tip/373.md","obsoletes":"372","keywords":"coroutine,yield","created":"12-Aug-2010","obsoleted-by":"375","post-history":"","state":"Withdrawn","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 373: Improved Yielding Support for Coroutines","author":["Miguel Sofer "],"is-jest":false}, "372":{"url":"./tip/372.md","keywords":"coroutine, yield","created":"11-Aug-2010","obsoleted-by":"396","post-history":"","state":"Draft","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 372: Multi-argument Yield for Coroutines","discussions-to":"http://wiki.tcl.tk/26006","author":["Colin McCormack "],"is-jest":false}, - "371":{"url":"./tip/371.md","created":"05-Aug-2010","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 371: Improvements for the dict command","author":["Thomas Perschak ","Trevor Davel "],"is-jest":false}, - "370":{"url":"./tip/370.md","created":"04-Aug-2010","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 370: Extend Tk's selection with a -time option","author":["George Petasis "],"is-jest":false}, - "369":{"url":"./tip/369.md","tk-ticket":"3023578","keywords":"Tk,user-defined data,dictionary","created":"15-Jul-2010","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 369: Widget cargo command","author":["Russell Davidson ","Trevor Davel "],"is-jest":false}, + "371":{"url":"./tip/371.md","created":"05-Aug-2010","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 371: Improvements for the dict command","author":["Thomas Perschak ","Trevor Davel "],"is-jest":false}, + "370":{"url":"./tip/370.md","created":"04-Aug-2010","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 370: Extend Tk's selection with a -time option","author":["George Petasis "],"is-jest":false}, + "369":{"url":"./tip/369.md","tk-ticket":"3023578","keywords":"Tk,user-defined data,dictionary","created":"15-Jul-2010","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 369: Widget cargo command","author":["Russell Davidson ","Trevor Davel "],"is-jest":false}, "368":{"url":"./tip/368.md","keywords":"Tk","created":"10-May-2010","obsoleted-by":"441","post-history":"","state":"Withdrawn","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 368: Listbox Justification Option","author":["Russell Davidson "],"is-jest":false}, "367":{"url":"./tip/367.md","keywords":"Tcl, delete, item","state":"Final","type":"Project","author":["Donal K. Fellows "],"votes-for":"DKF, JN, DGP, FV, SL, AK","votes-against":"none","created":"18-May-2010","title":"# TIP 367: A Command to Remove Elements from a List","post-history":"","tcl-version":"8.7","vote":"Done","tcl-branch":"tip-367","votes-present":"none","is-jest":false}, - "366":{"url":"./tip/366.md","tk-ticket":"2996760","keywords":"Tk","created":"29-Apr-2010","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 366: Variable Sized Indicators for Menubuttons","author":["Russell Davidson "],"is-jest":false}, + "366":{"url":"./tip/366.md","keywords":"Tk","state":"Rejected","vote-summary":"Rejected 1/1/1","type":"Project","tk-branch":"tip-366","author":["Russell Davidson "],"votes-against":"JN","votes-for":"KW","created":"29-Apr-2010","title":"# TIP 366: Variable Sized Indicators for Menubuttons","post-history":"","vote":"Done","tcl-version":"9.0","votes-present":"SL","is-jest":false}, "365":{"url":"./tip/365.md","keywords":"Look at the date","created":"01-Apr-2010","post-history":"","state":"Draft","vote":"No voting","tcl-version":"8.6","type":"Project","title":"# TIP 365: Add Python Compatibility Mode","author":["Donal K. Fellows "],"is-jest":true}, "364":{"url":"./tip/364.md","keywords":"Tcl","created":"19-Mar-2010","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 364: Threading Support: Configuration and Package","author":["Donal K. Fellows "],"is-jest":false}, - "363":{"url":"./tip/363.md","keywords":"expand,{*},vector,math","created":"02-Mar-2010","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.0","type":"Project","title":"# TIP 363: Vector Math in the Tcl Core","author":["Karl C. Hansen "],"is-jest":false}, + "363":{"url":"./tip/363.md","keywords":"expand,{*},vector,math","created":"02-Mar-2010","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 363: Vector Math in the Tcl Core","author":["Karl C. Hansen "],"is-jest":false}, "362":{"url":"./tip/362.md","tcl-ticket":"2960976","keywords":"Windows,Tcl","created":"01-Mar-2010","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 362: Simple 32 and 64 bit Registry Support","author":["Damon Courtney ","Kevin Kenny "],"is-jest":false}, - "361":{"url":"./tip/361.md","created":"03-Feb-2010","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 361: Releasing Channel Buffers","author":["Wayne Cuddy "],"is-jest":false}, + "361":{"url":"./tip/361.md","created":"03-Feb-2010","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 361: Releasing Channel Buffers","author":["Wayne Cuddy "],"is-jest":false}, "360":{"url":"./tip/360.md","tk-ticket":"2920409","keywords":"Tk, X11, menu","created":"24-Dec-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 360: Modernize X11 Menus","author":["Pat Thoyts "],"is-jest":false}, "359":{"url":"./tip/359.md","tk-ticket":"2918731","keywords":"Tk,X11,ewmh,window manager","created":"21-Dec-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 359: Extended Window Manager Hint Support","author":["Pat Thoyts "],"is-jest":false}, - "358":{"url":"./tip/358.md","keywords":"Tcl, list extraction, parsing","created":"04-Oct-2009","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 358: Suppress Empty List Element Generation from the Split Command","author":["George Petasis "],"is-jest":false}, + "358":{"url":"./tip/358.md","keywords":"Tcl, list extraction, parsing","created":"04-Oct-2009","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 358: Suppress Empty List Element Generation from the Split Command","author":["George Petasis "],"is-jest":false}, "357":{"url":"./tip/357.md","tcl-ticket":"2891616","created":"01-Oct-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 357: Export TclLoadFile","author":["Kevin Kenny "],"is-jest":false}, "356":{"url":"./tip/356.md","keywords":"Tcl, C API, subst","created":"17-Sep-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 356: NR-enabled Substitutions for Extensions","author":["Don Porter "],"is-jest":false}, - "355":{"url":"./tip/355.md","tcl-ticket":"2826430","created":"01-Sep-2009","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 355: Stop Fast Recycling of Channel Names on Unix","author":["Alexandre Ferrieux "],"is-jest":false}, + "355":{"url":"./tip/355.md","tcl-ticket":"2826430","created":"01-Sep-2009","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 355: Stop Fast Recycling of Channel Names on Unix","author":["Alexandre Ferrieux "],"is-jest":false}, "354":{"url":"./tip/354.md","created":"26-Aug-2009","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 354: Minor Production-Driven TclOO Revisions","author":["Donal K. Fellows "],"is-jest":false}, "353":{"url":"./tip/353.md","tcl-ticket":"2823282","created":"29-Jul-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 353: NR-enabled Expressions for Extensions","author":["Don Porter "],"is-jest":false}, "352":{"url":"./tip/352.md","created":"14-Jul-2009","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 352: Tcl Style Guide","author":["Ray Johnson ","Donal K. Fellows ","Mark Janssen "],"is-jest":false}, "351":{"url":"./tip/351.md","created":"09-Jul-2009","post-history":"","state":"Final","tcl-branch":"tip-351","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 351: Add Striding Support to lsearch","author":["Peter da Silva ","Donal K. Fellows ","Harald Oehlmann ","Andreas Leitgeb "],"is-jest":false}, "350":{"url":"./tip/350.md","obsoletes":"308","created":"18-Apr-2009","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 350: Tcl Database Connectivity - Corrigenda","author":["Kevin B. Kenny "],"is-jest":false}, - "349":{"url":"./tip/349.md","created":"17-Apr-2009","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 349: New \"-cargo\" option for every Tk widget","author":["Zbigniew Baniewski "],"is-jest":false}, + "349":{"url":"./tip/349.md","created":"17-Apr-2009","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 349: New \"-cargo\" option for every Tk widget","author":["Zbigniew Baniewski "],"is-jest":false}, "348":{"url":"./tip/348.md","tcl-ticket":"2868499","keywords":"Tcl,debugging","created":"26-Feb-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 348: Substituted 'errorstack' / 'traceback'","author":["Alexandre Ferrieux "],"is-jest":false}, "347":{"url":"./tip/347.md","keywords":"Tcl","created":"09-Feb-2009","obsoleted-by":"395","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 347: Align 'string is ...' to Type-Conversion Functions in 'expr'","discussions-to":"news:comp.lang.tcl","author":["Jos Decoster "],"is-jest":false}, - "346":{"url":"./tip/346.md","keywords":"Tcl,encoding,convertto,strict,Unicode,String,ByteArray","created":"02-Feb-2009","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 346: Error on Failed String Encodings","author":["Alexandre Ferrieux "],"is-jest":false}, + "346":{"url":"./tip/346.md","keywords":"Tcl,encoding,convertto,strict,Unicode","":"Vote-Summary Accepted 5/0/0","state":"Final","type":"Project","author":["Alexandre Ferrieux ","Jan Nijtmans "],"votes-against":"none","votes-for":"FV, JN, KW, MC, SL","created":"02-Feb-2009","obsoleted-by":"654","title":"# TIP 346: Error on Failed String Encodings","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-346","votes-present":"none","is-jest":false}, "345":{"url":"./tip/345.md","tcl-ticket":"2564363","keywords":"Tcl,encoding,invalid UTF-8","created":"05-Feb-2009","post-history":"","state":"Final","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 345: Kill the 'identity' Encoding","discussions-to":"Tcl Core List","author":["Alexandre Ferrieux "],"is-jest":false}, - "344":{"url":"./tip/344.md","created":"31-Dec-2008","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 344: Bring TCP_NODELAY and SO_KEEPALIVE to socket options","author":["Alexandre Ferrieux "],"is-jest":false}, + "344":{"url":"./tip/344.md","state":"Final","vote-summary":"Accepted 3/0/1","type":"Project","author":["Alexandre Ferrieux "],"votes-for":"JN, KW, SL","votes-against":"none","created":"31-Dec-2008","title":"# TIP 344: Bring TCP_NODELAY and SO_KEEPALIVE to socket options","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-344","votes-present":"FV","is-jest":false}, "343":{"url":"./tip/343.md","tcl-ticket":"2368084","keywords":"Tcl,binary","created":"03-Dec-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 343: A Binary Specifier for [format/scan]","author":["Alexandre Ferrieux "],"is-jest":false}, "342":{"url":"./tip/342.md","keywords":"dictionary, default value","state":"Final","type":"Project","author":["Lars Hellström "],"votes-for":"DKF, JN, DGP, SL, AK","votes-against":"none","created":"27-Nov-2008","title":"# TIP 342: Dict Get With Default","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-342","votes-present":"FV","is-jest":false}, "341":{"url":"./tip/341.md","tcl-ticket":"2370575","keywords":"Tcl, set intersection","created":"27-Nov-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 341: Multiple 'dict filter' Patterns","author":["Lars Hellström "],"is-jest":false}, "340":{"url":"./tip/340.md","keywords":"Tcl_SetResult","created":"14-Nov-2008","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 340: Const Qualification of Tcl_SetResult's Argument","author":["Jan Nijtmans "],"is-jest":false}, "339":{"url":"./tip/339.md","created":"14-Nov-2008","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 339: Case-Insensitive Package Names","author":["Andreas Kupries "],"is-jest":false}, @@ -255,73 +358,73 @@ "338":{"url":"./tip/338.md","keywords":"Tcl, Tk, tclsh, wish","created":"22-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 338: Embedder Access to Startup Scripts of *_Main()","author":["Don Porter "],"is-jest":false}, "337":{"url":"./tip/337.md","created":"21-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 337: Make TclBackgroundException() Public","author":["Don Porter "],"is-jest":false}, "336":{"url":"./tip/336.md","created":"21-Oct-2008","post-history":"","state":"Final","tcl-branch":"tip-330-336","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 336: Supported Access To interp->errorline","author":["Don Porter "],"is-jest":false}, "335":{"url":"./tip/335.md","keywords":"numLevels,embedding,terminate,async,thread,safe,gc","created":"13-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 335: An API for Detecting Active Interpreters","author":["Joe Mistachkin "],"is-jest":false}, "334":{"url":"./tip/334.md","keywords":"empty list","created":"13-Oct-2008","post-history":"","state":"Withdrawn","vote":"Pending","tcl-version":"8.6","type":"Project","title":"# TIP 334: Make 'lrepeat' Accept Zero as a Count","author":["Michael Thomas Greer "],"is-jest":false}, - "333":{"url":"./tip/333.md","keywords":"Tcl,resolution","created":"13-Oct-2008","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 333: New Variable and Namespace Resolving Interface","author":["Arnulf Wiedemann "],"is-jest":false}, + "333":{"url":"./tip/333.md","keywords":"Tcl,resolution","created":"13-Oct-2008","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 333: New Variable and Namespace Resolving Interface","author":["Arnulf Wiedemann "],"is-jest":false}, "332":{"url":"./tip/332.md","tcl-ticket":"219159","obsoletes":"301","keywords":"Tcl,channel,close,socket,shutdown","created":"25-Sep-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 332: Half-Close for Bidirectional Channels","author":["Alexandre Ferrieux "],"is-jest":false}, "331":{"url":"./tip/331.md","created":"22-Sep-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 331: Allow [lset] to Extend Lists","author":["Kevin B. Kenny "],"is-jest":false}, "330":{"url":"./tip/330.md","created":"22-Sep-2008","post-history":"","state":"Final","tcl-branch":"tip-330-336","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 330: Eliminate interp->result from the Public Headers","author":["Kevin B. Kenny "],"is-jest":false}, "329":{"url":"./tip/329.md","obsoletes":"89","created":"22-Sep-2008","post-history":"","state":"Final","implementation-url":"http://www.crypt.co.za/pub/try-1.tcl","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 329: Try/Catch/Finally syntax","discussions-to":"http://wiki.tcl.tk/21608","author":["Trevor Davel "],"is-jest":false}, "328":{"url":"./tip/328.md","keywords":"Coroutine,continuation,event-loop,NRE","created":"07-Sep-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 328: Coroutines","author":["Miguel Sofer ","Neil Madden "],"is-jest":false}, "327":{"url":"./tip/327.md","keywords":"tailcall,NRE","created":"20-Sep-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 327: Proper Tailcalls","author":["Miguel Sofer ","David S. Cargo "],"is-jest":false}, "326":{"url":"./tip/326.md","tcl-ticket":"2082681","keywords":"Tcl, lsort, sorting","created":"01-Sep-2008","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 326: Add -stride Option to lsort","author":["Kieran Elby "],"is-jest":false}, - "325":{"url":"./tip/325.md","keywords":"Tk, desktop integration","created":"25-Aug-2008","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 325: System Tray and System Notification Access","author":["David N. Welton , Kevin Walzer "],"is-jest":false}, + "325":{"url":"./tip/325.md","keywords":"Tk, desktop integration","state":"Final","vote-summary":"Accepted 5/0/0","type":"Project","author":["David N. Welton , Kevin Walzer "],"votes-for":"SL, JN, MC, FV, KW","votes-against":"none","created":"25-Aug-2008","title":"# TIP 325: System Tray and System Notification Access","post-history":"","tcl-version":"8.7","vote":"Done","votes-present":"none","is-jest":false}, "324":{"url":"./tip/324.md","tk-ticket":"1477426","obsoletes":"213","keywords":"Tk","created":"08-Aug-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 324: A Standard Dialog For Font Selection","author":["Adrian Robert ","Daniel A. Steffen "],"is-jest":false}, "323":{"url":"./tip/323.md","created":"06-Aug-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 323: Do Nothing Gracefully","author":["Colin McCormack ","Don Porter ","Kevin B. Kenny "],"is-jest":false}, "322":{"url":"./tip/322.md","created":"13-Jul-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 322: Publish the NRE API","author":["Miguel Sofer "],"is-jest":false}, "321":{"url":"./tip/321.md","tk-ticket":"1997907","keywords":"Tk,BLT,busy","created":"26-Jun-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 321: Add a [tk busy] Command","author":["Jos Decoster "],"is-jest":false}, "320":{"url":"./tip/320.md","tcl-ticket":"2005460","keywords":"TclOO","created":"13-Jun-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 320: Improved Variable Handling in the Core Object System","author":["Donal K. Fellows "],"is-jest":false}, - "319":{"url":"./tip/319.md","created":"04-Jun-2008","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 319: Implement Backwards Compatibility for ttk Themed Widgets in tk Widgets","author":["Eric Taylor "],"is-jest":false}, + "319":{"url":"./tip/319.md","created":"04-Jun-2008","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 319: Implement Backwards Compatibility for ttk Themed Widgets in tk Widgets","author":["Eric Taylor "],"is-jest":false}, "318":{"url":"./tip/318.md","created":"13-May-2008","post-history":"","state":"Final","tcl-branch":"tip-318-update","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 318: Extend Default Whitespace in 'string trim' Beyond ASCII","author":["Bill Poser "],"is-jest":false}, "317":{"url":"./tip/317.md","tcl-ticket":"1956530","keywords":"base64,uuencode,hex,transfer encoding","created":"03-May-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 317: Extend binary Ensemble with Binary Encodings","author":["Pat Thoyts "],"is-jest":false}, "316":{"url":"./tip/316.md","created":"02-May-2008","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 316: Portable Access Functions for Stat Buffers","author":["Donal K. Fellows "],"is-jest":false}, "315":{"url":"./tip/315.md","created":"04-Apr-2008","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 315: Add pathSeparator to tcl_platform Array","author":["Hai Vu "],"is-jest":false}, "314":{"url":"./tip/314.md","tcl-ticket":"1901783","created":"26-Feb-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 314: Ensembles with Parameters","author":["Lars Hellström "],"is-jest":false}, "313":{"url":"./tip/313.md","tcl-ticket":"1894241","keywords":"Tcl","created":"14-Feb-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 313: Inexact Searching in Sorted List","author":["Peter Spjuth "],"is-jest":false}, "312":{"url":"./tip/312.md","keywords":"variable,trace","state":"Final","type":"Project","author":["René Zaumseil ","Larry W. Virden "],"votes-for":"DKF, JN, SL, AK","votes-against":"none","created":"26-Jan-2008","title":"# TIP 312: Add More Link Types","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-312-new","votes-present":"DGP, FV","is-jest":false}, "311":{"url":"./tip/311.md","created":"08-Jan-2008","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 311: Tcl/Tk 8.6 Release Calendar","author":["Don Porter ","Larry W. Virden ","Joe Mistachkin ","Pat Thoyts ","Miguel Sofer ","Lars Hellström ","Alexandre Ferrieux ","Arnulf Wiedemann ","Trevor Davel ","Donal K. Fellows ","Jan Nijtmans "],"is-jest":false}, "310":{"url":"./tip/310.md","keywords":"expr","created":"07-Jan-2008","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 310: Add a New Pseudo-Random Number Generator","author":["Arjen Markus "],"is-jest":false}, - "309":{"url":"./tip/309.md","keywords":"expr, parse","created":"07-Jan-2008","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 309: Expose the Expression Parsing","author":["Arjen Markus "],"is-jest":false}, + "309":{"url":"./tip/309.md","keywords":"expr, parse","created":"07-Jan-2008","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 309: Expose the Expression Parsing","author":["Arjen Markus "],"is-jest":false}, "308":{"url":"./tip/308.md","created":"15-Nov-2007","obsoleted-by":"350","post-history":"","state":"Final","vote":"Done","type":"Informative","title":"# TIP 308: Tcl Database Connectivity (TDBC)","author":["Kevin B. Kenny ","Artur Trzewik ","Andreas Leitgeb ","Donal K. Fellows "],"is-jest":false}, "307":{"url":"./tip/307.md","tcl-ticket":"1723738","keywords":"Tcl, result, transfer, interpreter, API rename","created":"28-Sep-2007","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 307: Make TclTransferResult() Public","author":["Erik Leunissen "],"is-jest":false}, "306":{"url":"./tip/306.md","keywords":"automatic,Tk,widget,naming","created":"11-Jun-2007","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 306: Auto-Naming Widgets","author":["Koen Danckaert ","Richard Suchenwirth "],"is-jest":false}, "305":{"url":"./tip/305.md","created":"21-Feb-2007","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 305: ANSI Escape Sequence Support for Windows's Console Channel Driver","discussions-to":"news:comp.lang.tcl","author":["David Gravereaux "],"is-jest":false}, "304":{"url":"./tip/304.md","tcl-ticket":"1978495","keywords":"Tcl,exec,process,subprocess,pipeline,channel","created":"07-Feb-2007","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 304: A Standalone [chan pipe] Primitive for Advanced Child IPC","author":["Alexandre Ferrieux "],"is-jest":false}, - "303":{"url":"./tip/303.md","keywords":"Tcl, lindex","created":"29-Jan-2007","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 303: Enhance 'llength' Command to Support Nested Lists","author":["Wolf-Dieter Busch "],"is-jest":false}, - "302":{"url":"./tip/302.md","keywords":"Tcl,time changes","created":"13-Dec-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 302: Fix \"after\"'s Sensitivity To Adjustments Of System Clock","author":["Alexandre Ferrieux ","Kevin Kenny "],"is-jest":false}, + "303":{"url":"./tip/303.md","keywords":"Tcl, lindex","created":"29-Jan-2007","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 303: Enhance 'llength' Command to Support Nested Lists","author":["Wolf-Dieter Busch "],"is-jest":false}, + "302":{"url":"./tip/302.md","keywords":"Tcl,time changes","created":"13-Dec-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 302: Fix \"after\"'s Sensitivity To Adjustments Of System Clock","author":["Alexandre Ferrieux ","Kevin Kenny "],"is-jest":false}, "301":{"url":"./tip/301.md","created":"11-Dec-2006","obsoleted-by":"332","post-history":"","state":"Withdrawn","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 301: Split Bidirectional Channels For Half-Close","author":["Alexandre Ferrieux "],"is-jest":false}, "300":{"url":"./tip/300.md","tk-ticket":"1602955","keywords":"Tk","created":"25-Nov-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 300: Examine Glyph Substitution in the 'font actual' Command","author":["Kevin B. Kenny "],"is-jest":false}, "299":{"url":"./tip/299.md","tk-ticket":"1602534","keywords":"Tcl, expression, integer, square root","created":"24-Nov-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 299: Add isqrt() Math Function","author":["Kevin B. Kenny "],"is-jest":false}, "298":{"url":"./tip/298.md","tcl-ticket":"1601243","keywords":"Tcl,Tcl_Obj","created":"22-Nov-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 298: Revise Shared Value Rules for Tcl_GetBignumAndClearObj","author":["Don Porter "],"is-jest":false}, - "297":{"url":"./tip/297.md","keywords":"Tcl, number, expression","created":"20-Nov-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 297: Integer Type Introspection and Conversion","author":["Don Porter "],"is-jest":false}, - "296":{"url":"./tip/296.md","keywords":"Tcl,lrange,lreplace","created":"06-Nov-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 296: Enhanced Syntax for Pair-Wise Indices","author":["Andreas Leitgeb "],"is-jest":false}, - "295":{"url":"./tip/295.md","keywords":"Tcl,lrange","created":"06-Nov-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 295: Enhance Arguments to lrange","author":["Andreas Leitgeb "],"is-jest":false}, + "297":{"url":"./tip/297.md","keywords":"Tcl, number, expression","created":"20-Nov-2006","post-history":"","obsoleted-by":"502,514,515","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 297: Integer Type Introspection and Conversion","author":["Don Porter "],"is-jest":false}, + "296":{"url":"./tip/296.md","keywords":"Tcl,lrange,lreplace","created":"06-Nov-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 296: Enhanced Syntax for Pair-Wise Indices","author":["Andreas Leitgeb "],"is-jest":false}, + "295":{"url":"./tip/295.md","keywords":"Tcl,lrange","created":"06-Nov-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 295: Enhance Arguments to lrange","author":["Andreas Leitgeb "],"is-jest":false}, "294":{"url":"./tip/294.md","keywords":"Tcl,number,cast,rename","created":"03-Nov-2006","post-history":"","state":"Rejected","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 294: The \"entier\" Function: It's Spelt \"entire\"","author":["Lars Hellström ","Richard Suchenwirth "],"is-jest":false}, "293":{"url":"./tip/293.md","obsoletes":"157","created":"02-Nov-2006","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 293: Argument Expansion with Leading {*}","author":["Miguel Sofer "],"is-jest":false}, "292":{"url":"./tip/292.md","keywords":"Tcl, expr","created":"01-Nov-2006","post-history":"","state":"Withdrawn","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 292: Allow Unquoted Strings in Expressions","author":["Brian Griffin "],"is-jest":false}, "291":{"url":"./tip/291.md","tcl-ticket":"1600701","keywords":"Tcl,Critcl,TEApot","created":"26-Oct-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 291: Add the 'platform' Package to Tcl","author":["Steve Landers ","Andreas Kupries "],"is-jest":false}, - "290":{"url":"./tip/290.md","tcl-ticket":"1587317","keywords":"Tcl,error,trap","created":"29-Oct-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 290: Registration of Custom Error Handler Scripts","author":["Eckhard Lehmann ","Larry W. Virden "],"is-jest":false}, + "290":{"url":"./tip/290.md","tcl-ticket":"1587317","keywords":"Tcl,error,trap","created":"29-Oct-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 290: Registration of Custom Error Handler Scripts","author":["Eckhard Lehmann ","Larry W. Virden "],"is-jest":false}, "289":{"url":"./tip/289.md","keywords":"Tcl","created":"26-Oct-2006","post-history":"","state":"Rejected","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 289: Revision of [lrepeat] Argument Order","author":["Peter Spjuth ",""],"is-jest":false}, - "288":{"url":"./tip/288.md","keywords":"Tcl,proc","created":"03-Oct-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 288: Allow \"args\" Anywhere in Procedure Formal Arguments","author":["Peter Spjuth ","Andreas Leitgeb ","Peter Spjuth "],"is-jest":false}, + "288":{"url":"./tip/288.md","keywords":"Tcl,proc","state":"Rejected","vote-summary":"Rejected 1/0/2","type":"Project","author":["Peter Spjuth ","Andreas Leitgeb "],"votes-against":"none","votes-for":"JN","created":"03-Oct-2006","title":"# TIP 288: Allow \"args\" Anywhere in Procedure Formal Arguments","post-history":"","vote":"Done","tcl-branch":"aspect-tip288","tcl-version":"9.0","votes-present":"FV, SL","is-jest":false}, "287":{"url":"./tip/287.md","tcl-ticket":"1586860","keywords":"Tcl,channel,chan,pendinginput,pendingoutput","created":"26-Oct-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 287: Add a Commands for Determining Size of Buffered Data","author":["Michael A. Cleverly "],"is-jest":false}, "286":{"url":"./tip/286.md","tk-ticket":"1152376","keywords":"Tk","created":"18-Oct-2006","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 286: Add 'xposition' Command to Menu Widgets","author":["Schelte Bron "],"is-jest":false}, "285":{"url":"./tip/285.md","tcl-ticket":"1499394","keywords":"eval,cancel,unwind,terminate,runaway,async,thread,safe","created":"04-Jun-2006","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 285: Script Cancellation with [interp cancel] and Tcl_CancelEval","author":["Joe Mistachkin ","Dawson Cowals "],"is-jest":false}, - "284":{"url":"./tip/284.md","created":"01-Oct-2006","post-history":"","state":"Draft","tcl-branch":"tip-284","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 284: New 'invoke' and 'namespace invoke' Commands","author":["Miguel Sofer "],"is-jest":false}, - "283":{"url":"./tip/283.md","tcl-ticket":"1577282","created":"01-Oct-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 283: Modify Ensemble Command Resolution Behaviour","author":["Miguel Sofer ","Neil Madden "],"is-jest":false}, - "282":{"url":"./tip/282.md","tcl-ticket":"1969722","keywords":"expr,operator,assignment","created":"13-Oct-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 282: Enhanced Expression Syntax","author":["Will Duquette ","Don Porter "],"is-jest":false}, - "281":{"url":"./tip/281.md","keywords":"POSIX,channel driver,errorCode","created":"08-Oct-2006","post-history":"","state":"Draft","implementation-url":"http://iocpsock.cvs.sourceforge.net/iocpsock/iocpsock/tclWinError.c?revision=HEAD&view=markup","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 281: Improvements in System Error Handling","author":["David Gravereaux "],"is-jest":false}, + "284":{"url":"./tip/284.md","created":"01-Oct-2006","post-history":"","state":"Draft","tcl-branch":"tip-284","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 284: New 'invoke' and 'namespace invoke' Commands","author":["Miguel Sofer "],"is-jest":false}, + "283":{"url":"./tip/283.md","tcl-ticket":"1577282","created":"01-Oct-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 283: Modify Ensemble Command Resolution Behaviour","author":["Miguel Sofer ","Neil Madden "],"is-jest":false}, + "282":{"url":"./tip/282.md","tcl-ticket":"1969722","keywords":"expr,operator,assignment","created":"13-Oct-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 282: Enhanced Expression Syntax","author":["Will Duquette ","Don Porter "],"is-jest":false}, + "281":{"url":"./tip/281.md","keywords":"POSIX,channel driver,errorCode","created":"08-Oct-2006","post-history":"","state":"Draft","implementation-url":"http://iocpsock.cvs.sourceforge.net/iocpsock/iocpsock/tclWinError.c?revision=HEAD&view=markup","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 281: Improvements in System Error Handling","author":["David Gravereaux "],"is-jest":false}, "280":{"url":"./tip/280.md","tcl-ticket":"1571568","obsoletes":"211","keywords":"Tcl","created":"10-Aug-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 280: Add Full Stack Trace Capability With Location Introspection","author":["Andreas Kupries ","Andreas Kupries "],"is-jest":false}, - "279":{"url":"./tip/279.md","created":"05-Oct-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 279: Adding an Extensible Object System to the Core","author":["Gustaf Neumann ","Larry W. Virden "],"is-jest":false}, + "279":{"url":"./tip/279.md","created":"05-Oct-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 279: Adding an Extensible Object System to the Core","author":["Gustaf Neumann ","Larry W. Virden "],"is-jest":false}, "278":{"url":"./tip/278.md","created":"03-Oct-2006","post-history":"","state":"Final","tcl-branch":"tip-278","tcl-version":"9.0","discussions to":"Tcl Core List","vote":"Done","type":"Project","title":"# TIP 278: Fix Variable Name Resolution Quirks","author":["Miguel Sofer ","Miguel Sofer ","Kevin Kenny ","Jan Nijtmans "],"is-jest":false}, - "277":{"url":"./tip/277.md","created":"01-Oct-2006","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 277: Create Namespaces as Needed","author":["Miguel Sofer "],"is-jest":false}, - "276":{"url":"./tip/276.md","keywords":"Tcl,global,variable,upvar,namespace upvar","created":"01-Oct-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 276: Specify and Unify Variable Linking Commands","author":["Miguel Sofer "],"is-jest":false}, + "277":{"url":"./tip/277.md","created":"01-Oct-2006","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 277: Create Namespaces as Needed","author":["Miguel Sofer "],"is-jest":false}, + "276":{"url":"./tip/276.md","keywords":"Tcl,global,variable,upvar,namespace upvar","created":"01-Oct-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 276: Specify and Unify Variable Linking Commands","author":["Miguel Sofer "],"is-jest":false}, "275":{"url":"./tip/275.md","tcl-ticket":"1565751","keywords":"Tcl,binary,unsigned","created":"27-Sep-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 275: Support Unsigned Values in binary Command","author":["Pat Thoyts "],"is-jest":false}, "274":{"url":"./tip/274.md","tcl-ticket":"1556802","keywords":"Tcl,expr","created":"15-Sep-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 274: Right-Associativity for the Exponentiation Operator","author":["Arjen Markus ","David Smith ","Richard Suchenwirth ","Don Porter ","Sérgio Loureiro "],"is-jest":false}, "273":{"url":"./tip/273.md","obsoletes":"176","created":"30-Aug-2006","post-history":"","state":"Rejected","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 273: Add Tcl_Expr... Support to Tcl_Get... Functions","author":["Carsten Gosvig "],"is-jest":false}, "272":{"url":"./tip/272.md","tcl-ticket":"1545151","keywords":"Tcl, lreverse","created":"23-Aug-2006","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 272: String and List Reversal Operations","author":["Donal K. Fellows "],"is-jest":false}, - "271":{"url":"./tip/271.md","tk-ticket":"1520742","created":"11-Jul-2006","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 271: Windows-Style Open and Save File Dialog on Unix","author":["Matthew Middleton ","susanta kumar mishra "],"is-jest":false}, + "271":{"url":"./tip/271.md","tk-ticket":"1520742","created":"11-Jul-2006","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 271: Windows-Style Open and Save File Dialog on Unix","author":["Matthew Middleton ","susanta kumar mishra "],"is-jest":false}, "270":{"url":"./tip/270.md","created":"19-Jun-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 270: Utility C Routines for String Formatting","author":["Don Porter "],"is-jest":false}, "269":{"url":"./tip/269.md","tcl-ticket":"1491459","keywords":"Tcl,lists,strings","created":"19-May-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 269: Add 'string is list' to the 'string is' Subcommand","author":["Joe Mistachkin "],"is-jest":false}, "268":{"url":"./tip/268.md","tcl-ticket":"1520767","created":"28-Apr-2006","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 268: Enhance 'package' Version Handling","author":["Jeff Hobbs ","Hemang Lavana ","Andreas Kupries ","Don Porter "],"is-jest":false}, "267":{"url":"./tip/267.md","tcl-ticket":"1476191","created":"25-Apr-2006","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 267: Allow 'exec' to Ignore Stderr","author":["Nathan Bell "],"is-jest":false}, "266":{"url":"./tip/266.md","keywords":"Tcl,unknown,expression","created":"11-Apr-2006","post-history":"","state":"Rejected","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 266: Numbers are Commands","author":["Kristoffer Lawson ","Michal Malecki ","Wolf-Dieter Busch ","Paul Nash "],"is-jest":false}, @@ -329,54 +432,54 @@ "264":{"url":"./tip/264.md","keywords":"Tk, C API","created":"01-Apr-2006","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 264: Add Function to Retrieve the Interpreter of a Window","author":["George Petasis "],"is-jest":false}, "263":{"url":"./tip/263.md","created":"01-Apr-2006","post-history":"","state":"Draft","tcl-version":"9.2","vote":"Pending","type":"Project","title":"# TIP 263: Quantum Tcl","author":["Lars Hellström "],"is-jest":true}, "262":{"url":"./tip/262.md","keywords":"Tk,option","state":"Final","type":"Project","tk-branch":"tip-262","author":["Eric Taylor ","Donal K. Fellows "],"votes-for":"DKF, FV, KBK, JN, SL","votes-against":"none","created":"18-Mar-2006","title":"# TIP 262: Background Images for Frames","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "261":{"url":"./tip/261.md","tcl-ticket":"1437008","created":"20-Dec-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 261: Return Imported Commands from [namespace import]","author":["Martin Lemburg ",""],"is-jest":false}, "260":{"url":"./tip/260.md","created":"04-Jan-2006","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 260: Add Underline Option to Canvas Text Items","author":["Donal K. Fellows "],"is-jest":false}, - "259":{"url":"./tip/259.md","created":"12-Dec-2005","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 259: Making 'exec' Optionally Binary Safe","author":["Andreas Leitgeb "],"is-jest":false}, + "259":{"url":"./tip/259.md","created":"12-Dec-2005","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 259: Making 'exec' Optionally Binary Safe","author":["Andreas Leitgeb "],"is-jest":false}, "258":{"url":"./tip/258.md","tcl-ticket":"1413934","keywords":"encoding","created":"01-Oct-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 258: Enhanced Interface for Encodings","author":["Don Porter "],"is-jest":false}, "257":{"url":"./tip/257.md","obsoletes":"50","created":"26-Sep-2005","post-history":"","state":"Final","tcl-branch":"tip-257-implementation-branch","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 257: Object Orientation for Tcl","author":["Donal K. Fellows ","Will Duquette ","Steve Landers ","Jeff Hobbs ","Kevin Kenny ","Miguel Sofer ","Richard Suchenwirth ","Larry W. Virden "],"is-jest":false}, "256":{"url":"./tip/256.md","tk-ticket":"1247835","created":"12-Aug-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 256: Implement Tabular and Wordprocessor Style Tabbing","author":["Vince Darley ","Vince Darley "],"is-jest":false}, "255":{"url":"./tip/255.md","tcl-ticket":"1309020","created":"21-Jul-2005","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 255: Add 'min' and 'max' [expr] Functions","author":["Jeff Hobbs "],"is-jest":false}, "254":{"url":"./tip/254.md","tcl-ticket":"1242844","created":"21-Jul-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 254: New Types for Tcl_LinkVar","author":["Rene Meyer "],"is-jest":false}, - "253":{"url":"./tip/253.md","created":"05-Jul-2005","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 253: Consolidate Package-Related Commands","author":["Brian Schmidt "],"is-jest":false}, + "253":{"url":"./tip/253.md","created":"05-Jul-2005","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 253: Consolidate Package-Related Commands","author":["Brian Schmidt "],"is-jest":false}, "252":{"url":"./tip/252.md","created":"28-Jun-2005","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 252: Add New 'string' Command Options","author":["Brian Schmidt "],"is-jest":false}, "251":{"url":"./tip/251.md","created":"28-Jun-2005","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 251: Enhance the 'list' Command","author":["Brian Schmidt ","Sérgio Loureiro "],"is-jest":false}, "250":{"url":"./tip/250.md","tcl-ticket":"1275435","created":"19-Jun-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 250: Efficient Access to Namespace Variables","author":["Will Duquette ","miguel sofer "],"is-jest":false}, "249":{"url":"./tip/249.md","created":"13-Jun-2005","post-history":"","state":"Draft","vote":"No voting","type":"Informative","title":"# TIP 249: Unification of Tcl's Parsing of Numbers","author":["Kevin B. Kenny ","David S. Cargo ","Don Porter "],"is-jest":false}, "248":{"url":"./tip/248.md","obsoletes":"172","created":"08-Jun-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 248: Integrate Tile into Tk as Ttk","author":["Jeff Hobbs ","Donal K. Fellows "],"is-jest":false}, "247":{"url":"./tip/247.md","created":"01-Jun-2005","post-history":"","state":"Draft","vote":"Pending","type":"Informational","title":"# TIP 247: Tcl/Tk Engineering Manual","author":["John K. Ousterhout ","Donal K. Fellows "],"is-jest":false}, - "246":{"url":"./tip/246.md","keywords":"pattern,match,glob,exact,regexp,case sensitive,Tcl","created":"27-Apr-2005","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 246: Unify Pattern Matching","author":["Reinhard Max "],"is-jest":false}, + "246":{"url":"./tip/246.md","keywords":"pattern,match,glob,exact,regexp,case sensitive,Tcl","created":"27-Apr-2005","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 246: Unify Pattern Matching","author":["Reinhard Max "],"is-jest":false}, "245":{"url":"./tip/245.md","tk-ticket":"1185731","keywords":"Tk","created":"15-Apr-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 245: Discover User Inactivity Time","author":["Pascal Scheffers ","Reinhard Max ","Neil Madden "],"is-jest":false}, "244":{"url":"./tip/244.md","created":"22-Mar-2005","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 244: PNG Photo Image Support for Tk","discussions-to":"news:comp.lang.tcl","author":["Michael Kirkham "],"is-jest":false}, - "243":{"url":"./tip/243.md","tk-ticket":"1167420","keywords":"Tk","created":"16-Mar-2005","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 243: Supply Find Dialog for the Text Widget","author":["Rüdiger Härtel "],"is-jest":false}, + "243":{"url":"./tip/243.md","tk-ticket":"1167420","keywords":"Tk","created":"16-Mar-2005","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 243: Supply Find Dialog for the Text Widget","author":["Rüdiger Härtel "],"is-jest":false}, "242":{"url":"./tip/242.md","tk-ticket":"1156388","created":"03-Mar-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 242: Preselect Filter on tk_get*File Dialogs","author":["Brian Griffin "],"is-jest":false}, "241":{"url":"./tip/241.md","tcl-ticket":"1152746","keywords":"Tcl,sorted lists,matching","created":"26-Feb-2005","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 241: Case-Insensitive Switches and List Searching and Sorting","author":["Joe Mistachkin "],"is-jest":false}, - "240":{"url":"./tip/240.md","tcl-ticket":"1315115","obsoletes":"88","keywords":"Tcl","created":"22-Feb-2005","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 240: An Ensemble Command to Manage Processes","author":["Steve Bold "],"is-jest":false}, - "239":{"url":"./tip/239.md","created":"26-Jan-2005","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 239: Enhance the 'load' Command","author":["Jeff Hobbs "],"is-jest":false}, - "238":{"url":"./tip/238.md","keywords":"Tk","created":"25-Jan-2005","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 238: Fire Event when Widget Created","author":["Gerald W. Lester "],"is-jest":false}, + "240":{"url":"./tip/240.md","tcl-ticket":"1315115","obsoletes":"88","keywords":"Tcl","created":"22-Feb-2005","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 240: An Ensemble Command to Manage Processes","author":["Steve Bold "],"is-jest":false}, + "239":{"url":"./tip/239.md","created":"26-Jan-2005","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 239: Enhance the 'load' Command","author":["Jeff Hobbs "],"is-jest":false}, + "238":{"url":"./tip/238.md","keywords":"Tk","created":"25-Jan-2005","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 238: Fire Event when Widget Created","author":["Gerald W. Lester "],"is-jest":false}, "237":{"url":"./tip/237.md","created":"14-Jan-2005","post-history":"","state":"Final","tcl-branch":"kennykb-numerics-branch","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 237: Arbitrary-Precision Integers for Tcl","author":["Kevin B. Kenny ","Don Porter "],"is-jest":false}, "236":{"url":"./tip/236.md","keywords":"Tk,anchor,place","created":"25-Dec-2004","post-history":"","state":"Final","implementation-url":"http://www.eecs.umich.edu/~mckay/canvmoveto.patch.gz","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 236: Absolute Positioning of Canvas Items","author":["Neil McKay "],"is-jest":false}, "235":{"url":"./tip/235.md","created":"10-Dec-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 235: Exposing a C API for Ensembles","author":["Donal K. Fellows "],"is-jest":false}, "234":{"url":"./tip/234.md","keywords":"Tcl,zip,gzip,deflate","created":"08-Dec-2004","post-history":"","state":"Final","implementation-url":"http://svn.scheffers.net/zlib","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 234: Add Support For Zlib Compression","author":["Pascal Scheffers "],"is-jest":false}, "233":{"url":"./tip/233.md","tcl-ticket":"1073863","created":"30-Nov-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 233: Virtualization of Tcl's Sense of Time","author":["Andreas Kupries ","Andreas Kupries "],"is-jest":false}, "232":{"url":"./tip/232.md","keywords":"math,expr,Tcl","created":"26-Nov-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 232: Creating New Math Functions for the 'expr' Command","author":["Arjen Markus ","Kevin Kenny "],"is-jest":false}, "231":{"url":"./tip/231.md","tk-ticket":"1062022","created":"06-Nov-2004","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 231: Support for [wm attributes] on X11","author":["Joe English "],"is-jest":false}, "230":{"url":"./tip/230.md","tcl-ticket":"1163274","created":"02-Nov-2004","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 230: Tcl Channel Transformation Reflection API","author":["Andreas Kupries ","Andreas Kupries ","Andreas Kupries "],"is-jest":false}, "229":{"url":"./tip/229.md","tcl-ticket":"1159942","created":"03-Nov-2004","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 229: Scripted Control of Name Resolution in Namespaces","author":["Donal K. Fellows "],"is-jest":false}, - "228":{"url":"./tip/228.md","created":"02-Nov-2004","post-history":"","state":"Draft","implementation-url":"http://sourceforge.net/projects/tclvfs/","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 228: Tcl Filesystem Reflection API","author":["Andreas Kupries ","Andreas Kupries ","Vince Darley "],"is-jest":false}, + "228":{"url":"./tip/228.md","created":"02-Nov-2004","post-history":"","state":"Draft","implementation-url":"http://sourceforge.net/projects/tclvfs/","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 228: Tcl Filesystem Reflection API","author":["Andreas Kupries ","Andreas Kupries ","Vince Darley "],"is-jest":false}, "227":{"url":"./tip/227.md","tcl-ticket":"1060579","keywords":"Tcl","created":"30-Oct-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 227: Interface to Get and Set the Return Options of an Interpreter","author":["Don Porter "],"is-jest":false}, "226":{"url":"./tip/226.md","tcl-ticket":"1060579","keywords":"Tcl","created":"30-Oct-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 226: Interface to Save and Restore Interpreter State","author":["Don Porter "],"is-jest":false}, - "225":{"url":"./tip/225.md","tcl-ticket":"1052584","created":"25-Oct-2004","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 225: Arithmetic Series with Optimized Space Complexity","author":["Salvatore Sanfilippo ","Miguel Sofer "],"is-jest":false}, + "225":{"url":"./tip/225.md","tcl-ticket":"1052584","created":"25-Oct-2004","obsoleted-by":"629","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 225: Arithmetic Series with Optimized Space Complexity","author":["Salvatore Sanfilippo ","Miguel Sofer ","Brian Griffin ","Eric Taylor "],"is-jest":false}, "224":{"url":"./tip/224.md","":"sensible way.","state":"Rejected","type":"Project","author":["Peter MacDonald ","Robert Seeger ","Donal K. Fellows "],"votes-for":"DKF, JN, SL","votes-against":"DGP, AK","rejection-reason":"","created":"28-Sep-2004","title":"# TIP 224: Add New [array] Subcommand 'value'","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-224","votes-present":"FV","is-jest":false}, "223":{"url":"./tip/223.md","tk-ticket":"1032982","created":"21-Sep-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 223: Full-Screen Toplevel Support for Tk","author":["Mo DeJong "],"is-jest":false}, "222":{"url":"./tip/222.md","tk-ticket":"892194","keywords":"Tk","created":"16-Sep-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 222: Add [wm attributes -alpha] Attribute on Windows","author":["Jeff Hobbs ","Andreas Kupries "],"is-jest":false}, "221":{"url":"./tip/221.md","tcl-ticket":"1060579","keywords":"bgerror,return,options","created":"15-Sep-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 221: Allow Background Error Handlers to Accept Return Options","author":["Don Porter "],"is-jest":false}, - "220":{"url":"./tip/220.md","tcl-ticket":"1057093","created":"12-Sep-2004","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 220: Escalate Privileges in VFS Close Callback","author":["Colin McCormack ","Andreas Kupries ","Vince Darley "],"is-jest":false}, + "220":{"url":"./tip/220.md","":"Vote-Summary Accepted 3/0/3","state":"Final","type":"Project","author":["Colin McCormack ","Andreas Kupries ","Vince Darley "],"votes-for":"JN, KBK, SL","votes-against":"none","created":"12-Sep-2004","title":"# TIP 220: Escalate Privileges in VFS Close Callback","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-220","votes-present":"DGP, FV, MC","is-jest":false}, "219":{"url":"./tip/219.md","tcl-ticket":"1025294","created":"09-Sep-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 219: Tcl Channel Reflection API","author":["Andreas Kupries ","Andreas Kupries "],"is-jest":false}, "218":{"url":"./tip/218.md","tcl-ticket":"875701","created":"09-Sep-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 218: Tcl Channel Driver Thread State Actions","author":["Andreas Kupries ","Andreas Kupries ","Larry W. Virden ","David Gravereaux "],"is-jest":false}, "217":{"url":"./tip/217.md","tcl-ticket":"1017532","keywords":"Tcl,lsort,parallel lists","created":"26-Aug-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 217: Getting Sorted Indices out of Lsort","author":["James P. Salsman "],"is-jest":false}, - "216":{"url":"./tip/216.md","keywords":"Tcl, debugging, argument, shell","created":"23-Aug-2004","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 216: Handling Command-Line Options in Tclsh and Wish","author":["Arjen Markus "],"is-jest":false}, + "216":{"url":"./tip/216.md","keywords":"Tcl, debugging, argument, shell","created":"23-Aug-2004","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 216: Handling Command-Line Options in Tclsh and Wish","author":["Arjen Markus "],"is-jest":false}, "215":{"url":"./tip/215.md","tcl-ticket":"1413115","keywords":"Tcl","created":"25-Aug-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 215: Make [incr] Auto-Initialize Undefined Variables","author":["Andreas Leitgeb ","Don Porter "],"is-jest":false}, "214":{"url":"./tip/214.md","obsoletes":"117","keywords":"Tcl,info,representation","created":"24-Aug-2004","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 214: Add New Object Introspection Command","author":["Ulrich Schöbel ","Larry W. Virden "],"is-jest":false}, "213":{"url":"./tip/213.md","keywords":"Tk","created":"21-Aug-2004","obsoleted-by":"324","post-history":"","state":"Withdrawn","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 213: A Standard Dialog for Font Selection","author":["Donal K. Fellows ","Pat Thoyts "],"is-jest":false}, "212":{"url":"./tip/212.md","tcl-ticket":"1008768","keywords":"tcl, dict, update, script","created":"11-Aug-2004","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 212: Temporarily Opening out a Dictionary","author":["Donal K. Fellows "],"is-jest":false}, "211":{"url":"./tip/211.md","keywords":"Tcl","created":"10-Aug-2004","obsoleted-by":"280","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 211: Add Full Stack Trace Capability","author":["Robert Seeger ","Robert Seeger ","Don Porter "],"is-jest":false}, @@ -395,37 +498,37 @@ "198":{"url":"./tip/198.md","created":"12-May-2004","post-history":"","state":"Rejected","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 198: Image Command XPM Extension","author":["R. Timothy Edwards ","Don Porter ","Kevin Kenny "],"is-jest":false}, "197":{"url":"./tip/197.md","keywords":"Tk","created":"12-May-2004","post-history":"","state":"Final","vote":"Done","tcl-version":"8.6","type":"Project","title":"# TIP 197: Unfocussed Text Widget Cursor Control","author":["R. Timothy Edwards ","Donal K. Fellows "],"is-jest":false}, "196":{"url":"./tip/196.md","created":"11-May-2004","post-history":"","state":"Withdrawn","vote":"Pending","tcl-version":"8.5","type":"Project","title":"# TIP 196: Tcl Commands as Values","author":["Robert Suetterlin "],"is-jest":false}, "195":{"url":"./tip/195.md","tcl-ticket":"1040206","obsoletes":"105","keywords":"Tcl","created":"02-May-2004","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 195: A Unique Prefix Handling Command","author":["Peter Spjuth ","Peter Spjuth "],"is-jest":false}, "194":{"url":"./tip/194.md","tcl-ticket":"944803","keywords":"Tcl,lambda,anonymous,command,function,functional programming","created":"30-Apr-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 194: Procedures as Values via '''apply'''","author":["Miguel Sofer ","Joe Mistachkin "],"is-jest":false}, - "193":{"url":"./tip/193.md","keywords":"Tcl","created":"29-Apr-2004","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 193: Simple Syntax Help System","author":["Donal K. Fellows "],"is-jest":false}, - "192":{"url":"./tip/192.md","keywords":"Tcl","created":"27-Mar-2004","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 192: Lazy Lists","author":["Salvatore Sanfilippo ","Theo Verelst "],"is-jest":false}, + "193":{"url":"./tip/193.md","keywords":"Tcl","created":"29-Apr-2004","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 193: Simple Syntax Help System","author":["Donal K. Fellows "],"is-jest":false}, + "192":{"url":"./tip/192.md","keywords":"Tcl","created":"27-Mar-2004","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 192: Lazy Lists","author":["Salvatore Sanfilippo ","Theo Verelst "],"is-jest":false}, "191":{"url":"./tip/191.md","created":"24-Mar-2004","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 191: Managing Tcl Packages and Modules in a Multi-Version Environment","author":["Andreas Kupries ","Joe English ","Larry Virden "],"is-jest":false}, "190":{"url":"./tip/190.md","created":"24-Mar-2004","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 190: Implementation Choices for Tcl Modules","author":["Andreas Kupries ","Jean-Claude Wippler ","Jeff Hobbs "],"is-jest":false}, "189":{"url":"./tip/189.md","tcl-ticket":"942881","created":"24-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 189: Tcl Modules","author":["Andreas Kupries ","Jean-Claude Wippler ","Jeff Hobbs ","Don Porter ","Larry W. Virden ","Daniel A. Steffen ","Don Porter "],"is-jest":false}, "188":{"url":"./tip/188.md","tcl-ticket":"940915","keywords":"Tcl","created":"23-Apr-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 188: Add 'string is wideinteger' to the 'string is' Subcommand","discussions-to":"news:comp.lang.tcl","author":["Kevin Kenny "],"is-jest":false}, "187":{"url":"./tip/187.md","keywords":"Tcl,lambda,anonymous,command,function","created":"20-Apr-2004","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 187: Procedures as Values","author":["Salvatore Sanfilippo ","Miguel Sofer ","Paul Nash "],"is-jest":false}, - "186":{"url":"./tip/186.md","keywords":"Tk","created":"16-Apr-2004","post-history":"","state":"Draft","implementation-url":"http://pdqi.com/configure.diff.gz","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 186: Expose the Type and Modified-State of Widget Options","author":["Peter MacDonald ","Peter MacDonald "],"is-jest":false}, + "186":{"url":"./tip/186.md","keywords":"Tk","created":"16-Apr-2004","post-history":"","state":"Draft","implementation-url":"http://pdqi.com/configure.diff.gz","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 186: Expose the Type and Modified-State of Widget Options","author":["Peter MacDonald ","Peter MacDonald "],"is-jest":false}, "185":{"url":"./tip/185.md","keywords":"Tcl, absent value","created":"08-Apr-2004","post-history":"","state":"Rejected","vote":"Done","type":"Project","tcl-version":"8.6","title":"# TIP 185: Null Handling","author":["John H. Harris "],"is-jest":false}, "184":{"url":"./tip/184.md","tcl-ticket":"600812","keywords":"Tcl, upvar, global","created":"27-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 184: Avoid Creating Unusable Variables","author":["Miguel Sofer "],"is-jest":false}, "183":{"url":"./tip/183.md","tcl-ticket":"577093","keywords":"Tcl","created":"24-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 183: Add a Binary Flag to [open]","author":["Andreas Leitgeb ","Don Porter "],"is-jest":false}, "182":{"url":"./tip/182.md","tcl-ticket":"1165062","created":"23-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 182: Add [expr bool] Math Function","author":["Joe Mistachkin ","Don Porter "],"is-jest":false}, "181":{"url":"./tip/181.md","tcl-ticket":"958222","created":"23-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 181: Add a [namespace unknown] Command","author":["Neil Madden "],"is-jest":false}, - "180":{"url":"./tip/180.md","keywords":"Tk","created":"22-Mar-2003","post-history":"","state":"Draft","vote":"Pending","type":"Project","tcl-version":"8.7","title":"# TIP 180: Add a Megawidget Support Core Package","author":["Damon Courtney "],"is-jest":false}, + "180":{"url":"./tip/180.md","keywords":"Tk","created":"22-Mar-2003","post-history":"","state":"Draft","vote":"Pending","type":"Project","tcl-version":"9.1","title":"# TIP 180: Add a Megawidget Support Core Package","author":["Damon Courtney "],"is-jest":false}, "179":{"url":"./tip/179.md","keywords":"Tk","created":"22-Mar-2004","post-history":"","state":"Final","implementation-url":"ftp://ftp.model.com/pub/tcl/pw_hide_TIP.tgz","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 179: Add -hide Option to panedwindow Widget","author":["Brian Griffin "],"is-jest":false}, - "178":{"url":"./tip/178.md","tcl-ticket":"920731ffffffffffffff","created":"21-Mar-2004","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 178: [info pid] and [info tid] Subcommands","author":["Joe Mistachkin "],"is-jest":false}, + "178":{"url":"./tip/178.md","tcl-ticket":"920731ffffffffffffff","created":"21-Mar-2004","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 178: [info pid] and [info tid] Subcommands","author":["Joe Mistachkin "],"is-jest":false}, "177":{"url":"./tip/177.md","keywords":"Tk","created":"17-Mar-2004","post-history":"","state":"Final","implementation-url":"ftp://ftp.model.com/pub/tcl/pw_stretch_TIP.tgz","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 177: Add -stretch Option to panedwindow Widget","author":["Brian Griffin "],"is-jest":false}, "176":{"url":"./tip/176.md","tcl-ticket":"1165695","created":"16-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 176: Add String Index Values","author":["Damon Courtney ","Don Porter ","Damon Courtney "],"is-jest":false}, "175":{"url":"./tip/175.md","created":"15-Mar-2004","post-history":"","state":"Withdrawn","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 175: Add an -async Option to [open]","author":["Neil Madden "],"is-jest":false}, "174":{"url":"./tip/174.md","tcl-ticket":"1578137","created":"15-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 174: Math Operators as Commands","author":["Kristoffer Lawson ","Donal K. Fellows ","David S. Cargo ","Peter Spjuth ","Kevin B. Kenny "],"is-jest":false}, "173":{"url":"./tip/173.md","created":"11-Mar-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 173: Internationalisation and Refactoring of the 'clock' Command","discussions-to":"news:comp.lang.tcl","author":["Kevin Kenny "],"is-jest":false}, "172":{"url":"./tip/172.md","created":"08-Mar-2004","obsoleted-by":"248","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"No voting","type":"Project","title":"# TIP 172: Improve UNIX Tk Look and Feel","author":["David N. Welton "],"is-jest":false}, "171":{"url":"./tip/171.md","created":"05-Mar-2004","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 171: Change Default Bindings Behavior","author":["Jeff Hobbs ","Keith Vetter "],"is-jest":false}, - "170":{"url":"./tip/170.md","created":"30-Jan-2004","post-history":"","state":"Draft","implementation-url":"http://nac.sf.net/","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 170: Better Support for Nested Lists","author":["Sergey Babkin ","Don Porter ","Donal K. Fellows "],"is-jest":false}, + "170":{"url":"./tip/170.md","created":"30-Jan-2004","obsoleted-by":"157","post-history":"","state":"Draft","implementation-url":"http://nac.sf.net/","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 170: Better Support for Nested Lists","author":["Sergey Babkin ","Don Porter ","Donal K. Fellows "],"is-jest":false}, "169":{"url":"./tip/169.md","tk-ticket":"994629","created":"28-Jan-2004","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 169: Add Peer Text Widgets","author":["Brian Griffin ","Vince Darley "],"is-jest":false}, "168":{"url":"./tip/168.md","tk-ticket":"886240","created":"25-Jan-2004","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 168: Cubic Bezier Curves on the Canvas","author":["Lars Hellström "],"is-jest":false}, - "167":{"url":"./tip/167.md","created":"19-Nov-2003","post-history":"","state":"Draft","tk-branch":"tip-167","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 167: Add a New Option for Context Help for Windows","author":["Ramon Ribó "],"is-jest":false}, + "167":{"url":"./tip/167.md","state":"Rejected","vote-summary":"Rejected 1/2/1","type":"Project","tk-branch":"tip-167","author":["Ramon Ribó "],"votes-for":"KW","votes-against":"FV, JN","created":"19-Nov-2003","title":"# TIP 167: Add a New Option for Context Help for Windows","post-history":"","vote":"Done","tcl-version":"9.0","votes-present":"SL","is-jest":false}, "166":{"url":"./tip/166.md","keywords":"Tk,image get,image put","created":"19-Nov-2003","post-history":"","state":"Final","tk-branch":"tip-166","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 166: Reading and Writing the Photo Image Alpha Channel","author":["Donal K. Fellows ","Simon Bachmann "],"is-jest":false}, "165":{"url":"./tip/165.md","tk-ticket":"1008975","keywords":"Tk,substitution","created":"17-Nov-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 165: A User-Data Field for Virtual Events","author":["Donal K. Fellows "],"is-jest":false}, "164":{"url":"./tip/164.md","keywords":"Tk,canvas","state":"Final","type":"Project","tk-branch":"tip-164","author":["Arjen Markus ","Dimitrios Zachariadis ","Donal K. Fellows "],"votes-for":"DKF, JN, FV, SL, AK","votes-against":"none","created":"17-Nov-2003","title":"# TIP 164: Add Rotate Subcommand to the Canvas Widget","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false}, "163":{"url":"./tip/163.md","tcl-ticket":"745851","created":"14-Nov-2003","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 163: A [dict merge] Subcommand","author":["Joe English "],"is-jest":false}, "162":{"url":"./tip/162.md","created":"23-Oct-2003","post-history":"","state":"Final","tcl-branch":"rmax-ipv6-branch","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 162: IPv6 Sockets for Tcl","author":["Rafael Martínez Torres ","Donal K. Fellows ","Reinhard Max "],"is-jest":false}, @@ -434,39 +537,39 @@ "159":{"url":"./tip/159.md","tk-ticket":"815751","created":"01-Oct-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 159: Extending Tk 'wm' Command to Support Coloured Icons","author":["Georgios Petasis "],"is-jest":false}, "158":{"url":"./tip/158.md","tk-ticket":"797404","created":"20-Sep-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 158: Distinguish the two 'Enter' keys on Windows","discussions-to":"news:comp.lang.tcl","author":["Wolfgang Großbauer ","Kevin Kenny "],"is-jest":false}, "157":{"url":"./tip/157.md","obsoletes":"144","created":"20-Sep-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 157: Argument Expansion with Leading {expand}","author":["Kevin B. Kenny ","Peter Spjuth ","Donal K. Fellows ","Don Porter "],"is-jest":false}, "156":{"url":"./tip/156.md","tcl-ticket":"809825","created":"20-Sep-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 156: Language-Neutral Root Locale for Msgcat","discussions-to":"news:comp.lang.tcl","author":["Kevin Kenny "],"is-jest":false}, "155":{"url":"./tip/155.md","tk-ticket":"791292","created":"08-Sep-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 155: Fix Some of the Text Widget's Limitations","author":["Vince Darley "],"is-jest":false}, - "154":{"url":"./tip/154.md","created":"03-Sep-2003","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 154: Add Named Colors to Tk","author":["Damon Courtney "],"is-jest":false}, + "154":{"url":"./tip/154.md","created":"03-Sep-2003","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 154: Add Named Colors to Tk","author":["Damon Courtney "],"is-jest":false}, "153":{"url":"./tip/153.md","created":"26-Aug-2003","post-history":"","state":"Final","implementation-url":"http://www.eecs.umich.edu/~mckay/computer/winfotop.patch","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 153: Enhancing the [winfo toplevel] Command","author":["Neil McKay "],"is-jest":false}, "152":{"url":"./tip/152.md","keywords":"Tk","obsoletes":"25","created":"26-Aug-2003","post-history":"","state":"Final","implementation-url":"http://hem.fyristorg.com/matben/download/MovableAlerts.dmg","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 152: New -detail Option for tk_messageBox","author":["Mats Bengtsson "],"is-jest":false}, "151":{"url":"./tip/151.md","created":"22-Aug-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 151: Remove -e: Command Line Option from tclsh and wish","author":["Don Porter ","Don Porter ","Donal K. Fellows "],"is-jest":false}, - "150":{"url":"./tip/150.md","created":"25-Jul-2003","keywords":"tk, send","post-history":"","state":"Deferred","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 150: Implement the Tk send Command for Windows","author":["Pat Thoyts "],"is-jest":false}, + "150":{"url":"./tip/150.md","created":"25-Jul-2003","keywords":"tk, send","post-history":"","state":"Deferred","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 150: Implement the Tk send Command for Windows","author":["Pat Thoyts "],"is-jest":false}, "149":{"url":"./tip/149.md","created":"13-Aug-2003","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 149: Allow \"enabled\" as Synonym for \"normal\" in -state Option","author":["Michael A. Cleverly "],"is-jest":false}, "148":{"url":"./tip/148.md","tcl-ticket":"489537","created":"08-Aug-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 148: Correct [list]-Quoting of the '#' Character","author":["Don Porter "],"is-jest":false}, "147":{"url":"./tip/147.md","tk-ticket":"659218","created":"05-Aug-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 147: Make Grid's Column/Row Configure Easier","author":["Peter Spjuth "],"is-jest":false}, "146":{"url":"./tip/146.md","created":"05-Aug-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 146: Add Overall Anchoring to the Grid Geometry Manager","author":["Peter Spjuth "],"is-jest":false}, "145":{"url":"./tip/145.md","tk-ticket":"780617","obsoletes":"64","created":"31-Jul-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 145: Enhanced Tk Font Handling","author":["Pat Thoyts "],"is-jest":false}, "144":{"url":"./tip/144.md","created":"26-Jul-2003","obsoleted-by":"157","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 144: Argument Expansion Syntax","author":["Peter Spjuth ","Donal K. Fellows ",""],"is-jest":false}, "143":{"url":"./tip/143.md","tcl-ticket":"926771","created":"25-Jul-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 143: An Interpreter Resource Limiting Framework","author":["Donal K. Fellows "],"is-jest":false}, "142":{"url":"./tip/142.md","keywords":"namespace, command lookup, search path","created":"23-Jul-2003","post-history":"","state":"Withdrawn","vote":"Pending","type":"Project","tcl-version":"8.5","title":"# TIP 142: Search Path Variable to Lookup Command Names in Namespaces","author":["Ulrich Schoebel "],"is-jest":false}, "141":{"url":"./tip/141.md","tk-ticket":"657656","created":"18-Jul-2003","post-history":"","state":"Final","vote":"Done","tcl-version":"8.5","type":"Project","title":"# TIP 141: Multiple Initial-Files in [tk_getOpenFile]","author":["David N. Welton "],"is-jest":false}, - "140":{"url":"./tip/140.md","created":"04-Jun-2003","post-history":"","state":"Deferred","vote":"Pending","tcl-version":"8.5","type":"Project","title":"# TIP 140: Tracing Namespace Modifications","author":["Donal K. Fellows "],"is-jest":false}, + "140":{"url":"./tip/140.md","created":"04-Jun-2003","post-history":"","state":"Deferred","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 140: Tracing Namespace Modifications","author":["Donal K. Fellows "],"is-jest":false}, "139":{"url":"./tip/139.md","created":"03-Jun-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 139: Publish Part of Tcl's Namespace API","author":["Donal K. Fellows "],"is-jest":false}, "138":{"url":"./tip/138.md","tcl-ticket":"731356","keywords":"thread specific data, hash table, memory allocation","created":"29-May-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 138: New TCL_HASH_KEY_SYSTEM_HASH option for Tcl hash tables","author":["Kevin Kenny ","Joe Mistachkin "],"is-jest":false}, "137":{"url":"./tip/137.md","tcl-ticket":"742683","created":"29-May-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 137: Specifying Script Encodings for [source] and tclsh","author":["Anton Kovalenko "],"is-jest":false}, - "136":{"url":"./tip/136.md","created":"25-May-2003","post-history":"","state":"Final","implementation-url":"http://homepage.ntlworld.com/whiteowl/tcl/tcl843-lrepeat.patch","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 136: Large List Initialisation","author":["Simon Geard "],"is-jest":false}, + "136":{"url":"./tip/136.md","obsoletes":"170","created":"25-May-2003","post-history":"","state":"Final","implementation-url":"http://homepage.ntlworld.com/whiteowl/tcl/tcl843-lrepeat.patch","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 136: Large List Initialisation","author":["Simon Geard "],"is-jest":false}, "135":{"url":"./tip/135.md","created":"17-May-2003","keywords":"dde","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 135: Change 'dde servername -exact' Option to -force","author":["Pat Thoyts "],"is-jest":false}, "134":{"url":"./tip/134.md","created":"12-May-2003","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 134: Subsystem Per-Thread Data Interfaces","author":["Colin McCormack "],"is-jest":false}, - "133":{"url":"./tip/133.md","created":"08-Apr-2003","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 133: Extending [expr] Operators","author":["Richard Suchenwirth "],"is-jest":false}, + "133":{"url":"./tip/133.md","created":"08-Apr-2003","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 133: Extending [expr] Operators","author":["Richard Suchenwirth "],"is-jest":false}, "132":{"url":"./tip/132.md","keywords":"floating point,IEEE,precision","created":"31-Mar-2003","post-history":"","state":"Final","tcl-branch":"kennykb-numerics-branch","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 132: Revised Floating-Point Conversions in Tcl","author":["Kevin Kenny ","Donal K. Fellows "],"is-jest":false}, "131":{"url":"./tip/131.md","created":"01-Apr-2003","post-history":"","state":"Draft","tcl-version":"8.5","vote":"No voting","type":"Project","title":"# TIP 131: Read My Mind and Do What I Mean","author":["Joe English "],"is-jest":true}, "130":{"url":"./tip/130.md","tcl-ticket":"690354","created":"23-Mar-2003","post-history":"","state":"Final","vote":"Done","type":"Project","tcl-version":"8.5","title":"# TIP 130: Unique DDE server names.","author":["Pat Thoyts "],"is-jest":false}, "129":{"url":"./tip/129.md","tcl-ticket":"858211","keywords":"IEEE,binary data,Tcl","created":"14-Mar-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 129: New Format Codes for the [binary] Command","author":["Arjen Markus ","Torsten Reincke "],"is-jest":false}, "128":{"url":"./tip/128.md","created":"13-Mar-2003","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 128: Ability to Install a Custom Memory Allocator","author":["Christophe Cap ","Mike Jackson "],"is-jest":false}, "127":{"url":"./tip/127.md","tcl-ticket":"693836","created":"26-Feb-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 127: Add an -index Option to [lsearch]","author":["Michael Schlenker "],"is-jest":false}, - "126":{"url":"./tip/126.md","created":"30-Jan-2003","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.0","type":"Project","title":"# TIP 126: Rich Strings for Representation Persistence","author":["Donal K. Fellows "],"is-jest":false}, + "126":{"url":"./tip/126.md","created":"30-Jan-2003","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.1","type":"Project","title":"# TIP 126: Rich Strings for Representation Persistence","author":["Donal K. Fellows "],"is-jest":false}, "125":{"url":"./tip/125.md","tk-ticket":"998125","keywords":"reparent,Tk","created":"20-Jan-2003","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 125: Converting between Frame and Toplevel Windows","author":["Brian Griffin ","Donal K. Fellows ","Sacha Schär "],"is-jest":false}, "124":{"url":"./tip/124.md","tcl-ticket":"656997","created":"20-Dec-2002","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 124: High-Resolution Absolute Time Values From [clock]","author":["Mark Harrison ","Kevin Kenny "],"is-jest":false}, "123":{"url":"./tip/123.md","tcl-ticket":"655176","keywords":"mathematics,evaluation","created":"16-Dec-2002","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 123: Adding an Exponentiation Operator to the [expr] Command","author":["Arjen Markus ","Donal K. Fellows "],"is-jest":false}, "122":{"url":"./tip/122.md","created":"12-Dec-2002","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 122: Use tcl_{non,}wordchars Throughout Tcl/Tk","author":["Martin Weber ","Vince Darley "],"is-jest":false}, "121":{"url":"./tip/121.md","tcl-ticket":"649313","created":"05-Dec-2002","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 121: Controlled Application Shutdown via Tcl_Exit","author":["Joe Mistachkin "],"is-jest":false}, @@ -502,11 +605,11 @@ "91":{"url":"./tip/91.md","created":"03-May-2002","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 91: Backward Compatibility for Channel Types with 32-bit SeekProcs","author":["Donal K. Fellows "],"is-jest":false}, "90":{"url":"./tip/90.md","tcl-ticket":"531640","created":"15-Mar-2002","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 90: Enable [return -code] in Control Structure Procs","author":["Don Porter ","Donal K. Fellows "],"is-jest":false}, "89":{"url":"./tip/89.md","created":"11-Mar-2002","obsoleted-by":"329","post-history":"","state":"Withdrawn","tcl-version":"8.6","vote":"Pending","type":"Project","title":"# TIP 89: Try/Catch Exception Handling in the Core","discussions-to":"news:comp.lang.tcl","author":["Tom Wilkason ","Frank Pilhofer <520065607613-0001@t-online.de>"],"is-jest":false}, "88":{"url":"./tip/88.md","created":"11-Mar-2002","obsoleted-by":"240","post-history":"","state":"Rejected","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 88: Extend Tcl Process Id Control via 'pid'","author":["Jeff Hobbs ","Vince Darley "],"is-jest":false}, "87":{"url":"./tip/87.md","tcl-ticket":"522849","keywords":"Tcl_SetRecusionLimit,recursion limit","created":"19-Feb-2002","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 87: Allow Tcl Access to the Recursion Limit","discussions-to":"news:comp.lang.tcl","author":["Stephen Trier ","Richard Suchenwirth "],"is-jest":false}, - "86":{"url":"./tip/86.md","created":"08-Feb-2002","post-history":"","state":"Draft","implementation-url":"http://pdqi.com/download/tclline-8.4.9.diff.gz","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 86: Improved Debugger Support","author":["Peter MacDonald ","Peter MacDonald "],"is-jest":false}, + "86":{"url":"./tip/86.md","created":"08-Feb-2002","post-history":"","state":"Draft","implementation-url":"http://pdqi.com/download/tclline-8.4.9.diff.gz","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 86: Improved Debugger Support","author":["Peter MacDonald ","Peter MacDonald "],"is-jest":false}, "85":{"url":"./tip/85.md","tcl-ticket":"521362","keywords":"test,string comparison,floating-point","created":"31-Jan-2002","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 85: Custom Comparisons in Tcltest","author":["Arjen Markus ","Don Porter "],"is-jest":false}, "84":{"url":"./tip/84.md","tk-ticket":"564642","created":"26-Feb-2002","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 84: Add control for mouse movement filtering","author":["Jyrki Alakuijala ","Jeff Hobbs "],"is-jest":false}, "83":{"url":"./tip/83.md","created":"24-Jan-2002","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 83: Augment Tcl_EvalFile with Tcl_EvalChannel and Tcl_EvalUrl","author":["Marian Szczepkowski ",""],"is-jest":false}, "82":{"url":"./tip/82.md","created":"10-Jan-2002","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 82: Add -offrelief Option to Checkbutton and Radiobutton","author":["D. Richard Hipp "],"is-jest":false}, "81":{"url":"./tip/81.md","created":"07-Jan-2002","post-history":"","state":"Withdrawn","vote":"Pending","type":"Process","title":"# TIP 81: [incr Tcl] Functional Areas for Maintainer Assignments","author":["Donal K. Fellows "],"is-jest":false}, @@ -519,11 +622,11 @@ "74":{"url":"./tip/74.md","tk-ticket":"481148","created":"12-Nov-2001","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 74: wm stackorder command","author":["Mo DeJong "],"is-jest":false}, "73":{"url":"./tip/73.md","created":"03-Nov-2001","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 73: Export Tcl_GetTime in the Public API","author":["Kevin Kenny "],"is-jest":false}, "72":{"url":"./tip/72.md","created":"05-Nov-2001","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 72: 64-Bit Value Support for Tcl on 32-Bit Platforms","author":["Donal K. Fellows "],"is-jest":false}, "71":{"url":"./tip/71.md","created":"26-Oct-2001","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 71: Tk Bitmap Image Improvements","author":["Chris Nelson ","Kevin Kenny ","Eric Melski ","Donal K. Fellows "],"is-jest":false}, "70":{"url":"./tip/70.md","created":"20-Oct-2001","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 70: A Relational Switch Control Structure","author":["Bhushit Joshipura ","Donal K. Fellows "],"is-jest":false}, - "69":{"url":"./tip/69.md","created":"16-Oct-2001","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 69: Improvements for the Tcl Hash Table","discussions-to":"news:comp.lang.tcl","author":["George A. Howlett ","Don Porter ","Donal K. Fellows "],"is-jest":false}, + "69":{"url":"./tip/69.md","created":"16-Oct-2001","post-history":"","state":"Draft","tcl-version":"9.1","vote":"Pending","type":"Project","title":"# TIP 69: Improvements for the Tcl Hash Table","discussions-to":"news:comp.lang.tcl","author":["George A. Howlett ","Don Porter ","Donal K. Fellows "],"is-jest":false}, "68":{"url":"./tip/68.md","created":"16-Oct-2001","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 68: Dynamic Trace Result Handling","author":["Donal K. Fellows "],"is-jest":false}, "67":{"url":"./tip/67.md","created":"09-Oct-2001","post-history":"","state":"Withdrawn","vote":"Pending","tcl-version":"8.5","type":"Project","title":"# TIP 67: Allow Subclassing of tk_getOpenFile, tk_getSaveFile on UNIX","author":["Chris Nelson ","Al Zielaskowski "],"is-jest":false}, "66":{"url":"./tip/66.md","keywords":"installation,initialisation,embedded,resources","created":"02-Oct-2001","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 66: Stand-alone and Embedded Tcl/Tk Applications","author":["Arjen Markus "],"is-jest":false}, "65":{"url":"./tip/65.md","created":"18-Sep-2001","post-history":"","state":"Rejected","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 65: Enhanced [info args]","author":["Glenn Jackman ","Don Porter ","Glenn Jackman "],"is-jest":false}, "64":{"url":"./tip/64.md","created":"27-Sep-2001","obsoleted-by":"145","post-history":"","state":"Deferred","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 64: Improvements to Windows Font Handling","author":["Chris Nelson ","Kevin Kenny "],"is-jest":false}, @@ -531,11 +634,11 @@ "62":{"url":"./tip/62.md","created":"18-Sep-2001","post-history":"","state":"Final","implementation-url":"http://www.employees.org/~hlavana/tcl/","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 62: Add Support for Command Tracing","author":["Hemang Lavana ","Vince Darley "],"is-jest":false}, "61":{"url":"./tip/61.md","created":"12-Sep-2001","post-history":"","state":"Deferred","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 61: Make TK_NO_SECURITY Run-Time Switchable","author":["Jeff Hobbs ","Donal K. Fellows "],"is-jest":false}, "60":{"url":"./tip/60.md","created":"06-Sep-2001","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 60: EXTERN Macro Change to Support a Wider Set of Attributes","author":["David Gravereaux ","Donal K. Fellows "],"is-jest":false}, "59":{"url":"./tip/59.md","tcl-ticket":"507083","created":"04-Sep-2001","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 59: Embed Build Information in Tcl Binary Library","author":["Andreas Kupries "],"is-jest":false}, "58":{"url":"./tip/58.md","created":"02-Sep-2001","post-history":"","state":"Rejected","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 58: Extend [set] to Assign Multiple Values to Multiple Variables","author":["Anselm Lingnau "],"is-jest":false}, - "57":{"url":"./tip/57.md","created":"30-Aug-2001","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 57: Move TclX's [lassign] into the Tcl Core","author":["Donal K. Fellows ","Agnar Renolen ","Don Porter "],"is-jest":false}, + "57":{"url":"./tip/57.md","obsoletes":"170","created":"30-Aug-2001","post-history":"","state":"Final","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 57: Move TclX's [lassign] into the Tcl Core","author":["Donal K. Fellows ","Agnar Renolen ","Don Porter "],"is-jest":false}, "56":{"url":"./tip/56.md","tcl-ticket":"455151","created":"28-Aug-2001","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 56: Standardize Call Interface to Tcl_Eval* Functions","author":["Miguel Sofer "],"is-jest":false}, "55":{"url":"./tip/55.md","created":"16-Aug-2001","post-history":"","state":"Draft","vote":"No voting","type":"Informative","title":"# TIP 55: Package Format for Tcl Extensions","author":["Steve Cassidy ","Larry W. Virden "],"is-jest":false}, "54":{"url":"./tip/54.md","created":"16-Aug-2001","post-history":"","state":"Withdrawn","vote":"Pending","type":"Process","title":"# TIP 54: Using PURLs to Unite the Tcl Webspace","author":["Andreas Kupries ","Jeff Hobbs "],"is-jest":false}, "53":{"url":"./tip/53.md","keywords":"bytecode,compiler","created":"14-Aug-2001","post-history":"","state":"Withdrawn","tcl-version":"8.4","vote":"Pending","type":"Project","title":"# TIP 53: Addition of 'assert' Command","author":["Gerald W. Lester ","Kevin Kenny "],"is-jest":false}, "52":{"url":"./tip/52.md","keywords":"namespace,lookup,hierarchy","created":"09-Aug-2001","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 52: Hierarchical Namespace Lookup of Commands and Variables","discussions-to":"news:comp.lang.tcl","author":["David Cuthbert ","Andreas Kupries "],"is-jest":false}, @@ -557,20 +660,20 @@ "36":{"url":"./tip/36.md","created":"13-Jun-2001","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 36: Library Access to 'Subst' Functionality","author":["Donal K. Fellows "],"is-jest":false}, "35":{"url":"./tip/35.md","tcl-ticket":"438509","created":"06-Jun-2001","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 35: Enhanced Support for Serial Communications","author":["Rolf Schroedter "],"is-jest":false}, "34":{"url":"./tip/34.md","created":"03-May-2001","post-history":"","state":"Withdrawn","tcl-version":"8.5","vote":"Done","type":"Project","title":"# TIP 34: Modernize TEA Build System","author":["Mo DeJong ","Andreas Kupries "],"is-jest":false}, "33":{"url":"./tip/33.md","created":"15-May-2001","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 33: Add 'lset' Command to Assign to List Elements","discussions-to":"news:comp.lang.tcl,mailto:kennykb@acm.org","author":["Kevin Kenny "],"is-jest":false}, "32":{"url":"./tip/32.md","keywords":"trace,Tcl_Obj","created":"23-Mar-2001","post-history":"","state":"Final","tcl-version":"8.4a4","vote":"Done","type":"Project","title":"# TIP 32: Add Tcl_Obj-enabled counterpart to Tcl_CreateTrace","discussions-to":"news:comp.lang.tcl","author":["David Cuthbert ","Kevin Kenny "],"is-jest":false}, - "31":{"url":"./tip/31.md","created":"12-Mar-2001","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 31: CVS tags in the Tcl and Tk repositories","author":["Don Porter ","miguel sofer ","Jeff Hobbs ","Kevin Kenny ","David Gravereaux ","Donal K. Fellows ","Andreas Kupries ","Donal K. Fellows ","","Kevin Kenny "],"is-jest":false}, - "30":{"url":"./tip/30.md","created":"09-Mar-2001","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 30: Tk Toolkit Maintainer Assignments","author":["Don Porter ","Donal K. Fellows ","Jan Nijtmans ","Todd M. Helfter ","Chengye Mao ","George B. Smith ","Miguel Bañón ","Daniel Steffen ","Peter Spjuth ","Jeff Hobbs ","Vince Darley ","Donal K. Fellows ","Benjamin Riefenstahl ","Pat Thoyts ","Vince Darley ","Peter Spjuth "],"is-jest":false}, + "31":{"url":"./tip/31.md","created":"12-Mar-2001","post-history":"","obsoleted-by":"386","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 31: CVS tags in the Tcl and Tk repositories","author":["Don Porter ","miguel sofer ","Jeff Hobbs ","Kevin Kenny ","David Gravereaux ","Donal K. Fellows ","Andreas Kupries ","Donal K. Fellows ","","Kevin Kenny "],"is-jest":false}, + "30":{"url":"./tip/30.md","created":"09-Mar-2001","post-history":"","obsoleted-by":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 30: Tk Toolkit Maintainer Assignments","author":["Don Porter ","Donal K. Fellows ","Jan Nijtmans ","Todd M. Helfter ","Chengye Mao ","George B. Smith ","Miguel Bañón ","Daniel Steffen ","Peter Spjuth ","Jeff Hobbs ","Vince Darley ","Donal K. Fellows ","Benjamin Riefenstahl ","Pat Thoyts ","Vince Darley ","Peter Spjuth "],"is-jest":false}, "29":{"url":"./tip/29.md","created":"07-Mar-2001","post-history":"","state":"Rejected","tcl-version":"9.0","vote":"Done","type":"Project","title":"# TIP 29: Allow array syntax for Tcl lists","discussions-to":"news:comp.lang.tcl,mailto:kennykb@acm.org","author":["Kevin Kenny ","Donal K. Fellows "],"is-jest":false}, "28":{"url":"./tip/28.md","created":"23-Feb-2001","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 28: How to be a good maintainer for Tcl/Tk","author":["Don Porter "],"is-jest":false}, "27":{"url":"./tip/27.md","created":"25-Feb-2001","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 27: CONST Qualification on Pointers in Tcl API's","discussions-to":"news:comp.lang.tcl,mailto:kennykb@acm.org","author":["Kevin Kenny "],"is-jest":false}, "26":{"url":"./tip/26.md","obsoletes":"19","created":"20-Feb-2001","post-history":"","state":"Final","implementation-url":"https://core.tcl-lang.org/tips/raw/assets/26.patch","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 26: Enhancements for the Tk Text Widget","discussions-to":"news:comp.lang.tcl","author":["Ludwig Callewaert ","Ludwig Callewaert "],"is-jest":false}, "25":{"url":"./tip/25.md","created":"07-Feb-2001","post-history":"","obsoleted-by":"152","state":"Withdrawn","vote":"Pending","tcl-version":"8.5","type":"Project","title":"# TIP 25: Native tk_messageBox on Macintosh","author":["Mats Bengtsson "],"is-jest":false}, - "24":{"url":"./tip/24.md","created":"29-Jan-2001","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 24: Tcl Maintainer Assignments","author":["Don Porter ","Donal K. Fellows ","Kevin B. Kenny ","Jeff Hobbs ","Pavel Goran ","Daniel A. Steffen ","miguel sofer "],"is-jest":false}, + "24":{"url":"./tip/24.md","created":"29-Jan-2001","post-history":"","obsoleted-by":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 24: Tcl Maintainer Assignments","author":["Don Porter ","Donal K. Fellows ","Kevin B. Kenny ","Jeff Hobbs ","Pavel Goran ","Daniel A. Steffen ","miguel sofer "],"is-jest":false}, "23":{"url":"./tip/23.md","created":"22-Jan-2001","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 23: Tk Toolkit Functional Areas for Maintainer Assignments","author":["Kevin Kenny ","Jim Ingham ","Don Porter ","Daniel A. Steffen ","Donal K. Fellows "],"is-jest":false}, - "22":{"url":"./tip/22.md","keywords":"lindex,multiple arguments,sublists","created":"19-Jan-2001","post-history":"","state":"Final","tcl-version":"8.4a2","vote":"Done","type":"Project","title":"# TIP 22: Multiple Index Arguments to lindex","discussions-to":"news:comp.lang.tcl,mailto:kennykb@acm.org","author":["David Cuthbert ","Kevin Kenny ","Don Porter ","Donal K. Fellows "],"is-jest":false}, + "22":{"url":"./tip/22.md","obsoletes":"170","keywords":"lindex,multiple arguments,sublists","created":"19-Jan-2001","post-history":"","state":"Final","tcl-version":"8.4a2","vote":"Done","type":"Project","title":"# TIP 22: Multiple Index Arguments to lindex","discussions-to":"news:comp.lang.tcl,mailto:kennykb@acm.org","author":["David Cuthbert ","Kevin Kenny ","Don Porter ","Donal K. Fellows "],"is-jest":false}, "21":{"url":"./tip/21.md","created":"14-Jan-2001","post-history":"","state":"Final","implementation-url":"http://www.hwaci.com/sw/asym_pad_patch_2.txt","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 21: Asymmetric Padding in the Pack and Grid Geometry Managers","author":["D. Richard Hipp "],"is-jest":false}, "20":{"url":"./tip/20.md","created":"08-Jan-2001","post-history":"","state":"Deferred","vote":"Pending","tcl-version":"8.5","type":"Project","title":"# TIP 20: Add C Locale-Exact CType Functions","author":["Jeffrey Hobbs "],"is-jest":false}, "19":{"url":"./tip/19.md","created":"03-Jan-2001","post-history":"","obsoleted-by":"26","state":"Final","tcl-version":"8.4a2","vote":"Done","type":"Project","title":"# TIP 19: Add a Text Changed Flag to Tk's Text Widget","author":["Neil McKay "],"is-jest":false}, "18":{"url":"./tip/18.md","created":"12-Dec-2000","post-history":"","state":"Final","tcl-version":"8.4","vote":"Done","type":"Project","title":"# TIP 18: Add Labels to Frames","author":["Peter Spjuth "],"is-jest":false}, "17":{"url":"./tip/17.md","created":"17-Nov-2000","post-history":"","state":"Final","tcl-version":"8.4.0","vote":"Done","type":"Project","title":"# TIP 17: Redo Tcl's filesystem","author":["Vince Darley "],"is-jest":false}, @@ -590,7 +693,7 @@ "3":{"url":"./tip/3.md","created":"14-Sep-2000","obsoleted-by":"467","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries ","Donal K. Fellows "],"is-jest":false}, "2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries ","Donal K. Fellows ","Don Porter ","Mo DeJong ","Larry W. Virden ","Kevin Kenny "],"is-jest":false}, "1":{"url":"./tip/1.md","created":"14-Sep-2000","obsoleted-by":"386","post-history":"","state":"Withdrawn","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor "],"is-jest":false}, "0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout "],"is-jest":false}, "@min": 0, - "@max": 591 -}, "@timestamp": 1605448199} + "@max": 694 +}, "@timestamp": 1713812926} Index: index.md ================================================================== --- index.md +++ index.md @@ -15,175 +15,44 @@

- - + State: - - Accepted - - - Deferred - - - Draft - - - Final - - - Obsoleted - - - Rejected - - - Voting - - - Withdrawn - + Accepted + Deferred + Draft + Final + Obsoleted + Rejected + Withdrawn
Type: - - Informational - - - Process - - - Project - - - Humor - + Informational + Process + Project + Humor
Version: - - 8.0 - - - 8.4 - - - 8.5 - - - 8.6 - - - 8.7 - - - 9.0 - - - 9.2 - + 8.0 + 8.4 + 8.5 + 8.6 + 8.7 + 9.0 + 9.1 + 9.2

@@ -211,23 +80,845 @@ Status Title Impl. + +694 +Project +any +Draft +Define a definite test environment + + + +693 +Project +8.7 and 9.0 +Final +Restart the changes files + + + +692 +Project +9.0 +Final +Revise Tcl_GetAliasObj, remove Tcl_GetAlias() +Link + + +691 +Project +8.7 and 9.0 +Draft +Setting -profile for tclsh/wish and the "source"/"open" commands. +Link + + +690 +Project +9.0 +Final +Make "clock scan -valid 1" the default +Link + + +689 +Project +8.7 and 9.0 +Draft +"namespace unknown" independent on caller namespace +Link + + +688 +Project +8.7 +Final +clock command revision and speedup +Link + + +687 +Project +9.1 +Draft +locale support for word handling in text and entry +Link + + +686 +Project +8.7 +Final +Make NextWord/SelectNextWord behavior platform-independant +Link + + +685 +Project +8.7 +Obsoleted +rename "string is unicode" to "string is transferable" +Link + + +684 +Project +8.7 +Final +Add Support for Touchpad Scrolling to Tk +Link + + +683 +Project +9.0 +Final +Remove legacy "pack" and "scrollbar" syntax +Link + -591 +682 Project 8.7 Draft -Rotate ttk::notebook window wtih mousewheel on tab +Create tmp. widget in "option get" call + + + +681 +Project +9.0 +Final +Ttk "size"-related options +Link + + +680 +Project +9.1 +Withdrawn +Enhance definition of a "number" in Tcl +679 +Project +8.7 +Draft +General access to X window properties +Link + + +678 +Project +9.0 +Final +Better API for Detached Treeview Items +Link + + +677 +Project +9.0 +Final +Constant Variables +Link + + +676 +Project +9.1 +Draft +An "expr" alternative - "calc" command aliased to "=" + + + +675 +Project +8.7 +Final +Control cursor blinking cycle in Ttk widgets. +Link + + +674 +Project +9.1 +Draft +a new multiple expression command + + + +673 +Project +9.0 +Final +Remove deprecated [trace] subcommands +Link + + +672 +Project +9.1 +Draft +Extend $ substitution to include expressions as $(expression) +Link + + +671 +Project +9.1 +Draft +New encoding profile - lossless +Link + + +670 +Project +8.7 +Final +Simple Extra Procedures for File Access +Link + + +669 +Project +9.1 +Draft +Pipe PIDs as Channel Property +Link + + +668 +Project +9.1 +Draft +Consolidate all Tcl_Attempt* functions. +Link + + +667 +Project +9.0 +Obsoleted +Make "strict" the default encoding profile. +Link + + +666 +Project +8.7 +Final +Change ptrdiff_t → Tcl_Size in Tcl 8.7 (and 9.0) +Link + + +665 +Project +8.7 +Final +Remove support for internal utf-16 for Tcl 8.7 (and 9.0) +Link + + +664 +Project +9.0 +Obsoleted +Enable compiler warnings for missing int → Tcl_Size conversions +Link + + +663 +Project +8.7 +Final +Cease distribution of the ChangeLog files +Link + + +662 +Project +8.6 +Final +Un-deprecate Tcl_VarEval +Link + + +661 +Project +9.0 +Final +Disable the Tcl 8 compatibility macros in Tcl 9 by default +Link + + +660 +Project +8.7 +Final +Use signed types for lengths and indices +Link + + +659 +Project +9.0 +Withdrawn +Allow other default profiles than "strict" +Link + + +658 +Project +8.7 +Final +Attach identifiers to Tk menu entries +Link + + +657 +Project +9.0 +Final +Make "-profile strict" the default in Tcl 9.0 +Link + + +656 +Project +8.7 +Final +A revised proposal for encodings +Link + + +655 +Project +8.7 +Final +Support the styleMask property for NSWindow and NSPanel in Aqua +Link + + +654 +Project +8.7 +Obsoleted +Profiles for character encoding/decoding behaviour + + + +653 +Project +8.7 +Final +Handle consumed data of channel commands in case of encoding errors +Link + + +652 +Project +8.7 +Final +Remove "string is unicode" and Tcl_CharIsUnicode" + + + +651 +Project +8.7 +Final +Expose TclDStringToObj via stubs table +Link + + +650 +Project +8.7 +Final +New function Tcl_GetWideUIntFromObj() +Link + + +649 +Project +9.1 +Draft +Expose additional list functionality in the C API +Link + + +648 +Project +8.7 +Final +New functions Tcl_NewWideUIntObj()/Tcl_SetWideUIntObj() +Link + + +647 +Project +9.0 +Final +Change Tk_ConfigureWidgets signature, abandon TK_CONFIG_OBJS +Link + + +646 +Project +8.7 +Final +Change -eofchar handling +Link + + +645 +Project +8.7 +Final +ttk color palette support +Link + + +644 +Project +9.0 +Final +Make Tcl_ObjType extensible +Link + + +643 +Project +8.7 +Final +Provide a public API to retrieve nul terminator length for an encoding +Link + + +642 +Project +8.7 +Final +Let TK_OPTION_BOOL/TK_OPTION_STRING_TABLE handle (C99) bool/enum. +Link + + +641 +Project +8.7 +Final +Let Tcl_GetBoolean(FromObj) handle (C99) bool. +Link + + +640 +Project +9.0 +Final +Remove Tcl_SaveResult +Link + + +639 +Project +8.7 +Final +Include the mac_styles features in Tk 8.7 +Link + + +638 +Project +8.7 +Final +New public routines Tcl_GetNumber(FromObj) +Link + + +637 +Project +9.0 +Final +Make [glob] always -nocomplain +Link + + +636 +Project +9.0 +Final +Expand List Flexibility with Abstract List Tcl_Obj Type +Link + + +635 +Project +9.0 +Withdrawn +Introspection for 'upvar' and 'namespace upvar' +Link + + +634 +Project +9.0 +Final +Remove inconsistency in variable tracing of an array +Link + + +633 +Project +8.7 +Final +configure channel about channel encoding error reporting mode +Link + + +632 +Project +8.7 +Final +return gif animated metadata +Link + + +631 +Project +8.7 +Final +ledit - a generalized insert/delete command for list variables +Link + + +630 +Project +8.7 +Final +TclOO commands > 2^31 (for 8.7) +Link + + +629 +Project +8.7 +Final +Add a lseq (formally "range") command to the core of list commands +Link + + +628 +Project +9.0 +Final +Shared 8.7/9.0 build environment +Link + + +627 +Project +8.7 +Final +New functions for handling commands > 2^31 elements (for 8.7) +Link + + +626 +Project +9.1 +Draft +Command arguments > 2^31 elements +Link + + +625 +Project +8.7 +Final +Re-implementation of lists +Link + + +624 +Project +8.7 +Final +Deprecate Tcl_MakeSafe +Link + + +623 +Project +8.6.13 +Final +Bless negative index arguments to Tcl_GetRange +Link + + +622 +Project +8.7 +Final +Full Unicode for Tcl 8.7 +Link + + +621 +Project +8.7 +Final +Glyph clustering for Tk +Link + + +620 +Project +8.7 +Final +Treeview cell padding. +Link + + +619 +Project +9.0 +Final +New TCL\_COMBINE flag for Tcl\_UniCharToUtf() +Link + + +618 +Project +8.7 +Final +New Tcl\_GetBool* functions with TCL\_NULL\_OK flag +Link + + +617 +Project +8.7 +Final +Tcl_WCharLen/Tcl_Char16Len +Link + + +616 +Project +9.0 +Final +Tcl lists > 2^31 elements +Link + + +615 +Project +9.1 +Draft +string is index +Link + + +614 +Project +8.7 +Rejected +Windows: OS: WTSSESSION change notification +Link + + +613 +Project +8.7 +Final +New INDEX\_NULL\_OK flag for Tcl_GetIndexFromObj*() +Link + + +612 +Project +9.1 +Draft +Setting WM_CLASS for main/root window + + + +611 +Project +9.1 +Draft +Add subcommands to the "photo image" command to rotate and reflect an image +Link + + +610 +Project +8.7 +Final +Icon Badges + + + +609 +Project +8.7 +Final +Enhance Tcl_ThreadQueueEvent() +Link + + +608 +Project +8.6 +Final +Add virtual event when font configuration changes +Link + + +607 +Project +8.7 +Final +-failindex option for encoding convertto/convertfrom +Link + + +606 +Project +8.7 +Final +Export more private Tk functions +Link + + +605 +Project +8.7 +Final +Function to get class name from object +Link + + +604 +Project +8.7 +Final +Printing Support for Text and Canvas Widgets + + + +603 +Project +8.7 +Final +Get 'stat' Information of Open Files +Link + + +602 +Project +9.0 +Final +Remove tilde expansion in file paths. +Link + + +601 +Project +9.0 +Withdrawn +Make "encoding convertto/convertfrom" throw exceptions +Link + + +600 +Informational +Draft +Migration guide for Tcl 8.6/8.7/9.0 + + +599 +Project +8.7 +Final +Extended build information +Link + + +598 +Project +8.7 +Final +export TclWinConvertError +Link + + +597 +Project +8.7 +Final +"string is unicode" and better utf-8/utf-16/cesu-8 encodings +Link + + +596 +Project +9.0 +Final +Stubs support for Embedding Tcl in other applications +Link + + +595 +Project +9.0 +Final +Unicode-aware/case-sensitive Loadable Library handling +Link + + +594 +Project +8.7 +Final +Modernize "file stat" interface +Link + + +593 +Project +8.7 +Obsoleted +Efficient List Item Existence-Test-and-Take + + + +592 +Project +8.7 +Final +Stop support for Windows XP, Server 2003, Vista, Server 2008 +Link + + +591 +Project +8.7 +Final +Rotate ttk::notebook window with mousewheel on tab +Link + + 590 Project 8.7 -Draft +Final Recommend lowercase Package Names Link 589 @@ -235,15 +926,15 @@ 8.7 Withdrawn Deprecate "-fg", "-bg", "-bd" options in Tk. Link - + 588 Project 8.7 -Voting +Final Unicode for (X11) keysyms Link 587 @@ -251,15 +942,15 @@ 9.0 Final Default utf-8 for source command Link - + 586 Project 8.7 -Voting +Final C String Parsing Support for binary scan Link 585 @@ -275,14 +966,14 @@ 8.7 Final Better introspection for ttk Link - + 583 Project -8.7 +9.1 Draft Add Option to Limit Depth of Execution Step Traces for Procs @@ -307,15 +998,15 @@ 8.7 Final Export Tk_GetDoublePixelsFromObj and 5 more Link - + 579 Project 8.7 -Draft +Final Improved auto_path for Safe Base interpreters Link 578 @@ -323,31 +1014,31 @@ 8.7 Final Death to TCL_DBGX Link - + 577 Project 8.7 -Draft +Final Enhanced index values for Tk -Link +Link - + 576 Project -8.7 +9.1 Draft Poor-mans Table listbox enhancement - + 575 Project 8.7 -Draft +Final Switchable Tcl\_UtfCharComplete()/Tcl\_UtfNext()/Tcl\_UtfPrev() Link 574 @@ -355,22 +1046,22 @@ 8.7 Final Add a 'tag delete' command to the ttk::treeview widget Link - + 573 Project 8.7 -Draft +Withdrawn Surrogates are invalid Link - + 572 Project -9.0 +9.1 Draft Implement a mechanism to specify the procedure/lambda/method argument call types (Evaluation strategy) @@ -379,39 +1070,39 @@ 8.6 Withdrawn Make TclX's profiler work properly with Tcl 8.6 - + 570 Project -8.7 +9.0 Draft Gesture Support for Finger Scrolling and "Pinch to Zoom" - +Link 569 Project 8.7 Final Eliminate Comments That Serve Lint - + 568 Project 9.0 -Draft +Final Revise ByteArray Routines To Support Proper Value Extraction -Link +Link - + 567 Project 8.7 -Voting +Final Add Operation to Support Set-like Slots Link 566 @@ -451,22 +1142,22 @@ 8.7 Final Deprecate channel types 1-4 Link - + 561 Project -8.7 +9.1 Draft Add console Command to Unix Link - + 560 Project -8.7 +9.1 Draft Megawidget Configure/Property Support Link @@ -475,15 +1166,15 @@ 9.0 Final Eliminate public routine `Tcl_FreeResult` Link - + 558 Project 8.7 -Draft +Final Basic Configure Support for TclOO Link 557 @@ -491,14 +1182,14 @@ 8.7 Final C++ support for Tcl Link - + 556 Project -8.7 +9.0 Deferred Add oo like widgets to Tk Link @@ -507,31 +1198,31 @@ 8.6 Obsoleted Enable listing of layouts in ttk::Themes - + 554 Project -8.6 +9.1 Draft Library file system for Tcl and Tk core using an C-based VFS Link - + 553 Project -8.7 +9.1 Draft Ellipses: the Alternative to Scrolling and Wrapping - + 552 Project 8.7 -Draft +Final Extended treeview functionality. Link 551 @@ -539,23 +1230,23 @@ 8.7 Final Permit underscore in numerical literals in source code Link - + 550 Project -9.0 +9.1 Draft Garbage Collection for TclOO - + 549 Project 8.7 -Draft +Withdrawn Make configure --enable-64bit the default Link 548 @@ -619,14 +1310,14 @@ 8.6 Final Add support for 'end' index in ttk::combobox current Link - + 540 Project -8.7 +9.1 Draft Add -signal Channel Configure Option to POSIX Pipes @@ -667,14 +1358,14 @@ 8.6 Final Remove trailing zeroes in scale ticks Link - + 534 Project -8.7 +9.1 Draft Faster Hashing of Small Integers Link @@ -691,15 +1382,15 @@ 8.6 Final Re-implementation of event loop processing Link - + 531 Project 8.7 -Draft +Rejected Static Tcl Interpreter Creation Function Link 530 @@ -707,17 +1398,17 @@ 8.6 Draft Control over performance impact of TIP 280 Link - + 529 Project 8.7 -Draft -Add metadata dict property to tk photo image -Link +Final +Add metadata dictionary property to tk photo image +Link 528 Project 8.7 @@ -731,14 +1422,14 @@ 8.7 Final New measurement facilities in TCL: New command timerate Link - + 526 Project -9.0 +9.1 Draft Make [expr] Only Accept One Argument Link @@ -779,14 +1470,14 @@ 8.7 Final Floating Point Classification Functions Link - + 520 Project -8.7 +9.1 Draft Make NaN Quiet Link @@ -835,38 +1526,38 @@ 8.7 Final Platform differences in handling int/wide Link - + 513 Project -8.7 +9.1 Draft Better support for 'agendas' as arrays, dictionaries or lists -Link +Link 512 Project 8.7 Final No stub for Tcl_SetExitProc() Link - + 511 Project 8.7 -Accepted +Final Implement Tcl_AsyncMarkFromSignal() -Link +Link - + 510 Project -8.7 +9.0 Deferred Add Rbc and Tkpath widgets to Tk Link @@ -955,14 +1646,14 @@ 8.7 Final Custom locale search list for msgcat Link - + 498 Project -8.7 +9.1 Draft Simplify Tcl_DeleteNamespace Link @@ -979,24 +1670,24 @@ 8.7 Final Display hints in ::entry ::spinbox ::ttk::entry ::ttk::spinbox and ::ttk::combobox Link - + 495 Project -8.7 +9.1 Draft Tcl Based Build System for TEA projects 494 Project 9.0 Final -More use of size_t in Tcl 9 +More use of size_t/ptrdiff_t in Tcl 9 Link 493 Project @@ -1091,30 +1782,30 @@ 8.7 Final Record Tk demo directory information Link - + 481 Project 8.7 -Draft -`Tcl_GetStringFromObj()` with `size_t` length parameter +Final +`Tcl_GetStringFromObj()` with `ptrdiff_t` length parameter Link - + 480 Project -8.7 +9.1 Draft Type and Alias Assertions for Tcl Link - + 479 Project -8.7 +9.1 Draft Add Named Procedures as a New Command in Tcl (dictargs::proc) Link @@ -1171,14 +1862,14 @@ 8.7 Final Add Support for 0d Radix Prefix to Integer Literals Link - + 471 Project -8.7 +9.1 Draft Add [info linkedname] Introspection Command Link @@ -1187,45 +1878,45 @@ 8.7 Final Reliable Access to OO Definition Context Object Link - + 469 Project -8.7 +9.1 Draft A Callback for Channel-Exception Conditions Link - + 468 Project 8.7 -Draft +Final Support Passing TCP listen Backlog Size Option to TCP Socket Creation Link 467 Process Final Move TIP Collection to Fossil - + 466 Project -8.7 +9.1 Draft Revised Implementation of the Text Widget Link - + 465 Project -8.7 -Draft +9.0 +Final Change Rule 8 of the Dodekalogue to Cut Some Corner Cases Link 464 @@ -1257,14 +1948,14 @@ 8.7 Final Separate Numeric and String Comparison Operators Link - + 460 Project -9.0 +9.1 Draft An Alternative to Upvar Link @@ -1281,14 +1972,14 @@ 8.7 Final Add Support for epoll() and kqueue() in the Notifier Link - + 457 Project -8.7 +9.1 Draft Add Support for Named Arguments Link @@ -1297,54 +1988,54 @@ 8.7 Final Extend the C API to Support Passing Options to TCP Server Creation Link - + 455 Project 8.7 -Draft +Final Extensions to [vwait]: Variable Sets and Scripted Access to Tcl_DoOneEvent - +Link 454 Project 8.6.6 Withdrawn Automatically Resize Frames After Last Child Removed - + 453 Project -8.7 +9.1 Draft Tcl Based Automation for tcl/pkgs Link - + 452 Project -8.7 +9.1 Draft Add "stubs" Package to or Along Side of TclTest Link - + 451 Project 8.7 -Draft +Obsoleted Modify [update] to Give Full Script Access to Tcl_DoOneEvent Link - + 450 Project -8.7 +9.1 Draft Add [binary] subcommand "set" for in-place modification Link @@ -1353,14 +2044,14 @@ 8.7 Final [text] undo/redo to Return Range of Characters Link - + 448 Project -8.7 +9.1 Draft Update Tcl_SetNotifier to Reinitialize Event Loop Link @@ -1425,15 +2116,15 @@ 8.5 Final Add engine to tcl_platform Array Link - + 439 Project 8.7 -Draft +Obsoleted Semantic Versioning Link 438 @@ -1513,14 +2204,14 @@ 8.6.2 Final A 'string' Subcommand for Concatenation Link - + 428 Project -8.7 +9.1 Draft Produce Error Dictionary from 'fconfigure -error' Link @@ -1545,22 +2236,22 @@ 8.7 Final Correct use of UTF-8 in Panic Callback (Windows only) Link - + 424 Project -8.7 +9.1 Draft Improving [exec] Link - + 423 Project -8.7 +9.1 Draft Formatting Timestamps with Milliseconds @@ -1577,38 +2268,38 @@ 8.7 Final A Command for Iterating Over Arrays Link - + 420 Project -8.7 +9.1 Draft 'vexpr', a Vector Expression Command Link - + 419 Project -8.7 +9.1 Draft A New Command for Binding to Tk Events Link - + 418 Project -8.7 +9.1 Draft Add [binary] Subcommands for In-Place Modification - + 417 Project -8.7 +9.1 Draft Use Explicit Option Names for "file tempfile" @@ -1649,38 +2340,38 @@ 8.6 Final Dynamic Locale Changing for msgcat with On-Demand File Load Link - + 411 Project -8.7 +9.1 Draft Improved Channel Introspection via "chan info" Link - + 410 Project -8.7 +9.1 Draft Three Features of scan Adapted for binary scan/format - + 409 Project -8.7 +9.1 Draft UDP in Tcl - + 408 Project -8.7 +9.1 Draft Allow Any Command for expr Functions @@ -1719,22 +2410,22 @@ 8.6 Final Web Colors for Tk Link - + 402 Project 8.7 -Draft +Final General Platform UNC Support -Link +Link - + 401 Project -8.7 +9.1 Draft Comment Words with Leading {#} Link @@ -1783,30 +2474,30 @@ 8.6 Final New 'string is entier' Command Link - + 394 Project 8.7 -Draft +Obsoleted Platform-Independent Handling of Contemporary Mice - + 393 Project -8.7 +9.1 Draft Add -command Option to lsearch Link - + 392 Project -8.7 +9.1 Draft Allow Bignums to be Disabled at Runtime on a Per-Interp Basis @@ -1815,14 +2506,14 @@ 8.7 Obsoleted Support for UDP Sockets in Tcl - + 390 Project -8.7 +9.1 Draft A Logging API for Tcl @@ -1853,22 +2544,22 @@ 386 Informational Draft Relocation of Tcl/Tk Source Control Repositories - + 385 Project -9.0 +9.1 Draft Functional Traces On Variables - + 384 Project -8.7 +9.1 Draft Add File Alteration Monitoring to the Tcl Core @@ -1901,14 +2592,14 @@ 8.6 Final TclOO Slots for Flexible Declarations Link - + 379 Project -8.7 +9.1 Draft Add a Command for Delivering Events Without Tk Link @@ -1941,14 +2632,14 @@ 8.6 Obsoleted Symmetric Coroutines and Yieldto - + 374 Project -8.7 +9.1 Draft Stackless Vwait @@ -1965,30 +2656,30 @@ 8.6 Obsoleted Multi-argument Yield for Coroutines - + 371 Project -8.7 +9.1 Draft Improvements for the dict command - + 370 Project -8.7 +9.1 Draft Extend Tk's selection with a -time option - + 369 Project -8.7 +9.1 Draft Widget cargo command Link @@ -2005,17 +2696,17 @@ 8.7 Final A Command to Remove Elements from a List Link - + 366 Project -8.7 -Draft +9.0 +Rejected Variable Sized Indicators for Menubuttons -Link +Link 365 humor 8.6 @@ -2029,14 +2720,14 @@ 8.6 Final Threading Support: Configuration and Package - + 363 Project -9.0 +9.1 Draft Vector Math in the Tcl Core @@ -2045,14 +2736,14 @@ 8.6 Final Simple 32 and 64 bit Registry Support Link - + 361 Project -8.7 +9.1 Draft Releasing Channel Buffers @@ -2069,14 +2760,14 @@ 8.6 Final Extended Window Manager Hint Support Link - + 358 Project -8.7 +9.1 Draft Suppress Empty List Element Generation from the Split Command @@ -2093,14 +2784,14 @@ 8.6 Final NR-enabled Substitutions for Extensions - + 355 Project -8.7 +9.1 Draft Stop Fast Recycling of Channel Names on Unix Link @@ -2137,14 +2828,14 @@ 350 Informational Draft Tcl Database Connectivity - Corrigenda - + 349 Project -8.7 +9.1 Draft New "-cargo" option for every Tk widget @@ -2161,33 +2852,33 @@ 8.7 Obsoleted Align 'string is ...' to Type-Conversion Functions in 'expr' - + 346 Project 8.7 -Draft +Obsoleted Error on Failed String Encodings - +Link 345 Project 8.7 Final Kill the 'identity' Encoding Link - + 344 Project 8.7 -Draft +Final Bring TCP_NODELAY and SO_KEEPALIVE to socket options - +Link 343 Project 8.6 @@ -2265,14 +2956,14 @@ 8.6 Withdrawn Make 'lrepeat' Accept Zero as a Count - + 333 Project -8.7 +9.1 Draft New Variable and Namespace Resolving Interface @@ -2329,15 +3020,15 @@ 8.6 Final Add -stride Option to lsort Link - + 325 Project 8.7 -Draft +Final System Tray and System Notification Access 324 @@ -2377,14 +3068,14 @@ 8.6 Final Improved Variable Handling in the Core Object System Link - + 319 Project -8.7 +9.1 Draft Implement Backwards Compatibility for ttk Themed Widgets in tk Widgets @@ -2455,14 +3146,14 @@ 8.6 Rejected Add a New Pseudo-Random Number Generator - + 309 Project -8.7 +9.1 Draft Expose the Expression Parsing @@ -2501,22 +3192,22 @@ 8.6 Final A Standalone [chan pipe] Primitive for Advanced Child IPC Link - + 303 Project -8.7 +9.1 Draft Enhance 'llength' Command to Support Nested Lists - + 302 Project -8.7 +9.1 Draft Fix "after"'s Sensitivity To Adjustments Of System Clock @@ -2549,30 +3240,30 @@ 8.5 Final Revise Shared Value Rules for Tcl_GetBignumAndClearObj Link - + 297 Project 8.7 -Draft +Obsoleted Integer Type Introspection and Conversion - + 296 Project -8.7 +9.1 Draft Enhanced Syntax for Pair-Wise Indices - + 295 Project -8.7 +9.1 Draft Enhance Arguments to lrange @@ -2605,14 +3296,14 @@ 8.5 Final Add the 'platform' Package to Tcl Link - + 290 Project -8.7 +9.1 Draft Registration of Custom Error Handler Scripts Link @@ -2621,17 +3312,17 @@ 8.5 Rejected Revision of [lrepeat] Argument Order - + 288 Project -8.7 -Draft +9.0 +Rejected Allow "args" Anywhere in Procedure Formal Arguments - +Link 287 Project 8.5 @@ -2653,38 +3344,38 @@ 8.6 Final Script Cancellation with [interp cancel] and Tcl_CancelEval Link - + 284 Project -8.7 +9.1 Draft New 'invoke' and 'namespace invoke' Commands Link - + 283 Project -8.7 +9.1 Draft Modify Ensemble Command Resolution Behaviour Link - + 282 Project -8.7 +9.1 Draft Enhanced Expression Syntax Link - + 281 Project -8.7 +9.1 Draft Improvements in System Error Handling Link @@ -2693,14 +3384,14 @@ 8.5 Final Add Full Stack Trace Capability With Location Introspection Link - + 279 Project -8.7 +9.1 Draft Adding an Extensible Object System to the Core @@ -2709,22 +3400,22 @@ 9.0 Final Fix Variable Name Resolution Quirks Link - + 277 Project -8.7 +9.1 Draft Create Namespaces as Needed - + 276 Project -8.7 +9.1 Draft Specify and Unify Variable Linking Commands @@ -2757,14 +3448,14 @@ 8.5 Final String and List Reversal Operations Link - + 271 Project -8.7 +9.1 Draft Windows-Style Open and Save File Dialog on Unix Link @@ -2853,14 +3544,14 @@ 8.5 Final Add Underline Option to Canvas Text Items - + 259 Project -8.7 +9.1 Draft Making 'exec' Optionally Binary Safe @@ -2901,14 +3592,14 @@ 8.5 Final New Types for Tcl_LinkVar Link - + 253 Project -8.7 +9.1 Draft Consolidate Package-Related Commands @@ -2953,14 +3644,14 @@ 247 Informational Draft Tcl/Tk Engineering Manual - + 246 Project -8.7 +9.1 Draft Unify Pattern Matching @@ -2977,14 +3668,14 @@ 8.6 Final PNG Photo Image Support for Tk - + 243 Project -8.7 +9.1 Draft Supply Find Dialog for the Text Widget Link @@ -3001,30 +3692,30 @@ 8.5 Final Case-Insensitive Switches and List Searching and Sorting Link - + 240 Project -8.7 +9.1 Draft An Ensemble Command to Manage Processes Link - + 239 Project -8.7 +9.1 Draft Enhance the 'load' Command - + 238 Project -8.7 +9.1 Draft Fire Event when Widget Created @@ -3097,14 +3788,14 @@ 8.5 Final Scripted Control of Name Resolution in Namespaces Link - + 228 Project -8.7 +9.1 Draft Tcl Filesystem Reflection API Link @@ -3121,15 +3812,15 @@ 8.5 Final Interface to Save and Restore Interpreter State Link - + 225 Project 8.7 -Draft +Obsoleted Arithmetic Series with Optimized Space Complexity Link 224 @@ -3161,17 +3852,17 @@ 8.5 Final Allow Background Error Handlers to Accept Return Options Link - + 220 Project 8.7 -Draft +Final Escalate Privileges in VFS Close Callback -Link +Link 219 Project 8.5 @@ -3193,14 +3884,14 @@ 8.5 Final Getting Sorted Indices out of Lsort Link - + 216 Project -8.7 +9.1 Draft Handling Command-Line Options in Tclsh and Wish @@ -3377,22 +4068,22 @@ 8.5 Final Procedures as Values via '''apply''' Link - + 193 Project -8.7 +9.1 Draft Simple Syntax Help System - + 192 Project -9.0 +9.1 Draft Lazy Lists @@ -3429,14 +4120,14 @@ 8.6 Rejected Procedures as Values - + 186 Project -8.7 +9.1 Draft Expose the Type and Modified-State of Widget Options Link @@ -3477,14 +4168,14 @@ 8.5 Final Add a [namespace unknown] Command Link - + 180 Project -8.7 +9.1 Draft Add a Megawidget Support Core Package @@ -3493,14 +4184,14 @@ 8.5 Final Add -hide Option to panedwindow Widget Link - + 178 Project -8.7 +9.1 Draft [info pid] and [info tid] Subcommands Link @@ -3557,15 +4248,15 @@ 8.6 Final Change Default <MouseWheel> Bindings Behavior - + 170 Project 8.7 -Draft +Obsoleted Better Support for Nested Lists Link 169 @@ -3581,15 +4272,15 @@ 8.5 Final Cubic Bezier Curves on the Canvas Link - + 167 Project -8.7 -Draft +9.0 +Rejected Add a New Option for Context Help for Windows Link 166 @@ -3685,14 +4376,14 @@ 8.5 Final Fix Some of the Text Widget's Limitations Link - + 154 Project -8.7 +9.1 Draft Add Named Colors to Tk @@ -3717,14 +4408,14 @@ 8.5 Final Remove -e: Command Line Option from tclsh and wish - + 150 Project -8.5 +8.7 Deferred Implement the Tk send Command for Windows @@ -3797,14 +4488,14 @@ 8.5 Final Multiple Initial-Files in [tk_getOpenFile] Link - + 140 Project -8.5 +9.1 Deferred Tracing Namespace Modifications @@ -3853,14 +4544,14 @@ 8.5 Withdrawn Subsystem Per-Thread Data Interfaces - + 133 Project -8.7 +9.1 Draft Extending [expr] Operators @@ -3909,14 +4600,14 @@ 8.5 Final Add an -index Option to [lsearch] Link - + 126 Project -9.0 +9.1 Draft Rich Strings for Representation Persistence @@ -4227,14 +4918,14 @@ 8.4 Final Allow Tcl Access to the Recursion Limit Link - + 86 Project -8.7 +9.1 Draft Improved Debugger Support Link @@ -4359,14 +5050,14 @@ 8.5 Withdrawn A Relational Switch Control Structure - + 69 Project -9.0 +9.1 Draft Improvements for the Tcl Hash Table @@ -4653,20 +5344,20 @@ 8.4a4 Final Add Tcl_Obj-enabled counterpart to Tcl_CreateTrace - + 31 Informational -Draft +Obsoleted CVS tags in the Tcl and Tk repositories - + 30 Informational -Draft +Obsoleted Tk Toolkit Maintainer Assignments 29 Project @@ -4703,14 +5394,14 @@ 8.5 Obsoleted Native tk_messageBox on Macintosh - + 24 Informational -Draft +Obsoleted Tcl Maintainer Assignments 23 Process Index: scripts/mkhtmlindex.tcl ================================================================== --- scripts/mkhtmlindex.tcl +++ scripts/mkhtmlindex.tcl @@ -37,55 +37,19 @@

- - + #TOGGLES#

@@ -291,22 +255,21 @@ parsePreamble $lines fields writeRow $number fields } +# Careful; the button HTML must not have spaces at the start of the line with +# some versions of fossil. set button { - #TITLE# +#TITLE# } set TOGGLES "" set STYLES "" dict for {axis values} $toggles { appendn TOGGLES "[string totitle $axis]:" foreach val [lsort [dict keys $values]] { - set map [list] + set map [list "\n" " "] lappend map #FACET# $axis lappend map #VALUE# [string tolower $val] lappend map #TITLE# [regsub {^(\d)(\d)$} [string totitle $val] {\1.\2}] appendn TOGGLES [string map $map $button] appendn STYLES ".$axis-[string tolower $val] {display: table-row }" Index: scripts/tiptoc.tcl ================================================================== --- scripts/tiptoc.tcl +++ scripts/tiptoc.tcl @@ -4,10 +4,15 @@ puts stderr "add - A Table of Contents is added/updated for each file" puts stderr "remove - All Table of Contents markup is removed from each file" puts stderr "\nIn both cases, a backup is made of the file" exit 1 } + +proc make_anchor {text} { + # A (very) poor man's implementation + return [regsub -all {[^-[:alnum:]_]} $text ""] +} proc insert_toc {command tipfile} { if {$command ni {add remove}} { puts stderr "Error: Unknown command '$command'" usage @@ -15,12 +20,11 @@ set bak "[file rootname $tipfile]-[clock format [clock seconds] -format %a,%H%M%S].bak" file copy -force -- $tipfile $bak puts stderr "$tipfile backed up to $bak" - # Open in binary mode so we preserve existing line ending style - set fd [open $tipfile rb] + set fd [open $tipfile r] set lines [split [read $fd] \n] close $fd set toc {} set header {} @@ -43,16 +47,16 @@ } PARSE_CONTENT { if {[regexp {^\s*} $line]} { # Start of old existing ToC. Throw it away set state SKIP_TOC - } elseif {[regexp {^(#+)\s*()?(.*)$} $line -> level anchor text]} { + } elseif {[regexp {^(#+)\s*()?(.*)$} $line -> level anchor text]} { # Section heading - incr anchor_id + set anchor_id [make_anchor $text] lappend toc $anchor_id [string length $level] $text if {$command eq "add"} { - lappend content "$level $text" + lappend content "$level $text" } else { lappend content "$level $text" } } else { # Regular line @@ -61,18 +65,19 @@ } } } # Output the header - set fd [open $tipfile wb] + set fd [open $tipfile w] + fconfigure $fd -translation lf puts $fd [join $header \n] if {$command eq "add"} { # Output ToC as a nested list puts $fd "" foreach {anchor_id level text} $toc { set indent [string repeat " " [incr level -1]] - puts $fd "${indent}* $text" + puts $fd "${indent}* $text" } puts $fd "\n" } puts $fd [join $content \n] close $fd ADDED scripts/toggles.js Index: scripts/toggles.js ================================================================== --- /dev/null +++ scripts/toggles.js @@ -0,0 +1,62 @@ +// This file implements the filtering toggle boxes used on the main index page. + +var sheet = (function() { + var s = document.getElementById("facetFilteringSheet"); + return s.sheet ? s.sheet : s.styleSheet; +})(); + +function isChecked(boxes) { + for (var i = 0 ; i < boxes.length; i++) { + if (boxes[i].checked) { + return false; + } + } + return true; +}; + +function clearFacetClasses(facet) { + var r = sheet.cssRules; + // Must go through the rules backwards to keep indices consistent + for (var i = r.length; i--; ) { + var sel = r[i].selectorText; + if (sel && sel.substr(1, facet.length).toLowerCase() === facet) { + sheet.deleteRule(i); + } + } +}; + +function addFacetClasses(boxes, facet) { + for (var i = 0; i < boxes.length; i++) { + var ruleClass = facet + "-" + boxes[i].dataset.value; + if (boxes[i].checked) { + // sheet.insertRule("."+ruleClass + " {display:table-row;}", 0); + } else { + sheet.insertRule("." + ruleClass + " {display:none;}", 0); + } + } +}; + +function toggleFacet(facet) { + if (!sheet.cssRules) { + return; + } + var boxes = document.getElementsByClassName("toggler-" + facet); + var none = isChecked(boxes); + clearFacetClasses(facet); + if (!none) { + addFacetClasses(boxes, facet); + } +}; + +function installToggleHandler(facet) { + var boxes = document.getElementsByClassName("toggler-" + facet); + for (var i = 0; i < boxes.length; i++) { + boxes[i].onclick = (function() { toggleFacet(facet); }); + } +}; + +window.onload = function() { + installToggleHandler("state"); + installToggleHandler("type"); + installToggleHandler("version"); +}; Index: tip/126.md ================================================================== --- tip/126.md +++ tip/126.md @@ -1,10 +1,10 @@ # TIP 126: Rich Strings for Representation Persistence Created: 30-Jan-2003 Author: Donal K. Fellows Type: Project - Tcl-Version: 9.0 + Tcl-Version: 9.1 Vote: Pending State: Draft Post-History: ----- Index: tip/133.md ================================================================== --- tip/133.md +++ tip/133.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 08-Apr-2003 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes a way to define new operators for conditions and the Index: tip/136.md ================================================================== --- tip/136.md +++ tip/136.md @@ -4,10 +4,11 @@ Type: Project Vote: Done Created: 25-May-2003 Post-History: Tcl-Version: 8.5 + Obsoletes: 170 Implementation-URL: http://homepage.ntlworld.com/whiteowl/tcl/tcl843-lrepeat.patch ----- # Abstract Index: tip/140.md ================================================================== --- tip/140.md +++ tip/140.md @@ -1,9 +1,9 @@ # TIP 140: Tracing Namespace Modifications State: Deferred Type: Project - Tcl-Version: 8.5 + Tcl-Version: 9.1 Vote: Pending Post-History: Author: Donal K. Fellows Created: 04-Jun-2003 ----- Index: tip/150.md ================================================================== --- tip/150.md +++ tip/150.md @@ -1,11 +1,11 @@ # TIP 150: Implement the Tk send Command for Windows Author: Pat Thoyts Type: Project State: Deferred Vote: Done - Tcl-Version: 8.5 + Tcl-Version: 8.7 Keywords: tk, send Created: 25-Jul-2003 Post-History: ----- Index: tip/154.md ================================================================== --- tip/154.md +++ tip/154.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 03-Sep-2003 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes the addition of a **color** command at the Tk level to Index: tip/167.md ================================================================== --- tip/167.md +++ tip/167.md @@ -1,14 +1,18 @@ # TIP 167: Add a New Option for Context Help for Windows Author: Ramon Ribó - State: Draft + State: Rejected Type: Project - Vote: Pending + Vote: Done Created: 19-Nov-2003 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.0 Tk-Branch: tip-167 + Vote-Summary: Rejected 1/2/1 + Votes-For: KW + Votes-Against: FV, JN + Votes-Present: SL ----- # Abstract This TIP proposes adding a new option to **wm attributes** for the @@ -67,15 +71,15 @@ The event will support the usual `%W`, `%x`, `%y` substitutions and other values. # Reference Implementation -[Tk branch `tip-167`](/tk/timeline?r=tip-167) - +[Tk branch `tip-167`](https://core.tcl-lang.org/tk/timeline?r=tip-167) or +[Sourceforge #145](https://sourceforge.net/p/tktoolkit/patches/145/) # Comments It is preferable to use a virtual event `<>` instead of extending the set of X events. \(In particular, adding a new `` event means there has to be a new **HelpMask** bit flag to select for it, and we're running out of event mask bits\). # Copyright This document has been placed in the public domain. Index: tip/170.md ================================================================== --- tip/170.md +++ tip/170.md @@ -6,10 +6,13 @@ Type: Project Vote: Pending Created: 30-Jan-2004 Post-History: Tcl-Version: 8.7 + Obsoleted-By: 22 + Obsoleted-By: 136 + Obsoleted-By: 157 Implementation-URL: http://nac.sf.net/ ----- # Abstract Index: tip/178.md ================================================================== --- tip/178.md +++ tip/178.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 21-Mar-2004 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Ticket: 920731ffffffffffffff ----- # Abstract Index: tip/180.md ================================================================== --- tip/180.md +++ tip/180.md @@ -1,8 +1,8 @@ # TIP 180: Add a Megawidget Support Core Package Author: Damon Courtney - Tcl-Version: 8.7 + Tcl-Version: 9.1 Created: 22-Mar-2003 Type: Project State: Draft Vote: Pending Post-History: Index: tip/186.md ================================================================== --- tip/186.md +++ tip/186.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 16-Apr-2004 Post-History: Keywords: Tk - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://pdqi.com/configure.diff.gz ----- # Abstract Index: tip/192.md ================================================================== --- tip/192.md +++ tip/192.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 27-Mar-2004 Post-History: Keywords: Tcl - Tcl-Version: 9.0 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes to add a new command to generate lists of _N_ Index: tip/193.md ================================================================== --- tip/193.md +++ tip/193.md @@ -1,119 +1,246 @@ # TIP 193: Simple Syntax Help System State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Post-History: Author: Donal K. Fellows Created: 29-Apr-2004 Keywords: Tcl ----- # Abstract -This TIP proposes a simple scheme to allow commands to provide basic -syntax help for themselves. This information would allow for more -advanced processing by programs doing interactive input of Tcl -commands \(by providing a mechanism for them to discover what possible -completions of the current command fragment are available\) and could -be processed automatically by the **interp alias** and **namespace -ensemble** mechanisms so that help could be automatically extended to -commands defined through those mechanisms. +This TIP proposes a simple scheme to allow commands to provide basic syntax +help for themselves. This information would allow for more advanced +processing by programs doing interactive input of Tcl commands \(by providing +a mechanism for them to discover what possible completions of the current +command fragment are available\) and could be processed automatically by the +**interp alias** and **namespace ensemble** mechanisms so that help could be +automatically extended to commands defined through those mechanisms. # Rationale -Currently, Tcl commands are only partially consistent in how they -provide information about their own syntax; the only way of getting -any syntax help is by providing invalid input to the command, but not -all commands have invalid input sequences \(e.g. **list**\) and nor is -there any way of knowing what those invalid sequences are \(where they -do exist\) unless you know the command beforehand. - -Such help would be useful in a number of situations, such as command -expansion in something like tkcon. It would also provide a mechanism -for supplying the sort of detailed information which the likes of -[incr Tcl]'s ensembles can generate, but which the Tcl ensembles of -[[112]](112.md) do not do \(for the reason that this would produce output -significantly different in kind from existing core commands.\) - -Note that I do not want to provide extended help such as might be -obtained from manual pages; this help system is designed to be -mechanically queryable first. - -# Proposed Change - -There are two main components +Currently, Tcl commands are only partially consistent in how they provide +information about their own syntax; the only way of getting any syntax help is +by providing invalid input to the command, but not all commands have invalid +input sequences \(e.g. **list**\) and nor is there any way of knowing what +those invalid sequences are \(where they do exist\) unless you know the +command beforehand. + +Such help would be useful in a number of situations, such as command expansion +in something like tkcon. It would also provide a mechanism for supplying the +sort of detailed information which the likes of [incr Tcl]'s ensembles can +generate, but which the Tcl ensembles of [[112]](112.md) do not do \(for the +reason that this would produce output significantly different in kind from +existing core commands.\) + +Note that I do not want to provide extended help such as might be obtained +from manual pages; this help system is designed to be mechanically queryable +first. + +# Proposed Change: Tcl Script Level + +There are three main components: ## Data Model -Every command would supply help for itself by providing a callback to -generate the information on demand; there will be a compatability -callback installed by default that states that the command may take -any number of unknown arguments. - -The result of the callback will be a list of command call -descriptions. Each description will be itself a list of terms that -describe a particular way of calling the command, with one term per -argument. Each term may in turn be one of: - - * _Required literal_ - this might be something like a subcommand - name. - - * _Optional literal_ - a good example of this are the **then** - and **else** words in a call to **if**. +Every command would supply help for itself by providing a callback to generate +the information on demand; there will be a compatability callback installed by +default that states that the command may take any number of unknown arguments. + +The result of the callback will be a list of command call descriptions. Each +description will be itself a list of terms that describe a particular way of +calling the command, with one term per argument. Each term may in turn be one +of: + + * _Required literal_ - this might be something like a subcommand name. + + * _Optional literal_ - a good example of this are the **then** and **else** + words in a call to **if**. * _Required varying_ \(with name for display to the user\) - a normal - argument which may be whatever the caller wants it to be, subject - to the higher level constraints implicit in the name. + argument which may be whatever the caller wants it to be, subject to the + higher level constraints implicit in the name. * _Optional varying_ \(with name for display to the user\) - a normal optional argument. - * _All remaining arguments_ - this would be used in the default - help outlined above, but would also be useful for modelling the - _args_ parameter to a procedure. + * _All remaining arguments_ - this would be used in the default help outlined + above, but would also be useful for modelling the _args_ parameter to a + procedure. [ToDo: say how these are expressed in C code] -[ToDo: talk about how aliases and ensembles can do help construction] - -[ToDo: talk about how such information can be partially derived in -procedures] - ## Information Access There will be a new subcommand of **info** to provide access to this -information at the Tcl level: **help**. The first argument to -**info help** will be the name of a command; if no further arguments -are supplied, the result will be a multi-line string with one -invokation per line; the invokations will be just the string parts -with the literal/varying information omitted and the optional/required -information converted into surrounding question marks. +information at the Tcl level: **help**. The first argument to **info help** +will be the name of a command, or, if no such command exists and the argument +is a two- or three-element list, a lambda term; if no further arguments are +supplied, the result will be a multi-line string with one invokation per line; +the invokations will be just the string parts with the literal/varying +information omitted and the optional/required information converted into +surrounding question marks. Otherwise, the second argument to **info help** will be one of: - get: Two optional arguments; an index into the list of help "lines" - \(first\) and an index within the line \(second\). If one index is - supplied, returns the list of values \(without lit/var or opt/req - info\) for the indexed line. If two indexes are supplied, returns - the string form for the indexed word within the indexed line. If - no indexes are supplied, or returns a list of every such value list - when no index is supplied. - - literal: Two required arguments; an index into the list of help - "lines" and an index into the list of values for that line. - Returns a boolean that is true when the indexed word within the - indexed line is a literal. - - required: Two required arguments; an index into the list of help - "lines" and an index into the list of values for that line. - Returns a boolean that is true when the indexed word within the - indexed line is required. - -[ToDo: could **info help** be used as a mechanism for procedures to -set their own help up?] +**summary**: No further arguments. Returns a brief description of what the + command does, such as the summary text from the manual page (e.g., + "`Increment the value of a variable.`" for **incr**). + +> **info help** _cmd_ **summary** + +**get**: Two optional arguments; an index into the list of command definition + lines \(first\) and an index within the line \(second\). If one index is + supplied, returns the list of values \(without lit/var or opt/req info\) + for the indexed line. If two indexes are supplied, returns the string + form for the indexed word within the indexed line. If no indexes are + supplied, or returns a list of every such value list when no index is + supplied. (See **Help Definitions** below for the description of which + lines this is referring to.) + +> **info help** _cmd_ **get** ?_lineIndex_? ?_wordIndex_? + +**literal**: Two required arguments; an index into the list of help "lines" + and an index into the list of values for that line. Returns a boolean + that is true when the indexed word within the indexed line is a literal. + +> **info help** _cmd_ **literal** _lineIndex wordIndex_ + +**required**: Two required arguments; an index into the list of help "lines" + and an index into the list of values for that line. Returns a boolean + that is true when the indexed word within the indexed line is required. + +> **info help** _cmd_ **required** _lineIndex wordIndex_ + +**all**: No further arguments. Returns the whole of the string registered as + the help definition for the command. + +> **info help** _cmd_ **all** + +There shall be an equivalent for TclOO methods. In that case, because methods +are not commands, instead of **info help**, the subcommand to use will +be **info class help** _class method_ for methods defined by classes, +and **info object help** _object method_ for methods defined by objects. +Subsequent arguments shall be as for **info help** above. _Overall_ help on a +class or object will be via the basic **info help** as those _are_ commands. + +## Information Definition + +There will be a new **doc** command. It will take one or two arguments. + +If it takes a single argument, and is run inside a procedure, lambda term, or +method, then that argument is a _help definition_ to apply to that procedure, +lambda term or method. When a procedure or method is defined, the creation +process shall minimally parse the provided script and determine if the first +command in it is a single-argument **doc** call; if it is, the help definition +in that argument will be applied during the creation of the procedure/method. +For lambda terms, this parsing will occur when the lambda term is first +interpreted as such by Tcl. (Note that this is the _only_ way of documenting a +lambda.) + +The single-argument form otherwise has _no_ effect. + +In the two argument form, the first argument shall be the name of a Tcl +command and the second argument shall be the help definition. + +There will also be a **doc** definition in the definition set supported by +**oo::define** and **oo::objdefine**, that takes two arguments. The first +argument will be the name of a method (any method, not just one created by +the **method** definition). This is necessary as it will be the only way to +create help definitions for forwarded methods. + +## Help Definitions + +Help definitions will consist of a string that is potentially multi-line. The +string will be split into paragraphs by visually blank lines (i.e., lines that +are empty after being passed through **string trimright**) and the common +whitespace prefix from all paragraphs shall be stripped. + +The first paragraph shall be the summary text. + +The lines of the second paragraph shall be the data indexed by the other +**info help** subcommands (**get**, **literal** and **required**); one line +per description. The words of each of the lines of the second paragraph shall +be sequences of non-whitespace characters, rather than Tcl words _per se_. If +a word (other than the initial one, which should be the conventional command +name) starts with `?` and finishes with `?` then it shall be internally +interpreted as optional after the question marks are stripped. If a +non-initial word starts and ends with `=`, it shall be interpreted as literal +after the equals signs are stripped. If both `?` and `=` are present at each +end, in either order, the word shall be both optional and literal and both +will be stripped. Note that command names are _always_ both required and +literal. If the final word of a line is `...`, it shall be always optional and +not literal. + +Subsequent paragraphs are not interpreted by this specification, but will be +provided as part of the information returned by **info help**'s **all**. + +# Examples + +Help for the **incr** command might be done with: + +``` +doc incr { + Increment the value of a variable. + + incr varName ?increment? + + The default amount to increment by is 1. +} +``` + +Then you'd be able to do: + +``` +puts [info help incr summary] +# ==> Increment the value of a variable. +puts [info help incr get] +# ==> {incr varName increment} +puts [info help incr get 0] +# ==> incr varName increment +puts [info help incr literal 0 0] +# ==> 1 +puts [info help incr literal 0 1] +# ==> 0 +puts [info help incr required 0 1] +# ==> 1 +puts [info help incr required 0 2] +# ==> 0 +``` + +Help for the **if** command might be done with: + +``` +doc if { + Execute scripts conditionally. + + if expr ?=then=? body + if expr ?=then=? body1 ?=else=? body2 + if expr1 ?=then=? body1 =elseif= expr2 ?=then=? body2 ... + + Each of the expr arguments is evaluated as an expression in order until one + evaluates to a true value. Then the corresponding body is evaluated as a + script. The words 'then' and 'else' are optional; 'elseif' is required if + more than one expression. If an 'else' is present or a final body, and no + expression evaluates to true, the last body is evaluated instead. +} +``` + +Defining your own help for a procedure: + +``` +proc foo {a b {c 123}} { + doc { + Do the foo to the bar. + + foo a b ?c? + } + # ... +} +``` # Copyright This document has been placed in the public domain. - Index: tip/216.md ================================================================== --- tip/216.md +++ tip/216.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 23-Aug-2004 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Keywords: Tcl, debugging, argument, shell ----- # Abstract Index: tip/22.md ================================================================== --- tip/22.md +++ tip/22.md @@ -9,10 +9,11 @@ Created: 19-Jan-2001 Post-History: Discussions-To: news:comp.lang.tcl,mailto:kennykb@acm.org Keywords: lindex,multiple arguments,sublists Tcl-Version: 8.4a2 + Obsoletes: 170 ----- # Abstract Obtaining access to elements of sublists in Tcl often requires nested Index: tip/220.md ================================================================== --- tip/220.md +++ tip/220.md @@ -1,16 +1,20 @@ # TIP 220: Escalate Privileges in VFS Close Callback Author: Colin McCormack Author: Andreas Kupries Author: Vince Darley - State: Draft + State: Final Type: Project - Vote: Pending + Vote: Done Created: 12-Sep-2004 Post-History: Tcl-Version: 8.7 - Tcl-Ticket: 1057093 + Tcl-Branch: tip-220 + Vote-Summary Accepted 3/0/3 + Votes-For: JN, KBK, SL + Votes-Against: none + Votes-Present: DGP, FV, MC ----- # Abstract This tip allows the creator and opener of a channel to cast away Index: tip/225.md ================================================================== --- tip/225.md +++ tip/225.md @@ -1,15 +1,18 @@ # TIP 225: Arithmetic Series with Optimized Space Complexity Author: Salvatore Sanfilippo Author: Miguel Sofer - State: Draft + Author: Brian Griffin + Author: Eric Taylor + State: Withdrawn Type: Project Vote: Pending Created: 25-Oct-2004 Post-History: Tcl-Version: 8.7 Tcl-Ticket: 1052584 + Obsoleted-By: 629 ----- # Abstract This TIP proposes to add a new command to generate arithmetic @@ -171,10 +174,162 @@ > **range** ?_start_? _end_ ?_step_? The proposed changes are available as a Patch against HEAD that can be found in the SourceForge Tcl patch 1052584 + +# Proposed Extended Change + +## Current Status -- August 2022 ## + +This TIP has been implemented, in it's entirety, along with the +additional command syntax proposed in +[TIP-629](/doc/trunk/tip/629.md) (see +[tcl branch tip-629](https://core.tcl-lang.org/tcl/timeline?r=tip-629)). +Currently, the command name is "**range**", but I propose changing +it to "**lseq**"; it is less likely to conflict with user code, and +is in line with other list related commands, i.e, begins with an "**l**". +Note that the original tip-225 proposes a new Obj type: ArithSeries. +This new type is fully implemented and supported for foreach, lmap, +llength, lindex, lrange, lreverse, and the "in & ni" operators. List +operations that modify the list will shimmer the ArithSeries into a +List type before completing the operation, as Salvatore described +below in the [Appendix Discussion](#Discussion) + +## Variant Implementation ## + +However, I propose an expanded approach. + +The ArithSeries Obj type basically replaces the elemCount and elements +fields with functions that perform llength(), lindex(), and slice() +operations without having to generate an actual elements[] array. In +theory, these functions could be provided abstractly to allow any kind +of list value. Here are some silly examples: + +- \[lsquares 1 7\] -> 1 4 9 16 25 36 49 +- \[lfibonacci 10\] -> 0 1 1 2 3 5 8 13 21 34 +- \[lstring "Hello"\] -> H e l l o + +I bring this up because currently, the ArithSeries is hard-coded into +the various list operations as a special case (somewhat like the dict +obj type is in certain cases). But if this obj type can be +abstracted, then the list operations would only require one "special +case", and not n-special cases. Even the current List type could be +implemented as an Abstract List. +This would allow for future type implementations, that can achive the +goal of the original authors, to create "*Tcl lists that may be stored in constant space*". +I have an initial implementation of an Abstract List type along with +an implemented \[lseq\] command that defines the ArithSeries as an +Abstract List. + +Creating an AbstractList type requires providing a set of functions +that allow the type to emulate a List. + + typedef struct AbstractList { + /* List emulation functions */ + + /* How to create a new Tcl_Obj of this custom type */ + Tcl_ALNewObjProc *newObjProc; + + /* How to duplicate a internal rep of this custom type */ + Tcl_ALDupRepProc *dupRepProc; + + /* Return the [llength] of the AbstractList */ + Tcl_ALLengthProc *lengthProc; + + /* Return a value (Tcl_Obj) for [lindex $al $index ...] */ + Tcl_ALIndexProc *indexProc; + + /* Return an AbstractList for [lrange $al $start $end] */ + Tcl_ALSliceProc *sliceProc; + + /* Return an AbstractList for [lreverse $al] */ + Tcl_ALReverseProc *reverseProc; + + size_t alvaluesize; /* value size */ + void* alvalue; /* Custom value reference */ + } AbstractList; + +If a function is not provided, the code will revert to shimmering the +value to a List before completing the operation. The bare minimum for +a functioning implementation is lengthProc and indexProc. + +To illustrate how a new AbstractList is created, here is the code for +the ArithSeries: + + Tcl_Obj * + TclNewArithSeriesObj(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_WideInt len) + { + Tcl_WideInt length = (len>=0 ? len : ArithSeriesLen(start, end, step)); + Tcl_Obj *arithSeriesPtr; + ArithSeries *arithSeriesRepPtr; + + if (length == -1) return NULL; /* Invalid range error */ + + arithSeriesPtr = Tcl_NewAbstractListObj(NULL, "arithseries", sizeof (ArithSeries)); + arithSeriesRepPtr = (ArithSeries*)Tcl_AbstractListGetTypeRep(arithSeriesPtr); + arithSeriesRepPtr->start = start; + arithSeriesRepPtr->end = end; + arithSeriesRepPtr->step = step; + arithSeriesRepPtr->len = length; + Tcl_SetAbstractListNewProc( arithSeriesPtr, Tcl_NewArithSeriesObj ); + Tcl_SetAbstractListLengthProc( arithSeriesPtr, Tcl_ArithSeriesObjLength ); + Tcl_SetAbstractListIndexProc( arithSeriesPtr, Tcl_ArithSeriesObjIndex ); + Tcl_SetAbstractListSliceProc( arithSeriesPtr, TclArithSeriesObjRange ); + Tcl_SetAbstractListReverseProc( arithSeriesPtr, TclArithSeriesObjReverse ); + Tcl_SetAbstractListDupRepProc( arithSeriesPtr, DupArithSeriesRep ); + + if (length > 0) { + Tcl_InvalidateStringRep(arithSeriesPtr); + } else { + TclInitStringRep(arithSeriesPtr, NULL, length); + } + return arithSeriesPtr; + } + + +This proposal includes a set of Tcl C API functions for extension +authors to create new forms of abstract lists. + + +Some suggestions so far include: + +* bitfield list - where each value is a single bit (0 or 1) or range of bits. +* VecTcl, tarray, etc. - vectors and matrices. +* lstring "example" - stored as a char\[\] instead of a Tcl_Obj\[\]. +* lsql $db "SELECT ..." - a list of results from a database query. + +## AbstractList Implementation ## + +An implementation of AbstractList, along with an \[lseq\] ArithSeries +command and abstact obj type has been done. At this writing, it is +still a work in progress, but it has shown that: + +* Works with TIP-625 without any issues +* Fully functional, passing current test suite + +### ToDo ### + +* Implement a searchProc (suggested by Andreas Leitgeb), however, + this may be very complex, or very limited. We shall see... +* Expand testing +* commit to a branch somewhere. +* Bookkeeping: TIP-629 is really just a repeat of this TIP, so 629 + should be (withdrawn in favor of | merged into?) TIP-225, if for no + other reason than to honor Salvatore's and Miguel's initial efforts + on this proposal. + +## Concerns ## + +* An implemenetation of an AbstractList has to guarantee a valid List + string representation that produces the same \[lindex\] results, and + should(?) be able to convert a string list representation to its + internal form. The latter is not true for ArithSeries currently. + +*-Brian* + +---- # Copyright This document has been placed in the public domain. @@ -240,15 +395,15 @@ return $result } ---- -# Appendix: Discussion +# Appendix: Discussion Does the TIP include a C-level api to ranges, or are they transparent also in C - in the sense that they are addressable with any of the list-oriented functions of the Tcl api? What if any changes and caveats are necessary in the documentation of Tcl's C api? _Miguel_ Ranges are transparent to C level too, in the proposed patch, because the logic is put inside the commands, so directly in the code implementing lindex, foreach, ... In all the other cases, when a SetListFromAny\(\) call occurs the range is converted into a normal Tcl list object. _Salvatore_ Index: tip/228.md ================================================================== --- tip/228.md +++ tip/228.md @@ -5,11 +5,11 @@ State: Draft Type: Project Vote: Pending Created: 02-Nov-2004 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://sourceforge.net/projects/tclvfs/ ----- # Abstract Index: tip/238.md ================================================================== --- tip/238.md +++ tip/238.md @@ -1,11 +1,11 @@ # TIP 238: Fire Event when Widget Created Author: Gerald W. Lester State: Draft Type: Project Vote: Pending - Tcl-Version: 8.7 + Tcl-Version: 9.1 Created: 25-Jan-2005 Post-History: Keywords: Tk ----- Index: tip/239.md ================================================================== --- tip/239.md +++ tip/239.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 26-Jan-2005 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes enhancing the Tcl **load** command with the Index: tip/24.md ================================================================== --- tip/24.md +++ tip/24.md @@ -7,10 +7,11 @@ Author: Daniel A. Steffen Author: miguel sofer State: Draft Type: Informative Vote: Pending + Obsoleted-By: Created: 29-Jan-2001 Post-History: ----- # Abstract Index: tip/240.md ================================================================== --- tip/240.md +++ tip/240.md @@ -5,11 +5,11 @@ Vote: Pending Created: 22-Feb-2005 Post-History: Keywords: Tcl Obsoletes: 88 - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Ticket: 1315115 ----- # Abstract Index: tip/243.md ================================================================== --- tip/243.md +++ tip/243.md @@ -2,11 +2,11 @@ Author: Rüdiger Härtel State: Draft Type: Project Vote: Pending Created: 16-Mar-2005 - Tcl-Version: 8.7 + Tcl-Version: 9.1 Post-History: Keywords: Tk Tk-Ticket: 1167420 ----- @@ -26,11 +26,12 @@ desirable, and it should be developed at the same time. # Reference Implementation A reference implementation for a _find dialog_ is available at - . +(Tk Ticket #1167420)[1167420] or +[Sourceforge](https://sourceforge.net/p/tktoolkit/patches/191/) # Example Use package require Tk namespace import ::msgcat::* Index: tip/246.md ================================================================== --- tip/246.md +++ tip/246.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 27-Apr-2005 Post-History: Keywords: pattern,match,glob,exact,regexp,case sensitive,Tcl - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract Many Tcl commands take arguments that are patterns to match Index: tip/253.md ================================================================== --- tip/253.md +++ tip/253.md @@ -2,11 +2,11 @@ Author: Brian Schmidt Type: Project State: Draft Vote: Pending Created: 05-Jul-2005 - Tcl-Version: 8.7 + Tcl-Version: 9.1 Post-History: ----- # Abstract Index: tip/259.md ================================================================== --- tip/259.md +++ tip/259.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 12-Dec-2005 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract A new option shall be added to the command **exec**, that allows the user to Index: tip/265.md ================================================================== --- tip/265.md +++ tip/265.md @@ -87,11 +87,10 @@ char *gname,*filename; int i; int numRepeat; double scalar; int doErase = 0; - size_t size; /* this table specifies the possible options, all in one place.*/ Tcl_ArgvInfo argTable[] = { {"-erase", TCL_ARGV_CONSTANT, (void *) 1, &doErase, "erase image before plotting"}, Index: tip/271.md ================================================================== --- tip/271.md +++ tip/271.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 11-Jul-2006 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tk-Ticket: 1520742 ----- # Abstract Index: tip/276.md ================================================================== --- tip/276.md +++ tip/276.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 01-Oct-2006 Post-History: Keywords: Tcl,global,variable,upvar,namespace upvar - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract The purpose of this TIP is to simplify and clarify the semantics of the Index: tip/277.md ================================================================== --- tip/277.md +++ tip/277.md @@ -1,10 +1,10 @@ # TIP 277: Create Namespaces as Needed Author: Miguel Sofer State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 01-Oct-2006 Post-History: ----- Index: tip/279.md ================================================================== --- tip/279.md +++ tip/279.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 05-Oct-2006 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes adding OO support to the Tcl core, consisting mostly Index: tip/281.md ================================================================== --- tip/281.md +++ tip/281.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 08-Oct-2006 Post-History: Keywords: POSIX,channel driver,errorCode - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://iocpsock.cvs.sourceforge.net/iocpsock/iocpsock/tclWinError.c?revision=HEAD&view=markup ----- # Abstract Index: tip/282.md ================================================================== --- tip/282.md +++ tip/282.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 13-Oct-2006 Post-History: Keywords: expr,operator,assignment - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Ticket: 1969722 ----- # Abstract Index: tip/283.md ================================================================== --- tip/283.md +++ tip/283.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 01-Oct-2006 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Ticket: 1577282 ----- # Abstract Index: tip/284.md ================================================================== --- tip/284.md +++ tip/284.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 01-Oct-2006 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: tip-284 ----- # Abstract Index: tip/288.md ================================================================== --- tip/288.md +++ tip/288.md @@ -1,56 +1,61 @@ # TIP 288: Allow "args" Anywhere in Procedure Formal Arguments - Author: Peter Spjuth + Author: Peter Spjuth Author: Andreas Leitgeb - Author: Peter Spjuth - State: Draft + State: Rejected Type: Project - Vote: Pending + Vote: Done Created: 03-Oct-2006 Post-History: Keywords: Tcl,proc - Tcl-Version: 8.7 + Tcl-Branch: aspect-tip288 + Tcl-Version: 9.0 + Vote-Summary: Rejected 1/0/2 + Votes-For: JN + Votes-Against: none + Votes-Present: FV, SL ----- - # Abstract This TIP proposes to make _args_ have its special meaning as a formal -**proc**edure argument anywhere in the argument list. +**proc**edure argument anywhere in the argument list. It also expands +how required and optional arguments can be mixed. # Rationale Many commands, specially many of Tcl's built in commands, have their variadic arguments in the beginning of the argument list and their required arguments at the end. An example is [**lsearch** ?_options_? _list string_]. Writing tcl procedures in that style is currently a bit cumbersome since you need to do you own argument counting and assignment to variables from "args". If "args" had its special meaning at any location in the argument list, it would help with such a task, and it would make things more consistent. -To get simple semantics, optional arguments are not allowed after "args". Optional arguments that precede "args" will be handled as before. This TIP does not, as of now, specify defaulted arguments directly preceding non-defaulte ones. This should be addressed in a separate TIP. # Specification At most one proc argument may be named "args" and can be anywhere in the -argument list. Arguments after "args" may not be optional. Arguments are -assigned in the following order: - - 1. Assign arguments right of "args" from the right. - - 2. Assign arguments left of "args" from the left. Handling of defaulted parameters preceding "args" remains as it was \(but disregarding the non-defaulted ones after "args"\). - - 3. Remaining arguments are assigned to "args". - -# Compatiblity +argument list. Arguments just before and after "args" may be optional. +Required arguments may be in the beginning and end of the argument list. +Arguments are assigned in the following order: + + 1. Required arguments to the left are assigned from the left. Required arguments to the right are assigned from the right. Order does not really matter since there must be enough arguments for all of them. + 2. Assign optional arguments left of "args" from the left. + 3. Assign optional arguments right of "args" from the right. + 4. Any remaining arguments are assigned to "args". If there are remaining arguments and no "args", it is an error like before. + +# Compatibility Currently "args" is allowed anywhere in the argument list, and becomes a normal variable if not last. Most scripts probably don't use this since it would be rather confusing, but it might exist. -All such occurrances would need to be fixed. +Interleaving required arguments with optional arguments was legal, but pointless. The current documentation mentions and discourages this use. A construct like this will now be an error: + + proc z {a {b x} c args} { ... } -Detecting such scripts in an automated way would be simple and fixing them is trivial. +All such occurrences would need to be fixed. Detecting such scripts in an automated way would be simple and fixing them is trivial. # Examples -New style: +New style for an lsearch style proc: proc lgurka {args list item} { array set opts {-apa 1 -bepa "" -cepa 0} foreach {arg val} $args { set opts([prefix match {-apa -bepa -cepa} $arg]) $val @@ -72,28 +77,29 @@ foreach {arg val} $args { set opts([prefix match {-apa -bepa -cepa} $arg]) $val } # Do real stuff } + +Other examples: proc x {a args b} { puts "a=$a, args=$args, b=$b" } - x 1 2 ;# -> a=1, args=, b=2 - + x 1 2 ;# -> a=1, args=, b=2 x 1 2 3 ;# -> a=1, args=2, b=3 - - x 1 ;# -> error: wrong # args: should be "x a ?args? b" + x 1 ;# -> error: wrong # args: should be "x a ?arg ...? b" proc y {a {b x} args c} { ... } - y 1 2 3 ;# a=1 b=2 c=3 args is empty + y 1 2 3 ;# -> a=1 b=2 c=3 args is empty + y 1 2 ;# -> a=1 b=x c=2 args is empty proc z {a {b x} c args} { ... } + -> error: required arg may not be in the middle - z 1 2 ;# -> error: wrong # args: should be "z a ?b? c ..." +# Implementation -To change "z" is not covered by this TIP. +See branch [`aspect-tip288`](https://core.tcl-lang.org/tcl/timeline?r=aspect-tip288). # Copyright This document has been placed in the public domain. - Index: tip/290.md ================================================================== --- tip/290.md +++ tip/290.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 29-Oct-2006 Post-History: Keywords: Tcl,error,trap - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Ticket: 1587317 ----- # Abstract Index: tip/295.md ================================================================== --- tip/295.md +++ tip/295.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 06-Nov-2006 Post-History: Keywords: Tcl,lrange - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes an enhancement to **lrange** and **string range** that lets them take more than one start-end index pair. Index: tip/296.md ================================================================== --- tip/296.md +++ tip/296.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 06-Nov-2006 Post-History: Keywords: Tcl,lrange,lreplace - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes adding another anchor **s** \(for usage exclusively in Index: tip/297.md ================================================================== --- tip/297.md +++ tip/297.md @@ -1,11 +1,12 @@ # TIP 297: Integer Type Introspection and Conversion Author: Don Porter - State: Draft + State: Withdrawn Type: Project Vote: Pending Created: 20-Nov-2006 + Obsoleted-By: 502,514,515 Post-History: Tcl-Version: 8.7 Keywords: Tcl, number, expression ----- Index: tip/30.md ================================================================== --- tip/30.md +++ tip/30.md @@ -16,10 +16,11 @@ Author: Vince Darley Author: Peter Spjuth State: Draft Type: Informative Vote: Pending + Obsoleted-By: Created: 09-Mar-2001 Post-History: ----- # Abstract Index: tip/302.md ================================================================== --- tip/302.md +++ tip/302.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 13-Dec-2006 Post-History: Keywords: Tcl,time changes - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract Currently, **after** tasks can be drastically delayed or sped up simply by @@ -90,14 +90,18 @@ I have not yet written a reference implementation; I assume somebody with a more fluent practice of the core will do so more efficiently. However, gentle arm twisting, etc. +As mentioned 2021-09-01 by Christian Werner, Androwish/Undroidwish has a reference implementation for Android and Unix. + +As mentioned 2021-09-03 by Sergey Blester, the following TCL branch contains a well tested and solid solution for Unix and Windows: + # Copyright This document has been placed in the public domain. # Comments The _times_ function in Unix is _not_ an appropriate time base. It reports the user and system time \(CPU time, in other words\) of the currently executing process and its children. As far as I have been able to determine, Unix assumes that the system time reported by _gettimeofday_ is the sole time base for absolute timing; if multiple timers are required in a single process, _gettimeofday_ appears to be the only reference that is available. Index: tip/303.md ================================================================== --- tip/303.md +++ tip/303.md @@ -1,10 +1,10 @@ # TIP 303: Enhance 'llength' Command to Support Nested Lists Author: Wolf-Dieter Busch State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 29-Jan-2007 Post-History: Keywords: Tcl, lindex ----- Index: tip/309.md ================================================================== --- tip/309.md +++ tip/309.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 07-Jan-2008 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Keywords: expr, parse ----- # Abstract Index: tip/31.md ================================================================== --- tip/31.md +++ tip/31.md @@ -10,10 +10,11 @@ Author: Author: Kevin Kenny State: Draft Type: Informative Vote: Pending + Obsoleted-By: 386 Created: 12-Mar-2001 Post-History: ----- # Abstract Index: tip/319.md ================================================================== --- tip/319.md +++ tip/319.md @@ -1,10 +1,10 @@ # TIP 319: Implement Backwards Compatibility for ttk Themed Widgets in tk Widgets Author: Eric Taylor State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 04-Jun-2008 Post-History: ----- Index: tip/325.md ================================================================== --- tip/325.md +++ tip/325.md @@ -1,11 +1,15 @@ # TIP 325: System Tray and System Notification Access Author: David N. Welton , Kevin Walzer - State: Draft + State: Final Type: Project Tcl-Version: 8.7 - Vote: Pending + Vote: Done + Vote-Summary: Accepted 5/0/0 + Votes-For: SL, JN, MC, FV, KW + Votes-Against: none + Votes-Present: none Created: 25-Aug-2008 Post-History: Keywords: Tk, desktop integration ----- @@ -63,8 +67,12 @@ # Implementation A draft implementation is currently under development in the tip_325 branch. +# Post-vote note + +There has been a follow-up ticket opened after this TIP was voted YES, with a patch providing the **tk systray exists** subcommand, see [92ab429295](https://core.tcl-lang.org/tk/tktview/92ab4292952a3fa10a15f414d59a4aa9984650ad). This feature has been committed as well. + # Copyright This document has been placed in the public domain. Index: tip/333.md ================================================================== --- tip/333.md +++ tip/333.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 13-Oct-2008 Post-History: Keywords: Tcl,resolution - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This is a TIP to allow easy command and variable resolving for itcl-ng, but is Index: tip/344.md ================================================================== --- tip/344.md +++ tip/344.md @@ -1,13 +1,18 @@ # TIP 344: Bring TCP_NODELAY and SO_KEEPALIVE to socket options Author: Alexandre Ferrieux - State: Draft + State: Final Type: Project - Vote: Pending + Vote: Done Created: 31-Dec-2008 Post-History: Tcl-Version: 8.7 + Tcl-Branch: tip-344 + Vote-Summary: Accepted 3/0/1 + Votes-For: JN, KW, SL + Votes-Against: none + Votes-Present: FV ----- # Abstract Just expose to script level, via **fconfigure**, the two most important @@ -27,12 +32,11 @@ exposing it to script level. # Proposed Change This TIP proposes to add two boolean [fconfigure] options to sockets: -**-nodelay** \(or **-nonagle**, or **-nagle**, take your pick\) and -**-keepalive**. +**-nodelay** and **-keepalive**. # Reference Implementation Pretty trivial; will be provided shortly after validation. The code has even been in place for a long time, though only in the Windows-specific part, and Index: tip/346.md ================================================================== --- tip/346.md +++ tip/346.md @@ -1,14 +1,21 @@ # TIP 346: Error on Failed String Encodings Author: Alexandre Ferrieux - State: Draft + Author: Jan Nijtmans + State: Final Type: Project - Vote: Pending + Vote: Done Created: 02-Feb-2009 Post-History: - Keywords: Tcl,encoding,convertto,strict,Unicode,String,ByteArray + Keywords: Tcl,encoding,convertto,strict,Unicode Tcl-Version: 8.7 + Tcl-Branch: tip-346 + Obsoleted-By: 654 + Vote-Summary Accepted 5/0/0 + Votes-For: FV, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none ----- # Abstract This TIP proposes to raise an error when an encoding-based conversion @@ -16,43 +23,95 @@ # Background Encoding-based conversions occur e.g. when writing a string to a channel. In doing so, Unicode characters are converted to sequences of bytes -according to the channel's encoding. Similarly, a conversion can occur -on request of the ByteArray internal representation of an object, the target -encoding being ISO8859-1. In both cases, for some +according to the channel's encoding. For some combinations of Unicode char and target encoding, the mapping is lossy -\(non-injective\). For example, the "`é`" character, and many of its -cousins, is mapped to a "`?`" in the '**ascii**' target encoding. Also, Unicode chars above \\u00FF get 'projected' onto their low byte in the ISO8859-1 ByteArray conversion. - -This loss of information, in the first case, introduces unnoticed i18n -mishandlings. In the second case, it makes it unreliable to do pure-ByteArray -operations on objects unless they have no string representation. This induces -unwanted and hard-to-debug performance hits on bytearray manipulations when -people add debugging **puts**. +\(non-injective\). For example, the "`é`" character and many of its +cousins is mapped to a "`?`" in the '**ascii**' target encoding. This loss of +information is sometimes not desired. # Proposed Change This TIP proposes to make this loss conspicuous. -For the first use case, the idea is to introduce a **-strict** option to -**encoding convertto**, that would raise an explicit error when non-mappable -characters are met. Lossy conversions during channel I/O would also fail if a **-strictencoding true** [fconfigure] option is set. - For the second case, we simply want the conversion to -fail, like does the Listification of an ill-formed list. In both cases, the -change consists of letting the proper internal conversion routine like **SetByteArrayFromAny** return TCL\_ERROR. - -# Rationale - -The second case does imply a Potential Incompatibility, since currently SBFA is documented to always return TCL\_OK. However, it is felt -that virtually all cases that are sensitive to this, are actually half-working -in a completely hidden manner. Hence the global effect is a healthy one. +The idea is to introduce a **-strict** option to **encoding convertto**/**encoding convertfrom**, +that would raise an explicit error when non-mappable characters are met. Every +encoder/decoder can decide, depending on this flag, if it tries to convert +invalid (but common) byte sequences to valid characters or not. + +This **-strict** option cannot be combined with the already existing +**-nocomplain** option (see also "History" section below). + +For channels, there's a new **-strictencoding** option, to be used in `fconfigure`, +which can be set to true (default: false). Setting it to true has the same +effect as the **-strict** option for **encoding convertto**/**encoding convertfrom**. + +For the `utf-8`/`utf-16`/`utf-32` encodings, the **-strict** options has an additional effect for +3 different situations it generates an exception for: + +* Byte sequence '\\xC0\\x80' is normally accepted by the utf-8 decoder, since it's a +representation of '\\x00'. When using **-strict**, this byte sequence will raise an error. +

+% encoding convertfrom -strict utf-8 \\xC0\\x80
+unexpected byte sequence starting at index 0: '\\xC0'
+
+ +* Invalid byte sequences. By default, the utf-8 decoder detects invalid byte +sequences, but - if encountered - tries to handle them as if they were iso8859-1 or +cp1252. When using **-strict**, this now will raise an error. + +* Surrogates. By default, the `utf-8`/`utf-16`/`utf-32` decoders detect surrogates, +but - if encountered - lets them pass through unchanged. When using **-strict**, this +now will raise an error. (This check was added after this TIP was accepted, see +last sentence in "Implementation" section below) + +As said, other encoders handle **-strict** in their own way. Currently +the 'core' `utf-8`/`utf-16`/`utf-32` decoders and the table-based decoders +have **-strict** handling implemented. + +# Implementation. + +A new flag `TCL_ENCODING_STRICT` is introduced. This flag inherits all +behavior of `TCL_ENCODING_STOPONERROR`, but for the utf-8 decoder +it enables some additional checks, which result in an exception. +This flag can be used in `Tcl_UtfToExternalDStringEx()`/`Tcl_ExternalToUtfDStringEx()` +and all related API. Other encoders/decoders can use this flag +in their own way. + +At this moment, the implementation is not 100% OK yet. There's a known bug +[6978c01b65](https://core.tcl-lang.org/tcl/tktview?name=6978c01b65) which +prevents an exception to be thrown when writing to a channel. Also, the +only additional check implemented now is for the '\\xC0\\x80' byte sequence. +After this TIP is accepted, more **strict** checks will be added +to more encodings: the meaning of _invalid byte sequence_ is +different for every encoder. + +# History + +The original version of this TIP also contained +changes to **SetByteArrayFromAny**, which are now available in [TIP #568](568). + +See the original TIP #346 [here](https://core.tcl-lang.org/tips/artifact/af9e3e581ebc55f1). + +The TIP - as voted - contained the sentence: "This **-strict** option cannot be combined +with the already existing **-nocomplain** and **-failindex** options.". After folow-up +discussion, it turned out to be a good idea to allow **-strict** with **-failindex** +(See: [[a31caff057]](https://core.tcl-lang.org/tcl/tktview?name=a31caff057)), +therefore this sentence is modified in the TIP. + +The TIP - as voted - didn't handle Surrogates, but as Surrogates are +considered as _invalid_ in `utf-8`/`utf-16`/`utf-32` (unless paired +properly in `utf-16`), the TIP text is adapted accordingly. + +Some wording that was relevant only to the now-removed ByteArray portion of +this TIP was later also removed. # Reference Example -See [Bug 1665628](https://core.tcl-lang.org/tcl/tktview/1665628). +See [TIP #346](https://core.tcl-lang.org/tcl/timeline?r=tip-346). # Copyright This document has been placed in the public domain. Index: tip/349.md ================================================================== --- tip/349.md +++ tip/349.md @@ -1,10 +1,10 @@ # TIP 349: New "-cargo" option for every Tk widget Author: Zbigniew Baniewski State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 17-Apr-2009 Post-History: ----- Index: tip/355.md ================================================================== --- tip/355.md +++ tip/355.md @@ -2,11 +2,11 @@ Author: Alexandre Ferrieux State: Draft Type: Project Vote: Pending Created: 01-Sep-2009 - Tcl-Version: 8.7 + Tcl-Version: 9.1 Post-History: Tcl-Ticket: 2826430 ----- # Abstract Index: tip/358.md ================================================================== --- tip/358.md +++ tip/358.md @@ -1,10 +1,10 @@ # TIP 358: Suppress Empty List Element Generation from the Split Command Author: George Petasis State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 04-Oct-2009 Post-History: Keywords: Tcl, list extraction, parsing ----- Index: tip/361.md ================================================================== --- tip/361.md +++ tip/361.md @@ -2,11 +2,11 @@ Author: Wayne Cuddy State: Draft Type: Project Vote: Pending Created: 03-Feb-2010 - Tcl-Version: 8.7 + Tcl-Version: 9.1 Post-History: ----- # Abstract Index: tip/363.md ================================================================== --- tip/363.md +++ tip/363.md @@ -1,10 +1,10 @@ # TIP 363: Vector Math in the Tcl Core Author: Karl C. Hansen State: Draft Type: Project - Tcl-Version: 9.0 + Tcl-Version: 9.1 Vote: Pending Created: 02-Mar-2010 Post-History: Keywords: expand,{*},vector,math ----- Index: tip/366.md ================================================================== --- tip/366.md +++ tip/366.md @@ -1,15 +1,19 @@ # TIP 366: Variable Sized Indicators for Menubuttons Author: Russell Davidson - State: Draft + State: Rejected Type: Project - Vote: Pending + Vote: Done Created: 29-Apr-2010 Post-History: Keywords: Tk - Tcl-Version: 8.7 - Tk-Ticket: 2996760 + Tcl-Version: 9.0 + Tk-Branch: tip-366 + Vote-Summary: Rejected 1/1/1 + Votes-For: KW + Votes-Against: JN + Votes-Present: SL ----- # Abstract This TIP is to allow custom sizing of menubutton indicators using @@ -33,12 +37,12 @@ > The **-indheight** option allows the specification of the height of the indicator in 10ths of a mm \(will be converted to an integer number of pixels\). # Implementation -A patch exists in SourceForge \(Feature Request 2996760 - \). +A patch exists in [Tk branch `tip-366`](https://core.tcl-lang.org/tk/timeline?r=tip-366) or SourceForge +[Feature Request 2996760](https://sourceforge.net/support/tracker.php?aid=2996760). # Copyright This document has been placed in the public domain. Index: tip/369.md ================================================================== --- tip/369.md +++ tip/369.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 15-Jul-2010 Post-History: Keywords: Tk,user-defined data,dictionary - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tk-Ticket: 3023578 ----- # Abstract Index: tip/370.md ================================================================== --- tip/370.md +++ tip/370.md @@ -1,10 +1,10 @@ # TIP 370: Extend Tk's selection with a -time option Author: George Petasis State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 04-Aug-2010 Post-History: ----- Index: tip/371.md ================================================================== --- tip/371.md +++ tip/371.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 05-Aug-2010 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract The **dict** command is limited by allowing manipulation of only the first Index: tip/374.md ================================================================== --- tip/374.md +++ tip/374.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 13-Aug-2010 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes a way to have multiple procedures waiting for an event to happen, where the command that gets executed depends on the order of the Index: tip/379.md ================================================================== --- tip/379.md +++ tip/379.md @@ -1,10 +1,10 @@ # TIP 379: Add a Command for Delivering Events Without Tk Author: Will Duquette State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 17-Oct-2010 Post-History: Keywords: event Implementation-URL: http://www.wjduquette.com/notifier/hook-0.1.zip Index: tip/384.md ================================================================== --- tip/384.md +++ tip/384.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 02-Dec-2010 Post-History: Keywords: kqueue,inotify,dnotify,gamin,FSevents,fam - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes to add capabilities for monitoring changes in the file Index: tip/385.md ================================================================== --- tip/385.md +++ tip/385.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 13-Feb-2011 Post-History: Keywords: Tcl, traces - Tcl-Version: 9.0 + Tcl-Version: 9.1 ----- # Abstract Functional traces are new variants of variable traces, that rely Index: tip/390.md ================================================================== --- tip/390.md +++ tip/390.md @@ -1,11 +1,11 @@ # TIP 390: A Logging API for Tcl Author: Jeff Rogers Author: Donal K. Fellows State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Created: 27-Oct-2011 Vote: Pending Post-History: ----- Index: tip/392.md ================================================================== --- tip/392.md +++ tip/392.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 30-Oct-2011 Keywords: bignum,runaway,safe,math,precision,integer,tcl - Tcl-Version: 8.7 + Tcl-Version: 9.1 Post-History: ----- # Abstract Index: tip/393.md ================================================================== --- tip/393.md +++ tip/393.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 25-Apr-2011 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://sqlitestudio.pl/tcl/patches/tip-393-lsearch-command.patch ----- # Abstract Index: tip/394.md ================================================================== --- tip/394.md +++ tip/394.md @@ -3,10 +3,11 @@ Type: Project Tcl-Version: 8.7 State: Draft Vote: Pending Created: 30-Nov-2011 + Obsoleted-By: 474 Post-History: ----- # Abstract Index: tip/401.md ================================================================== --- tip/401.md +++ tip/401.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 29-Apr-2012 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: tip-401 ----- # Abstract Index: tip/402.md ================================================================== --- tip/402.md +++ tip/402.md @@ -1,16 +1,20 @@ # TIP 402: General Platform UNC Support Author: Jan Nijtmans - State: Draft + State: Final Type: Project - Vote: Pending + Vote: Done Created: 16-Jul-2011 Post-History: Discussions-To: Tcl Core list Keywords: Tcl Tcl-Version: 8.7 - Tcl-Branch: jn-unc-vfs + Tcl-Branch: tip-402 + Vote-Results: 3/0/2 accepted + Votes-For: FV, KW, JN + Votes-Against: none + Votes-Present: DGP, SL ----- # Abstract Both Windows and Cygwin interpret paths starting with **//** as a special @@ -40,20 +44,20 @@ starting with double-slash will no longer normalize to paths starting with a single slash. > **POTENTIAL INCOMPATIBILITY** - * As **//** becomes a special prefix, the **file split** will return - **//** as its first list element when the original path starts with a - double slash. + * As **//<foo>** becomes a special prefix (where **<foo>** can be anything not + containing '/'), the **file split** command will return **//<foo>** as its + first list element when the original path starts with a double slash. # Compatibility On UNIX, this means that paths like **//usr/bin/tclsh** might no longer do what it did earlier, if a VFS exists which uses **//** as path prefix. If no such VFS exists, it will probably still work, only comparing normalized paths -will no longer regard **//** as equal to **/**. +will no longer regard **//<foo>** as equal to **/<foo>**. Handling of multiple slashes in other locations of the string will not change. So normalizing **/foo//bar** will still give **/foo/bar**. The most likely cause of multiple slashes appearing in a path is because of appending a file name to a path which already ends with a slash, e.g. @@ -69,17 +73,17 @@ On Windows and Cygwin, there is no change in behavior at all. # Alternatives Variations are possible in the handling of paths starting with 3 or more -slashes. The current TIP implementation collapes more than 2 slashes to +slashes. The current TIP implementation collapses more than 2 slashes to exactly 2 slashes, as the current Windows and Cygwin implementations do. # Reference Implementation A reference implementation is available at in branch -_jn-unc-vfs_. +_tip-402_. # Copyright This document has been placed in the public domain. Index: tip/408.md ================================================================== --- tip/408.md +++ tip/408.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 17-Aug-2012 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract Proposed expansion of what constitutes a function in an **expr** expression. Index: tip/409.md ================================================================== --- tip/409.md +++ tip/409.md @@ -6,11 +6,11 @@ Vote: Pending Created: 17-Aug-2012 Post-History: Keywords: udp,datagram,message Obsoletes: 391 - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP adds support for UDP in Tcl, with a pure event approach to Index: tip/410.md ================================================================== --- tip/410.md +++ tip/410.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 26-Aug-2012 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This proposal specifies three new features for **binary scan** and **binary Index: tip/411.md ================================================================== --- tip/411.md +++ tip/411.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 31-Aug-2012 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://sqlitestudio.pl/tcl/patches/tip-411-chan_info.patch ----- # Abstract Index: tip/413.md ================================================================== --- tip/413.md +++ tip/413.md @@ -57,12 +57,12 @@ not; the use of the BOM as a space was deprecated. When the use as space was deprecated for \(U\+FEFF\), another character was put forward as replacement for it: word joiner \(U\+2060\). As this character has no visible representation, and has no meaning at all when at the start or the end -of a string, it makes sense to include it in the "Tcl space set" as well, the -more because its predecessor had the _White\_Space_ property. +of a string, it makes sense to include it in the "Tcl space set" as well, and +more so because its predecessor had the _White\_Space_ property. Finally, zero width space \(U\+200B\), had the _White\_Space_ property in Unicode 3.0. In the current Unicode Charts it is still listed as being a space, even though the White\_Space property was removed later. Therefore it should be in the "Tcl space set" as well. @@ -77,11 +77,11 @@ will be added to the set. This is a **potential incompatibility**. * For characters outside ASCII, the Unicode **White\_Space** property forms the basis of what **string is space** and **string trim** consider being - space. But 3 characters are added to the set: zero with space \(U\+200B\), + space. But 3 characters are added to the set: zero width space \(U\+200B\), word joiner \(U\+2060\) and zero width no-break space \(U\+FEFF\) \(i.e., the BOM\). The **string trimleft** and **string trimright** commands will also be modified, as they track **string trim**. @@ -105,11 +105,11 @@ 3. Additional characters I considered being part of the set: break permitted here (U+0082) no break here (U+0083) zero width joiner (U+200C) - zero with non-joiner (U+200D) + zero width non-joiner (U+200D) > Those are clearly useful characters to be stripped, as they have no meaning and no visible appearance at the beginning or end of a string. But they are not spaces, so it would diverge the two commands. Index: tip/417.md ================================================================== --- tip/417.md +++ tip/417.md @@ -1,10 +1,10 @@ # TIP 417: Use Explicit Option Names for "file tempfile" Author: Christophe Curis State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 16-Nov-2012 Post-History: Keywords: Tcl, future expansion, extensibility ----- Index: tip/418.md ================================================================== --- tip/418.md +++ tip/418.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 27-Aug-2012 Post-History: Keywords: Tcl,binary data - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes adding new subcommands to the **binary** to better enable Index: tip/419.md ================================================================== --- tip/419.md +++ tip/419.md @@ -3,11 +3,11 @@ State: Draft Type: Project Vote: Pending Created: 28-Aug-2012 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://wiki.tcl.tk/tkevent ----- # Abstract Index: tip/420.md ================================================================== --- tip/420.md +++ tip/420.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 15-Nov-2012 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://www.etoyoc.com/tclmatrix3d ----- # Abstract Index: tip/423.md ================================================================== --- tip/423.md +++ tip/423.md @@ -1,10 +1,10 @@ # TIP 423: Formatting Timestamps with Milliseconds Author: Thomas Perschak State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 07-Jun-2013 Post-History: Keywords: Tcl, time, millisecond resolution ----- Index: tip/424.md ================================================================== --- tip/424.md +++ tip/424.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 07-Jul-2013 Post-History: Keywords: Tcl,subprocess,execution - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: tip-improve-exec ----- # Abstract Index: tip/428.md ================================================================== --- tip/428.md +++ tip/428.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 16-Mar-2014 Post-History: Keywords: socket,non-blocking,error reporting,option dictionary - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: tip-428 ----- # Abstract Index: tip/430.md ================================================================== --- tip/430.md +++ tip/430.md @@ -166,20 +166,20 @@ To assist in packaging extensions, **tclsh** will take on a new command _install_. If _install_ is the first argument, set subsequent arguments are passed to a new file in library **install.tcl**. **tclsh install** with no arguments is designed to return immediately with a normal return code, -thus making it easy to test if a tclsh is tip430 savvy but running in autoconf: +thus making it easy to test if a tclsh is TIP #430 savvy but running in autoconf: AS_IF([$TCLSH_PROG install],[ ZIP_PROG=${TCLSH_PROG} ZIP_PROG_OPTIONS="install mkzip" ZIP_PROG_VFSSEARCH="." AC_MSG_RESULT([Can use Native Tclsh for Zip encoding]) ]) -This tip only defines 2 function for install: +This TIP only defines 2 function for install: * **tclsh install mkzip** ... This command is a passthrough to the **zipfs mkzip** command, and allows tclsh to operate as zip encoder from make. @@ -265,11 +265,11 @@ not allowed anyway.) This allows VFS file systems to use **//**_FSTYPE_**:** namespace with impunity. ## Modifications to the Tcl build system -Tcl will now attempt to find a zip encoder in the environment. If a tip430 savvy tclsh is +Tcl will now attempt to find a zip encoder in the environment. If a TIP #430 savvy tclsh is discovered, that shell will be used. Failing that, the system will search for an executable named **zip**. Failing that, tcl will build it's own zip encoder. When it cannot locate a zip encoded in the environment, Tcl will now build a copy of the **minizip** program, whose source is currently distributed Index: tip/439.md ================================================================== --- tip/439.md +++ tip/439.md @@ -4,10 +4,13 @@ Type: Project Vote: Pending Created: 08-Dec-2015 Post-History: Tcl-Version: 8.7 + Obsoleted-By: 595 + Obsoleted-By: 599 + Obsoleted-By: 628 Tcl-Branch: semver ----- # Abstract Index: tip/445.md ================================================================== --- tip/445.md +++ tip/445.md @@ -18,23 +18,40 @@ Proposes additional public routines useful for extensions that implement custom `Tcl_ObjType`s. # Background -When an extension creates a custom **Tcl\_ObjType** it needs to operate on the fields of the **Tcl\_Obj** and the **Tcl\_ObjType** structs. +When an extension creates a custom **Tcl\_ObjType** it needs to operate +on the fields of the **Tcl\_Obj** and the **Tcl\_ObjType** structs. + +Almost all of these operations have been nicely encapsulated in utility +routines, so for example, an extension calls **Tcl\_GetString** to make +sure a value is set for _objPtr->bytes_, rather than worrying about the +backing details of calling the routine _objPtr->typePtr->updateStringProc_ +\(if present\) for itself. Likewise **Tcl\_DuplicateObj** routes +processing to type-specific routines as needed. -Almost all of these operations have been nicely encapsulated in utility routines, so for example, an extension calls **Tcl\_GetString** to make sure a value is set for _objPtr->bytes_, rather than worrying about the backing details of calling the routine _objPtr->typePtr->updateStringProc_ \(if present\) for itself. Likewise **Tcl\_DuplicateObj** routes processing to type-specific routines as needed. +There are gaps in this interface. Most glaring is the lack of any way +to call the _freeIntRepProc_ of an incumbent type other than directly +through the _typePtr_ field. Another missing bit is an encapsulated way +to set the string rep without direct manipulation of the _bytes_ +and _length_ fields. Within Tcl itself, there are internal utility +macros **TclFreeIntRep** and **TclInitStringRep** for these tasks, +but extensions have nothing. -There are gaps in this interface. Most glaring is the lack of any way to call the _freeIntRepProc_ of an incumbent type other than directly through the _typePtr_ field. Another missing bit is an encapsulated way to set the string rep without direct manipulation of the _bytes_ and _length_ fields. Within Tcl itself, there are internal utility macros **TclFreeIntRep** and **TclInitStringRep** for these tasks, but extensions have nothing. - -Besides convenience, utility routines such as these improve chances for correctness, since they bring constraints into one place instead of many places. For example, the requirement that when _objPtr->typePtr_ is not NULL, it must be paired with an appropriate _objPtr->internalRep_. The **TclFreeIntRep** macro has a history of fixing such bugs. A corresponding routine will offer the same benefit to extensions. +Besides convenience, utility routines such as these improve chances +for correctness, since they bring constraints into one place instead of +many places. For example, the requirement that when _objPtr->typePtr_ +is not NULL, it must be paired with an appropriate _objPtr->internalRep_. +The **TclFreeIntRep** macro has a history of fixing such bugs. A +corresponding routine will offer the same benefit to extensions. # Proposal Add to Tcl's stub table of public C routines a new routine - > void **Tcl\_FreeIntRep**\(Tcl\_Obj\* _objPtr_\) + > void **Tcl\_FreeInternalRep**\(Tcl\_Obj\* _objPtr_\) that performs precisely the same task as the existing internal macro **TclFreeIntRep**. Add to Tcl's stub table of public C routines a new routine @@ -63,44 +80,57 @@ an extension if it is already known that _objPtr_ possesses an internal type that is managed by the extension. Define a new public type - > typedef union **Tcl\_ObjIntRep** \{...\} **Tcl\_ObjIntRep** + > typedef union **Tcl\_ObjInternalRep** \{...\} **Tcl\_ObjInternalRep** where the contents are exactly the existing contents of the union in the _internalRep_ field of the **Tcl\_Obj** struct. This definition permits us to pass internal representations and pointers to them as arguments and results in public routines. Add to Tcl's stub table of public C routines a new routine - > void **Tcl\_StoreIntRep**\(Tcl\_Obj\* _objPtr_, const Tcl\_ObjType\* _typePtr_, const Tcl\_ObjIntRep\* _irPtr_\) + > void **Tcl\_StoreInternalRep**\(Tcl\_Obj\* _objPtr_, const Tcl\_ObjType\* _typePtr_, const Tcl\_ObjInternalRep\* _irPtr_\) which stores in _objPtr_ a copy of the internal representation pointed to by _irPtr_ and sets its type to _typePtr_. When _irPtr_ is NULL, this leaves _objPtr_ without a representation for type _typePtr_. Add to Tcl's stub table of public C routines a new routine - > Tcl\_ObjIntRep\* **Tcl\_FetchIntRep**\(Tcl\_Obj\* _objPtr_, const Tcl\_ObjType\* _typePtr_\) + > Tcl\_ObjInternalRep\* **Tcl\_FetchInternalRep**\(Tcl\_Obj\* _objPtr_, const Tcl\_ObjType\* _typePtr_\) which returns a pointer to the internal representation stored in _objPtr_ that matches the requested type _typePtr_. If no such internal representation is in _objPtr_, return NULL. # Compatibility -These are new routines, so they have no compatibility concerns in the sense of cause trouble for existing working code. +These are new routines, so they have no compatibility concerns in +the sense of cause trouble for existing working code. -They do help set up an improved compatibility scenario for the future however. Extensions that use these new routines to stop directly referring to the fields of the **Tcl\_Obj** and **Tcl\_ObjType** structs are prepared to support a source-compatible migration to a Tcl 9 that might then be free to make revisions to those structs. +They do help set up an improved compatibility scenario for the future +however. Extensions that use these new routines to stop directly +referring to the fields of the **Tcl\_Obj** and **Tcl\_ObjType** structs +are prepared to support a source-compatible migration to a Tcl 9 that +might then be free to make revisions to those structs. # Implementation -Taking shape on the tip-445 branch. +See the tip-445 branch. # Rejected Alternatives + +At the time of its approval vote, this TIP proposed routines and a type +with the names **Tcl\_FreeIntRep**, **Tcl\_ObjIntRep**, **Tcl\_StoreIntRep**, +and **Tcl\_FetchIntRep**. Post-vote discussion on the TCLCORE mailing list +raised the criticisms that **IntRep** was easily confused and typoed with +the common **Tcl\_Interp** variable name *interp*, and could also falsely +suggest some relationship to integer types in the minds of many programmers. +All names were changed to replace **IntRep** with **InternalRep**. # Copyright This document has been placed in the public domain. Index: tip/448.md ================================================================== --- tip/448.md +++ tip/448.md @@ -1,10 +1,10 @@ # TIP 448: Update Tcl_SetNotifier to Reinitialize Event Loop Author: Jeff Rogers State: Draft Type: Project - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Pending Created: 24-May-2016 Post-History: Keywords: Tcl, C API Implementation-URL: http://fossil.etoyoc.com/sandbox/tcllib/artifact/b2b272a285811272 Index: tip/450.md ================================================================== --- tip/450.md +++ tip/450.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 18-Jul-2016 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Keywords: Tcl, binary data Tcl-Branch: tip-450 ----- # Abstract Index: tip/451.md ================================================================== --- tip/451.md +++ tip/451.md @@ -5,10 +5,11 @@ Vote: Pending Created: 10-Aug-2016 Post-History: Keywords: Tcl,event loop Tcl-Version: 8.7 + Obsoleted-By: 455 Tcl-Branch: updateextended ----- # Abstract Index: tip/452.md ================================================================== --- tip/452.md +++ tip/452.md @@ -5,11 +5,11 @@ State: Draft Type: Project Vote: Pending Created: 10-Aug-2016 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote-Results: 2/4/3 rejection in favour of further work Votes-For: KBK, JD Votes-Against: DKF, JN, DGP, AK Votes-Present: BG, FV, SL Tcl-Branch: tip-452 Index: tip/453.md ================================================================== --- tip/453.md +++ tip/453.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 13-Sep-2016 Post-History: Keywords: Build tooling - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: https://core.tcl-lang.org/tclconfig/timeline?r=practcl ----- # Abstract Index: tip/455.md ================================================================== --- tip/455.md +++ tip/455.md @@ -1,14 +1,18 @@ # TIP 455: Extensions to [vwait]: Variable Sets and Scripted Access to Tcl_DoOneEvent Author: Christian Werner - State: Draft + State: Final Type: Project Tcl-Version: 8.7 - Vote: Pending + Vote: Done Created: 07-Oct-2016 Keywords: Tcl, event loop - Post-History: + Tcl-Branch: tip-455 + Vote-Summary: Accepted 4/0/2 + Votes-For: BG, JN, KW, SL + Votes-Against: none + Votes-Present: KBK, MC ----- # Abstract This TIP generalizes the **vwait** command to allow waiting on zero, one, or @@ -39,12 +43,12 @@ command. Additional flags to **vwait** control which types of events are to be dealt with in its event loop, i.e. the underlying _Tcl\_DoOneEvent\(\)_ API. -When more than one kind of active input \(both, variables and file channels\) is -involved in an instance of **vwait**, another flag controls if any one of +When more than one kind of active input \(both, variables and file channels\) +is involved in an instance of **vwait**, another flag controls if any one of the inputs or all inputs must have been activated in order to terminate the event loop. This allows for scenarios, where **vwait** can be used as a kind of "barrier" getting broken if all required conditions are fulfilled, i.e., axe, saw, spade, fire accelerant, water, in order to demolish, burn down, extinct the glow, and finally bury the trellis-work fence. @@ -54,47 +58,64 @@ If the **vwait** is constrained by a timeout, and the time limit is reached, its event loop terminates early and **vwait** indicates that timeout by a negative integer result. Otherwise, the return value is the remaining number of milliseconds \(positive integer which can be zero\) of the timeout -constraint. This property combined with [[302]](302.md) allows to implement \(soft -real-time\) control loops. +constraint. This property combined with [[302]](302.md) allows to implement +\(soft real-time\) control loops. + +An extended result list can be obtained from **vwait** by another flag +which gives detailed information on the cause of the termination of the +event loop. # Proposal The **vwait** command shall have the following signature: - > **vwait** _variable-name_ - well known and implemented behaviour + > **vwait** _var-name_ - well known and implemented behaviour - > **vwait** _options_ ?_variable-names_? - all available enhanced + > **vwait** _options_ ?_var-names_? - all available enhanced features; more than one variable name may be given, in which case the wait will terminate when any of the variables are written to \(unless the **-all** option below is given\) where _options_ are: - **--**: indicates end of options - - **-all**: all \(except timeout\) conditions must be met - - **-nofileevents**: don't consider file events - - **-noidleevents**: don't consider idle events - - **-notimerevents**: don't consider timer events - - **-nowindowevents**: don't consider window system events - - **-readable** __: __ becomes readable - - **-timeout** __: timeout in milliseconds; return the estimated number of - milliseconds remaining in the wait. - - **-writable** __: __ becomes writable + **--**: indicates end of options + + **-all**: all \(except timeout\) conditions must be met + + **-extended**: result is a list (see below) + + **-nofileevents**: don't consider file events + + **-noidleevents**: don't consider idle events + + **-notimerevents**: don't consider timer events + + **-nowindowevents**: don't consider window system events + + **-readable** _channel_: _channel_ becomes readable + + **-timeout** _ms_: timeout in milliseconds + + **-variable** _var-name_: _var-name_ is written or unset + + **-writable** _channel_: _channel_ becomes writable The return value of **vwait** shall be the empty string except when the -**-timeout** option is in effect \(see above\). +**-timeout** and/or **-extended** options are in effect \(see above\). + +The normal result format when **-timeout** is given is the number of +milliseconds remaining in the wait. Otherwise it's an empty string. + +The extended result format is a list with even number of elements. Odd +elements take the values **readable**, **timeleft**, **variable**, and +**writable**, i.e. qualify the event. Even elements are the corresponding +variable and channel names or the remaining number of milliseconds. +The list is ordered by the occurrences of the event(s) with the exception +of **timeleft**, which always comes last. Where the combination of options doesn't make sense, or even conflicts, an appropriate error message shall be thrown, e.g., **-timeout** and **-notimerevents** can't be specified at the same time. Index: tip/457.md ================================================================== --- tip/457.md +++ tip/457.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 21-Nov-2016 Post-History: Keywords: Tcl,procedure,argument handling - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: tip-457 ----- # Abstract Index: tip/460.md ================================================================== --- tip/460.md +++ tip/460.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 08-Dec-2016 Post-History: Keywords: Tcl,variable,link,upvar - Tcl-Version: 9.0 + Tcl-Version: 9.1 Tcl-Branch: dah-proc-arg-upvar ----- # Abstract Index: tip/465.md ================================================================== --- tip/465.md +++ tip/465.md @@ -1,14 +1,18 @@ # TIP 465: Change Rule 8 of the Dodekalogue to Cut Some Corner Cases Author: Andreas Leitgeb - State: Draft + State: Final Type: Project - Vote: Pending + Vote: Done Created: 03-Mar-2017 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.0 Tcl-Branch: tip-465 + Vote-Results: 4/0/0 accepted + Votes-For: FV, KW, JN, SL + Votes-Against: none + Votes-Present: none ----- # Abstract This TIP proposes to make **$**-substitution more conforming to naive @@ -62,13 +66,10 @@ Without having array parses and function parses agreeing on close paren, then it is possible that parsing as an array will see a trailing assignment operator that would otherwise have been nested in a subexpression, or even part of a quoted literal value. -Because of the low expected impact on real code, a target of 8.7 is considered -feasible. - # Implementation A full implementation of this TIP is now checked in on branch _tip-465_. # Alternatives Index: tip/466.md ================================================================== --- tip/466.md +++ tip/466.md @@ -5,11 +5,11 @@ Type: Project Vote: Pending Created: 10-Mar-2017 Post-History: Keywords: Tk,text widget - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tk-Branch: revised_text ----- # Abstract @@ -368,10 +368,50 @@ this, in many cases, especially if many tags are used, and/or undo is enabled, the revised version is even decreasing the memory usage. Detailed memory comparison between legacy code and revised code can be found at + +## Miscellaneous + + * No function signature pertaining to a public interface was changed. Also + public data structures haven't been touched. + + * All recent new features brought in trunk in the legacy version have their + counterpart in the revised version, have been improved in performance and + have no known drawbacks. Minor incompatibilities are however identified + here and there. + +# Target Release + +Given the amount of changes, also because of our usual precautions regarding +backwards compatibility, and despite the very high quality of the code and the +fact it passes \(almost all\) the previously existing test suite, it is deemed +reasonable to target Tcl/Tk 8.7 \(or 9.0\), but neither the 8.6 nor the 8.5 +streams of releases, which will continue to implement the legacy text widget +code. + +Support of versions back to 8.5 is currently included in the revised code, but +will be removed \(because it's useless for use in trunk only\) at the time the +new code will get merged into trunk. + +# Implementation + +Implementation of the revised text widget code has been placed in branch + of the fossil repository. + +This implementation compiles on Linux, Windows, and OS X. It respects the +standards of Tk \(C99 standard, and also the Tcl source code formatting +described in [[247]](247.md)\). + +The man page for the text widget has been contributed by jima and is included +in the revised\_text branch. + +The expected results of many tests were adjusted to take into account that the +revised implementation is better optimizing, so some trace results of display +line computation are different. Other adjustments were required because of bug +fixes. ## Known Issues in the Revised Implementation Based on the author's website, currently only these issues are known: @@ -419,50 +459,17 @@ * More tests should be written to exercise the new or changed features. * The OS X case should be more tested on a real Mac, because it's the only platform using context drawing. - -## Miscellaneous - - * No function signature pertaining to a public interface was changed. Also - public data structures haven't been touched. - - * All recent new features brought in trunk in the legacy version have their - counterpart in the revised version, have been improved in performance and - have no known drawbacks. Minor incompatibilities are however identified - here and there. - -# Target Release - -Given the amount of changes, also because of our usual precautions regarding -backwards compatibility, and despite the very high quality of the code and the -fact it passes \(almost all\) the previously existing test suite, it is deemed -reasonable to target Tcl/Tk 8.7 \(or 9.0\), but neither the 8.6 nor the 8.5 -streams of releases, which will continue to implement the legacy text widget -code. - -Support of versions back to 8.5 is currently included in the revised code, but -will be removed \(because it's useless for use in trunk only\) at the time the -new code will get merged into trunk. - -# Implementation - -Implementation of the revised text widget code has been placed in branch - of the fossil repository. - -This implementation compiles on Linux, Windows, and OS X. It respects the -standards of Tk \(C99 standard, and also the Tcl source code formatting -described in [[247]](247.md)\). - -The man page for the text widget has been contributed by jima and is included -in the revised\_text branch. - -The expected results of many tests were adjusted to take into account that the -revised implementation is better optimizing, so some trace results of display -line computation are different. Other adjustments were required because of bug -fixes. + +## Known bugs + +Two bugs, namely [[a34b49f8c6]](https://core.tcl-lang.org/tk/tktview?name=a34b49f8c6) +and [[6a78781cc3]](https://core.tcl-lang.org/tk/tktview?name=6a78781cc3), make +the corresponding testcases fail but these are not the only known bugs. The complete +list of known bugs can be requested from the Tk bug tracker: # Open Questions * tkTextUndo.c implements a specialized undo/redo, not using the legacy tkUndo.c. Reasons for this are stated at the top of tkTextUndo.c. It is Index: tip/467.md ================================================================== --- tip/467.md +++ tip/467.md @@ -48,11 +48,11 @@ Proposed URL for the new repository will be ## Backwards compatibility - * _tip.tcl.tk/.html_ should still show a rendered result. This could be redirected to _core.tcl-lang.org/tips/doc/trunk/tip/.md_ + * _tip.tcl.tk/.html_ should still show a rendered result. This could be redirected to _core.tcl-lang.org/tips/doc/main/tip/.md_ * _tip.tcl.tk_ offers several converted formats \(XML, \*roff, ...\). The fossil option will be to use the _core.tcl-lang.org/tips/file/tip/.md?download_ URL to get the raw Markdown downloads. For getting the other options one could convert the markdown source file using something like pandoc. * E-mail address are not hidden in the source and in the rendered result. If e-mail addresses need to be hidden there are two options Index: tip/468.md ================================================================== --- tip/468.md +++ tip/468.md @@ -1,15 +1,19 @@ # TIP 468: Support Passing TCP listen Backlog Size Option to TCP Socket Creation Author: Shannon Noe - State: Draft + State: Final Type: Project - Vote: Pending + Vote: Done Created: 03-Apr-2017 Post-History: Keywords: Tcl, socket, SOMAXCONN Tcl-Version: 8.7 - Tcl-Branch: tip-468 + Tcl-Branch: tip-468 + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK, KW, SL + Votes-Against: none + Votes-Present: none ----- # Abstract This TIP adds the ability to control the TCP backlog depth used by the Index: tip/469.md ================================================================== --- tip/469.md +++ tip/469.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 16-Apr-2017 Post-History: Keywords: Tcl,event handling - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: tip-469 ----- # Abstract Index: tip/471.md ================================================================== --- tip/471.md +++ tip/471.md @@ -1,11 +1,11 @@ # TIP 471: Add [info linkedname] Introspection Command Author: Mathieu Lafon State: Draft Type: Project Created: 05-May-2017 - Tcl-Version: 8.7 + Tcl-Version: 9.1 Vote: Done Post-History: Tcl-Branch: info-linkedname Vote-Summary: Rejected 2/2/3 Votes-For: DKF, JN Index: tip/474.md ================================================================== --- tip/474.md +++ tip/474.md @@ -110,15 +110,15 @@ MouseWheel events. On X11, buttons 4 up to 9 in scripts will handle the X11 buttons numbered 8 up to 13. On macOS, the scaling for MouseWheel buttons has always been different from those on Windows, with a factor of 120. -This means that applications assuming Tk 8.6 +This means that applications assuming Tk 8.6 `` events will need to be modified to the new behaviour, otherwise the screen movements will be far too much. On Windows, everything works as before, no incompatibility -there. Many applications already define the +there. Many applications already define the `` binding on X11, even though in Tk 8.6 they are not used. Such applications will work on X11 in Tk 8.7 the same as in Tk 8.6 If the application needs to support Tcl/Tk 8.6, an extra @@ -128,11 +128,11 @@ This seems a minor inconvenience for gaining further platform-independence. # Reference Implementation -In tk branch tip474. +In Tk branch `tip474`. # Copyright This document is placed in public domain. Index: tip/479.md ================================================================== --- tip/479.md +++ tip/479.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 23-Oct-2017 Post-History: Keywords: Tcl,procedure,argument handling - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: tip479 ----- # Abstract This TIP proposes an enhancement of the Tcl language to support named @@ -184,11 +184,11 @@ ### type: Type: string Default: null Options: null, boolean, integer, wide, entier, double -To support [tip#480](https://core.tcl-lang.org/tips/doc/trunk/tip/480.md). For now strictly advisory. +To support [tip#480](https://core.tcl-lang.org/tips/doc/main/tip/480.md). For now strictly advisory. In the future this will check that the incoming values are the specified type. # Implementation This TIP will be rolled out in 3 stages. Index: tip/480.md ================================================================== --- tip/480.md +++ tip/480.md @@ -2,11 +2,11 @@ Author: Kevin B. Kenny State: Draft Type: Project Vote: Pending Created: 25-Oct-2017 - Tcl-Version: 8.7 + Tcl-Version: 9.1 Keywords: assertion, pragma, type, alias, compilation Post-History: Tcl-Branch: tip-480 ------ Index: tip/481.md ================================================================== --- tip/481.md +++ tip/481.md @@ -1,77 +1,68 @@ -# TIP 481: `Tcl_GetStringFromObj()` with `size_t` length parameter +# TIP 481: `Tcl_GetStringFromObj()` with `ptrdiff_t` length parameter Author: Jan Nijtmans - State: Draft + State: Final Type: Project - Vote: Pending + Vote: Done Created: 27-Oct-2017 Post-History: Keywords: Tcl Tcl-Version: 8.7 Tcl-Branch: tip-481 + Vote-Summary: Accepted 4/0/2 + Votes-For: JN, KW, KK, MC + Votes-Against: none + Votes-Present: FV, SL ----- # Abstract This TIP proposes enhancing various C API functions which having a `int *` parameter, -to be used with a `size_t *` parameter as well. In addition, a new `Tcl_GetValue()` -function is proposed which can retrieve a signed or unsigned (wide) integer or a -float/double/long double from a `Tcl_Obj`, . +to be used with a `ptrdiff_t *` parameter as well. # Rationale In Tcl 9, the range of various functions need to be increased. For example -`Tcl_GetStringFromObj` now is limited to returning 32 bit for the maximum -string length. This can be fixed by introducing an internal function -`Tcl_GetStringFromObj2()` which has a `size_t *` parameter in stead of `int *`. -On top of that, `Tcl_GetStringFromObj` is provided as a macro, which switches +`Tcl_GetStringFromObj()` is currently limited to returning 31 bit for the +maximum string length. This can be fixed by introducing a new internal +function which has a `ptrdiff_t *` parameter in stead of `int *`. +On top of that, `Tcl_GetStringFromObj()` is provided as a macro, which switches between the two possible functions depending on the size of the parameter. -The same is done for `Tcl_GetUnicodeFromObj` and `Tcl_GetByteArrayFromObj`. +The same is done for `Tcl_GetUnicodeFromObj()` and `Tcl_GetByteArrayFromObj()`. This way, we have a compatibility layer, easing the transition to Tcl 9. -In Tcl 8.7, although the parameter has type size\_t, the actual length range -that can be returned is actually -1 up to 4294967294. In Tcl 9, the full -size\_t range is available. +In Tcl 8.7, although the parameter has type ptrdiff\_t, the length range +that can be returned is actually only 0 up to 4294967294. In Tcl 9, the full +ptrdiff\_t range is available. + +Commits like [this one](https://core.tcl-lang.org/tk/info/1597671a5e01ad99) (in Tk) +will no longer be needed; the function `TkGetStringFromObj()` will just become +obsolete: `Tcl_GetStringFromObj()` will be useable no matter the string length +being stored in an `int` or a ptrdiff_t' variable. # Specification -Add to Tcl's stub table of public C routines the following new routines +Add to Tcl's stub table of public C routines the following new (internal) routines + + > int **TclGetStringFromObj**\(Tcl\_Obj \*_objPtr_, ptrdiff\_t \*_lengthPtr_\) - > int **Tcl\_GetStringFromObj2**\(Tcl\_Obj \*_objPtr_, size\_t \*_lengthPtr_\) + > int **TclGetUnicodeFromObj**\(Tcl\_Obj \*_objPtr_, ptrdiff\_t \*_lengthPtr_\) - > int **Tcl\_GetUnicodeFromObj2**\(Tcl\_Obj \*_objPtr_, size\_t \*_lengthPtr_\) - - > int **Tcl\_GetByteArrayFromObj2**\(Tcl\_Obj \*_objPtr_, size\_t \*_lengthPtr_\) + > int **TclGetByteArrayFromObj**\(Tcl\_Obj \*_objPtr_, ptrdiff\_t \*_lengthPtr_\) Those 3 functions do exactly the same as their existing counterparts, only the _lengthPtr_ -parameter is of type size\_t in stead of int. The original 3 functions will be wrapped in -a macro of the same name, so depending on the actual size of the variable where _lengthPtr_ -points to, the switch between the two function versions are done automatically. So, the -new functions don't need to be used in code, the original function can be used pointing to -a size_t length variable as well. - - > int **Tcl\_GetValue**\(Tcl\_Interp \*interp, Tcl\_Obj \*_objPtr_, void \*_valuePtr_, int _flags_\) - -This functions is able to function the same as Tcl\_GetIntFromObj, Tcl\_GetLongFromObj, -Tcl\_GetWideFromObj and Tcl\_GetDoubleFromObj. The flags argument determines the actual -conversion done. The following flags are possible. - - > **TCL\_TYPE\_I**(int \| long \| Tcl_WideInt) : valuePtr points at an integer of given size - - > **TCL\_TYPE\_U**(int \| long \| Tcl_WideInt) : valuePtr points at an unsigned integer of given size - - > **TCL\_TYPE\_D**(float \| double) : valuePtr points at a float or double - -Those 3 macro's use the sizeof() macro on the type to provide the requested size to Tcl\_GetValue(). Actually, -you can use any integer type, so e.g. size\_t or intmax\_t work as well. - - > int **Tcl\_GetUIntFromObj**\(Tcl\_Interp \*interp, Tcl\_Obj \*_objPtr_, void \*_valuePtr_\) - -This is a wrapper macro around **Tcl\_GetValue**, handling unsigned integer values only. - -For Tcl 9.0, the function **Tcl\_GetIntFromObj** is modified to return 1 when the Tcl\_Obj -value is in the range -2147483648 .. 2147483647. +parameter is of type `ptrdiff_t` in stead of `int`. The original 3 functions will be wrapped in +a macro of the same name, so depending on the actual size of the variable where _lengthPtr_ +points to, the switch between the two function versions are done automatically. Therefore, the +new functions are not supposed to be used directly in code, usage is fully transparent +through the Tcl\_GetStringFromObj/Tcl\_GetUnicodeFromObj/Tcl\_GetByteArrayFromObj macros. + +# Addendum + +After [TIP #660](660.md) was accepted, a lot of functions changed from +using size\_t to ptrdiff\_t parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. # Implementation See the _tip-481_ branch in Tcl's fossil repository . Index: tip/494.md ================================================================== --- tip/494.md +++ tip/494.md @@ -1,100 +1,64 @@ -# TIP 494: More use of size_t in Tcl 9 +# TIP 494: More use of size_t/ptrdiff_t in Tcl 9 Author: Jan Nijtmans State: Final Type: Project Vote: Done Created: 29-Dec-2017 Post-History: Keywords: tcl Tcl-Version: 9.0 Tcl-Branch: memory-API + Vote-Results: 3/0/2 accepted + Votes-For: DKF, JN, KBK + Votes-Against: none + Votes-Present: JD, SL ----- # Abstract This TIP describes the non-controversial part of the Tcl 9 changes: Make Tcl 9 ready for the 64-bit era. # Rationale -Many Tcl API functions and struct fields have _int_ parameters, which don't provide sufficient room on 64-bit platforms. +`int` is the type of many Tcl API function arguments and return values, and also of many struct fields, but it doesn't provide sufficient room on 64-bit platforms. # Proposal - * Enhance the hash functions, such that the hash value is stored in a size\_t in stead of unsigned int. This allows hash tables to grow beyond 4Gb on 64-bit platforms - - * Enhance all struct fields representing refCounts or epochs, make them of type size_t - - * All memory-related functions, such as Tcl\_Alloc\(\), will change its size argument from _int_ to _size\_t_, and its "char *" arguments to "void *" - - * Many functions, which have size parameters of type _int_ (but NOT _int *_) will change to type _size\_t_ - - * All _ClientData_ type arguments will be changed to _void *_ arguments. This is actually the same type, but it prevents the need for type-casts in some situations. - - * Provide a compilation option -D_TCL\_8\_COMPAT_, which provides fully source compatibility. Using this option, extensions compile and run fine using either Tcl 8 or Tcl 9 headers. - More explanation below. - - * Provide 2 new macro's TCL\_IO\_FAILURE and TCL\_AUTO\_LENGTH, both equal to ((size_t)-1). They can help making extensions use the full 64-bit range with Tcl 9, which still compile with Tcl 8 as well (see below). - Tcl 8.7 will get those macro's too, but the value there is (-1) - - * The functions Tcl\_Alloc(), Tcl\_Free() (and friends) change to redirect to their debugging variants if the TCL\_MEM\_DEBUG is defined. So, Tcl\_Alloc() becomes the same as ckalloc(), ending the general confusion regarding the difference between those two groups of functions: Starting with Tcl 9.0 there is no difference anymore. - ckalloc() and friends are deprecated starting with 9.0, but there are no plans to actually remove those and no deprecation warning will be given if extensions use it. - - -On 32-bit platforms, this is all 100% upwards binary compatible, provided no _internal_ API is used (since some internal structs might have incompatible but externally invisible changes) - -On 64-bit platforms, those changes cause binary incompatibility. Therefore the TCL\_STUB\_MAGIC value needs to change, so extensions compiled using Tcl 9 headers will not load in Tcl 8 and reverse. - - -# Implications - -Although those changes are binary compatible on 32-bit platforms, there is a small potential source incompatibility. -There are 10 functions which previously had an _int_ return argument, which is changed to _size\_t_ (for now, see below). -This signed/unsigned change might lead to subtle difference in behavior. - -The 10 functions are: - - * Tcl_Gets - - * Tcl_GetsObj - - * Tcl_Read - - * Tcl_ReadChars - - * Tcl_ReadRaw - - * Tcl_Write - - * Tcl_WriteChars - - * Tcl_WriteObj - - * Tcl_WriteRaw - - * Tcl_Ungets - -If the return value of such function is directly used in a compare, this could lead to the use of an unsigned compare in stead of a signed compare. -If you compile your extension with -D_TCL\_8\_COMPAT_, those 10 functions will be changed to wrapper macro's which makes everything behave as if those functions return Tcl_WideInt. That's the easiest way to resolve this potential problem. - -There are 2 other ways to make this change, which can do it without the use of the _TCL\_8\_COMPAT_ macro: - - * Add _1_ to the left and right hand side of the comparison. E.g. [as here](https://core.tcl-lang.org/tk/fdiff?v1=100235897e9cf359&v2=9cf86629040df0d3) - - * Don't compare to -1 using < or >, but always to TCL\_IO\_FAILURE using == or != . E.g. [as here](https://core.tcl-lang.org/tk/info/abe0d3b121cbb12d) - -Tk and [sqlite](http://cyqlite.sourceforge.net/cgi-bin/sqlite/info/17c148b94008df81) are already converted to make full use of TIP #494. Other extensions included with Tcl (e.g. tdbc) are unaffected. - -# Open issues - -There has been discussion, whether the return-type of these 10 functions (and possibly other functions) should actually be size\_t or maybe some other type. -A Tcl-specific type *Tcl\_Size* could also be defined for this. Actually, this TIP provides 2 possibilities: Without -D_TCL\_8\_COMPAT_, the type is size\_t, with -D_TCL\_8\_COMPAT_ it is Tcl_WideInt. -This gives enough room for experimenting which one is best, maybe it would be better to make it ssize\_t or ptrdiff\_t. - -There - for sure - will be more future TIP's, which propose more API changes for 9.0. -This one - definitely - is not the last one. -So, this TIP doesn't make a final decision yet what will be the final type returned by those 10 functions. + * For hash functions, replace `unsigned int` with `size_t` as the type of the hash value, which allows hash tables to grow beyond 4Gb on 64-bit platforms. + + * Make `size_t` the type of all struct fields representing reference counts or epochs. + + * Change the type of the `size` parameter of each memory-related function, e.g. `Tcl_Alloc()`, from `int` to `size_t` and change the `char *` argument to `void *`. + + * Change the type of the `size` parameter of many functions from `int` (but NOT `int *`) to `Tcl_Size`. + + * Change the type of all `ClientData` arguments `void *`. This is actually the same type, but it prevents the need for type casts in some situations. + + * Provide two new macros, `TCL_IO_FAILURE` and `TCL_AUTO_LENGTH`, each defined as `((Tcl_Size)-1)`, to help extensions use the full 64-bit range with Tcl 9, but still compile with Tcl 8 as well (see below). + Provide those macros in Tcl 8.7 too, but defined as `(-1)`. + + * Modify `Tcl_Alloc()`, `Tcl_Free()`, and related functions to redirect to + their debugging variants if `TCL_MEM_DEBUG` is defined: `Tcl_Alloc()` + becomes the same as `ckalloc()`, ending the general confusion regarding the + difference between those two groups of functions: Starting with Tcl 9.0 + there no longer any difference. `ckalloc()` and related functions are + deprecated starting with 9.0, but there are no plans to remove them, and no + deprecation warning will be given if extensions use them. + + +On 32-bit platforms this is all 100% upwards binary compatible provided no _internal_ API is used, since some internal structs might have incompatible but externally invisible changes. + +On 64-bit platforms, those changes cause binary incompatibility. Therefore the `TCL_STUB_MAGIC` value needs to change, so extensions compiled using Tcl 9 headers will not load in Tcl 8 and reverse. + + +# Addendum + +After [TIP #660](660.md) was accepted, a lot of functions changed from +using size\_t to ptrdiff\_t parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. Also +`-DTCL_8_COMPAT` is not provided any more, because it is no longer needed. # Implementation The implementation of this TIP can be found in the [memory-API branch] (https://core.tcl-lang.org/tcl/timeline?r=memory-API). Index: tip/495.md ================================================================== --- tip/495.md +++ tip/495.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 14-Jan-2018 Post-History: Keywords: Tcl,build system,extension building - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This tip proposes that we switch extension development away from implementing automation in autoconf and nmake and towards using Tcl. Index: tip/498.md ================================================================== --- tip/498.md +++ tip/498.md @@ -1,14 +1,14 @@ # TIP 498: Simplify Tcl_DeleteNamespace - Author: Nathan Coulter + Author: Nathan Coulter State: Draft Type: Project Vote: Pending Created: 18-Jan-2016 Post-History: Keywords: tcl - Tcl-Version: 8.7 + Tcl-Version: 9.1 Tcl-Branch: bug-e593adf103-core-8 ----- # Abstract Index: tip/502.md ================================================================== --- tip/502.md +++ tip/502.md @@ -5,10 +5,14 @@ Vote: Done Created: 26-Feb-2018 Post-History: Tcl-Version: 8.7 Tcl-Branch: tip-502 + Vote-Results: 5/0/0 accepted + Votes-For: DKF, JN, JD, KBK, SL + Votes-Against: none + Votes-Present: none ----- # Abstract Proposes reformed handling of Tcl index values. Index: tip/510.md ================================================================== --- tip/510.md +++ tip/510.md @@ -4,21 +4,21 @@ Type: Project Vote: Done Created: 5-Jun-2018 Post-History: Keywords: Tk - Tcl-Version: 8.7 + Tcl-Version: 9.0 Tk-Branch: tip-510 Vote-Summary: Rejected 1/3/1 Votes-For: DKF Votes-Against: KBK, JN, FV Votes-Present: BG Vote-Comments: code not yet ready, needs porting to macOS; alternate might be to just co-distribute, just as TDBC is with Tcl ----- -**This tip depends on tip556. It is deferred until tip556 is accepted.** +**This tip depends on [TIP #556](556.md). It is deferred until TIP #556 is accepted.** # Abstract [Rbc][] aka "Refactored [BLT][] Components" have graph widgets and Tk commands which are missing in *Tk*. Index: tip/511.md ================================================================== --- tip/511.md +++ tip/511.md @@ -1,19 +1,19 @@ # TIP 511: Implement Tcl_AsyncMarkFromSignal() Author: Christian Werner - State: Accepted + State: Final Type: Project Vote: Done Created: 14-June-2018 Post-History: Keywords: Tcl,threads Tcl-Version: 8.7 + Tcl-Branch: tip-511 Vote-Results: 4/0/5 accepted Votes-For: DKF, BG, KBK, JN, JD, SL Votes-Against: none Votes-Present: DGP, FV, AK - Implementation-URL: https://www.androwish.org/index.html/info/40790af1e8e4ec9f ----- # Abstract This TIP proposes to add a Tcl API for marking `Tcl_AsyncHandlers` ready for Index: tip/513.md ================================================================== --- tip/513.md +++ tip/513.md @@ -4,12 +4,12 @@ Type: Project Vote: Pending Created: 02-Aug-2017 Post-History: Keywords: Tcl,data structure - Tcl-Version: 8.7 - Implementation-URL: https://core.tcl-lang.org/tips/doc/trunk/attach/513/agendas.tcl + Tcl-Version: 9.1 + Implementation-URL: https://core.tcl-lang.org/tips/doc/main/attach/513/agendas.tcl ----- # Abstract This proposes new commands for Tcl to support efficient dynamically-changing Index: tip/514.md ================================================================== --- tip/514.md +++ tip/514.md @@ -6,18 +6,22 @@ Created: 20-Aug-2018 Post-History: Keywords: Tcl Tcl-Version: 8.7 Tcl-Branch: tip-514 + Vote-Results: 3/0/2 accepted + Votes-For: DKF, JN, KBK + Votes-Against: none + Votes-Present: JD, SL ----- # Abstract -This TIP proposes to resolve the platform differences between int/wide/entier math functions and commands like "sting is integer"/"string is wide"/"string is entier". +This TIP proposes to resolve the platform differences between int/wide/entier math functions and commands like "string is integer"/"string is wide"/"string is entier". At the script level it should not be relevant whether the platform is 32-bit or 64-bit any more. -Most Tcl commands already accept unlimited integers, so there is hardly any command left which need to checked for correct range. +Most Tcl commands already accept unlimited integers, so there is hardly any command left which need to be checked for correct range. # Rationale Some examples: @@ -30,11 +34,11 @@ 1 % string is int 4294967296 0 -So, valid integers appear to range from -(2^32-1) to +2^32-1. Most people learn in school that 32-bit integers range from -2^31 to 2^31-1. Are Tcl's integers 33-bit, but then excluding -4294967296? +So valid integers appear to range from -(2^32-1) to +2^32-1. Most people learn in school that 32-bit integers range from -2^31 to 2^31-1. Are Tcl's integers 33-bit, but then excluding -4294967296?
 % string is wide -18446744073709551616
 0
 % string is wide -18446744073709551615
@@ -43,11 +47,11 @@
 1
 % string is wide 18446744073709551616
 0
 
-So, valid wide integers appear to range from -(2^64-1) to +2^64-1. Most people learn in school that 64-bit integers range from -2^63 to 2^63-1. Are Tcl's wide integers 65-bit, but then excluding -18446744073709551616? +So valid wide integers appear to range from -(2^64-1) to +2^64-1. Most people learn in school that 64-bit integers range from -2^63 to 2^63-1. Are Tcl's wide integers 65-bit, but then excluding -18446744073709551616?
 % expr int(2147483648)          ; #on LP64/ILP64 platforms
 2147483648
@@ -85,11 +89,11 @@
  * The C function Tcl\_GetLongFromObj() is changed to behave like Tcl\_GetIntFromObj() if sizeof(long) == sizeof(int), and to behave like Tcl\_GetWideIntFromObj() if sizeof(long) == sizeof(Tcl_WideInt)
 
 # Implications
 
  * "string is integer" can no longer be used to check for a specific range.
-   That doesn't matter any more, because the command argument that was being protected, doesn't throw an exception any more in case of under/overflow since the introduction of bignums.
+   That doesn't matter any more, because since the introduction of bignums the command argument that was being protected doesn't throw an exception any more.
 
  * int() can no longer be used for 32-bit/64-bit (platform-dependent) truncation.
 
  * If you still really want to protect some command argument from overflowing, Use Tcl\_GetWideIntFromObj() in this command, and use "string is wide" to check for proper range.
    But - still better - is use Tcl\_GetWideIntFromObj(), while falling back to Tcl\_GetBignumFromObj() if the range requires it.

Index: tip/518.md
==================================================================
--- tip/518.md
+++ tip/518.md
@@ -118,11 +118,11 @@
 
 Emiliano has provided a [ticket 2863003fff](https://core.tcl-lang.org/tk/info/2863003fff) with the implementation in [branch bug-d6b95ce492](https://core.tcl-lang.org/tk/timeline?r=bug-d6b95ce492&nd&c=2016-09-21+06%3A32%3A55&n=200).
 
 This solution is now continued with the tag "tip518-event-last-child-unmanaged".
 
-Koen Dankart and François Vogel have worked on the solution of the similar tip474, which is available in [branch tip-454](https://core.tcl-lang.org/tk/timeline?n=100&r=tip-454).
+Koen Dankart and François Vogel have worked on the solution of the similar [TIP #474](474.md), which is available in [branch tip-454](https://core.tcl-lang.org/tk/timeline?n=100&r=tip-454).
 This information may eventually also be relevant.
 
 # Rejected Proposal
 
 [TIP 454](454.md) has proposed to set the size of the widget automatically to 1x1 (the initial size if no widget packed/gridded).
@@ -133,16 +133,16 @@
 
 ## Why not use the event name \<\\> ?
 
 This is a logical and elegant proposal.
 
-TIP 454 was withdrawn due to:
+TIP #454 was withdrawn due to:
 
    1. if the geometry manager is changed (ex: pack to grid), there is a flickering introduced.
    2. an additional Configure event was introduced which breaks present script.
 
-To invoke `<>` instead `<>` would trigger incompatibility 2 of TIP454.
+To invoke `<>` instead `<>` would trigger incompatibility 2 of TIP #454.
 Due to that, a new virtual event is proposed.
 
 # Copyright
 
 This document has been placed in the public domain.

Index: tip/520.md
==================================================================
--- tip/520.md
+++ tip/520.md
@@ -3,11 +3,11 @@
 	State:		Draft
 	Type:		Project
 	Vote:		Pending
 	Created:	18 October 2018
 	Post-History:
-	Tcl-Version:	8.7
+	Tcl-Version:	9.1
 	Keywords:	Tcl, floating point, NaN, not a number
 	Tcl-Branch:	tip-520
 -----
 # Abstract
 

Index: tip/526.md
==================================================================
--- tip/526.md
+++ tip/526.md
@@ -2,11 +2,11 @@
 	Author:         Donal K. Fellows 
 	State:          Draft
 	Type:           Project
 	Vote:           Pending
 	Created:        08-Nov-2018
-	Tcl-Version:    9.0
+	Tcl-Version:    9.1
 	Post-History:
 	Tcl-Branch:     tip-526
 ------
 
 # Abstract

Index: tip/529.md
==================================================================
--- tip/529.md
+++ tip/529.md
@@ -1,70 +1,75 @@
-# TIP 529: Add metadata dict property to tk photo image
+# TIP 529: Add metadata dictionary property to tk photo image
     Author:         Harald Oehlmann 
-    State:          Draft
+    State:          Final
     Type:           Project
-    Vote:           Pending
+    Vote:           Done
+    Vote-Summary:   Accepted 7/0/1
+    Votes-For:      AK, FV, JD, JN, KW, MC, SL 
+    Votes-Against:  None
+    Votes-Present:  KK
     Created:        07-Dec-2018
     Keywords:       Tk, image
     Tcl-Version:    8.7
-    Tk-Branch:     tip-529-image-metadata
+    Tk-Branch:     tip529-image-metadata-no-match-method
 -----
 
 # Abstract
 
-An additional property is proposed for photo images to hold a dictionary with image metadata:
+An additional property is proposed for photo images.
+This property shall hold a dictionary with image metadata:
 
     myimage cget -metadata
     myimage configure -metadata [dict create DPI 300.0]
 
 The content of the dictionary is initialized on image load and used on image save.
 
 # Rationale
 
 Image files may contain a lot of metadata like resolution, comments, GPS location etc.
-This metadata should be accessible and setable for the following aims:
+This metadata should be accessible and modifiable for the following aims:
 
-   *   Make it available after image load on script level
-   *   Make it setable within the image
-   *   Write its data to the image file.
+  * Make it available after image load on script level
+  * Make it setable within the image
+  * Write its data to the image file.
 
 ## image resolution
 
-This TIP specially targets the resolution (DPI) value of the image.
+This TIP especially targets the resolution (DPI) value of the image.
 
 The image resolution included in an image file is crucial for its usage, as many applications (word & co.) use this field to calculate a default size.
-One may imagine, that image files used in pdf4tcl are automatically scaled at the right resolution (e.g. the resolution saved in the image file).
+One may imagine, that image files used in `pdf4tcl` are automatically scaled to the correct resolution (e.g. the resolution saved in the image file).
 
-This information is included in png files (supported by tk core) and many other image formats included in the Img patch.
+This information is included in `.png` files (supported by core `Tk`) and many other image formats included in the `Img` package.
 
-I authored an extension to the Img patch to specify the dpi field of a bmp file on file writing. The syntax was accorded with Jeff Hobbs:
+I authored an extension to the `Img` package to specify the `dpi` field of a `.bmp` file when writing. The syntax was accorded with Jeff Hobbs:
 
     myimage write file.bmp -format [list bmp -resolution 300 i]
 
-This may be expressed (when all packages are adopted) by:
+This may be expressed (when all packages are adapted) by:
 
     myimage configure -metadata [dict create DPI 300.0]
     myimage write file.bmp
 
 ## Comment data
 
 A comment may be used to save custom data in the image file.
 
 An example is a vision automation project where a test procedure is connected to each image.
-My solution is to use GIF images and to store the test procedure (a TCL script) in the gif comment.
+My solution is to use `.gif` images and to store the test procedure (a TCL script) in the gif's comment.
 
-## Preview extension for new command "image find"
+## Preview extension for new command "image metadata"
 
-The match functions should also be able to output the metadata dict.
-This is due to the plan by Paul Obermeier to make the match function alone available on the script level.
+The match functions should also be able to return the metadata dictionary.
+This is due to the plan by Paul Obermeier to make the `match` function available on the script level by itself.
 See the discussion section for the message.
 
 # Specification
 
-## Metadata Dict
+## Metadata Dictionary
 
-The propery "**-metadata**" is added to each image.  It contains a dictionary,
+The property "**-metadata**" is added to each image.  It contains a dictionary,
 where the keys of the dictionary are specific to each photo image format.
 
 The following default keys are proposed:
 
 | Key       | Description      | Example image formats |
@@ -73,23 +78,23 @@
 | `aspect`  | Aspect ratio horizontal/vertical (double)   | png,gif |
 | `comment` | Text comment     | png, gif |
 
 Comments on the key choice:
 
-   *   Abreviation are in upper case
-   *   Words are in Americal English in small case (except propper nouns)
-   *   Vertical DPI is expressed as DPI/aspect. The reason is, that some image formats may feature aspect and no resolution value.
+  * Abreviations are in upper case
+  * Words are in American English, and in lower case (except proper nouns)
+  * Vertical DPI is expressed as `DPI/aspect`. This is because some image formats may feature `aspect`, and no `resolution` value.
 
 It is valid to set any key within the application.
 Any unknown key should be ignored by the application and image format drivers.
 
 If a particular image does not specify any keys (whether during creation or otherwise) then the dictionary will be empty.
 
 Each photo image format driver may define additional keys and may decide to use them for input (as a parameter for image read and/or image write), output (as an image read result) or both.
 
-The TIP implementation does not target to implement all possible keys of all image formats for reading and writing imediately.
-Image key format may grow over time on a use-case basis.
+The TIP implementation does not propose to immediately implement all possible keys of all image formats for reading and writing.
+The set of predefined image keys may grow over time on a per-case basis instead.
 
 ## Commands
 
 The following commands are extended by a -metadata parameter:
 
@@ -99,16 +104,16 @@
     myimage data -metadata $metadict
     myimage put -metadata $metadict
     myimage read -metadata $metadict
     myimage write -metadata $metadict
 
-Any image format handler may use the content of the metadata dict.
-This may be an ongoing process, specially within the Img patch.
+Any image format handler may use the content of the metadata dictionary.
+This may be an ongoing process, especially within the Img package.
 
-Here is an overview, which command reads or sets the metadata dict:
+Here is an overview, which command reads or sets the metadata dictionary:
 
-| Command | Reads current image metadata dict | reads command options metadata dict | Writes current image metadata dict | Driver data merged in |
+| Command | Reads current image metadata dict | Reads command options metadata dict | Writes current image metadata dict | Driver data merged in |
 | :-: | :-: | :-: | :-: | :-: |
 | image create | no | yes | yes | yes |
 | myimage cget | yes | no | no | no |
 | myimage configure | yes (1) | yes | yes | yes |
 | myimage put | no | yes | no | no |
@@ -116,28 +121,27 @@
 | myimage data | yes (1) | yes | no | no |
 | myimage write | yes (1) | yes | no | no |
 
 Footnotes:
 
-(1) The current metadata is ignored if a metadata dict is given as command parameter.
+(1) The current metadata is ignored if a metadata dictionary is given as command parameter.
 
-(3) The current metadata is ignored by the image export if a metadata dict is given as command parameter.
-
-Each command is now discussed within a subchapter:
+Each command is now discussed within its own section:
 
 ### image create
 
-Image create will parse the image data and create the metadata dict of the image.
+The `create` command will parse the image data and create the metadata dictionary of the image.
 
 As an example, a gif file with a comment would create a comment metadata key within the image:
 
     % image create photo myimage -format GIF -file testwithcomment.gif
     % myimage cget -metadata
-    Comment "This is the image comment"
+    Comment {This is the image comment}
 
-A metadata dict given on the command line will be merged with the parsed metadata dict with priority to the file metadata.
-This allows to specify default values for keys which should be present.
+A metadata dictionary given on the command line will be merged with the parsed metadata dictionary.
+The meta data read from the file will be given priority.
+This enables the specification of default values for keys which should be present.
 
 An example with the same image as above:
 
     % image create photo myimage -format GIF -file testwithcomment.gif\
        -metadata [dict create User A Comment "Comment from command line"]
@@ -144,85 +148,85 @@
     % myimage cget -metadata
     User A Comment "This is the image comment"
 
 ### myimage cget
 
-The metadata dict may be retrieved by:
+The metadata dictionary may be retrieved by:
 
     myimage cget -metadata
 
 ### myimage configure
 
-The metadata dict of the image may be overwritten by:
+The metadata dictionary of the image may be overwritten by:
 
     myimage configure -metadata [dict create Comment "Comment from cconfigure"]
 
 The image data is not touched and no image data interpretation is triggered.
 
-The retrival methods will return the metadata dict as for any other option:
+The retrieval methods will return the metadata dictionary as for any other option:
 
     % myimage configure -metadata
-    -metadata {} {} {} {Comment "Current comment"}
+    -metadata {} {} {} {Comment {Current comment}}
 
-Setting one of the -format, -data or -file option to a different value will recreate the image with the new parameters.
-In this case, an eventually present -metadata option will first replace the present metadata of the image.
-Then, the image recreation will take place (using an eventually specified metadata dict) and may add keys to the image metadata dict.
+Setting one of the `-format`, `-data` or `-file` options to a different value will recreate the image with the new parameters.
+In this case, an eventually present `-metadata` option will first replace the present metadata of the image.
+Then, the image recreation will take place (using an eventually specified metadata dictionary) and may add keys to the image metadata dictionary.
 
-It is not possible to trigger an image recreation by just specifying a metadata dict.
+It is not possible to trigger an image recreation by just specifying a metadata dictionary.
 This is to avoid unneeded image recreation.
 
-Note: parameters to change the rendered image should use the -format option. The metadata may provide additional data.
+Note: parameters to change the rendered image should use the `-format` option. The metadata may provide additional data.
 
-When the image is rendered again due to a change of the options -file, -data or -format, the following procedure applies:
+When the image is rendered again due to a change of the options `-file`, `-data` or `-format`, the following procedure applies:
 
-   *   The current image metadata is replaced by an eventually  specified metadata.
-   *   The image driver is called with the resulting metadata to render the image.
-   *   Any metadata key outputted by the image driver rendering is set in the image metadata. In consequence, we get a merge of the current and the generated metadata.
+  * The current image metadata is replaced by an eventually specified metadata.
+  * The image driver is called with the resulting metadata to render the image.
+  * Any metadata key returned by the image driver rendering is set in the image metadata. In consequence, we get a merge of the current and the generated metadata.
 
 ### myimage put
 
-The put command sets (parts of) the image data by specified new image data.
+The `put` command sets (parts of) the image data to the specified new image data.
 
-The -metadata property of the image is not changed.
-This is consistent of other parameters like -format.
+The `-metadata` property of the image is not changed.
+This is consistent of other parameters like `-format`.
 
-To replace the whole image including metadata, the configure command may be used by setting the -data option.
+To replace the whole image including metadata, the `configure` command may be used by setting the `-data` option.
 
 Example with gif data containing a comment:
 
     % image create myimage -metadata [dict create Comment "Comment from image create"]
     % myimage put $GIFWithCommentData
     % myimage cget -metadata
-    Comment "Comment from image create"
+    Comment {Comment from image create}
 
-A -metadata option may be specified to support the image read. Nevertheless, this metadata is not included in the metadata property of the image.
+A `-metadata` option may be specified to support the read operation. Nevertheless, this metadata is not included in the metadata property of the image.
 
 Example:
 
     % image create myimage -metadata [dict create Comment "Comment from image create"]
     % myimage put $GIFWithCommentData -metadata [dict create Comment "Comment from put command line"]
     % myimage cget -metadata
-    Comment "Comment from image create"
+    Comment {Comment from image create}
 
 ### myimage read
 
-The read command sets (parts of) the image data by new image data read from a file.
-This command acts like the put command with the difference, that the image data comes from a file.
+The `read` command sets (parts of) the image data to new image data read from a file.
+This command acts like the `put` command, except that the image data comes from a file.
 
-The -metadata property of the image is not changed.
-This is consistent of other parameters like -format.
+The `-metadata` property of the image is not changed.
+This is consistent of other parameters like `-format`.
 
-To replace the whole image including metadata, the configure command may be used by setting the -file option.
+To replace the whole image including metadata, the `configure` command may be used by setting the `-file` option.
 
 Example with a gif file containing a comment:
 
     % image create myimage -metadata [dict create Comment "Comment from image create"]
     % myimage read gifwithcomment.gif
     % myimage cget -metadata
-    Comment "Comment from image create"
+    Comment {Comment from image create}
 
-A -metadata option may be specified to support the image read. Nevertheless, this metadata is not included in the metadata property of the image. There is currently no practical application for this, but there might be examples which use that.
+A `-metadata` option may be specified to support the read operation. Nevertheless, this metadata is not included in the metadata property of the image. There is currently no practical application for this, but there might be examples which use that.
 
 Example:
 
     % image create myimage -metadata [dict create Comment "Comment from image create"]
     % myimage read test.gif -metadata [dict create Comment "Comment from put command line"]
@@ -229,100 +233,105 @@
     % myimage cget -metadata
     Comment "Comment from image create"
 
 ### myimage data
 
-The data command writes the image data into a variable.
+The `data` command writes the image data into a variable.
 
 If the image formats supports a specified metadata key, it is included in the output file.
 
-If a -metadata option is given, the metadata property of the image is ignored.
+If a `-metadata` option is given, the metadata property of the image is ignored.
 Otherwise, the metadata property of the image is used.
 
 Example to write a comment in gif data included in the image properties:
 
     % image create myimage -file test.png -metadata [dict create Comment "Comment from image create"]
     % myimage data -format "GIF"
     ... GIF data with comment included
 
-Example to specify the comment with the command options
+Example to specify the comment with the command options:
 
     % image create myimage -file test.png
     % myimage data -format "GIF"-metadata [dict create Comment "Comment from data command"]
     ... GIF data with comment included
 
 ### myimage write
 
-The write command writes the image data to a file.
-With respect to metadata, it works the same way as the data command.
+The `write` command writes the image data to a file.
+With respect to metadata, it works the same way as the `data` command.
 
 Example to write a metadata comment:
 
     % image create myimage -file test.png
     % myimage write GifwithComment.gif -format "GIF"-metadata [dict create Comment "Comment from write command"]
     ... GIF data with comment included
 
 ### Notes on Options to image and metadata creation
 
-The metadata is not suited to pass processing options to the driver.
-For this aim, options should be added to the "-format" option.
+The metadata is not suited to passing processing options to the driver.
+Such options should be added to the `-format` option instead.
 
-In contrast, a driver may understand options passed by the "-format" option to modify its metadata processing.
+In contrast, a driver may understand options passed through the `-format` option to modify its metadata processing.
 
 Lets try the following imaginary example:
 An image driver contains a full EXIF parser which creates many keys as output.
-This processing is expensive in processing time and output data creation.
-In consequence, the driver creator may decide to only create the EXIF output on a given option:
+This processing is expensive, in both time and output data creation.
+As a consequence, the driver creator may decide to only create the EXIF output when an option requesting such is specified:
 
     image create photo photo.jpg -format "jpg -exif 1"
 
 ## Image format driver interface
 
 The image format driver interface is changed in the following aspects:
 
-### Pass metadata dict as parameter
+### Pass metadata dictionary as parameter
 
-Each driver function gets a tcl object pointer "metadataIn" as parameter.
-This parameter serves to input a metadata dict to the driver function.
-It may be NULL to flag that the metadata dict is empty.
+Each driver function receives a Tcl object pointer `metadataIn` as parameter.
+This parameter serves to pass a metadata dictionary to the driver function.
+It may be NULL. Doing so indicates that the metadata dictionary is empty.
 
-A typical driver code snipped to check for a metadata key is:
+A typical driver code snippet to check for a metadata key is:
 
     if (NULL != metadataIn) {
         Tcl_Obj *itemData;
         Tcl_DictObjGet(interp, metadataIn, Tcl_NewStringObj("Comment",-1), &itemData));
 
-The receiving of the metadata by the format driver functions is only necessary for the Write functions to fulfill strictly the objective of the TIP.
-Nevertheless, it is implemented the same way as the -format parameter which is available to all functions.
-The reason is to support use cases not specified jet.
-My feeling is, that it would be sad to limit the functionality by not passing the metadata to all format driver functions.
-
-### Receive a metadata dict from the driver (FileRead,StringRead)
-
-The image match and read functions (FileMatch, StringMatch, FileRead, StringRead) may set keys in a prepared metadata dict to return them.
-Those function get an additional tcl object pointer as "metadataOut" as parameter.
-
-This parameter may be NULL to indicate, that no metadata return is attended (put, read subcommands).
-
-This parameter is initialized to an empty unshared dict object if metadata return is attended (image create command, configure subcommand).
-The driver may set dict keys in this object to return metadata.
+To strictly fulfill the objective of the TIP it is only necessary for the `Write` functions of the format driver to receive metadata.
+
+Nevertheless, it is implemented the same way as the `-format` parameter which is available to all functions.
+This allows the passing of additional options to the driver which only concern the metadata processing.
+
+### Receive a metadata dictionary from the driver (FileRead,StringRead)
+
+The image match and read functions (FileMatch, StringMatch, FileRead, StringRead) may set keys in a prepared metadata dictionary to return them.
+These functions receive an additional Tcl object pointer as "metadataOut" as parameter.
+
+This parameter may be NULL. This indicates that no metadata can be returned (`put`, `read` subcommands).
+
+This parameter is initialized to an empty unshared dictionary object if metadata return is intended (`image create` command, `configure` subcommand).
+The driver may set dictionary keys in this object to return metadata.
 
 A sample driver code snippet is:
 
     if (NULL != metadataOut) {
         Tcl_DictObjPut(NULL, metadataOut, Tcl_NewStringObj("XMP",-1), Tcl_NewStringObj(xmpMetadata);
 
 ### Image format driver interface
 
-For image format drivers, a new registration procedure is proposed which includes functions with the new parameters.
-In addition, the parameters are reordered to always have the order interp, input parameter, output parameter, accillary functions.
+For image format drivers a new registration procedure is proposed. This new procedure includes functions with the new parameters.
+In addition, the parameters are reordered to always have the order of
+
+  - interp,
+  - input parameter(s),
+  - output parameter(s),
+  - auxiliary function(s).
 
 The new stubs enabled function is:
 
     void Tk_CreatePhotoImageFormatVersion3(const Tk_PhotoImageFormatVersion3 *formatPtr)
 
-The function parameters in Tk_PhotoImageFormatVersion3 are as follows:
+The function parameters of `Tk_PhotoImageFormatVersion3` are as follows:
 
     int (Tk_ImageFileMatchProcVersion3) (Tcl_Interp *interp, Tcl_Channel chan,
             const char *fileName, Tcl_Obj *format, Tcl_Obj *metadataIn, int *widthPtr,
             int *heightPtr, Tcl_Obj *metadataOut,);
 
@@ -346,81 +355,81 @@
     int (Tk_ImageStringWriteProcVersion3) (Tcl_Interp *interp, Tcl_sObj *format,
             Tcl_Obj *metadataIn, Tk_PhotoImageBlock *blockPtr);
 
 ## Documentation
 
-The manual page of "Tk_CreatePhotoImageFormat" will describe the new version 3 interface.
-The following remark about the life cycle of the interfaces is added in a similar way as the current remark about the version 1 (old) interface:
-
-Version 3 format driver interface is recommended for new projects.
-Expect version 2 format driver interface and the command Tk_PhotoImageFormat to be removed with Tk 9.0.
-
-In addition, it might be a good idea to speak about version 1 (old), version 2 and version 3 interface.
+The script-visible changes are documented in the manpage `doc/photo.n`.
+The changes to the C level interface on the other hand are documented in `doc/CrtPhImgFmt.3`.
 
 # Implementation
 
-Implementation is in branch "tip-529-image-metadata".
+The implementation is done in branch `tip-529-image-metadata-no-match-method` of the Tk fossil repository.
 The following metadata keys are implemented:
 
-   * gif: comment
-   * png: DPI, ratio
+  * gif: comment
+  * png: DPI, ratio
 
-Thanks to Paul Obermaier, the TkImg package has implemented the new interface and uses it currently for DPI setting and reporting.
+With thanks to Paul Obermeier, the `Img` package has implemented the new interface and uses it currently for setting and reporting of DPI information.
 
 A set of test cases is included in the implementation.
-In addition, the TkImg package features additional tests for this patch which exercise additional features like stub table, image parameters.
-The TkImg patch links currently against the optional branch (see below), not against the branch tag tip-529-image-metadata.
+In addition, the `Img` package features additional tests for this change which exercise additional features like the stub table and image parameters.
 
-It was necessary to fix the file tests/earth.gif as the file is incomplete.
+Note that the `Img` package currently links against the optional branch (see below), and not against the branch tag `tip-529-image-metadata-no-match-method`.
+This was necessary to fix the file `tests/earth.gif`, as it is incomplete.
+
+__Warning__: The two following chapters ("Discussion" and "Rejected alternatives") contain a lot of information not relevant for the TIP.
+A reader only interested in the functionality of the TIP may stop here.
+
 # Discussion
 
-## image find command planned by Paul Obermeier
+## `image metadata` command planned by Paul Obermeier
 
 What about extending and exposing the functionality of the MatchProc function at the Tcl level?
-That way it would be possible to implement a command like "image info ", where
-you can retrieve the image size, resolution and additional metadata without explicitely loading
-the image.
-In my image browser (http://www.posoft.de/html/poImgBrowseShots.html#Img1)
-I am currently using a modified version of the Tcllib fileutil::fileType procedure to extract the
+
+That way it would be possible to implement a command like `image metadata `, where
+you can retrieve the image size, resolution and additional metadata without explicitely loading the image.
+
+In my image browser ([Screenshot](http://www.posoft.de/html/poImgBrowseShots.html#Img1))
+I am currently using a modified version of Tcllib's `fileutil::fileType` command to extract the
 image size without creating a photo image. Getting that information (and additional metadata)
 directly from the C-based image parsers would be faster and there would be no need to code that
 functionality twice.
 
-HaO: This functionality is prepared by the possibility that the match driver functions also may output metadata.
+This function is implemented in Tk branch `tip-529-image-metadata`.
 
 ## Update DPI metadata property on image script
 
 Paul Obermeier has made the following proposal:
 
 How do you want to handle the physical resolution (DPI) in the case of image scaling?
 Just keep the original DPI value or adjust the DPI values automatically, maybe using an option.
 
-HaO: Currently, this is not prevued and may be implemented by another TIP.
+HaO: Currently, this is not thought out and may be implemented by another TIP.
 
 ## No use of other optional features by Paul Obermeier
 
 I asked Paul, if he sees any use of the optional features below for him or TkImg.
 The answer was: no, I don't see any use.
 
 # Rejected Alternatives
 
-Within the last two years development process, the following additional ideas were implemented in addition.
-They are all implemented in the tk branch "tip-529-image-metadata-optional".
+Within the last two years of development, the following additional ideas were implemented as well.
+They are all implemented in the Tk branch `tip-529-image-metadata-optional`.
 They are not included in the TIP and not included in the main implementation.
-People may speak up to get any feature back in the main feature branch.
+People may speak up to get any feature back into the main feature branch.
 
 The optional features are:
 
-   *   Implement XMP metadata type for gif.
-   *   Optimize the SVG processing to store the preparsed binary blob in the metadata. This blob may be used for fast scaling of the image.
-   *   Optimize driver internal communication: provide a DString memory to the image format driver to pass data from the match functions to the read functions.
-   *   Optimize file access: allow the image driver to indicate, that the file is not needed any more after the match call.
-
-The following subchapter discuss the optional features.
-The format driver interface with all options is shown in a following additional subchapter.
-
-Another rejected alternative to use only one metadata pointer in the interface is following as last subchapter.
+  * Implemented XMP metadata type for gif.
+  * Optimized SVG processing to store the preparsed binary blob into the metadata. This blob may be used for fast scaling of the image.
+  * Optimized driver internal communications: Provided a DString structure to the image format driver for the passing of data from the match functions to the read functions.
+  * Optimized file access: Gave the image driver the ability to indicate that the file is not needed any more after the match call.
+
+The following section discusses these optional features.
+The format driver interface with all options is shown in the section after that.
+
+Another rejected alternative using only one metadata pointer in the interface follows as the last section.
 
 ## XMP data
 
 Photo images may contain an XMP data structure which may hold structured data.
 The aim is to make this data accessible.
@@ -430,60 +439,60 @@
 
 | Key       | Description      | Example image formats |
 |:---------:|:----------------:|:---------------------:|
 | `XMP`     | xmp image data   | gif,png               |
 
-XMP support is implemented for gif format.
-Due to missing use case, it was removed from the main branch.
+XMP support is implemented for the `gif` format.
+It was removed from the main branch, due to not having a use case at the moment.
 
 ## SVG optimization by a metadata key holding the preparsed svg blob
 
 ### Rationale
 
-The application is within the current SVG implementation included in Tk8.7a3.
-
-The used svg routines from the nanosvg project split svg processing into two steps:
-
-   *   Step 1: transform the xml data to a binary representation of the splines
-   *   Step 2: render the splines to an image presentation
-
-When svg files are loaded by:
+This is used within the current SVG implementation included in Tk8.7a3.
+
+The routines imported from the nanosvg project split SVG processing into two steps:
+
+  1. Transform the xml data to a binary representation of the splines
+  2. Render the splines to an image presentation
+
+When an SVG file is loaded via
 
     image create photo i1 -file test.svg -format {svg -scaletoheight 16}
 
-then the file is accessed and the xml data loaded and processing step 1 and 2 is performed.
+the file is read, the xml data loaded, and processing steps 1 and 2 are performed.
 
-When the image is scaled by:
+When the image is later scaled by:
 
     i1 configure -file "" -data {} -format {svg -scaletoheight 32}
 
-then the same steps are performed as on image load, while only step 2 would be necessary.
+the same steps are performed as on image load, while only step 2 would be necessary.
 The performance is poor and the file must still be available.
 
-The idea is to store the binary representation of the splines (result of processing step 1) as a key in the **-metadata** dict (say SVGBLOB) and to achieve to only perform step 2 on scaling.
-
-In addition, svg image may even be "compiled" to the metadata structure, so the following command may work:
-
-    image create i1 -metadata {SVGBLOB ...}  -data {}-format {svg -scaletoheight 32}
-
-This will only work within the same patchlevel of TK on the same architecture (endianess, int size) , as the format may change, but it may be useful for example when packing to a starkit.
-
-In my talk on ETCL 2019, I showed an Android GUI where buttons may be scaled by a pinch to zoom gesture. The current performance is quite poor.
+The idea is to store the binary representation of the splines (result of processing step 1) as a key in the **-metadata** dictionary (say SVGBLOB). This then enables the code to only perform step 2 on scaling.
+
+In addition, an svg image may even be "compiled" to the metadata structure, so the following command may work:
+
+    image create i1 -metadata {SVGBLOB ...} -data {} -format {svg -scaletoheight 32}
+
+While this will only work within the same patchlevel of Tk and on the same architecture (endianess, int size), as the format may change, it may be useful when creating a starkit, for example.
+
+In my talk at ETCL 2019 I showed an Android GUI where buttons could be scaled by a pinch-to-zoom gesture. The current performance is quite poor.
 
 ### Specification
 
-The svg driver returns a preparsed image blob in the metadata key "SVGBLOB".
-This data is used as image data, if the -data parameter contains the string "\".
+The SVG driver returns a preparsed image blob in the metadata key "SVGBLOB".
+This data is used as image data, if the `-data` parameter contains the string "\".
 
 A sample script is as follows:
 
     image create photo foo -data $svggradient -format svg
     foo configure -file "" -data "\" -format "svg -scale 2"
 
-Internally, the driver uses the driver internal DString to communicate between the match and read functions.
+Internally, the driver uses a hidden DString structure to communicate between the match and read functions.
 
-The output of the svg parser is serialized in arrays and put into the memory block.
+The output of the SVG parser is serialized into an array and put into the memory block.
 All functions of the rendering functions dealing with the input data are changed to use the array.
 
 ### Discussion
 
 I see only a small speed-up (around 10%) by this solution.
@@ -490,56 +499,56 @@
 In addition, the version without this option is as fast as the optimized version.
 So, we have a slowdown for the normal case and no gain for the optimized version.
 
 My test script is as follows:
 
-   *   take the file from [https://svgstudio.com/pages/free-sample]
-   *   use the following script:
+  * Take the file from [https://svgstudio.com/pages/free-sample]
+  * Use the following script:
    
-   image create photo foo -file Freesample.svg -format svg
+    image create photo foo -file Freesample.svg -format svg
     proc switch {} {
         foo configure -format {svg -scale 2}
         foo configure -format {svg -scale 1}
     }
     time switch 100
     40139.367 microseconds per iteration
     
-    * now activate the use of the metadata
+  * Now activate the use of the metadata
     
     foo configure -file "" -data "" -format "svg"
     38641.935 microseconds per iteration
 
 For me, even removing the file operations and the parsing should be a magnitude faster.
 But the facts are different.
 Apparently copying all this data around in addition takes a lot of time.
 And the svg-nano parser is super fast.
-And most processing time is taken by image rendering.
+Most of the processing time is taken by image rendering.
 
 ## Match and read function communication memory
 
-The match functions and the image read functions get an additional parameter "driverInternalPtr" which points to an initialized DString.
-The DString is cleared by the framework.
+The image match and read functions get an additional parameter `driverInternalPtr` which points to an initialized DString structure.
+The DString structure is cleared by the framework.
 
-Using this DString, the driver match function may pass data to its read function.
+Via this DString the driver match function can pass data to its read function.
 
 The rationale is the current implementation of the SVG driver:
 
-   *   The driver currently uses ThreadSpecific data to pass data from the match procedure to the read procedure. Due to that, a more simple alternate possibility is proposed.
+  * The driver currently uses ThreadSpecific data to pass data from the match procedure to the read procedure. Due to that, a more simple alternate possibility is proposed.
 
-## Flag that the match function does not need the channel any more
+## Indicate that the match function does not need the channel any more
 
-The driver file match function may flag, that it does not need the channel any more.
-Only in this case, the additional output int "closeChannel" should be set to 1.
+The driver file match function may indicate that it does not need the channel any more.
+This is done by setting the additional output int `closeChannel` to `1`.
 In this case, a NULL driver is passed to the read driver function.
 
 The rationale is the current implementation of the SVG driver:
 
-   *   The driver does not need the file any more after the match procedure. Thus, any preparing file operations (seek etc) may be omitted and a NULL channel may be passed.
+  * The driver does not need the file any more after the match procedure. Thus, any preparing file operations (seek etc) may be omitted and a NULL channel may be passed.
 
 ## Format driver interface with all options
 
-The function parameters in Tk_PhotoImageFormatVersion3 are as follows:
+The function parameters in `Tk_PhotoImageFormatVersion3` are as follows:
 
     int (Tk_ImageFileMatchProcVersion3) (Tcl_Interp *interp, Tcl_Channel chan,
         const char *fileName, Tcl_Obj *format, Tcl_Obj *metadataIn, int *widthPtr,
         int *heightPtr, Tcl_Obj *metadataOut, int *closeChannelPtr,
         Tcl_DString *driverInternalPtr);
@@ -565,21 +574,22 @@
     int (Tk_ImageStringWriteProcVersion3) (Tcl_Interp *interp, Tcl_sObj *format,
         Tcl_Obj *metadataIn, Tk_PhotoImageBlock *blockPtr);
 
 ## Single metadata parameter for input and output
 
-A first approach was to use one metadata parameter to the format driver functions which allowed combined input and output.
+A first approach was to use one metadata parameter to the format driver functions, combining input and output.
 The properties are:
 
-   *   no new image format definition required.
-   *   it is not possible to inform the driver routines, that no metadata output is expected.
-   *   the image driver function must take care about shared object and create a copy on modification. Thus, a pointer to an object pointer must be passed.
-   *   a metadata must be prepared even if there is no metadata and cleaned after each match round.
+  * No new image format definition required.
+  * It is not possible to tell the driver routines when no metadata output is expected.
+  * The image driver function has to take shared objects into account and create a copy when doing modifications. Thus, a pointer to an object pointer must be passed.
+  * A metadata dictionary must be prepared even if there is no metadata, and also cleaned after each match round.
 
-This solution was not chosen due to the complicated way to set a metadata dict by the format driver functions.
+This solution was not chosen due to the complicated way for the format driver functions to set a metadata dictionary.
 In addition, it is seen as valueable, that the information "no metadata output, please" may be transmitted.
 
-The implementation is in branch "tip-529-image-metadata-jan".
+The implementation is in branch `tip-529-image-metadata-jan`.
 
 # Copyright
 
 This document has been placed in the public domain.
+

Index: tip/531.md
==================================================================
--- tip/531.md
+++ tip/531.md
@@ -1,15 +1,19 @@
 # TIP 531: Static Tcl Interpreter Creation Function
 	Author:         Shannon Noe 
-	State:          Draft
+	State:          Rejected
 	Type:           Project
-	Vote:           Pending
+	Vote:           Done
 	Created:        14-Dec-2018
 	Post-History:  
 	Keywords:       Tcl, stubs
 	Tcl-Version:    8.7
 	Tcl-Branch:     tip-531
+	Vote-Summary:	Rejected 0/4/1
+	Votes-For:	none
+	Votes-Against:	JN, KBK, KW, MC
+	Votes-Present:	BG
 ----
 
 # Abstract
 
 This TIP adds a helper function to the tclstubs library for creating an interpreter.

Index: tip/534.md
==================================================================
--- tip/534.md
+++ tip/534.md
@@ -4,11 +4,11 @@
 	Type:           Project
 	Vote:           Pending
 	Created:        02-March-2019
 	Post-History:   
 	Keywords:       Tcl
-	Tcl-Version:	8.7
+	Tcl-Version:	9.1
 	Tcl-Branch:     dkf-experimental-fast-number-hash
 -----
 
 # Abstract
 

Index: tip/537.md
==================================================================
--- tip/537.md
+++ tip/537.md
@@ -12,36 +12,42 @@
 
 # Abstract
  
 This TIP proposes to modify `struct Tcl_RegExpInfo` and `struct
 Tcl_RegExpIndices`, such that the fields indicating indexes change from type
-`int` to type `size_t`.
+`int` to type `Tcl_Size`.
 
 # Rationale
 
-This TIP should have been part of [TIP #502](502.md) (Index Value Reform) and/or [TIP #494](494.md) (More use of `size_t` in Tcl 9), but it was overlooked. Without changing this public API, regular expression
+This TIP should have been part of [TIP #502](502.md) (Index Value Reform) and/or [TIP #494](494.md) (More use of `Tcl_Size` in Tcl 9), but it was overlooked. Without changing this public API, regular expression
 indexes never can exceed 2GiB in value.
 
 # Specification and Documentation
 
 Here are the new struct definitions:
 
     typedef struct Tcl_RegExpInfo {
-        size_t nsubs;
+        Tcl_Size nsubs;
         Tcl_RegExpIndices *matches;
-        size_t extendStart;
+        Tcl_Size extendStart;
     } Tcl_RegExpInfo;
     
     typedef struct Tcl_RegExpIndices {
-        size_t start;
-        size_t end;
+        Tcl_Size start;
+        Tcl_Size end;
     } Tcl_RegExpIndices;
 
 Also a new macro `TCL_INDEX_NONE` will be provided, which is the value of the
 `start` and `end` fields when there is no match.
 This macro will be provided to 8.7 as well, but in Tcl 8.7 it will have the value (-1).
 
+# Addendum
+
+After [TIP #660](660.md) was accepted, a lot of functions changed from
+using size\_t to ptrdiff\_t parameters. In order to prevent confusion,
+this change has been adapted in the TIP text above as well.
+
 # Implementation
 
 An implementation of this TIP is present in the [regexp-api-64bit](https://core.tcl-lang.org/tcl/timeline?r=regexp-api-64bit) branch. 
 
 # Copyright

Index: tip/540.md
==================================================================
--- tip/540.md
+++ tip/540.md
@@ -1,10 +1,10 @@
 # TIP 540: Add -signal Channel Configure Option to POSIX Pipes
 	Author:         Donal K. Fellows 
 	State:          Draft
 	Type:           Project
-	Tcl-Version:    8.7
+	Tcl-Version:    9.1
 	Vote:           Pending
 	Created:        03-May-2019
 	Keywords:       Tcl, Unix, pipeline
 	Post-History:
 -----

Index: tip/542.md
==================================================================
--- tip/542.md
+++ tip/542.md
@@ -43,12 +43,12 @@
 which results that all extensions need to be re-compiled with TCL\_UTF\_MAX=6 as well.
 This TIP proposes to add a supported TCL\_UTF\_MAX=4 compilation mode to Tcl, which has
 the same effect as the earlier unsupported TCL\_UTF\_MAX=6, but without the need to
 re-compile all extensions.
 
-There are 5 functions which expose the internal structure of Tcl strings to extensions,
-functions that are rarely used in extensions. Those are `Tcl_AppendUnicodeToObj()`,
+There are 4 functions which expose the internal structure of Tcl strings to extensions,
+functions that are rarely used in extensions. Those are
 `Tcl_UniCharCaseMatch()`, `Tcl_UniCharLen()`, `Tcl_UniCharNcmp()` and `Tcl_UniCharNcasecmp()`.
 They all have a UTF-8 equivalent which can be used instead. Switching TCL\_UTF\_MAX
 to a different value causes a binary incompatibility, but it's not worth to do
 anything about it. That's why this TIP proposes to deprecate them, and have them
 removed completely in Tcl 9.0 (actually: they will become MODULE\_SCOPE internal
@@ -71,12 +71,10 @@
  * Allow Tcl extensions to be compiled with either -DTCL\_UTF\_MAX=3 (default), or with -DTCL\_UTF\_MAX=4,
    independent from how Tcl is compiled.
 
  * Deprecate the following functions:
 
-     Tcl\_AppendUnicodeToObj()
-
      Tcl\_UniCharCaseMatch()
 
      Tcl\_UniCharLen()
 
      Tcl\_UniCharNcmp()
@@ -94,12 +92,14 @@
 
      Tcl\_NewUnicodeObj()
 
      Tcl\_SetUnicodeObj()
 
-   If Tcl is compiled with a different TCL\_UTF\_MAX value than the extension, those 4 functions cannot be used.
-   In order to keep binary compatibility with 8.6, those 4 functions are not supported for extensions compiled
+     Tcl\_AppendUnicodeToObj()
+
+   If Tcl is compiled with a different TCL\_UTF\_MAX value than the extension, those 5 functions cannot be used.
+   In order to keep binary compatibility with 8.6, those 5 functions are not supported for extensions compiled
    with -DTCL\_UTF\_MAX=4. You can use the functions in TIP #548 instead, for converting between Tcl_UniChar
    and UTF-8.
 
 # Compatibility
 
@@ -107,10 +107,17 @@
 
 When Tcl is compiled with -DTCL\_UTF\_MAX=4, this is at the Tcl level, compatible with the Androwish-version
 of Tcl. At the C-API level, it's upwards compatible with Tcl 8.6 in TCL\_UTF\_MAX=6 mode, except for the
 functions mentioned above.
 
+# Later change
+
+The original version of this TIP (as voted upon), proposed to fully deprecate the
+Tcl\_AppendUnicodeToObj(). However the later [TIP #622](622.md) changed that: Only
+deprecate Tcl\_AppendUnicodeToObj() when Tcl is compiled in a different -DTCL\_UTF\_MAX
+mode than the extension. 
+
 # Caveats
 
  * Extensions compiled with -DTCL\_UTF\_MAX=4 cannot use any of the deprecated functions mentioned in this TIP.
    Using any of them results in a link error.
 

Index: tip/544.md
==================================================================
--- tip/544.md
+++ tip/544.md
@@ -19,14 +19,14 @@
 as `Tcl_GetIntForIndex()`. The signature is:
 
   * int **Tcl\_GetIntForIndex**(Tcl\_Interp \*_interp_, Tcl\_Obj \*_objPtr_,
 	    int _endValue_, int \*_indexPtr_)
 
-For Tcl 9.0, all indexes have type `size_t`, so there the signature is:
+For Tcl 9.0, all indexes have type `Tcl_Size`, so there the signature is:
 
   * int **Tcl\_GetIntForIndex**(Tcl\_Interp \*_interp_, Tcl\_Obj \*_objPtr_,
-	    size\_t _endValue_, size\_t \*_indexPtr_)
+	    Tcl\_Size _endValue_, Tcl\_Size \*_indexPtr_)
 
 # Rationale
 
 This function can be used for extensions to parse indexes like
 "`end-5`", "`12+1`" ... See [TIP 502: Index Value Reform](502.md) and
@@ -33,18 +33,24 @@
 [TIP 176: Add String index Values](176.md).
 
 Use case  in Tk: see
 [Tcl-core list discussion](http://code.activestate.com/lists/tcl-core/20663/)
 of
-[TIP 541: Add support for 'end' index in ttk::combobox current](176.md).
+[TIP 541: Add support for 'end' index in ttk::combobox current](541.md).
 
 # Compatibility
 
 This is fully upwards compatible with Tcl 8.6.
 
+# Addendum
+
+After [TIP #660](660.md) was accepted, a lot of functions changed from
+using size\_t to ptrdiff\_t parameters. In order to prevent confusion,
+this change has been adapted in the TIP text above as well.
+
 # Reference Implementation
 
 Available on branch [tip-544](https://core.tcl-lang.org/tcl/timeline?t=tip-544).
 
 # Copyright
 
 This document has been placed in the public domain.

Index: tip/549.md
==================================================================
--- tip/549.md
+++ tip/549.md
@@ -1,9 +1,9 @@
 # TIP 549: Make configure --enable-64bit the default
 	Author:         Jan Nijtmans 
 	Author:         Jan Nijtmans 
-	State:          Draft
+	State:          Withdrawn
 	Type:           Project
 	Vote:           Pending
 	Created:        7-June-2019
 	Post-History:   
 	Discussions-To: Tcl Core list

Index: tip/550.md
==================================================================
--- tip/550.md
+++ tip/550.md
@@ -3,11 +3,11 @@
 	State:          Draft
 	Type:           Project
 	Vote:           Pending
 	Created:        11-Jun-2019
 	Post-History: 
-	Tcl-Version:    9.0
+	Tcl-Version:    9.1
 	Keywords:       Tcl, memory
 -----
 
 # Abstract
 

Index: tip/552.md
==================================================================
--- tip/552.md
+++ tip/552.md
@@ -1,10 +1,14 @@
 # TIP 552: Extended treeview functionality.
         Author:        Peter Spjuth 
-        State:         Draft
+        State:         Final
         Type:          Project
-        Vote:          Pending
+        Vote:          Done
+        Vote-Summary:  Accepted 5/0/0
+        Votes-For:     BG, SL, JN, FV, KW
+        Votes-Against: none
+        Votes-Present: none
         Created:       19-Sep-2019
         Post-History:
         Tcl-Version:   8.7
         Keywords:      Tk, treeview
         Tk-Branch:     pspjuth-treeview
@@ -84,42 +88,64 @@
 theme or tags.
 Built in themes are updated to put something fitting at that color.
 
 ## Column separators
 
-The **-show** option is extended with the value `columnseparators` to
-display a separator between columns.
+A new column option **-separator** *bool* is added.
+This controls if a column separator is drawn to the right of the column. Default is 0.
 Built in themes are updated to define the separators.
+
+A new style option **-columnseparatorwidth** *width* is added. Default is 1.
 
 ## Image anchor for tree
 
 A new item option **-imageanchor** *anchor* is added.
 This controls the placement of the image relative to the text in an
 item's tree column. Default is "w".
-For tags, **-imageanchor** work like **-image**, i.e. if not set in the
+For tags, **-imageanchor** works like **-image**, i.e. if not set in the
 item, it can be set by tags.
 
 ## Item height
 
 A new item option **-height** *height* is added.
 This controls the height of the item, in multiples of **-rowheight**. Default is 1.
 
+## Item hiding
+
+A new item option **-hidden** *bool* is added.
+If true, the item and any of its decendants are hidden. Default is 0.
+
 ## Automatic -rowheight.
 
-If the style do not set -rowheight, it is filled in based an current font and layout for an item.
+If the style does not set -rowheight, it is filled in based on current font and layout for an item.
 An Item and a Cell layout is measured with the style's settings, and the resulting height is used as default.
 
 ## Cell tags.
 
 To control appearance of individual cells, tags can be set on cells as well as items.
-The set of tags is shared between items and cells, so things like **tag configure** are not affected.
+The set of tags is shared between items and cells, so things like **tag configure** are not
+affected by this change.
+
+Cell tags are distinct from item tags and they do not interfere except visually.
+Cell tags take precedence over item tags when drawing.
 
 A new subcommand **tag cell add** is added, mirroring the present **tag add** but operating on cells.
 
 A new subcommand **tag cell remove** is added, mirroring the present **tag remove** but operating on cells.
 
 A new subcommand **tag cell has** is added, mirroring the present **tag has** but operating on cells.
+
+Cell tags are, like cell values, locked to a column number. Changes to **-columns** or  **-displaycolumns** do not affect cell tags.
+
+Mouse events bound to a tag will trigger if the pointer is over a cell with that tag.
+
+## Cell Images.
+
+Through cell tags, -image and -imageanchor can be present on a cell. Cells will draw accordingly.
+
+For items, and item tags, -image and -imageanchor are specifically about the tree column. They
+do not propagate to other cell images.
 
 # Rejected alternatives
 
 ## Striped rows
 

Index: tip/553.md
==================================================================
--- tip/553.md
+++ tip/553.md
@@ -3,11 +3,11 @@
         State:          Draft
         Type:           Project
         Vote:           Pending
         Created:        07-Nov-2019
         Post-History:
-        Tcl-Version:    8.7
+        Tcl-Version:    9.1
         Keywords:       Tk, label, listbox, entry
 -----
 
 # Abstract
 

Index: tip/554.md
==================================================================
--- tip/554.md
+++ tip/554.md
@@ -3,11 +3,11 @@
 	Author:         Roy Keene
 	State:          Draft
 	Type:           Project
 	Vote:           Pending
 	Created:        14-Nov-2019
-	Tcl-Version:	8.6
+	Tcl-Version:	9.1
 	Post-History:
 	Tcl-Branch:     tip-554
 -----
 
 # Abstract
@@ -15,14 +15,14 @@
 This tip proposes storing the /library file systems for both the Tcl core and Tk core
 as C data structures presented as a virtual file system.
 
 # Rationale
 
-In Tip430 we explored the various issues with integrating a Zip based file system into
+In [TIP #430](430.md) we explored the various issues with integrating a Zip based file system into
 interpreter initialization. While this process is finished and largely working, there
 are some awkward workarounds to manage the process of Zipfs encoding on exotic platforms.
-Some of these workaround involve forgoing the tip entirely.
+Some of these workaround involve forgoing the TIP entirely.
 
 While the use of Zipfs as the VFS of record seems to be somewhat controversial, performance
 gains from not having to access (and explor) the local file system for every interpreter
 startup are measurable.
 
@@ -86,28 +86,28 @@
 
 # Backward Compatibility
 
 The main area for concern for Compatibility issues is Tk. Tk can be compiled against Tcl
 cores of various vintages, including those which are not equipped with the features of
-this tip. Because the VFS for Tk is self contained, and distributed by virtue of being
+this TIP. Because the VFS for Tk is self contained, and distributed by virtue of being
 compiled into the library itself, for most users there will be no change. (Save, of course,
 for the improved load time.)
 
 Kit builders and speciality developers who provide their own library systems are still free
 to populate their own values for tcl_library and tk_library and those contracts will still
 be honored. The C-based VFS will only load if no other candidate to fill the role of the
 /library file system has stepped forward by the time the interpreter initializes.
 
-# Interactions with tip430
+# Interactions with TIP #430
 
-This tip only replaces the portions of tip430 dealing with interpreter initialization.
-In all other respects the goals of this tip and non-startup goals of tip430 are parallel
+This TIP only replaces the portions of [TIP #430](430.md) dealing with interpreter initialization.
+In all other respects the goals of this tip and non-startup goals of TIP #430 are parallel
 to one another.
 
 # Inspiration
 
 This technology is influenced by Roy Keene's work with XVFS. It also draws on the lessons
-learned from implementing tip430.
+learned from implementing TIP #430.
 
 # Copyright
 
 This document has been placed in the public domain.

Index: tip/555.md
==================================================================
--- tip/555.md
+++ tip/555.md
@@ -62,5 +62,9 @@
 # Impact
   
 * This feature gives me the opportunity to introspect my theme.
 * This feature will gives me together with the other arguments of the ttk::style commands the opportunity to compare different themes.  
 * This feature will also make it easier to clone a style and to modify it.  
+
+# Discussion
+
+This TIP was withdrawn since TIP #584 provides the requested functionality.

Index: tip/556.md
==================================================================
--- tip/556.md
+++ tip/556.md
@@ -4,11 +4,11 @@
 	Type:           Project
 	Vote:           Done
 	Created:        26-Nov-2019
 	Post-History:   
 	Keywords:       Tk
-	Tcl-Version:    8.7
+	Tcl-Version:    9.0
 	Tk-Branch:      tip-556
 -----
 
 **This tip is deferred because I could not find a sponsor for it.**
  

Index: tip/558.md
==================================================================
--- tip/558.md
+++ tip/558.md
@@ -1,10 +1,10 @@
 # TIP 558: Basic Configure Support for TclOO
         Author:         Donal K. Fellows 
-        State:          Draft
+        State:          Final
         Type:           Project
-        Vote:           Pending
+        Vote:           Done
         Created:        22-Dec-2019
         Post-History:
         Tcl-Version:    8.7
         Keywords:       Tcl, TclOO, properties
         Tcl-Branch:     tip-558

Index: tip/560.md
==================================================================
--- tip/560.md
+++ tip/560.md
@@ -3,11 +3,11 @@
         State:          Draft
         Type:           Project
         Vote:           Pending
         Created:        23-Jan-2020
         Post-History:
-        Tcl-Version:    8.7
+        Tcl-Version:    9.1
         Keywords:       Tk, TclOO, configuration, properties, options
         Tk-Branch:      tip-560
 ------
 
 # Abstract

Index: tip/561.md
==================================================================
--- tip/561.md
+++ tip/561.md
@@ -3,11 +3,11 @@
         State:          Draft
         Type:           Project
         Vote:           Pending
         Created:        23-Jan-2020
         Post-History:
-        Tcl-Version:    8.7
+        Tcl-Version:    9.1
         Keywords:       Tk
         Tk-Branch:      tip-561
 -----
 
 # Abstract

Index: tip/565.md
==================================================================
--- tip/565.md
+++ tip/565.md
@@ -18,11 +18,11 @@
 
 Ticket [3437816fff](https://core.tcl-lang.org/tk/info/3437816fff) pointed out that `.canvas raise $tagOrId1 $tagOrId2` and `.canvas lower $tagOrId1 $tagOrId2` were not symmetrical in their error cases management: the former returned an error when `$tagOrId2` does not exist, but the latter did not. This was fixed in 2011 by making the latter return the same error as the former.
 
 This change broke some software in the wild, see for instance [this Debian ticket](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719109) or [that Tk ticket]  (https://core.tcl-lang.org/tk/tktview/3552805fff).
 
-In the wake of the "Do nothing gracefully" reform, aka [TIP #323](https://core.tcl-lang.org/tips/doc/trunk/tip/323.md), the present TIP proposes to remove the error when calling .canvas raise/lower with a non-existent "aboveThis"/"belowThis" tag.
+In the wake of the "Do nothing gracefully" reform, aka [TIP #323](https://core.tcl-lang.org/tips/doc/main/tip/323.md), the present TIP proposes to remove the error when calling .canvas raise/lower with a non-existent "aboveThis"/"belowThis" tag.
 
 Note that the current behavior is inconsistent anyway:
 
 
     package require Tk

Index: tip/567.md
==================================================================
--- tip/567.md
+++ tip/567.md
@@ -1,10 +1,14 @@
 # TIP 567: Add Operation to Support Set-like Slots
         Author:         Donal K. Fellows 
-        State:          Draft
+        State:          Final
         Type:           Project
-        Vote:           In progress
+        Vote:           Done
+        Vote-Summary:   4/0/2
+        Votes-For:      DF, JN, MC, KW
+        Votes-Against:  none
+        Votes-Present:  DP,SL
         Created:        22-Feb-2020
         Post-History:
         Tcl-Version:    8.7
         Keywords:       Tcl, TclOO, slots
         Tcl-Branch:     tip-567

Index: tip/568.md
==================================================================
--- tip/568.md
+++ tip/568.md
@@ -1,24 +1,29 @@
 # TIP 568: Revise ByteArray Routines To Support Proper Value Extraction
 	Author:         Don Porter 
-	State:          Draft
+	State:          Final
 	Type:           Project
-	Vote:           Pending
+	Vote:           Done
 	Created:        4-Mar-2020
 	Post-History:
 	Keywords:       bytearray
 	Tcl-Version:    9.0
-	Tcl-Branch:	dgp-properbytearray
+	Tcl-Branch:     dgp-properbytearray
+	Tcl-Branch:     tip-568
+	Vote-Summary:   Accepted 6/0/1
+	Votes-For:      DP, KK, JN, SL, AK, KW
+	Votes-Against:  none
+	Votes-Present:  FV
 -----
 
 # Abstract
 
-PLEASE HOLD YOUR COMMENTS WHILE UNDER CONSTRUCTION.
-
-This TIP revises the public routines **Tcl_GetByteArrayObj** and
-**Tcl_SetByteArrayLength** to signal an error when they are passed
-an _objPtr_ that does not contain a valid byte sequence.
+This TIP proposes revision of the public routines **Tcl_GetByteArrayFromObj**
+and **Tcl_SetByteArrayLength** to signal an error when they are passed
+an _objPtr_ that does not contain a valid byte sequence, starting with
+Tcl 9.0.  It also proposes a new routine **Tcl_GetBytesFromObj** to
+provide robust bytearray use in Tcl 8.7.
 
 # Background
 
 It is a convention of the Tcl C interface to have routines with names
 like **Tcl_GetFooFromObj**. Their purpose is to extract a value in
@@ -36,11 +41,11 @@
 is used when the *foo* representation is of fixed size that is not too large.
 The _int_ return allows for returning **TCL_ERROR** when no valid *foo*
 can be extracted. The *Tcl_Interp* is provided to receive standardized
 error messages and codes on failure.  The final output argument is a pointer
 to space where the extracted *foo* value may be written. The value written
-is now the possession of the caller, generated by the routine, possibly by
+is now in the possession of the caller, generated by the routine, possibly by
 making a copy of something stored in the *Tcl_Obj*.  This pattern is followed
 in the cases where **Foo** is **Boolean**, **Bignum**, **Double**,
 **Encoding**, **Index**, **Int**, **Long**, or **WideInt**. (See also
 private routines where **Foo** is **Channel**, **Number**, **CompletionCode**,
 **WideBits**, or **Namespace**.)
@@ -61,55 +66,54 @@
 This pattern is followed in the cases where **Foo** is **RegExp**
 or **Command**. (See also private routine where **Foo** is **Lambda**.)
 
 The final pattern,
 
-> _foo_ **Tcl_GetFooFromObj**(*Tcl_Obj* _*_, _int *_);
+> _foo_ **Tcl_GetFooFromObj**(*Tcl_Obj* _*_, ***SIZE*** _*_);
 
 is used when the returned *foo* is a pointer value pointing into
 an array stored within Tcl's own structures.  It is implicit in the
 structure of the interface that it is presumed this extraction cannot
 fail. Thus there is no need to arrange for an interpreter to receive
 error messages or codes. The caller is instructed that the return value
 need not be checked for **NULL**. The final output argument is a pointer to
-space where the length of the *foo* array returned may be written.
+space where the length of the *foo* array returned may be written.  The
+length value written is of type ***SIZE*** which may be either *int*
+or *Tcl_Size* (see [[481]](481.md)).
 Documentation must be consulted to determine the conditions under which
 the caller may read, or even write to that array. This pattern is
 followed in the cases where **Foo** is **String**, **Unicode**,
 or **ByteArray**.
 
 Again it must be understood that all of these routines have value only
-so far as they produce a *foo* value that the caller can use in the place
+so far as they provide a *foo* value that the caller can use in the place
 of operating directly on the *Tcl_Obj*.  Experience has proven that
 the existing specification of the routine **Tcl_GetByteArrayFromObj**
 fails that test.
 
 # History and Rationale
 
-Starting with release 8.1, Tcl string values were composed of
-characters from an international character set. Each string was conceived
-as a sequence of characters from UCS-2.  Each routine that accepts a string
-as a *char* array, and the string representation of a *Tcl_Obj* both expect
-to store a UCS-2 sequence in a Modified UTF-8 encoding.  (For release 8.7,
-We are in working on extending the Tcl character set from UCS-2 to all of
-Unicode, but that will not change the two facts that are important here:
-(1) For reliable binary transfer, we can no longer simply write arbitrary bytes
-to a string representation; (2) General Tcl strings contain characters
-with codepoints outside the byte range.)
+In Tcl 8.0, every Tcl string value was equivalent to an arbitrary sequence
+of bytes.  Starting with release 8.1, the storage and transmission of Tcl
+string values were revised to use a Modified UTF-8 encoding so that a larger
+number of international character sets could be supported.  This created
+two important facts pertaining to arbitrary binary data:
+(1) For reliable binary transfer, we could no longer simply write arbitrary
+bytes to a string representation; (2) General Tcl strings may contain
+characters with codepoints outside the byte range (U+0000 - U+00FF).
 
 The rules for encoding string values in Tcl 8.1+ created the need for a new
 mechanism to accept, transmit, store, and produce arbitrary binary values,
 preferably while minimizing the need to convert to other representations.
 The _bytearray_ **Tcl_ObjType** was created to address this need. The
 routine **Tcl_NewByteArrayObj** stores an arbitrary byte sequence in
 a *Tcl_Obj*.  The routine **Tcl_GetByteArrayFromObj** can then retrieve
 that same byte sequence.  When the string representation of such a value is
-needed, each byte (with value from 0-255) in the sequence is treated
-as the corresponding UCS-2 codepoint (U+0000 - U+00FF), and that
-UCS-2 sequence is encoded in Modified UTF-8 in the usual way.  This
-strategy permits all byte sequences to be encoded in a subset of
-Tcl string values. 
+needed, each byte (with value from 0-255) in the sequence is encoded 
+as the corresponding codepoint (U+0000 - U+00FF), and that codepoint sequence
+is encoded in Modified UTF-8 in the usual way.  This strategy permits all
+byte sequences to be encoded in a subset of Tcl string values. 
 
 When **Tcl_GetByteArrayFromObj** is called on a value where no byte sequence
 has been stored, a byte sequence is generated from the string representation.
 When the string is in the subset of strings that can be produced by encoding
 byte sequences, the decoding is clear. For other string values, those that
@@ -123,11 +127,11 @@
 
 When a caller of **Tcl_GetByteArrayFromObj** receives access to a byte
 sequence, it does not know whether this is a sequence originally stored,
 or one generated by transforming and possibly truncating characters from
 a general Tcl string value.  This means the contents of the byte sequence
-do not reliably reveal information about the value.  We could not say,
+do not reliably reveal everything about the value.  We could not say,
 for example, what the 3rd character in the value is. At best we could
 say what is left when all high bits are stripped off that character.
 It is not a common need to treat all string values according to
 the equivalence classes established by examining only the low-bytes of
 every character.
@@ -139,14 +143,15 @@
 sequence is an original one. It did not come from a string since there is
 no string.  We can then use the byte sequence as the definitive value.
 This helps, but only so much.
 If anything causes the string representation to be generated, we lose this
 supplementary test, and we are back to being unable to use the byte sequence
-at all.
+at all, unless our usage is exactly to operate on the value according to
+the equivalence classes mentioned before.
 
-This is tricky enough, callers of **Tcl_GetByteArrayFromObj** get it wrong,
-even the callers within Tcl itself.  See Tcl
+This is tricky enough that many callers of **Tcl_GetByteArrayFromObj** get
+it wrong, even the callers within Tcl itself.  See Tcl
 bugs [0e92c404f1](https://core.tcl-lang.org/tcl/info/0e92c404f1)
 and [2637173](https://core.tcl-lang.org/tcl/info/2637173) and this
 interactive demonstration:
 
 
@@ -169,10 +174,12 @@
 In Tcl 8.7, the internals have been reworked so that two distinct
 **Tcl_ObjType**s are in use. One of these implements a proper byte array
 **Tcl_ObjType** that rejects string values that contain any non-byte 
 character. The other tolerates such strings, so that the behavior of
 **Tcl_GetByteArrayFromObj** can be continued without any incompatibility.
+This preserves as much safe utility of the type as can be achieved without an
+interface incompatibility.
 
 The next evolutionary step is to incompatibly revise the documented
 interface for **Tcl_GetByteArrayFromObj** so that it can return **NULL**
 and so that each caller is burdened with handling that possibility.
 The routine **Tcl_SetByteArrayLength** has the same concerns and should
@@ -185,41 +192,73 @@
 
 # Specification
 
 In Tcl 8.7, create a new public routine,
 
-> _unsigned char *_ **Tcl_GetBytesFromObj**(*Tcl_Interp* _*_, *Tcl_Obj* _*_,  _int *_);
+> _unsigned char *_ **Tcl_GetBytesFromObj**(*Tcl_Interp* _*_, *Tcl_Obj* _*_,  ***SIZE*** _*_);
 
 which attempts to extract a byte sequence representation of the value. If
 the value contains any character outside the byte range, it does not have
 a valid representation as a byte sequence. In that circumstance, the
 value **NULL** is returned, and if the interpreter argument is not **NULL**,
 standard error messages and codes are left in it. Otherwise, a pointer
 to the byte sequence representation is returned (after creating it, if
 necessary) and the number of bytes in the sequence is written to the
-storage at the output pointer, if it is not **NULL**.
-
-
-
-[binary scan]
-[binary encode]
-
-
+storage at the output pointer, if it is not **NULL**.  Using the techniques
+from [[481]](481.md), the ***SIZE*** type holding the number of bytes may be
+either *int* or *Tcl_Size* .
+
+In Tcl 9.0, revise routines **Tcl_GetByteArrayFromObj** and
+**Tcl_SetByteArrayLength** so that they return NULL whenever the value
+is not a proper binary sequence.  Most callers will prefer to use
+the routine **Tcl_GetBytesFromObj** instead to benefit from error message
+and error code generation.
+
+In Tcl 9.0, building on these changes in the internal supports for
+arbitrary binary data, the commands **binary scan** and **binary encode**
+are revised to reject arguments that are not valid binary data.  When
+such a situation arises, it indicates a programming error.  These are better
+detected and fixed than accommodated.
+
+In Tcl 9.0, end registration of a **Tcl_ObjType** with the name **bytearray**.
+Callers of **Tcl_GetObjType**("bytearray") must be prepared to receive
+a **NULL** return value.
 
 # Compatibility
 
-# Scope
+Most callers of **Tcl_GetByteArrayFromObj** are probably buggy, at least
+so far as they are not robust when operating on a value that is not
+valid binary data.  If the programs are written so that invalid data
+never reaches these calls, they will not experience any incompatibility.
+Otherwise, the incompatibilities provide the tools needed to make the
+code robust in that situation.
+
+Most callers will want to switch to **Tcl_GetBytesFromObj** as soon as
+they can start to require Tcl 8.7.  It is a better design for the job,
+and it will not have futher incompatibilities when bridging into Tcl 9.
+
+Any callers who cannot or will not adapt their code to
+use **Tcl_GetBytesFromObj** will continue to have **Tcl_GetByteArrayFromObj**
+that is substandard in exactly the same way it is now through all remaining
+Tcl 8 releases.  Only the adoption of Tcl 9 will force them to change
+their code, and that change will be nothing more than checking a return
+value for **NULL**.
+
+The incompatibilities in the values acceptable to **binary scan**
+and **binary encode** in Tcl 9 will cause no trouble in well-programmed
+code.  Only code that allows arbitrary strings to be passed as an argument
+runs a risk of new errors, and such code is better discovered and improved.
+
+# Addendum
 
-This TIP proposes a change to **Tcl_GetByteArrayFromObj** that is an
-incompatibity in its return value.  There is also interest (see [TIP 481])
-in making another incompatible change to the same routine in the type of
-its final output argument. It is out of scope to merge these concerns.
-They can be accompilshed as orthogonal matters in either sequence.
+After [TIP #660](660.md) was accepted, a lot of functions changed from
+using size\_t to ptrdiff\_t parameters. In order to prevent confusion,
+this change has been adapted in the TIP text above as well.
 
 # Reference Implementation
 
 See branches [dgp-properbytearray](https://core.tcl-lang.org/tcl/timeline?t=dgp-properbytearray) (9.0)
 and [tip-568](https://core.tcl-lang.org/tcl/timeline?t=tip-568) (8.7).
 
 # Copyright
 
 This document has been placed in the public domain.

Index: tip/57.md
==================================================================
--- tip/57.md
+++ tip/57.md
@@ -6,10 +6,11 @@
 	Type:           Project
 	Vote:           Done
 	Created:        30-Aug-2001
 	Post-History:   
 	Tcl-Version:    8.5
+	Obsoletes:      170
 -----
 
 # Abstract
 
 This TIP proposes to move the _lassign_ command from the TclX

Index: tip/570.md
==================================================================
--- tip/570.md
+++ tip/570.md
@@ -1,14 +1,15 @@
 # TIP 570: Gesture Support for Finger Scrolling and "Pinch to Zoom"
 	Author:         Harald Oehlmann 
 	State:          Draft
 	Type:           Project
-	Vote:           Done
+	Vote:           Pending
 	Created:        18-Mar-2020
 	Post-History:
 	Keywords:       Tk, bindings
-	Tcl-Version:    8.7
+	Tcl-Version:    9.0
+	Tk-Branch:      pspjuth-touch
 -----
 
 # Abstract
 
 Support for the gestures "finger scroll" and "pinch to zoom" are proposed in a

Index: tip/572.md
==================================================================
--- tip/572.md
+++ tip/572.md
@@ -1,10 +1,10 @@
 # TIP 572: Implement a mechanism to specify the procedure/lambda/method argument call types (Evaluation strategy)
 	Author:         Rami Khaldi 
 	State:          Draft
 	Type:           Project
-	Tcl-Version:    9.0
+	Tcl-Version:    9.1
 -----
 
 # Abstract
 
 The aim of this TIP is to implement a mechanism to specify the procedure call types (call by name vs. value).

Index: tip/573.md
==================================================================
--- tip/573.md
+++ tip/573.md
@@ -1,8 +1,8 @@
 # TIP 573: Surrogates are invalid
 	Author:         Jan Nijtmans 
-	State:          Draft
+	State:          Withdrawn
 	Type:           Project
 	Tcl-Version:    8.7
 	Tcl-Branch:     tip-573
 -----
 # Abstract
@@ -9,18 +9,18 @@
 
 In Tcl 8.5 and 8.6, it is possible to specify "\\uD800" as valid character, and do reasonable things with it.
 Actually, U+D800 is not a valid Unicode code point, so any operation on such value is "undefined behavior".
 Surrogates are only allowed when Unicode characters are stored or transmitted as UTF16, and then a single
 Unicode character behaves as 2 characters in storage or on-line. However, when translating back to UTF-8,
-those 2 characters have to be merged back to a single Unicode character. They are unseparatable.
+those 2 characters have to be merged back to a single Unicode character. They are inseparable.
 
 Tcl has always allowed this, but it's wrong. The UtfToUtf encoder should translate all characters in
 the range \\uD800 - \\uDFFF to the replacement character \\uFFFD. Also using the form \\uD800 in
 scripts should always behave the same as if \\uFFFD was specified. This way, any possible 'hack'
 attempt, trying to insert invalid Unicode in Tcl, can be mitigated rapidly.
 
-One exception to this has to be made. When using the escace sequence \\uD800\\uDC00, so a valid
+One exception to this has to be made. When using the escape sequence \\uD800\\uDC00, so a valid
 combination of an upper and a lower surrogate, in a script, there is no harm in translating
 that to the intended Unicode code point. In Tcl 8.6 and 8.7 there is no other way than that for
 specifying Emoji. Allowing this, provides a upgrade path for existing scripts handling Emoji.
 Starting with Tcl 8.7, the "\\UXXXXXX" escape sequence should be used for this.
 
@@ -49,9 +49,11 @@
 Implementation is in branch tip-573
 
 # Discussion
 
 See ticket [5dabd088ee](https://core.tcl-lang.org/tcl/tktview/5dabd088ee).
+
+This TIP is now withdrawn, in favor of TIP #601.
 
 # Copyright
 
 This document has been placed in the public domain.

Index: tip/575.md
==================================================================
--- tip/575.md
+++ tip/575.md
@@ -1,23 +1,28 @@
 # TIP 575: Switchable Tcl\_UtfCharComplete()/Tcl\_UtfNext()/Tcl\_UtfPrev()
 	Author:         Jan Nijtmans 
-	State:          Draft
+	State:          Final
 	Type:           Project
+	Vote:           Done
 	Tcl-Version:    8.7
 	Tcl-Branch:     tip-575
+	Vote-Summary:	Accepted 3/0/0
+	Votes-For:	JN, KW, SL
+	Votes-Against:	none
+	Votes-Present:	none
 -----
 # Abstract
 
 This TIP is a successor to [TIP #542](542.md), resolving a corner-case not realized at that moment.
 
-[TIP #542](542.md) allows stub-enabled extensions to be compiled with `-DTCL_UTF_MAX=4`, still
-working with Tcl compiled with `-DTCL_UTF_MAX=3`. All functions (e.g. `Tcl_UtfToUniChar`) which
-use a `Tcl_UniChar`, change behavior with the value of `TCL_UTF_MAX`: If `TCL_UTF_MAX=3`,
+[TIP #542](542.md) allows stub-enabled extensions to be compiled with `-DTCL_UTF_MAX=4`, while
+still working with a Tcl compiled with `-DTCL_UTF_MAX=3`. All functions (e.g. `Tcl_UtfToUniChar`)
+which use a `Tcl_UniChar`, change behavior with the value of `TCL_UTF_MAX`: If `TCL_UTF_MAX=3`,
 then, supplying a 4-byte UTF-8 character to this function will return 1, and `*chPtr` will
 point to a high surrogate. If `TCL_UTF_MAX=4`, then, this function will return 4, and `*chPtr`
 will point to the full Unicode character. This works by supplying two different stub entries
-and making a switch controlled by `TCL_UTF_MAX`.
+and making a switch controlled by the value of `TCL_UTF_MAX`.
 
 The functions `Tcl_UtfNext()/Tcl_UtfPrev()` don't have a `Tcl_UniChar` parameter, still there's
 an expected coupling with the function `Tcl_UtfToUniChar`: If `TCL_UTF_MAX=4` then we would
 expect `Tcl_UtfNext()` to be able to jump forward 4 bytes, while with `TCL_UTF_MAX=3`,
 `Tcl_UtfNext()` can only jump forward with maximum 3 bytes. The same for `Tcl_UtfPrev()`.
@@ -24,24 +29,24 @@
 
 The function `Tcl_UtfCharComplete()`, which is coupled with the function `Tcl_UtfToUniChar`
 (indicating if there are enough bytes available for `Tcl_UtfToUniChar()` to be called),
 has the same problem. Making this function switchable has the advantage that this function
 now can be used to protect calls to `Tcl_UtfNext()` too, for extensions compiled with
-`TCL_UTF_MAX=3` or `TCL_UTF_MAX=4`.
+whatever value of `TCL_UTF_MAX`.
 
 # Specification
 
 Implement new functions `Tcl_UtfCharComplete()`/`Tcl_UtfNext()`/`Tcl_UtfPrev()`, which can
 jump 4 bytes forward resp. back, so it is possible to jump over UTF-8 characters > U+FFFF
 in one step in stead of two.
 
-The new `Tcl_UtfNext()`/`Tcl_UtfPrev()` functions will get their own new entries in the stub table.
-So, extensions (however rare) using `Tcl_UtfNext()`/`Tcl_UtfPrev()` but compiled against Tcl 8.6
-headers will keep their original behavior.
+The new `Tcl_UtfNext()`/`Tcl_UtfPrev()` functions will get their own new entries in the
+stub table. So, extensions (however rare) using `Tcl_UtfNext()`/`Tcl_UtfPrev()` but
+compiled against Tcl 8.6 headers will keep their original behavior.
 
 The new `Tcl_UtfCharComplete()` will behave almost identical to the old one. The only
-difference is when it encounters a starting byte between 0xF0 and 0xF5: It will return
+difference is when it encounters a starting byte between 0xF0 and 0xF5: Then it will return
 true only when at least 4 bytes are available.
 
 If an extension is compiled with `-DTCL_UTF_MAX=4` or with `-DTCL_NO_DEPRECATED`, then
 `Tcl_UtfCharComplete()` will start behaving like described in this TIP, if not then it
 will behave exactly as in Tcl 8.6.
@@ -53,10 +58,13 @@
 
 Implementation is in branch tip-575
 
 # Compatibility
 
-As long as Tcl is compiled with -DTCL_UTF_MAX=3, this is fully upwards compatible.
+As long as Tcl and/or extensions are both compiled with `-DTCL_UTF_MAX=3` (which is
+the default in Tcl 8.x) or `-DTCL_UTF_MAX=4` (as in Tcl 9.x), nothing changes.
+The difference can only be noted in extensions which are compiled using a different
+`TCL_UTF_MAX` value than Tcl.
 
 # Copyright
 
 This document has been placed in the public domain.

Index: tip/576.md
==================================================================
--- tip/576.md
+++ tip/576.md
@@ -3,12 +3,11 @@
 	State:          Draft
 	Type:           Project
 	Created:        25-May-2020
 	Post-History:   
 	Keywords:       Tk listbox
-	Tcl-Version:    8.7
-	Tk-Version:     8.7
+	Tcl-Version:    9.1
 -----
 
 # Abstract
 
 Make a small enhancement to the listbox widget to allow convient viewing of a list of lists, as a 2d-table.

Index: tip/577.md
==================================================================
--- tip/577.md
+++ tip/577.md
@@ -1,14 +1,19 @@
 # TIP 577: Enhanced index values for Tk
 	Author:         Jan Nijtmans 
-	State:          Draft
+	State:          Final
 	Type:           Project
+	Vote:           Done
 	Created:        8-June-2020
 	Post-History:   
 	Keywords:       Tcl index
 	Tcl-Version:    8.7
-	Tk-Branch:      strict-index
+	Tk-Branch:      enhanced-index
+	Vote-Summary    Accepted 5/0/1
+	Votes-For:      BG, JN, KW, MC, SL 
+	Votes-Against:  none
+	Votes-Present:  KBK
 -----
 
 # Abstract
 
 Various commands handle errors in "index" values differently. This TIP attempts
@@ -20,13 +25,13 @@
 `Tcl_GetIntFormIndex()` (See also TIP #544).
 
 In addition, the empty string is accepted in Tk as valid index. It means the same
 as `-1` so _not available_. In Tk this is more natural, since the default of many
 options is already the empty string. The default value of the `-underline` option
-so because the empty string, and setting `-underline` to the empty string means
+becomes the empty string. Setting `-underline` to the empty string means
 no underlining. This default value change will be only done when Tk is compiled
-with Tk 9.0 headers, in order to give applications more time to adapt to this
+with Tcl 9 headers, in order to give applications more time to adapt to this
 usage (see _Compatibility_ section below).
 
 # Rationale
 
 Some examples (Tk):
@@ -34,59 +39,58 @@
 $ wish8.6
 % listbox .l
 % menu .m
 % .l index 0
 0
-% .l index none
+% .l index none _(listbox doesn't know about `none`)_
 bad listbox index "none": must be active, anchor, end, @x,y, or a number
-% .m index none
+% .m index none _(menu does know about `none`)_
 none
 % .m index 0
 none
-% .m index foo
-bad menu entry index "foo"
 
-We see that menu's have a different way to indicate 'not found' compared to other widgets. +We see that menu's have a different way to indicate _not available_ compared to other widgets. A request is done already a long time ago, to make index handling in Tk more flexible. See: [`widgets indices enhancement`](https://core.tcl-lang.org/tk/tktview?name=1ef1ae2177) -This TIP implements part of this request (only the `active-int` form is not implemented. +This TIP implements part of this request (only the `active-` form is not implemented. # Specification * Tk indices (e.g. the value of the `-underline` option) will accept all forms - accepted by `Tcl_GetIntFromIndex()`, and also the empty string meaning _not available_. - So `-underline end-1` means underline one character before the last one of the string. + accepted by `Tcl_GetIntFromIndex()`, and also the empty string. So + `-underline end-1` means underline one character before the last one of the + string. `-underline {}` means no underlining, the same as `-underline -1`. * Indices in menu's, which currently use `none` as default, will be changed to use the empty string as default. The use of `none` in menu's is now considered deprecated, but still supported as long as Tk is compiled with Tcl 8.x headers. * Start accepting the empty string as index for entries, listboxes, menus ..... just as for button and menu-related `-underline` options. A new `TK_OPTION_INDEX` option is implemented, which is almost the same as `TK_OPTION_INT`, but in stead of only integers, accepts all those index forms as well. * When Tk is compiled with Tcl 9 headers, the default `-underline` value becomes - the empty string in stead of -1. When compiled with Tcl 8 headers, `-1` is still + the empty string in stead of `-1`. When compiled with Tcl 8 headers, `-1` is still the default. * When Tk is compiled with Tcl 9 headers, all commands which currently report _not available_ as `-1`, will start returning the empty string in stead. # Compatibility When compiled with Tcl 8.x headers, this is almost 100% compatible. Except for menu commands which currently use the inconsistent `none` keyword (see above example) -they will start returning the empty string. +they will start using the empty string in stead (but `none` still works in Tcl 8.x). -Code can easily be made compatible in any environment. Just don't check against -the value `-1` any more, but use the `< 0` check: Since comparing the empty -string with `0` in Tcl uses string compare, it gives the same result as +Code can easily be made working in both Tcl 8.x and 9.x environments. Just don't +check against the value `-1` any more, but use the `< 0` check: Since comparing the +empty string with `0` in Tcl uses string compare, it gives the same result as comparing `-1` with `0`. All Tk utilities and demo's are already modified to do this check consistently. # Implementation -See the [`strict-index`](https://core.tcl-lang.org/tk/timeline?r=strict-index) branch. +See the [`enhanced-index`](https://core.tcl-lang.org/tk/timeline?r=enhanced-index) branch. # Copyright This document has been placed in the public domain. Index: tip/579.md ================================================================== --- tip/579.md +++ tip/579.md @@ -1,29 +1,35 @@ # TIP 579: Improved auto_path for Safe Base interpreters Author: Keith Nash - State: Draft + State: Final Type: Project - Vote: Pending + Vote: Done Created: 07-Jul-2020 - Version: 25-Jul-2020 + Version: 31-Aug-2022 Post-History: Tcl-Version: 8.7 Keywords: safe interp auto_path access_path Tcl-Branch: tip-579-8-7 + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK, SL + Votes-Against: none + Votes-Present: none ------ # Abstract -This TIP proposes modifying the Safe Base to give users the option of defining the ::auto\_path in a Safe Base interpreter to conform to the specification given in *pkg_mkIndex\(n\)* and *library\(n\)*. The default is to preserve the existing behavior of the Safe Base, in which the ::auto\_path includes a large number of additional directories. +This TIP proposes modifying the Safe Base to give users the *option* of defining the ::auto\_path in a Tcl 8.7 Safe Base interpreter to conform to the specification given in *pkg_mkIndex\(n\)* and *library\(n\)*. The TIP's *default* is to preserve the existing behavior of the Safe Base, in which the ::auto\_path includes a large number of additional directories. This choice of default will be changed in Tcl 9.0. + +This TIP considers the multiple configuration options of a Safe Base interpreter, notably when these options are changed by **safe::interpConfigure**. However, in typical use the configuration is defined at interpreter creation and remains unchanged for the lifetime of the interpreter. In this case a much simpler analysis is possible (see section *Discussion*). # Rationale -A Safe Base interpreter is a safe slave interpreter that can apply the commands **load** and **source** to files in certain directories specified by its master interpreter. The list of those directories is called the *access path* and is recorded in the master interpreter. In the Safe Base slave, each directory of the *access path* is represented by a token of the form $p\(:34:\) which includes a literal dollar character and an integer. A filename can be composed as, for example, \[**file join** {$p\(:34:\)} pkgIndex.tcl\]. The Safe Base interpreter uses modified **source** and **load** commands that convert a filename rooted at an *access path* token to a real filename. The tclIndex autoloader, **package** command, and **tcl::tm** command in Safe Base interpreters are compatible with such tokenized filenames. +A Safe Base interpreter is a safe child interpreter that can apply the commands **load** and **source** to files in certain directories specified by its parent interpreter. The list of those directories is called the *access path* and is recorded in the parent interpreter. In the Safe Base child, each directory of the *access path* is represented by a token of the form $p\(:34:\) which includes a literal dollar character and an integer. A filename can be composed as, for example, \[**file join** {$p\(:34:\)} pkgIndex.tcl\]. The Safe Base interpreter uses modified **source** and **load** commands that convert a filename rooted at an *access path* token to a real filename. The tclIndex autoloader, **package** command, and **tcl::tm** command in Safe Base interpreters are compatible with such tokenized filenames. The *access path* comprises the directories of the requested ::auto\_path and all their children, and the directories of the module path \[**tcl::tm::list**\] and all their descendants. -In a Safe Base interpreter, the value of ::auto\_path is currently set to the tokenized *access path*, rather than to a tokenized form of the usual definition given by *pkg_mkIndex\(n\)* and *library\(n\)*. This feature, not documented in *safe\(n\)*, allowed **package** to work correctly despite the absence of the **glob** command in a Safe Base interpreter. The value of ::auto\_path is synchronized with the tokenized *access path* whenever the latter is changed by a **safe::\*** command in the master interpreter. +In a Safe Base interpreter, the value of ::auto\_path is currently set to the tokenized *access path*, rather than to a tokenized form of the usual definition given by *pkg_mkIndex\(n\)* and *library\(n\)*. This feature, not documented in *safe\(n\)*, allowed **package** to work correctly despite the absence of the **glob** command in a Safe Base interpreter. The value of ::auto\_path is synchronized with the tokenized *access path* whenever the latter is changed by a **safe::\*** command in the parent interpreter. When **tcl::tm** facilities were added to Tcl, a restricted form of **glob** was added to Safe Base interpreters. This new **glob** command allows **package** to operate correctly when ::auto\_path conforms to the specification in *pkg_mkIndex\(n\)* and *library\(n\)*. However, the Safe Base still defines the ::auto\_path to be equal to the tokenized *access path*, and as a result it lists a large number of directories that are used by **tcl::tm**, and have nothing to do with the purpose of ::auto\_path - seeking pkgIndex.tcl or tclIndex files. This feature is unhelpful when debugging, because the list of directories in the *access path* can be very long. # Proposed Change @@ -38,17 +44,17 @@ **safe::setSyncMode ?newValue?** When an argument is supplied, the command returns an error in two cases: \(a\) if the argument is not a boolean value; \(b\) if any Safe Base interpreters exist. -Otherwise, the command is an accessor for a new namespace variable safe::AutoPathSync. Normal return supplies the value of this variable. The value is initialized when the file tcl8.6/safe.tcl is sourced by the autoloader. +Otherwise, the command is an accessor for a new namespace variable safe::AutoPathSync. Normal return supplies the value of this variable. The value is initialized when the file tcl8.7/safe.tcl is sourced by the autoloader. The value \[**safe::setSyncMode**\] controls the behavior of all Safe Base interpreters, and can be changed only when no Safe Base interpreters are defined. Typically the value will be set as part of initialization. When \[**safe::setSyncMode**\] is true, the behavior is the same as in current Tcl. The Safe Base interpreter's ::auto\_path is defined as a tokenized form of the *access path*. Operations that change the Safe Base interpreter's *access path* also change its value of ::auto\_path. -When \[**safe::setSyncMode**\] is false, ::auto\_path is defined to fulfil the requirements of *pkg_mkIndex\(n\)* and *library\(n\)* only. It is not modified when the *access path* changes, except by operations that give the slave default paths derived from those of its master - in these cases the slave's ::auto\_path is set to a tokenized form of the master's ::auto\_path. +When \[**safe::setSyncMode**\] is false, ::auto\_path is defined to fulfil the requirements of *pkg_mkIndex\(n\)* and *library\(n\)* only. It is not modified when the *access path* changes, except by operations that set the paths in the child to values that correspond to those of its parent - in such cases the child's ::auto\_path is set to a tokenized form of the parent's ::auto\_path. When \[**safe::setSyncMode**\] is false, each Safe Base interpreter is given a new option "-autoPath" which can be used with the commands **safe::interpCreate**, **safe::interpInit**, and **safe::interpConfigure** in the same way as other options. The -autoPath option is undefined when \[**safe::setSyncMode**\] is true, permitting 100% compatibility with the existing Tcl Safe Base. In order to implement this new definition of ::auto\_path in a Safe Base interpreter, some changes must be made to the behavior of existing Safe Base commands when \[**safe::setSyncMode**\] is false. These changes are specified below. @@ -61,31 +67,31 @@ * The *Existing Case* is defined to mean Tcl either in its current form, or with this TIP implemented and with \[**safe::setSyncMode**\] true. * The *Extra Case* is defined to mean Tcl with this TIP implemented and with \[**safe::setSyncMode**\] false. The differences from the *Existing Case* are the changes proposed by this TIP. * Code Examples are given for the *Extra Case*. -The effects of options -accessPath and -autoPath on the value of the slave's ::auto_path can be expressed in four rules, with a fifth rule for the command **safe::interpAddToAccessPath**. +The effects of options -accessPath and -autoPath on the value of the child's ::auto_path can be expressed in four rules, with a fifth rule for the command **safe::interpAddToAccessPath**. \(1\) Calling **safe::interpCreate**, **safe::interpInit**, or **safe::interpConfigure** with an option/value pair for -autoPath. * *Existing Case* * The option -autoPath is undefined. The command will raise an error. * *Extra Case* * The presence of the "-autoPath value" arguments has no effect on the *access path*. * The command applies option -autoPath *after* it determines the value of *access path* from the other arguments. - * The command will set the slave's ::auto\_path to a tokenized form of the specified value. + * The command will set the child's ::auto\_path to a tokenized form of the specified value. \(2\) Calling **safe::interpCreate** or **safe::interpInit** without the option -accessPath, or with -accessPath {}; or calling **safe::interpConfigure** with -accessPath {}. * This remains the most convenient way to initialize a Safe Base interpreter. -* Each command sets the *access path* to the master interpreter's ::auto\_path and its children, and then appends the directories of \[**tcl::tm::list**\] and their descendants. -* Each command sets the slave's \[**tcl::tm::list**\] to a tokenized form of the master's \[**tcl::tm::list**\]. +* Each command sets the *access path* to the parent interpreter's ::auto\_path and its children, and then appends the directories of \[**tcl::tm::list**\] and their descendants. +* Each command sets the child's \[**tcl::tm::list**\] to a tokenized form of the parent's \[**tcl::tm::list**\]. * *Existing Case* * Each command sets ::auto\_path to the tokenized *access path*. * *Extra Case* - * If the option -autoPath is specified, the slave's ::auto\_path is determined by rule \(1\). - * If the option -autoPath is not specified, each command sets the slave's ::auto\_path to a tokenized form of the master's ::auto\_path. + * If the option -autoPath is specified, the child's ::auto\_path is determined by rule \(1\). + * If the option -autoPath is not specified, each command sets the child's ::auto\_path to a tokenized form of the parent's ::auto\_path. Examples of calls to commands **safe::\*** that belong to this category are:
         safe::interpCreate foo
@@ -98,78 +104,76 @@
 \(3\) Calling **safe::interpCreate**, **safe::interpInit**, or **safe::interpConfigure** with a non-empty value of -accessPath.
 
 Each such command:
 
 * Sets the *access path* to the requested value, then appends \[**tcl::tm::list**\] and its descendants.
-* Sets the slave's \[**tcl::tm::list**\] to a tokenized form of the master's \[**tcl::tm::list**\].
+* Sets the child's \[**tcl::tm::list**\] to a tokenized form of the parent's \[**tcl::tm::list**\].
 * *Existing Case*
-  * Sets the slave's ::auto\_path to the tokenized *access path*.
+  * Sets the child's ::auto\_path to the tokenized *access path*.
 * *Extra Case*
-  * If option -autoPath is also present, the slave's ::auto\_path is determined by rule \(1\).
-  * If the option -autoPath is not specified, commands **safe::interpCreate** and **safe::interpInit** each set the slave's ::auto\_path to {}.
-  * If the option -autoPath is not specified, command **safe::interpConfigure** leaves the slave's ::auto\_path unchanged.
+  * If option -autoPath is also present, the child's ::auto\_path is determined by rule \(1\).
+  * If the option -autoPath is not specified, commands **safe::interpCreate** and **safe::interpInit** each set the child's ::auto\_path to {}.
+  * If the option -autoPath is not specified, command **safe::interpConfigure** leaves the child's ::auto\_path unchanged.
 
 e.g.
 
 
         safe::interpCreate foo -accessPath {
-            /usr/local/TclHome/lib/tcl8.6
-            /usr/local/TclHome/lib/tcl8.6/http1.0
-            /usr/local/TclHome/lib/tcl8.6/opt0.4
-            /usr/local/TclHome/lib/tcl8.6/msgs
-            /usr/local/TclHome/lib/tcl8.6/encoding
+            /usr/local/TclHome/lib/tcl8.7
+            /usr/local/TclHome/lib/tcl8.7/opt0.4
+            /usr/local/TclHome/lib/tcl8.7/msgs
+            /usr/local/TclHome/lib/tcl8.7/encoding
             /usr/local/TclHome/lib
         }
 
-        # The slave's ::auto_path must be given a suitable value:
+        # The child's ::auto_path must be given a suitable value:
 
         safe::interpConfigure foo -autoPath {
-            /usr/local/TclHome/lib/tcl8.6
+            /usr/local/TclHome/lib/tcl8.7
             /usr/local/TclHome/lib
         }
 
         # The two commands can be combined:
 
         safe::interpCreate foo -accessPath {
-            /usr/local/TclHome/lib/tcl8.6
-            /usr/local/TclHome/lib/tcl8.6/http1.0
-            /usr/local/TclHome/lib/tcl8.6/opt0.4
-            /usr/local/TclHome/lib/tcl8.6/msgs
-            /usr/local/TclHome/lib/tcl8.6/encoding
+            /usr/local/TclHome/lib/tcl8.7
+            /usr/local/TclHome/lib/tcl8.7/opt0.4
+            /usr/local/TclHome/lib/tcl8.7/msgs
+            /usr/local/TclHome/lib/tcl8.7/encoding
             /usr/local/TclHome/lib
         } -autoPath {
-            /usr/local/TclHome/lib/tcl8.6
+            /usr/local/TclHome/lib/tcl8.7
             /usr/local/TclHome/lib
         }
 
\(4\) Other calls of command **safe::interpConfigure** with option/value pairs. -The only case not covered by rules \(1\) to \(3\) is call to **safe::interpConfigure** with neither option -accessPath nor -autoPath. Such a call does not alter either the *access path* or the ::auto\_path. +The only case not covered by rules \(1\) to \(3\) is a call to **safe::interpConfigure** with neither option -accessPath nor -autoPath. Such a call does not alter either the *access path* or the ::auto\_path. \(5\) Calling **safe::interpAddToAccessPath**. -* The command appends a directory to the slave's existing *access path*. -* It does not change the slave's \[**tcl::tm::list**\]. +* The command appends a directory to the child's existing *access path*. +* It does not change the child's \[**tcl::tm::list**\]. * *Existing Case* * It sets ::auto\_path to the tokenized *access path* * *Extra Case* - * It does not change the slave's ::auto\_path. + * It does not change the child's ::auto\_path. e.g. * The example code below can be appended to the example code that defines the interpreter foo in rule \(3\) above. -* In the *Extra Case* only, the slave's auto_path must be +* In the *Extra Case* only, the child's auto_path must be modified to allow the interpreter to use the Img package.
         safe::interpAddToAccessPath foo /usr/local/TclHome/lib/extras/Img1.4.11
 
-        lassign [safe::interpConfigure foo -autoPath] DUM slaveAutoPath
-        lappend slaveAutoPath /usr/local/TclHome/lib/extras/Img1.4.11
-        safe::interpConfigure foo -autoPath $slaveAutoPath
+        lassign [safe::interpConfigure foo -autoPath] DUM childAutoPath
+        lappend childAutoPath /usr/local/TclHome/lib/extras/Img1.4.11
+        safe::interpConfigure foo -autoPath $childAutoPath
 
* In the examples below, no change is needed to ::auto_path, either because the existing value allows access to the new package directories, or because the added directories (e.g. timezone data) @@ -182,23 +186,23 @@ tzdata tzdata/Africa ... tzdata/US } { - safe::interpAddToAccessPath foo /usr/local/TclHome/lib/tcl8.6/$path + safe::interpAddToAccessPath foo /usr/local/TclHome/lib/tcl8.7/$path }
**Summary of Specification** * *Existing Case* - * Safe Base commands set the slave's ::auto\_path to the tokenized *access path*. - * Advantages: the caller need not be concerned with the slave's ::auto\_path. - * Disadvantages: does not conform to *pkg_mkIndex\(n\)* and *library\(n\)*; the slave's ::auto\_path includes many directories that do not belong in the search path for pkgIndex.tcl or tclIndex files; the list of directories is very long and this is unhelpful when debugging. + * Safe Base commands set the child's ::auto\_path to the tokenized *access path*. + * Advantages: the caller need not be concerned with the child's ::auto\_path. + * Disadvantages: does not conform to *pkg_mkIndex\(n\)* and *library\(n\)*; the child's ::auto\_path includes many directories that do not belong in the search path for pkgIndex.tcl or tclIndex files; the list of directories is very long and this is unhelpful when debugging. * *Extra Case* - * The commands in rule \(2\) set the slave's ::auto\_path to a tokenized form of the master interpreter's. - * When other commands change the *access path*, the caller is responsible for making any necessary changes to the slave's ::auto\_path. The new -autoPath option simplifies this task. + * The commands in rule \(2\) set the child's ::auto\_path to a tokenized form of the parent interpreter's. + * When other commands change the *access path*, the caller is responsible for making any necessary changes to the child's ::auto\_path. The new -autoPath option simplifies this task. # Discussion Because this TIP adds a new option -autoPath, it must go into detail about the interplay between -autoPath and -accessPath, especially when values are changed by **safe::interpConfigure**. This leads to a fairly lengthy consideration of multiple cases (above). @@ -214,13 +218,13 @@ >
 >        safe::setSyncMode 0
 > 
-> Use **safe::interpCreate** or **safe::interpInit** to create an interpreter with the properties that you require. The simplest way is not to specify -accessPath or -autoPath, which means the safe interpreter will use the same paths as the master interpreter. However, if -accessPath is specified, then -autoPath must also be specified, or else it will be set to {}. +> Use **safe::interpCreate** or **safe::interpInit** to create an interpreter with the properties that you require. The simplest way is not to specify -accessPath or -autoPath, which means the safe interpreter will use the same paths as the parent interpreter. However, if -accessPath is specified, then -autoPath must also be specified, or else it will be set to {}. -> The value of -autoPath is that required to access tclIndex and pkgIndex.txt files according to the same rules as an unsafe interpreter (see pkg_mkIndex(n) and library(n)). +> The value of -autoPath is that required to access tclIndex and pkgIndex.txt files according to the same rules as an unsafe interpreter (see *pkg_mkIndex\(n\)* and *library\(n\)*). > With "Sync Mode" on (the default), the option -autoPath is undefined, and the Safe Base sets the safe interpreter's ::auto\_path to a tokenized form of the *access path*. In addition to the directories present if "Safe Mode" is off, the ::auto\_path includes the numerous subdirectories and module paths @@ -227,16 +231,28 @@ that belong to the *access path*. # Reference Implementation -Branch TIP-579-8-7 in the public fossil repository for Tcl. +Branch tip-579-8-7 in the public fossil repository for Tcl. + +**Modified files** + +Compared to Tcl 8.7 (core-8-branch), branch tip-579-8-7 modifies the following files: + +* doc/safe.n +* library/safe.tcl +* library/tclIndex +* tests/safe-stock.test +* tests/safe.test +* tests/safe-zipfs.test + # Compatibility -The default value of \[**safe::setSyncMode**\] is 1. The new interpreter option -autoPath is undefined in this case. All existing code will behave in the same way as before. +In Tcl 8.7, the default value of \[**safe::setSyncMode**\] is 1. The new interpreter option -autoPath is undefined in this case. All existing code will behave in the same way as before. -If desired, the default value of \[**safe::setSyncMode**\] could be changed to 0 at a future major revision of Tcl. +In Tcl 9.0, The default value of \[**safe::setSyncMode**\] will be changed to 0. The value 1 will remain available to ease the porting of legacy code, but must be set by the script. # Copyright This document has been placed in the public domain. Index: tip/580.md ================================================================== --- tip/580.md +++ tip/580.md @@ -4,11 +4,10 @@ Type: Project Vote: Done Created: 14-July-2020 Post-History: Tcl-Version: 8.7 - Tk-Version: 8.7 Keywords: export Tk-Branch: tip-580 Vote-Summary: Accepted 9/0/0 Votes-For: BG, DKF, FV, JD, JN, KBK, KW, MC, SL Votes-Against: none Index: tip/583.md ================================================================== --- tip/583.md +++ tip/583.md @@ -4,11 +4,11 @@ Type: Project Vote: Pending Created: 15-Aug-2020 Post-History: Keywords: Tcl - Tcl-Version: 8.7 + Tcl-Version: 9.1 ----- # Abstract This TIP proposes that the trace command include an option for step tracing (of procedures) that would Index: tip/584.md ================================================================== --- tip/584.md +++ tip/584.md @@ -21,11 +21,11 @@ # Rationale People regularly request (for instance [in TkDocs](https://tkdocs.com/tutorial/styles.html#using), -in [TIP #555](https://core.tcl-lang.org/tips/doc/trunk/tip/555.md), +in [TIP #555](https://core.tcl-lang.org/tips/doc/main/tip/555.md), or recently again in [comp.lang.tcl](https://groups.google.com/d/msg/comp.lang.tcl/5E9kGZ5wEHQ/74JAo7-bAwAJ)) that ttk introspection capabilities be improved. As it seems, the really missing bit is the ability to retrieve styles. @@ -57,11 +57,11 @@ TMenubutton TEntry TLabelframe Vertical.Sash TRadiobutton Heading TButton TNotebook.Tab Toolbutton Treeview ComboboxPopdownFrame TCombobox TProgressbar . TCheckbutton Tab TSpinbox Horizontal.Sash Sash
Then it becomes straightforward to get all layouts, as originally requested -in [TIP #555](https://core.tcl-lang.org/tips/doc/trunk/tip/555.md): +in [TIP #555](https://core.tcl-lang.org/tips/doc/main/tip/555.md):
     # get layout for each style
     foreach st [ttk::style theme styles] {
         if {[catch {ttk::style layout $st}]} {

Index: tip/586.md
==================================================================
--- tip/586.md
+++ tip/586.md
@@ -1,15 +1,19 @@
 # TIP 586: C String Parsing Support for binary scan
 	Author:         Christian Werner 
-	State:          Draft
+	State:          Final
 	Type:           Project
-	Vote:           In progress
+	Vote:           Done
 	Created:        18-Sep-2020
 	Post-History:
 	Keywords:       binary
 	Tcl-Version:    8.7
 	Tcl-Branch:     tip-586-binary-scan-c-string
+	Vote-Summary:   Accepted 6/0/0
+	Votes-For:      DKF, FV, JN, KBK, KW, SL
+	Votes-Against:  none
+	Votes-Present:  none
 -----
 
 # Abstract
 
 This TIP proposes to add another scan rule to the `binary scan` command in order to be able to deal with NUL terminated C strings.

Index: tip/588.md
==================================================================
--- tip/588.md
+++ tip/588.md
@@ -1,15 +1,19 @@
 # TIP 588: Unicode for (X11) keysyms
 	Author:         Jan Nijtmans 
-	State:          Draft
+	State:          Final
 	Type:           Project
-	Vote:           In progress
+	Vote:           Done
 	Created:        23-Oct-2020
 	Post-History:
 	Keywords:       X11
 	Tcl-Version:    8.7
 	Tk-Branch:	keysym-unicode
+	Vote-Summary:   Accepted 6/0/0
+	Votes-For:      DKF, FV, JN, KBK, KW, SL
+	Votes-Against:  none
+	Votes-Present:  none
 -----
 
 # Abstract
 
 This TIP proposes to allow Unicode characters in X11 keysyms.

Index: tip/590.md
==================================================================
--- tip/590.md
+++ tip/590.md
@@ -1,20 +1,24 @@
 # TIP 590: Recommend lowercase Package Names
 	Author:         Jan Nijtmans 
-	State:          Draft
+	State:          Final
 	Type:           Project
-	Vote:           Pending
+	Vote:           Done
 	Created:        4-Nov-2020
 	Post-History:
 	Keywords:       package
 	Tcl-Version:    8.7
 	Tcl-Branch:	tip-590
+	Vote-Summary:	Accepted 3/0/2
+	Votes-For:	JN, KW, MC
+	Votes-Against:	none
+	Votes-Present:	FV, SL
 -----
 
 # Abstract
 
-This TIP proposes to rename some package name to lowercase, and
+This TIP proposes to rename some package names to lowercase, and
 recommend lowercase packagenames.
 
 # Rationale
 
 Let's run the "package names" command. Possible outcome:
@@ -29,11 +33,11 @@
 are distributed as tm modules (http, msgcat, platform), some
 are in the battery-included Tcl distribution (Thread, Ttrace, sqlite3).
 
 Further on, on Windows there are 2 packages which' entry points
 symbols cannot be guessed. The reason is their filenames: "tcldde14.dll"
-resp. "tclreg13.dll", while their package names are "dde" resp. registry"
+resp. "tclreg13.dll", while their package names are "dde" resp. "registry"
 
 # Specification
 
 * In order to bring some consistency in package names, this
 TIP proposes to rename some packages. The old package names

Index: tip/591.md
==================================================================
--- tip/591.md
+++ tip/591.md
@@ -1,13 +1,18 @@
-# TIP 591: Rotate ttk::notebook window wtih mousewheel on tab
+# TIP 591: Rotate ttk::notebook window with mousewheel on tab
 	Author:         Harald Oehlmann 
-	State:          Draft
+	State:          Final
 	Type:           Project
-	Vote:           Pending
+	Vote:           Done
 	Created:        13-Nov-2020
 	Keywords:       Tk, bindings
 	Tcl-Version:    8.7
+	Tk-Branch:      tip-591
+	Vote-Summary:	Accepted 5/0/0
+	Votes-For:	JN, FV, KW, MC, SL
+	Votes-Against:	none
+	Votes-Present:	none
 -----
 
 # Abstract
 
 It is proposed that each mouse wheel tick executed on a notebook tab area will show the previous or next window.
@@ -16,10 +21,14 @@
 
 If the mouse pointer is over the tab area of a ttk::notepad:
 
    *   Moving the mousewheel down will activate the previous tab.
    *   Moving the mousewheel up will activate the next tab.
+
+This should happen for vertical and horizontal mousewheel operation, like in the scrollbar.
+The horizontal mousewheel is bound to Shift-Mousewheel.
+Some special mices invoke this bining directly by a tiltable scrollwheel.
 
 # Rationale
 
 I have seen that somewhere and I find it very handy. Try it out:
 
@@ -30,11 +39,11 @@
     ttk::label .n.$index -text "Page $index"
     .n add .n.$index -text "tab $index"
 }
 
-This works for me on Tk8.6.10 on Windows. +This works for me on Tk 8.6.10 on Windows. For me, this is very handy and intuitive. # Reference Implementation @@ -43,9 +52,11 @@
 ttk::bindMouseWheel TNotebook { ttk::notebook::CycleTab %W }
 
which activates this functionality. + +There is a Tk branch, `tip591`, including this functionality. # Copyright This document has been placed in the public domain. ADDED tip/592.md Index: tip/592.md ================================================================== --- /dev/null +++ tip/592.md @@ -0,0 +1,60 @@ +# TIP 592: Stop support for Windows XP, Server 2003, Vista, Server 2008 + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 12-Dec-2020 + Post-History: + Tcl-Version: 8.7 + Tcl-Branch: tip-592 + Vote-Summary: Accepted 6/0/0 + Votes-For: FV, JN, KW, KK, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +TIP 487, which proposed dropping support for versions of Windows prior to +Windows XP, has already been accepted for Tcl 8.7. This TIP proposes +dropping the following additional Windows versions based on Microsoft +EOL'ing these years ago and negligible current market presence. + +* Windows XP (V5.1) +* Windows Server 2003 (V5.1) +* Windows Vista (V6.0) +* Windows Server 2008 (V6.0) (not to be confused with Server 2008 R2 which + shares the ABI with Windows 7 and will continue to be supported) + +This TIP is intended to apply to both Tcl and Tk. + +# Motivation + +Three years have passed since TIP 487 was proposed and accepted. In that +time, market share of the Windows XP, Windows Server 2003 and Vista has +dropped to well below 1% each and likely to plunge further by the time 8.7 +releases. Windows Server 2008 statistics are not easily available but has +also been EOL'ed and mostly supplanted by Server 2008 R2 which will continue +to be supported. Furthermore, those systems are legacy systems and very +unlikely to be upgraded to Tcl 8.7 even if they run Tcl at all. + +Dropping support for older systems reduces the need for numerous API checks and +the testing burden. In addition, it will allow the use of +new APIs related to I/O, synchronization, threading etc. introduced in +Windows 7. + +# Tool chain implications + +Use of Windows 7 API also requires support from compiler tool chains. +In particular, with respect to Microsoft compilers, Tcl 8.7 will require +Visual Studio 2015 or later. The Mingw(-w64) gcc tool chain continues to be supported. + +# Implementation + +Use of newer API's will automatically prevent their loading into old Windows +versions. If desired, checks can also be added through the executable +manifest and/or explicit version checks in the code at runtime. + +# Copyright + +This document has been placed in the public domain. ADDED tip/593.md Index: tip/593.md ================================================================== --- /dev/null +++ tip/593.md @@ -0,0 +1,75 @@ +# TIP 593: Efficient List Item Existence-Test-and-Take + Author: Donal Fellows + State: Draft + Type: Project + Vote: Pending + Created: 31-Dec-2020 + Post-History: + Keywords: Tcl, lists + Tcl-Version: 8.7 + Obsoleted-By: 631 +----- + +# Abstract + +This TIP proposes a command that does part (handling lists) of the more +general programme proposed by [TIP #513](513.md). + +# Rationale + +[TIP #513](513.md) covers the general rationale for having fused operations +for testing for the presence of an item and removing that item as a single +operation. However, the concrete API proposed by that TIP is somewhat complex; +this TIP proposes a simplified version for the list case (other TIPs will have +to handle arrays and dictionaries). + +# Specification + +The `ltake` command should take three or more arguments: + + > **ltake** _listVarName_ _elemVarName_ _index_ ?_index_ ...? + +The _listVarName_ argument should be the name of a variable containing a Tcl +list, the _elemVarName_ should be the name of a variable that may have an +element of the list transferred into it, and the _index_ argument (or +arguments) should indicate a particular location in the list to take the +element from. The result of the command is a boolean; true if the element +existed (and was transferred), false otherwise. The use of multiple _index_ +arguments will be the same as in **lindex** and **lset**. + +Note that if the index path leads into a non-list or off the end of a list, +the command does not error (those are cases that result in a false result), +but if either _listVarName_ or _elemVarName_ cannot be written to, the command +will error. (Conceptually, _listVarName_ will have the updated list written +back to it after the extracted element is written to _elemVarName_; using the +same variable name in both places is unlikely to be desired.) + +Code that uses this command may expect that taking from the `end` index will +be implemented in (typically) constant time, effectively acting as a kind of +"lpop". Removing from other indices (especially including `0`) may be slower +due to the rearrangement of the list contents. + +# Example + +For example: + +``` +set lv {a b c d e} +while {[ltake lv ev 2]} { + puts "TAKEN: $ev" +} +puts "LEFT: $lv" +``` + +will print: + +``` +TAKEN: c +TAKEN: d +TAKEN: e +LEFT: a b +``` + +# Copyright + +This document is placed in public domain. ADDED tip/594.md Index: tip/594.md ================================================================== --- /dev/null +++ tip/594.md @@ -0,0 +1,84 @@ +# TIP 594: Modernize "file stat" interface + Author: Emiliano Gavilán + Author: aspect + State: Final + Type: Project + Vote: Done + Created: 13-Jan-2021 + Post-History: + Keywords: Tcl, file + Tcl-Version: 8.7 + Tcl-Branch: tip-594 + Vote-Summary Accepted 4/0/2 + Votes-For: FV, JN, KBK, SL + Votes-Against: none + Votes-Present: DGP, MC +----- + +# Abstract + +This TIP proposes extending the `file stat` and `file lstat` commands to return +a dictionary if no `varName` argument is provided. + +# Rationale + +The result of `file stat` is traditionally stored in an array named by its +second argument. Now that dicts are available, a more ergonomic alternative is +to simply return a value that the caller can process with the `dict` command, +pass to other procs or return as a result. The original usage is preserved by +making the `varName` argument optional. + + +# Specification + +The `file stat` and `file lstat` commands are both changed in exactly the same +way. Using `file stat` as an example, its signature is changed from: + + file stat name varName + +to: + + file stat name ?varName? + +With two arguments, it behaves exactly like before. With only one argument: + +* errors are reported exactly as they would be if `varName` was provided +* if no error occurs, the result is returned as a dict instead of by populating + an array + +Previously, calling `file stat` with only one argument would raise a +{`TCL WRONGARGS`} error. + +# Example + +Old (and preserved) usage: + + % file stat / st + % parray st + st(atime) = 1610459586 + st(blksize) = 4096 + st(blocks) = 8 + st(ctime) = 1605692955 + st(dev) = 64769 + st(gid) = 0 + st(ino) = 2 + st(mode) = 16749 + st(mtime) = 1605692955 + st(nlink) = 18 + st(size) = 4096 + st(type) = directory + st(uid) = 0 + +New usage: + + % file stat / + type directory size 4096 mtime 1605692955 ino 2 dev 64769 atime 1610459586 uid 0 ctime 1605692955 nlink 18 gid 0 blksize 4096 mode 16749 blocks 8 + +# Implementation + +The ticket [modernize "file stat" interface](https://core.tcl-lang.org/tcl/tktview?name=560c5e438c47f5fdd34846dbb333ab96cb905416) includes a patch by Emiliano Galivan. This patch includes an update to the manual, a new test `cmdAH-28.14` and changes two existing tests to accomodate the new interface (`cmdAH-28.1` and `cmdAH-28.2`). + + +# Copyright + +This document is placed in public domain. ADDED tip/595.md Index: tip/595.md ================================================================== --- /dev/null +++ tip/595.md @@ -0,0 +1,101 @@ +# TIP 595: Unicode-aware/case-sensitive Loadable Library handling + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Tcl-Version: 9.0 + Tcl-Branch: bug-ea39ab591e + Vote-Summary: Accepted 7/0/1 + Votes-For: AK, DP, JN, KW, KK, MC, SL + Votes-Against: none + Votes-Present: FV +----- +# Abstract + +The "load" command, and its supporting C API is quite misleading. For example +the 3th argument of "load" is case-insensitive: It is converted to Titlecase, +(ASCII-only), then `_Init` is attached to it, then the C-function in the +shared library with this name is called. No package handling is done, +still the 3th argument of "load" is called "packageName". + +See also bug report [ea39ab591e](https://core.tcl-lang.org/tcl/info/ea39ab591e): +Tcl_StaticPackage allows case sensitvity; [load] prevents it which +describes in better wordings what's wrong. + +This TIP proposes to get rid of the case-insensitivity of the "load" +command, except in the guessing of the `prefix` from the filename. +In order to distinguish libraries from packages (libraries are +available globally while package are per interpreter), a number +of renamings will be done. + +# Specification + +In Tcl 8.7, rename `Tcl_StaticPackage` to `Tcl_StaticLibrary`, +`Tcl_PackageInitProc` to `Tcl_LibraryInitProc` and `Tcl_PackageUnloadProc` +to `Tcl_LibraryUnloadProc`. Also add the following defines in `tcl.h`: +
+    #define Tcl\_PackageInitProc Tcl\_LibraryInitProc
+    #define Tcl\_PackageUnloadProc Tcl\_LibraryUnloadProc
+    #define Tcl\_StaticPackage Tcl\_StaticLibrary
+
+This way, the new names of the functions already can be used +in Tcl 8.7, but the functionality stays the same. Hopefully +those new names make it clear that those functions take +part in the `load` mechanism, not the `package` mechanism. + +In Tcl 9.0, if the "load" command's 3th parameter is missing, +this parameter is guessed from the filename. Starting with +Tcl 9.0, a Unicode Titlecase will be used, not a ASCII one. +The full algorithm becomes: + + * If the filename starts with `lib`, strip it. + * If the filename then starts with `tcl9`, strip it. + * Take the characters following that, up to (but not including) the + first character which is a (Unicode) digit or not a (Unicode) word. + * Convert those characters to (Unicode) Titlecase. + * The result will be the guessed `prefix` parameter. + +This is almost the same as the Tcl 8.x algorithm, the enhancement is that +the characters used in the filename are no longer limited to ASCII. For +example, a shared library `libπ.so` will result in a prefix `Π`, so the +initialization function `Π_Init()` will be called when loading this file. + +When using Tcl 9.0, the following existing library names will be changed: + + * `tcldde14.dll` -> `tcl9dde14.dll` + * `tclregistry13.dll` -> `tcl9registry13.dll` + * `tk87.dll` -> `tcl9tk87.dll` (on Windows) + * `libtk8.7.so` -> `libtcl9tk8.7.so` (on UNIX) + +This makes it possible to install Tk 8.7 in the same +directory when compiled for Tcl 8.7 resp 9.0. Since +the filename is different, the pkgIndex.tcl file can +load the correct Tk library no matter Tcl 8.7 or 9.0 +is doing the call. (Of course, Tk 8.7 needs to be +compiled twice then, once with Tcl 8.7 headers, once +with Tcl 9.0 headers) + +# Implementation + +Implementation is in Tcl (and Tk) branch bug-ea39ab591e. + +# Compatibility + +This is not compatible with Tcl 8.x, but there is a simple way to +make code compatible with both Tcl 8.x and 9.0: Just replace +all "load" invocations: + + * `load ??` + +by + + * `load [string totitle ] ??` + +. + +Of course, if the 3th argument of `load` already is in Titlecase +(it usually is) nothing needs to be done. + +# Copyright + +This document has been placed in the public domain. ADDED tip/596.md Index: tip/596.md ================================================================== --- /dev/null +++ tip/596.md @@ -0,0 +1,122 @@ +# TIP 596: Stubs support for Embedding Tcl in other applications + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Tcl-Version: 9.0 + Tcl-Branch: rfe-854941 + Vote-Summary: Accepted 5/0/0 + Votes-For: BG, JN, KBK, KW, MC + Votes-Against: none + Votes-Present: none +----- +# Abstract + +The Stubs mechanism was originally written to be able to extend Tcl with +binary extensions, without the extensions depending on a specific Tcl +version. But what if Tcl is being embedded inside another application? +The Stub mechanism was never designed for that. + +David Gravereaux wrote a [RFE](https://core.tcl-lang.org/tcl/info/854941) +long ago (december 2003), touching on the problems arising. And Shannon Noe +wrote [TIP #531](531.md) which also was inspired on the same problem. + +This TIP enhances Tcl 9.0 with no new API, but internal modifications, +such that embedding Tcl in other applications using the Stub mechanism +is finally possible without the described problems. It follows David +Gravereaux's outline, providing new wrapper functions in the stub library +(`libtclstub9.0.a` / `tclstub90.lib`) which are able to +locate, load and initialized the Tcl 9.0 shared library (`libtcl9.0.so` +/ `tcl90.dll`), just assuming it is somewhere on the PATH or in <prefix>/lib. +No new functions are added to the API, only existing functions which +previously only worked for extensions are now made +suitable to be used for Embedding applications as well. + +Tcl 8.7 is enhanced with a new API: the function `Tcl_SetPreInitScript()`, +which is nothing more than the renamed internal function `TclSetPreInitScript()`. +It will not be exposed through the stub table. + +# Specification + +The following 4 functions are added to the Tcl Stub library. Their +actual name in the stub library is different, in order to prevent +symbol conflicts, but they function under the following names: + +* `const char *Tcl_InitSubsystems(...)` +* `const char *Tcl_SetPanicProc(...)` +* `const char *Tcl_FindExecutable(...)` +* `const char *TclZipfs_AppHook(...)` + +Any application which wants to embed Tcl only needs to call one (or more) of +those 4 functions first. If the application is compiled with `-DUSE_TCL_STUBS`, +a wrapper function is used in stead which loads the Tcl 9.0 core, initializes +it, initializes a stub table in the embedder application, and then +runs the corresponding function in the Tcl core. After that, the +embedding application can call any other functions from the Tcl API +through the stub table, everything further is fully transparent. + +An example Embedding "Hello World" application: +
+\#define USE\_TCL\_STUBS
+\#include <tcl.h>
+\#include <stdio.h>
+int main(int argc, char **argv) {
+    const char \*version = Tcl\_InitSubsystems(); /\* Load/Initialize the Tcl core \*/
+    if (version == NULL) {printf("Cannot find the Tcl core\\n"); return 1;}
+    Tcl\_Interp *interp = Tcl\_CreateInterp();
+    Tcl\_Eval(interp, "puts stdout {Hello World}");
+    Tcl\_DeleteInterp(interp);
+    return 0;
+}
+
+ +Compile this example application, and link it to the Tcl stub library, that's +all. + +Which of the 4 functions the embedder application calls first, depends on +what details are needed for the initialization. `Tcl_InitSubsystems()` +just initializes the minimum possible. `Tcl_SetPanicProc()` +can be used if the embedder application provides its own panicproc. `Tcl_FindExecutable()` +is needed when the interpreter needs access to `info nameofexecutable`. +`TclZipfs_AppHook()` is needed if the embedder application has a zip file +attached which needs to be mounted to be made available to the Tcl +interpreter. Multiple such calls can be done, if desired: the first +call will load the Tcl core, succeeding calls don't do that again. + +The signatures of the 4 initialization functions change: All +functions return a `const char *` now, which will return NULL if +locating the Tcl core fails. The functions return the full Tcl version +number if the initialization succeeds. This can be used to check if +the Tcl version is actually the expected one. + +There are 5 more functions exposed through the stub library this way, +but which are _not_ capable of initializing the stub table. They +can be called from the embedder application after the Tcl core +has already been loaded and initialized. These are: + +* `Tcl_MainEx()`/`Tcl_MainExW()` (in order to make `Tcl_Main()` function as-is) +* `Tcl_StaticLibrary()` +* `Tcl_SetExitProc()` +* `Tcl_GetMemoryInfo()` +* `Tcl_SetPreInitScript()` + +They need special treatment because those functions are not exposed through +the stub table. The only way to handle those is to search for the +correct symbol in the Tcl shared library, and call it directly. + +Since Tcl 9.0 is the only version in development after 8.7, there is no +mechanism yet to prefer Tcl 9.1 over 9.0, or make another selection +on exactly which Tcl version is desired. That exercise is left for +the future, when the development of Tcl 9.1 starts. + +# Implementation + +Implementation is in Tcl branch rfe-854941. + +# Compatibility + +This is 100% upwards compatible with Tcl 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/597.md Index: tip/597.md ================================================================== --- /dev/null +++ tip/597.md @@ -0,0 +1,145 @@ +# TIP 597: "string is unicode" and better utf-8/utf-16/cesu-8 encodings + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Tcl-Version: 8.7 + Tcl-Branch: tip-597 + Vote-Summary: Accepted 3/0/0 + Votes-For: DGP, JN, MC + Votes-Against: none + Votes-Present: none +----- +# Abstract + +Currently, there is a discussion going on, about making Tcl more +conform to the Unicode specification. Internally, Tcl allows +to use Unicode codepoints which are not allowed to be exported +to other applications, which makes Tcl non-conformant. +[TIP #573](https://core.tcl-lang.org/tips/doc/trunk/tip/573.md) +was an attempt to solve this by forbidding the use of surrogates. + +This TIP provides another approach. We can allow all characters +internally, but modify the "utf-8"/"utf-16" encoders such that any surrogate +or noncharacter (as defined by the Unicode standard) is replaced +by the replacement character U+FFFD. + +Further on, there is a new "cesu-8" encoding. + +Finally "string bytelength" will be deprecated in Tcl 8.7 and +fully removed in Tcl 9.0. The new encodings can be used to +create a good replacement for this command. + +# Specification + +Introduce a new command + +* `string is unicode` + +This command will return 1 if the string does not contain +any character from the following set: + +* 2048 surrogates (U+D800 - U+DFFF) +* 66 noncharacters (U+??FFFE - U+??FFFF and U+FDD0 - U+FDEF) + +Contrary to other `string is` commands, which adapt to the +evolving Unicode standard, `string is unicode` will not +change any more in future standards. This command cannot be used to +check if a Unicode character is defined for a code point in the +current Unicode standard. If the codepoint is available for a +possible future assignment, `string is unicode` will return 1. + +The `string is unicode` command can be used to check if the +"utf-8"/"utf-16" encodings would deliver valid output, e.g. +
+if {[string is unicode $text]} {
+    set f [open somefile.txt]
+    fconfigure $f -encoding binary
+    puts $f [encoding convertto utf-16 $text]
+} else {
+    puts stderr "Cannot write to file: non-conformant utf-16"
+}
+
+The `encoding converto` command currently has no other way +to indicate encoding errors. + +The problem with surrogates is that in the UTF-16 encoding there +is no way to distinguish a surrogate-pair from a character > U+FFFF. +Therefore the surrogate code-points (U+D800 - U+DFFF) are not +allowed in UTF-8. When other applications receive such non-conformant +UTF-8, behavior is undefined. + +For a similar reason, noncharacters are problematic in UTF-16. Since +U+FEFF is the BOM (Byte order Mark), allowing U+FFFE as possible value +means we can no longer distinguish little-endian UTF-16 files from +big-endian. And the U+FFFF pattern (short -1) is used very often in +binary files, so allowing U+FFFF in UTF-16 makes it more difficult to +distinguish binary files from UTF-16 text (the NULL-byte cannot be used +for that, because it is allowed - and frequent - in UTF-16). +That's why the last two characters in each plane (U+??FFFE - U+??FFFF) +are defined as unicode "noncharacters". + +Introduce a new API: + +* `int Tcl_UniCharIsUnicode(int character)` + +This function returns 1 if `character` is between 0x0000 and +0x10FFFE, and it is not a surrogate and not a noncharacter. + +Introduce new "utf-8"/"utf-16" encodings. When converting from +internal utf-8 to external utf-8/utf-16, any character for which +`string is unicode` returns 0 will be produce the replacement +character U+FFFD (bytes \\xEF \\xBF \\xBD). When converting from +external utf-8/utf16 to internal utf-8, nothing changes: The new +utf-8/utf-16 decoders are forgiving for surrogates and noncharacters, +they can continue to be processed by Tcl as-is. + +Introduce a new "cesu-8" encoding. It's the same as "utf-8", only +characters > U+FFFF will be output as a 6-byte sequence in stead of +a 4-byte sequence, and the surrogate/noncharacter codepoints +are considered conformant. See: [CESU-8](https://en.wikipedia.org/wiki/CESU-8) + +The new encoders all implement the flag TCL_ENCODING_STOPONERROR +(which is not accessible at script level). When this flag is set, +the encoder/decoder will stop processing when it encounters a +surrogate or noncharacter or some other problem (e.g. overlong +byte sequences or missing continuation bytes) + +Finally, deprecate the "string bytelength" command. It can be +replaced by "string length [encoding convertto utf-8]. In +Tcl 9, the "string bytelength" command will be removed. + +# Further enhancements + +At this moment, Tcl doesn't have access to the TCL_ENCODING_STOPONERROR +flag at script level. Work is ongoing (in the "encodings-with-flags" +branch) to change that. This can be used to let the "utf-8" encoder +automatically stop processing when it encounters a surrogate or +noncharacter, in stead of producing \\xEF \\xBF \\xBD (as proposed in this TIP). +Since this change brings more complications, it is left out of +scope for this TIP. But it would (IMHO) be a very useful addition. + +# Rejected alternatives + +The "wtf-8"/"wtf-16" and "tcl-8" encodings, proposed earlier, are +considered inappropriate. Exposing them would expose too much internal +Tcl implementation at script level, which then cannot be changed any more +in future Tcl versions. They potentially harm more than they benefit. + +# Implementation + +Implementation is in Tcl branch tip-597 + +# Compatibility + +Since Tcl 8.6's "utf-8"/"utf-16" encoders can produce non-conformant utf-8/utf-16, +and the new "utf-8"/"utf-16" encoders cannot any more, this introduces a +**potential incompatibility** for applications which - illegally - +export non-conformant utf-8/utf-16. Applications which - willingly - want to +violate the Unicode standard can now use the "cesu-8" or "ucs-2" +encoders in stead. The "utf-8"/"utf-16" decoders are unchanged, so +Tcl can continue to handle non-conformant utf-8/utf-16 from other applications. + +# Copyright + +This document has been placed in the public domain. ADDED tip/598.md Index: tip/598.md ================================================================== --- /dev/null +++ tip/598.md @@ -0,0 +1,41 @@ +# TIP 598: export TclWinConvertError + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Tcl-Version: 8.7 + Tcl-Branch: rfe-800716 + Vote-Summary: Accepted 3/0/5 + Votes-For: JN, KW, KK + Votes-Against: none + Votes-Present: AK, DP, FV, MC, SL +----- +# Abstract + +This TIP proposes to export the current win32-specific +functions `TclWinConvertError()` and `TclWinConvertWSAError()` +under the new name `Tcl_WinConvertError()`. + +# Specification + +Introduce a new win32-specific API: + +* `void Tcl_WinConvertError(unsigned errCode)` + +This function can handle both normal win32 errors +and WSA errors, so it's a full replacement +for both `TclWinConvertError()` and `TclWinConvertWSAError()` + +See also [rfe #800716](https://core.tcl-lang.org/tcl/info/800716) + +# Implementation + +Implementation is in Tcl branch rfe-800716 + +# Compatibility + +This is 100% upwards compatible with Tcl 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/599.md Index: tip/599.md ================================================================== --- /dev/null +++ tip/599.md @@ -0,0 +1,188 @@ +# TIP 599: Extended build information + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Tcl-Version: 8.7 + Tcl-Branch: build-info + Vote-Summary Accepted 5/0/0 + Votes-For: BG, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- +# Abstract + +This TIP proposes new commands "tcl::build-info" +(and "tk::build-info", and the same for any extension wanting to do this) + +Example: +
+$ tclsh8.7
+% tcl::build-info
+8.7b1+4a8309fafe073cae4fb210cfcd37e6accd8e31e7558aefab3d7f2ad6a27540c2.clang-1200
+% tcl::build-info commit
+4a8309fafe073cae4fb210cfcd37e6accd8e31e7558aefab3d7f2ad6a27540c2
+% tcl::build-info compiler
+clang-1200
+% tcl::build-info version
+8.7a6
+% tcl::build-info patchlevel
+8.7a6
+
+$ tclsh9.0
+% tcl::build-info
+9.0b1+f896257cbcef7829503585ca26430bb097c8c33258a3785f7611bbc21c3ba080.gcc-1002
+
+\> tclsh87
+% tcl::build-info
+8.7b1+4a8309fafe073cae4fb210cfcd37e6accd8e31e7558aefab3d7f2ad6a27540c2.magicsplat.msvc-1916
+
+
+ +The build-info information consists of the version string, adding a '+' sign and some +crucial build information, to be used in Fossil bug reports. This way we can determine quickly +whether a 'static' build was used, whether a specific patched version (e.g. 'fedora', +which has a slightly different directory layout) was used, just by asking the +result of "tcl::build-info". + +Another goal for this TIP is to provide additional information to applications using +TIP #596: "Stubs support for Embedding Tcl in other applications". Such applications +can now query Tcl build options even before creating an interpreter. + +# Specification + +In Tcl 8.x, package versions consist of integers separated by dots or (as final one) 'a' or 'b'. +e.g.: + +* "1.2.6" +* "2.0a2" + +This TIP proposes the possibility to get additional build metadata, which MAY be denoted by +appending a plus sign and a series of dot separated identifiers immediately following the +version. Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. +Identifiers MUST NOT be empty. Build metadata MUST be ignored when determining version precedence. +Thus two versions that differ only in the build metadata, have the same precedence. Examples: + +* "1.2.6+tag1.tag2.tag3" +* "2.0a2+tag1.tag2.tag3" + +Note that this is exactly the same way as how ["Semanic Versioning"](https://semver.org/#spec-item-10) versions +can add optional build metadata, that's not a coincidence. There's no need for Tcl to invent +its own wheel. + +The Tcl build process is adapted to retrieve the commit-id from Fossil or GIT such that +it even survives a "make dist". So, if the Tcl source code was checked out from Fossil +or GIT and built, then `tcl::build-info` will contain the correct commit-id. If - +then - a "make dist" is used to create a tar.gz file, building Tcl from this +distribution will still show the same commit in `tcl::build-info`. At this moment, +only Fossil and GIT are supported, support for more VCS'es could be added in the future. + +In Tcl, we want to build an unique version string which tells us crucial information about +how Tcl (or Tk or ....) was built. Advantage: anyone submitting a bug report, we can ask +to type "tcl::build-info" and it will help being able to reproduce the bug. + +* The first identifier is always the Fossil commit-id. If the package doesn't come from fossil + but from GIT, it's "git-<commit-id>". This way we can always locate the exact commit which + was used as base from the build, even when building from a tarball which originated from Fossil or GIT. +* All other identifiers are sorted alphabetical. +* There are 4 (optional) predefined tags for the compiler used: + "clang-xxxx" + "gcc-xxxx" + "icc-xxxx" + "msvc-xxxx" + where "xxxx" is the version of the compiler (two digits for major and two digits for minor version). + More compilers will be added in the future, as desired. +* Then there is the following list of (optional) identifiers. Presence of such identifier indicates + that this is a non-standard build: the identifier string indicates what manner this + build is non-standard. Other packages than Tcl can use a subset of these possible identifiers, + but there is no obligation that all packages should implement all of them. + + | Identifier | Meaning | + |:-------:|:----------------:| + | `compiledebug` | Configured with "--enable-symbols=all", cflag `TCL_COMPILE_DEBUG` | + | `compilestats` | Configured with "--enable-symbols=all", cflag `TCL_COMPILE_STATS` | + | `cplusplus` | Compiled with a C++ compiler | + | `debug` | Configured with "--enable-symbols"| + | `ilp32` | Compiled as 32-bit (integers, longs and pointers are all 32-bit) | + | `memdebug` | Configured with "--enable-symbols=mem", cflag `TCL_MEM_DEBUG` | + | `nmake` | Built with "nmake" in stead of "make"| + | `no-deprecate` | Deprecated features are removed, cflag `TCL_NO_DEPRECATED` | + | `no-thread` | Compiled without support for threads | + | `no-optimize` | Compiler optimization has been switched off | + | `objective-c` | Compiled with an objective-c compiler | + | `objective-cplusplus` | Compiled with an objective-c++ compiler | + | `purify` | Compiled with purify information | + | `profile` | Compiled with profile information | + | `static` | Compiled as static library | + + More of those can be added in the future. + +* Anyone patching Tcl can add its own identifier, so it's clear that + Tcl is modified. E.g.: + + | Identifier | Meaning | + |:-------:|:----------------:| + | `activestate` | "Activestate" patches are applied | + | `apple` | "apple" patches are applied | + | `androwish`| "androwish" patches are applied | + | `bawt` | "BAWT" patches are applied | + | `bsd` | "BSD" patches are applied | + | `cygwin` | "Cygwin" patches are applied | + | `debian` | "Debian" patches are applied | + | `fedora` | "Fedora" patches are applied | + | `freebsd` | "FreeBSD" patches are applied | + | `microsoft` | "Microsoft" patches are applied | + | `magicsplat` | "Magicsplat" patches are applied | + | `openbsd` | "OpenBSD" patches are applied | + | `redhat` | "Redhat" patches are applied | + | `ubuntu` | "Ubuntu" patches are applied | + + (just examples, you can invent your own). Binary distributions can patch Tcl + adding their own identifier, even if it's only for 'branding'. There + could be multiple ones (e.g. "ubuntu" could decide to use the "debian" + patches as well) + +* Calling `tcl::build-info ` will return `1` if the identifier is + present in the build-info, `0` if not. But there are 4 pseudo-identifiers: + + | Identifier | Meaning | + |:-------:|:----------------:| + | `commit` | Returns the commit-id from Fossil (or GIT) | + | `compiler` | Returns the identifier identifying the compiler used | + | `patchlevel`| Returns the patchlevel | + | `version` | Returns the version | + +* The functions `Tcl_FindExecutable`, `Tcl_InitSubsystems`, `Tcl_SetPanicProc` and + `TclZipfs_AppHook` are modified to return the build-info string as described in this + TIP. Those functions are meant to be used during Tcl initialization, which allows + to double-check for presence or absence of certain identifiers as needed by the + application (e.g. signaling "no-thread" when thread-support is missing). + +* Deprecate the array elements tcl_platform[threaded] and tcl_platform[debug]. + In Tcl 9.0 those will be gone. + +* Deprecate the following "tcl::pkgconfig" keys: `debug`, `threaded`, `profiled`, + `64bit`, `optimized`, `mem_debug`, `compile_stats`. In Tcl 9.0 those will be gone. + +# Discussion + +It has been suggested to put additional keys in tcl::pkgconfig. But tcl::pkgconfig +does not only contain build information, it also contains installation configuration +information (like "bindir,runtime") which is not useful in a build-info string. Also +it would prevent the build-info string to be usable in `Tcl_InitSubsystems()` and +friends (TIP #596), before any Tcl interpreter is created. + +An earlier implementation combined this approach with the "package" mechanism, +but this was rejected. + +# Implementation + +Implementation is in Tcl branch "build-info" + +# Compatibility + +This is 100% upwards compatible with Tcl 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/600.md Index: tip/600.md ================================================================== --- /dev/null +++ tip/600.md @@ -0,0 +1,261 @@ +# TIP 600: Migration guide for Tcl 8.6/8.7/9.0 + Author: Jan Nijtmans + State: Draft + Type: Informative + Vote: No voting +----- +# Abstract + +This document explains how strings are represented in Tcl 8.6 resp. 8.7 (and 9.0), and how +that affects the Tcl language. When migrating Tcl scripts from 8.6 to 8.7 (or 9.0), some +commands slightly change behavior. + +This migration guide is based on TIP's [#389](https://core.tcl-lang.org/tips/doc/trunk/tip/389.md), +[#497](https://core.tcl-lang.org/tips/doc/trunk/tip/497.md), +[#542](https://core.tcl-lang.org/tips/doc/trunk/tip/542.md), +[#619](https://core.tcl-lang.org/tips/doc/trunk/tip/619.md) ... + +This TIP is not separately voted on. It will be finalized after Tcl 9.0 is officially released. + +# Dual value representation in Tcl. + +Tcl strings can internally be represented in two (or three) ways, as a sequence of bytes or as +a "Unicode string" (a sequence of Tcl\_UniChar's). This internal representation +differs in the various Tcl versions: + +* Tcl 8.5, bytes: [UTF-8](https://en.wikipedia.org/wiki/UTF-8) (up to U+FFFF), string: [UCS-2](https://en.wikipedia.org/wiki/Universal_Coded_Character_Set) +* Tcl 8.6, bytes: [CESU-8](https://en.wikipedia.org/wiki/CESU-8), string: [UTF-16](https://en.wikipedia.org/wiki/UTF-16) +* Tcl 8.7, bytes: [WTF-8](https://simonsapin.github.io/wtf-8/), utf32string: [UTF-32](https://en.wikipedia.org/wiki/UTF-32), string: [UTF-16](https://en.wikipedia.org/wiki/UTF-16) +* Tcl 9.0, bytes: [WTF-8](https://simonsapin.github.io/wtf-8/), string: [UTF-32](https://en.wikipedia.org/wiki/UTF-32) + +The difference in behavior, comparing the different Tcl versions, can be explained by this +difference in internal representation of strings. + +Remark: Actually, Tcl uses a variation of [UTF-8](https://en.wikipedia.org/wiki/UTF-8)/[CESU-8](https://en.wikipedia.org/wiki/CESU-8)/[WTF-8](https://simonsapin.github.io/wtf-8/) +in which the NULL character is represented as two bytes `0xC0 0x80`. +This variation is known as [Modified UTF-8](https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8). Tcl uses the same +modification for [CESU-8](https://en.wikipedia.org/wiki/CESU-8) and [WTF-8](https://simonsapin.github.io/wtf-8/) as well. +Since this modification holds for all Tcl versions, it's not further handled in this document. + +Remark 2: Since utf-8 is the system encoding on most modern UNIX (and MacOS) systems, the examples below can only +be used on UNIX and MacOS, not when using tclsh interactive on Windows (for example). + +# encoding "utf-8" + +In Tcl 8.6, Emoji are represented internally as two codepoints. So +
+$ tclsh8.6
+% encoding convertfrom utf-8 \\xF0\\x9F\\xA4\\x9D
+🤝
+% string length [encoding convertfrom utf-8 \\xF0\\x9F\\xA4\\x9D]
+2
+
+ +Since Tcl 8.7/9.0 switches to UTF-32 for counting the string length: +
+$ tclsh8.7
+% encoding convertfrom utf-8 \xF0\x9F\xA4\x9D
+🤝
+% string length [encoding convertfrom utf-8 \\xF0\\x9F\\xA4\\x9D]
+1
+
+ +Tcl 8.5 (and also Tcl 8.6 earlier than 8.6.10) was not able to handle this +at all: +
+$ tclsh8.5
+% encoding convertfrom utf-8 \\xF0\\x9F\\xA4\\x9D
+🤝 (control characters \\x9F and \\x9D are not printable)
+% string length [encoding convertfrom utf-8 \\xF0\\x9F\\xA4\\x9D]
+4
+
+Any 4-byte utf-8 sequence was simply converted to those separate 4 bytes. +This made the use of Emoji practially impossible when using Tcl 8.6.9 or earlier. + +# escaping + +In Tcl 8.6, using a system encoding different from UTF-8, you cannot use +Emoji directly in scripts. The only portable way to use them is +the \\u???? construct: +
+$ tclsh8.6
+% puts \\uD83E\\uDD1D
+🤝
+% string length \\uD83E\\uDD1D
+2
+
+ +In Tcl 8.7 this is still supported: +
+$ tclsh8.7
+% puts \\uD83E\\uDD1D
+🤝
+% string length \\uD83E\\uDD1D
+1
+
+Note that this escape sequence appears to produce 2 symbols, a higher and +a lower surrogate. But surrogate pairs are non-conforming in WTF-8, so they are +joined into a single 4-byte sequence right from the start in Tcl8.7. + +In Tcl 9.0 it's not possible to do this any more: +
+$ tclsh9.0
+% puts \\uD83E\\uDD1D
+error writing "stdout": illegal byte sequence
+
+ +Better is to use the 🤝 character directly: +
+$ tclsh8.7
+% puts 🤝
+🤝
+% string length 🤝
+1
+
+ + +# string compare + +Since in Tcl 8.6, Emoji are represented internally as two codepoints: +
+$ tclsh8.6
+% string compare 🤝 豈
+-1
+
+But in Tcl 8.7 and 9.0: +
+$ tclsh8.7
+% string compare 🤝 豈
+1
+
+ +The reason for this is that 🤝 (U+1F91D) is internally represented as two code-points (U+D83E U+DD1D) while 豈 is +represented as a single code point (U+F900). The "string compare" simply compares all code points from left +to right, and concludes that 🤝 is smaller than 豈, which - in unicode sense - (U+1F91D > U+F900) is not +correct. This is corrected in Tcl 8.7 and 9.0. + +Conclusion: When Tcl8.6 strings contain both Emoji and characters between U+E000 and U+FFFF (mostly Private Use, +but also CJK Compatibility Ideographs, Alphabetic presentation forms, Arabic presentation forms, Variation selectors, +Vertical forms, Combining half-marks, CJK Compatibility forms, Small form variants, Halfwidth and Fullwith forms, Specials) +string comparison might not give what you expect. + +# string index / string length + +In Tcl 8.6: +
+$ tclsh8.6
+% string length 🤝
+2
+
+But in Tcl 8.7/9.0: +
+$ tclsh8.7
+% string length 🤝
+1
+
+ +Since the "string length" and the "string index" command are related, we cannot +change one without taking the other into account. Therefore, "string index" +behaves differently in the different Tcl version. For example: + +In Tcl 8.6 +
+$ tclsh8.6
+% string index 🤝🤡 0
+� (U+D83E)
+% string index 🤝🤡 1
+� (U+DD1D)
+
+In Tcl 8.7 +
+$ tclsh8.7
+% string index 🤝🤡 0
+🤝
+% string index 🤝🤡 1
+🤡
+
+ +This allows looping through the string using "string length" in +combination with "string index". + +In Tcl 8.7/9.0 all is OK: Since "string length 🤝" is 1, no special handling is +needed when indexing strings. + +# split + +Since Emoji are not supposed to be split into surrogates: +
+$ tclsh8.6 (at least 8.6.11)
+% split 🤝🤡 {}
+🤝 🤡
+
+ +Earlier Tcl versions (even up to 8.6.9): +
+$ tclsh8.5
+% split 🤝🤡 {}
+ð Ÿ ¤  ð Ÿ ¤ ¡
+
+ +In Tcl 8.6.10 it was partially fixed: +
+$ tclsh8.6
+% split 🤝🤡 {}
+� � � � (U+D83E U+DD1D U+D83E U+DD21)
+
+ +This means that - starting with Tcl 8.6.11 - "split" can be used to +iterate over a string, respecting correct border for Emoji. But it +could have unexpected effects. For example the "tcl-telegram" app +has the following function to convert a Tcl string to json form: +
+# Convert TCL string to proper JSON string
+proc jString {str} {
+	set result ""
+	# json::write does escaping for 8-bit characters and adds quotes, but doesn't handle unicode
+	set str [json::write string [subst -nocommands -novariables $str]]
+	# Convert everything non 8-bit to \\uXXXX sequences
+	foreach char [split $str {}] {
+		scan $char %c code
+		if {$code > 127} {
+			append result [format "\\\\u%04.4x" $code]
+		} else {
+			append result $char
+		}
+	}
+	return $result
+}
+
+ +Originally this function couldn't handle Emoji (since Tcl up to 8.6.9 couldn't). +In Tcl 8.6.10 it started working for Emoji (since json expects Emoji to +be converted to surrogate-pairs first). Starting with Tcl 8.6.11 it should (finally) be written as follows: + +
+# Convert TCL string to proper JSON string
+proc jString {str} {
+	set result ""
+	# json::write does escaping for 8-bit characters and adds quotes, but doesn't handle unicode
+	set str [json::write string [subst -nocommands -novariables $str]]
+	# Convert everything non 8-bit to \uXXXX sequences
+	foreach char [split $str {}] {
+		scan $char %c code
+		if {$code > 65535} {
+			# split $code into surrogates first
+			append result [format "\\u%04.4x\\u%04.4x" \
+				[expr {(($code-0x10000)>>10)+0xD800}] [expr {(($code-0x10000)&0x3FF)+0xDC00}]]
+		} elif {$code > 127} {
+			append result [format "\\u%04.4x" $code]
+		} else {
+			append result $char
+		}
+	}
+	return $result
+}
+
+ +This version works for Tcl 8.6.10 too, and it will continue to work for Tcl 8.7 and 9.0. + +# Copyright + +This document has been placed in the public domain. ADDED tip/601.md Index: tip/601.md ================================================================== --- /dev/null +++ tip/601.md @@ -0,0 +1,225 @@ +# TIP 601: Make "encoding convertto/convertfrom" throw exceptions + Author: Harald Oehlmann + Author: Jan Nijtmans + State: Withdrawn + Type: Project + Vote: Done + Tcl-Version: 9.0 + Tcl-Branch: encodings-with-flags + Vote-Summary Accepted 6/0/0 + Votes-For: FV, JD, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- +# Abstract + +This TIP proposes to change the behavior of `encoding convertto/convertfrom` +in Tcl 9.0, to start throwing an exception on any conversion error. +An additional option `-nocomplain` is proposed to restore the Tcl 8.x behavior. + +This TIP is withdrawm, in favor of TIP's [#656](656.md) and [#657](657.md) + +# Rationale + +The command `encoding convertfrom/convertto` currently does not raise any error on not convertible input. +Instead the following actions are observed: + + * A replacement character `?` is used. + * An incomplete multi-byte sequence is added verbatim. + +## Example 1: not encodable character + +The Polish character "L with bar" is not contained in ISO-latin 1: + + % set s \u0141 + Ł + % encoding convertto iso8859-1 $s + ? + +In the ISO-Latin 1 conversion, it is replaced by a question mark by the `encoding convertto` command. + +## Example 2: Incomplete sequence returns remaining value verbatim + +The following utf-8 sequence has an incomplete final sequence. +The second byte of the two byte sequence of the last character is missing. +The incomplete sequence is interpreted as ISO8859-1 and added to the string. + + % set s [encoding convertfrom utf-8 [string range [encoding convertto utf-8 ÄÖ] 0 end-1]] + ÄÃ + % scan $s %c%c + 196 195 + +The first character value 196 is the correct "Ä" character. +The second character is the verbatim byte of the incomplete utf-8 sequence: + + % scan [encoding convertto utf-8 Ö] %c%c + 195 150 + +## Use case 1: decode continuous multi-byte data + + +My personal use-case is a stream of UTF-8 data which is received by a USB character driver and the binary data is cut in 64 byte chunks. +The stream is continuous and I want to decode the received data. +If a UTF-8 byte is received partly, a false byte is created and the next chunk decoding does not work, as it starts with a part of a UTF-8 multibyte sequence. + +It would be great to know, where the error is to stop the sequence. + +Here is a code snipped with the current implementation: + + % catch {encoding convertfrom utf-8 [string range [encoding convertto utf-8 ÄÖ] 0 end-1]} e d + 1 + % set d + -code 1\ + -level 0 + -errorstack {INNER {invokeStk1 ::tcl::encoding::convertfrom utf-8 Ã\x84Ã}} + -errorcode {TCL ENCODING ILLEGALSEQUENCE 2} + -errorinfo {unexpected byte sequence starting at index 2: '\xC3' + while executing + "encoding convertfrom utf-8 [string range [encoding convertto utf-8 ÄÖ] 0 end-1]"} -errorline 1 + +Note: "\\0x84" was replaced for the control character "IND" for visibility in the stack trace + +Note: "C3" is the hexadecimal representation for decimal 195. +Thus, "\\xC3" is the first byte of the utf-8 representation of "Ö". + +With this info, the `-errorcode` may be catched by a `try` clause and the error byte location (2) may be catched (see discussion section for an example). +The data before may by passed again to `encoding convertfrom` which is the correct received data. + +Note: it would be efficient, if the already converted string may be returned also. +Then, the data must not be passed again to `encoding convertfrom`. +The current implementation does not fullfill this optimisation. + +## Use case 2: + +This use case is given in the following TCL ticket: +[Ticket 535705](https://core.tcl-lang.org/tcl/info/535705ffffffffff) : + +Wrong characters are included in a data base by character replacement when a character not in the current system encoding. +This causes issues in a multi-platform applications, as the error is not detected. + +# Specification + +## New Option +The `encoding` ensemble will be extended by a new option `-nocomplain`: + + encoding convertfrom ?-nocomplain? ?encoding? data + encoding convertto ?-nocomplain? ?encoding? data + +In Tcl 8.x, `-nocomplain` has no effect since those encoding subcommands +currently never throw an exception: Any invalid byte/character is replaced +(by **?** or **U+FFFD**). In Tcl 9.0, those subcommands start throwing and exception +on any conversion data error, `-nocomplain` restores the Tcl 8.x behavior. + +### Definition of "error position" +The position of the error in the source string is indicated in the error reporting. +In case of multi-byte source data, this position is always one byte after the last correct multi-byte sequence. + +###Error Message + +The error message is: "unexpected byte sequence starting at index *error position*: '*byte value*'", for `encoding convertfrom` +or "unexpected character at index *error position*: '*character value*'", for `encoding convertto` +where *error position* is a number containing the source string error position as defined above. + +*byte value*/*character value* is the hexadecimal representation of the byte in the source string where *error position* points to. + +### Error Code + +The error code is composed of the following 4 list elements: + +1. Fix word: `TCL` +2. Fix word: `ENCODING` +3. Fix word: `ILLEGALSEQUENCE` +4. Value *error position*: The index in the source string (usually a byte array, in case of `encoding convertfrom`) of the error position. + +## New C API + +Introduce 2 new functions: + +* `Tcl_Size Tcl_ExternalToUtfDStringEx(Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_DString *dsPtr)` +* `Tcl_Size Tcl_UtfToExternalDStringEx(Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_DString *dsPtr)` + +These functions behave the same as `Tcl_ExternalToUtfDString/Tcl_UtfToExternalDString`, only they have +an additional `flags` parameter accepting the following additional values (can be used in combination): + +* TCL_ENCODING_STOPONERROR: don't replace invalid characters/bytes but return the first error position. Default in Tcl 9.0. +* TCL_ENCODING_NOCOMPLAIN: replace invalid characters/bytes by a default fallback character. Always return `TCL_INDEX_NONE`. Default in Tcl 8.7. +* TCL_ENCODING_MODIFIED: convert NULL bytes to \\xC0\\x80 in stead of 0x00. Only meaningful for "utf-8" and "cesu-8", +ignored for other encodings. This flag may be used together with the other flags. + +The TCL_ENCODING_MODIFIED flag can be used in extensions for generating "modified" encodings, such as java +(which uses "modified" cesu-8 internally). This flag is not exposed at script level, unlike `-nocomplain`. + +The (already existing) TCL_ENCODING_STOPONERROR flag is only provided for legacy reasons. This flag will be meaningless +starting with Tcl 9.0, therefore will be deprecated in Tcl 9.0 and eventually removed in a future Tcl version (but not yet in 9.0). +In Tcl 9.0, TCL_ENCODING_STOPONERROR will be defined as value 0. + +The return value of these two functions is the error-position in case of an error reporting, or `TCL_INDEX_NONE` if everything is OK. + +# Discussion + +## Ticket 535705 + +This TIP started in the [TCL ticket 535705](https://core.tcl-lang.org/tcl/info/535705ffffffffff). +Please refer to this ticket for information about the initial discussion. + +## Error reporting design + +The list of categories for the error code return is given in the [tclvars manual page](http://www.tcl-lang.org/man/tcl8.7/TclCmd/tclvars.htm#M12). +The **TCL** category matches best. + +This design allows to catch this error and get the error position by the following `try` pattern: + + try { + set res [encoding convertto iso8859-1 $input] + } trap {TCL ENCODING ILLEGALSEQUENCE} {errorMessage errorDict} { + set errorIndex [lindex [dict get $errorDict -errorcode] 3] + ... + } + +# Rejected alternatives + +## Report the error character + +The original implementation reported the failing character/byte in the error message. +This may be a control character corrupting a terminal view. +IMHO error messages should be in the printable ASCII character set. +Therefore this was removed, the character/byte is now only reported in hexadecimal notation. + +## -nocomplain as boolean option + +An alternative would be to use `-nocomplain 1` in stead of `-nocomplain` and `-nocomplain 0` in stead of `-nocomplain`. +This only makes the command longer, without much benefit. + +## -stoponerror + +This option is the reverse of `-nocomplain`, but much less descriptive. In combination with `-nocomplain`, +it causes more confusion than that it helps. + +## EILSEQ POSIX error code + +Recent changes to TCL use the POSIX error **EILSEQ**: "invalid byte sequence", which looks like the most appropriate error message. +Nevertheless, the POSIX message does not allow to return the error position. + + +# Alternate solutions + +See [[607]](607.md), which is not actually an alternative, but was added later on top of this TIP. + +# Implementation + +Implementation is in Tcl branch `encodings-with-flags` + +The original implementation used `size_t` in the function signature, but after [[628]](628.md) this changed to `Tcl_Size`. + +# Compatibility + +The implementation is fully backward compatible for 8.7. +There is a compatibility break for TCL 9.0. + +# Credits + +Thanks to Jan Nijtmans for idea and implementation. + +# Copyright + +This document has been placed in the public domain. ADDED tip/602.md Index: tip/602.md ================================================================== --- /dev/null +++ tip/602.md @@ -0,0 +1,276 @@ +# TIP 602: Remove tilde expansion in file paths. + Author: Harald Oehlmann + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Tcl-Version: 9.0 + Tcl-Branch: tip-602 + Vote-Summary: Accepted 6/0/0 + Votes-For: AK, JN, KBK, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- + +* Abstract +* Rationale +* Specification + * Change in file path translation + * New command `file tildeexpand` + * New command `file home` +* Discussion +* Raised objections +* Implementation +* Change log +* Copyright + + + + +# Abstract + +Tcl 8 supports Unix shell-style tilde substitution. This TIP +removes this functionality in Tcl 9. + +# Rationale + +The Tcl 8 treatment of `~` and `~user` leading components in file paths +passed as arguments to file related commands is convenient for interactive +use. However, the resulting behavior is insecure and error-prone. + +Consider the naive attempt to clean out the `/tmp` directory. + +``` +cd /tmp +foreach f [glob *] {file delete -force $f} +``` + +A file `~` or `~user` maliciously placed in `/tmp` will have rather +unfortunate consequences. + +In addition to being a source of security issues as above, tilde substitution is +also inconvenient when writing robust file handling applications and packages. +Attempting to process Mercurial repositories in Tcl for example, will generate +unexpected errors. + +To avoid the above pitfall, all commands that operate on files, such as `open`, +`file` have to check for `~` and prefix with a `./` to disable tilde processing. +On the other hand, display to the user or matching against a user supplied +pattern requires the `./` be not present. Thus glob-like operations have +to account for both cases. + +Outside of the shells, this tilde expansion is not seen in any other +commonly used languages, even on Unix. Thus programmers coming from other +languages are not likely to be aware of the above pitfalls and the need +for cumbersome workarounds. + +Note this ambiguity in processing impacts use of utility packages as well, such +as the `fileutil` module in `tcllib`, making them unusable. + +Although possibly rare in the Unix world, tilde-prefixed files are not uncommon +on Windows systems. Examples include + +- Files within Mercurial SCM repository storage (perhaps even present on Unix) +- Files created by Excel prefixed as `~$` +- Directory under the Visual Studio installation of the form `~FC`, `~IC` etc. +- Files in the %TEMP% directory, not clear what application creates these. +- Font caches under AppData + +# Specification + +## Change in file path translation + +File paths will no longer be subject to tilde expansion in any commands. +They will treat `~` as any other character. This includes commands that +operate on files, like `open`, `exec`, `glob` as well as those operating +on file paths, like `file normalize`, `file tail`, `file basename` etc. + +The `file pathtype` command will return `relative` for tilde-prefixed paths. + +The `file split` command will not prefix a tilde-prefixed path component with +`./`. Conversely, `file join` will not strip a `./` prefix from an argument +starting with `./~`. + +There are a few exceptions where `~` expansion will take place for + +- Initialization of `auto_path` from the `TCLLIBPATH` environment variable +will do tilde expansion on each path. Any expansion that fails because +the user is unknown will not be included in `auto_path`. + +- Likewise, initialization of the Tcl module search paths from the +`TCL9_0_TM_PATH` (and similar) environment variables will undergo tilde +expansion. Again, any expansions that fail because of unknown user names +will be excluded. Note that the commands `tcl::tm::add` and `tcl::tm::roots` +will not themselves do any tilde expansion. + +- The initialization of the `tcl_pkgPath` variable will undergo tilde expansion +at start up time. This is necessitated by the MacOS configure's use to set +`TCL_PACKAGE_PATH` at build time. + +## New command `file tildeexpand` + +A new `file tildeexpand` command is added to alleviate compatibility issues and +help resolution of tilde-based paths present in configuration files etc.. +The command takes the form + +``` +file tildeexpand PATH +``` + +If `PATH` begins with the sequence `~` or `~USER` it is resolved relative to +the home directory of the current user or named `USER` respectively. If +`USER` is not a known user, an error is raised. If `PATH` does not begin with +a tilde, it is returned unmodified. + +In the case of `~`, the command returns the value of the `HOME` environment +variable. An error is raised if this does not exist. + +In the case of `~USER`, the command retrieves home directory of +the user by platform-dependent means (`TclpGetUserHome` to be precise). + +Both the above behaviors clone the 8.x resolution of tildes. + +The command makes no guarantees about form of the returned path such +as the separators. Other Tcl commands like `file normalize` etc. should be +invoked on the result if that is important. + +## New command `file home` + +The functionality of retrieving the home directory is exposed through +the new `file home` command. This takes the form + +``` +file home ?USER? +``` + +If the `USER` argument is not specified, it returns the value of the +`HOME` environment variable. An error is raised if this does not exist. +On Windows, any backslashes in the path are converted to forward slashes. + +If the `USER` argument is specified, it retrieves home directory of +the user by platform-dependent means (`TclpGetUserHome` to be precise). + +Both the above behaviors clone the 8.x resolution of tildes. + +Retrieval of home directories can also be achieved with the +`file tildeexpand` command so this command is not strictly necessary. +However, it is more intuitive to use on platforms where the use of tilde +for representing the home directory is not common. + +# Discussion + +The comp.lang.tcl thread titled "User does not exists when file name start +with ~" on 2021-05-06 had some relevant discussion. + +*From Don Porter* + +``` +This is a much deeper issue than either that draft TIP or the posts here have +uncovered. The VFS layer has a problem not only with paths beginning with `~`, +but with all paths that have a prefix that can be claimed by a mounted +Tcl_Filesystem. The same ./ prefixing has to be applied to workaround +implications of this unfortunate design. A related matter is that prefixes and +patterns that determine [file system] assignments are not accomplished by a +registration, but by a round-robin game of hot potato. The design flaws are +large and deep. A good solution is a pretty major rewrite. This isn't a quick +fix. + +Sometimes I think a good partial solution would be a rewrite that replaced all +the conditional branches that implement the `~` translation pervasively in the VFS +implementation, with a different strategy that made `~` translation available only +through a separately mounted Tcl\_Filesystem that claimed the path names +matching `~*`. In that revised strategy, more scripts and apps would have the +option of unmounting that Tcl_Filesystem to disable the feature. + +Some history and additional information in ticket + + + +and probably other tickets I cannot find quickly now. +``` + +Although Don points to a broader problem, I think the specific issue with `~` +can be selectively targeted relatively simply without a major rewrite. The +TIP addresses this. + +There is also a wiki page dedicated to this issue: + + + + +Steve Landers on the Tcler's chat suggested + +``` +On that basis I've been thinking about ways to warn people if their code relies +on ~ expansion. Something similar to what Apple do when they are in the process +of deprecating a feature. The idea isn't well developed but something like 9.0 +warns if ~ found in a path with a way to turn off the warning, 9.1 doesn't warn +with a way to turn on the warning. And perhaps only warn if necessary - i.e. +expand the path and if it is different from the unexpanded then warn. But not +sure if that's practical. +``` + +Sergey Brester on the core mailing list had suggested a per-command switch. +Nothing in the TIP precludes such a feature from being proposed in a +separate TIP. + +# Raised objections + +It has been voiced on the chat and mailing lists that this change will break +many scripts. There is no disputing that. However, the dangers and inconvenience +of the workarounds described earlier for current behavior outweigh these. In +principle, differences between handling of characters in pathnames between the +system (and C ABI) and the language should be minimized. The convenience of +translating `~` to the home directory should left to the specific application. +(As an aside, the use of `|` in `open` is another difference but the impact is +minimized because most modern file systems do not permit `|` in paths.) + +Another common objection is that this behavior is too engrained into Unix +programmers. However, be it noted that this behavior is only exhibited by the +Unix shell, and not even the individual utilities in Unix. Nor is it seen in the +system ABI, C runtime or other commonly used scripting languages like Python, +Ruby. Unix programmers do not seem to have a problem working with these so it is +unclear why it would only be a problem for Tcl. + +As pointed out on c.l.t., breakage is generally easy to spot and fix. To quote, + +``` +And, the ~ breakage appears in the first run of an old script in a +future v9 interpreter (file not found error) while the hidden latent +data dependent bug is just waiting to bite someday. +``` + +It is also the case that a grep through the sources will find most of the +locations that need to be fixed. + +An opposing view has been expressed on the core mailing list that most +occurences are not in sources but configuration files, environment variables, +user input and the like. The expansion of `TCLLIBPATH` and `TM` environment +variables has been added to partially mitigate this. Configuration and user +input will have to be dealt with using the `file tildeexpand` command. + +# Implementation + +The tip-602 branch contains an implementation for 9.0. + +The tip-602-87 branch will contain an implementation of the new command +(without removing implicit tilde expansion) for 8.7. + +# Change log + +(In reverse chronological order) + +- The initialization of `auto_path` and tm paths from environment variables +`TCLLIBPATH` etc. at start up will do tilde expansion. + +- The `file home` command has been replaced with the more general +`file tildeexpand` command. + +# Copyright + +This document has been placed in the public domain. + + + + + ADDED tip/603.md Index: tip/603.md ================================================================== --- /dev/null +++ tip/603.md @@ -0,0 +1,72 @@ +# TIP 603: Get 'stat' Information of Open Files + Author: Donal K. Fellows + State: Final + Type: Project + Vote: Done + Created: 19-Jun-2021 + Post-History: + Keywords: Tcl, file + Tcl-Version: 8.7 + Tcl-Branch: tip-603 + Vote-Summary: Accepted 5/1/1 + Votes-For: AK, DKF, JN, KBK, SL + Votes-Against: KW + Votes-Present: FV +----- + +# Abstract + +This TIP proposes adding the ability to get information such as is produced by +`file stat` for an open file. This has security advantages. + +# Rationale + +With symbolic links and the ability to make substantial changes to a directory +after a file in it is opened, it is necessary to sometimes be able to +determine exact file information about a file that has already been opened. +This has distinct security advantages (once you have a file opened, nobody can +truly take it away from you as you have a lock on the inode or equivalent). +POSIX systems handle this with the `fstat()` system call, available on all +platforms Tcl supports except Windows. + +However, on Windows the implementation of `file stat` (`NativeStat()` in +`tclWinFile.c`) works by opening the file and then using +`GetFileInformationByHandle()`. As we already have an open handle in the +situation we are looking to support, using it with that call should be +straight-forward. + +# Specification + +For at least file handles opened on conventional files, there will be an +additional _read-only_ option that can be retrieved with +`chan configure`: **-stat**. This will return a dictionary (same format as +[TIP #594](594.md) proposes returning) that contains the file information +determined by the `fstat()` or `GetFileInformationByHandle()` system call +(depending on platform) at the time that the call is performed. The option +will not be available for the standard file channel type if the file does not +have a native handle. + +It will be undefined whether channels opened on other things will have that +option, but if they do and are defined by Tcl, they _must_ use the same format +of value. (Third-party channels are not so constrained.) + +It will be the responsibility of the caller to flush channels prior to calling +if they believe that doing so will make a significant difference to the +results. + +This entails no public C API changes. + +# Other Options + +I considered creating **chan stat** _channel_, but thought that that has the +disadvantage of requiring every channel type to consider adding the +functionality when it only really makes sense for files (and file-like things) +opened on the native filesystem. (For example, it makes no sense at all for +files stored in a mounted zip file.) + +This option would require extending the channel API at the C level, and +consequently would be quite a bit more work. + +# Copyright + +This document is placed in public domain. ADDED tip/604.md Index: tip/604.md ================================================================== --- /dev/null +++ tip/604.md @@ -0,0 +1,49 @@ +# TIP 604: Printing Support for Text and Canvas Widgets + Author: Kevin Walzer + State: Final + Type: Project + Created: 03-July-2021 + Keywords: Tk, desktop integration + Tcl-Version: 8.7 + Vote: Done + Vote-Summary: Accepted 9/0/0 + Votes-For: MC, JD, KK, FV, DKF, JN, SL, BG, KW + Votes-Against: none + Votes-Present: none + Keywords: Tk, desktop integration +----- + +# Abstract + +Most GUI tookits provide an interface to send graphic and text output to a device such as a laser printer. Various extensions and command-line calls have allowed Tk to have rudimentary printing support, but there has never been a consistent API within Tk to offer printing. This TIP proposes to establish a consistent API in Tk to support printing with platform-native dialogs when possible, and with a Tk dialog to drive command-line configuration on other platforms. + +# Design + + * Windows: GDI [https://wiki.tcl-lang.org/page/GDI](https://wiki.tcl-lang.org/page/GDI) + + * X11: New development + + * Mac: Cocoaprint [https://wiki.tcl-lang.org/page/cocoaprint](https://wiki.tcl-lang.org/page/cocoaprint) + +Existing code from the GDI and cocoaprint extension packages has been refactored and ported into Tk's core; the authors have granted permission to incorporate their code under Tk's BSD-style license. The X11 development will be a Tk dialog that will drive the "lpr" or "lp" commands. + +The tk print commands will present a script-level public API implementing the proposed interface, outlined below. + + + > **tk print** _window_ + +This command prints the contents of a canvas or text widget. + + +# Example + +A full demonstration of these commands in action has been added to the Tk widget demo under the "Common Dialogs" section, "Printing from canvas and text widgets." Since the API is very simple, one can get a better understanding of the functionality by actually testing it in the demo. + + +# Implementation + +A draft implementation is currently under development in the tk_print branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/605.md Index: tip/605.md ================================================================== --- /dev/null +++ tip/605.md @@ -0,0 +1,98 @@ +# TIP 605: Function to get class name from object + Author: René Zaumseil + State: Final + Type: Project + Vote: Done + Created: 15-Jul-2021 + Post-History: + Keywords: Tcl + Tcl-Version: 8.7 + Tcl-Branch: tip-605 + Vote-Summary Accepted 7/0/0 + Votes-For: AK, FV, JN, KBK, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +The ability to get the current class of an object is missing from the +C API, due to +an API oversight. This TIP is about adding that capability. + +# Rationale + +This TIP intends to add the following public functions to Tcl: + +Tcl\_Class **Tcl\_GetClassOfObject**(Tcl\_Object *object*) + +Tcl\_Obj **Tcl\_GetObjectClassName**(Tcl\_Interp *\*interp*, Tcl\_Object *object*) + +There is also currently a public function **Tcl\_GetObjectName** to get the object name of an given Tcl\_Obj. A similar function to get the class name does currently not exist. But these information is already existing in the internals of an oo object. + +This was always information that should have been obtainable via the +API. + +# C Implementation + +
+Tcl_Obj *
+Tcl_GetObjectClassName(
+    Tcl_Interp * interp,
+    Tcl_Object object)
+{
+    Tcl_Object classPtr;
+    classPtr = (Tcl_Object)(((Object *)object)->selfCls->thisPtr);
+    if (classPtr == NULL) return NULL;
+
+    return Tcl_GetObjectName(interp, classPtr);
+}
+
+ +Donal Fellows added the following function: + +
+Tcl_Class
+Tcl_GetClassOfObject(
+    Tcl_Object object)
+{
+    return (Tcl_Class) ((Object *) object)->selfCls;
+}
+
+ +Both functions are created and exported in Branch [tip-605](https://core.tcl-lang.org/tcl/timeline?r=tip-605). + +# Discussion + +The following alternative was posted by Donal Fellows on tcl-core: + +
+I’d prefer getting the class to getting the name of the class (the name can be navigated to from there cheaply) as that makes the expensive failure-possible operations be something you can more commonly avoid, but otherwise this seems fine. We could have the name lookup you propose as well. This appears to be an area where I simply didn’t think about putting in any API. + +

+ +The operation that I’m looking for is (probably; this is written from memory and I’ve not checked if it compiles): + +

+    Tcl_Class Tcl_GetClassOfObject(Tcl_Object object) {
+        return (Tcl_Class)(((Object *)object)->selfCls);
+    }
+
+ +Technically, the traversing of the thisPtr link is possible via Tcl_GetClassAsObject() and getting the name is the standard op. It’s the selfCls link that’s currently not exposed in the C API at all. +
+ +This discussion was resolved by adding the above function to the TIP +on the grounds that having both functions is fine and they serve +slightly different use-cases. + +## Documentation + +The following documentation will be added in the **Tcl_GetObjectName** man page: + +The function **Tcl_GetObjectClassName** will return the class name of an existing object. If the given object is not an class NULL is returned. + +# Copyright + +This document has been placed in the public domain. + ADDED tip/606.md Index: tip/606.md ================================================================== --- /dev/null +++ tip/606.md @@ -0,0 +1,152 @@ +# TIP 606: Export more private Tk functions + Author: René Zaumseil + State: Final + Type: Project + Vote: Done + Created: 15-Jul-2021 + Post-History: + Keywords: Tk + Tcl-Version: 8.7 + Tk-branch: tip-606 + Vote-Summary: Accepted 6/0/0 + Votes-For: BG, FV, JN, MC, SL, KW + Votes-Against: none + Votes-Present: none + +----- + +# Abstract + +This TIP proposes to provide public Tk functions for the following private functions: + +**void Tk_ClipDrawableToRect(Display * display, Drawable d, int x, int y, int width, int height);** + +**void Tk_DrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable);** + +**Tcl_Obj *Tk_GetSystemDefault(Tk_Window tkwin, const char * dbName, const char * className);** + +**int Tk_UseWindow(Tcl_Interp * interp, Tk_Window tkwin, const char * string);** + +**void Tk_MakeContainer(Tk_Window tkwin);** + +**Window Tk_MakeWindow(Tk_Window tkwin, Window parent);** + +**Tk_Window Tk_GetOtherWindow(Tk_Window tkwin);** + +**void Tk_SetMainMenubar(Tcl_Interp * interp, Tk_Window tkwin, const char * menuName);** + +**void Tk_SetWindowMenubar(Tcl_Interp * interp, Tk_Window tkwin, const char * oldMenuName, const char * menuName);** + +The public function will have the same parameters as the private functions. +Only the names will start with "Tk\_" instead of "Tkp". + +To get the colors from a border I would propose the following function: + +**void Tk_Get3BorderColors(Tk_3DBorder border, XColor * bgColorPtr, XColor * darkColorPtr, XColor * lightColorPtr);** + +# Rationale + +On creation of new Tk widget types in extensions it is necessary to call private Tk functions. +So extensions depend on a specific Tk version. +If the needed functions exist as public functions these dependencies are gone. + +# C-Implementation + +The implementation is in the [tip-606 branch](https://core.tcl-lang.org/tk/timeline?r=tip-606). +Courtesy to Jan Nijtmans for providing it. + +Here is the source code of the new function to return the color values of the border. Alternatively we could provide one function for each of the 3 color values. + +
+void Tk_Get3BorderColors(
+                Tk_3DBorder border,
+                XColor *bgColorPtr,
+                XColor *darkColorPtr,
+                XColor *lightColorPtr)
+{
+    if (bgColorPtr) {
+	*bgColorPtr = *((TkBorder *)border)->bgColorPtr;
+    }
+    if (darkColorPtr) {
+	*darkColorPtr = *((TkBorder *) border)->darkColorPtr;
+    }
+    if (lightColorPtr) {
+	*lightColorPtr = *((TkBorder *) border)->lightColorPtr;
+    }
+}
+
+ +# Documentation + +The following documentation is from inside the source files. these documentation will be added in the Tk C API documentation. + +## Added to 3DBorder.3 + +**void Tk_ClipDrawableToRect(Display * display, Drawable d, int x, int y, int width, int height);** + +> Clip all drawing into the drawable d to the given rectangle. If width or height are negative, reset to no clipping. + +> Side effects: Subsequent drawing into d is offset and clipped as specified. + +**void Tk_DrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable);** + +> This function draws a rectangular ring around the outside of a widget to indicate that it has received the input focus. + +> On Windows, we just draw the simple inset ring. On other sytems, e.g. the Mac, the focus ring is a little more complicated, so we need this abstraction. + +> Side effects: A rectangle "width" pixels wide is drawn in "drawable", corresponding to the outer area of "tkwin". + +**void Tk_Get3BorderColors(Tk_3DBorder border, XColor * bgColorPtr, XColor * darkColorPtr, XColor * lightColorPtr);** + +> The function returns the 3 used color values of an border object. + +## Added to AddOption.3 + +**Tcl_Obj *Tk_GetSystemDefault(Tk_Window tkwin, const char * dbName, const char * className);** + +> Given a dbName and className for a configuration option, return a string representation of the option. + +> Results: Returns a Tk_Uid that is the string identifier that identifies this option. Returns NULL if there are no system defaults that match this pair. + +## Added to MainWin.3 + +**void Tk_SetMainMenubar(Tcl_Interp * interp, Tk_Window tkwin, const char * menuName);** + +> Puts the menu associated with a window into the menubar. Should only be called when the window is in front. + +> Side effects: The menubar is changed. + +**void Tk_SetWindowMenubar(Tcl_Interp * interp, Tk_Window tkwin, const char * menuName);** + +> Associates a menu with a window. + +> Side effects: The old menu clones for the menubar are thrown away, and a handler is set up to allocate the new ones. + +## New documentation page WinUtil.3 + +**int Tk_UseWindow(Tcl_Interp * interp, Tk_Window tkwin, const char * string);** + +> This procedure causes a Tk window to use a given X window as its parent window, rather than the root window for the screen. It is invoked by an embedded application to specify the window in which it is embedded. + +> Results: The return value is normally TCL_OK. If an error occurs (such as string not being a valid window spec), then the return value is TCL_ERROR and an error message is left in the interp's result if interp is non-NULL. + +> Side effects: Changes the colormap and other visual information to match that of the parent window given by "string". + +**void Tk_MakeContainer(Tk_Window tkwin);** + +> This procedure is called to indicate that a particular window will be a container for an embedded application. This changes certain aspects of the window's behavior, such as whether it will receive events anymore. + +**Window Tk_MakeWindow(Tk_Window tkwin, Window parent);** + +> This function creates an X window (Mac subwindow) and returns the window id of the created window. + +**Tk_Window Tk_GetOtherWindow(Tk_Window tkwin);** + +> If both the container and embedded window are in the same process, this procedure will return either one, given the other. + +> Results: If winPtr is a container, the return value is the token for the embedded window, and vice versa. If the "other" window isn't in this process, NULL is returned. + +# Copyright + +This document has been placed in the public domain. + ADDED tip/607.md Index: tip/607.md ================================================================== --- /dev/null +++ tip/607.md @@ -0,0 +1,116 @@ +# TIP 607: -failindex option for encoding convertto/convertfrom + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 30-Jul-2021 + Post-History: + Keywords: Tcl + Tcl-Version: 8.7 + Tcl-Branch: tip607-encoding-failindex + Vote-Summary: Accepted 5/0/0 + Votes-For: AK, FV, JN, KW, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes to add a **-failindex** option to encoding convertto/convertfrom. +The implementation brings TIP [[601]](601.md) to the script level. +In case of untransformable data, the error location and the so far transformed string may be retrieved. + +# Rationale + +Please refer to TIP [[601]](601.md) for usage examples and use-cases. +This tip was extracted from there, but the rationale and many descriptions also hold for this TIP. + +Remark, that the wish in use-case 1 to return the so far encoded data is fullfilled by this TIP. + +## Option name + +The option name **-failindex** is inspired by the option of the **string is** command with the same name and similar functionality. + +## Distinguish between error types "incomplete multi-byte sequence" and "not encodable character" + +See TIP [[601]](601.md) Example 1 and 2 for the explanation of the two error types. + +The two error types are bound to the used command: + +* "incomplete multi-byte sequence" may only appear in **encoding convertfrom** +* "not encodable character" may only appear in **encoding convertto** + +In consequence, no feed-back of the error type is required. +The error position is sufficient. + +## TCL 8.7 and TCL 9.0 + +In TCL 8.7, this interface is the only way to get informed about encoding errors. + +In TCL 9.0, the default behaviour is to fail on any encoding errors. +So, this interface may also be helpful to prepare TCL 8.7 scripts for TCL 9.0 and to check where TCL 9.0 would fail. + +# Specification + +## New option + +The command is extended by a **-failindex** option: + + encoding convertfrom ?-failindex posvar? ?encoding? data + encoding convertto ?-failindex posvar? ?encoding? data + +The distinct behaviour is as follows: + +* No conversion error + * Option **-failindex** not given: Converted data returned as command result. + * Option **-failindex** given: Additionaly, the value **-1** is written to the given variable in the caller scope. +* Conversion error present + * Option **-failindex** not given: In TCL 8.7 or in TCL 9.0 with -nocomplain option, the data is converted with replacement characters as currently done. Otherwise, an error message is thrown by the command (Error Code: **EILSEQ**) (see TIP [[601]](601.md)). + * Option **-failindex** given: The converted data until the failed index is returned as command result. The position of the conversion error in the source string is written to the specified variable in the caller scope. + +The definition of the value written by the -failindex option is given in TIP [[601]](601.md) as "Error position". + +This option may not be used together with the TCL encoding option **-nocomplain** of TIP [[601]](601.md). Any attempt to use **-nocomplain** and **-failindex** +simultaneously is an error case. + +# Credits + +The proposal was initiated by a post by Andreas Leitgeb 2021-05-12 on the core list. + +# Discussion after vote + +## Error types + +Harald Oehlmann 2023-01-13: +The upper statement, that the error types depend on the conversion direction is wrong. +The command **encoding convertfrom** may have both error types. +See the following examples: + +### Example for 'Not convertable character' + + encoding convertfrom -failindex Pos utf-8 A\xC4\x01Z + +The byte '\xC4' announces a multi byte sequence. +The following byte must be above \x7F, what is not the case. + +The command will return 'A' with value 1 in variable 'Pos'. + +### Example for 'Incomplete multi-byte sequence' + + encoding convertfrom -failindex Pos utf-8 A\xC4 + +The byte '\xC4' announces a multi byte sequence. +Then, nothing follows. + +The command will return 'A' with value 1 in variable 'Pos'. + +It would really be helpful, if one could make the distinction of the two errors from the return value. +The underlying C routines know the difference. +It is just not exposed to the script level. + +Note, that this issue is not present in the channel interface. +Channels always buffer incomplete sequences and never return partial data. + +# Copyright + +This document has been placed in the public domain. ADDED tip/608.md Index: tip/608.md ================================================================== --- /dev/null +++ tip/608.md @@ -0,0 +1,60 @@ +# TIP 608: Add virtual event when font configuration changes + Author: Brian Griffin + State: Final + Type: Project + Vote: Done + Created: 07-Aug-2021 + Post-History: + Keywords: Tk,font,WorldChanged,event + Tcl-Version: 8.6 + Tk-Ticket: 3049518 + Vote-Summary Accepted 5/0/0 + Votes-For: BG, FV, KW, SL, JN + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This tip proposes adding a virtual event that provides script level +access to the WorldChanged callback as defined in the +[Tk_SetClassProcs](https://www.tcl.tk/man/tcl8.6/TkLib/SetClassProcs.html) C API. +This callback, and the proposed virtual +event, are used to notify widgets when a font is changed and that the +layout of the widget needs to be recalculated. Currently, there is no +script level notification of this event, the only access is via the +WorldChanged C level callback. See [Tk-Ticket 3049518](https://core.tcl-lang.org/tk/tktview/3049518fffffffffffffffffffffffffffffffff) + +# Rationale + +Tk and Ttk widgets currently handle font changes via the WorldChanged +callback that each internal widget initiates as part of the widget +construction. There is no notification, via callback or event, +available at the script level. This is important for any mega-widget, +or application that implements any sort of layout algorithm at the +script level. This is also true for items on a Canvas that +include text. If there is any sizing relationship between these items +and other Canvas items, the layout can become incorrect when the font changes +its size or shape. + +# Specification + +A new virtual event is defined, **`<>`**. This event will +be sent to every widget after the C level callback has been made. The +user_data field for this event will have value "**FontChanged**" in order +to distinquish this "WorldChange" from any other form of +"WorldChanged" that may be implemented in the future, for example, screen +dimension change or screen resolution change. + +# Reference Implementation + +See the tk fossil branch +[bug-3049518](https://core.tcl-lang.org/tk/timeline?r=bug-3049518&m&c=1e04d669539944b0) +This implementation has been tested with modifications to the BWidgets +NoteBook widget and the Tablelist widget, solving layout issues these +mega-widgets currently have whenever a font is (re)configured. + +# Copyright + +This document is placed in the public domain. + ADDED tip/609.md Index: tip/609.md ================================================================== --- /dev/null +++ tip/609.md @@ -0,0 +1,57 @@ +# TIP 609: Enhance Tcl_ThreadQueueEvent() + Author: Christian Werner + State: Final + Type: Project + Vote: Done + Created: 06-August-2021 + Post-History: + Keywords: Tcl + Tcl-Version: 8.7 + Tcl-Branch: tip-609 + Vote-Summary: Accepted 4/0/1 + Votes-For: AK, JN, KW, SL + Votes-Against: none + Votes-Present: FV +----- + +# Abstract + +This TIP proposes to add a new qualifier to the Tcl_ThreadQueueEvent() +function in order to allow implicit thread wakeup on empty queue condition. + +# Rationale + +Most code using Tcl_ThreadQueueEvent() is immediately followed by a call +to Tcl_ThreadAlert(). This involves more than one pass through a critical +section locking the same process wide resource. By considering the queue +state (the empty condition) on causing the underlying Tcl_AlertNotifier() +which is the work horse of Tcl_ThreadAlert(), the Tcl_ThreadAlert() can +be completely left out, and the critical section must be locked/unlocked +only once instead of twice, reducing potential spurious wakeups. + +# Specification + +The new qualifier TCL_QUEUE_ALERT_IF_EMPTY is added for Tcl_ThreadQueueEvent() +eliminating the need to call Tcl_ThreadAlert() afterwards. This qualifier +checks for the state of the event queue of the target thread and perform +an implicit equivalent of Tcl_ThreadAlert() if the queue is empty +at the begin of Tcl_ThreadQueueEvent(). It can be used in combination +('|') with the already existing qualifiers. + +# Compatibility + +By using conditional compilation and preprocessor symbols it should be +in most cases possible to allow for backward compatibility, e.g. + + + #if (TCL_MAJOR_VERSION > 8) || (TCL_MINOR_VERSION > 6) + Tcl_ThreadQueueEvent(threadId, &event->header, TCL_QUEUE_TAIL|TCL_QUEUE_ALERT_IF_EMPTY); + #else + Tcl_ThreadQueueEvent(threadId, &event->header, TCL_QUEUE_TAIL); + Tcl_ThreadAlert(threadId); + #endif + + +# Copyright + +This document has been placed in the public domain. ADDED tip/610.md Index: tip/610.md ================================================================== --- /dev/null +++ tip/610.md @@ -0,0 +1,70 @@ +# TIP 610: Icon Badges + Author: Kevin Walzer + State: Final + Type: Project + Created: 21-August-2021 + Keywords: Tk, desktop integration + Tcl-Version: 8.7 + Vote: Done + Vote-Summary: Accepted 5/0/0 + Votes-For: MC, SL, JN, FV, KW + Votes-Against: none + Votes-Present: none + Keywords: Tk, desktop integration +----- + +# Abstract + +A widely implemented UI element in desktop and mobile applications is an "icon badge," a small image laid over an application icon in a dock, panel or taskbar to indicate a change of state or provide notification of an update. The badge is typically removed when the application is brought into focus. A common example of this is a numeric image on an email program that indicates the number of new or unread messages. This TIP proposes to add a "wm iconbadge" command to Tk to provide this functionality. + +# Design + + * Windows: ITaskbarList3 API [https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setoverlayicon](https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setoverlayicon) + + * X11: Custom implementation because Unix-like platforms do not have a standard, widely-used API + + * Mac: NSDockTile [https://developer.apple.com/documentation/appkit/nsdocktile?language=objc](https://developer.apple.com/documentation/appkit/nsdocktile?language=objc) + +The X11 implementation will be based on the "wm iconphoto" command and incorporate additional custom badge images that will be shipped with Tk. + +The Windows implementation will use the custom badge images developed for this TIP and render them via the native "ITaskbarList3::SetOverlayIcon" API. + +The Mac version will be completely native and implement a Tk wrapper over the NSDockTile API. + +The wm iconbadge command will present a script-level public API implementing the proposed interface, outlined below. + + + > **wm iconbadge** _window_ _badge_ + +This command sets an icon badge over a toplevel window icon as it appears in the Dock (macOS), taskbar (Windows) or application panel (X11). The "badge" argument is either a number to indicate a number of new messages or other data points, or an exclamation point to indicate a general call to attention. If the "badge" argument is set to an empty string, the badge icon is removed. + +# Example + +To set a badge icon with the number five over the application icon: + + wm iconbadge . 5 + +To call for attention: + + wm iconbadge . ! + +To remove the badge: + + wm iconbadge . "" + +On X11, variable ::tk::icons::base_icon($toplevelwindow) must be set to the base icon (that is: the icon without badge) before calling **wm iconbadge**. **wm iconphoto $window ::tk::icons::base_icon($toplevelwindow)** will get called under the hood. + +A demonstration of this command in action has been added to the Tk widget demo under the "Miscellaneous" section, "Window icons and badges." Since the API is very simple, one can get a better understanding of the functionality by actually testing it in the demo. + +Screenshot of the wm iconbadge on all three platforms: + +[https://imgur.com/gallery/mTqhgMl](https://imgur.com/gallery/mTqhgMl) + + +# Implementation + +See [tk_badges](https://core.tcl-lang.org/tk/timeline?r=tk_badges) branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/611.md Index: tip/611.md ================================================================== --- /dev/null +++ tip/611.md @@ -0,0 +1,75 @@ +# TIP 611: Add subcommands to the "photo image" command to rotate and reflect an image + Author: Arjen Markus , Richard Suchenwirth + State: Draft + Type: Project + Vote: Pending + Created: 2-Sep-2021 + Post-History: + Tcl-Version: 9.1 + Implementation-URL: https://wiki.tcl-lang.org/page/rphoto +----- + +# Abstract + +The purpose of this TIP is to enable scripts to rotate a photo image +over +90 or -90 degrees or reflect it in the horizontal or vertical axis. +The image is rotated or reflected in-place. + +# Rationale + +Various commands, such as subsampling, are already available to +manipulate image data. A simple manipulation that is missing from the +current set of manipulations is rotation over 90 degrees in clockwise +or counter-clockwise direction. Code to so has been available on the +Wiki since 2010. + +Reflection is possible by using negative increments for subsampling an +image. This is part of the copy subcommand and creates a new image. + +While it would be possible to implement rotation as an option of the +copy subcommand, this presents a delicate problem: how would this +interact with the other options? Should these options be handled in the +order in which they are specified or should there be some hierarchy? + +To avoid ambiguities and effects that are difficult to explain, this +TIP proposes to introduce separate subcommands for the two +isometric transformations. + +# Proposal + +This TIP implements two new subcommands for photo images, _rotate_ and +_reflect_, that have the effect of rotating the image by 90 degrees in a +clockwise or counter-clockwise direction or reflect it in the central +horizontal or vertical axis. + +The subcommands are limited to photo images, as that is the most likely +format for which such a facility is useful. + +The syntax is: + + $img rotate -90/90 + +where -90 means a clockwise rotation and 90 a counter-clockwise rotation. +(Note: the angle should for the moment be a multiple of 90 degrees.) + +For reflection the syntax is: + + $img reflect h(orizontal)/v(ertical) + +where "h" (or any abbreviation of "horizontal") means reflection in the +central horizontal axis and "v" (or any abbrebation of "vertical") means +refletion in the central vertical axis. + +A reference implementation for rotating an image in place exists as +a standalone extension -- https://wiki.tcl-lang.org/page/rphoto. + +Moreover, Christian Werner has proposed an implementation for this TIP for both rotation and reflection, see + +The patch accepts angles other than multiples of 90 degrees and then +determines the closest multiple. An alternative could be to issue an +error message. + +# Copyright + +This document has been placed in the public domain. + ADDED tip/612.md Index: tip/612.md ================================================================== --- /dev/null +++ tip/612.md @@ -0,0 +1,40 @@ +# TIP 612: Setting WM_CLASS for main/root window + Author: Benjamin Schnitzler + State: Draft + Type: Project + Vote: Pending + Created: 9-Dec-2021 + Post-History: + Tcl-Version: 9.1 + Keywords: Tk +----- + +# Abstract + +This TIP proposes a command to allowing setting of a toplevel's class +(especially the main window) after the creation of the window. + +# Rationale + +Currently there seems to be no way to set the application class of the +`WM_CLASS` property after the creation of the window. (It is possible to set +the application name using `tk appname `.) It should be possible to +update the application class, e.g. with a command like +`tk classname `. + +# Proposal + +This TIP proposes making the `-class` property of toplevels (and frames, +because of shared code) be settable (with the `configure` method) after the +widget is created. Note that doing this will not change the value of any +options that have already been looked up (though it will affect _future_ calls +to `option get`), nor will it change the `bindtags` of the widget. + +Note that setting the class of toplevels is currently possible at widget +creation time. For the main application window, this means passing the +`-class` option in the arguments processed by `wish` or during +`package require Tk`. + +# Copyright + +This document has been placed in the public domain. ADDED tip/613.md Index: tip/613.md ================================================================== --- /dev/null +++ tip/613.md @@ -0,0 +1,137 @@ +# TIP 613: New INDEX\_NULL\_OK flag for Tcl_GetIndexFromObj*() + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 09-Dec-2021 + Post-History: + Keywords: Tcl Tcl_GetIndexFromObj() Tcl_GetIndexFromObjStruct() + Tcl-Version: 8.7 + Tcl-Branch: tip-613 + Vote-Summary: Accepted 7/0/0 + Votes-For: BG, FV, JD, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none + +----- + +# Abstract + +This TIP proposes a new `INDEX_NULL_OK` flag for `Tcl_GetIndexFromObj*()` as `TCL_INDEX_NULL_OK`, +and allow other variable types (like `enum`, `short`, `long`, `long long`, both signed and unsigned) +for the `indexPtr` variable. + +It also proposes to implement the `TK_OPTION_NULL_OK` flag in Tk for the +options `TK_OPTION_BOOLEAN`, `TK_OPTION_JUSTIFY` and `TK_OPTION_ANCHOR`, in +the same way as already present for `TK_OPTION_RELIEF`, and for `TK_OPTION_INT` +in the same way as already present for `TK_OPTION_DOUBLE`. + +# Rationale + +In Tk, serveral options allow the empty string, but since `Tcl_GetIndexFromObjStruct()` cannot handle +the empty string as input well, this results in special code in Tk to handle that. This is +not always done correctly, e.g.: +
+$ wish8.6
+% text .t
+.t
+% .t tag configure dummy -relief {}
+% .t tag configure dummy -relief xxx
+bad relief "xxx": must be flat, groove, raised, ridge, solid, or sunken
+% .t tag configure dummy -wrap {}
+% .t tag configure dummy -wrap foo
+bad wrap "foo": must be char, none, word, or 
+% 
+
+So, the error-message doesn't even mention that "" is a valid value, or it forgets +to quote the empty value. + +The cause of the problem is [here](https://core.tcl-lang.org/tk/file?udc=1&ln=27&ci=73d9515d7f13f6fa&name=generic%2FtkTextTag.c): +the empty string is made part of a string array used by `Tcl_GetIndexFromObj*()`. + +The meaning of `TCL_INDEX_NULL_OK` is that `Tcl_GetIndexFromObj*()` no longer +gives an error when indexPtr is supplied a NULL or "" argument, but it will return TCL_OK +and provide the index "-1". This functionality can then be used by Tk: +
+$ wish8.7
+% text .t
+.t
+% .t tag configure dummy -wrap {}
+% .t tag configure dummy -wrap foo
+bad wrap "foo": must be char, none, word, or ""
+% 
+
+ +The `indexPtr` parameter of `Tcl_GetIndexFromObj*()` always had to point to +an integer variable, but this TIP changes the parameter to type `void *` +which can point to almost anything. This is done by using a wrapper macro, +which makes the `sizeof()` of the variable available to the function. +So any scalar value, being an enum or some kind of integer (1-, 2-, 4- or 8-byte) +will work. `indexPtr` can also be `(int *)NULL`, then nothing will be written to it. + +For Tk, the enum's `Tk_Anchor` and `Tk_Justify` will get new members +`TK_ANCHOR_NULL` resp. `TK_JUSTIFY_NULL` with value -1, equivalent with +the already existing `TK_RELIEF_NULL` (which is not an enum for historical reasons). +Without the `TK_OPTION_NULL_OK` flag in the `TK_OPTION_JUSTIFY` and `TK_OPTION_ANCHOR` +config information, everything functions as before, but when using the +`TK_OPTION_NULL_OK` flag, the new enum values become valid values for those configuration options. + +For `TK_OPTION_BOOLEAN`, the new possible value, when using the `TK_OPTION_NULL_OK` +flag, is -1. This would allow the `-elide`, `-overstrike` and `-underline` +options for text tags, currently implemented using `TK_OPTION_STRING`, +to be re-implemented without the need for extra error-checking in the code, +since `TK_OPTION_BOOLEAN` already takes care of that. This rewrite is not +done in the [`tip-613`](https://core.tcl-lang.org/tk/timeline?r=tip-613), +branch in order to demonstrate that this TIP does not break current code. + +For `TK_OPTION_DOUBLE`, using the `TK_OPTION_NULL_OK` flag will mean that +the NULL value will be translated to the internal value `NaN` (Was: 0.0). +The reason for this change is that this makes it possible to distinguish +the empty string from 0.0, without storing the original Tcl_Obj in +the widget structure. + +For `TK_OPTION_INT`, using the `TK_OPTION_NULL_OK` flag means that +the NULL value will be translated to internal value `INT_MIN`. Also, +`TK_OPTION_PIXEL` is changed the same way as `TK_OPTION_INT`. + +The change in `TK_OPTION_DOUBLE`/`TK_OPTION_INT` would allow the +`-width`/`-relWidth`/`-height`/`-relHeight` options to be re-written +such that the flags (CHILD_WIDTH et al.) are not needed any more. This +rewrite is not done in the [`tip-613`](https://core.tcl-lang.org/tk/timeline?r=tip-613), +branch in order to demonstrate that this TIP does not break current code. + +# Caveat + +Some extensions might have set the `TK_OPTION_NULL_OK` flag already, even +though it never worked. This might result in "" as possible option value, which was +previously impossible, and what might lead to new unexpected behavior. Examples +are [this bug](https://core.tcl-lang.org/tk/tktview?name=be8f5b9fc2) in Tk menu's and +[this bug](https://core.tcl-lang.org/tk/tktview?name=6178610b1b) in Themed Tk. +Solution: the extension should no longer use the `TK_OPTION_NULL_OK` flag, +or expect Tcl 8.7 as a minimum and take care that the value -1 is handled properly. +One extension known to be broken this way is [3dcanvas](https://3dcanvas.tcl.tk/home). + +The change in the `TK_OPTION_NULL_OK` for `TK_OPTION_DOUBLE` (using NaN as +internal representation in stead of 0.0) and for `TK_OPTION_INT`/`TK_OPTION_PIXEL` +(using INT_MIN as internal representation in stead of 0) is a potential incompatibility +if the Tcl_Obj is not stored in the widget structure. In Tk, there is no code +affected (it is used only in `-width`/`-height`/`-relWidth`/`-relHeight` +for the `place` command). + +# Implementation + +Available in the [`tip-613`](https://core.tcl-lang.org/tcl/timeline?r=tip-613) branch. + +There's a [`tip-613`](https://core.tcl-lang.org/tk/timeline?r=tip-613) branch in Tk as +well, implementing the `TK_OPTION_NULL_OK` flag for `TK_OPTION_BOOLEAN`, +`TK_OPTION_JUSTIFY` and `TK_OPTION_ANCHOR`, using Tcl's `TCL_INDEX_NULL_OK` flag. + +Finally there's a [`tip-613-demo`](https://core.tcl-lang.org/tk/timeline?r=tip-613-dem) +branch in Tk as well. This branch changes the "place" command and the implementation +for the `-elide`, `-overstrike` and `-underline` text tags, to use the new functionality. + +This branch targets 8.7. + +# Copyright + +This document has been placed in the public domain. ADDED tip/614.md Index: tip/614.md ================================================================== --- /dev/null +++ tip/614.md @@ -0,0 +1,218 @@ +# TIP 614: Windows: OS: WTSSESSION change notification + Author: Harald Oehlmann + State: Rejected + Type: Project + Vote: Done + Created: 14-Jan-2022 + Tcl-Version: 8.7 + Tk-Ticket: 8a49f43b + Tk-Branch: tip614-win-wtssession-change + Vote-Summary: Rejected 1/2/2 + Votes-For: JN + Votes-Against: FV, KW + Votes-Present: MC, SL + +----- + +# Abstract + +Add a TK notification when a Tk program in a Windows OS session is disconnected or connected to the user. + +# Rationale + +On Windows operating system, sessions (e.g. a whole desktop environment with all running programs) may be disconnected from the user and put into a hold state. +There might be shared resources, which should only be active, if the program is connected to the user. + +In my personal case, there is a barcode scanner connected by a serial interface. +If a session is disconnected by the "Change User" button in the start menu, the serial interface should be closed. +So, the new user in a new session may use the barcode scanner and it is not blocked by the disconnected session. + +# Proposal + +The following new protocols are added to the **wm protocol** command: + +* **WTS_CONSOLE_CONNECT** and **WTS_CONSOLE_DISCONNECT** are sent on console connect/disconnect like a user change. +* **WTS_REMOTE_CONNECT** and **WTS_REMOTE_DISCONNECT** are sent on remote connect/disconnect. +* **WTS_SESSION_LOGON** and **WTS_SESSION_LOGOFF** are sent on session logon/logoff. +* **WTS_SESSION_LOCK** and **WTS_SESSION_UNLOCK** are sent when the session is locked by the user or on any upper action (as session lock is a side effect). + +# Reference Implementation + +See the tk fossil branch [tip614-win-wtssession-change](https://core.tcl-lang.org/tk/timeline?r=tip614-win-wtssession-change&). + +Francois Vogel has commented the implementation and discussed the following points: + +## Double definition of macro "CurrentTime" + + /* + * Macro CurrentTime is defined in X.h. + * CurrentTime is used as a variable name in the following include. + * Thus, undefine it and define it back afterwards + */ + + #undef CurrentTime + #include + #define CurrentTime 0L /* special Time */ + #include "tkWinIco.h" + +This looks a bit ugly. Isn't there a possibility to reorder the includes to avoid this? Doesn't this name conflict have some significance? + +Harald answer: + +It is definitively ugly. +It would be great to get a define with the name "CurrentTime" out of the public TCL headers. IMHO, there should never be a define without a "TCL_" prefix. +Any recommendations welcome. + +## Symetry of calls to "WTSRegisterSessionNotification"/"WTSUnRegisterSessionNotification" + +Another question. There is the following comment: + + * Note: the Windows API requires to call + * WTSUnRegisterSessionNotification for each prior call to + * WTSRegisterSessionNotification. This would require to store + * the registration fact somewhere and to call unregister on + * windows destroy if registered. This is currently not implemented + * and has probably no negative impacts. + +Is this "no negative impacts" statement just your guess? Or do we introduce here some sort of Damocles sword that will hit us when expected the least? Note that the code in fact really calls WTSUnRegisterSessionNotification just below that comment, which makes me wonder whether this comment is correct? + +Moreover, the documentation says: + +When a window no longer requires these notifications, it must call WTSUnRegisterSessionNotification before being destroyed. For every call to this function, there must be a corresponding call to WTSUnRegisterSessionNotification. + +Is this call before destroy implemented somewhere? + +Harald answered: + +The backround to call "WTSUnRegisterSessionNotification" before registering it is, that we would get two notifications, if this is registered twice. So, it is unregistered just for the case it was registered before. + +so: +wm protocol . WTS_SESSION_LOGON myproc +-> first registration for Window ".", unregistration fails but does not harm. +wm protocol . WTS_SESSION_LOGOUT myproc +-> 2nd registration for window ".", so unregistration is necessary. + +"No negative impacts" means, that messages are never delivered, if the window is destroyed. + +I agree, that it would be cleaner to: +- save the fact if registered with the window data structure +- call WTSUnRegisterSessionNotification on window destruction, if the registration took place. + +I have to say, that such a solution is far from my programming skills. +In consequence, I added the two warnings and implemented it with my limitted skills. + +I may improve the implementation and follow two paths: + +* Register any toplevel for session reporting and unregister on toplevel destroy +* Add a flag to the toplevel data structure, which is set on registration. If set, unregister on toplevel destroy. + +I planned to write a "help request" on the core list to check those paths. +As vote is currently in progress, I have to wait for the vote result. + +# Test + +To test the functionlity, user activity is required. +There are no automated tests. + +Here are some manual tests: + +## Lock screen detection + +Enter in a wish compiled from branch "tip614-win-wtssession-change": + + wm protocol . WTS_SESSION_LOCK "puts locked" + wm protocol . WTS_SESSION_UNLOCK "puts unlocked" + +Then lock your screen, for example by Windows+L key combination. +When you unlock back, you will see the text "locked" and "unlocked". + +## Change user + +Enter in a wish compiled from branch "tip614-win-wtssession-change": + + wm protocol . WTS_CONSOLE_CONNECT "puts connect" + wm protocol . WTS_CONSOLE_DISCONNECT "puts disconnect" + +Then open the start menu and select "change user". +Then log back in with the same user. +You will see the text "disconnect" and "connect" in the console window. +If the upper lock screen example is still active, you will also see "locked" and "unlocked". + +# Discussion + +## protocol names + +The used protocol names are identical to the corresponding windows message define as listed in "[WM_WTSSESSION_CHANGE](https://docs.microsoft.com/en-us/windows/win32/termserv/wm-wtssession-change)". + +## implementation within wm protocol + +There is a similar protocol on windows: **wm protocol WM_SAFE_YOURSELF** which reacts on the windows message **WM_QUERYENDSESSION**. +This windows message is also session related and of similar nature. +In consequence, this TIP is the extension of this behaviour + +## Why not in TCL, why with "wm protocol" ? + +Strictly speaking, session control functionality belongs to TCL, not Tk. +And it belongs to an application, not a particular toplevel window. + +In contrast to those drawbacks, it is an extension of the existing **wm protocol WM_SAFE_YOURSELF** command, which exists already. +It is logical, to place the new functionality close to this command. + +## Why not multi-platform ? + +This is a Windows platform only TIP. +Contributions and opinions for other platforms are welcome. +Specially the message about a screen lock should exist on all platforms. + +### Implementation sketch on Linux + +Christian Gollwitzer contributed on the core list information about Linux window managers: + +On Linux, these things are solved by "dbus", which is an interprocess communication system for desktop OSes. Here is a description of the screensaver interface: +[GNOME Screensaver](https://people.gnome.org/~mccann/gnome-screensaver/docs/gnome-screensaver.html). + +Despite this being a GNOME description, it works also on KDE and maybe others, because freedesktop.org atempts to standardize these APIs. + +Fortunately, there is a dbus extension for Linux available by Schelte: +[TCL DBUS](https://wiki.tcl-lang.org/page/dbus%2Dtcl). +Actually, it would make sense to include dbus in Tcl9 / Tk 9 as a +standard extension. + +dbus is an IPC protocol like DDE and Apple Events. +With dbus you can both call a remote function and receive notifications on events that happen within the system. + +dbus itself is agnostic of the purpose, but common Linux desktops (KDE, Gnome, partly XFCE...) use dbus to control the various desktop processes, and they currently try to harmonise on a common dbus protocols (freedesktop.org). + +Here is some code in Python which uses dbus to do almost exactly what Harald suggests: +[Wait for dbus session lock unlock message](https://stackoverflow.com/questions/58418885/wait-for-dbus-session-lock-unlock-messages). + +If Schelte's package were included in core Tk, then sending an event on session lock/unlock would be a few lines of dbus code for Linux with no need for C level code, i.e. translate the Python from the link above. + +## Why not in Tk 8.6 ? + +This enhancement may be seen as a bugfix to the **wm protocol WM_SAFE_YOURSELF** and thus may go to Tk 8.6. +I would personally favor this, as Tk 8.6.13 may arise this year while Tk 8.7 is still in alpha phase and a release date is not in view. + +## Why was this TIP rejected? + +There are two issues with the TIP: + +### Implementation + +The upper symetry of the notification calls was not fullfilled, what is not in conformance. +An implementation sketch by Christian Werner introduced platform-specific code into generic code, what was seen as a no-go. + +The implementation sketch is as follows: + + - Add a new flag to TkWIndow flag field: #define TK_WIN_SESSION_NOTIFICATION_ENABLED 0x200000 + - Use this flag to do the rgistration in win/tkWinWm.c + - If flag set, undo the rgistration in Tk_DestroyWindow. There is no way to do this in the Windows-only part of Tk, so we will have an ifdeffed part in the generic file. + +## Should be in TCL + +This functionality should be moved to a notification framework within TCL and not Tk. + +# Copyright + +This document has been placed in the public domain. + ADDED tip/615.md Index: tip/615.md ================================================================== --- /dev/null +++ tip/615.md @@ -0,0 +1,31 @@ +# TIP 615: string is index + Author: Jan Nijtmans + State: Draft + Type: Project + Vote: Pending + Tcl-Version: 9.1 + Tcl-Branch: tip-615 +----- +# Abstract + +This TIP proposes a new command "string is index". It returns 1 if the provided +value is a valid index (such as `15` or `end-2`), 0 otherwise. See also +[TIP #502](https://core.tcl-lang.org/tips/doc/trunk/tip/502.md). + +Also, it prepares the way to handle the empty string as allowed index value. + +# Specification + +TODO + +# Implementation + +Implementation is in [Tcl branch "tip-615"](https://core.tcl-lang.org/tcl/timeline?r=tip-615) + +# Compatibility + +This is 100% upwards compatible with Tcl 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/616.md Index: tip/616.md ================================================================== --- /dev/null +++ tip/616.md @@ -0,0 +1,90 @@ +# TIP 616: Tcl lists > 2^31 elements + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Tcl-Version: 9.0 + Tcl-Branch: tip-616 + Vote-Summary: Accepted 3/0/2 + Votes-For: JN, KBK, KW + Votes-Against: none + Votes-Present: FV, SL +----- +# Abstract + +This TIP proposes to extend the Tcl API for lists and dicts such that they +can handle more than 2^31 elements. Also many functions involved with +parsing are extended the same way. + +# Specification + +The stub table is extended with 7 new functions: +
+int Tcl_ListObjGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr,
+	Tcl_Size *objcPtr, Tcl_Obj ***objvPtr)
+int Tcl_ListObjLength(Tcl_Interp *interp, Tcl_Obj *listPtr,
+	Tcl_Size *lengthPtr)
+int Tcl_DictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Size *sizePtr)
+int Tcl_SplitList(Tcl_Interp *interp, const char *listStr, Tcl_Size *argcPtr,
+	const char ***argvPtr)
+void Tcl_SplitPath(const char *path, Tcl_Size *argcPtr, const char ***argvPtr)
+Tcl_Obj *Tcl_FSSplitPath(Tcl_Obj *pathPtr, Tcl_Size *lenPtr)
+int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable,
+	Tcl_Size *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv)
+
+ +Also, wrapper macro's are put around those 7 functions, such that - depending +in the size of the "Tcl_Size *" argument (either sizeof(int) or sizeof(ptrdiff_t)) +the correct stub entry is called, either the original one or the new one. +This way, extensions can decide to continue to use an "int" or change the code +to use "Tcl_Size" as variable type, supporting an enhanced range for list/dict's. +This is how source compatibility is kept. + +Currently, the functions `Tcl_ListObjGetElements`, `Tcl_ListObjLength`, +`Tcl_DictObjSize` and `Tcl_SplitList` return `TCL_ERROR` when the +the list/dict has invalid syntax. Starting Tcl 9.0, those function can also +return `TCL_ERROR` when `objcPtr`/`lengthPtr`/`sizePtr` points to a variable +of type `int` and the list/dict has more than 2^31 elements. + +In Tcl 8.7, the same functions are added to the stub table, but there +the functions are just wrappers calling the original functions. The +goal is to allow the new API to be used in 8.7 too, but without +actually being able to use more than 2^31 elements in lists/dicts. + +The full list of API changes is [here](https://core.tcl-lang.org/tcl/fdiff?v1=9ac47021a2d033d4&v2=c29cc23d2113019e) + +# Implementation + +Implementation is in [Tcl branch "tip-616"](https://core.tcl-lang.org/tcl/timeline?r=tip-616). + +There is also a minimal Tcl 8.7 implementation in [Tcl branch "tip-616-for-8.7"](https://core.tcl-lang.org/tcl/timeline?r=tip-616-for-8.7) + +# Caveat + +There is one change in `Tcl_Token` that could cause compiler warnings: the extension of the +`commentSize` and `numTokens` fields, which are now unsigned since they can never be negative. +Comparing those values with signed numbers will result in a compiler warning, even though +there is no problem at all: the code keeps functioning fine. Solution: always compare those +fields with unsigned numbers. A type-cast could be also used to silence this warning. + +Even though the API changed to allow larger values, internally not everywhere this +additional range can be used. For example, commands still don't accept more than +2^31 elements, so lists larger than that cannot be used as commands. Work will +continue to allow that in the future, but it's not done in this TIP yet. + +# Addendum + +After [TIP #660](660.md) was accepted, a lot of functions changed from +using size\_t to ptrdiff\_t parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. + +# Compatibility + +The proposed changes for Tcl 9 are source compatible, but _NOT_ binary +compatible: All extensions compiled with Tcl 9 headers will have to +be recompiled, but no source-code changes are necessary. +The additions for Tcl 8.7 are 100% upwards compatible with Tcl 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/617.md Index: tip/617.md ================================================================== --- /dev/null +++ tip/617.md @@ -0,0 +1,34 @@ +# TIP 617: Tcl_WCharLen/Tcl_Char16Len + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Tcl-Version: 8.7 + Tcl-Branch: tip-617 + Vote-Summary: Accepted 3/0/2 + Votes-For: JN, MC, KW + Votes-Against: none + Votes-Present: FV, SL +----- +# Abstract + +This TIP proposes to extend the Tcl API with 2 new functions: `Tcl_WCharLen`/`Tcl_Char16Len` + +# Specification + +This functions do about the same as `Tcl_UniCharLen`, which was earlier marked as deprecated +[TIP #542](542.md). However, it is used in [tDOM](http://www.tdom.org/), and - in fact - +simple enough to be provided. Since [TIP #542](542.md) provides `Char16`/`WChar` +versions of many UTF-8-related functions, this one should be handled the same for consistency. + +# Implementation + +Implementation is in [Tcl branch "tip-617"](https://core.tcl-lang.org/tcl/timeline?r=tip-617) + +# Compatibility + +This is 100% upwards compatible with Tcl 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/618.md Index: tip/618.md ================================================================== --- /dev/null +++ tip/618.md @@ -0,0 +1,94 @@ +# TIP 618: New Tcl\_GetBool* functions with TCL\_NULL\_OK flag + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Post-History: + Keywords: Tcl Tcl_GetBoolFromObj() Tcl_GetBool() + Tcl-Version: 8.7 + Tcl-Branch: tip-618 + Vote-Summary Accepted 5/0/0 + Votes-For: FV, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes new functions `Tcl_GetBoolFromObj`/`Tcl_GetBool` which are the same as +`Tcl_GetBooleanFromObj`/`Tcl_GetBoolean` but have an additional `flags` parameter, and use `char` +as variable type. Also accepted is the `TCL_NULL_OK` flag, which is - actually - a renamed +`TCL_INDEX_NULL_OK`: We wouldn't want a separate `TCL_BOOL_NULL_OK`. + +If `Tcl_GetBooleanFromObj`/`Tcl_GetBoolean` is provided the `TCL_NULL_OK` flag, it can +output not only 0 or 1 but also '\\xFF'. Without the `TCL_NULL_OK` flag, the only +possible outcomes are 0 and 1. In Tcl, there is not much usage for the `TCL_NULL_OK`, +flag but in Tk it is more common to have values which can be empty as well as 0 or 1. +E.g. the `-elide`, `-overstrike` and `underline` options of text tags. + +# Rationale + +The functions `Tcl_GetBooleanFromObj`/`Tcl_GetBoolean` store a boolean value +into a `int`, which - in many cases - is overkill since 0 and 1 are the +only possible value. + +With the new functions, we can do: +
+    #include <tcl.h>
+    char bool1;
+    Tcl_Obj *obj = Tcl_NewStringObj("true", -1);
+    Tcl_GetBoolFromObj(NULL, obj, 0, &bool1);
+
+ +Also, the functions `Tcl_GetBoolFromObj`/`Tcl_GetBool` have an additional +`flags` parameter. At this moment only the values 0 and `TCL_NULL_OK` +are allowed. Thanks to the `TCL_NULL_OK` flag, we can replace +[this](https://core.tcl-lang.org/tk/file?udc=1&ln=627-636&ci=fb97d090b5ae34a8&name=generic%2FtkConfig.c) +code in Tk with a single call to `Tcl_GetBoolFromObj()`: The `-elide`, +`-overstrike` and `-underline` options for text tags are already mentioned, +that's the intended usage of this flag. + +Other flag values can be added in the future. + +# History + +This TIP has been in vote before, with the result of only gaining one +YES vote and 3 PRESENT votes. There were 2 main remarks, indicating this +TIP did too many things at once, the implications of that couldn't be grasped +by the voters. Therefore, the TIP has been rewritten (and the implementation +simplified). The remarks were: + +1) "... I don't think I grok the entire implications of the discussion we +had on this list about (void *) abuses". + +In C, "void *" can be used when the function accepts multiple different types. +E.g. `malloc()` or `memcpy()` are perfect examples, but also the use of +`ClientData` in Tcl is not an abuse of "void *". The caller is responsible +making sure that a pointer of the correct type is used. In the case of +`Tcl_GetBoolFromObj`/`Tcl_GetBool`, the function accepts any 1-, 2-, 4- +or 8-byte enum, bool or integer type. As long as the functions know +the sizeof() of the variable, no invalid memory will be addressed. + +The suggestion is also done to split this into different functions depending +on the sizeof() the variable. That would be possible, but then 8 new +functions should be added, and - still - a "void *" should be used as +last argument: possible 1-byte types could be bool, char, signed char or +unsigned char. 2-byte types could be VARIANT_BOOL, wchar_t, short or +unsigned short. We don't want functions for every possible type here, +when the sizeof() the variable is the only thing we really care about. + +2) "Even after sleeping over it I find myself unable to agree to the macro +shenanigans for the transmission of the size of the referenced +variable, even while admiring the hackishness of it." + +The implementation rewrite doesn't use macro's any more. + +# Implementation + +Available in the [`tip-618`](https://core.tcl-lang.org/tcl/timeline?r=tip-618) branch. + +This branch targets 8.7. + +# Copyright + +This document has been placed in the public domain. ADDED tip/619.md Index: tip/619.md ================================================================== --- /dev/null +++ tip/619.md @@ -0,0 +1,119 @@ +# TIP 619: New TCL\_COMBINE flag for Tcl\_UniCharToUtf() + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Post-History: + Keywords: Tcl Tcl_UniCharToUtf() + Tcl-Version: 9.0 + Tcl-Branch: tip-619 + Vote-Summary: Accepted 4/0/1 + Votes-For: AK, JN, KW, SL + Votes-Against: none + Votes-Present: FV +----- + +# Abstract + +This TIP proposes a new flag `TCL_COMBINE` to be used for the +function `Tcl_UniCharToUtf()`. With this flag, the function +`Tcl_UniCharToUtf()` will try to combine surrogates (code +range \UD800 - \UDFFF), otherwise surrogates are handled +as if they were valid codepoints. + +This TIP is designed as a solution for [this](https://core.tcl-lang.org/tcl/tktview?name=0d61d3a2bb) +ticket: "Tcl interprets two adjacent surrogate code points as a character encoded using UTF-16". +Currently, the internal use of UTF-16 is visible in some strange behavior at script level: +Whenever a high surrogate character is glued together with a low surrogate character +(which - individually - would be illegal), they form a valid Unicode character. +This TIP is written to get rid of that strange behavior in Tcl 9.0. All places in the +code where this special behavior is handled, it won't be handled this special +way any more: surrogate characters are illegal, but they can be handled - internally - +by Tcl 9.0. They won't be combined and - magically - become valid any more. + +# Rationale + +In Tcl 9.0 currently: +
+    $ tclsh9.0
+    % string length \\uD83D\\uDE02
+    1
+
+But +
+    $ tclsh9.0
+    % string length \\uD83D\\uD83D
+    2
+
+Whenever surrogate pairs are encountered in a Tcl script, the +surrogates are automatically combined into a single Unicode +character. This cannot not be changed in Tcl 8.7 for three reasons: + +* Compatibility with Tcl 8.6. In Tcl 8.6, the \\U?????? representation + doesn't work yet, so there is no other way to encode Emoji then + by a surrogate pair \\u????\\u????. +* The "string" objType has an internal UTF-16 representation, which + cannot distinguish between a surrogate pair and a Unicode character > U+FFFF. + In Tcl 9.0, the "string" objType uses UTF-32. +* Since single surrogate characters cannot be represented in UTF-8, this + opens the possibility of violations against the UTF-8 standard. But + [TIP #601](601.md) is accepted now, which can detect those violations. + +Those 3 restrictions are gone in Tcl 9.0. + +This TIP proposes that the function `Tcl_UniCharToUtf()` no longer +combines surrogates by default, as it did in Tcl 8.x. Usages of the +`TCL_COMBINE` flag makes `Tcl_UniCharToUtf()` behave as in Tcl 8.x again. +Since surrogates are illegal in UTF-8, the effect of this TIP will be: +
+$ tclsh9.0
+% string length \\uD83D\\uDE02
+2
+% puts \\uD83D\\uDE02
+error writing "stdout": illegal byte sequence
+% encoding convertto utf-8 \\uD83D\\uDE02
+unexpected character at index 0: 'U+00D83D'
+
+ +If you really want to output invalid UTF-8, you can +use the `cesu-8` encoding: +
+    % encoding convertto cesu-8 \\uD83D\\uDE02
+    😊+    % fconfigure stdout -encoding cesu-8
+    % puts \\uD83D\\uDE02
+    😂
+
+ +The `-nocomplain` option won't give the desired effect in this case: +
+    % encoding convertto -nocomplain utf-8 \\uD83D\\uDE02
+    ��
+
+Note that � is the UTF-8-encoded form of the replacement character `�` + +Extensions using `Tcl_UniCharToUtf()` in Tcl 8.7 always +encounter the behaviour that calling `Tcl_UniCharToUtf()` +with a lower surrogate followed by another `Tcl_UniCharToUtf()` +call with a higher surrogate will output a 4-byte UTF-8 +sequence: The first call outputs a single byte, the second +call outputs the remaining 3 bytes. So, combining the two +surrogates is handled internally, and it cannot be switched off. +In Tcl 9.0, with this TIP, the combining of surrogates is +no longer handled automatically, only when the `TCL_COMBINE` +flag is used. + +In Tcl 8.7, the `TCL_COMBINE` flag will be defined too, but it +simply has the value `0`. This is meant as a help for +code written for Tcl 9.0, so it compiles/runs unchanged +in Tcl 8.7. + +# Implementation + +Available in the [`tip-619`](https://core.tcl-lang.org/tcl/timeline?r=tip-619) branch. + +This branch targets 9.0. + +# Copyright + +This document has been placed in the public domain. ADDED tip/620.md Index: tip/620.md ================================================================== --- /dev/null +++ tip/620.md @@ -0,0 +1,51 @@ +# TIP 620: Treeview cell padding. + Author: Peter Spjuth + State: Final + Type: Project + Vote: Done + Vote-Summary: Accepted 8/0/0 + Votes-For: MC, BG, KBK, AKU, SL, JN, FV, KW + Votes-Against: none + Votes-Present: none + Created: 9-Mar-2022 + Tcl-Version: 8.7 + Keywords: Tk, treeview + Tk-Branch: pspjuth-treeview +----- + +# Abstract + +This TIP adds a -padding flag to treeview tags. + +# Rationale + +Experimenting with image cells, added in [[552]](552.md), it became apparent +that there is no way to choose zero padding for a cell. +Placing an image in the corner of a cell, like Excel does when a cell has +a comment, feels like a reasonable use case to support. + +Outside of the very flexible and configurable TTK_LAYOUT machinery, +a fixed 4-pixel horizontal padding is added to every cell which neither +themes, styles nor users can affect. + +# Specification + +Tags are extended with the -padding flag. With item tags, it affects all cells in the item, including the tree column. With cell tags, it affect that cell. + +The extra padding {4 0} will only be added if no style or tag setting is done. +Thus acting as a default value for the "-padding" Cell styling option. + +# Incompatibilities + +If the Cell styling option "-padding" is used in any theme or application, the lost padding will give a visual change. +They would need to adjust their padding to include those 4 pixels if they want them. They are now in full control of the padding. + +Note that the cell in the tree column has the class "Item". Value cells have the class "Cell", and are the ones affected here. + +# Implementation + +Started on branch [`pspjuth-treeview`](https://core.tcl-lang.org/tk/timeline?r=pspjuth-treeview) + +# Copyright + +This document has been placed in the public domain. ADDED tip/621.md Index: tip/621.md ================================================================== --- /dev/null +++ tip/621.md @@ -0,0 +1,79 @@ +# TIP 621: Glyph clustering for Tk + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 16-Mar-2022 + Tcl-Version: 8.7 + Keywords: Tk, ICU + Tk-Branch: glyph_indexing_2 + Vote-Summary Accepted 3/0/1 + Votes-For: FV, JN, KW + Votes-Against: none + Votes-Present: KBK +----- + +# Abstract + +At this moment, Tk doesn't know anything about Unicode glyphs. This TIP implements an +interface with [ICU](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/) +(or the Glyph API in MacOSX), such that Tk knowns what a glyph is and can handle it. + +# Specification + +The following new functions are implemented in Tk. They all have two fixed +parameters and an optional one. + +
+    ::tk::startOfCluster string start ?locale?
+    ::tk::endOfCluster string start ?locale?
+    ::tk::startOfNextWord string start ?locale?
+    ::tk::startOfPreviousWord string start ?locale?
+    ::tk::endOfWord string start ?locale?
+    ::tk::wordBreakAfter string start ?locale?
+    ::tk::wordBreakBefore string start ?locale?
+
+ +Here the `string` refers to the string being handled, `start` is the current +position in this string, and the functions will return a new position in the +string. If there is no such position (e.g. the end of the string is reached), +the empty string is returned. + +`locale` can be something like `en` or `en_GB`. For most locales it doesn't +have any effect (Tk even doesn't use this in the current bindings). The +ICU implementation handles the `locale` parameter, the MacOSX +implementation currently doesn't. + +Those functions are used in the Tk bindings of entries, spinboxes and text, +and have the result that `Delete` deletes the full Glyph in stead of only +a single Unicode character. And - for example - the `<>` and +`<>` virtual events (Cursor right/left) will jump to the +next/previous Glyph in stead of the next/previous Unicode code point. + +Also, especially for MacOS, there are new key modifiers "Fn" and "Num". +"Fn" is equivalent to "Mod4" and can be used to make the "Fn+e" key +combination usable to access Emoji. "Num" is equivalent to "Mod3" +and can be used to access the extended numerical keys. + +If ICU is not available, a minimal implementations of those functions +are implemented. Those minimal functions only know about Unicode +surrogates, nothing else. + +On MacOSX, only `::tk::startOfCluster` and `::tk::endOfCluster` are +implemented using the MacOSX API. The other ones fallback to `tcl_startOfNextWord` +/`tcl_startOfPreviousWord` /`tcl_endOfWord`/`tcl_wordBreakAfter`/`tcl_wordBreakBefore`. + +ICU knowns all about the first 5 functions in the list, only `::tk::wordBreakAfter`/`::tk::wordBreakBefore` +have a minimal implementation, just calling `tcl_wordBreakAfter`/`tcl_wordBreakBefore`. + +Since X11, the MacOSX API and ICU all use UTF-16, while Tcl 9.0 uses UTF-32 internally, +it turns out that Tk best is compiled with `-DTCL_UTF_MAX=3`, even with Tcl 9.0 which +uses `-DTCL_UTF_MAX=4`. + +# Implementation + +On branch [`glyph_indexing_2`](https://core.tcl-lang.org/tk/timeline?r=glyph_indexing_2) + +# Copyright + +This document has been placed in the public domain. ADDED tip/622.md Index: tip/622.md ================================================================== --- /dev/null +++ tip/622.md @@ -0,0 +1,142 @@ +# TIP 622: Full Unicode for Tcl 8.7 + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 23-Mar-2022 + Tcl-Version: 8.7 + Keywords: Tcl + Tcl-Branch: full-utf-for-87 + Vote-Summary: Accepted 5/0/1 + Votes-For: AK, JN, KBK, KW, SL + Votes-Against: none + Votes-Present: JD +----- + +# Abstract + +Although Tcl 8.7 understands quite a lot of Unicode, one thing it +still cannot: +
+$ tclsh8.7
+% string length 🤝
+2
+
+ +The reason for this is that - internally - sizeof(Tcl_UniChar) == 2, and +this is visible in the full Tcl C API. `"string length"` counts UTF-16 +code-points, not the number of Unicode characters. Changing that (defining +TCL_UTF_MAX = 4) means that the C-API would change behaviour. E.g. +
+    Tcl_Obj *obj = Tcl_NewObj("🤝x");
+    int size = Tcl_UniCharLength(obj);
+    Tcl_UniChar *uniCharString = Tcl_GetUnicode(obj);
+    Tcl_UniChar *partOfTheString = Tcl_GetRange(obj, 2, 2);
+
+Since, in Tcl 8.6, the above example gives `size = 3`, `uniCharString` +being a 16-bit array and `partOfTheString` will contain the value "x", we +cannot change that in Tcl 8.7: Extensions depending on that, compiled +against Tcl 8.6 headers, would lead to different behavior when loaded +in Tcl 8.7. The C-API must stay binary compatible. + +This TIP proposes to change TCL_UTF_MAX=4 internally, and create a +UTF-16 compatibility layer of stub entries such that extensions +won't be affected. This compatibility layer will only be implemented +for Tcl 8.7, it won't be forward-merged to Tcl 9.0! + +# Specification + +In `tcl.h`, determine TCL_UTF_MAX as follows: +
+    #ifndef TCL_UTF_MAX
+    #   ifdef BUILD_tcl
+    #	define TCL_UTF_MAX		4
+    #   else
+    #	define TCL_UTF_MAX		3
+    #   endif
+    #endif
+
+ +This means, that Tcl is built using UTF-32 internally. A new set of +stub entries is created for 5 functions: +
+    int TclNumUtfChars(const char *, int)
+    int TclGetCharLength(Tcl_Obj *)
+    const char *TclUtfAtIndex(const char *, int)
+    Tcl_Obj *TclGetRange(Tcl_Obj *, int, int)
+    int TclGetUniChar(Tcl_Obj *, int)
+
+Those 5 functions are used everywhere in Tcl, and those functions count in UTF-32. +So `TclNumUtfChars("🤝", -1)` will return `1`, not `2` as Tcl 8.6 does. But +extensions using `Tcl_NumUtfChars`/`Tcl_GetCharLength`/`Tcl_UtfAtIndex` will +continue to use the original functions, which count UTF-16 characters. + +Extensions which want to use the new UTF-32 functions, can define `TCL_UTF_MAX=4` +before including `tcl.h`, then `Tcl_NumUtfChars`/`Tcl_GetCharLength`/`Tcl_UtfAtIndex`/ +`Tcl_GetRange`/`Tcl_GetUniChar` will be mapped to `TclNumUtfChars`/ +`TclGetCharLength`/`TclUtfAtIndex`/`TclGetRange`/`TclGetUniChar`. + +Also, the following 3 functions which were deprecated in Tcl 8.7 (because +they don't work well with UTF-32) are added to this compatibility layer: +
+    int Tcl_UniCharNcmp(const Tcl_UniChar *, const Tcl_UniChar *, unsigned long);
+    int Tcl_UniCharNcasecmp(const Tcl_UniChar *, const Tcl_UniChar *, unsigned long);
+    int Tcl_UniCharCaseMatch(const Tcl_UniChar *, const Tcl_UniChar *, int);
+
+Those 3 functions are still deprecated (See [TIP #542](542.md)), but they are +implemented in the UTF-16 compatibility layer for Tcl 8.7. In Tcl 9.0, they are gone. + +Finally, the `"string"` objType is renamed to `"utf32string"`, and a new +`"string"` objType is implemented which uses UTF-16 codepoints. This +objType is used in the compatibility layer of the following 5 functions: +
+    Tcl_UniChar *Tcl_GetUnicode(Tcl_Obj *);
+    Tcl_UniChar *Tcl_GetUnicodeFromObj(Tcl_Obj *, int *);
+    Tcl_Obj *Tcl_NewUnicodeObj(Tcl_UniChar *, int);
+    Tcl_SetUnicodeObj(Tcl_Obj *, Tcl_UniChar *, int);
+    void Tcl_AppendUnicodeToObj(Tcl_Obj *, const Tcl_UniChar *, int)
+
+ +If Tcl is compiled with `-DTCL_NO_DEPRECATED`, then the UTF-16 compatibility +layer is removed. This is meant to verify that the compatibility layer is not +used internally anywhere. This also means that extensions using any of the +above API will _Panic_. Compiling the extension with `-DTCL_UTF_MAX=4` will +make the extension work again, but this is only meant for test +purposes, not for production! + +Finally, this TIP proposes to undo the deprecation of `Tcl_AppendUnicodeToObj`. +Although this was proposed in [TIP #542](542.md), it turned out that this function +could not really be removed, it just moved to be a internal stub function in +Tcl 9.0. Therefore, there is no burden exposing it again. + +# Caveat + +Since - internally - `TCL_UTF_MAX` is raised from 3 to 4, this influences +the behavior of the encoding/decoding functions. For example, the following code; +
+    Tcl_EncodingState state;
+    int read;
+    Tcl_Encoding encoding = Tcl_Encoding("utf-8");
+    char buf[TCL_UTF_MAX] = "";
+    int result = Tcl_ExternalToUtf(interp, encoding, "🤝",
+	    4, flags, &state, buf,
+	    sizeof(buf), &read, NULL, NULL);
+
+In Tcl 8.6, after doing this call, `buf` will be filled with +the bytes 0xED 0xA0 0xBE, which is the cesu-8 representation +of a high surrogate. The function `Tcl_ExternalToUtf` in Tcl 8.6 +is guaranteed to provide some output if the buffer provided has +at least 3 bytes. In Tcl 8.7, buffers used for `Tcl_ExternalToUtf` +or `Tcl_UtfToExternal` need at least 4 bytes, otherwise +4-byte utf-8 sequences cannot be handled. +Therefore, in Tcl 8.7, the above example won't give +any output (`read` = 0), since the buffer cannot handle +even a single unicode character. + +# Implementation + +See branch [`full-utf-for-87`](https://core.tcl-lang.org/tcl/timeline?r=full-utf-for-87) + +# Copyright + +This document has been placed in the public domain. ADDED tip/623.md Index: tip/623.md ================================================================== --- /dev/null +++ tip/623.md @@ -0,0 +1,230 @@ +# TIP 623: Bless negative index arguments to Tcl_GetRange + Author: Don Porter + State: Final + Type: Project + Vote: Done + Created: 24-Mar-2022 + Tcl-Version: 8.6.13 + Tcl-Branch: tip-623 + Vote-Summary: Accepted 3/0/0 + Votes-For: DGP, JN, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Proposes official approval and documentation of a meaning for +negative index values passed to **Tcl\_GetRange** which have long been +used unofficially with compromised reliability. + +# Background + +The routine + + > Tcl\_Obj\* **Tcl\_GetRange**\(Tcl\_Obj\* _objPtr_\, int _first_, int _last_) + +first appeared in [23b23af342](http://core.tcl-lang.org/tcl/info/23b23af342) +and was first released in Tcl 8.2. From the beginning it was documented: + + > **Tcl\_GetRange** returns a newly created object comprised of the + > characters between _first_ and _last_ (inclusive) in the object’s + > Unicode representation. If the object’s Unicode representation is + > invalid, the Unicode representation is regenerated from the object’s + > string representation. + +This same documentation is in the Tcl 8.6.12 release unchanged other than +the replacement of the words _object_ by _value_. This reflects a legacy +documentation practice widespread in Tcl where the functionality of a routine +is not documented in explicit terms of valid argument ranges and +corresponding results, but instead in terms of a somewhat vague description +of how the routine might be implemented. + +The documentation suggests that **Tcl\_GetRange** might be understood as +the equivalent of + + > **Tcl\_NewUnicodeObj**\(**Tcl\_GetUnicode**\(_objPtr_) + _first_, _last_ - _first_ + 1) + +(In fact, it was never implemented precisely in that way, and the +implementation has been revised multiple times over the years.) +With this understanding, all non-empty substrings of the non-empty string +value _objPtr_ (with length of **N** characters, **N** > 0) are produced +by the index ranges 0 <= _first_ <= _last_ < **N**. Any plausible +implementation of **Tcl\_GetRange** has to support those argument values. +The callers of **Tcl\_GetRange** within the source code of Tcl 8.2 itself +stay within those argument limits. Support for other possible argument +values raises uncertainty. + +The header comment of the **Tcl\_GetRange** routine says: + + > **The first and last indices are assumed to be in the appropriate range.** + +However, the comment offers no detail on what that appropriate range is. +There are no tests that directly exercise **Tcl\_GetRange** from which the +limits might be inferred. Furthermore, the original implementation made +no checks of the values passed in for the _first_ and _last_ arguments. +This is true even though passing in a value of _last_ >= **N** to the +original Tcl 8.2 implementation caused it to read past the logical end of +the _objPtr_ value, possibly into uninitialized or unallocated memory. + +This is another legacy practice found in Tcl code with roots in an older +programming culture. The expense of argument checking was often avoided. +In its place was an assumption that a routine and its callers were trusted +partners seeking a common goal of a working program. A caller would have +no sensible reason to pass in a bad argument, so it was considered wasteful +to expend effort confirming it did not. In the unfortunate case when a +broken caller might pass a program-breaking argument value, +"_it could keep both pieces_" of the broken program. +The open source nature of Tcl offered assurance that the programmers of +every caller had the ability to peek inside and know what they were doing. +In this environment where arguments were not checked, no mechanisms were +established for reporting errors that would never be detected. +**Tcl\_GetRange** has no documented failure mode. It is compelled to +return some Tcl value, or abort the program. + +In more recent times, more and more software joins together larger and +larger collections of modules from multiple origins. The risks of +introducing a malicious module have increased, and interest in robust, +reliable operations has also grown. Libraries that can be induced to +access memory outside proper allocations and initializations receive +increasingly less acceptance. More powerful hardware has made the +costs of argument checking less noticeable. We also have developed a +greater appreciation for the freedom of implementation evolution provided +by stronger encapsulation at interfaces. The Tcl sources have been +gradually adapted over time to add more checks in more places, especially +at interfaces with foreign modules. + +Which returns us to the question of what values of _first_ and _last_ +the **Tcl\_GetRange** routine should accept. Since a caller must avoid +passing a value _last_ >= **N**, an implied burden on the caller is to +know or retrieve the value of **N**. In particular, a caller seeking +the suffix of _objPtr_, beginning with known valid index _first_ and +continuing to the end of the string, needs the value **N** to be able to +pass (**N** - 1) as the _last_ argument. The analogous Tcl +command **string range** is easier to use since it allows a special +value **end** as an index argument. A C programmer is inspired by that +example to seek out an equivalent. + +Within all of that context, a programmer might notice that the routine + + > Tcl\_Obj\* **Tcl\_NewUnicodeObj**\(Tcl\_UniChar\* _unicode_, int _numChars_) + +has two documented modes of operation. When _numChars_ >= 0, a new value +of length _numChars_ is created and returned, initializing from _unicode_. +However, when _numChars_ < 0, the new value initializes from _unicode_ +up to, but not including, the first null character. Combine this observation +with the simple implementation of **Tcl\_GetRange** hypothesized above and +suggested by its documentation, and one might craft the clever solution, + + > **Tcl\_GetRange**\(_objPtr_, _first_, -2) + +as a call that can perform the suffix operation in many circumstances. + +When _last_ is -2, the quantity (_last_ - _first_ + 1) is (-1 - _first_), +and when it is known 0 <= _first_ < **N** <= **INT\_MAX**, it becomes +clear that _numChars_ is negative. For this scheme to work, it is +necessary that **Tcl\_GetUnicode** returns a pointer to a Tcl\_UniChar +array terminated by a null character. That is not documented, but it has +been true. The scheme also only works if the value of _objPtr_ does +not contain a null character. This is a bug in the strategy, but one which +might not be encountered in normal operations. The scheme also only +works when **Tcl\_GetRange** is implemented as hypothesized, +or in a way that duplicates every result that hypotehetical approach +would produce. There is an even rarer bug lurking in calls where _objPtr_ +has a mal-encoded string rep containing a NUL byte. + +When _last_ is -1 instead, the utility as a suffix operation is almost as +good. The only failure mode added is when _first_ is 0. A caller might +test or otherwise rule out that case, since the suffix beginning at +index 0 is trivially known to be _objPtr_ itself. The value of -1 is +used to signal special operations or conditions in several places in Tcl, +which might also inspire this choice. For other increasingly negative values +for _last_, the scheme grows increasingly fragile as it fails for shorter and +shorter _objPtr_ values due to overflow. + +While this strategy of gaming a presumed **Tcl\_GetRange** implementation +supports this one useful calling mode, it also produces some absurd results. +For example, when **N** >= 3, the call + + > **Tcl\_GetRange**\(_objPtr_, 2, 0) + +produces the same result as the call + + > **Tcl\_GetRange**\(_objPtr_, 2, **N** - 1) + +which is at least surprising. If this anomaly had been noticed first, +I expect it would have been perceived as a bug and fixed. + +The suffix scheme for calling **Tcl\_GetRange** failed in the original +release, because **Tcl\_NewUnicodeObj** did not implement its documented +second mode. This bug [218974](http://core.tcl-lang.org/tcl/info/218974) +was fixed for release Tcl 8.2.3 . + +Checkin [174db4e4cd](http://core.tcl-lang.org/tcl/info/174db4e4cd) added +an optimization case to **Tcl\_GetRange** when _objPtr_ is a bytearray. +This change first appeared in release Tcl 8.6.0. The optimized branch +did not duplicate the prior results when (_last_ - _first_ + 1) is negative +(because **Tcl\_NewByteArrayObj** does not support a compatible special +mode for a negative _length_ value). +This increased the circumstances where the suffix scheme fails, and where +the results of **Tcl\_GetRange** violate the EIAS principle. + +During the development of TIP [[389]](389.md), the consistency and +safety concerns with out of range index values were noticed, and checks +were added to the **Tcl\_GetRange** routine +[c22b158bd6](http://core.tcl-lang.org/tcl/info/c22b158bd6) and +those checks later merged into the 8.7 branch +[e109760b1c](http://core.tcl-lang.org/tcl/info/e109760b1c). +Ticket +[767e070d35](http://core.tcl-lang.org/tcl/info/767e070d35) raised the +same concerns about Tcl 8.6, and the index value checks were backported +and then released in Tcl 8.6.11. All these changes were made from +the point of view of improving safety and clarity. There was no +awareness of the semi-utility of the suffix scheme. + +Earlier this year ticket +[e9a2715d91](http://core.tcl-lang.org/tcl/info/e9a2715d91) raised +the alarm about the "significant change" to **Tcl\_GetRange** in +Tcl 8.6.11. The comments on that ticket are a record of discovery +of the events summarized above. + +# Proposal + +Revise **Tcl\_GetRange** to have defined and documented behavior +when negative values are passed as the _first_ or _last_ arguments. + +When _first_ is negative, **Tcl\_GetRange** behaves as if _first_ == 0. + +When _last_ is negative, and the length of _objPtr_ is **N** characters, +**Tcl\_GetRange** behaves as if _last_ == **N** - 1. + +In the Tcl 9 interface, these arguments have type **ptrdiff\_t**. + +# Compatibility + +This implementation is incompatible with Tcl releases 8.6.11 and 8.6.12. +It restores a degree of compatibility with Tcl releases up to 8.6.10. + +The compatibility point only concerns negative values of the _last_ +argument. Many programmers have considered those values to be out +of scope, so the change will not have impact on them. Those programmers +who did make use of this range of argument values will now benefit from +having this functionality documented and supported. + +# Addendum + +After [TIP #660](660.md) was accepted, a lot of functions changed from +using size\_t to ptrdiff\_t parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. + +# Implementation + +This change is already in place on the Tcl 8.6 development branch and +is poised to be released in Tcl 8.6.13. To the extent the documentation +and implementation do not fully and clearly conform to this TIP, they +will be updated prior to release of Tcl 8.6.13. + +# Copyright + +This document has been placed in the public domain. + ADDED tip/624.md Index: tip/624.md ================================================================== --- /dev/null +++ tip/624.md @@ -0,0 +1,37 @@ +# TIP 624: Deprecate Tcl_MakeSafe + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 06-April-2022 + Tcl-Version: 8.7 + Keywords: Tcl + Tcl-Branch: rfe-655300 + Vote-Summary Accepted 5/0/1 + Votes-For: DGP, FV, JN, KBK, SL + Votes-Against: none + Votes-Present: MC +----- + +# Abstract + +This TIP proposes to deprecate `Tcl_MakeSafe`, and fully remove it +in Tcl 9.0 + +# Specification + +For a discussion why `Tcl_MakeSafe` is bad, see [https://core.tcl-lang.org/tcl/tktview?name=655300|RFE 655300]. + +There is no known extension using `Tcl_MakeSafe`. And if there were, `Tcl_MakeSafe` would not +be doing the expected job anyway. It is not - generally - possible for a non-safe interpreter to +become safe: The core doesn't know which of the commands added after construction are supposed +to be safe or not. So, the only way to create a safe interpreter should be to start with one +from the start. + +# Implementation + +See branch [`rfe-655300`](https://core.tcl-lang.org/tcl/timeline?r=rfe-655300) + +# Copyright + +This document has been placed in the public domain. ADDED tip/625.md Index: tip/625.md ================================================================== --- /dev/null +++ tip/625.md @@ -0,0 +1,2005 @@ +# TIP 625: Re-implementation of lists + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 17-05-2022 + Tcl-Version: 8.7 + Keywords: Tcl + Tcl-Branch: tip-625 + Vote-Summary Accepted 3/0/0 + Votes-For: BG, JN, KW + Votes-Against: none + Votes-Present: none +----- + +* Abstract +* Rationale +* Specification + * Internal representation + * Invariants + * ListStore space allocation + * Apportioning of additional space + * Space management in unshared representation + * Span management +* Performance + * Performance testing scripts + * Performance measurements + * list and list expansion + * lappend + * linsert + * lrange + * lassign + * lpop + * lset + * lremove + * lreplace + * lreverse + * lsort + * lsearch + * concat + * lindex + * join + * split + * llength + * lrepeat + * lmap + * foreach + * Memory statistics + * Memory leaks + * Memory usage +* Tests +* Implementation +* Copyright + + + +# Abstract + +The current implementation of lists in Tcl is efficient for operations on the +tail but can be slow in many other cases. This TIP proposes an alternate +implementation to improve performance while maintaining full compatibility at +both the script and public C API levels. No new functionality is proposed. +Performance measurements are included for all list commands to support the +case for the new implementation. + +Although the TIP targets 8.7, there is nothing in the implementation that +would prevent integration with 8.6. + + +# Rationale + +The current list implementation is based on an internal representation that +stores elements in a reference counted structure with a dynamically sized +array field at the end. Allocations after the initial creation include +extra trailing space so that new elements can be quickly appended without +reallocation. Deletion from the back is also quick as it only requires updating +a count. **Both these optimizations however require the list Tcl_Obj as well +as the internal representation to be unshared**, which although not infrequent, +limits their applicability even accounting for the K operator idiom. + +The proposed implementation is also based on a variable size struct used to +store the list elements. As before, the initial allocation of list structures is +of the exact required size. However, reallocations caused by list operations +leave optional additional space in the front as well as the back. The same +efficiencies that apply to list tails in the current implementation can thus +also be applied to the list head. In addition, a list Tcl_Obj internal +representation includes an optional *span* structure that delineates a subrange +of elements in the master structure. + +The changes have the following benefits in performance for some frequently used +operations: + +- Range operations are very fast, even for shared objects. + +- Deletions from the head and tail are very fast since +these boil down to range operations. Again, this applies to shared objects as well. + +- Insertions at head of unshared objects are as fast as appending. Under some +circumstances, this is possible even when the object is shared. + +The measured performance of all commands for a number of conditions is given in +[Performance](#Performance). Aside from obvious issues of correctness, the +content of that section should determine acceptance or rejection of the TIP. + +The following sample sequences illustrate some of the more substantial +improvements for value based list commands. + +** 8.7 ** + +``` +% timerate -calibrate {} +0.03367925540411432 µs/#-overhead 0.033679 µs/# 57958526 # 29691867 #/sec +% set L [lrepeat 1001 x] ; set idx 0 +0 +% timerate {lrange $L 1 end-1} +4.904651 µs/# 202498 # 203888 #/sec 993.182 net-ms +% timerate {set L [linsert $L $idx x]} 1000 1000 +6.572000 µs/# 1000 # 152160 #/sec 6.572 net-ms +% timerate {set L [lremove $L end]} 1000 1000 +6.004000 µs/# 1000 # 166555 #/sec 6.004 net-ms +% timerate {set L [lassign $L x]} 1000 1000 +2.305000 µs/# 1000 # 433839 #/sec 2.305 net-ms +``` + +** TIP 625 ** + +``` +% timerate -calibrate {} +0.03181002427730623 µs/#-overhead 0.031810 µs/# 61364304 # 31436631 #/sec +% set L [lrepeat 1001 x] ; set idx 0 +0 +% timerate {lrange $L 1 end-1} +0.125190 µs/# 6369421 # 7987846 #/sec 797.389 net-ms +% timerate {set L [linsert $L $idx x]} 1000 1000 +0.499000 µs/# 1000 # 2004008 #/sec 0.499 net-ms +% timerate {set L [lremove $L end]} 1000 1000 +0.503000 µs/# 1000 # 1988071 #/sec 0.503 net-ms +% timerate {set L [lassign $L x]} 1000 1000 +0.286000 µs/# 1000 # 3496503 #/sec 0.286 net-ms +``` + +The improvement is even more pronounced with larger lists. + +Commands that operate on list variables show similar improvements when operating +on shared values. Benefits on unshared values are less pronounced but still +present in many cases. + +Commands that show significant improvement (multiples) in specific cases +include `linsert`, `lrange`, `lassign`, `lreplace`, `lpop` and `lremove`. +The [Performance](#Performance) section has the details. + +In addition to execution time, memory usage is also a consideration when it +comes to performance. Sharing of storage as above raises issues with regard to +when unreachable memory is actually freed. This is discussed in +[Memory usage](#Memoryusage). + +# Specification + +## Internal representation + +The internal representation of a list is implemented through three structs. + +The `ListStore` struct is a structure that includes a variable size array that +serves as storage for a Tcl list. A contiguous sequence of slots in the array, +the *in-use* area, holds valid pointers to `Tcl_Obj` values that belong to one +or more Tcl lists. The unused slots before and after these are free slots that +may be used to prepend and append to the list without having to reallocate the +struct. The `ListStore` may be shared amongst multiple lists and is reference +counted. + +``` +typedef struct ListStore { + int refCount; /* Count of references to this span record */ + int firstUsed; /* Index of first slot in use within the slots[] array */ + int numUsed; /* Number of slots in use (starting at index firstUsed) */ + int numAllocated; /* Total number of slots[] array slots. */ + int flags; /* LISTSTORE_* flags */ + Tcl_Obj *slots[1]; /* Variable size array to be grown as needed */ +} ListStore; +``` + +A `ListSpan` struct defines a sequence of slots within a `ListStore`. This +sequence always lies within the *in-use* area of the `ListStore`. Like +`ListStore`, the structure may be shared among multiple lists and is reference +counted. + +``` +typedef struct ListSpan { + int refCount; /* Count of references to this span record */ + int spanStart; /* Starting index within parentList where the span */ + int spanLength; /* Number of elements in the span */ +} ListSpan; +``` + +A `ListRep` struct holds the internal representation of a Tcl list as stored +in a `Tcl_Obj`. It is composed of a `ListStore` and a `ListSpan` that together +define the content of the list. The `ListSpan` specifies the range of slots +within the `ListStore` that hold elements for this list. The `ListSpan` is +optional in which case the list includes all the in-use slots of the +`ListStore.` + +``` +typedef struct ListRep { + ListStore *storePtr;/* Storage area shared amongst different lists */ + ListSpan *spanPtr; /* If not NULL, the span holds the range of slots + within *storePtr that contain this list elements. */ +} ListRep; +``` + +### Invariants + +In addition to the obvious invariants related to correctness, such as relations +between indices and lengths, the implementation maintains the following invariants +as a design choice. + +1. If a `ListStore` is referenced from any `ListRep`/`Tcl_Obj` whose spanPtr field +is NULL, the firstUsed field of the `ListStore` must be 0, i.e. the in-use area +begins right at the front. To put it another way, if a `ListRep` does not have a +span, its `ListStore` has no free space in the front. This invariant is not +mandated for correctness, but maintaining it permits prepending to even **shared** +`ListStore` instances under certain conditions as described in +[Insertion](#Insertion). + +2. List objects created from other types (via the string representation) always +have NULL spans. This means a list object created with a span will always start +without a string representation and thus have a canonical string representation +when it is generated. This is used in determining [Canonical lists](#Canonicallists). + +### ListStore space allocation + +When a `ListRep` list internal representation is created through `Tcl_NewListObj` or +through conversion from another internal type, a `ListStore` is created with the +`slots[]` array of size exactly that requested. As in the pre-TIP 625 implementation, +no extra space is allocated. The rationale for this is that lists are often created +and never modified thereafter so the extra space is wasted. + +On the other hand, when a command such as `lappend` requires reallocation, a +`ListStore` is allocated with twice the space required by the current request. +This is based on the assumption that once an operation is executed it is likely +that further operations will be also be invoked. Allocating additional space +up front makes these much more efficient. + +The above allocation strategy applies to the pre-TIP 625 list implementation as +well as the proposed one. The differences are + +- While all extra space in the pre-TIP 625 implementation is trailing, the proposed +implementation apportions it between the leading and trailing areas as described +below. + +- When a list operation results in a **smaller** list, if the space in-use has +shrunk to less than a quarter of the allocated space, the `ListStore` is +reallocated. This memory usage optimization is orthogonal to the rest of this +TIP and may be removed without affecting anything else. + +#### Apportioning of additional space + +When reallocation is triggered by an operation that increases the list size, the +additional allocated space is apportioned between the front and the back in the +following manner. + +- For operations that append elements, if it is likely that the list has only had +append opertions invoked (can be determined through the absence of a span), all +extra space is allocated to the back. Otherwise, three fourth of the extra space is +allocated to the back and a fourth to the front. + +- For operations that prepend elements, three fourth of the extra space is +allocated to the front and a fourth to the back. + +- For operations that insert in the middle, the additional space is equally allocated +to the front and the back. + +The above heuristic is plucked out of thin air, so to speak, but does not seem +entirely unreasonable based on [benchmarks](#Performance). It is completely +subject to change. + +#### Space management in unshared representation + +When both the `Tcl_Obj` and its `ListRep` are unshared, the in-use area within +the `ListStore` may be moved to make room for new elements assuming the total +allocated space is large enough. In the pre-TIP 625 implementation, elements can +only be shifted upward (to higher index slots) since any allocated space is +always at the back. The availability of leading space in the proposed +implementation enables additional optimization. Assuming the availability of +both leading and trailing free space, the implementation chooses to move the +smaller segment. For example, inserting at index `1` in a list will cause the +single element at index `0` to be moved down to make room. Inserting at index +`end-1` on the other hand will cause the single element at the end to be moved up. + +### Span management + +The introduction of spans into the internal representation of lists is the primary +design change proposed by this TIP. The use of spans offers some significant +advantages + +- A basic range operation implemented using spans is very fast. +Since deletions from the front and back can be +thought of as range operations, those benefit from the same speed-up. + +- A list with a spanned internal representation offers the same O(1) efficiency +(instead of O(n)) for prepending as was previously available only for appending. + +The speed up for even moderately sized (few thousand elements) lists can be orders of magnitude faster for some operations as presented in the +[Performance](#Performance) section. + +However, use of spans also has some drawbacks. + +- There is a execution cost associated with allocating an additional block of memory +to hold the `ListSpan` struct if not already existing. + +- There is a potential memory cost in holding on to more memory than necessary. +For example, consider a `lrange` command that extracts 5 elements from a list of +a thousand elements. If the source list object is released after use, a span +based implementation would hold on to the 1000-element `ListStore` even though +only five elements were actually being referenced. + +The code implements certain allocation policies to tackle the above issues. +See [Memory usage](#Memoryusage) for a further discussion. + +# Performance + +The whole motivation for this TIP is performance so this section provides supporting +data in the form of benchmark results for all the list commands. + +Needless to say, all the standard cautions regarding interpretation of +benchmarks apply. + +## Performance testing scripts + +The numbers in this section are generated with the `listPerf.tcl` and +`comparePerf.tcl` scripts in the `tests-perf` directory. The former generates +test data for a Tcl implementation while the latter is used to compare multiple +test runs. For example, the tables for the `lappend` command can be generated by + +``` +d:\tcl\core-8-branch\x64\bin\tclsh87.exe listPerf.tcl --label core-8-branch lappend > core-8-branch.perf +d:\tcl\tip-625\bin\tclsh87.exe listPerf.tcl --label tip-625 lappend > tip-625.perf +tclsh comparePerf.tcl --print-test-number core-8-branch tip-625 +``` + +Not specifying the command (`lappend` above) will measure all list commands. +Both scripts have various options to control list lengths, run iterations and +so on. See the script source for details. + +Some caveats to keep in mind when interpreting results. + +- There is a fair amount of relative variance in results for smaller list sizes. +When running these scripts on Windows, it is very important to turn off all +unnecessary services and background shell processes. This greatly reduces +variance from run to run. The same is likely true on other platforms. To account +for other applications interfering, the test results are based on running each +test multiple times and averaging after discarding outliers (depending on total +iterations). + +- There is some difficulty in devising tests for unshared values. The overhead +for generating unshared values overshadows the actual test despite the use of +`timerate` calibration and `-overhead` options. + +- Currently there is a minimum list size threshold of 100 ( arbitrary and +subject to change after further measurements) for generating span based lists. +Thus the rows for lists of 100 items or fewer should show little difference. + +## Performance measurements + +**Note: These are preliminary figures. Both the implementation and tests need +tuning.** + +All tests run on 64-bit Windows 10. + +In the tables below, the first column `[1]` is the baseline 8.7 time in usecs. +Column `[2]` is the TIP 625 time in usecs and ratio of baseline time to TIP 625 +time (so 2.0 means TIP 625 is twice as fast). + +### list and list expansion + +**List creation from string** + +List creation is unaffected by TIP 625. The span in the `Tcl_Obj` is simply +set to NULL. + +``` + [1] [2] +1. 0.24900| 0.24350|1.02 |list L[10] from a string +2. 0.24410| 0.25000|0.98 |list L[100] from a string +3. 0.24200| 0.26010|0.93 |list L[1000] from a string +4. 0.24360| 0.24190|1.01 |list L[10000] from a string +``` + +**List creation from expanded lists** + +List expansion using the `{*}` operator is unchanged. The performance +improvements in rows 9 and 12 should be ignored as creating a list from a single +list degenerates into a range operation which is optimized in TIP 625. It is +not generally applicable to the expansion operator. + +``` +5. 0.26960| 0.28310|0.95 |list L[10] from a {*}list +6. 0.43100| 0.42870|1.01 |list L[10] from a {*}list {*}list +7. 0.55480| 0.54280|1.02 |list L[100] from a {*}list +8. 0.73070| 0.67800|1.08 |list L[100] from a {*}list {*}list +9. 3.17630| 0.26440|12.01 |list L[1000] from a {*}list +10. 3.51040| 3.14870|1.11 |list L[1000] from a {*}list {*}list +11. 29.95070| 0.25500|117.45|list L[10000] from a {*}list +12. 31.90530| 28.23100|1.13 |list L[10000] from a {*}list {*}list +``` + +### lappend + +As seen from the table below, there is no real discernable difference between +the pre-TIP 625 implementation and TIP 625. This is to be expected as both optimize +list appends in almost identical fashion. + +``` + [1] [2] +1. 0.43330| 0.50000|0.87 |lappend L[5] shared 1 elems 10 times +2. 0.63000| 0.56670|1.11 |lappend L[50] shared 1 elems 100 times +3. 2.72930| 2.71200|1.01 |lappend L[500] shared 1 elems 1000 times +4. 26.32310| 24.00330|1.10 |lappend L[5000] shared 1 elems 10000 times +5. 0.20000| 0.20000|1.00 |lappend L[5] unshared 1 elems 10 times +6. 0.23000| 0.23000|1.00 |lappend L[50] unshared 1 elems 100 times +7. 0.22730| 0.22900|0.99 |lappend L[500] unshared 1 elems 1000 times +8. 0.22930| 0.22840|1.00 |lappend L[5000] unshared 1 elems 10000 times +9. 0.33330| 0.36670|0.91 |lappend L[5] unshared-span 1 elems 10 times +10. 0.25000| 0.26000|0.96 |lappend L[50] unshared-span 1 elems 100 times +11. 0.23930| 0.24170|0.99 |lappend L[500] unshared-span 1 elems 1000 times +12. 0.23750| 0.23980|0.99 |lappend L[5000] unshared-span 1 elems 10000 times +13. 32.06250| 29.77750|1.08 |lappend total run time +14. 32.06250| 29.77750|1.08 |Total run time +``` + +### linsert + +The linsert code pre-TIP 625 takes a different path when the index is a +constant from when it is a variable. In the former case the command is +executed entirely in byte code and is unchanged in TIP 625. The latter case +is implemented as a C function and has a new implementation in TIP 625. + +The tables below are split based on the above in addition to the usual +distinction between shared and unshared values. + +**Insertion into an shared list at a variable index** + +As expected, the greatest improvement in performance with TIP 625 for +insert operations is for repeated insertions at index 0 (rows 6, 7, 9, 10, 12, 13). +The improvement comes from the free leading space in a `ListStore` that allows +constant time insertion. **Note this is true even when the value is shared +provided certain conditions are met.** The magnitude of the improvement depends +on the list size and number of insertions ranging from 6x to 30x in the test +cases. + +The initial insert at index 0 (rows 5, 8, 11) shows no improvement. This is +because the initial list allocation is always an exact size as in the pre-TIP +625 implementation, with extra space only allocated on the first insertion. + +Insertions at other indices has no change in performance as the list storage +must always be reallocated when shared. + +Insertions at the end also do not exhibit any change in performance for +the same reason. **However, if the implementation was modified to always +allocate a span for every list, it would see similar gains as insertions +at index 0.** This is currently not done to avoid allocating spans on +initial allocation. + + +``` + [1] [2] +1. 0.24750| 0.24850|1.00 |linsert L[0] shared 1 elems 1 times at 0 (var) +2. 0.49820| 0.50050|1.00 |linsert L[10] shared 1 elems 1 times at 0 (var) +3. 2.06970| 0.42600|4.86 |linsert L[10] shared 1 elems 1000 times at 0 (var) +4. 8.91400| 0.59570|14.96 |linsert L[10] shared 5 elems 1000 times at 0 (var) +5. 0.78810| 0.71840|1.10 |linsert L[100] shared 1 elems 1 times at 0 (var) +6. 2.33900| 0.44600|5.24 |linsert L[100] shared 1 elems 1000 times at 0 (var) +7. 9.21300| 0.46500|19.81 |linsert L[100] shared 5 elems 1000 times at 0 (var) +8. 3.79430| 3.21220|1.18 |linsert L[1000] shared 1 elems 1 times at 0 (var) +9. 5.31230| 0.43000|12.35 |linsert L[1000] shared 1 elems 1000 times at 0 (var) +10. 12.25630| 0.47670|25.71 |linsert L[1000] shared 5 elems 1000 times at 0 (var) +11. 35.11010| 30.28560|1.16 |linsert L[10000] shared 1 elems 1 times at 0 (var) +12. 36.58100| 0.46070|79.40 |linsert L[10000] shared 1 elems 1000 times at 0 (var) +13. 43.44170| 0.45030|96.47 |linsert L[10000] shared 5 elems 1000 times at 0 (var) +14. 0.56020| 0.52930|1.06 |linsert L[10] shared 1 elems 1 times at 1 (var) +15. 2.25070| 1.82030|1.24 |linsert L[10] shared 1 elems 1000 times at 1 (var) +16. 8.92330| 7.68870|1.16 |linsert L[10] shared 5 elems 1000 times at 1 (var) +17. 0.77570| 0.72540|1.07 |linsert L[100] shared 1 elems 1 times at 1 (var) +18. 2.34870| 2.09230|1.12 |linsert L[100] shared 1 elems 1000 times at 1 (var) +19. 9.16830| 7.92000|1.16 |linsert L[100] shared 5 elems 1000 times at 1 (var) +20. 3.81680| 3.20380|1.19 |linsert L[1000] shared 1 elems 1 times at 1 (var) +21. 5.28400| 4.88830|1.08 |linsert L[1000] shared 1 elems 1000 times at 1 (var) +22. 12.31270| 10.48970|1.17 |linsert L[1000] shared 5 elems 1000 times at 1 (var) +23. 34.92510| 30.19400|1.16 |linsert L[10000] shared 1 elems 1 times at 1 (var) +24. 36.73070| 31.81330|1.15 |linsert L[10000] shared 1 elems 1000 times at 1 (var) +25. 43.21970| 38.56530|1.12 |linsert L[10000] shared 5 elems 1000 times at 1 (var) +26. 0.47370| 0.46620|1.02 |linsert L[10] shared 1 elems 1 times at 5 (var) +27. 2.07530| 1.79370|1.16 |linsert L[10] shared 1 elems 1000 times at 5 (var) +28. 8.96530| 7.67570|1.17 |linsert L[10] shared 5 elems 1000 times at 5 (var) +29. 0.77590| 0.70820|1.10 |linsert L[100] shared 1 elems 1 times at 50 (var) +30. 2.32600| 2.04500|1.14 |linsert L[100] shared 1 elems 1000 times at 50 (var) +31. 9.35530| 7.75070|1.21 |linsert L[100] shared 5 elems 1000 times at 50 (var) +32. 3.75230| 3.40850|1.10 |linsert L[1000] shared 1 elems 1 times at 500 (var) +33. 5.26800| 4.70970|1.12 |linsert L[1000] shared 1 elems 1000 times at 500 (var) +34. 12.28930| 10.39000|1.18 |linsert L[1000] shared 5 elems 1000 times at 500 (var) +35. 35.06610| 30.19210|1.16 |linsert L[10000] shared 1 elems 1 times at 5000 (var) +36. 36.68430| 31.26800|1.17 |linsert L[10000] shared 1 elems 1000 times at 5000 (var) +37. 43.36100| 38.76800|1.12 |linsert L[10000] shared 5 elems 1000 times at 5000 (var) +38. 0.57700| 0.57900|1.00 |linsert L[10] shared 1 elems 1 times at end-1 (var) +39. 2.09770| 1.89870|1.10 |linsert L[10] shared 1 elems 1000 times at end-1 (var) +40. 9.05570| 7.55030|1.20 |linsert L[10] shared 5 elems 1000 times at end-1 (var) +41. 0.80080| 0.76280|1.05 |linsert L[100] shared 1 elems 1 times at end-1 (var) +42. 2.41200| 2.12630|1.13 |linsert L[100] shared 1 elems 1000 times at end-1 (var) +43. 9.32400| 7.77270|1.20 |linsert L[100] shared 5 elems 1000 times at end-1 (var) +44. 3.84790| 3.32180|1.16 |linsert L[1000] shared 1 elems 1 times at end-1 (var) +45. 5.35570| 4.80630|1.11 |linsert L[1000] shared 1 elems 1000 times at end-1 (var) +46. 12.37500| 10.41570|1.19 |linsert L[1000] shared 5 elems 1000 times at end-1 (var) +47. 35.28820| 30.29200|1.16 |linsert L[10000] shared 1 elems 1 times at end-1 (var) +48. 36.78430| 31.61500|1.16 |linsert L[10000] shared 1 elems 1000 times at end-1 (var) +49. 44.48700| 39.07300|1.14 |linsert L[10000] shared 5 elems 1000 times at end-1 (var) +50. 0.64420| 0.55340|1.16 |linsert L[10] shared 1 elems 1 times at end (var) +51. 2.11600| 1.85770|1.14 |linsert L[10] shared 1 elems 1000 times at end (var) +52. 9.00430| 7.62200|1.18 |linsert L[10] shared 5 elems 1000 times at end (var) +53. 0.79890| 0.74750|1.07 |linsert L[100] shared 1 elems 1 times at end (var) +54. 2.42330| 2.05930|1.18 |linsert L[100] shared 1 elems 1000 times at end (var) +55. 9.48700| 7.78170|1.22 |linsert L[100] shared 5 elems 1000 times at end (var) +56. 3.80500| 3.30070|1.15 |linsert L[1000] shared 1 elems 1 times at end (var) +57. 5.61330| 4.72230|1.19 |linsert L[1000] shared 1 elems 1000 times at end (var) +58. 12.48070| 10.33970|1.21 |linsert L[1000] shared 5 elems 1000 times at end (var) +59. 35.22460| 29.26230|1.20 |linsert L[10000] shared 1 elems 1 times at end (var) +60. 37.17000| 31.39700|1.18 |linsert L[10000] shared 1 elems 1000 times at end (var) +61. 43.76670| 38.58900|1.13 |linsert L[10000] shared 5 elems 1000 times at end (var) +``` + +**Insertion into an unshared list at a variable index** + +The pre-TIP 625 implementation moves the contents of the list storage "in-place" +when it is unshared and thus is fairly efficient as it is. As with the shared +case, there is an measurable improvement with TIP 625 when repeated prepending +but is much less pronounced since moving memory is fairly fast to begin with. +The difference will however become more pronounced for larger lists. + +Moreover, this improvement also carries over to the case where the insertion is +at an index where the prefix is significantly shorter than the suffix around the +insertion point (77, 78). This is because with spans, there is both free leading +and trailing space permitting the shorter segment to be moved to make room for +insertions. + +``` + [1] [2] +62. 0.18780| 0.20680|0.91 |linsert L[0] unshared 1 elems 1 times at 0 (var) +63. 1.10530| 0.55870|1.98 |linsert L[10] unshared 1 elems 1000 times at 0 (var) +64. 1.00530| 0.57400|1.75 |linsert L[10] unshared 5 elems 1000 times at 0 (var) +65. 0.67730| 0.55030|1.23 |linsert L[100] unshared 1 elems 1000 times at 0 (var) +66. 0.98700| 0.57030|1.73 |linsert L[100] unshared 5 elems 1000 times at 0 (var) +67. 0.78970| 0.52500|1.50 |linsert L[1000] unshared 1 elems 1000 times at 0 (var) +68. 1.21670| 0.56600|2.15 |linsert L[1000] unshared 5 elems 1000 times at 0 (var) +69. 2.55330| 0.54470|4.69 |linsert L[10000] unshared 1 elems 1000 times at 0 (var) +70. 2.89630| 0.56370|5.14 |linsert L[10000] unshared 5 elems 1000 times at 0 (var) +71. 0.63900| 0.71400|0.89 |linsert L[10] unshared 1 elems 1000 times at 1 (var) +72. 1.03970| 1.27100|0.82 |linsert L[10] unshared 5 elems 1000 times at 1 (var) +73. 0.68130| 1.00930|0.68 |linsert L[100] unshared 1 elems 1000 times at 1 (var) +74. 1.04000| 0.68200|1.52 |linsert L[100] unshared 5 elems 1000 times at 1 (var) +75. 1.53330| 1.02900|1.49 |linsert L[1000] unshared 1 elems 1000 times at 1 (var) +76. 1.61600| 1.21000|1.34 |linsert L[1000] unshared 5 elems 1000 times at 1 (var) +77. 2.74670| 0.59370|4.63 |linsert L[10000] unshared 1 elems 1000 times at 1 (var) +78. 3.16400| 0.56770|5.57 |linsert L[10000] unshared 5 elems 1000 times at 1 (var) +79. 1.09870| 0.99970|1.10 |linsert L[10] unshared 1 elems 1000 times at 5 (var) +80. 1.00570| 1.28030|0.79 |linsert L[10] unshared 5 elems 1000 times at 5 (var) +81. 1.15530| 0.54670|2.11 |linsert L[100] unshared 1 elems 1000 times at 50 (var) +82. 1.00000| 0.88270|1.13 |linsert L[100] unshared 5 elems 1000 times at 50 (var) +83. 0.72100| 0.59070|1.22 |linsert L[1000] unshared 1 elems 1000 times at 500 (var) +84. 1.11730| 1.06100|1.05 |linsert L[1000] unshared 5 elems 1000 times at 500 (var) +85. 1.66330| 1.24730|1.33 |linsert L[10000] unshared 1 elems 1000 times at 5000 (var) +86. 2.07230| 1.27530|1.62 |linsert L[10000] unshared 5 elems 1000 times at 5000 (var) +87. 1.07970| 0.60230|1.79 |linsert L[10] unshared 1 elems 1000 times at end-1 (var) +88. 0.60630| 0.78870|0.77 |linsert L[10] unshared 5 elems 1000 times at end-1 (var) +89. 0.90630| 1.05270|0.86 |linsert L[100] unshared 1 elems 1000 times at end-1 (var) +90. 0.64300| 0.69070|0.93 |linsert L[100] unshared 5 elems 1000 times at end-1 (var) +91. 0.63330| 1.04100|0.61 |linsert L[1000] unshared 1 elems 1000 times at end-1 (var) +92. 0.62530| 1.13900|0.55 |linsert L[1000] unshared 5 elems 1000 times at end-1 (var) +93. 0.59200| 0.58500|1.01 |linsert L[10000] unshared 1 elems 1000 times at end-1 (var) +94. 0.61400| 0.61170|1.00 |linsert L[10000] unshared 5 elems 1000 times at end-1 (var) +95. 0.62470| 0.55700|1.12 |linsert L[10] unshared 1 elems 1000 times at end (var) +96. 0.65270| 0.62330|1.05 |linsert L[10] unshared 5 elems 1000 times at end (var) +97. 1.02030| 1.00730|1.01 |linsert L[100] unshared 1 elems 1000 times at end (var) +98. 0.62070| 0.57630|1.08 |linsert L[100] unshared 5 elems 1000 times at end (var) +99. 0.62030| 0.56030|1.11 |linsert L[1000] unshared 1 elems 1000 times at end (var) +100. 0.64170| 0.89930|0.71 |linsert L[1000] unshared 5 elems 1000 times at end (var) +101. 0.57830| 0.57030|1.01 |linsert L[10000] unshared 1 elems 1000 times at end (var) +102. 0.64330| 0.62070|1.04 |linsert L[10000] unshared 5 elems 1000 times at end (var) +``` + +**Insertion into an shared list at a constant index** + +While the variable index argument to `linsert` generates a callout to the +`Tcl_ListObjReplace` C function, when an constant index is supplied for the +`linsert` command, the generated byte code implements the command as a sequence +of range and concat operations. It thus does not profit from the same +efficiencies as the variable case. Nevertheless, at larger list sizes, there is +a benefit as a consequence of the faster range operations implemented in +TIP 625. This benefit is however mitigated by the fact that a new list object +always has to be created which is always an expensive operation. The net +improvement is therefore minor. + +There is currently no plan to modify the compiler generated bytecode to take +advantage of spans or any free space at the front of the list. + +``` + [1] [2] +103. 0.18540| 0.18130|1.02 |linsert L[0] shared 1 elems 1 times at 0 (const) +104. 0.25880| 0.26330|0.98 |linsert L[10] shared 1 elems 1 times at 0 (const) +105. 0.44330| 0.38000|1.17 |linsert L[10] shared 1 elems 100 times at 0 (const) +106. 1.22000| 0.96670|1.26 |linsert L[10] shared 5 elems 100 times at 0 (const) +107. 0.60530| 0.51480|1.18 |linsert L[100] shared 1 elems 1 times at 0 (const) +108. 0.73670| 0.62000|1.19 |linsert L[100] shared 1 elems 100 times at 0 (const) +109. 1.49330| 1.21330|1.23 |linsert L[100] shared 5 elems 100 times at 0 (const) +110. 3.95110| 2.93190|1.35 |linsert L[1000] shared 1 elems 1 times at 0 (const) +111. 4.13000| 3.28330|1.26 |linsert L[1000] shared 1 elems 100 times at 0 (const) +112. 4.97000| 3.83670|1.30 |linsert L[1000] shared 5 elems 100 times at 0 (const) +113. 38.36360| 28.76360|1.33 |linsert L[10000] shared 1 elems 1 times at 0 (const) +114. 37.51330| 29.32670|1.28 |linsert L[10000] shared 1 elems 100 times at 0 (const) +115. 39.89000| 30.17000|1.32 |linsert L[10000] shared 5 elems 100 times at 0 (const) +116. 0.47830| 0.51190|0.93 |linsert L[10] shared 1 elems 1 times at 1 (const) +117. 1.08000| 0.87330|1.24 |linsert L[10] shared 1 elems 100 times at 1 (const) +118. 3.25330| 1.90670|1.71 |linsert L[10] shared 5 elems 100 times at 1 (const) +119. 1.46070| 1.25230|1.17 |linsert L[100] shared 1 elems 1 times at 1 (const) +120. 1.89670| 1.64330|1.15 |linsert L[100] shared 1 elems 100 times at 1 (const) +121. 4.14000| 2.50000|1.66 |linsert L[100] shared 5 elems 100 times at 1 (const) +122. 11.23310| 5.98890|1.88 |linsert L[1000] shared 1 elems 1 times at 1 (const) +123. 11.66670| 6.32670|1.84 |linsert L[1000] shared 1 elems 100 times at 1 (const) +124. 14.07330| 7.62670|1.85 |linsert L[1000] shared 5 elems 100 times at 1 (const) +125. 112.16530| 58.52860|1.92 |linsert L[10000] shared 1 elems 1 times at 1 (const) +126. 113.97000| 60.19330|1.89 |linsert L[10000] shared 1 elems 100 times at 1 (const) +127. 115.52670| 62.52670|1.85 |linsert L[10000] shared 5 elems 100 times at 1 (const) +128. 0.50360| 0.50910|0.99 |linsert L[10] shared 1 elems 1 times at 5 (const) +129. 1.07000| 1.31000|0.82 |linsert L[10] shared 1 elems 100 times at 5 (const) +130. 3.20330| 1.90330|1.68 |linsert L[10] shared 5 elems 100 times at 5 (const) +131. 1.12490| 0.98450|1.14 |linsert L[100] shared 1 elems 1 times at 50 (const) +132. 1.61000| 1.35330|1.19 |linsert L[100] shared 1 elems 100 times at 50 (const) +133. 3.76000| 2.35330|1.60 |linsert L[100] shared 5 elems 100 times at 50 (const) +134. 7.66140| 4.52380|1.69 |linsert L[1000] shared 1 elems 1 times at 500 (const) +135. 8.06330| 6.87330|1.17 |linsert L[1000] shared 1 elems 100 times at 500 (const) +136. 10.31000| 8.18670|1.26 |linsert L[1000] shared 5 elems 100 times at 500 (const) +137. 75.09560| 43.91060|1.71 |linsert L[10000] shared 1 elems 1 times at 5000 (const) +138. 74.12000| 61.13670|1.21 |linsert L[10000] shared 1 elems 100 times at 5000 (const) +139. 77.89670| 63.89670|1.22 |linsert L[10000] shared 5 elems 100 times at 5000 (const) +140. 0.44220| 0.48840|0.91 |linsert L[10] shared 1 elems 1 times at 9 (const) +141. 1.07000| 0.89330|1.20 |linsert L[10] shared 1 elems 100 times at 9 (const) +142. 3.19670| 1.88670|1.69 |linsert L[10] shared 5 elems 100 times at 9 (const) +143. 0.73510| 0.73570|1.00 |linsert L[100] shared 1 elems 1 times at 99 (const) +144. 1.29330| 1.13000|1.14 |linsert L[100] shared 1 elems 100 times at 99 (const) +145. 3.45330| 2.33670|1.48 |linsert L[100] shared 5 elems 100 times at 99 (const) +146. 3.94120| 3.12830|1.26 |linsert L[1000] shared 1 elems 1 times at 999 (const) +147. 5.15670| 3.70000|1.39 |linsert L[1000] shared 1 elems 100 times at 999 (const) +148. 6.80330| 5.69000|1.20 |linsert L[1000] shared 5 elems 100 times at 999 (const) +149. 37.68500| 28.63000|1.32 |linsert L[10000] shared 1 elems 1 times at 9999 (const) +150. 37.92000| 30.65330|1.24 |linsert L[10000] shared 1 elems 100 times at 9999 (const) +151. 41.80330| 31.68000|1.32 |linsert L[10000] shared 5 elems 100 times at 9999 (const) +152. 0.45730| 0.48470|0.94 |linsert L[10] shared 1 elems 1 times at 8 (const) +153. 1.05330| 2.13330|0.49 |linsert L[10] shared 1 elems 100 times at 8 (const) +154. 3.14000| 2.29670|1.37 |linsert L[10] shared 5 elems 100 times at 8 (const) +155. 0.76410| 0.71740|1.07 |linsert L[100] shared 1 elems 1 times at 98 (const) +156. 1.30670| 1.12330|1.16 |linsert L[100] shared 1 elems 100 times at 98 (const) +157. 3.47330| 2.30330|1.51 |linsert L[100] shared 5 elems 100 times at 98 (const) +158. 3.91820| 3.14420|1.25 |linsert L[1000] shared 1 elems 1 times at 998 (const) +159. 4.62670| 3.68330|1.26 |linsert L[1000] shared 1 elems 100 times at 998 (const) +160. 6.83330| 5.57000|1.23 |linsert L[1000] shared 5 elems 100 times at 998 (const) +161. 37.70950| 29.19590|1.29 |linsert L[10000] shared 1 elems 1 times at 9998 (const) +162. 38.74670| 29.55670|1.31 |linsert L[10000] shared 1 elems 100 times at 9998 (const) +163. 40.15670| 31.91330|1.26 |linsert L[10000] shared 5 elems 100 times at 9998 (const) +``` + +**Insertion into an unshared list at a constant index** + +In the case of an **unshared** list the performance benefit can be significantly +greater (15-35x) than the shared case (195, 196, 203, 204). This is because of +the sequence of byte code operations generated which dups the operand list +object, extracts the prefix and suffix ranges and concatenates them with the +insertion objects in the middle. The prefix is extracted as a range from the +dup'ed object which can be expensive in the pre-TIP 625 implementation when the +prefix is long. In TIP 625 range operations on shared objects are still very +efficient and hence the improvement in performance. + +``` + [1] [2] +164. 0.13330| 0.12820|1.04 |linsert L[0] unshared 1 elems 1 times at 0 (const) +165. 0.70330| 0.56330|1.25 |linsert L[10] unshared 1 elems 100 times at 0 (const) +166. 1.34670| 1.13000|1.19 |linsert L[10] unshared 5 elems 100 times at 0 (const) +167. 0.97330| 1.16000|0.84 |linsert L[100] unshared 1 elems 100 times at 0 (const) +168. 1.69000| 1.53000|1.10 |linsert L[100] unshared 5 elems 100 times at 0 (const) +169. 4.27000| 3.34330|1.28 |linsert L[1000] unshared 1 elems 100 times at 0 (const) +170. 5.30670| 4.06670|1.30 |linsert L[1000] unshared 5 elems 100 times at 0 (const) +171. 38.51330| 29.28330|1.32 |linsert L[10000] unshared 1 elems 100 times at 0 (const) +172. 39.07000| 30.26330|1.29 |linsert L[10000] unshared 5 elems 100 times at 0 (const) +173. 0.99670| 1.01330|0.98 |linsert L[10] unshared 1 elems 100 times at 1 (const) +174. 2.42670| 2.01330|1.21 |linsert L[10] unshared 5 elems 100 times at 1 (const) +175. 1.68670| 1.57670|1.07 |linsert L[100] unshared 1 elems 100 times at 1 (const) +176. 3.07000| 2.53330|1.21 |linsert L[100] unshared 5 elems 100 times at 1 (const) +177. 8.40670| 6.45000|1.30 |linsert L[1000] unshared 1 elems 100 times at 1 (const) +178. 10.08000| 7.74670|1.30 |linsert L[1000] unshared 5 elems 100 times at 1 (const) +179. 78.64330| 57.81670|1.36 |linsert L[10000] unshared 1 elems 100 times at 1 (const) +180. 79.64000| 59.39670|1.34 |linsert L[10000] unshared 5 elems 100 times at 1 (const) +181. 0.97000| 0.85000|1.14 |linsert L[10] unshared 1 elems 100 times at 5 (const) +182. 2.81670| 1.98330|1.42 |linsert L[10] unshared 5 elems 100 times at 5 (const) +183. 1.45000| 1.18670|1.22 |linsert L[100] unshared 1 elems 100 times at 50 (const) +184. 2.87670| 2.30000|1.25 |linsert L[100] unshared 5 elems 100 times at 50 (const) +185. 6.32000| 5.09000|1.24 |linsert L[1000] unshared 1 elems 100 times at 500 (const) +186. 7.62330| 6.20670|1.23 |linsert L[1000] unshared 5 elems 100 times at 500 (const) +187. 57.87330| 44.85670|1.29 |linsert L[10000] unshared 1 elems 100 times at 5000 (const) +188. 59.49000| 46.44330|1.28 |linsert L[10000] unshared 5 elems 100 times at 5000 (const) +189. 1.10670| 0.84670|1.31 |linsert L[10] unshared 1 elems 100 times at 9 (const) +190. 2.42670| 1.97670|1.23 |linsert L[10] unshared 5 elems 100 times at 9 (const) +191. 1.28000| 1.09330|1.17 |linsert L[100] unshared 1 elems 100 times at 99 (const) +192. 2.74330| 2.21670|1.24 |linsert L[100] unshared 5 elems 100 times at 99 (const) +193. 4.36000| 0.93000|4.69 |linsert L[1000] unshared 1 elems 100 times at 999 (const) +194. 5.99670| 2.57670|2.33 |linsert L[1000] unshared 5 elems 100 times at 999 (const) +195. 37.42000| 0.99670|37.54 |linsert L[10000] unshared 1 elems 100 times at 9999 (const) +196. 39.17670| 2.60330|15.05 |linsert L[10000] unshared 5 elems 100 times at 9999 (const) +197. 0.97330| 0.85000|1.15 |linsert L[10] unshared 1 elems 100 times at 8 (const) +198. 2.44000| 1.98000|1.23 |linsert L[10] unshared 5 elems 100 times at 8 (const) +199. 1.19000| 1.30670|0.91 |linsert L[100] unshared 1 elems 100 times at 98 (const) +200. 2.74670| 2.22000|1.24 |linsert L[100] unshared 5 elems 100 times at 98 (const) +201. 4.37000| 0.95000|4.60 |linsert L[1000] unshared 1 elems 100 times at 998 (const) +202. 6.00000| 2.57000|2.33 |linsert L[1000] unshared 5 elems 100 times at 998 (const) +203. 37.51000| 1.09330|34.31 |linsert L[10000] unshared 1 elems 100 times at 9998 (const) +204. 38.61330| 2.60670|14.81 |linsert L[10000] unshared 5 elems 100 times at 9998 (const) +``` + +**Total run time** + +``` + [1] [2] +205. 2530.56730|1705.90700|1.48 |linsert total run time +``` + +### lrange + +**Extracting ranges from shared lists** + +Prior to TIP 625 range operations on shared lists involved allocating new +list storage, copying the elements (pointers) within the range and incrementing +all their reference counts. With the introduction of spans in TIP 625, this is +reduced to allocating a `ListSpan` and storing the range endpoint indices. +The improvement in performance is therefore considerable for even moderately +sized ranges (20, 23, 24) and even more for larger ranges (32, 34, 35). + +For smaller ranges spans are not used. See [Memory usage](#Memoryusage). + + +``` + [1] [2] +1. 0.21440| 0.25370|0.85 |lrange L[10] shared range 0 0 +2. 0.25440| 0.25410|1.00 |lrange L[10] shared range 0 end-1 +3. 0.24980| 0.24210|1.03 |lrange L[10] shared range 1 3 +4. 0.21510| 0.22770|0.94 |lrange L[10] shared range 1 7 +5. 0.23670| 0.23180|1.02 |lrange L[10] shared range 1 end +6. 0.20950| 0.26910|0.78 |lrange L[10] shared range end-1 end +7. 0.20490| 0.23460|0.87 |lrange L[100] shared range 0 0 +8. 0.52390| 0.48350|1.08 |lrange L[100] shared range 0 end-1 +9. 0.26780| 0.29530|0.91 |lrange L[100] shared range 12 36 +10. 0.44480| 0.41870|1.06 |lrange L[100] shared range 12 84 +11. 0.52210| 0.48630|1.07 |lrange L[100] shared range 1 end +12. 0.21310| 0.23690|0.90 |lrange L[100] shared range end-1 end +13. 0.25190| 0.22590|1.12 |lrange L[100] shared-span range 0 0 +14. 0.53790| 0.48840|1.10 |lrange L[100] shared-span range 0 end-1 +15. 0.28620| 0.29560|0.97 |lrange L[100] shared-span range 12 36 +16. 0.45080| 0.41780|1.08 |lrange L[100] shared-span range 12 84 +17. 0.53400| 0.50430|1.06 |lrange L[100] shared-span range 1 end +18. 0.25040| 0.26950|0.93 |lrange L[100] shared-span range end-1 end +19. 0.24860| 0.21460|1.16 |lrange L[1000] shared range 0 0 +20. 3.52010| 0.24920|14.13 |lrange L[1000] shared range 0 end-1 +21. 1.02110| 0.89190|1.14 |lrange L[1000] shared range 125 375 +22. 2.70940| 0.23740|11.41 |lrange L[1000] shared range 125 875 +23. 3.51850| 0.20270|17.36 |lrange L[1000] shared range 1 end +24. 0.22500| 0.22570|1.00 |lrange L[1000] shared range end-1 end +25. 0.21470| 0.27290|0.79 |lrange L[1000] shared-span range 0 0 +26. 3.52640| 0.26750|13.18 |lrange L[1000] shared-span range 0 end-1 +27. 1.03050| 0.91470|1.13 |lrange L[1000] shared-span range 125 375 +28. 2.74930| 0.21490|12.79 |lrange L[1000] shared-span range 125 875 +29. 3.54340| 0.25600|13.84 |lrange L[1000] shared-span range 1 end +30. 0.23830| 0.25140|0.95 |lrange L[1000] shared-span range end-1 end +31. 0.20370| 0.25660|0.79 |lrange L[10000] shared range 0 0 +32. 34.71510| 0.20390|170.26|lrange L[10000] shared range 0 end-1 +33. 8.84370| 7.63740|1.16 |lrange L[10000] shared range 1250 3750 +34. 26.02270| 0.20440|127.31|lrange L[10000] shared range 1250 8750 +35. 34.68470| 0.20520|169.03|lrange L[10000] shared range 1 end +36. 0.23660| 0.21570|1.10 |lrange L[10000] shared range end-1 end +37. 0.23460| 0.25280|0.93 |lrange L[10000] shared-span range 0 0 +38. 34.67930| 0.25190|137.67|lrange L[10000] shared-span range 0 end-1 +39. 8.83120| 7.80600|1.13 |lrange L[10000] shared-span range 1250 3750 +40. 26.00760| 0.28250|92.06 |lrange L[10000] shared-span range 1250 8750 +41. 34.69180| 0.21290|162.95|lrange L[10000] shared-span range 1 end +42. 0.23830| 0.24700|0.96 |lrange L[10000] shared-span range end-1 end +``` + +**Extracting ranges from unshared lists** + +When lists are unshared, the overhead of unshared list creation for +performance tests seems to make measurement difficult while the actual range +operation is very fast. This is reflected by the 0 values in the table below. + + +``` +43. 0.05100| 0.00470|10.85 |lrange L[10] unshared range 0 0 +44. 0.04680| 0.00770|6.08 |lrange L[10] unshared range 0 end-1 +45. 0.09790| 0.04960|1.97 |lrange L[10] unshared range 1 3 +46. 0.05050| 0.05060|1.00 |lrange L[10] unshared range 1 7 +47. 0.07620| 0.04910|1.55 |lrange L[10] unshared range 1 end +48. 0.07200| 0.02710|2.66 |lrange L[10] unshared range end-1 end +49. 0.03360| 0.10320|0.33 |lrange L[100] unshared range 0 0 +50. 0.06580| 0.00000|Inf |lrange L[100] unshared range 0 end-1 +51. 0.04010| 0.06420|0.62 |lrange L[100] unshared range 12 36 +52. 0.04080| 0.06420|0.64 |lrange L[100] unshared range 12 84 +53. 0.07140| 0.06390|1.12 |lrange L[100] unshared range 1 end +54. 0.03600| 0.11250|0.32 |lrange L[100] unshared range end-1 end +55. 0.05800| 0.09130|0.64 |lrange L[100] unshared-span range 0 0 +56. 0.03770| 0.03110|1.21 |lrange L[100] unshared-span range 0 end-1 +57. 0.04950| 0.00000|Inf |lrange L[100] unshared-span range 12 36 +58. 0.03120| 0.01390|2.24 |lrange L[100] unshared-span range 12 84 +59. 0.05440| 0.00520|10.46 |lrange L[100] unshared-span range 1 end +60. 0.02480| 0.05610|0.44 |lrange L[100] unshared-span range end-1 end +61. 0.00000| 0.00220|0.00 |lrange L[1000] unshared range 0 0 +62. 0.06130| 0.00740|8.28 |lrange L[1000] unshared range 0 end-1 +63. 0.03550| 0.04470|0.79 |lrange L[1000] unshared range 125 375 +64. 0.09490| 0.04210|2.25 |lrange L[1000] unshared range 125 875 +65. 0.14050| 0.01310|10.73 |lrange L[1000] unshared range 1 end +66. 0.00000| 0.23580|0.00 |lrange L[1000] unshared range end-1 end +67. 0.05750| 0.10460|0.55 |lrange L[1000] unshared-span range 0 0 +68. 0.04160| 0.08040|0.52 |lrange L[1000] unshared-span range 0 end-1 +69. 0.01420| 0.08840|0.16 |lrange L[1000] unshared-span range 125 375 +70. 0.01840| 0.00000|Inf |lrange L[1000] unshared-span range 125 875 +71. 0.14030| 0.08980|1.56 |lrange L[1000] unshared-span range 1 end +72. 0.00000| 0.05250|0.00 |lrange L[1000] unshared-span range end-1 end +73. 0.35680| 0.00000|Inf |lrange L[10000] unshared range 0 0 +74. 0.00000| 0.29400|0.00 |lrange L[10000] unshared range 0 end-1 +75. 0.32920| 0.00000|Inf |lrange L[10000] unshared range 1250 3750 +76. 1.08890| 0.00000|Inf |lrange L[10000] unshared range 1250 8750 +77. 1.34590| 0.00000|Inf |lrange L[10000] unshared range 1 end +78. 0.00000| 0.00000|NaN |lrange L[10000] unshared range end-1 end +79. 0.71840| 0.00000|Inf |lrange L[10000] unshared-span range 0 0 +80. 0.85540| 0.07690|11.12 |lrange L[10000] unshared-span range 0 end-1 +81. 1.09630| 0.00000|Inf |lrange L[10000] unshared-span range 1250 3750 +82. 1.56450| 0.00000|Inf |lrange L[10000] unshared-span range 1250 8750 +83. 2.23600| 0.00000|Inf |lrange L[10000] unshared-span range 1 end +84. 0.47300| 0.00000|Inf |lrange L[10000] unshared-span range end-1 end +85. 249.40840| 29.73670|8.39 |lrange total run time +``` + +### lassign + +A `lassign` is essentially one or more `lindex`-like operations combined with +a range operation. TIP 625 optimizes the latter and thus shows similar +benefits (5-8, 11-12) for the same reasons as [lrange](#lrange). + +``` + [1] [2] +1. 0.96470| 0.51570|1.87 |lassign L[10] shared 1 elems 1000 times +2. 1.89870| 1.16070|1.64 |lassign L[10] shared 5 elems 1000 times +3. 1.19530| 1.21800|0.98 |lassign L[100] shared 1 elems 1000 times +4. 1.24400| 2.17270|0.57 |lassign L[100] shared 5 elems 1000 times +5. 3.81000| 0.43970|8.66 |lassign L[1000] shared 1 elems 1000 times +6. 3.82770| 1.00600|3.80 |lassign L[1000] shared 5 elems 1000 times +7. 30.35730| 0.42370|71.65 |lassign L[10000] shared 1 elems 1000 times +8. 34.00100| 0.97600|34.84 |lassign L[10000] shared 5 elems 1000 times +9. 0.50000| 0.87500|0.57 |lassign L[10] unshared 1 elems 8 times +10. 0.64970| 0.63950|1.02 |lassign L[100] unshared 1 elems 98 times +11. 2.64930| 0.49930|5.31 |lassign L[1000] unshared 1 elems 498 times +12. 23.00290| 0.49100|46.85 |lassign L[10000] unshared 1 elems 4998 times +13. 104.10050| 10.41710|9.99 |lassign total run time +``` + +### lpop + + +**Popping an element from a shared list variable** + +A `lpop` in the general case is has the same performance with the exception +of popping elements in the front or end (13, 16) which benefit from being +able to use a span. + +``` + [1] [2] +1. 0.62500| 0.66670|0.94 |lpop L[10] shared at 0 8 times +2. 0.66670| 0.66670|1.00 |lpop L[10] shared at 1 8 times +3. 0.75000| 0.79170|0.95 |lpop L[10] shared at end-1 8 times +4. 0.75000| 0.75000|1.00 |lpop L[10] shared at end 8 times +5. 0.77210| 0.71770|1.08 |lpop L[100] shared at 0 98 times +6. 0.74150| 0.71770|1.03 |lpop L[100] shared at 1 98 times +7. 0.84010| 0.78910|1.06 |lpop L[100] shared at end-1 98 times +8. 0.80610| 0.84350|0.96 |lpop L[100] shared at end 98 times +9. 3.00070| 0.57430|5.22 |lpop L[1000] shared at 0 498 times +10. 3.01610| 2.60440|1.16 |lpop L[1000] shared at 1 498 times +11. 3.07430| 2.70820|1.14 |lpop L[1000] shared at end-1 498 times +12. 3.08300| 0.60310|5.11 |lpop L[1000] shared at end 498 times +13. 26.51510| 0.57460|46.15 |lpop L[10000] shared at 0 4998 times +14. 26.54970| 23.53140|1.13 |lpop L[10000] shared at 1 4998 times +15. 26.71740| 23.13300|1.15 |lpop L[10000] shared at end-1 4998 times +16. 26.75190| 0.65620|40.77 |lpop L[10000] shared at end 4998 times +``` + +**Popping an element from an unshared list variable** + +Again, unshared list storage is manipulated in both implementations by fast +memory movement operations. There is 3x benefit from TIP 625 being able to move +the smaller segment in the split (29, 30) but memory operations being fast, this +is not as pronounced as the shared case. + +``` +17. 1.00000| 0.54170|1.85 |lpop L[10] unshared at 0 8 times +18. 0.50000| 0.58330|0.86 |lpop L[10] unshared at 1 8 times +19. 0.62500| 0.62500|1.00 |lpop L[10] unshared at end-1 8 times +20. 0.62500| 0.62500|1.00 |lpop L[10] unshared at end 8 times +21. 0.56460| 0.57480|0.98 |lpop L[100] unshared at 0 98 times +22. 0.57140| 0.57480|0.99 |lpop L[100] unshared at 1 98 times +23. 0.62930| 0.63270|0.99 |lpop L[100] unshared at end-1 98 times +24. 0.61220| 0.63950|0.96 |lpop L[100] unshared at end 98 times +25. 0.63720| 0.61310|1.04 |lpop L[1000] unshared at 0 498 times +26. 0.62520| 0.57630|1.08 |lpop L[1000] unshared at 1 498 times +27. 0.62180| 0.62450|1.00 |lpop L[1000] unshared at end-1 498 times +28. 0.61310| 0.63450|0.97 |lpop L[1000] unshared at end 498 times +29. 1.63330| 0.56870|2.87 |lpop L[10000] unshared at 0 4998 times +30. 1.79790| 0.57550|3.12 |lpop L[10000] unshared at 1 4998 times +31. 0.61620| 0.63030|0.98 |lpop L[10000] unshared at end-1 4998 times +32. 0.61040| 0.63150|0.97 |lpop L[10000] unshared at end 4998 times +``` + +**Popping a nested element** + +There is no benefit popping a nested element because the outer list size +is not affected and the inner list in the test scripts is only a pair. +There would be a benefit if the inner list was large but benefits with +large lists is already illustrated above. + +``` +33. 1.87500| 0.95830|1.96 |lpop L[10] shared at {0 0} 8 times +34. 1.00000| 1.79170|0.56 |lpop L[10] shared at {1 0} 8 times +35. 1.00000| 1.87500|0.53 |lpop L[10] shared at {end-1 0} 8 times +36. 1.91670| 1.75000|1.10 |lpop L[10] shared at {end 0} 8 times +37. 1.13610| 1.90140|0.60 |lpop L[100] shared at {0 0} 98 times +38. 1.15310| 1.03400|1.12 |lpop L[100] shared at {1 0} 98 times +39. 1.19730| 1.94560|0.62 |lpop L[100] shared at {end-1 0} 98 times +40. 1.16330| 1.98300|0.59 |lpop L[100] shared at {end 0} 98 times +41. 3.92770| 3.52340|1.11 |lpop L[1000] shared at {0 0} 498 times +42. 3.99930| 3.52880|1.13 |lpop L[1000] shared at {1 0} 498 times +43. 4.14660| 3.55560|1.17 |lpop L[1000] shared at {end-1 0} 498 times +44. 4.13520| 3.78110|1.09 |lpop L[1000] shared at {end 0} 498 times +45. 35.43270| 29.50360|1.20 |lpop L[10000] shared at {0 0} 4998 times +46. 35.42940| 29.55170|1.20 |lpop L[10000] shared at {1 0} 4998 times +47. 35.69910| 29.65230|1.20 |lpop L[10000] shared at {end-1 0} 4998 times +48. 35.72930| 29.53960|1.21 |lpop L[10000] shared at {end 0} 4998 times +49. 305.88310| 215.85440|1.42 |lpop total run time +``` + +### lset + +The `lset` command always modifies existing elements except when it is appending +elements at the end in unshared objects. Thus the optimizations enabled by spans +have no relevance and there is no fundamental difference in performance with TIP +625. + +``` + [1] [2] +1. 0.66100| 0.52020|1.27 |lset L[10] shared at 0 +2. 0.58350| 0.50630|1.15 |lset L[10] shared at 1 +3. 0.74100| 0.56530|1.31 |lset L[10] shared at end-1 +4. 0.53390| 0.56890|0.94 |lset L[10] shared at end +5. 18.29250| 14.80990|1.24 |lset L[10] shared at end+1 +6. 0.77470| 0.76170|1.02 |lset L[100] shared at 0 +7. 0.77850| 0.73750|1.06 |lset L[100] shared at 1 +8. 0.78550| 0.86950|0.90 |lset L[100] shared at end-1 +9. 0.82000| 0.82230|1.00 |lset L[100] shared at end +10. 18.29150| 15.01350|1.22 |lset L[100] shared at end+1 +11. 3.77540| 3.24230|1.16 |lset L[1000] shared at 0 +12. 3.77920| 3.21060|1.18 |lset L[1000] shared at 1 +13. 3.85980| 3.34070|1.16 |lset L[1000] shared at end-1 +14. 3.78070| 3.78780|1.00 |lset L[1000] shared at end +15. 21.49420| 17.83840|1.20 |lset L[1000] shared at end+1 +16. 35.05950| 28.91080|1.21 |lset L[10000] shared at 0 +17. 35.02110| 28.86800|1.21 |lset L[10000] shared at 1 +18. 35.35520| 29.16350|1.21 |lset L[10000] shared at end-1 +19. 35.36760| 29.61640|1.19 |lset L[10000] shared at end +20. 53.12720| 46.70010|1.14 |lset L[10000] shared at end+1 +21. 0.46900| 0.58610|0.80 |lset L[10] unshared at 0 +22. 0.54760| 0.42710|1.28 |lset L[10] unshared at 1 +23. 0.63430| 0.48870|1.30 |lset L[10] unshared at end-1 +24. 0.70830| 0.48200|1.47 |lset L[10] unshared at end +25. 0.48820| 0.49160|0.99 |lset L[10] unshared at end+1 +26. 0.43980| 0.45920|0.96 |lset L[100] unshared at 0 +27. 0.47010| 0.43100|1.09 |lset L[100] unshared at 1 +28. 0.50790| 0.51480|0.99 |lset L[100] unshared at end-1 +29. 0.51490| 0.48460|1.06 |lset L[100] unshared at end +30. 0.48470| 0.48910|0.99 |lset L[100] unshared at end+1 +31. 0.54990| 0.43500|1.26 |lset L[1000] unshared at 0 +32. 0.66490| 0.42830|1.55 |lset L[1000] unshared at 1 +33. 0.48850| 0.48410|1.01 |lset L[1000] unshared at end-1 +34. 0.48220| 0.48240|1.00 |lset L[1000] unshared at end +35. 0.48480| 0.49340|0.98 |lset L[1000] unshared at end+1 +36. 0.42830| 0.42870|1.00 |lset L[10000] unshared at 0 +37. 0.43210| 0.42910|1.01 |lset L[10000] unshared at 1 +38. 0.48240| 0.48850|0.99 |lset L[10000] unshared at end-1 +39. 0.47850| 0.48820|0.98 |lset L[10000] unshared at end +40. 0.47870| 0.49310|0.97 |lset L[10000] unshared at end+1 +41. 0.80710| 0.83320|0.97 |lset L[10] shared at {0 0} +42. 0.81530| 0.84830|0.96 |lset L[10] shared at {1 0} +43. 0.86030| 0.85740|1.00 |lset L[10] shared at {end-1 0} +44. 0.86040| 0.84410|1.02 |lset L[10] shared at {end 0} +45. 0.89310| 0.86580|1.03 |lset L[100] shared at {0 0} +46. 0.88720| 0.88110|1.01 |lset L[100] shared at {1 0} +47. 0.92060| 0.92840|0.99 |lset L[100] shared at {end-1 0} +48. 0.90130| 0.93150|0.97 |lset L[100] shared at {end 0} +49. 3.84860| 3.30240|1.17 |lset L[1000] shared at {0 0} +50. 3.87790| 3.27960|1.18 |lset L[1000] shared at {1 0} +51. 3.90020| 3.38740|1.15 |lset L[1000] shared at {end-1 0} +52. 3.92310| 3.33990|1.17 |lset L[1000] shared at {end 0} +53. 35.12130| 28.95020|1.21 |lset L[10000] shared at {0 0} +54. 35.13800| 29.34310|1.20 |lset L[10000] shared at {1 0} +55. 35.29860| 28.99230|1.22 |lset L[10000] shared at {end-1 0} +56. 35.25650| 29.49380|1.20 |lset L[10000] shared at {end 0} +57. 0.58430| 0.57820|1.01 |lset L[10] unshared at {0 0} +58. 0.57740| 0.56700|1.02 |lset L[10] unshared at {1 0} +59. 0.61630| 0.61840|1.00 |lset L[10] unshared at {end-1 0} +60. 0.60040| 0.61650|0.97 |lset L[10] unshared at {end 0} +61. 0.58370| 0.57960|1.01 |lset L[100] unshared at {0 0} +62. 0.57160| 0.58160|0.98 |lset L[100] unshared at {1 0} +63. 0.61570| 0.61860|1.00 |lset L[100] unshared at {end-1 0} +64. 0.60550| 0.60200|1.01 |lset L[100] unshared at {end 0} +65. 0.58340| 0.58690|0.99 |lset L[1000] unshared at {0 0} +66. 0.56380| 0.58650|0.96 |lset L[1000] unshared at {1 0} +67. 0.62190| 0.61750|1.01 |lset L[1000] unshared at {end-1 0} +68. 0.60010| 0.61210|0.98 |lset L[1000] unshared at {end 0} +69. 0.55840| 0.57300|0.97 |lset L[10000] unshared at {0 0} +70. 0.57610| 0.56020|1.03 |lset L[10000] unshared at {1 0} +71. 0.61370| 0.60830|1.01 |lset L[10000] unshared at {end-1 0} +72. 0.62110| 0.61860|1.00 |lset L[10000] unshared at {end 0} +73. 455.91970| 385.96240|1.18 |lset total run time + +``` + +### lremove + +**Removal of elements from a shared list** + +Removal of leading or trailing elements is essentially a range operation and +thus sees order of magnitude improvements in performance when operating +on shared lists (13, 17, 19, 23, 37, 41, 43, 47). + +Removal at other indices from shared lists requires new list creation and +this does not show any benefits. + + +``` + [1] [2] +1. 0.61560| 0.69080|0.89 |lremove L[10] shared 1 elements at 0 +2. 0.46840| 0.50220|0.93 |lremove L[10] shared 1 elements at 1 +3. 0.60580| 0.44440|1.36 |lremove L[10] shared 1 elements at 5 +4. 0.50520| 0.48700|1.04 |lremove L[10] shared 1 elements at end-1 +5. 0.47830| 0.57630|0.83 |lremove L[10] shared 1 elements at end +6. 0.64130| 0.79860|0.80 |lremove L[10] shared 5 elements at 0 1 5 end-1 end +7. 0.84040| 0.68670|1.22 |lremove L[100] shared 1 elements at 0 +8. 0.76790| 0.80940|0.95 |lremove L[100] shared 1 elements at 1 +9. 0.82900| 0.67930|1.22 |lremove L[100] shared 1 elements at 50 +10. 0.77090| 0.75290|1.02 |lremove L[100] shared 1 elements at end-1 +11. 0.95350| 0.72420|1.32 |lremove L[100] shared 1 elements at end +12. 1.15080| 1.04890|1.10 |lremove L[100] shared 5 elements at 0 1 50 end-1 end +13. 3.51060| 0.43450|8.08 |lremove L[1000] shared 1 elements at 0 +14. 3.52400| 3.22860|1.09 |lremove L[1000] shared 1 elements at 1 +15. 3.52350| 3.14890|1.12 |lremove L[1000] shared 1 elements at 500 +16. 3.52310| 3.25950|1.08 |lremove L[1000] shared 1 elements at end-1 +17. 3.74320| 0.47500|7.88 |lremove L[1000] shared 1 elements at end +18. 3.83280| 3.48050|1.10 |lremove L[1000] shared 5 elements at 0 1 500 end-1 end +19. 30.39120| 0.42240|71.95 |lremove L[10000] shared 1 elements at 0 +20. 30.27250| 28.59490|1.06 |lremove L[10000] shared 1 elements at 1 +21. 30.34820| 28.50400|1.06 |lremove L[10000] shared 1 elements at 5000 +22. 30.42090| 28.71930|1.06 |lremove L[10000] shared 1 elements at end-1 +23. 30.53150| 0.45170|67.59 |lremove L[10000] shared 1 elements at end +24. 32.39280| 28.88290|1.12 |lremove L[10000] shared 5 elements at 0 1 5000 end-1 end +25. 0.71680| 0.47780|1.50 |lremove L[10] shared-span 1 elements at 0 +26. 0.45080| 0.48900|0.92 |lremove L[10] shared-span 1 elements at 1 +27. 0.66590| 0.48710|1.37 |lremove L[10] shared-span 1 elements at 5 +28. 0.87990| 0.52540|1.67 |lremove L[10] shared-span 1 elements at end-1 +29. 0.56630| 0.54030|1.05 |lremove L[10] shared-span 1 elements at end +30. 0.97410| 0.70920|1.37 |lremove L[10] shared-span 5 elements at 0 1 5 end-1 end +31. 0.73820| 0.72490|1.02 |lremove L[100] shared-span 1 elements at 0 +32. 0.73480| 0.75080|0.98 |lremove L[100] shared-span 1 elements at 1 +33. 0.79750| 0.72650|1.10 |lremove L[100] shared-span 1 elements at 50 +34. 0.77370| 0.88570|0.87 |lremove L[100] shared-span 1 elements at end-1 +35. 0.77440| 0.75230|1.03 |lremove L[100] shared-span 1 elements at end +36. 0.99760| 0.98270|1.02 |lremove L[100] shared-span 5 elements at 0 1 50 end-1 end +37. 3.51090| 0.52070|6.74 |lremove L[1000] shared-span 1 elements at 0 +38. 3.54570| 3.29990|1.07 |lremove L[1000] shared-span 1 elements at 1 +39. 3.99660| 3.31420|1.21 |lremove L[1000] shared-span 1 elements at 500 +40. 3.67910| 3.25230|1.13 |lremove L[1000] shared-span 1 elements at end-1 +41. 3.75820| 0.52310|7.18 |lremove L[1000] shared-span 1 elements at end +42. 4.44580| 3.57670|1.24 |lremove L[1000] shared-span 5 elements at 0 1 500 end-1 end +43. 32.86260| 0.44870|73.24 |lremove L[10000] shared-span 1 elements at 0 +44. 33.38560| 28.51260|1.17 |lremove L[10000] shared-span 1 elements at 1 +45. 30.40200| 28.58650|1.06 |lremove L[10000] shared-span 1 elements at 5000 +46. 30.58530| 28.65760|1.07 |lremove L[10000] shared-span 1 elements at end-1 +47. 30.42020| 0.48410|62.84 |lremove L[10000] shared-span 1 elements at end +48. 32.47680| 28.85620|1.13 |lremove L[10000] shared-span 5 elements at 0 1 5000 end-1 end +``` + +**Removal of elements from a unshared list** + +Removal of elements from an unshared list object is done in both implementations +by moving elements within the existing list storage array. The difference is that +with TIP 625, the shorter segment can be moved in the common case where a single +element is being removed. This is reflected in the 7x-8x speed removing elements +towards the front of the list (64, 65). + +``` +49. 0.37500| 0.62500|0.60 |lremove L[10] unshared 1 elements at 0 +50. 0.33330| 0.37500|0.89 |lremove L[10] unshared 1 elements at 1 +51. 0.33330| 0.75000|0.44 |lremove L[10] unshared 1 elements at 5 +52. 0.87500| 0.87500|1.00 |lremove L[10] unshared 1 elements at end-1 +53. 0.87500| 0.37500|2.33 |lremove L[10] unshared 1 elements at end +54. 0.73810| 0.24150|3.06 |lremove L[100] unshared 1 elements at 0 +55. 0.29590| 0.74490|0.40 |lremove L[100] unshared 1 elements at 1 +56. 0.24490| 0.25850|0.95 |lremove L[100] unshared 1 elements at 50 +57. 0.31630| 0.78910|0.40 |lremove L[100] unshared 1 elements at end-1 +58. 0.28570| 0.58500|0.49 |lremove L[100] unshared 1 elements at end +59. 0.38400| 0.23470|1.64 |lremove L[1000] unshared 1 elements at 0 +60. 0.82930| 0.71470|1.16 |lremove L[1000] unshared 1 elements at 1 +61. 0.34930| 0.30400|1.15 |lremove L[1000] unshared 1 elements at 500 +62. 0.77600| 0.29600|2.62 |lremove L[1000] unshared 1 elements at end-1 +63. 0.78670| 0.28530|2.76 |lremove L[1000] unshared 1 elements at end +64. 1.67200| 0.20080|8.33 |lremove L[10000] unshared 1 elements at 0 +65. 1.65570| 0.21680|7.64 |lremove L[10000] unshared 1 elements at 1 +66. 0.92130| 0.87950|1.05 |lremove L[10000] unshared 1 elements at 5000 +67. 0.32290| 0.27950|1.16 |lremove L[10000] unshared 1 elements at end-1 +68. 0.30750| 0.27250|1.13 |lremove L[10000] unshared 1 elements at end +69. 0.29170| 0.70830|0.41 |lremove L[10] unshared-span 1 elements at 0 +70. 0.75000| 0.25000|3.00 |lremove L[10] unshared-span 1 elements at 1 +71. 0.25000| 0.25000|1.00 |lremove L[10] unshared-span 1 elements at 5 +72. 0.87500| 0.87500|1.00 |lremove L[10] unshared-span 1 elements at end-1 +73. 0.25000| 0.25000|1.00 |lremove L[10] unshared-span 1 elements at end +74. 0.26870| 0.27890|0.96 |lremove L[100] unshared-span 1 elements at 0 +75. 0.72790| 0.69050|1.05 |lremove L[100] unshared-span 1 elements at 1 +76. 0.24830| 0.68370|0.36 |lremove L[100] unshared-span 1 elements at 50 +77. 0.76870| 0.32650|2.35 |lremove L[100] unshared-span 1 elements at end-1 +78. 0.74150| 0.30270|2.45 |lremove L[100] unshared-span 1 elements at end +79. 0.77070| 0.70670|1.09 |lremove L[1000] unshared-span 1 elements at 0 +80. 0.30130| 0.26400|1.14 |lremove L[1000] unshared-span 1 elements at 1 +81. 0.73600| 0.75200|0.98 |lremove L[1000] unshared-span 1 elements at 500 +82. 0.76800| 0.29070|2.64 |lremove L[1000] unshared-span 1 elements at end-1 +83. 0.28270| 0.34130|0.83 |lremove L[1000] unshared-span 1 elements at end +84. 1.29200| 0.25410|5.08 |lremove L[10000] unshared-span 1 elements at 0 +85. 1.63650| 0.26850|6.09 |lremove L[10000] unshared-span 1 elements at 1 +86. 0.76990| 0.90030|0.86 |lremove L[10000] unshared-span 1 elements at 5000 +87. 0.28720| 0.23410|1.23 |lremove L[10000] unshared-span 1 elements at end-1 +88. 0.26990| 0.29040|0.93 |lremove L[10000] unshared-span 1 elements at end +``` + +**Total run time** + +``` +89. 461.74330| 294.10770|1.57 |lremove total run time +``` + +### lreplace + +**Pure inserts in a shared list** + +Pure inserts that are repeated prepends to a list are much faster (43, 44, 63, 64). +`lreplace` unsurprisingly show the same characteristics as the +[linsert](#linsert) command. See there for more details. + +``` + [1] [2] +1. 0.47940| 0.47790|1.00 |lreplace L[10] shared 0 (0:-1) elems at 0 with 1 elems 1 times. +2. 0.50010| 0.51730|0.97 |lreplace L[10] shared 0 (0:-1) elems at 0 with 10 elems 1 times. +3. 0.62500| 0.62500|1.00 |lreplace L[10] shared 0 (0:-1) elems at 0 with 1 elems 8 times. +4. 0.75000| 0.62500|1.20 |lreplace L[10] shared 0 (0:-1) elems at 0 with 10 elems 8 times. +5. 0.48000| 0.48200|1.00 |lreplace L[10] shared 0 (1:-1) elems at 1 with 1 elems 1 times. +6. 0.49280| 0.53140|0.93 |lreplace L[10] shared 0 (1:-1) elems at 1 with 10 elems 1 times. +7. 0.62500| 0.62500|1.00 |lreplace L[10] shared 0 (1:-1) elems at 1 with 1 elems 8 times. +8. 0.75000| 0.75000|1.00 |lreplace L[10] shared 0 (1:-1) elems at 1 with 10 elems 8 times. +9. 0.48990| 0.68220|0.72 |lreplace L[10] shared 0 (5:-1) elems at 5 with 1 elems 1 times. +10. 0.65100| 0.52350|1.24 |lreplace L[10] shared 0 (5:-1) elems at 5 with 10 elems 1 times. +11. 0.62500| 0.62500|1.00 |lreplace L[10] shared 0 (5:-1) elems at 5 with 1 elems 8 times. +12. 0.75000| 0.75000|1.00 |lreplace L[10] shared 0 (5:-1) elems at 5 with 10 elems 8 times. +13. 0.48510| 0.52490|0.92 |lreplace L[10] shared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +14. 0.51940| 0.53900|0.96 |lreplace L[10] shared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +15. 0.66670| 0.70830|0.94 |lreplace L[10] shared 0 (end-1:-1) elems at end-1 with 1 elems 8 times. +16. 0.75000| 0.75000|1.00 |lreplace L[10] shared 0 (end-1:-1) elems at end-1 with 10 elems 8 times. +17. 0.49670| 0.65090|0.76 |lreplace L[10] shared 0 (end:-1) elems at end with 1 elems 1 times. +18. 0.52690| 0.75680|0.70 |lreplace L[10] shared 0 (end:-1) elems at end with 10 elems 1 times. +19. 0.66670| 0.70830|0.94 |lreplace L[10] shared 0 (end:-1) elems at end with 1 elems 8 times. +20. 0.75000| 0.75000|1.00 |lreplace L[10] shared 0 (end:-1) elems at end with 10 elems 8 times. +21. 0.86160| 0.72000|1.20 |lreplace L[100] shared 0 (0:-1) elems at 0 with 1 elems 1 times. +22. 0.98610| 0.82330|1.20 |lreplace L[100] shared 0 (0:-1) elems at 0 with 10 elems 1 times. +23. 1.03060| 0.61560|1.67 |lreplace L[100] shared 0 (0:-1) elems at 0 with 1 elems 98 times. +24. 2.35710| 0.71430|3.30 |lreplace L[100] shared 0 (0:-1) elems at 0 with 10 elems 98 times. +25. 0.82810| 0.73730|1.12 |lreplace L[100] shared 0 (1:-1) elems at 1 with 1 elems 1 times. +26. 0.74340| 0.75490|0.98 |lreplace L[100] shared 0 (1:-1) elems at 1 with 10 elems 1 times. +27. 1.01020| 1.01360|1.00 |lreplace L[100] shared 0 (1:-1) elems at 1 with 1 elems 98 times. +28. 2.30950| 2.24490|1.03 |lreplace L[100] shared 0 (1:-1) elems at 1 with 10 elems 98 times. +29. 0.91550| 0.72490|1.26 |lreplace L[100] shared 0 (50:-1) elems at 50 with 1 elems 1 times. +30. 0.78790| 0.75560|1.04 |lreplace L[100] shared 0 (50:-1) elems at 50 with 10 elems 1 times. +31. 0.98300| 0.99660|0.99 |lreplace L[100] shared 0 (50:-1) elems at 50 with 1 elems 98 times. +32. 2.28230| 2.21430|1.03 |lreplace L[100] shared 0 (50:-1) elems at 50 with 10 elems 98 times. +33. 0.95890| 0.75470|1.27 |lreplace L[100] shared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +34. 0.79480| 0.87110|0.91 |lreplace L[100] shared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +35. 1.03400| 1.03060|1.00 |lreplace L[100] shared 0 (end-1:-1) elems at end-1 with 1 elems 98 times. +36. 2.32990| 2.26530|1.03 |lreplace L[100] shared 0 (end-1:-1) elems at end-1 with 10 elems 98 times. +37. 0.81070| 0.77270|1.05 |lreplace L[100] shared 0 (end:-1) elems at end with 1 elems 1 times. +38. 0.88110| 0.82370|1.07 |lreplace L[100] shared 0 (end:-1) elems at end with 10 elems 1 times. +39. 1.04080| 1.03060|1.01 |lreplace L[100] shared 0 (end:-1) elems at end with 1 elems 98 times. +40. 2.32990| 2.25850|1.03 |lreplace L[100] shared 0 (end:-1) elems at end with 10 elems 98 times. +41. 3.47370| 3.27660|1.06 |lreplace L[1000] shared 0 (0:-1) elems at 0 with 1 elems 1 times. +42. 3.42180| 3.28980|1.04 |lreplace L[1000] shared 0 (0:-1) elems at 0 with 10 elems 1 times. +43. 3.61600| 0.65870|5.49 |lreplace L[1000] shared 0 (0:-1) elems at 0 with 1 elems 125 times. +44. 5.33330| 0.74130|7.19 |lreplace L[1000] shared 0 (0:-1) elems at 0 with 10 elems 125 times. +45. 3.44310| 3.21840|1.07 |lreplace L[1000] shared 0 (1:-1) elems at 1 with 1 elems 1 times. +46. 3.48970| 3.29960|1.06 |lreplace L[1000] shared 0 (1:-1) elems at 1 with 10 elems 1 times. +47. 3.61870| 3.86930|0.94 |lreplace L[1000] shared 0 (1:-1) elems at 1 with 1 elems 125 times. +48. 5.32000| 5.61600|0.95 |lreplace L[1000] shared 0 (1:-1) elems at 1 with 10 elems 125 times. +49. 3.47820| 3.21690|1.08 |lreplace L[1000] shared 0 (500:-1) elems at 500 with 1 elems 1 times. +50. 3.51640| 3.34630|1.05 |lreplace L[1000] shared 0 (500:-1) elems at 500 with 10 elems 1 times. +51. 3.59470| 3.66130|0.98 |lreplace L[1000] shared 0 (500:-1) elems at 500 with 1 elems 125 times. +52. 5.30930| 5.32270|1.00 |lreplace L[1000] shared 0 (500:-1) elems at 500 with 10 elems 125 times. +53. 3.37250| 3.31760|1.02 |lreplace L[1000] shared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +54. 3.47360| 3.22670|1.08 |lreplace L[1000] shared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +55. 3.67730| 3.74930|0.98 |lreplace L[1000] shared 0 (end-1:-1) elems at end-1 with 1 elems 125 times. +56. 5.36000| 5.43730|0.99 |lreplace L[1000] shared 0 (end-1:-1) elems at end-1 with 10 elems 125 times. +57. 3.47170| 3.26540|1.06 |lreplace L[1000] shared 0 (end:-1) elems at end with 1 elems 1 times. +58. 3.54830| 3.42090|1.04 |lreplace L[1000] shared 0 (end:-1) elems at end with 10 elems 1 times. +59. 3.66130| 3.71200|0.99 |lreplace L[1000] shared 0 (end:-1) elems at end with 1 elems 125 times. +60. 5.35470| 5.40270|0.99 |lreplace L[1000] shared 0 (end:-1) elems at end with 10 elems 125 times. +61. 30.27910| 30.01480|1.01 |lreplace L[10000] shared 0 (0:-1) elems at 0 with 1 elems 1 times. +62. 30.36400| 31.46430|0.97 |lreplace L[10000] shared 0 (0:-1) elems at 0 with 10 elems 1 times. +63. 32.08320| 0.68590|46.78 |lreplace L[10000] shared 0 (0:-1) elems at 0 with 1 elems 1250 times. +64. 48.88990| 0.84270|58.02 |lreplace L[10000] shared 0 (0:-1) elems at 0 with 10 elems 1250 times. +65. 30.27520| 30.60110|0.99 |lreplace L[10000] shared 0 (1:-1) elems at 1 with 1 elems 1 times. +66. 30.42620| 29.92770|1.02 |lreplace L[10000] shared 0 (1:-1) elems at 1 with 10 elems 1 times. +67. 32.10670| 32.28190|0.99 |lreplace L[10000] shared 0 (1:-1) elems at 1 with 1 elems 1250 times. +68. 48.80400| 51.68190|0.94 |lreplace L[10000] shared 0 (1:-1) elems at 1 with 10 elems 1250 times. +69. 30.26310| 29.98060|1.01 |lreplace L[10000] shared 0 (5000:-1) elems at 5000 with 1 elems 1 times. +70. 30.35280| 29.73200|1.02 |lreplace L[10000] shared 0 (5000:-1) elems at 5000 with 10 elems 1 times. +71. 32.14530| 32.12450|1.00 |lreplace L[10000] shared 0 (5000:-1) elems at 5000 with 1 elems 1250 times. +72. 49.19330| 50.84690|0.97 |lreplace L[10000] shared 0 (5000:-1) elems at 5000 with 10 elems 1250 times. +73. 30.36830| 29.65420|1.02 |lreplace L[10000] shared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +74. 30.38940| 30.02930|1.01 |lreplace L[10000] shared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +75. 32.29440| 32.24910|1.00 |lreplace L[10000] shared 0 (end-1:-1) elems at end-1 with 1 elems 1250 times. +76. 49.03310| 51.02960|0.96 |lreplace L[10000] shared 0 (end-1:-1) elems at end-1 with 10 elems 1250 times. +77. 30.43670| 29.91730|1.02 |lreplace L[10000] shared 0 (end:-1) elems at end with 1 elems 1 times. +78. 30.47630| 29.89420|1.02 |lreplace L[10000] shared 0 (end:-1) elems at end with 10 elems 1 times. +79. 32.31550| 32.84430|0.98 |lreplace L[10000] shared 0 (end:-1) elems at end with 1 elems 1250 times. +80. 48.94850| 50.78560|0.96 |lreplace L[10000] shared 0 (end:-1) elems at end with 10 elems 1250 times. +``` + +**Pure deletes from a shared list** + +Pure deletions from the front or the back translate to a range operation and +show order of magnitude increases (91, 95, 96, 100) as TIP 625 makes use of spans +in these cases. + +Deletions from the middle show no difference as a new list object has to be +created when the operand list is shared. + +``` +81. 0.56120| 0.65720|0.85 |lreplace L[10] shared 0:0 with 0 elems 1 times. +82. 0.61420| 0.61920|0.99 |lreplace L[10] shared 1:1 with 0 elems 1 times. +83. 0.57910| 0.63710|0.91 |lreplace L[10] shared 5:5 with 0 elems 1 times. +84. 0.64440| 0.70020|0.92 |lreplace L[10] shared end-1:end-1 with 0 elems 1 times. +85. 0.64570| 0.66650|0.97 |lreplace L[10] shared end:end with 0 elems 1 times. +86. 0.85890| 0.88870|0.97 |lreplace L[100] shared 0:0 with 0 elems 1 times. +87. 0.87410| 0.87850|0.99 |lreplace L[100] shared 1:1 with 0 elems 1 times. +88. 0.84450| 0.88400|0.96 |lreplace L[100] shared 50:50 with 0 elems 1 times. +89. 0.92150| 0.95340|0.97 |lreplace L[100] shared end-1:end-1 with 0 elems 1 times. +90. 1.05190| 0.93860|1.12 |lreplace L[100] shared end:end with 0 elems 1 times. +91. 3.62780| 0.58330|6.22 |lreplace L[1000] shared 0:0 with 0 elems 1 times. +92. 3.78750| 3.27940|1.15 |lreplace L[1000] shared 1:1 with 0 elems 1 times. +93. 3.64500| 3.36440|1.08 |lreplace L[1000] shared 500:500 with 0 elems 1 times. +94. 3.57190| 3.34580|1.07 |lreplace L[1000] shared end-1:end-1 with 0 elems 1 times. +95. 3.80310| 0.65340|5.82 |lreplace L[1000] shared end:end with 0 elems 1 times. +96. 32.88180| 0.57780|56.91 |lreplace L[10000] shared 0:0 with 0 elems 1 times. +97. 34.93830| 29.90320|1.17 |lreplace L[10000] shared 1:1 with 0 elems 1 times. +98. 35.16850| 29.76260|1.18 |lreplace L[10000] shared 5000:5000 with 0 elems 1 times. +99. 35.48920| 30.26280|1.17 |lreplace L[10000] shared end-1:end-1 with 0 elems 1 times. +100. 35.31320| 0.64430|54.81 |lreplace L[10000] shared end:end with 0 elems 1 times. +``` + +**Replacing elements in a shared list** + +The table below covers cases where the number of elements deleted is less, equal +and greater than the number inserted. Replacement (where elements are deleted +and inserted) of elements in shared lists always require a new list object to be +created. Thus there is no difference in performance in any of the cases. + + +``` +101. 0.65750| 0.61980|1.06 |lreplace L[10] shared 0:1 with 3 elems 1 times. +102. 0.70640| 0.62930|1.12 |lreplace L[10] shared 0:1 with 2 elems 1 times. +103. 0.61070| 0.69230|0.88 |lreplace L[10] shared 0:1 with 1 elems 1 times. +104. 0.61710| 0.80190|0.77 |lreplace L[10] shared 1:2 with 3 elems 1 times. +105. 0.82560| 0.60530|1.36 |lreplace L[10] shared 1:2 with 2 elems 1 times. +106. 0.64700| 0.63040|1.03 |lreplace L[10] shared 1:2 with 1 elems 1 times. +107. 0.73040| 0.69910|1.04 |lreplace L[10] shared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +108. 0.66290| 0.76100|0.87 |lreplace L[10] shared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +109. 0.98590| 0.72480|1.36 |lreplace L[10] shared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +110. 0.78410| 0.86180|0.91 |lreplace L[10] shared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +111. 0.64710| 0.87300|0.74 |lreplace L[10] shared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +112. 0.81320| 0.67810|1.20 |lreplace L[10] shared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +113. 0.90510| 0.89730|1.01 |lreplace L[100] shared 0:1 with 3 elems 1 times. +114. 0.88180| 0.87050|1.01 |lreplace L[100] shared 0:1 with 2 elems 1 times. +115. 0.90480| 1.09520|0.83 |lreplace L[100] shared 0:1 with 1 elems 1 times. +116. 0.88150| 0.95750|0.92 |lreplace L[100] shared 1:2 with 3 elems 1 times. +117. 0.89530| 0.88120|1.02 |lreplace L[100] shared 1:2 with 2 elems 1 times. +118. 0.90940| 0.87730|1.04 |lreplace L[100] shared 1:2 with 1 elems 1 times. +119. 0.95880| 0.92530|1.04 |lreplace L[100] shared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +120. 0.97030| 0.94920|1.02 |lreplace L[100] shared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +121. 0.96520| 0.99490|0.97 |lreplace L[100] shared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +122. 0.96970| 0.94620|1.02 |lreplace L[100] shared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +123. 0.95190| 0.97260|0.98 |lreplace L[100] shared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +124. 0.96100| 0.94280|1.02 |lreplace L[100] shared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +125. 3.88890| 3.31820|1.17 |lreplace L[1000] shared 0:1 with 3 elems 1 times. +126. 3.88640| 3.36360|1.16 |lreplace L[1000] shared 0:1 with 2 elems 1 times. +127. 3.93460| 3.32050|1.18 |lreplace L[1000] shared 0:1 with 1 elems 1 times. +128. 3.83000| 3.33620|1.15 |lreplace L[1000] shared 1:2 with 3 elems 1 times. +129. 3.90790| 3.28990|1.19 |lreplace L[1000] shared 1:2 with 2 elems 1 times. +130. 3.96350| 3.37550|1.17 |lreplace L[1000] shared 1:2 with 1 elems 1 times. +131. 4.01580| 3.44970|1.16 |lreplace L[1000] shared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +132. 4.00600| 3.46050|1.16 |lreplace L[1000] shared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +133. 4.04070| 3.39300|1.19 |lreplace L[1000] shared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +134. 3.96110| 3.45400|1.15 |lreplace L[1000] shared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +135. 3.99370| 3.41680|1.17 |lreplace L[1000] shared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +136. 4.03230| 3.47010|1.16 |lreplace L[1000] shared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +137. 34.93770| 29.83270|1.17 |lreplace L[10000] shared 0:1 with 3 elems 1 times. +138. 34.98580| 30.19310|1.16 |lreplace L[10000] shared 0:1 with 2 elems 1 times. +139. 35.05860| 30.02560|1.17 |lreplace L[10000] shared 0:1 with 1 elems 1 times. +140. 35.10190| 29.87490|1.17 |lreplace L[10000] shared 1:2 with 3 elems 1 times. +141. 35.09290| 30.15570|1.16 |lreplace L[10000] shared 1:2 with 2 elems 1 times. +142. 35.15620| 30.31950|1.16 |lreplace L[10000] shared 1:2 with 1 elems 1 times. +143. 35.45930| 30.32200|1.17 |lreplace L[10000] shared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +144. 35.39280| 29.78930|1.19 |lreplace L[10000] shared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +145. 35.34340| 29.96270|1.18 |lreplace L[10000] shared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +146. 35.38980| 30.14600|1.17 |lreplace L[10000] shared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +147. 35.38750| 29.86510|1.18 |lreplace L[10000] shared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +148. 35.28000| 30.06530|1.17 |lreplace L[10000] shared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +149. 0.60670| 0.62750|0.97 |lreplace L[10] shared-span 0:1 with 3 elems 1 times. +150. 0.61480| 0.62680|0.98 |lreplace L[10] shared-span 0:1 with 2 elems 1 times. +151. 0.62980| 0.65230|0.97 |lreplace L[10] shared-span 0:1 with 1 elems 1 times. +152. 0.64620| 0.61170|1.06 |lreplace L[10] shared-span 1:2 with 3 elems 1 times. +153. 0.60560| 0.63060|0.96 |lreplace L[10] shared-span 1:2 with 2 elems 1 times. +154. 0.61010| 0.63700|0.96 |lreplace L[10] shared-span 1:2 with 1 elems 1 times. +155. 0.76760| 0.77940|0.98 |lreplace L[10] shared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +156. 0.66550| 0.97870|0.68 |lreplace L[10] shared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +157. 0.68190| 0.81500|0.84 |lreplace L[10] shared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +158. 0.70920| 0.77750|0.91 |lreplace L[10] shared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +159. 0.69400| 0.79640|0.87 |lreplace L[10] shared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +160. 0.79150| 0.68680|1.15 |lreplace L[10] shared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +161. 0.89000| 0.85330|1.04 |lreplace L[100] shared-span 0:1 with 3 elems 1 times. +162. 0.91340| 0.87790|1.04 |lreplace L[100] shared-span 0:1 with 2 elems 1 times. +163. 0.91230| 0.89800|1.02 |lreplace L[100] shared-span 0:1 with 1 elems 1 times. +164. 0.91210| 0.87770|1.04 |lreplace L[100] shared-span 1:2 with 3 elems 1 times. +165. 0.90490| 0.87460|1.03 |lreplace L[100] shared-span 1:2 with 2 elems 1 times. +166. 0.89170| 0.89650|0.99 |lreplace L[100] shared-span 1:2 with 1 elems 1 times. +167. 0.96910| 0.92580|1.05 |lreplace L[100] shared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +168. 0.96320| 0.95080|1.01 |lreplace L[100] shared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +169. 0.98120| 0.99000|0.99 |lreplace L[100] shared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +170. 0.98520| 0.95170|1.04 |lreplace L[100] shared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +171. 0.96350| 0.93680|1.03 |lreplace L[100] shared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +172. 0.95590| 0.97240|0.98 |lreplace L[100] shared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +173. 3.93890| 3.33180|1.18 |lreplace L[1000] shared-span 0:1 with 3 elems 1 times. +174. 3.90450| 3.34690|1.17 |lreplace L[1000] shared-span 0:1 with 2 elems 1 times. +175. 3.90990| 3.35300|1.17 |lreplace L[1000] shared-span 0:1 with 1 elems 1 times. +176. 3.87520| 3.32150|1.17 |lreplace L[1000] shared-span 1:2 with 3 elems 1 times. +177. 3.86850| 3.30460|1.17 |lreplace L[1000] shared-span 1:2 with 2 elems 1 times. +178. 3.93850| 3.44900|1.14 |lreplace L[1000] shared-span 1:2 with 1 elems 1 times. +179. 3.98380| 3.41950|1.17 |lreplace L[1000] shared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +180. 3.95630| 3.43710|1.15 |lreplace L[1000] shared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +181. 3.91830| 3.39130|1.16 |lreplace L[1000] shared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +182. 3.99120| 3.46460|1.15 |lreplace L[1000] shared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +183. 3.99690| 3.37240|1.19 |lreplace L[1000] shared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +184. 3.96020| 3.48160|1.14 |lreplace L[1000] shared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +185. 35.03300| 29.85710|1.17 |lreplace L[10000] shared-span 0:1 with 3 elems 1 times. +186. 35.08120| 30.09080|1.17 |lreplace L[10000] shared-span 0:1 with 2 elems 1 times. +187. 35.07970| 29.82660|1.18 |lreplace L[10000] shared-span 0:1 with 1 elems 1 times. +188. 35.08990| 29.80730|1.18 |lreplace L[10000] shared-span 1:2 with 3 elems 1 times. +189. 34.97130| 29.80890|1.17 |lreplace L[10000] shared-span 1:2 with 2 elems 1 times. +190. 35.24050| 29.76600|1.18 |lreplace L[10000] shared-span 1:2 with 1 elems 1 times. +191. 35.47870| 30.21850|1.17 |lreplace L[10000] shared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +192. 35.41750| 30.18880|1.17 |lreplace L[10000] shared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +193. 35.59270| 30.04520|1.18 |lreplace L[10000] shared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +194. 35.46990| 29.97180|1.18 |lreplace L[10000] shared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +195. 35.47750| 30.15570|1.18 |lreplace L[10000] shared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +196. 35.50200| 30.01660|1.18 |lreplace L[10000] shared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +``` + +**Pure inserts into an unshared list** + +There is significant improvement when the number of elements before the insertion +point is much smaller than the number after (227-229). + +``` +197. 0.87500| 0.79170|1.11 |lreplace L[10] unshared 0 (0:-1) elems at 0 with 1 elems 1 times. +198. 0.91670| 0.41670|2.20 |lreplace L[10] unshared 0 (0:-1) elems at 0 with 10 elems 1 times. +199. 0.83330| 0.37500|2.22 |lreplace L[10] unshared 0 (1:-1) elems at 1 with 1 elems 1 times. +200. 0.87500| 0.87500|1.00 |lreplace L[10] unshared 0 (1:-1) elems at 1 with 10 elems 1 times. +201. 0.83330| 0.87500|0.95 |lreplace L[10] unshared 0 (5:-1) elems at 5 with 1 elems 1 times. +202. 0.37500| 0.75000|0.50 |lreplace L[10] unshared 0 (5:-1) elems at 5 with 10 elems 1 times. +203. 0.37500| 0.87500|0.43 |lreplace L[10] unshared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +204. 0.41670| 0.41670|1.00 |lreplace L[10] unshared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +205. 0.75000| 0.87500|0.86 |lreplace L[10] unshared 0 (end:-1) elems at end with 1 elems 1 times. +206. 0.37500| 0.95830|0.39 |lreplace L[10] unshared 0 (end:-1) elems at end with 10 elems 1 times. +207. 0.70410| 0.70410|1.00 |lreplace L[100] unshared 0 (0:-1) elems at 0 with 1 elems 1 times. +208. 0.42860| 0.30610|1.40 |lreplace L[100] unshared 0 (0:-1) elems at 0 with 10 elems 1 times. +209. 0.34010| 0.28910|1.18 |lreplace L[100] unshared 0 (1:-1) elems at 1 with 1 elems 1 times. +210. 0.83330| 0.80270|1.04 |lreplace L[100] unshared 0 (1:-1) elems at 1 with 10 elems 1 times. +211. 0.30950| 1.49660|0.21 |lreplace L[100] unshared 0 (50:-1) elems at 50 with 1 elems 1 times. +212. 0.82650| 0.80950|1.02 |lreplace L[100] unshared 0 (50:-1) elems at 50 with 10 elems 1 times. +213. 0.28570| 0.29250|0.98 |lreplace L[100] unshared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +214. 0.31290| 0.35030|0.89 |lreplace L[100] unshared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +215. 0.76190| 0.74490|1.02 |lreplace L[100] unshared 0 (end:-1) elems at end with 1 elems 1 times. +216. 0.38100| 0.77550|0.49 |lreplace L[100] unshared 0 (end:-1) elems at end with 10 elems 1 times. +217. 0.86670| 0.24000|3.61 |lreplace L[1000] unshared 0 (0:-1) elems at 0 with 1 elems 1 times. +218. 0.54400| 0.32530|1.67 |lreplace L[1000] unshared 0 (0:-1) elems at 0 with 10 elems 1 times. +219. 0.45870| 0.25600|1.79 |lreplace L[1000] unshared 0 (1:-1) elems at 1 with 1 elems 1 times. +220. 0.57330| 0.73600|0.78 |lreplace L[1000] unshared 0 (1:-1) elems at 1 with 10 elems 1 times. +221. 0.82400| 0.32800|2.51 |lreplace L[1000] unshared 0 (500:-1) elems at 500 with 1 elems 1 times. +222. 0.51200| 0.88000|0.58 |lreplace L[1000] unshared 0 (500:-1) elems at 500 with 10 elems 1 times. +223. 0.29600| 0.76270|0.39 |lreplace L[1000] unshared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +224. 0.52800| 0.84800|0.62 |lreplace L[1000] unshared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +225. 0.27730| 0.74930|0.37 |lreplace L[1000] unshared 0 (end:-1) elems at end with 1 elems 1 times. +226. 0.36270| 0.39200|0.93 |lreplace L[1000] unshared 0 (end:-1) elems at end with 10 elems 1 times. +227. 2.29090| 0.27250|8.41 |lreplace L[10000] unshared 0 (0:-1) elems at 0 with 1 elems 1 times. +228. 3.16880| 0.34930|9.07 |lreplace L[10000] unshared 0 (0:-1) elems at 0 with 10 elems 1 times. +229. 2.31570| 0.26000|8.91 |lreplace L[10000] unshared 0 (1:-1) elems at 1 with 1 elems 1 times. +230. 3.12450| 1.53010|2.04 |lreplace L[10000] unshared 0 (1:-1) elems at 1 with 10 elems 1 times. +231. 1.36030| 1.02910|1.32 |lreplace L[10000] unshared 0 (5000:-1) elems at 5000 with 1 elems 1 times. +232. 2.33390| 1.58240|1.47 |lreplace L[10000] unshared 0 (5000:-1) elems at 5000 with 10 elems 1 times. +233. 0.36160| 0.31870|1.13 |lreplace L[10000] unshared 0 (end-1:-1) elems at end-1 with 1 elems 1 times. +234. 0.34850| 1.26880|0.27 |lreplace L[10000] unshared 0 (end-1:-1) elems at end-1 with 10 elems 1 times. +235. 0.30770| 0.30590|1.01 |lreplace L[10000] unshared 0 (end:-1) elems at end with 1 elems 1 times. +236. 0.38990| 1.24130|0.31 |lreplace L[10000] unshared 0 (end:-1) elems at end with 10 elems 1 times. +``` + +**Pure deletes in an unshared list** + +There is no measured difference in performance. + +*Note: this has to be looked at further. I would have expected a 2x improvement +for deletions from the head for the 10000 element list based on other results.* + +``` +237. 0.87500| 1.00000|0.88 |lreplace L[10] unshared 0:0 with 0 elems 1 times. +238. 1.00000| 1.00000|1.00 |lreplace L[10] unshared 1:1 with 0 elems 1 times. +239. 1.00000| 1.79170|0.56 |lreplace L[10] unshared 5:5 with 0 elems 1 times. +240. 1.08330| 0.37500|2.89 |lreplace L[10] unshared end-1:end-1 with 0 elems 1 times. +241. 0.58330| 0.50000|1.17 |lreplace L[10] unshared end:end with 0 elems 1 times. +242. 0.96940| 0.37410|2.59 |lreplace L[100] unshared 0:0 with 0 elems 1 times. +243. 0.39120| 0.45920|0.85 |lreplace L[100] unshared 1:1 with 0 elems 1 times. +244. 0.53400| 0.34690|1.54 |lreplace L[100] unshared 50:50 with 0 elems 1 times. +245. 0.94900| 0.40820|2.32 |lreplace L[100] unshared end-1:end-1 with 0 elems 1 times. +246. 0.46260| 0.43540|1.06 |lreplace L[100] unshared end:end with 0 elems 1 times. +247. 0.86400| 0.41870|2.06 |lreplace L[1000] unshared 0:0 with 0 elems 1 times. +248. 0.88800| 0.38400|2.31 |lreplace L[1000] unshared 1:1 with 0 elems 1 times. +249. 0.38400| 0.90670|0.42 |lreplace L[1000] unshared 500:500 with 0 elems 1 times. +250. 0.99470| 0.99200|1.00 |lreplace L[1000] unshared end-1:end-1 with 0 elems 1 times. +251. 0.97070| 0.42400|2.29 |lreplace L[1000] unshared end:end with 0 elems 1 times. +252. 0.39170| 0.36000|1.09 |lreplace L[10000] unshared 0:0 with 0 elems 1 times. +253. 0.34560| 0.40590|0.85 |lreplace L[10000] unshared 1:1 with 0 elems 1 times. +254. 0.40850| 0.38690|1.06 |lreplace L[10000] unshared 5000:5000 with 0 elems 1 times. +255. 0.54130| 0.67390|0.80 |lreplace L[10000] unshared end-1:end-1 with 0 elems 1 times. +256. 0.44610| 0.44750|1.00 |lreplace L[10000] unshared end:end with 0 elems 1 times. +``` + +**Replacements in unshared list** + +The TIP 625 implementation is a few times faster (293, 295, 296, 341, 343, 344) +when the starting replacement index is much closer to the head than the tail. +Again this is because TIP 625 permits moving the shorter segment to make room +for insertions. + +``` +257. 1.00000| 1.00000|1.00 |lreplace L[10] unshared 0:1 with 3 elems 1 times. +258. 0.37500| 0.37500|1.00 |lreplace L[10] unshared 0:1 with 2 elems 1 times. +259. 1.00000| 1.00000|1.00 |lreplace L[10] unshared 0:1 with 1 elems 1 times. +260. 0.50000| 1.04170|0.48 |lreplace L[10] unshared 1:2 with 3 elems 1 times. +261. 1.00000| 0.87500|1.14 |lreplace L[10] unshared 1:2 with 2 elems 1 times. +262. 0.50000| 2.50000|0.20 |lreplace L[10] unshared 1:2 with 1 elems 1 times. +263. 1.12500| 1.12500|1.00 |lreplace L[10] unshared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +264. 1.00000| 1.12500|0.89 |lreplace L[10] unshared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +265. 1.25000| 0.66670|1.87 |lreplace L[10] unshared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +266. 0.41670| 1.00000|0.42 |lreplace L[10] unshared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +267. 1.08330| 0.58330|1.86 |lreplace L[10] unshared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +268. 0.58330| 1.12500|0.52 |lreplace L[10] unshared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +269. 0.96940| 0.41500|2.34 |lreplace L[100] unshared 0:1 with 3 elems 1 times. +270. 0.42520| 0.91840|0.46 |lreplace L[100] unshared 0:1 with 2 elems 1 times. +271. 0.48640| 0.90480|0.54 |lreplace L[100] unshared 0:1 with 1 elems 1 times. +272. 0.47280| 0.43880|1.08 |lreplace L[100] unshared 1:2 with 3 elems 1 times. +273. 0.91160| 0.98640|0.92 |lreplace L[100] unshared 1:2 with 2 elems 1 times. +274. 0.53740| 0.32990|1.63 |lreplace L[100] unshared 1:2 with 1 elems 1 times. +275. 0.99660| 1.02040|0.98 |lreplace L[100] unshared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +276. 0.47280| 0.42520|1.11 |lreplace L[100] unshared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +277. 0.51360| 0.50000|1.03 |lreplace L[100] unshared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +278. 0.97960| 0.98640|0.99 |lreplace L[100] unshared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +279. 0.94560| 0.96600|0.98 |lreplace L[100] unshared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +280. 0.48300| 0.52720|0.92 |lreplace L[100] unshared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +281. 0.56800| 0.44000|1.29 |lreplace L[1000] unshared 0:1 with 3 elems 1 times. +282. 0.46130| 0.91200|0.51 |lreplace L[1000] unshared 0:1 with 2 elems 1 times. +283. 0.53870| 0.55470|0.97 |lreplace L[1000] unshared 0:1 with 1 elems 1 times. +284. 1.14400| 0.40000|2.86 |lreplace L[1000] unshared 1:2 with 3 elems 1 times. +285. 0.41600| 0.37600|1.11 |lreplace L[1000] unshared 1:2 with 2 elems 1 times. +286. 0.44000| 0.39730|1.11 |lreplace L[1000] unshared 1:2 with 1 elems 1 times. +287. 0.98400| 0.50670|1.94 |lreplace L[1000] unshared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +288. 0.78930| 0.49870|1.58 |lreplace L[1000] unshared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +289. 1.01070| 0.99200|1.02 |lreplace L[1000] unshared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +290. 0.96530| 0.48270|2.00 |lreplace L[1000] unshared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +291. 1.00000| 0.98130|1.02 |lreplace L[1000] unshared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +292. 0.46930| 0.44000|1.07 |lreplace L[1000] unshared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +293. 2.44610| 0.45010|5.43 |lreplace L[10000] unshared 0:1 with 3 elems 1 times. +294. 0.41490| 0.39600|1.05 |lreplace L[10000] unshared 0:1 with 2 elems 1 times. +295. 1.81360| 0.39630|4.58 |lreplace L[10000] unshared 0:1 with 1 elems 1 times. +296. 2.60000| 0.38850|6.69 |lreplace L[10000] unshared 1:2 with 3 elems 1 times. +297. 0.44320| 0.40720|1.09 |lreplace L[10000] unshared 1:2 with 2 elems 1 times. +298. 1.49570| 0.46590|3.21 |lreplace L[10000] unshared 1:2 with 1 elems 1 times. +299. 0.54000| 0.52080|1.04 |lreplace L[10000] unshared 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +300. 0.42930| 0.49250|0.87 |lreplace L[10000] unshared 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +301. 0.48510| 0.52480|0.92 |lreplace L[10000] unshared 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +302. 0.53410| 0.47120|1.13 |lreplace L[10000] unshared 0 (end-1:end) elems at end-1 with 3 elems 1 times. +303. 0.49710| 0.48210|1.03 |lreplace L[10000] unshared 0 (end-1:end) elems at end-1 with 2 elems 1 times. +304. 0.44850| 0.49230|0.91 |lreplace L[10000] unshared 0 (end-1:end) elems at end-1 with 1 elems 1 times. +305. 0.37500| 0.37500|1.00 |lreplace L[10] unshared-span 0:1 with 3 elems 1 times. +306. 0.37500| 0.87500|0.43 |lreplace L[10] unshared-span 0:1 with 2 elems 1 times. +307. 0.37500| 0.87500|0.43 |lreplace L[10] unshared-span 0:1 with 1 elems 1 times. +308. 0.37500| 0.37500|1.00 |lreplace L[10] unshared-span 1:2 with 3 elems 1 times. +309. 0.87500| 0.41670|2.10 |lreplace L[10] unshared-span 1:2 with 2 elems 1 times. +310. 0.37500| 1.16670|0.32 |lreplace L[10] unshared-span 1:2 with 1 elems 1 times. +311. 1.00000| 1.00000|1.00 |lreplace L[10] unshared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +312. 1.00000| 1.00000|1.00 |lreplace L[10] unshared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +313. 0.45830| 1.00000|0.46 |lreplace L[10] unshared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +314. 1.00000| 1.00000|1.00 |lreplace L[10] unshared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +315. 1.00000| 1.12500|0.89 |lreplace L[10] unshared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +316. 1.00000| 0.45830|2.18 |lreplace L[10] unshared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +317. 0.41500| 0.91500|0.45 |lreplace L[100] unshared-span 0:1 with 3 elems 1 times. +318. 0.40140| 0.38100|1.05 |lreplace L[100] unshared-span 0:1 with 2 elems 1 times. +319. 0.96600| 0.37760|2.56 |lreplace L[100] unshared-span 0:1 with 1 elems 1 times. +320. 0.42180| 0.92520|0.46 |lreplace L[100] unshared-span 1:2 with 3 elems 1 times. +321. 0.40140| 0.87070|0.46 |lreplace L[100] unshared-span 1:2 with 2 elems 1 times. +322. 1.00680| 0.91500|1.10 |lreplace L[100] unshared-span 1:2 with 1 elems 1 times. +323. 0.45240| 1.02040|0.44 |lreplace L[100] unshared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +324. 1.00340| 0.44900|2.23 |lreplace L[100] unshared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +325. 0.45580| 1.01020|0.45 |lreplace L[100] unshared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +326. 0.97620| 0.99660|0.98 |lreplace L[100] unshared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +327. 0.98640| 0.93540|1.05 |lreplace L[100] unshared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +328. 0.48980| 0.47960|1.02 |lreplace L[100] unshared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +329. 0.54130| 0.91200|0.59 |lreplace L[1000] unshared-span 0:1 with 3 elems 1 times. +330. 0.90930| 0.87730|1.04 |lreplace L[1000] unshared-span 0:1 with 2 elems 1 times. +331. 1.02670| 0.92000|1.12 |lreplace L[1000] unshared-span 0:1 with 1 elems 1 times. +332. 0.89870| 0.39200|2.29 |lreplace L[1000] unshared-span 1:2 with 3 elems 1 times. +333. 0.89330| 0.93330|0.96 |lreplace L[1000] unshared-span 1:2 with 2 elems 1 times. +334. 0.48800| 0.88800|0.55 |lreplace L[1000] unshared-span 1:2 with 1 elems 1 times. +335. 1.67200| 0.99470|1.68 |lreplace L[1000] unshared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +336. 0.52800| 0.44800|1.18 |lreplace L[1000] unshared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +337. 0.50400| 0.44530|1.13 |lreplace L[1000] unshared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +338. 0.48270| 0.42930|1.12 |lreplace L[1000] unshared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +339. 0.44530| 0.45330|0.98 |lreplace L[1000] unshared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +340. 0.48530| 0.99470|0.49 |lreplace L[1000] unshared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +341. 2.48640| 0.40530|6.13 |lreplace L[10000] unshared-span 0:1 with 3 elems 1 times. +342. 0.41890| 0.40930|1.02 |lreplace L[10000] unshared-span 0:1 with 2 elems 1 times. +343. 1.79730| 0.39870|4.51 |lreplace L[10000] unshared-span 0:1 with 1 elems 1 times. +344. 2.42000| 0.41730|5.80 |lreplace L[10000] unshared-span 1:2 with 3 elems 1 times. +345. 0.37920| 0.41360|0.92 |lreplace L[10000] unshared-span 1:2 with 2 elems 1 times. +346. 1.77710| 0.41440|4.29 |lreplace L[10000] unshared-span 1:2 with 1 elems 1 times. +347. 0.50530| 0.42830|1.18 |lreplace L[10000] unshared-span 0 (end-2:end-1) elems at end-2 with 3 elems 1 times. +348. 0.46240| 0.46690|0.99 |lreplace L[10000] unshared-span 0 (end-2:end-1) elems at end-2 with 2 elems 1 times. +349. 0.74880| 0.47840|1.57 |lreplace L[10000] unshared-span 0 (end-2:end-1) elems at end-2 with 1 elems 1 times. +350. 0.41440| 0.46510|0.89 |lreplace L[10000] unshared-span 0 (end-1:end) elems at end-1 with 3 elems 1 times. +351. 0.40290| 0.47520|0.85 |lreplace L[10000] unshared-span 0 (end-1:end) elems at end-1 with 2 elems 1 times. +352. 0.64530| 0.45630|1.41 |lreplace L[10000] unshared-span 0 (end-1:end) elems at end-1 with 1 elems 1 times. +``` + +**Total run time** + +``` +353.2129.60240|1799.40910|1.18 |lreplace total run time +``` + +### lreverse + +TIP 625 does not change the implementation of `lreverse`. + +``` + [1] [2] +1. 0.28000| 0.32230|0.87 |lreverse L[10] shared +2. 0.54080| 0.52420|1.03 |lreverse L[100] shared +3. 3.12020| 2.99680|1.04 |lreverse L[1000] shared +4. 3.12240| 2.97590|1.05 |lreverse L[1000] shared-span +5. 28.84760| 28.37830|1.02 |lreverse L[10000] shared +6. 29.05440| 28.26280|1.03 |lreverse L[10000] shared-span +7. 0.08260| 0.04570|1.81 |lreverse L[10] unshared +8. 0.16640| 0.11280|1.48 |lreverse L[100] unshared +9. 0.13310| 0.07190|1.85 |lreverse L[100] unshared-span +10. 0.60120| 0.74040|0.81 |lreverse L[1000] unshared +11. 0.35760| 0.37410|0.96 |lreverse L[1000] unshared-span +12. 3.32980| 3.39540|0.98 |lreverse L[10000] unshared +13. 3.29130| 3.27690|1.00 |lreverse L[10000] unshared-span +14. 72.92740| 71.47740|1.02 |lreverse total run time +``` + +### lsort + +TIP 625 does not change the implementation of `lsort`. + +``` + [1] [2] +1. 1235.98330|1076.14330|1.15 |lsort L[10000] shared +2. 1204.60000|1050.87670|1.15 |lsort L[9998] shared-span +3. 1195.14670|1038.43000|1.15 |lsort L[10000] unshared +4. 1201.93670|1051.67330|1.14 |lsort L[9998] unshared-span +5. 4837.66670|4217.12330|1.15 |lsort total run time + +``` + +### lsearch + +TIP 625 does not change the implementation of `lsearch`. + +``` + [1] [2] +1. 0.43450| 0.39900|1.09 |lsearch L[10] shared +2. 1.27670| 1.25140|1.02 |lsearch L[100] shared +3. 9.97910| 9.79560|1.02 |lsearch L[1000] shared +4. 96.00840| 94.60320|1.01 |lsearch L[10000] shared +5. 0.44090| 0.40390|1.09 |lsearch L[10] shared-span +6. 1.28580| 1.28200|1.00 |lsearch L[100] shared-span +7. 10.00410| 9.80580|1.02 |lsearch L[1000] shared-span +8. 96.09630| 93.87000|1.02 |lsearch L[10000] shared-span +9. 215.52570| 211.41090|1.02 |lsearch total run time +``` + +### concat + +The performance of `concat` is more or less the same. The implementation in TIP 625 +is a little different however. Since the list store no long directly represents +the contents of a Tcl list in the presence of a span in the internal representation, +the canonical list marker has been moved from the element storage structure +(`List` pre-625, `ListStore` post-625) to the `ListSpan` structure. + +``` + [1] [2] +1. 0.39210| 0.45290|0.87 |concat L[10] pure lists with elements of length 1 +2. 0.39130| 0.42740|0.92 |concat L[10] canonical lists with elements of length 1 +3. 0.52120| 0.51800|1.01 |concat L[10] non-canonical lists with elements of length 1 +4. 0.39150| 0.44130|0.89 |concat L[10] pure lists with elements of length 100 +5. 0.39300| 0.43200|0.91 |concat L[10] canonical lists with elements of length 100 +6. 0.49680| 0.55880|0.89 |concat L[10] non-canonical lists with elements of length 100 +7. 1.02070| 0.88440|1.15 |concat L[100] pure lists with elements of length 1 +8. 1.01440| 0.88620|1.14 |concat L[100] canonical lists with elements of length 1 +9. 0.54440| 0.54540|1.00 |concat L[100] non-canonical lists with elements of length 1 +10. 1.02290| 0.89080|1.15 |concat L[100] pure lists with elements of length 100 +11. 1.01180| 0.88060|1.15 |concat L[100] canonical lists with elements of length 100 +12. 1.15390| 1.13920|1.01 |concat L[100] non-canonical lists with elements of length 100 +13. 7.55860| 6.06680|1.25 |concat L[1000] pure lists with elements of length 1 +14. 7.55550| 6.02160|1.25 |concat L[1000] canonical lists with elements of length 1 +15. 0.59930| 0.51360|1.17 |concat L[1000] non-canonical lists with elements of length 1 +16. 7.54490| 6.06080|1.24 |concat L[1000] pure lists with elements of length 100 +17. 7.53940| 6.10690|1.23 |concat L[1000] canonical lists with elements of length 100 +18. 5.61890| 5.89150|0.95 |concat L[1000] non-canonical lists with elements of length 100 +19. 73.01750| 60.45310|1.21 |concat L[10000] pure lists with elements of length 1 +20. 73.15510| 60.58030|1.21 |concat L[10000] canonical lists with elements of length 1 +21. 1.51330| 1.68590|0.90 |concat L[10000] non-canonical lists with elements of length 1 +22. 73.16820| 60.36880|1.21 |concat L[10000] pure lists with elements of length 100 +23. 73.03110| 60.63200|1.20 |concat L[10000] canonical lists with elements of length 100 +24. 560.61300| 561.31200|1.00 |concat L[10000] non-canonical lists with elements of length 100 +25. 0.38680| 0.42730|0.91 |concat L[10] pure spanned lists with elements of length 1 +26. 0.38390| 0.42340|0.91 |concat L[10] canonical spanned lists with elements of length 1 +27. 0.39030| 0.47080|0.83 |concat L[10] pure spanned lists with elements of length 100 +28. 0.39880| 0.45830|0.87 |concat L[10] canonical spanned lists with elements of length 100 +29. 1.01650| 0.88040|1.15 |concat L[100] pure spanned lists with elements of length 1 +30. 1.01970| 0.88460|1.15 |concat L[100] canonical spanned lists with elements of length 1 +31. 1.02070| 0.88790|1.15 |concat L[100] pure spanned lists with elements of length 100 +32. 1.01970| 0.88440|1.15 |concat L[100] canonical spanned lists with elements of length 100 +33. 7.57620| 6.31530|1.20 |concat L[1000] pure spanned lists with elements of length 1 +34. 7.58030| 6.18480|1.23 |concat L[1000] canonical spanned lists with elements of length 1 +35. 7.60980| 6.33390|1.20 |concat L[1000] pure spanned lists with elements of length 100 +36. 7.58360| 6.18870|1.23 |concat L[1000] canonical spanned lists with elements of length 100 +37. 73.03940| 61.31010|1.19 |concat L[10000] pure spanned lists with elements of length 1 +38. 73.09240| 61.00820|1.20 |concat L[10000] canonical spanned lists with elements of length 1 +39. 73.10410| 60.94180|1.20 |concat L[10000] pure spanned lists with elements of length 100 +40. 72.63530| 60.26010|1.21 |concat L[10000] canonical spanned lists with elements of length 100 +41. 1227.12620|1117.61030|1.10 |concat total run time +``` + + +### lindex + +TIP 625 does not fundamentally change the implementation of `lindex` except +the index lookup has a level of indirection when a span is present. + + +``` + [1] [2] +1. 0.34410| 0.34050|1.01 |lindex L[10] shared at 5 +2. 0.30290| 0.32290|0.94 |lindex L[100] shared at 50 +3. 0.35450| 0.33670|1.05 |lindex L[100] shared-span at 50 +4. 0.32070| 0.34110|0.94 |lindex L[1000] shared at 500 +5. 0.31040| 0.34520|0.90 |lindex L[1000] shared-span at 500 +6. 0.28380| 0.28780|0.99 |lindex L[10000] shared at 5000 +7. 0.33510| 0.31780|1.05 |lindex L[10000] shared-span at 5000 +8. 2.25130| 2.29190|0.98 |lindex total run time + +``` + +### join + +TIP 625 does not change the implementation of `join`. + +``` + [1] [2] +1. 0.63350| 0.73150|0.87 |join L[10] shared +2. 3.31150| 3.51940|0.94 |join L[100] shared +3. 28.70850| 29.40520|0.98 |join L[1000] shared +4. 283.47030| 301.63530|0.94 |join L[10000] shared +5. 0.68130| 0.66160|1.03 |join L[10] shared-span +6. 3.20260| 3.18550|1.01 |join L[100] shared-span +7. 30.30590| 29.93550|1.01 |join L[1000] shared-span +8. 292.52900| 282.82870|1.03 |join L[10000] shared-span +9. 642.84250| 651.90270|0.99 |join total run time +``` + +### split + +The `split` command is primarily a test of string conversion to lists. +TIP 625 does not fundamentally change this as no spans are created or additional +free space allocated. + +``` + [1] [2] +1. 1.13950| 1.20560|0.95 |split L[10] +2. 7.84830| 8.06740|0.97 |split L[100] +3. 67.91360| 71.40540|0.95 |split L[1000] +4. 745.95000| 741.73270|1.01 |split L[10000] +5. 822.85130| 822.41110|1.00 |split total run time +``` + +### llength + +TIP 625 does not fundamentally change the implementation of `llength` except +the index lookup has a level of indirection when a span is present. + +``` + [1] [2] +1. 0.16300| 0.16470|0.99 |llength L[10] shared +2. 0.16430| 0.15990|1.03 |llength L[100] shared +3. 0.16770| 0.16350|1.03 |llength L[100] shared-span +4. 0.16100| 0.15750|1.02 |llength L[1000] shared +5. 0.17380| 0.17630|0.99 |llength L[1000] shared-span +6. 0.15780| 0.17000|0.93 |llength L[10000] shared +7. 0.21030| 0.19790|1.06 |llength L[10000] shared-span +8. 1.19790| 1.19000|1.01 |llength total run time +``` + +### lrepeat + +TIP 625 does not change the implementation of `lrepeat`. + +``` + [1] [2] +1. 0.32680| 0.29960|1.09 |lrepeat L[10] 1 elems at a time +2. 0.40190| 0.42080|0.96 |lrepeat L[10] 5 elems at a time +3. 0.47420| 0.44520|1.07 |lrepeat L[100] 1 elems at a time +4. 1.18740| 1.41090|0.84 |lrepeat L[100] 5 elems at a time +5. 2.04560| 1.88900|1.08 |lrepeat L[1000] 1 elems at a time +6. 9.70230| 11.49970|0.84 |lrepeat L[1000] 5 elems at a time +7. 18.70830| 17.58500|1.06 |lrepeat L[10000] 1 elems at a time +8. 91.49820| 110.88470|0.83 |lrepeat L[10000] 5 elems at a time +9. 124.34470| 144.43490|0.86 |lrepeat total run time +10. 124.34470| 144.43490|0.86 |Total run time +``` + +### lmap + +TIP 625 does not change the implementation of `lmap`. + +``` + [1] [2] +1. 3.77170| 3.72460|1.01 |lmap L[10] shared +2. 30.98280| 30.33220|1.02 |lmap L[100] shared +3. 281.95500| 296.92430|0.95 |lmap L[1000] shared +4. 2836.64670|2810.33000|1.01 |lmap L[10000] shared +5. 3.43640| 3.35300|1.02 |lmap L[10] shared-span +6. 29.05240| 30.18750|0.96 |lmap L[100] shared-span +7. 278.59670| 303.73630|0.92 |lmap L[1000] shared-span +8. 2791.50330|2765.93670|1.01 |lmap L[10000] shared-span +9. 6255.94490|6244.52470|1.00 |lmap total run time +10. 6255.94490|6244.52470|1.00 |Total run time +``` + +### foreach + +TIP 625 does not change the implementation of `foreach`. + +``` + [1] [2] +1. 3.30660| 3.29140|1.00 |foreach L[10] shared +2. 28.85590| 27.62580|1.04 |foreach L[100] shared +3. 289.98170| 283.34770|1.02 |foreach L[1000] shared +4. 2919.51000|2836.30000|1.03 |foreach L[10000] shared +5. 3.08390| 2.66870|1.16 |foreach L[10] shared-span +6. 28.62160| 27.74730|1.03 |foreach L[100] shared-span +7. 287.61600| 283.09830|1.02 |foreach L[1000] shared-span +8. 2908.58670|2822.31330|1.03 |foreach L[10000] shared-span +9. 6469.56230|6286.39250|1.03 |foreach total run time +``` + +## Memory statistics + +The sections below shows memory statistics when compiled with TCL_MEM_DEBUG and +with TCL_FINALIZE_ON_EXIT set. The statistics are based on a full run of the +performance suite across all commands. + +### Memory leaks + +The following snippets show the output of `memory onexit` for the two +implementations. As seen, both have identical allocation left over on exit. + +**8.7** + +``` +0000027E7D6E0428 - 0000027E7D6E0457 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclBasic.c 4877 +0000027E7D6E17A8 - 0000027E7D6E17D7 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclBasic.c 4712 +0000027E7D6E0D28 - 0000027E7D6E0D57 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclExecute.c 2880 +0000027E7D6E16A8 - 0000027E7D6E16D7 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclBasic.c 6660 +0000027E7D28ADE8 - 0000027E7D28AEB3 204 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclCompile.c 2855 +0000027E7D6E08A8 - 0000027E7D6E08CF 40 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclObj.c 4541 +0000027E7DA509E8 - 0000027E7DA509EC 5 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclLiteral.c 255 +0000027E7D6E15A8 - 0000027E7D6E15D7 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclLiteral.c 250 +0000027E7DA76CA8 - 0000027E7DA76CB2 11 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclStringObj.c 151 +0000027E7D6E0E28 - 0000027E7D6E0E57 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclStringObj.c 2847 +0000027E7CB9CD28 - 0000027E7CB9CD57 48 @ unknown 0 +0000027E7CB9A8A8 - 0000027E7CB9A8D7 48 @ unknown 0 +0000027E7CB9C8A8 - 0000027E7CB9C8D7 48 @ unknown 0 +0000027E7C6D7428 - 0000027E7C6D7457 48 @ unknown 0 +0000027E7C6FFA28 - 0000027E7C6FFA57 48 @ unknown 0 +0000027E7C6FD5A8 - 0000027E7C6FD5D7 48 @ unknown 0 +0000027E7C66DEF8 - 0000027E7C66DF09 18 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclStringObj.c 338 +0000027E7C5E0008 - 0000027E7C5E0037 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclIOUtil.c 3942 +0000027E7C5CFD88 - 0000027E7C5CFDAF 40 @ D:\src\tcltk\list-redux\tcl\win\..\win\tclWinLoad.c 392 +0000027E7C63F4C8 - 0000027E7C63F4CC 5 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclStringObj.c 338 +0000027E7C62BDC8 - 0000027E7C62BDF7 48 @ unknown 0 +0000027E7A97A3C8 - 0000027E7A97A3C9 2 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclLiteral.c 255 +0000027E7A96E4A8 - 0000027E7A96E4D7 48 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclLiteral.c 250 +0000027E7A72E988 - 0000027E7A72E9F7 112 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclBasic.c 1071 +0000027E7A7231C8 - 0000027E7A7231DF 24 @ D:\src\tcltk\list-redux\tcl\win\..\generic\tclPreserve.c 329 +``` + +**TIP 625** + +``` +000001EF07518AA8 - 000001EF07518AD7 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclBasic.c 4877 +000001EF07519328 - 000001EF07519357 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclBasic.c 4712 +000001EF07518EA8 - 000001EF07518ED7 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclExecute.c 2880 +000001EF07519BA8 - 000001EF07519BD7 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclBasic.c 6660 +000001EF071BBF18 - 000001EF071BBFE3 204 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclCompile.c 2855 +000001EF075185A8 - 000001EF075185CF 40 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclObj.c 4541 +000001EF06EF0AE8 - 000001EF06EF0AEC 5 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclLiteral.c 255 +000001EF075188A8 - 000001EF075188D7 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclLiteral.c 250 +000001EF0722F348 - 000001EF0722F352 11 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclStringObj.c 151 +000001EF075195A8 - 000001EF075195D7 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclStringObj.c 2847 +000001EF0681A8A8 - 000001EF0681A8D7 48 @ unknown 0 +000001EF06817CA8 - 000001EF06817CD7 48 @ unknown 0 +000001EF068184A8 - 000001EF068184D7 48 @ unknown 0 +000001EF0642B7B8 - 000001EF0642B7E7 48 @ unknown 0 +000001EF0645CD38 - 000001EF0645CD67 48 @ unknown 0 +000001EF0645B9B8 - 000001EF0645B9E7 48 @ unknown 0 +000001EF0636FF98 - 000001EF0636FFA9 18 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclStringObj.c 338 +000001EF06338E38 - 000001EF06338E67 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclIOUtil.c 3942 +000001EF0632ABB8 - 000001EF0632ABDF 40 @ d:\src\tcltk\core-8-branch\tcl\win\..\win\tclWinLoad.c 392 +000001EF063A0258 - 000001EF063A025C 5 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclStringObj.c 338 +000001EF06391828 - 000001EF06391857 48 @ unknown 0 +000001EF05ECA6B8 - 000001EF05ECA6B9 2 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclLiteral.c 255 +000001EF05EBFB78 - 000001EF05EBFBA7 48 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclLiteral.c 250 +000001EF0454D4C8 - 000001EF0454D537 112 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclBasic.c 1071 +000001EF04544598 - 000001EF045445AF 24 @ d:\src\tcltk\core-8-branch\tcl\win\..\generic\tclPreserve.c 329 +``` + +### Memory usage + +The comparison below of `memory info` shows no statistical difference between +the two implementation. + +``` + [1] [2] +5591454.58600|5803295.19000|0.96 |memdbg total mallocs (in thousands) +5591392.09200|5803232.53600|0.96 |memdbg total frees (in thousands) + 62.49400| 62.65400|1.00 |memdbg current packets allocated (in thousands) + 4516.11500|4530.28300|1.00 |memdbg current bytes allocated (in thousands) + 99.94300| 99.94400|1.00 |memdbg maximum packets allocated (in thousands) + 9612.75600|9617.71900|1.00 |memdbg maximum bytes allocated (in thousands) +``` + +The same is true of the memory statistics as returned by Windows. + +``` + [1] [2] + 12.56640| 12.53910|1.00 |Memory (MB) -privatebytes pre-test + 16.53130| 16.17970|1.02 |Memory (MB) -privatebytes post-test + 3.96480| 3.64060|1.09 |Memory (MB) delta -privatebytes + 21.20310| 21.18360|1.00 |Memory (MB) -workingset pre-test + 25.19140| 24.32030|1.04 |Memory (MB) -workingset post-test + 3.98830| 3.13670|1.27 |Memory (MB) delta -workingset + 21.20700| 21.18750|1.00 |Memory (MB) -workingsetpeak pre-test + 29.62890| 29.45310|1.01 |Memory (MB) -workingsetpeak post-test + 8.42190| 8.26560|1.02 |Memory (MB) delta -workingsetpeak +``` + +The above numbers however do not tell the whole story because they only shows +statistics at the end of a program. They do not make any statement about how +long objects are held on to in a real application. + +Memory wastage in the pre-TIP 625 implementation comes from overallocation of +space in the list storage area which makes further list append operations O(1). +The TIP 625 implementation also has this overallocation overhead but in addition +may keep objects alive for longer than needed which contributes to memory +overhead. This is offset by increased sharing of memory between lists. + +Consider the following sequence of pseudo-commands. + +``` +1. while {[incr i] <= 1000} {lappend L $i} +2. set R [lrange $L 250 749] +3. unset L +4. lappend R X +``` + +After 1. both implementations use the same amount of memory for the list +(ignoring fixed overhead) - 1000 allocated element Tcl_Obj's plus 1000 +allocated list slots for the elements plus up to the same number of unused +slots for further appends. + +After 2. the pre-TIP 625 implementation will have allocated another block +of internal storage for 500 elements, copied the appropriate element pointers +and incremented their reference counts. The TIP 625 implementation on the +other hand, only needs a small additional block for a `ListSpan` and thus +is more memory efficient in addition to being significantly faster. + +After 3. the situation is reversed. In the pre-TIP 625 implementation, the +original element array will be freed and only the second 500+ element block will +remain allocated. In TIP 625 on the other hand, the original 1000+ element array +will remain. Moreover, 500 element Tcl_Obj's remain allocated even though they +are "garbage" (assuming there are no other references to them). They will be +reclaimed (well, reference counts decremented) on the next access to `R` if +there are no other references to the list storage. During that time these +objects are unnecessary memory overhead. + +Note: as an aside this last delayed freeing of objects can be avoided with +the use of the K operator but should generally not be necessary. + +After 4. The access to R causes the garbage objects to be reclaimed. + +In consideration of the above, the TIP 625 implementation adopts the following +policy. A `ListRep` for a list of `N` elements will only be implemented with a +`ListSpan` component provided all the following conditions are met. This puts +some boundaries on overhead due to late release of objects. + +- `N` must be at least `TCL_LIST_SPAN_MINSIZE` + +- `N` must be at least half the size of the currently in-use space of the +corresponding `ListStore` + +- `N` must be at least 3/8 the size of the total allocated space for the `ListStore`. + +If any of the above conditions are not met, the list internal representation +will just allocate a `ListStore` similar to the pre-TIP 625 implementation +without a `ListSpan` component. + +In addition, whereas the current implementation never reduces allocated space, +the TIP 625 implementation will reallocate if the used space falls below +(currently) a quarter of the allocated space. This saves memory at the cost of +speed. Changing this behaviour is orthogonal to rest of the TIP. + +In the light of the above, the question posed is whether the TIP 625 memory +usage is higher in practice than the pre-TIP 625 implementation and if so, +whether the difference is large enough to make the TIP non-viable despite the +improvements in speed. + +Measurements with long-lived real world applications are needed to ascertain +memory impact (memory is less of consideration with ephemeral programs). +It is worth keeping in mind that + +- the garbage objects only occur with range operations and not (for example) +prepending etc. + +- the impact is only felt on usage patterns where the "parent" list's lifetime +is shorter than the "child" spanned list **and** the latter is long lived +(for instance, not a local) **and** is not subsequently modified. + +# Tests + +The Tcl test suite passes with no failures. The existing test suite has been +extended with a new test script listRep.test which focuses on code paths +in the list implementation in addition to functional tests. + +# Implementation + +See branch [`tip-625`](https://core.tcl-lang.org/tcl/tip-625). + +# Copyright + +This document has been placed in the public domain. + + + + + + + ADDED tip/626.md Index: tip/626.md ================================================================== --- /dev/null +++ tip/626.md @@ -0,0 +1,25 @@ +# TIP 626: Command arguments > 2^31 elements + Author: Jan Nijtmans + State: Draft + Type: Project + Vote: Pending + Created: 24-05-2022 + Tcl-Version: 9.1 + Keywords: Tcl + Tcl-Branch: tip-626 +----- + +# Abstract + +This TIP proposes to change Tcl internally, to use `Tcl_CreateObjCommand2()` (TIP #627), and +to change all internal handling, allowing > 2^31 elements. This doesn't change any +API (since the API is already available), but it has some consequences. + +# Implementation + +See branch [`tip-626`](https://core.tcl-lang.org/tcl/timeline?r=tip-626) + +# Copyright + +This document has been placed in the public domain. + ADDED tip/627.md Index: tip/627.md ================================================================== --- /dev/null +++ tip/627.md @@ -0,0 +1,104 @@ +# TIP 627: New functions for handling commands > 2^31 elements (for 8.7) + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 01-06-2022 + Tcl-Version: 8.7 + Keywords: Tcl + Tcl-Branch: tip-627 + Vote-Summary Accepted 3/0/1 + Votes-For: JN, KBK, KW + Votes-Against: none + Votes-Present: FV +----- + +# Abstract + +This TIP proposes 4 new functions: + + * `Tcl_CreateObjCommand2` + * `Tcl_CreateObjTrace2` + * `Tcl_NRCreateCommand2` + * `Tcl_NRCallObjProc2` + +Those functions do the same as `Tcl_CreateObjCommand`/`Tcl_CreateObjTrace`/`Tcl_NRCreateCommand`/`Tcl_NRCallObjProc`, +but their `Tcl_ObjCmdProc *` argument is now of type `Tcl_ObjCmdProc2 *`, and +`Tcl_CmdObjTraceProc *` (for `Tcl_CreateObjTrace2`) is now of type `Tcl_CmdObjTraceProc2 *`. +Those new types can handle more than 2^31 command line arguments when used in Tcl 9.0. + +# Specification + +The following new functions are defined: + + * `Tcl_CreateObjCommand2(Tcl_Interp *, const char *, Tcl_ObjCmdProc2 *, ClientData, Tcl_CmdDeleteProc *)` + * `Tcl_CreateObjTrace2(Tcl_Interp *, Tcl_Size, int, Tcl_CmdObjTraceProc2 *, ClientData, Tcl_CmdObjTraceDeleteProc *)` + * `Tcl_NRCreateCommand2(Tcl_Interp *, const char *, Tcl_ObjCmdProc2 *, Tcl_ObjCmdProc2 *, ClientData, Tcl_CmdDeleteProc *)` + * `Tcl_NRCallObjProc2(Tcl_Interp *, Tcl_ObjCmdProc2 *, ClientData, Tcl_Size, Tcl_Obj *const *)` + + +The definitions of the new types are: +
+typedef int (Tcl_ObjCmdProc2) (ClientData clientData, Tcl_Interp *interp,
+	Tcl_Size objc, struct Tcl_Obj *const *objv);
+typedef int (Tcl_CmdObjTraceProc2) (ClientData clientData, Tcl_Interp *interp,
+	Tcl_Size level, const char *command, Tcl_Command commandInfo, Tcl_Size objc,
+	Tcl_Obj *const *objv);
+
+Note that the `objc` argument changed type from `int` to `Tcl_Size`. + +Those functions allow extensions to register commands or trace functions which can handle +more than 2^31 elements. Since the Tcl core cannot handle commands with more than +2^31 elements yet, this - for now - is of limited usability: The core should first be +extended to handle this everywhere, which is a massive amount of work. Therefore, +I am choosing to submit this part separately, so it can be used in Tcl 8.7 as well. +A later [TIP #626](626.md) (for Tcl 9.0), which makes the actual transition +making it really useful, can then decided upon separately. Also, if the API is +decided upon, the actual transition could even be delayed until Tcl 9.1: As +long as the API stays the same, it is considered an upwards compatible +change, no matter how it is handled internally. + +Starting with Tcl 9.0, the `Tcl_CmdInfo` struct gets two additional +elements: +
+typedef struct {
+    ...
+    Tcl_ObjCmdProc2 *objProc2;	/* Command's object2-based function. */
+    void *objClientData2;	/* ClientData for object2 proc. */
+} Tcl_CmdInfo;
+
+After calling the function `Tcl_GetCommandInfo()`, if `Tcl_CreateObjCommand2` +was used for registering the command, those fields will contain the +original function and clientData used in `Tcl_CreateObjCommand2`. +This change cannot be made in Tcl 8.7, since `Tcl_CmdInfo` is +usually allocated on the C-stack: Enlarging a struct size +(and writing the additional fields) is not considered binary +compatible. In Tcl 9.0, binary compatibility is lost anyway, +there we can afford this addition. Also - Tcl 9.0 only -, +when `Tcl_CreateObjCommand2` is used, the `isNativeObjectProc` +will be set to `2`. Current code is normally checking `isNativeObjectProc` +for being !=0, in order to see whether `objProc`/`objClientData` +is usable. That's still true: if `isNativeObjectProc` is `2`, +`objProc`/`objClientData` will contain wrapper information, +resulting in calling `objProc2`/`objClientData2`. So, no +current code needs to be adapted for Tcl 9.0: The promise +of source compatibility is still kept. + +# Addendum + +After [TIP #665](665.md) was accepted, a lot of functions changed from +using size\_t to Tcl\_Size parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. + +# Implementation + +See branch [`tip-627`](https://core.tcl-lang.org/tcl/timeline?r=tip-627) + +# Compatibility + +The proposed change is 100% source and binary compatible with Tcl 8.6, since +the new functions are implemented as wrappers around the original functions. + +# Copyright + +This document has been placed in the public domain. ADDED tip/628.md Index: tip/628.md ================================================================== --- /dev/null +++ tip/628.md @@ -0,0 +1,187 @@ +# TIP 628: Shared 8.7/9.0 build environment + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 22-06-2022 + Tcl-Version: 9.0 + Keywords: Tcl + Tcl-Branch: tcl8-compat + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Imagine the situation we want to compile an extensions for both +Tcl 8.7 and 9.0. That means, two environments need to be set up, with +each of them having it's own 'tcl.h' and 'libtclstub<version>.a'. + +This TIP proposes bringing this challenge down to a single environment +with can compile the extension for both 8.7 (possibly 8.6 also) and 9.0. + +# Specification + +First, the stub library 'libtclstub9.0.a' is renamed to 'libtclstub.a', so +without version number. Reason: the source code of 'libtclstub9.0.a' is +exactly the same as 'libtclstub8.7.a', there is no reason to +have a version-number in the filename. Actually 'libtclstub9.0.a' has +some more functions, which are not usable in Tcl 8.7, but that is +handled by proper if'def'ing in 'tcl.h'. This makes 'libtclstub.a' +usable for both Tcl 8.x and 9.0. + +The biggest difference between 'tcl.h' in 8.7 and 9.0 is that in +Tcl 8.7 many variables have 'int' arguments while in Tcl 9.0 those +are 'ptrdiff_t' arguments. That can be handled in 'tcl.h' as follows: +
+ #if !defined(TCL_MAJOR_VERSION)
+ #   define TCL_MAJOR_VERSION 9
+ #endif
+ #if TCL_MAJOR_VERSION > 8
+ #   define Tcl_Size ptrdiff_t
+ #else
+ #   define Tcl_Size int
+ #endif
+
+ +All parameters in 'tcl.h', 'tclDecls.h' ... are modified to use type 'Tcl_Size' +in stead of 'ptrdiff_t'. This makes 'tcl.h' from 9.0 usable for Tcl 8.7 too +with the following additional restrictions: + +* Anything what was deprecated in Tcl 8.7 (and so, removed in 9.0) is still not usable in this mode. +* It only works for stub-enabled extensions, not for static linking. +* 'TCL_VERSION' and 'TCL_PATCHLEVEL' are not available for extensions. +* No guarantee that the extension will load in Tcl 8.6 too (it will work if no Tcl 8.7-specific API is used in the extension) + +# Demo + +So, how should an extension for Tcl 8.7 be compiled in a Tcl 9.0 environment? The +only thing to be done is add `-DTCL_MAJOR_VERSION=8` to the `CFLAGS`. Everything +else is exactly the same as compiling for Tcl 9.0. + +Example. Let's build 'pkga.dll'. This dll can be compiled +as follows (for 64-bit Windows) for loading it in tclsh90: +
+    x86_64-w64-mingw32-gcc -shared -DUSE_TCL_STUBS=1 -o tcl9pkga.dll unix/dltest/pkga.c -ltclstub
+
+Now, compile the same dll for use in Tcl 8.6 or 8.7: +
+    x86_64-w64-mingw32-gcc -shared -DUSE_TCL_STUBS=1 -DTCL_MAJOR_VERSION=8 -o pkga.dll unix/dltest/pkga.c -ltclstub
+
+ +You can try it out: +
+> tclsh90
+$ load ./tcl9pkga.dll
+$ pkga_eq
+wrong # args: should be "pkga_eq string1 string2"
+$ exit
+> tclsh86
+$ load ./pkga.dll
+$ pkga_eq
+wrong # args: should be "pkga_eq string1 string2"
+$ exit
+> tclsh90
+$ load ./pkga.dll
+interpreter uses an incompatible stubs mechanism
+$ exit
+
+ +# Implementation + +See branch [`tcl8-compat`](https://core.tcl-lang.org/tcl/timeline?r=tcl8-compat) + +win/Makefile is adapted such that the 'registry' and 'dde' dll's are compiled +for both Tcl 9.0 and 8.6 (since those 2 dll's fulfill all restrictions mentioned +above). And also unix/dltest/Makefile is adapted such that 'pkga', 'pkgb' and 'pkgc' +also are compiled for both (8.6 and 9.0) environments. + +# TEA + +For extensions, the TEA files (tcl.m4 and rules.vc) are also extended in order to +make it easier to use this feature. For 'rules.vc' there's the additional `OPTS=tcl8`, +for 'configure' there's the additional `--with-tcl8`. The effect of these options is +that `-DTCL_MAJOR_VERSION=8` is added to the `CFLAGS` and that the shared library name +changes from `libtcl9XXX.so` (`tcl9XXX.dll`) back to `libXXX.so` (`XXX.dll`). + +This enhancement is implemented in the [`tcl8-compat`](https://core.tcl-lang.org/tclconfig/timeline?r=tcl8-compat) +branch from the "tclconfig" repository. When this change is merged to trunk, all extensions +can use it by just re-generating the "configure" script. No other changes are necessary. + +# Details + +The explanation above that the biggest difference between 8.7 and 9.0 is the +`int` vs. `ptrdiff_t` is not the whole story. For example, the functions +`Tcl_UtfNcmp`, `Tcl_UtfNcasecmp` ('tclDecls.h') and `TclpUtfNcmp2` ('tclIntDecls.h') +have a `unsigned long` parameter in Tcl8.7 which becomes `size_t` in Tcl 9.0. +On most platforms, `sizeof(unsigned long)` is equal to `sizeof(size_t)`, so there +is no problem, but there is one exception which needs special consideration: +Windows 64-bit (`unsigned long` = 32-bit, `size_t` = 64-bit). This means that +extensions compiled for Tcl 8.7 in a Tcl 9.0 build environment will push +8 bytes on the stack in stead of 4. Since Windows 64 is little-endian, the +last 4 bytes will be 0. Conclusion: we are lucky that Windows 64-bit is +little-endian and that the parameter is the last one: Pushing 4 extra +zero-bytes doesn't hurt at all, everything further works as expected. The +'pkga' demo is changed to use `Tcl_UtfNcmp` in order to prove that it works. + +All other differences between Tcl 8.7 and 9.0 are properly handled with +ifdef's, the three mentioned functions were the only 'tricky' ones. + +# Packaging Tcl distributions + +For example, on Ubuntu, the following Tcl 8.6 distribution packages exists: + + * tcl8.6 + * tcl8.6-dev + +When Tcl 8.7 and 9.0 are available, we will see the following new ones: + + * tcl8.7 + * tcl8.7-dev + * tcl9.0 + * tcl9.0-dev + +The runtime packages (all without "-dev") can be installed together, so +whenever doing: +
+sudo apt-get install tcl8.7 tcl9.0
+
+This will install both Tcl 8.7 and Tcl 9.0, and everything will run +fine independant. + +However, with the "-dev" packages it doesn't work that way. Both +the "tcl8.7-dev" and "tcl9.0-dev" packages contain (among others) +`/usr/include/tcl.h`, so if we install both it's not clear which "tcl.h" +file we have. So, it is impossible to install two different Tcl "-dev" +packages. We have to choose which Tcl version we want to develop for. + +This TIP is written to resolve exactly this problem. Since the "tcl9.0-dev" +package contains a `tcl.h` file which works for both Tcl 8.7 and Tcl9.0 +development, we can develop extensions for both Tcl 8.7 and Tcl 9.0 +with a single "-dev" package. And we can immediately run the +compiled extension in our environment, whether we want to test it with Tcl 8.7 or 9.0. + +# Tcl 9.1 + +Since this TIP adds `#if TCL_MAJOR_VERSION ...` to 'tcl.h', this will be a +maintenance burden if it's kept too long. Therefore, I propose to remove +this stuff in Tcl 9.1. So, if you want to build and extension for both the +8.x and the 9.x line, you need a 9.0 development environment. + +# Addendum + +After [TIP #660](660.md) was accepted, a lot of functions changed from +using size\_t to ptrdiff\_t parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. + +# Compatibility + +The proposed change is 100% source and binary compatible with Tcl 9.0, +but it also makes the 'tcl.h' header file and the stub library compatible +with Tcl 8.7. + +# Copyright + +This document has been placed in the public domain. ADDED tip/629.md Index: tip/629.md ================================================================== --- /dev/null +++ tip/629.md @@ -0,0 +1,211 @@ +# TIP 629: Add a lseq (formally "range") command to the core of list commands + Author: Eric Taylor + Author: Brian Griffin + State: Final + Type: Project + Vote: Done + Created: 28-06-2022 + Tcl-Version: 8.7 + Tcl-Branch: tip-629 + Vote-Summary: Accepted 8/0/0 + Votes-For: SL, MC, KK, AK, JN, FV, KW, BG + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes that a new list command, `lseq` (formally +"`range`"), be added to the core. The command would be similar to the +`lrepeat` command, in that it would conveniently produce a list, given +some arguments. The command would take a range of rational numbers and +produce a list. It would be most useful in a foreach loop, but could +have other uses as well, such as when using the `in` or `ni` operators +in an expression or `if` command. + +# Rationale and Discussion + +Often one wants to iterate on a list of numbers, and the current most +popular choices are using a `foreach` or `for` command. The `for` +command is a throwback to the C `for` statement, and is somewhat ugly +and can be difficult to read. It is also prone to off-by-one errors. + +For ease of programming, especially when performance is not that +important, I propose to add to the core a command, `lseq`, which +would provide a utility that is often found in other languages as a +keyword or built-in function. For example, Python permits a range of +numbers to be entered easily and has syntax to iterate over all the +values in a range. + +# Proposal + +The `lseq` command would take the following forms: + + +>**lseq** *Start* ?(**..** | **to**)? *End* ??**by**? *Step*? + +>**lseq** *Start* **count** *Count* ??**by**? *Step*? + +>**lseq** *Count* ?**by** *Step*? + + +The "`..`" and the words "`to`", "`count`" and "`by`" would be filler +words to make the command more readable. These are optional, similar +to how the word "`else`" is optional in an "`if`" statement. + +If all the numeric values are whole numbers, then the range will +contain only integer values, otherwise values will be floating point +numbers. Numeric values may also be expressed as a valid expr +expression, for example: `{$start+5}`. Normal Tcl quoting rules apply. + +The most obvious use might be in a foreach loop. Instead of this to +write the numbers 1 through 10, + + for {set i 1} {$i <= 10} {incr i} { + puts $i + } + +one could instead write: + + foreach i [lseq 1 .. 10] { + puts $i + } + +This would likely reduce the possibility of a programming error, where +the programmer used < instead of <=. + +It could also be used in an if statement, like so: + + if {$i in [lseq 2 .. 10]} {puts inside} else {puts outside} + +The command would understand when to create a list of numbers that are +decreasing, by the "*start*" and "*end*" values or by +using the optional "`by`" and "*step*" arguments. + +The "`count`" operator would indicate the desire to create N elements, starting +at some value, with an optional increment (either positive or negative, +with a default of 1). + +# Examples + + % lseq 10 .. 1 + -> 10 9 8 7 6 5 4 3 2 1 + + % lseq 1 .. 10 + -> 1 2 3 4 5 6 7 8 9 10 + + % lseq 10 .. 1 by 2 ;# wrong direction results in empty list + -> + + % lseq 10 .. 1 by -2 + -> 10 8 6 4 2 + + % lseq 5.0 to 15. + -> 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 + + % lseq 5.0 to 25. by 5 + -> 5.0 10.0 15.0 20.0 25.0 + + % lseq 25. to 5. by -2.5 + -> 25.0 22.5 20.0 17.5 15.0 12.5 10.0 7.5 5.0 + + % lseq 25. to 5. by -5 + -> 25.0 20.0 15.0 10.0 5.0 + + % set start 1 + % lseq $start to "$start+9" by 2 + -> 1 3 5 7 9 + + % lseq 1 to 10 by -2 ;# wrong direction results in empty list + -> + + % lseq 25. to -25. by -3.25 + -> 25.0 21.75 18.5 15.25 12.0 8.75 5.5 2.25 -1.0 -4.25 -7.5 -10.75 -14.0 -17.25 -20.5 -23.75 + + % lseq 5 + -> 0 1 2 3 4 + + % lseq 3 count 7 + -> 3 4 5 6 7 8 9 + + % lseq 0 count 8 by 2 + -> 0 2 4 6 8 10 12 14 + + % lseq 10 0 -1.125 + -> 10.0 8.875 7.75 6.625 5.5 4.375 3.25 2.125 1.0 + +# Implementation + +Each value in the sequence are computed via this equation where *index* +is an integer value 0 through length-1: + + value = start + (step * index) + +The length of the list is determined by the *Count* value, or by the +equation: + + length = (end - start + step)/step + +In the case where *Step* <= 0, the length will be 0 which means the +result is an empty list. + +The following is a pure Tcl prototype of the command. This is +simplified by not including argument processing, a straight forward +operation, but very lengthy. + +Prototype to demonstrate the algorithm: + + proc lseq {args} { + # magic processing $args here + processArguments $args ;# result in "start", "end", "step", and "count". + + if {![info exists count]} { + set length [expr {($end-$start+$step)/$step}] + } else { + set length $count + } + + # Create list + set value [list] + if {$length > 0} { + for {set index 0} {$i<$length} {incr index} { + lappend value [expr {$start + {$step * $index}}] + } + } + return $value + } + +The complete C implementation is on the fossil branch [tip-629](https://core.tcl-lang.org/tcl/timeline?r=tip-629). + +# Compatibility + +Adding any command to the core would risk the possibility that some +program might have chosen to write a proc using the new name. However, +for new programs, the programmer would likely accept this limitation. + +# Discussion + +I have attempted to take all the discussion comments into +consideration. Concerns over inclusion vs exclusion of the "end" value +in the sequence results have been addressed by having the resulting +list contents based on 2 mathematical equations. Knowing these +equations, the user can select parameters easily enough to get the +needed results. Also, by using the straight line equation, error +accumulation with float numbers is eliminated, or at least minimized. + +Of all the proposed names for the command, I chose "lseq" +because it is an 'l' command as are all the other List commands. I +also thought that "seq", short for "sequence", would be more +appropriate in the event that new options are proposed for the command +to create sequences of numbers that may not be a linear range, +for example: "lseq -fibonacci 0 to 100". + +# Honorable Mention + +The implemented algorithm came from +[TIP-225](225.md), +authored by Salvatore Sanfilippo and Miguel Sofer. + +# Copyright + +This document has been placed in the public domain. ADDED tip/630.md Index: tip/630.md ================================================================== --- /dev/null +++ tip/630.md @@ -0,0 +1,94 @@ +# TIP 630: TclOO commands > 2^31 (for 8.7) + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 05-07-2022 + Tcl-Version: 8.7 + Keywords: Tcl + Tcl-Branch: tcloo-64bit + Vote-Summary Accepted 3/0/1 + Votes-For: JN, KBK, KW + Votes-Against: none + Votes-Present: FV +----- + +# Abstract + +This TIP proposes 3 new functions for TclOO: + + * `Tcl_MethodIsType2` + * `Tcl_NewInstanceMethod2` + * `Tcl_NewMethod2` + +Those functions do the same as `Tcl_MethodIsType`/`Tcl_NewInstanceMethod`/`Tcl_NewMethod`, +but their `typePtr` argument is now of type `const Tcl_MethodType2 *`. +Those new types can handle more than 2^31 command line arguments when used in Tcl 9.0. + +Since the Tcl core cannot handle commands with more than +2^31 elements yet, this - for now - is of limited usability: The core should first be +extended to handle this everywhere, which is a massive amount of work. Therefore, +I am choosing to submit this part separately, so it can be used in Tcl 8.7 as well. +A later [TIP #626](626.md) (for Tcl 9.0), which makes the actual transition +making it really useful, can then decided upon separately. Also, if the API is +decided upon, the actual transition could even be delayed until Tcl 9.1: As +long as the API stays the same, it is considered an upwards compatible +change, no matter how it is handled internally. + +# Specification + +The following new functions are defined: + + * `int Tcl_MethodIsType2(Tcl_Method, const Tcl_MethodType2 *, ClientData *)` + * `Tcl_Method Tcl_NewInstanceMethod2(Tcl_Interp *, Tcl_Class *, Tcl_Obj *, int, const Tcl_MethodType2 *, ClientData)` + * `Tcl_Method Tcl_NewMethod2(Tcl_Interp *, Tcl_Class *, Tcl_Obj *, int, const Tcl_MethodType2 *, ClientData)` + +The definitions of the new types are: +
+    typedef int (Tcl_MethodCallProc2)(void \*clientData, Tcl_Interp \*interp,
+           Tcl_ObjectContext objectContext, Tcl_Size objc, Tcl_Obj \*const \*objv);
+    typedef struct {
+        int version;               /* Structure version field. Always to be equal
+                                    * to TCL_OO_METHOD_VERSION_2 in
+                                    * declarations. \*/
+        const char \*name;          /\* Name of this type of method, mostly for
+                                    * debugging purposes. \*/
+        Tcl_MethodCallProc2 \*callProc;
+                                   /\* How to invoke this method. \*/
+        Tcl_MethodDeleteProc \*deleteProc;
+                                   /* How to delete this method's type-specific
+                                    * data, or NULL if the type-specific data
+                                    * does not need deleting. \*/
+        Tcl_CloneProc \*cloneProc;  /\* How to copy this method's type-specific
+                                    * data, or NULL if the type-specific data can
+                                    * be copied directly. \*/
+    } Tcl_MethodType2;
+
+Note that the `objc` argument (Tcl_MethodCallProc2) changed from `int` to `Tcl_Size`. +and the `callProc` field (Tcl_MethodType2) changed from `Tcl_MethodCallProc *` to `Tcl_MethodCallProc2 *`. + +Two new constants are defined: + + * TCL_OO_METHOD_VERSION_1 (same as TCL_OO_METHOD_VERSION_CURRENT), to be used in `Tcl_MethodType` + * TCL_OO_METHOD_VERSION_2, to be used in `Tcl_MethodType2` + +# Addendum + +After [TIP #665](665.md) was accepted, a lot of functions changed from +using size\_t to Tcl\_Size parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. + +# Implementation + +See branch [`tcloo-64bit`](https://core.tcl-lang.org/tcl/timeline?r=tcloo-64bit) + +There also is a [`tcloo-64bit`](https://core.tcl-lang.org/itcl/timeline?r=tcloo-64bit) branch +for Itcl, which demonstrates this TIP (and [TIP #627](627.md) too). + +# Compatibility + +The proposed change is 100% source and binary compatible with Tcl 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/631.md Index: tip/631.md ================================================================== --- /dev/null +++ tip/631.md @@ -0,0 +1,82 @@ +# TIP 631: ledit - a generalized insert/delete command for list variables + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 6-Aug-2022 + Tcl-Version: 8.7 + Tcl-Branch: tip-631 + Keywords: list + Vote-Summary: Accepted 6/0/0 + Votes-For: BG, KW, KK, MC, SL, FV + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Add a command to efficiently delete and insert multiple elements in +list values stored in variables. + +# Rationale + +Tcl provides commands `lappend`, `lpop` and `lset` to efficiently operate on +unshared list values stored in variables. The efficiency of these commands is a +result of its operating on variables containing unshared values which can then +be modified in place, generally without needing reallocation or copying +as extra trailing free space is present in the list internal representation. + +There is however no equivalent for the `lreplace` command which operates on list +values and subsumes several different insert/delete/replace functions. The TIP +625 implementation also allows for leading free space and subranges in the +internal representation. This opens the door for more efficient operation in +several situations and hence the motivation for this TIP. + +# Specification + +The `ledit` command has the following syntax: + + ledit listVar first last ?element element ...? + +The command fetches the list value in variable `listVar` and replaces the +elements in the range given by indices *first* to *last* (inclusive) with the +*element* arguments. The resulting value is then stored back in the `listVar` +variable. The indices follow the standard Tcl index format supporting simple +index arithmetic and indices relative to the end using the `end` keyword. + +Some special cases are: + +* If either *first* or *last* is negative, it is considered to refer to the +position before the first element of the list. + +* If either *first* or *last* is greater than the length of the list, it +indicates the position just after the last element of the list. + +* If *last* is less than *first*, no elements are deleted and the *element* +arguments are inserted in front of the element at *first*. + +* If no *element* arguments are specified, the command only deletes elements. + +* An error is raised if the value in `listVar` does not exist (as in `lset`) or +cannot be interpreted as a list. + +# Discussion + +The command subsumes "lprepend" (`lappend` analogue for front insertions) or +"linject" (`linsert` analogue for variables) though they would be a little more +intuitive to use. + +## Name conflicts + +As a data point, this name is not found in the entire magicsplat +distribution with source for over a hundred packages and extensions. + +Concerns were voiced on the chat that `ledit` is easily confused with `subst`. +The name `lupdate` was suggested though one might argue that can be confused +with `update`. + +The author has no particular objection to choosing a different name. + +# Copyright + +This document has been placed in the public domain. ADDED tip/632.md Index: tip/632.md ================================================================== --- /dev/null +++ tip/632.md @@ -0,0 +1,94 @@ +# TIP 632: return gif animated metadata + Author: Harald Oehlmann + State: Final + Type: Project + Vote: Done + Created: 12-Aug-2022 + Tcl-Version: 8.7 + Vote: Done + Vote-Summary: Accepted 6/0/0 + Votes-For: MC, BG, SL, JN, FV, KW + Votes-Against: none + Votes-Present: none + Tk-Ticket: f285ddcd23 + Tk-Branch: rfe-f285ddcd-animated-gif-metadata + Keywords: tk image +----- + +# Abstract + +Return the animation parameters of an animated GIF within the image metadata. + +# Rationale + +Tk provides the possibility to get one image of an animated image sequence as follows: + + $image configure -format "gif -index $index" + +Nevertheless, the parameters for animated gif display are not returned. +This TIP proposes to return those parameters to be able to display the animated gif with the help of TCL code. + +Please refer to this stack overflow question and answer: + +# Specification + +If the gif file indexed image is loaded to a tcl image, the following metadata keys are set if the relevant data is present: + + * *delay time*: returns the delay time in unit "10ms". This is only present, if delay time is given and greater 0. + * *disposal method*: one of *do not dispose*, *restore to background color*, *restore to previous*. This key is not present if no disposal method specified. + * *user interaction*: value *1*, if specified as required. This key is not present, if no user interaction required. + * *update region*: 4 numbers in pixel unit: *X0*, *Y0*, *width*, *height*. This is only given, if the update box is not identical to the whole image. + +The key and value names are taken from the GIF89a standard document. + +# Example + +The example solution given in the stack overflow ticket by Schelte Bron may be modified as follows: + +```TCL +proc nextFrame {image {index 0}} { + if {[catch {tmpimg configure -format "gif -index $index"} stderr]} { + set nextIndex 0 + set time 1 + } else { + set nextIndex [expr {$index + 1}] + set metadata [tmpimg cget -metadata] + if { [dict exists $metadata "disposal method"] + && [dict get $metadata "disposal method"] eq "do not dispose" + } { + $image copy tmpimg -compositingrule overlay + } else { + $image copy tmpimg -compositingrule set + } + if {[dict exists $metadata "delay time"]} { + set time [expr {[dict get $metadata "delay time"]*10}] + } else { + set time 1 + } + } + after $time nextFrame $image $nextIndex +} + +set img [image create photo -file [file join $dir animated.gif]] +# Create a helper image +image create photo tmpimg -file [$img cget -file] + +label .w -image $img +pack .w + +nextFrame $img +``` + +Now, the values for *delay time* and *disposal mehtod* (partly) are used instead of heuristic values. + +# Implementation + +The implementation is available in the given Tk branch. + +# Discussion + +Discussion took place at the RFE Tk ticket: . + +# Copyright + +This document has been placed in the public domain. ADDED tip/633.md Index: tip/633.md ================================================================== --- /dev/null +++ tip/633.md @@ -0,0 +1,150 @@ +# TIP 633: configure channel about channel encoding error reporting mode + Author: Harald Oehlmann + State: Final + Type: Project + Vote: Done + Created: 12-Aug-2022 + Tcl-Version: 8.7 + Tcl-Branch: tip633-tcl9-fconfigure-strictencoding + Keywords: channel encoding + Vote-Summary Accepted 4/0/1 + Votes-For: JN, KW, MC, SL + Votes-Against: none + Votes-Present: FV +----- + +# Abstract + +Allow to switch between channels in respect of data encoding issues to throw an error or recover by data manipulation. + +# Rationale + +In channel data read or write, encoding errors may arise. +There are two ways to handle encoding errors: + + * Throw an error on the corresponding commands + * Modify the data to continue without error. + +TCL until version 8.7 modified the data and did not throw any error. +TCL starting from version 9 will throw an error on encoding issues. + +Both points have their use-cases. +The purpose of this TIP is to be able to switch between the possibilies. + +This is in accordance with the changes of the *encoding convertto/from* extension by [TIP 601](https://core.tcl-lang.org/tips/doc/trunk/tip/601.md). +TIP 601 added an option *-nocomplain* to activate data modification mode. + + +## Error types + +There are 3 types of possible errors, exercised in tests io-75.1 to io-75.6: + +### Invalid multi byte sequence read + +The example is to use an UTF-8 byte "0xC0" which announces a multi-byte sequence and requires a following byte > "0x80". +Test 75.1/75.6 uses the invalid sequence "\\xC0\\x40". +It is written in a file and read with utf-8 encoding. + +When modified data mode is active (*-nocomplain*), the data is returned as byte data "\\xC0\\x40" (test 75.1). +When error throwing mode (default mode) is active, an error is thrown (test 75.6). + +Test 75.4 and 75.9 also exercises this case with shiftjis encoding. + +## Unrepresentable character write + +A character unrepresentable by the current encoding is written to a file. +The example in test io-75.2/75.7 is to write "\\u2022" to an iso8859-1 encoded channel, which does not allow any unicode points above 0x255. + +When modified data mode is active (*-nocomplain*), a question mark (*?*) is written. +When error throwing mode (default mode) is active, an error is thrown (test 75.7). + +## Incomplete multi byte sequence read + +The example is to use an UTF-8 byte "0xC0" which announces a multi byte sequence as last character. +Test 75.3/86.8 uses the sequence "\xC0" at file end and reads it with utf-8 encoding. + +Tolerant encoding returns returns this data as byte data "\xC0". +Strict encoding should cause an error. +When modified data mode is active (*-nocomplain*), the data as byte data "\xC0" is returned. +When error throwing mode (default mode) is active, an error is thrown (test 75.8). + +Test 75.5 and 75.10 also exercises this case with shiftjis encoding. + +# Specification + +Extend the channel configuration command *fconfigure* by the following item: *-nocomplaincoding bool*. +Bool is a boolean value which stands for *throw error mode* for value 0 and *modify data mode* for value 1. + +The default value is "1" for TCL 8.7 and "0" for TCL 9.0. + +The option is added to TCL 8.7 and TCL 9.0. +In TCL 8.7, it is an error to set the value to *false*. + +# Example + + fconfigure $handle -encoding utf8 -nocomplainencoding 1 + +# Implementation + +Implementations started for the two branches: + + * TCL 8.7: [tip633-fconfigure-tolerantencoding](https://core.tcl-lang.org/tcl/timeline?r=tip633-fconfigure-tolerantencoding&c=2022-08-18+20%3A20%3A10) + * TCL 9.0: [tip633-tcl9-fconfigure-strictencoding](https://core.tcl-lang.org/tcl/timeline?r=tip633-tcl9-fconfigure-strictencoding&c=2022-09-11+08%3A24%3A21) + +# Discussion + +Discussion took place at the Vienna TCL meeting and at the August TCL conference call. +Four TCL wizards expressed the necessity of this functionality in those meetings. + +The name "-nocomplainencoding" is taken from the *-nocomplain* option of *encoding convertfrom/to*. + +## Alternate script-only solution + +Jan wrote on the core list 2022-09-15 "Re:TIP#346 utf8-strict": + +> Well, there is another way to get the 8.x behavior back in Tcl 9.0. + +> Suppose we have a channel $f from which the byte \\x80 is available. Consider the following code: + +> fconfigure $f -encoding ascii +> read $f + +> this will result in '?' on Tcl 8.x, it will throw an exception in Tcl 9.0 using your proposal: + +> fconfigure $f -nocomplainencoding 0 -encoding ascii +> read $f + +> But there's another way, which already works now: + +> fconfigure $f -encoding binary +> encoding convertfrom -nocomplain ascii [read $f] + +> So, instead of adding "-nocomplainencoding" to the channel, just set the channel in binary mode and use the "-nocomplain" option from "encoding convertfrom". +> There is little added value, building "-nocomplainencoding" into the channel code, when there is an alternative. + +(end of quote). + +This is totally valuable. +But the TIP also has the value of symetry and ease of understanding to the script programmer. +And there are other use-cases like the fcopy command, where there is no easy replacement. +And there might be advantages in stacked channels, pipes or whatever application of the channel system. +IMHO, the TCT may decide, if this TIP should be implemented. + +Ashok added the following remark by the core list on 2022-09-16: + +> This might be fine when reading the entire channel content but is not convenient in streaming mode. + +> A minor nit - something like -looseencoding might be a better name for -nocomplainencoding. + +## TIP 346: Error on Failed String Encodings + +[TIP 346](https://core.tcl-lang.org/tips/doc/trunk/tip/346.md) by Alexandre Ferrieux is (in its current modified form) independent on this TIP. + +TIP 346 defines a strict mode, if some compatibility cases are treated as encoding errors or not. +This TIP tells what happens to encoding errors, a) error reporting or data modification. +I suppose, that TIP 346 strict mode does not make any sense in combination with no error reporting. +The strict mode is more a tool what may evolve in future. + +# Copyright + +This document has been placed in the public domain. ADDED tip/634.md Index: tip/634.md ================================================================== --- /dev/null +++ tip/634.md @@ -0,0 +1,81 @@ +# TIP 634: Remove inconsistency in variable tracing of an array + Author: Schelte Bron + State: Final + Type: Project + Vote: Done + Created: 21-Aug-2022 + Tcl-Version: 9.0 + Tcl-Branch: tip-634 + Keywords: upvar,trace,array + Vote-Results: 4/0/0 accepted + Votes-For: FV, KW, JN, SL + Votes-Against: none + Votes-Present: none +----- +# Abstract + +This tip proposes to eliminate the "feature" that a variable trace set on an +array does not trigger when elements of the array are accessed through a +reference created via the \[upvar\] command. + +# Rationale + +Currently, when a link to an array element has been created using [upvar], +any variable traces set on the array as a whole will not be triggered when +the array element is accessed through the link. While this is documented in +the [upvar] manual page, it is not logical. Variable traces are generally +installed to be notified about access to a variable. If not all normal +methods to access the variable will trigger the trace, the feature cannot +really be relied upon. + +# History + +The reason for the current behavior seems to be that array elements have no +knowledge to which array they belong. Adding this information to each +element would have a significant memory impact. For this reason, the +decision was apparently made in the past to document the discrepancy, rather +than to fix it. This turned a bug into a feature, preventing it to be fixed +in a point load. + +# Specification + +Each array element has a pointer to the array's backing hashtable. Adding a +link that points to the parent array in this table will only require one +additional pointer per array. This can hopefully be considered an acceptable +expense. + +With part 1 of the proposed change, a subsequent problem shows up: When the +accessed variable is a scalar, that is an alias for an array element, only +the name of the alias would currently be provided to the callback function. +In most scenarios with traces on an entire array, the callback function will +need to know the actual array element that was accessed to be able to do +something useful. + +This problem is overcome by decoupling the 'name1' and 'name2' arguments +added to the callback. As before, 'name1' will still point to the variable +being accessed. But 'name2' provides the index into the array, if the +accessed variable ultimately refers to an array element. +The only noticeable difference happens in the mentioned scenario: 'name1' is +a scalar that refers to an array element. In that case 'name2' will no +longer be an empty string. Instead it provides valuable additional +information. + +# Background + +It is not possible to make an alias for an array index. If 'name1' refers to +an array, the index into that array has to be the same as the index into the +original array. It doesn't matter to which array the trace proc applies the +'name2' argument. + +The trace proc should not attempt to determine whether 'name1' is an array +by checking if 'name2' is empty. But that was never a good strategy; the +empty string is a valid array index. The proper way has always been to use +\[array exists\] + +# Reference Implementation + +See branch [`tip-634`](https://core.tcl-lang.org/tcl/timeline?r=tip-634) + +# Copyright + +This document has been placed in the public domain. ADDED tip/635.md Index: tip/635.md ================================================================== --- /dev/null +++ tip/635.md @@ -0,0 +1,81 @@ +# TIP 635: Introspection for 'upvar' and 'namespace upvar' + Author: Schelte Bron + State: Withdrawn + Type: Project + Vote: Pending + Created: 26-Aug-2022 + Tcl-Version: 9.0 + Tcl-Branch: tip-635 + Keywords: upvar,namespace upvar +----- +# Abstract + +This tip proposes to provide script-level access to the way variables are +linked together via 'upvar' and 'namespace upvar'. + +_Note: This TIP depends on functionality introduced by TIP 634, which is why +it cannot target Tcl 8.7._ + +# Rationale + +The 'upvar' and 'namespace upvar' commands allow variables to be accessed +using different names. +In some circumstances it may be useful to be able to inquire about the +mapping of a variable alias to the original name. This is especially +relevant in callback handlers for variable traces on an entire array, after +TIP #634 gets implemented. + +# Specification + +A new info subcommand, 'info upvar' is implemented. It takes one argument: +The name of a scalar variable or array (array elements can't be an alias). +The command returns a list of variable length, depending on the situation: + +* Empty list: The name is not a link to another variable. +* Two-element list: The name is a link to another scalar variable or array. +* Three-element list: The name is a link to an array element. + +The array elements, if present, have the following meaning: + +0. level: The absolute stack level of the target variable +1. target: The target scalar variable or array of the upvar +2. element: The subscript within the array of a target array element + +If the name is not a scalar variable or array, the command throws an error. + +If the target of the link is a namespace variable, the fully qualified name +of that variable is reported. + +The resulting target may itself again be an alias. The command can be +invoked repeatedly until an empty list is returned to get the real variable. + + set rc [info upvar $name] + while {[llength $rc]} { + if {[llength $rc] > 2} { + lassign $rc level target element + } else { + lassign $rc level target + } + set rc [uplevel #$level [list info upvar $target]] + } + +# Considerations + +This TIP was supposed to address an issue that arrose after part 1 of TIP +634 would be implemented. However, after further thought, it seems the issue +can be solved more elegantly by an amendment to TIP 634. If TIP 634 is +accepted with the amendment, this TIP becomes effectively obsolete. + +# Reference Implementation + +See branch [`tip-635`](https://core.tcl-lang.org/tcl/timeline?r=tip-635) + +# Withdrawal + +The amendment to TIP 634 to always report the array index in the 'name2' +argument for any variable that ultimately refers to an array element has +made this TIP largely obsolete. For that reason, I withdraw this TIP. + +# Copyright + +This document has been placed in the public domain. ADDED tip/636.md Index: tip/636.md ================================================================== --- /dev/null +++ tip/636.md @@ -0,0 +1,330 @@ +# TIP 636: Expand List Flexibility with Abstract List Tcl_Obj Type + Author: Brian Griffin + State: Final + Type: Project + Vote: Done + Votes-Summary: 4/0/0 + Votes-For: SL, DF, KW, BG + Votes-Against: none + Votes-Present: none + Created: 1-Sep-2022 + Tcl-Version: 9.0 + Tcl-Branch: tip-636-tcl9-644 + +----- + +* Abstract +* Rationale +* Specification +* Implementation Note On The Tcl_ObjType struct +* Incompatible Changes +* Requirements and Caveats +* Examples + * Other examples of possible Abstract Lists +* Implementation +* Impact +* Alternatives +* Acknowledgment + + + +# Abstract + +Extend Tcl\_ObjType to support native List +operation on non-List value types. Functions provided by a custom +ObjType will be use in place of the internal List operation, avoiding +runtime ObjType conversion. + +# Rationale + +The most frustrating part of implementing custom Tcl\_Obj types is +that they will be converted to a built-in Tcl type when performing +typical Tcl operations on the value. This removes the advantages of +having a custom type since the custom extension will have first +convert the value back to its original form before it can be +used. (This is referred to as "shimmering") The reason for having a +custom type is usually due to either computational advantage, space +advantage, or both. Maintaining this advantage is a worthy +goal. Having access to built-in Tcl list operations makes the custom +type even more worthwhile. + + +# Specification + +The Tcl\_Obj type will be extended by adding functions that implement +List operations on the given value. The functions mimic the List +command behaviors without changing the Obj Type representation. By +providing these functions, some or all of the script level List +operations, such as `lindex`, `llength`, and `foreach`, would be +supported for a custom type without causing the obj value to shimmer +to the List type. + +Here is a simple example of how this works. A simple scalar value, +like a double numeric has an internal representation of +"double". However, if the value is passed to `[llength]` command, the +type will change to a List type: + + % set n [expr {15.3}] + 15.3 + % representation $n + value is a double with a refcount of 2, object pointer at + 0x7fa3b512adc0, internal representation 0x402e99999999999a:0x0, + string representation "15.3" + + % llength $n + 1 + % representation $n + value is a list with a refcount of 2, object pointer at + 0x7fa3b512adc0, internal representation 0x7fa3b5864a50:0x0, string + representation "15.3" + +If the "double" type adds a _lengthProc_ function to the type definition, then the +`[llength]` command will correctly return "1" without having to +shimmer the value to a "list". + +This Tcl\_ObjType is extended with slots for the following function +pointers: + + /* Abstract List functions */ + Tcl_Size (*lengthProc)(obj) + int (*indexProc)(interp, obj, index, elemObjPtr) + int (*sliceProc)(interp, obj, from, to, newObjPtr) + int (*reverseProc)(interp, obj, newObjPtr) + int (*getElementsProc)(interp, obj, start, count, objcPtr, objvPtr) + int (*replaceProc)(interp, obj, first, numToDelete, numToInsert, insertObjs) + Tcl_Obj* (*setElementProc)(interp, listPtr, indicies, valueObj) + + +These functions are optional and when absent, the List operation will +revert to the base List operation behavior. For example, if the +_reverseProc_ is NULL, the `[lreverse]` operation will first shimmer +the value to a List, then perform the operation. + +The _lengthProc_ is necessary if any other List function is also +provided. The _indexProc_ function is also used in some fallback +operations. + +Hopefully the definition of each of these functions is clear by their +respective names. + +# Implementation Note On The Tcl_ObjType struct + +TIP-644 added a version field to the `Tcl_ObjType` structure to allow +for extending the struct with new features. The implementation of +Abstract Lists makes use of this with the intent of making the interface +as simple to use and maintain as possible, both internally and +externally. The version field is defined as Tcl_Size which will be a +monotonically increasing integer, starting at 0, for each future +definition change. + +The Seven function pointers added to the Tcl_ObjType give custom types +control over the set of script and C API level List operations. Macros +are provided for ease of use and backward compatibility. Existing +custom ObjTypes can use the 'TCL_OBJTYPE_V0' macro for existing (pre 9.0) +definitions. Any type that is not intended to be treated as a list, +and wants to prevent converting to a list, e.g. Tcl_WideInt, can use the +'TCL_OBJTYPE_V1(a)' macro and provide an lengthProc that always returns +1. An Abstract List implementation uses the 'TCL_OBJTYPE_V2(...)' macro, and +defines at least 2 of the complete set of functions. + +# Incompatible Changes + +One outcome of Abstract Lists is that an abstraction is no longer +required to retain a copy of a list element `Tcl_Obj`. This is a +significant change in that the current List type always retains a copy +of a list element `Tcl_Obj`, and consequently, most all calls to +retrieve an element fail to manage the reference count of the `Tcl_Obj`, +implicitly relying on the List to manage it. An abstract list, on the +other hand, can generate elements on-the-fly, and may not need to retain +the `Tcl_Obj`. This leaves the responsibility of `Tcl_Obj` memory +management up to the caller. To be fair, this is always the case for +reference counted managed memory. + +Extensions for Tcl and applications that embed Tcl, will need to check +and add appropriate RefCount management to the implementation if +necessary. This has been done for the Tcl core tip branch. + +Here is an example of a code snippet that illustrates the problem (randomly +chosen from the tcl core.) Take note of the treatment of `itemObj` below: + + Tcl_ListObjLength(NULL, zshPtr->outData, &listLen); + if (count < 0) { + count = 0; + for (i=0; ioutData, i, &itemObj); + (void) Tcl_GetByteArrayFromObj(itemObj, &itemLen); + if (i == 0) { + count += itemLen - zshPtr->outPos; + } else { + count += itemLen; + } + } + } + +The above code inspects `itemObj`, but never checks or modifies the +refCount. This is ok for Lists prior to this TIP. For Abstract Lists, +`itemObj` could be newly created and have a refCount of 0. Completely safe +code should traditionally be written as: + + Tcl_ListObjLength(NULL, zshPtr->outData, &listLen); + if (count < 0) { + count = 0; + for (i=0; ioutData, i, &itemObj); + + Tcl_IncrRefCount(itemObj); + + (void) Tcl_GetByteArrayFromObj(itemObj, &itemLen); + if (i == 0) { + count += itemLen - zshPtr->outPos; + } else { + count += itemLen; + } + + Tcl_DecrRefCount(itemObj); + + } + } + +For a traditional List, these 2 additional calls will not effect the +results. For an abstract list, a new Obj will be appropriately free'd. + +The Incr/Decr calls in this example introduce an inefficiency that +justified making an implied assumption about List elements. Since +Abstract Lists changes the basis of this assumption, a different +approach to improve efficiency is needed. In these cases, deferring +reference count updates can be employed. It is for this reason that as +part of the Abstract List implementation, a new refCount function has +been added for this scenario: + + Tcl_BumpObj(objPtr) + +It would be used like this: + + Tcl_ListObjLength(NULL, zshPtr->outData, &listLen); + if (count < 0) { + count = 0; + for (i=0; ioutData, i, &itemObj); + (void) Tcl_GetByteArrayFromObj(itemObj, &itemLen); + if (i == 0) { + count += itemLen - zshPtr->outPos; + } else { + count += itemLen; + } + + Tcl_BumpObj(itemObj); // Deferred refCount update + + } + } + +This function effectively executes: + + Tcl_IncrRefCount(objPtr); + Tcl_DecrRefCount(objPtr); + +But actually implemented as: + + if (objPtr) { + if ((objPtr)->refCount == 0) { + Tcl_DecrRefCount(objPtr); + } + } + +For more information on List associated refCount issues, see related +[TIP-192](192.md). + +And there is this _rabbit hole_: [minimizing reference count updates](https://dl.acm.org/doi/pdf/10.1145/185009.185016) +. + +# Requirements and Caveats + +In all cases, the string representation for an Abstract List value +must always be a valid List as defined by the Tcl language syntax and +the `[list]` command. An Abstract List will always successfully +"*SetListFromAny*" to a List type, memory limits aside. It is not, +however, a requirement that a string representation of a list be +recognized by a particular Abstract List Type; there are some cases +where this is not reasonably possible. For example, the ArithSeries, +used in the `lseq` command, has only `start`, `step`, and `count` +stored in the internal representation and uses math to compute indexed +values. Taking a list of number and computing the start, step, and +count and then validate, although possible, may not be worth the +effort if vary large lists are involved. + +# Examples + +An existing example of this concept is the new **lseq** command +([TIP-629](629.md)), which implements a custom +ArithSeries type that contains 4 values that represent a list. The +length and index values are computed on demand based on 3 of the 4 +numeric values by simple arithmetic. It does not compute and fill a +complete list up front. Shimmering is thus prevented in many +cases. See branch +[tip-636-tcl9](https://core.tcl-lang.org/tcl/timeline?r=tip-636-tcl9) which +(re)implements the ArithSeries using AbstractLists. Branch +[tip-636-tcl9-644](https://core.tcl-lang.org/tcl/timeline?r=tip-636-tcl9-644) +implements the in-core approach. + +## Other examples of possible Abstract Lists + +It turns out that `[foreach]` command already implements special +treatment for the **dict** type in order to avoid shimmering of a +**dict** type value to a **list** type. It would be possible to avoid +many, if not all, **dict** to **list** shimmering by using the +Abstract List approach. + +Other suggested examples: + +- matrix values (there are several existing implementations) + - VecTcl has been ported to an AbstractList. See + [VecTcl9](https://github.com/bgriffinfortytwo/VecTcl9/tree/abstractlist) on GitHub. +- There are a number of simple examples in + [abstractlist-toys](https://github.com/bgriffinfortytwo/abstractlist-toys) + on GitHub: + - lstring: each character is treated as a list element. + - polynomial equations: `[lpoly 5 2 -3] -> y=c0*x^0+c1*x^1+c2*x^2`..., where `c0=5`, +`c1=2`, `c3=-3`, ... + - readlines: reads in a file and splits into lines. + - lgen: see [TIP-192](192.md) Although this example works in most + cases, there is an issue with in-line string use of `[lgen]` that + I have not yet tracked down. +- bit-field arrays +- ByteArray +- Typed List: all elements of the list are the same type, + e.g. `linteger`, all elements are integers, with storage optimized + for integers. The `lstring` example above is also an example of a + Typed List. +- database: `foreach row [lselect $db {FROM * WHERE name LIKE "Griffin"}]` ... + +# Implementation + +See branch +[tip-636-tcl9-644](https://core.tcl-lang.org/tcl/timeline?r=tip-636-tcl9-644) + +# Impact + +On entry to the various list operations, both in the command +implementation and in the bytecode engine, an initial test is made to +see if the Obj is an AbstractList. A test is already made to see if +the Obj is a List before calling SetListFromAny. The impact should be +minimal. Note also that a similar test already exists in some limited +cases for the Dict type. + +It is conceivable that the traditional List implementation be +(re)implemented as an AbstractList as well, then the additional +overhead is simplified. + +# Alternatives + +There is an "internal only" (partial) implementation on branch, and main (currently) +[internal-abstract-list](https://core.tcl-lang.org/tcl/timeline?r=internal-abstract-list) + +There is also a work-in-progress with a variation of abstract lists +(or abstract types?) at [pyk-objinterface](https://core.tcl-lang.org/tcl/timeline?r=pyk-objinterface). + +# Acknowledgment + +*Note: this is work that germinated from [TIP-225](225.md). Salvatore +Sanfilippo and Miguel Sofer should be recognized for their +contribution.* ADDED tip/637.md Index: tip/637.md ================================================================== --- /dev/null +++ tip/637.md @@ -0,0 +1,74 @@ +# TIP 637: Make [glob] always -nocomplain + Author: Don Porter + State: Final + Type: Project + Vote: Done + Created: 17-Sep-2022 + Tcl-Version: 9.0 + Tcl-Branch: novem + Vote-Summary: Accepted 6/0/0 + Votes-For: DP, JN, SL, FV, KK, KW + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes revising the behavior of [glob] to return an +empty list without error when no matches are found. + +# Background + +When [glob] finds zero matching files, it raises an error. + + % glob noSuchFile + no files matched glob pattern "noSuchFile" + +This is unfortunate because when using [glob], finding zero matches +is no more an indication of error than finding one or finding 42. Using +[catch] to deal with this misfeature was an annoying burden, and in the +days before [try] and a strong deployment of **--errorcode** values, it +was burdensome to distinguish the caught circumstance of zero matches +from true error conditions like a file system failure, or a syntax error +in argument substitution. + +The **-nocomplain** option was added to [glob] long ago. It was in place +at least by Tcl 8.0. When present, this option disables the treatment of +any empty result as an error. + + % glob -nocomplain noSuchFile + % + +With this option, the [glob] command could be used more effectively and +robustly. + +In hindsight, [glob -nocomplain] is the better primitive, and should have +been the original behavior of the command. For a new major release, [glob] +can become what it should have been in the first place. + +# Specification + +Revise [glob] so that it does not raise an error when no matches are found. + +Keep accepting **-nocomplain** as an option, but it has no effect. + +# Compatibility + +The only compatibility issue is with any programmer who wants [glob] +to raise an error when no matches are found. It is believed this will +be a very uncommon desire. + +Such a programmer can create a proc to post-process an empty list +returned by [glob] into an error. Tcl namespaces then allow the programmer +to favor his proc over the built-in command, or even to replace the built-in +with it when circumstances make that sensible. + +# Reference Implementation + +This change has long been implemented in the +[novem](https://core.tcl-lang.org/tcl/timeline?t=novem) +branch, and should not be difficult to extract and apply. + +# Copyright + +This document has been placed in the public domain. ADDED tip/638.md Index: tip/638.md ================================================================== --- /dev/null +++ tip/638.md @@ -0,0 +1,117 @@ +# TIP 638: New public routines Tcl_GetNumber(FromObj) + Author: Don Porter + State: Final + Type: Project + Vote: Done + Created: 18-Sep-2022 + Tcl-Version: 8.7 + Tcl-Branch: tip-getnumber + Vote-Summary: Accepted 6/0/0 + Votes-For: DP, JN, SL, FV, KK, KW + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes new public routines **Tcl\_GetNumber** +and **Tcl\_GetNumberFromObj**. + +# Background + +Development of Tcl 8.5 included major reworkings of Tcl's handling +of numeric values, including TIPs [[237]](237.md), [[249]](249.md), +and more. One routine that arose out of that development work was +the internal routine, + + > int **TclGetNumberFromObj**\(Tcl\_Interp\* _interp_, Tcl\_Obj\* _objPtr_\, ClientData\* _clientDataPtr_, int\* _typePtr_) . + +It is a utility routine that can pull any numeric value from a Tcl value, +following Tcl's own specifications for numeric formats. It is useful when +a caller wants to accept multiple varieties of numeric values, so that a more +specific routine like **Tcl\_GetDoubleFromObj** is not sufficient. It is +used effectively in many places within Tcl's own implementation. It has +potential value for extensions and applications as well. + +An examination of the Tk source code and other extensions reveals that +when they break the encapsulation of Tcl's built-in Tcl_ObjTypes, it +is often for the purpose of gaining access to numeric values. A supported +public routine to achieve that aim will pave the way to eliminate +encapsulation breaking. + +# Specification + +Convert the exising internal routine **TclGetNumberFromObj** into its +public counterpart **Tcl\_GetNumberFromObj**. + +Create the additional public routine, + + > int **Tcl\_GetNumber**\(Tcl\_Interp\* _interp_, const char \* _bytes_, ptrdiff\_t _numBytes_, ClientData\* _clientDataPtr_, int\* _typePtr_) + +which has the same functionality, but presents the value to be examined +as a counted string (_bytes_, _numBytes_) instead of as _objPtr_. This +alternative form is parallel to the alternative forms of routines like +**Tcl\_GetDouble** and **Tcl\_GetDoubleFromObj**. + +# Usage + +When internal routine **TclParseNumber** successfully parses a numeric +value, it stores the result in one of three forms of storage. It can +be stored as a double, as a Tcl_WideInt, or as an mp_int. The proposed +routines use integer values to represent these possibilities, +**TCL\_NUMBER\_DOUBLE**, **TCL\_NUMBER\_INT**, and **TCL\_NUMBER\_BIG**, +respectively. The routines use an additional integer value, +**TCL\_NUMBER\_NAN** when the value is NaN stored in a double. This +case is helpful because **Tcl\_GetDoubleFromObj** is defined to raise +an error on a NaN value. + +The proposed routines examine the presented value, whether as +an _objPtr_ or as a counted string, to determine whether it matches +one of the numeric formats recognized by Tcl. This recognition might have +already taken place and been recorded in the internal representation +of _objPtr_, or it might be discovered via a call to **TclParseNumber**. +If the presented value is not a numeric value at all, the proposed +routines return **TCL\_ERROR** and when _interp_ is not **NULL**, a +suitable error message and error code are recorded in it. + +When the presented value is recognized as a numeric value, the proposed +routines return **TCL\_OK** and write to \*_typePtr_ the **TCL\_NUMBER\_\*** +integer value indicating what kind of storage holds the value. They also +write to \*_clientDataPtr_ a pointer to that storage in the memory managed +by and belonging to Tcl. The caller can then use the value +of \*_typePtr_ to determine how to cast the pointer in \*_clientDataPtr_ +properly to be able to read the stored value. + +The pointer value recovered by the caller of **Tcl\_GetNumber** points +to memory belonging to Tcl, which may free it or overwrite it. The caller +should read the value from this pointer before any more calls into Tcl +routines in the same thread. Any long term need for this value will +require a copy. + +# Compatibility + +These are new public routines. They should create no compatibility issues. + +# Extensibility + +If Tcl ever expands the set of numeric formats it recognizes in some way +that requires a new category of storage, these routines may be expanded +to return additional integer values indicating the new storage options. +Callers may wish to handle unrecognized type values as preparation for +that possibility. + +# Addendum + +After [TIP #660](660.md) was accepted, a lot of functions changed from +using size\_t to ptrdiff\_t parameters. In order to prevent confusion, +this change has been adapted in the TIP text above as well. + +# Reference Implementation + +Under development on the +[tip-getnumber](https://core.tcl-lang.org/tcl/timeline?t=tip-getnumber) +branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/639.md Index: tip/639.md ================================================================== --- /dev/null +++ tip/639.md @@ -0,0 +1,127 @@ +# TIP 639: Include the mac_styles features in Tk 8.7 + Author: Marc Culler + State: Final + Type: Project + Vote: Done + Created: 18-Sep-2022 + Keywords: Tk, Aqua + Tcl-Version: 8.7 + Tk-Branch: mac_styles_87 + Vote-Summary Accepted 4/0/0 + Votes-For: FV, JN, KW, MC + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP applies only to the Aqua port of Tk. It proposes adding +several new values for the -style option of the ttk::button widget +and a new image type named nsimage. + +# Background + +Apple's Human Interface Guidelines list many types of buttons for +which there is no Tk equivalent. Developers of Tk applications for +macOS would benefit from being able to use widgets in their Tk +applications that play prominent roles in the HIG. These include +Disclosure Buttons, Disclosure Triangles, Help Buttons, Image Buttons, +Inline Buttons, Gradient Buttons, Rounded Rectangular Buttons, and +Recessed Buttons. + +The model for the approach taken in this tip is the existing +Toolbutton value for the -style option of a ttk::button. This TIP +adds additional values which modify the appearance of a ttk::button. +In order to support the Image Button, which is heavily used in the +macOS preferences app as well as in applications, this Tip also +adds a new Tk image type named nsimage which leverages the +capabilities of Apple's NSImage class. The nsimage type includes +all of the features of the ::tk::mac::iconBitmap object and adds +more features. But the resulting image name is an allowable value of +the -image option of objects such as ttk::button and ttk::label. +The name of a ::tk::mac::iconBitmap object is an allowable value +for the -bitmap option, but need not be a bitmap. It can be a full +color image. In the long run it would make more sense to either +eliminate the -bitmap option or make it refer specifically to black +and white images rather than allowing full color images to be treated +as bitmaps. However, this TIP does not address this issue directly. +It just provides an image type with all of the features of the +::tk::mac::iconBitmap as well as other features needed to create a +Tk replica of Apple's Image Button. + +# Specification + +The proposed new values for the -style option of a ttk::button are: +DisclosureButton, DisclosureTriangle, HelpButton, ImageButton, +InlineButton, GradientButton, BRoundedRectButton, and RecessedButton. + +# Usage + +The nsimage image type accepts the following options: + ++ *-source* (the value is an arbitrary string) ++ *-as* (the value is one of name, file, path, or filetype) ++ *-pressed* (the value is boolean) ++ *-template* (the value is boolean) + +The -as option specifies how the value of the -source option should be +interpreted. The *name* value means that the source should be the name of a +named system image. The *file* option means that the source is a path to an +image file with a format understood by the NSImage class. The *path* value +means that the source is a path to an existing file and that the resulting image +should be the system icon for files of the same filetype as the file with the +given path. Finally, the *filetype* value means that the image should be the +system icon for the filetype specified by the source, either as a filename +extension, or an Apple Uniform Type Identifier, or as a four character OSCode as +used in the now obsolete HFS filesystem to specify file types. + +If -pressed is true the image is algorithmically modified so that it will be +darker then the original in light mode and lighter than the original in dark +mode. This is meant to produce an alternate image to be used when a ttk::button +is in the pressed state. + +If -template is true then the resulting image will be marked as a template +image. Template images have all black pixels with alpha values. The system +automatically changes the black to a light gray color when in dark mode. (Any +NSImage can be marked as a template, but the algorithm does no work correctly +unless the image has only black and alpha channels.) + +Here are some examples: + + image create nsimage bonjour -source NSBonjour -as name -width 48 -height 48 + + image create nsimage bonjour -source NSBonjour -as name -width 48 -height 48 -pressed 1 + + image create nsimage feather -source feather.png -as file -width 48 -height 48 + +To create a ttk::button using one of the new styles, simply provide +the new style as the value of the -style option. For example: + + ttk::button $w.imagebutton -style ImageButton -text Bonjour -image {bonjour pressed bonjour1} + +# Compatibility + +This tip proposes new allowed values for the -style option and a new +image type. It does not change any existing syntax. So it should not +create any compatibility issues. + +# Extensibility + +It might be useful to add even more of the button types listed in the +HIG, or to add new styles for other widgets, such as a circular +progress meter replicating the widget which is now heavily used by +Apple. These extensions would follow the same paradigm. Additional +values for the -style option of, say, a ttk::progressBar, could be +added to produce different variants of the widgets. + +# Reference Implementation + +These features are implemented in the +[mac\_styles\_87](https://core.tcl-lang.org/tk/timeline?t=mac_styles_87) +branch. The branch is now 3 years old, has been synchronized with +Tk 8.7 regularly, and is currently being used in commercial products +based on Tk. + +# Copyright + +This document has been placed in the public domain. ADDED tip/640.md Index: tip/640.md ================================================================== --- /dev/null +++ tip/640.md @@ -0,0 +1,41 @@ +# TIP 640: Remove Tcl_SaveResult + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 21-09-2022 + Tcl-Version: 9.0 + Keywords: Tcl + Tcl-Branch: tip-640 + Vote-Summary Accepted 5/0/0 + Votes-For: FV, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +The `Tcl_SaveResult/Tcl_RestoreResult/Tcl_DiscardResult` functions are able to +save and restore the current interpreter result. This is not adequate in +the error-situation, that's why a new set of functions was developed +[TIP #226](226.md) doing a better job. + +Since `Tcl_SaveResult/Tcl_RestoreResult/Tcl_DiscardResult` are deprecated +already a long time, it's time to remove them in Tcl 9.0. + +# Potential incompatibility. + +All extensions will need to be rewritten to use `Tcl_SaveInterpState/ +Tcl_RestoreInterpState/Tcl_DiscardInterpState` in stead of +`Tcl_SaveResult/Tcl_RestoreResult/Tcl_DiscardResult`. Since those +functions are already available since Tcl 8.5, that shouldn't +be a problem: All extensions should have been rewritten already +a long time ago. + +# Implementation + +See branch [`tip-640`](https://core.tcl-lang.org/tcl/timeline?r=tip-640) + +# Copyright + +This document has been placed in the public domain. ADDED tip/641.md Index: tip/641.md ================================================================== --- /dev/null +++ tip/641.md @@ -0,0 +1,59 @@ +# TIP 641: Let Tcl_GetBoolean(FromObj) handle (C99) bool. + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 02-Oct-2022 + Tcl-Version: 8.7 + Tcl-Branch: tip-641 + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes new behavior for public routines **Tcl\_GetBoolean** +and **Tcl\_GetBooleanFromObj**: It's `boolPtr` argument can now point +at a `bool` as well as an `int`. + +# Specification + +Since C99 (and also recent C++ compilers), there's a new `bool` type, +which can only have the values `true` or `false`. Tcl predates this, +therefore it doesn't have an API to handle this type directly: In +stead of `bool` the only portable way to use it, is use an `int` +temporary variable, and convert it manually to the desired type. +For example, see [here](https://core.tcl-lang.org/tcl/file?ln=1193-1201&ci=00b136d44a3e6499&name=win%2FtclWinSock.c) +(which uses the Microsoft-specific `BOOL`, but the idea is the same). + +Some platforms use `sizeof(bool) == sizeof(char)`, other platforms use +`sizeof(bool) == sizeof(int)`. Therefore, we can implement this with +already existing functions (the `char` variant depends on TIP #618). +We just define 2 macro's `Tcl_GetBoolean/Tcl_GetBooleanFromObj`, which +map to the original functions if `sizeof(*(boolPtr)) == sizeof(int)` +and to `Tcl_GetBool/Tcl_GetBoolFromObj` when `sizeof(*(boolPtr)) == sizeof(char)`. +A panic will result it none of those two match (but that's actually impossible +when using `bool`). + +# History + +This implementation used to be part of TIP #618, but doing that led to a +lot of discussion. Since that TIP did multiple unrelated proposals, +it was decided to split it: TIP #618 introduces the new API which +makes this TIP possible at all. This TIP explains how the new API +can be used to handle the C99/C++ `bool` type, just be defining +two new macro's. + +# Compatibility + +This is 100% upwards compatible. + +# Reference Implementation + +Under development on the [tip-641](https://core.tcl-lang.org/tcl/timeline?t=tip-641) branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/642.md Index: tip/642.md ================================================================== --- /dev/null +++ tip/642.md @@ -0,0 +1,80 @@ +# TIP 642: Let TK_OPTION_BOOL/TK_OPTION_STRING_TABLE handle (C99) bool/enum. + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 05-Oct-2022 + Tcl-Version: 8.7 + Tk-Branch: tip-642 + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes new flags for Tk's configuration options +TK_OPTION_BOOL/TK_OPTION_STRING_TABLE. + +The Tk_OptionSpec.internalOffset field describes the offset +of the variable being handled in the record. This variable +has to be of type `int`. This TIP expands this, such that +the variable pointed to by this internalOffset also can be +of another type, as long as `sizeof(var)` is 1, 2 or 4. +For example (C99) bool (useful for TK_OPTION_BOOLEAN) and +enum (useful for TK_OPTION_STRING_TABLE) can now be +used, even when sizeof(bool) resp. sizeof(enum) != sizeof(int). + +# Specification + +Two new macro's are defined: + +
+    #define TK_OPTION_VAR(type)		...
+    #define TK_OPTION_ENUM_VAR		...
+
+ +Those macro's can be used in the Tk_OptionSpec.flags field, +indicating the size of the variable `internalOffset` points to. +It can be combined with any other flag, using the `|` operator. + +For example: +
+    TK_OPTION_VAR(bool)
+
+This will result in the value 64 if sizeof(bool) == 1, or 0 if sizeof(bool) == sizeof(int). + +
+    TK_OPTION_ENUM_VAR
+
+ +This will result in the value 64 if sizeof(enum) == 1, 128 if sizeof(enum) == 2, or 0 +if sizeof(enum) == sizeof(int). + +Those 2 flag values (64 and 128) are used in the option handling, indicating +that the variable pointed to by `internalOffset` is not an `int`, but a smaller type. +Those flag values don't conflict with any other flag value which can be used here. + +The TK_OPTION_ENUM_VAR macro is already implemented, in `tkInt.h`, as part of bugfix +[eedd795d98](https://core.tcl-lang.org/tk/info/eedd795d98): It turned out that in +various places, enum variables were already used in Tk, which is not portable. +This TIP moves TK_OPTION_ENUM_VAR to the public header-file `tk.h`, so it can +officially be used in extensions as well. + +Gcc has a compilation option `-fshort-enums`, which makes sizeof(enum) == sizeof(short). +Using this option, and without bug-fix [eedd795d98](https://core.tcl-lang.org/tk/info/eedd795d98), +the problem described in the bug-fix ticket can be demonstrated. Some (mostly embedded) +targets use `-fshort-enums` as default. + +# Compatibility + +This is 100% upwards compatible. + +# Reference Implementation + +Under development on the [tip-642](https://core.tcl-lang.org/tk/timeline?t=tip-642) branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/643.md Index: tip/643.md ================================================================== --- /dev/null +++ tip/643.md @@ -0,0 +1,58 @@ +# TIP 643: Provide a public API to retrieve nul terminator length for an encoding + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 09-Oct-2022 + Tcl-Version: 8.7 + Tcl-Branch: tip-643 + Keywords: encoding + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Add a C API to allow extensions to retrieve the length of the nul terminator +for a specific encoding. + +# Rationale + +The `Tcl_UtfToExternal`, `Tcl_UtfToExternalDString` and related API's store +string in destination buffers in a specified encoding. While they append an +appropriate nul terminator to the destination, the returned length information +does not include the terminator. This is a problem when further copying the +encoded data to another buffer as might be required when interfacing to third +party API's. + +This TIP proposes adding a `Tcl_GetEncodingNulLength` C API that will +return the number of nul bytes required for a specific encoding. + +# Specification + +The following function will be added along with an entry in the stubs table. + +``` +int Tcl_GetEncodingNulLength(Tcl_Encoding encoding); +``` + +The `encoding` parameter specifies the encoding for which the nul terminator +length is to be retrieved. If `encoding` is NULL, the current system encoding +is assumed. + +The function returns the length of the nul terminator for the encoding. + +# Discussion + +One could also think of providing a `encoding nullength` command at the +script level as FFI extensions like CFFI and FFIDL would find it useful to +terminate binary strings produced by `encoding convertto` before passing +them to the FFI. However, this can also be achieved by converting `"\0"` +so such a command is not strictly necessary though it would be clearer +and more efficient. At the moment, this is not planned. Opinions invited. + +# Copyright + +This document has been placed in the public domain. ADDED tip/644.md Index: tip/644.md ================================================================== --- /dev/null +++ tip/644.md @@ -0,0 +1,190 @@ +# TIP 644: Make Tcl_ObjType extensible + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 10-Oct-2022 + Tcl-Version: 9.0 + Tcl-Branch: tip-644 + Vote-Summary: Accepted 3/0/0 + Votes-For: BG JN SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Add a version field to the `Tcl_ObjType` field of the `Tcl_ObjType` +structure to permit future expansion. + +# Rationale + +In Tcl 8.x, the `Tcl_ObjType` structure enables extension writers to +implement new `Tcl_Obj` value types by defining appropriate dispatch +functions. However, because the structure is of a fixed size and with no +versioning information, new dispatch functions cannot be added except +when accompanied by a Tcl major version change. + +The `Tcl_ChannelType` structure includes a version field which has +allowed the channel subsystem to be enhanced with additional dispatch +functions without requiring a Tcl major version change. This TIP +proposes adding similar version information to the Tcl_ObjType field. + +An example where versioning would be beneficial is TIP 636, which +implements abstract list functionality for 8.7. Because the `Tcl_ObjType` +structure could not be modified, this has been implemented through +essentially an additional level of indirection with an attendant cost +in performance and complexity. An ability to version `Tcl_ObjType` would +have permitted the list dispatch function to be directly added to +that structure even for 8.7. + +This TIP only proposes the versioning capability be made possible, not +for any specific additional functions to be defined. TIP 636 would +however be a candidate to be adapted. + +# Specification + +The `Tcl_ObjType` structure will be defined as follows: + +``` +typedef struct Tcl_ObjType { + const char *name; + Tcl_FreeInternalRepProc *freeIntRepProc; + Tcl_DupInternalRepProc *dupIntRepProc; + Tcl_UpdateStringProc *updateStringProc; + Tcl_SetFromAnyProc *setFromAnyProc; + size_t version; +} Tcl_ObjType; +#define TCL_OBJTYPE_V0 0 +#define TCL_OBJTYPE_CURRENT TCL_OBJTYPE_V0 +``` + +The first five fields are in common with Tcl 8.6. Keeping the version +information at the end means existing `Tcl_ObjType` definitions that are +**statically** defined (as is usually the case) do not have to modified +as the compiler will auto-initialize the field to 0. Allocated +`Tcl_ObjType` structures that are explicitly initialized at runtime will +have to be modified to initialize the field to `TCL_OBJTYPE_V0`. This +is rare. (In fact, the comments in the code indicate the structure must +be statically allocated though the manpages do not mention this.** + +**Note:** Gcc produces a *missing initializer for field* warning when +the version field is not explicitly initialized. This is due to the use of +`-Wextra` in the compile flags. This is completely bogus in the author's +opinion since implicit initialization for struct fields is well defined +C. The compiler might as well complain about uninitialized static variables. +In any case, the warning can be fixed by either explicitly initializing +or adding the `-Wno-missing-field-initializers` switch. Extensions +that compile against both Tcl 8 and 9 will have to either turn off the +warning or use ifdefs. + +The structure can be extended for new functionality by adding fields at +the end of the structure with a corresponding bump in version. +`TCL_OBJTYPE_CURRENT` should be updated correspndingly. Access to the +new fields must be protected by a check for the appropriate version. **Note +that the new fields need not be restricted to function pointers.** See +example below. + +The `Tcl_RegisterObjType` function will be unchanged and depend +on the caller to have correctly initialized the passed structure +as is the case today. + +# Examples + +TIP 636 is written under the assumption that the Tcl_ObjType is +unchanged from Tcl8. Abstract lists are implemented as an instance of +Tcl_ObjType whose intrep contains an additional function dispatch table +for list related methods. Thus there is an additional indirection and +level of indirection required. + +With TIP 644, abstract lists could instead be implemented by extending +the `Tcl_ObjType` structure as follows + +``` +typedef struct Tcl_ObjType { + const char *name; + Tcl_FreeInternalRepProc *freeIntRepProc; + Tcl_DupInternalRepProc *dupIntRepProc; + Tcl_UpdateStringProc *updateStringProc; + Tcl_SetFromAnyProc *setFromAnyProc; + size_t version; + int (*listLengthProc)(Tcl_Interp *interp, Tcl_Obj *objPtr); + ...other list functions... +} Tcl_ObjType; +#define TCL_OBJTYPE_V0 0 +#define TCL_OBJTYPE_V1 1 +#define TCL_OBJTYPE_CURRENT TCL_OBJTYPE_V1 +``` + +The `Tcl_ListObjLength` function would then look like + +``` +if (objPtr->typePtr && + objPtr->typePtr->version >= TCL_OBJTYPE_V1 && + objPtr->typePtr->listLengthProc != NULL + ) { + return objPtr->typePtr->listLengthProc(...); +} else { + ...essentially existing code shimmering to a list... +} +``` + +The `ArithSeries` implementation would then define its `Tcl_ObjType` +definition as + +``` +const Tcl_ObjType tclArithSeriesType = { + "arithseries", + FreeArithSeriesInternalRep, /* freeIntRepProc */ + DupArithSeriesInternalRep, /* dupIntRepProc */ + UpdateStringOfArithSeries, /* updateStringProc */ + SetArithSeriesFromAny, /* setFromAnyProc */ + TCL_OBJTYPE_V1, /* version */ + ArithSeriesLen /* listLengthProc */ + ...other list methods... +}; +``` + +Further extensions in the future would proceed similarly by bumping +the version, adding new fields with appropriate checks when accessing. + +The new fields added to the structure need not be restricted to function +pointers. Even when used purely for that purpose, it can make sense +to encapsulate the addition functions within another structure. This +can make initialization easier when those fields are not used. For +example, if the structure included both abstract lists and abstract +dictionaries, it might look like + +``` +typedef struct Tcl_AbstractListType { + Tcl_ALLengthProc *lengthProc; + Tcl_ALIndexProc *indexProc; + ...additional functions... +} Tcl_AbstractListType; +typedef struct Tcl_AbstractDictType { + Tcl_ADSizeProc *sizeProc; + Tcl_ADLookupProc *lookupProc; + ...additional functions... +} Tcl_AbstractDictType; +typedef struct Tcl_ObjType { + const char *name; + Tcl_FreeInternalRepProc *freeIntRepProc; + Tcl_DupInternalRepProc *dupIntRepProc; + Tcl_UpdateStringProc *updateStringProc; + Tcl_SetFromAnyProc *setFromAnyProc; + size_t version; + Tcl_AbstractListType abstractListType; + Tcl_AbstractDictType abstractDictType; +} Tcl_ObjType; +#define TCL_OBJTYPE_V0 0 +#define TCL_OBJTYPE_V1 1 +#define TCL_OBJTYPE_CURRENT TCL_OBJTYPE_V1 +``` + +Initialization of an abstract dictionary concrete type is then a little +easier since the fields of `abstractListType` do not need to be +individually initialized. + +# Copyright + +This document has been placed in the public domain. ADDED tip/645.md Index: tip/645.md ================================================================== --- /dev/null +++ tip/645.md @@ -0,0 +1,60 @@ +# TIP 645: ttk color palette support + Author: Patrick May + State: Final + Type: Project + Vote: Done + Created: 11-Oct-2022 + Tcl-Version: 8.7 + Tk-branch: tip-645 + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK, KW, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +When the 'default' ttk theme is in use, allow the ttk widgets to follow the +user's chosen color scheme (set via X resources) and the script writer's choice +of color scheme (set via the command 'tk_setPalette') + +# Background & Rationale + +Tk currently gives users some limited customisation of the color palette by +setting X resources. Script writers can also specify a palette via the command +'tk_setPalette'. + +This user/scripter specified palette is only applied to the original Tk widgets; +the ttk widgets use separate colors defined by the current ttk theme. In the +case of the 'default' ttk theme, it's a bright white and grey palette. + +Users who want to use custom color palettes find this jarring and aesthetically +displeasing. + +It's also a cause of usability issues; currently, attempting to set a 'night +mode' style color scheme (bright foreground, dark background) renders some parts +of Tk unusable where bright text is put on a bright background -- tk::IconList +(a component of the file chooser) uses the user's choice of foreground but the +background color is hardcoded 'white'. + +# Specification + +The 'default' ttk theme is initialised with the user's chosen color options. If +the user hasn't specified any color options, the 'default' theme's original +colors are used. + +tk::IconList is adjusted so that it uses appropriate foreground and background +colors that match the current ttk theme. + +A procedure ttk::theme::default::reconfigureDefaultTheme is added which is +called to initialise the 'default' theme, and is called by tk_setPalette to +update the colors of the ttk widgets as necessary, ensuring that the color +palette is always consistent when the 'default' ttk theme is in use. + +# Implementation + +Implementation is available in the [tip-645] (https://core.tcl-lang.org/tk/timeline?r=tip-645) branch of the Tk repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/646.md Index: tip/646.md ================================================================== --- /dev/null +++ tip/646.md @@ -0,0 +1,92 @@ +# TIP 646: Change -eofchar handling + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 17-Oct-2022 + Tcl-Version: 8.7 + Tcl-branch: tip-646 + Vote-Summary: Accepted 3/0/0 + Votes-For: JN, KBK, KW, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP is inspired by [Bug #5bfe3de008](https://core.tcl-lang.org/tcl/tktview?name=5bfe3de008), +suggesting to remove the `-eofchar` handling for writable channels. So, +assuming $chan is a writable channel, so where a channel was previously +configured with an eof character, + +
+    fconfigure $chan -eofchar \\x1A
+    close $chan
+
+ +, the eof character must now be explicitly written: + +
+    puts -nonewline $chan \\x1A
+    close $chan
+
+ +In other words, the `close` command no longer any byte to the channel +when closing a channel. + +Also, this TIP suggests to change the default `-eofchar` for channels on Windows +in Tcl 9.0 to be the same as on UNIX: `-eofchar {}`. + +The only feature `-eofchar "\\x1A {}"` is currently used for is for starpacks, where +a script file and some archive is glue'd together in a single file, using `\\x1A` as +separation. That functionality will be kept as-is in Tcl 9.0. + +# Background & Rationale + +Tcl channels have the configuration option `-eofchar {$inChar $outChar}`. The current functionality +of `inChar` (for channels which are readable) is that - as soon as this character is encountered +in the input stream - it behaves as EOF. The current functionality of `outChar` is that - as soon +as the channel is closed - the character is written to the output stream. This last behavior is +problematic: We don't know where the cursor is when the file is closed, no check is done and no seek +to the end of the channel is done. For this reason, no extension or application is known using +this feature. Whenever `-eofchar` is set, it is usually either set to `{}` or to `"\\x1A {}"`. + +The default for channels on Windows is `-eofchar "\\x1A {}"`, which is different from the default +on UNIX. This is causing problem with a lot of extensions, which need to set `-eofchar {}` +explicitly for channels, preventing that the character `\\x1A` somewhere in the input +stream causes the channel to be closed. The motivation for this was that old DOS files +sometimes have the `\x1A` character at the end, but this is highly unlikely now: Current +editors on Windows don't do that any more. Therefore, the default for channels on Windows +will be changed to `-eofchar {}` in Tcl 9.0. + +# Specification + +For Tcl 9.0, remove the `outChar` behavior of `-eofchar` completely. Any attempt to +set the `outChar` to something else than the empty string will result in an error-message. + +For Tcl 9.0, change the default `-eofchar` value on Windows to be the same as it is on UNIX. + +For Tcl 8.7, we can do a little bit to reduce the chance of errors. Currently, +setting a single character: +
+    fconfigure $chan -eofchar \\x1A
+
+is equivalent to +
+    fconfigure $chan -eofchar "\\x1A \\x1A"
+
+For Tcl 8.7, this will be changed to be equivalent to: +
+    fconfigure $chan -eofchar "\\x1A {}"
+
+This prevents the - most likely unintended - behavior that a `\\x1A` +character is written to the channel (if it is writable) whenever +it is closed. + +# Implementation + +Implementation is available in the [tip-646] (https://core.tcl-lang.org/tcl/timeline?r=tip-646) branch of the Tcl repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/647.md Index: tip/647.md ================================================================== --- /dev/null +++ tip/647.md @@ -0,0 +1,120 @@ +# TIP 647: Change Tk_ConfigureWidgets signature, abandon TK_CONFIG_OBJS + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 04-11-2022 + Tcl-Version: 9.0 + Tk-branch: tip-647 + Vote-Summary: 4 / 0 / 0 + Votes-For: BG, DKF, JN, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +In december 1999, the TK_CONFIG_OBJS flag was introduced in Tk, +making it possible to use the Tcl_Obj-interface in a lot more +places than before (e.g. the canvas) . Since this was Tk 8.1, +the signature of the Tk_ConfigureWidgets() function could not +be changed, therefore it's 4th and 5th argument were kept as +argc/argv, although they could be objc/objv as well. + +Now that Tk 9.0 is approaching, we can correct the Tk_ConfigureWidgets() +signature as it should have been from the beginning, and +also remove the possibility to use argc/argv any more. + +# Background & Rationale + +The function `Tk_ConfigureWidget` is typically used like this: +
+    if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs,
+	    objc, (const char **)objv, (char *)canvasPtr,
+	    flags|TK_CONFIG_OBJS) != TCL_OK) {
+	return TCL_ERROR;
+    }
+
+The goal of this TIP is to allow to get rid of the type-casts and the `TK_CONFIG_OBJS` flag in Tk 9.0: +
+    if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs,
+	    objc, objv, canvasPtr, flags) != TCL_OK) {
+	return TCL_ERROR;
+    }
+
+ +This can be done by changing the 5th argument in the function signature from +`const char **` to `Tcl_Obj *const *` and the 6th argument to `void *`. + +Of course it would be possible to keep the `TK_CONFIG_OBJS` flag. In my view +it's not really worth maintaining this for a long time more: the one-time +effort converting the extensions is fully worth the trouble. And after +the suggested conversion, everything still works with Tk 8.6 too. + +# Specification + +The signature of the function is modified from: +
+    int Tk_ConfigureWidget(Tcl_Interp *interp,
+	    Tk_Window tkwin, const Tk_ConfigSpec *specs,
+	    Tcl_Size argc, const char **argv, char *widgRec,
+	    int flags)
+
+to +
+    int Tk_ConfigureWidget(Tcl_Interp *interp,
+	    Tk_Window tkwin, const Tk_ConfigSpec *specs,
+	    Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec,
+	    int flags)
+
+ +Also, all usages of the flag `TK_CONFIG_OBJS` in Tk are removed, assuming that the flag is set. + +In addition, the `alwaysRedraw` field in `Tk_ItemType` will be renamed to `flags`. Currently +it can contains two different flags, `TK_ALWAYS_REDRAW` and `TK_MOVABLE_POINTS`. For +compatibility, `TK_ALWAYS_REDRAW` has the value `1`. This field also located the `TK_CONFIG_OBJS` +flag, but that flags becomes obsolete now. The flag `TK_MOVABLE_POINTS` +is not new, the `alwaysRedraw` field was where this flag had to be set (and exactly +this is the motivation for the suggestion to change the field name). + +Since the `Tk_ItemType` is generally statically initialized, the field name change +doesn't need any user code modification: All extensions using it will work unmodified. + +# Compatibility + +For code which needs to work with both Tk 8.6 and 9.0, the following +construct can be used: +
+    if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs,
+	    objc, (void *)objv, (char *)canvasPtr,
+	    flags|TK_CONFIG_OBJS) != TCL_OK) {
+	return TCL_ERROR;
+    }
+
+So just change the typecast for objv to `(void *)`, this way will +compile and run fine with both Tk 8.6 and 9.0. + +Code which still is not using the `TK_CONFIG_OBJS` flag will need to be +modified: No longer use the `argv/argc` functions but switch to +using the `objc/objv` concept. This will become clear when compiling +such extensions with Tk 9 header files: The signature change will +cause a compiler warning if the conversion is not yet done. + +`Tkimg` is already converted this way. It will still compile +fine after this TIP is accepted. The `Tkimg` conversion commit +can be found [here](https://sourceforge.net/p/tkimg/code/704/tree//trunk/pixmap/pixmap.c?diff=5031e6b7bfc09e3239440bdc:703) + +Some extensions (like `vu Widget Set` and `tkzinc`) are +already modified to use the `TK_CONFIG_OBJS` flag, those are +quite easy to be ported to this signature change. Other extensions +(like `blt`, `snack`, `tkhtml`, `tkled`, `tknotebook`, `tkpath` +and `tktable`) will need more work, because the already-mentioned +`argc/argv`->`objc/objv` conversion needs to be done first. + +# Implementation + +Implementation is available in the [tip-647] (https://core.tcl-lang.org/tk/timeline?r=tip-647) branch of the Tk repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/648.md Index: tip/648.md ================================================================== --- /dev/null +++ tip/648.md @@ -0,0 +1,56 @@ +# TIP 648: New functions Tcl_NewWideUIntObj()/Tcl_SetWideUIntObj() + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 04-Nov-2022 + Tcl-Version: 8.7 + Tcl-branch: tip-648 + Vote-Summary: Accepted 6/0/0 + Votes-For: AK, FV, JN, MC, KW, SL + Votes-Against: None + Votes-Present: None +----- + +# Abstract + +In Tcl core code, you will find a few instances of the following construct: +
+    Tcl_WideUInt uint;
+    Tcl_Obj obj = Tcl_NewWideObj((Tcl_WideInt)uint);
+
+This is done, because there is no function which can create a Tcl_Obj +with a value >= 2^63, the purpose of this TIP. As long as the value +is smaller than that, the above construct works as expected. If not, +the Tcl_Obj will be initialized with a negative value. + +One clear example is [here](https://core.tcl-lang.org/tcl/file?udc=1&ln=625-630&ci=8c65a619ff5244ae&name=generic%2FtclLink.c), +even commented with a `FIXME: represent as a bignum`. The lack of a +`Tcl_NewWideUIntObj()` function in Tcl 8.6 means that whenever linking +a Tcl_WideUint C-variable to a Tcl variable, the Tcl variable +will have a negative value if the C-variable is > WIDE_MAX. +In Tcl 8.7 this is corrected already (part of the correction +came in with TIP #312, the remainder came with +[this commit](https://core.tcl-lang.org/tcl/info/8d0a21d00c416fdf) +as an internal `TclNewWideUIntObj` macro. This TIP makes this +functionality available for extensions too. + +# Specification + +New functions `Tcl_NewWideUIntObj()/Tcl_SetWideUIntObj()`, which are +almost the same as `Tcl_NewWideIntObj()/Tcl_SetWideIntObj()`, are +defined and implemented. The change is that the parameter is now unsigned. + +If the value of the argument is <= WIDE_MAX, the result is the +same as `Tcl_NewWideIntObj()/Tcl_SetWideIntObj()`. The internal +representation of the Tcl_Obj will be a Tcl_WideInt. But +if the value is > WIDE_MAX, then a bignum Tcl_Obj will be created, +representing the given (positive) value. + +# Implementation + +Implementation is available in the [tip-648] (https://core.tcl-lang.org/tcl/timeline?r=tip-648) branch of the Tcl repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/649.md Index: tip/649.md ================================================================== --- /dev/null +++ tip/649.md @@ -0,0 +1,143 @@ +# TIP 649: Expose additional list functionality in the C API + Author: Ashok P. Nadkarni + State: Draft + Type: Project + Vote: Pending + Created: 14-Nov-2022 + Tcl-Version: 9.1 + Tcl-Branch: tip-649 + Keywords: list +----- + +* Abstract +* Rationale + * Efficiency of list manipulation + * Efficiency of list access +* Specification +* Discussion +* Implementation +* Copyright + + + +# Abstract + +**Although not directly dependent on it, this TIP is not being implemented +unless TIP 636 is passed.** + +The list implementation has functionality that is available at the script +level but not in the C API. This TIP proposes to expose the same as a C +API as well. The benefits include + +- convenience for extension and application writers that need to manipulate +lists at the C level by voiding the need to implement the same functionality +themselves +- significantly better performance as the currently defined list related C +API is implicitly built around the 8.6 list internal representation and does +not allow callers to benefit from implementation of more efficient higher +level operations. +- prevention of shimmering from the more efficient list representations made +possible by TIP 636 (for example, arithmetic series) to the memory intensive +8.6 implementation. + +# Rationale + +## Efficiency of list manipulation +Many applications and extensions for Tcl as well as Tk use Tcl's C API to +manipulate Tcl list values. For example, reversing or extracting a range of +elements is accomplished through a combination of +`Tcl_ListObjGetElements`/`Tcl_NewListObj` or a loop involving +`Tcl_ListObjIndex`/`Tcl_ListObjAppendElement`. Given the internal +representation of lists in Tcl 8.6, this was also how the Tcl core would +implement these operations and thus there were no significant efficiency +gains that would result from exposing the higher level operations as a C API. + +This has changed with Tcl 9.0 where list internal representation may take +one of several forms (see TIP's 625, 629, 636). For many of these, some list +operations may be done more efficiently than allowed by the restrictive Tcl +8.6 list C API. For example, range and list reversal can now be faster and +more memory efficient by orders of magnitude for large lists. + +The script level list commands benefit from these and it makes sense to +extend the same to C applications and extensions as well. + +## Efficiency of list access + +While the above pertain to list manipulation, the list accessor functions +`Tcl_ListObjGetElements` and `Tcl_ListObjIndex` also have their own issues +arising from an implicit assumption about the list internals. +`Tcl_ListObjGetElements` works well when the list internal representation +stores elements as an array of `Tcl_Obj *` pointer values. +`Tcl_ListObjIndex` assumes that the list implementation holds a reference to +the returned `Tcl_Obj *` element so the caller does not need to do any +explicit reference management with the returned pointer. Neither of these +assumptions necessarily hold true with newer list representations. For +example, the arithmetic series stores the list in compact (start, end, step) +form and generates a `Tcl_Obj` only when required. However, because of +`Tcl_ListObjIndex` semantics, the list implementation has to hold on to a +reference to the returned element `Tcl_Obj` essentially shimmering to the +equivalent `Tcl_Obj *` array at a cost in memory and efficiency. + +For this reason, the TIP proposes an accessor function that is almost +identical to `Tcl_ListObjIndex` but requires the caller to release +the returned `Tcl_Obj` by calling `Tcl_DecrRefCount`. The list +implementation does not then need to artificially hold on to a reference +to the returned `Tcl_Obj** just in order to free it later. + +**As an aside, note that the above drawbacks do not apply to the Tcl core +implementation itself, including implementation of script commands, as +Brian has already taken care to compensate appropriately. This is not +possible for extension writers as they do not have access to internal Tcl +list type information.** + +# Specification + +The following functions will be added along with corresponding entries +in the stubs table. (Names all subject to change) + +``` +int Tcl_ListObjRange( + Tcl_Interp *interp, /* Interpreter for error messages */ + Tcl_Obj *listPtr, /* Unshared list object */ + Tcl_Size first, /* Index of first element of range */ + Tcl_Size last); /* Index of last element of range */ +int Tcl_ListObjReverse( + Tcl_Interp *interp, /* Interpreter for error messages */ + Tcl_Obj *listPtr); /* Unshared list object */ +int Tcl_ListObjRepeat( + Tcl_Interp *interp, /* Interpreter for error messages */ + Tcl_Obj *srcListPtr, /* List object containing elements to repeat */ + Tcl_Size repeatCount, /* Number of times to repeat */ + Tcl_Obj **newListPtr) /* Where to store the new list */ +int Tcl_ListObjSort( + Tcl_Interp *interp, /* Interpreter for error messages */ + Tcl_Obj *listPtr, /* Unshared list object */ + TBD); +int Tcl_ListObjIndexWithRef( + Tcl_Interp *interp, /* Interpreter for error messages */ + Tcl_Obj *listPtr, /* Shared or unshared list object */ + Tcl_Size index, /* Index of element to retrieve */ + Tcl_Obj **elementObjPtr) /* Where to store the element. Caller + needs to free it */ +``` + +All functions return TCL_OK on success and TCL_ERROR on failure. +Functionality should be obvious. + +# Discussion + +The functions could be slightly altered to return a new `Tcl_Obj` and +allow `listPtr` to be a shared object. However, that would be inconsistent +with the current `Tcl_ListObjReplace` definition. + +Applications should be encouraged to use `Tcl_ListObjIndexWithRef` to +avoid shimmering. + +# Implementation + +Pending until TIP 636 passes. + +# Copyright + +This document has been placed in the public domain. + ADDED tip/650.md Index: tip/650.md ================================================================== --- /dev/null +++ tip/650.md @@ -0,0 +1,47 @@ +# TIP 650: New function Tcl_GetWideUIntFromObj() + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 15-Nov-2022 + Tcl-Version: 8.7 + Tcl-branch: tip-650 + Vote-Summary: Accepted 2/0/0 + Votes-For: BG, JN + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +TIP 648 proposes addition of new functions `Tcl_NewWideUIntObj` and +`Tcl_SetWideUIntObj` but missing the complementary function +`Tcl_GetWideUIntFromObj`. While strictly not necessary as +`Tcl_GetNumberFromObj` can be used for the purpose, that would require +the extension writer to be familiar with `mp_int` manipulation. A +`Tcl_GetWideUIntFromObj` would make extracting `Tcl_WideUInt` values +easier. + +# Specification + +The following function will be exported via the stubs table. + +``` +int Tcl_GetWideUIntFromObj( + Tcl_Interp *interp, + Tcl_Obj *objPtr, + Tcl_WideUInt *uwidePtr); +``` + +If `objPtr` holds an non-negative integer value that fits in the domain of +`Tcl_WideUInt`, the function returns `TCL_OK` and stores the value in +`*uwidePtr`. Otherwise (non-integer or negative integer), the function returns +`TCL_ERROR` and stores an error message in `interp` if it is not NULL. + +# Implementation + +Implementation is available in the [tip-650] (https://core.tcl-lang.org/tcl/timeline?r=tip-650) branch of the Tcl repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/651.md Index: tip/651.md ================================================================== --- /dev/null +++ tip/651.md @@ -0,0 +1,45 @@ +# TIP 651: Expose TclDStringToObj via stubs table + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 17-Nov-2022 + Tcl-Version: 8.7 + Tcl-branch: tip-651 + Vote-Summary: Accepted 3/0/0 + Votes-For: BG, JN, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +The `Tcl_DString` abstraction is very useful in incrementally building +strings and binary data. In common usage in extensions, the resulting string +is used to initialize a `Tcl_Obj` and the source `Tcl_DString` freed. This +involves allocating new storage and a byte copy and is not efficient. Within +the core, the function `TclDStringToObj` provides a more efficient means +which moves the allocated storage to the `Tcl_Obj` and resets the +`Tcl_DString`. This TIP proposes making this function available to +extensions as `Tcl_DStringToObj`. + +# Specification + +The following function will be exported via the stubs table. + +``` +Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr); +``` + +The function returns a `Tcl_Obj` initialized with the content of `dsPtr` which +is then reinitialized to an empty string. + +# Implementation + +Implementation is available in the +[tip-651](https://core.tcl-lang.org/tcl/timeline?r=tip-651) branch of the +Tcl repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/652.md Index: tip/652.md ================================================================== --- /dev/null +++ tip/652.md @@ -0,0 +1,105 @@ +# TIP 652: Remove "string is unicode" and Tcl_CharIsUnicode" + Author: Nathan Coulter + State: Final + Type: Project + Vote: Done + Created: 26-Dec-2022 + Tcl-Version: 8.7 + Vote-Summary: 6 / 0 / 0 + Votes-For: BG, DP, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract and Specification + +Remove `string is Unicode` and `Tcl_UniCharIsUnicode()`, introduced in [`TIP +597`](https://core.tcl-lang.org/tips/doc/trunk/tip/597.md). + +# Rationale + +The only use of `[string is unicode]` is to determine whether a string can be +encoded into a Unicode transformation format, either utf-8, utf-16, or utf-32. +Tcl has never needed a `[string is big5]`, `[string is shiftjs]` or any +other `[string is someencodinghere]`. +There is also no need for `[string is unicode]`. To determine whether a +given string can be encoded into a given +encoding, it is sufficient to attempt to perform the encoding using the +"strict" profile. A failure to encode provides the same answer that `[string +is unicode]` would have. + +`[string is unicode]` fails in its stated purpose. According to TIP 597, + +> The string is unicode command can be used to check if the "utf-8"/"utf-16" +> encodings would deliver valid output, ... + +This is not true: + +
+set text \U03fffe
+string is unicode $text;# -> 0
+binary scan [encoding convertto utf-16 $text] H* hex
+set hex ;# -> fdff
+
+ +The problem is that according to TIP 597, in addition to the surrogate +characters, the return value is also `0` for the 66 noncharacters, U+??FFFE - +U+??FFFF and U+FDD0 - U+FDEF. This means that `string is unicode` and +`Tcl_UniCharIsUnicode()` can not be used to check whether the data could be +encoded into one of the Unicode encoding forms. + +The Unicode specification makes it clear that noncharacters may be encoded into +an encoding form. First, there is definition 79: + +> A Unicode encoding form assigns each Unicode scalar value to a unique code unit +sequence. + +The specification then declares: + +> To ensure that the mapping for a Unicode encoding form is one-to-one, all +> Unicode scalar values, including those corresponding to noncharacter code +> points and unassigned code points, must be mapped to unique code unit +> sequences. Note that this requirement does not extend to high-surrogate and +> low-surrogate code points, which are excluded by definition from the set of +> Unicode scalar values. + +The [Private-Use Characters, Noncharacters & Sentinels FAQ](https://www.unicode.org/faq/private_use.html#nonchar6) +states, + +>Q: Are noncharacters invalid in Unicode strings and UTFs? + +>Absolutely not. Noncharacters do not cause a Unicode string to be ill-formed in +>any UTF. This can be seen explicitly in the table above, where every +>noncharacter code point has a well-formed representation in UTF-32, in UTF-16, +>and in UTF-8. An implementation which converts noncharacter code points between +>one UTF representation and another must preserve these values correctly. The +>fact that they are called "noncharacters" and are not intended for open +>interchange does not mean that they are somehow illegal or invalid code points +>which make strings containing them invalid. + +As a response to issue [Tcl 9: "illegal byte +sequence" ?!](https://core.tcl-lang.org/tcl/info/17a1cb8d6e2a51bd) +all checks for noncharacters were removed in [commit +cbaa5e70167db75b](https://core.tcl-lang.org/tcl/info/cbaa5e70167db75b). +Therefore, `[string is unicode]` is already obsolete, having fallen behind the +reality of the implementation. The only thing `string is unicode` now does is +check for surrogate code points. + +`Tcl_UniCharIsUnicode()` is also not useful. If some encoding functionality is +to be exposed at the C level, the equivalent of `encoding convertto` could be +provided. + +# Implementation + +An implementation is provided in the branch, "tip-652". + +# Copyright + +Copyright © 2023, Nathan Coulter. All rights reserved. + +# Support + +The author of this TIP requests financial support for this and other free +software works. Contact and payment information available at: + +> https://wiki.tcl-lang.org/page/Poor+Yorick ADDED tip/653.md Index: tip/653.md ================================================================== --- /dev/null +++ tip/653.md @@ -0,0 +1,157 @@ +# TIP 653: Handle consumed data of channel commands in case of encoding errors + Author: Jan Nijtmans + Author: Harald Oehlmann + State: Final + Type: Project + Vote: Done + Created: 08-Jan-2023 + Tcl-Version: 8.7 + Tcl-branch: tip-653 + Vote-Summary: 3/0/0 + Votes-For: AK, JN, SL + Votes-Against: none + Votes-Present: none +----- + + + +# Abstract + +With the introduction of the `strict` profile for channels it is +possible that `read` throws an exception and consumes correctly +decoded data from the channel. +Currently, that can only happen in blocking channels in `strict` +profile, when an encoding error occurs. +But in the future there might be more situations and more commands +(`gets`) where this can happen. + +In order to prevent data loss, this TIP proposes to return +this _consumed_ data in the return dictionary of the exception. + + +# Specification + +Whenever a channel command throws an exception (EILSEQ) due to an +encoding error, the data successfully decoded up to the point of +the error may be lost, as the error case does not allow to return a +value. +In the case of this potential data loss, the so far decoded data +is made available in the error options dictionary under the key +`-data`. + +The key `-data` is present and has an empty string as value, if the +encoding error happens at the beginning of the data. +The purpose of this rule is to make user scripts easier. + +The key `-data`is not present, if the already decoded data is not consumed, +e.g. the next call to a function will consider it again. + +# Rationale + +The special point with encoding errors is, that they may be introspected +or corrected by choosing an encoding or encoding profile, which handles +the data correctly. + +To enable this, the so far decoded data may be of value. + +Here is an example reading the remaining data using the binary encoding: + +## Create test file + +The test file contains an encoding error in UTF-8 encoding at the 2nd byte. +It consists of the following bytes: + + * A capital "A" + * "\\xC3" :this announces a multi-byte UTF-8 sequence + * A capital "B": the announced multi-byte sequence is not continued resulting in an UTF-8 encoding error at position 1. + + +% set f [open test_A_195_B.txt wb]; puts -nonewline $f A\\xC3B; close $f + + +## Read until encoding error + +Now read the file using utf-8 encoding and get informed about the error by an error dictionary: + + +% set f [open test_A_195_B.txt r] +file35a65a0 +% fconfigure $f -encoding utf-8 -profile strict -blocking 1 +% catch {read $f} e d +1 +% set d +-data A -code 1 -level 0 +-errorstack {INNER {invokeStk1 read file35a65a0}} +-errorcode {POSIX EILSEQ {invalid or incomplete multibyte or wide character}} +-errorinfo {...} -errorline 1 +% tell $f +1 + + +The error code `POSIX EILSEQ` informs about an incoding error. + +The proposed key `-data` is present and contains the file data until the encoding error. +This is a capital "A". + +The call to `tell` informs about the encoding error position. +The file position was advanced just before the encoding error. +The data before it was consumed and will not be returned by a second call to `read`. + +Note, that within a file, we may jump back and read again. +This is not possible for other channels like a socket. +We only know, that, after an encoding error, we are located at the +encoding error position and any so far decoded data is in the `-data` key value. + +## Handle encoding error + +To handle the encoding error, the remaining data is read by changing the encoding to +binary. The next `read` command reads the bytes with the encoding error in UTF-8 encoding. + + +% fconfigure $f -encoding binary -profile strict +% read $f +ÃB + + +The application may now decide any action by introspection of the data. + + +## Example for Gets + +Gets does not advance the current file position on encoding errors. +In consequence, the already decoded data should not be returned and the key +`-data` should not exist. + +Here is an example with the same file and the same error recovery: + + +% set f [open test_A_195_B.txt r] +file35a65a0 +% fconfigure $f -encoding utf-8 -profile strict -blocking 1 +% catch {gets $f} e d +1 +% set d +-code 1 -level 0 +-errorstack {INNER {invokeStk1 gets file384b6a8}} +-errorcode {POSIX EILSEQ {invalid or incomplete multibyte or wide character}} +-errorinfo {...} -errorline 1 +% tell $f +0 +% fconfigure $f -encoding binary -profile strict +% gets $f +AÃB + + +Note the differences to `read`: + + * The current file position is not advanced just before the encoding error. + * The recovery `gets` returns the well encoded data "A" and the error data. + +# Implementation + +The tip-653 branch contains a complete implementation under which the +entire test suite passes. + +# Copyright + +This document has been placed in the public domain. ADDED tip/654.md Index: tip/654.md ================================================================== --- /dev/null +++ tip/654.md @@ -0,0 +1,141 @@ +# TIP 654: Profiles for character encoding/decoding behaviour + Author: Nathan Coulter + State: Draft + Type: Project + Vote: Pending + Created: 10-Jan-2023 + Tcl-Version: 8.7 + Obsoleted-By: 656 +----- + +# Abstract + +Previous attempts to articulate the options for handling non-conforming data +for a character set encoding have resulted in a set of available options that +are not well defined. This TIP articulates the fundamental optional behaviours +and proposes a new set of names for them. + +# Definitions + +**Non-conforming representation** + +> One or more bytes that do not conform to the specification for the +> representation of code points in the encoding. + +**Non-conforming code point** + +> One or more bytes that conform to the specification for the representation of +> code points in the encoding, but whose represented code points do not conform +> to the rules for the encoding. + +**Non-conforming data** + +> Both non-conforming repesentations and non-conforming code points. + +# Specification + +`-nocomplain` is no longer an option. + +The "encoding" value of **encoding converfrom**, **encoding +convertto**, and **chan configure -encoding**, is a dictionary (or at +least conceptually one). The first key in the dictionary is optional, +and if ommitted, it is "**name**". The "**name**" key provides the +name of the encoding. Examples: + +``` + chan configure $chan -encoding utf-8 + chan configure $chan -encoding {name utf-8} + chan configure $chan -encoding {utf-8 profile strict} + chan configure $chan -encoding {name utf-8 profile strict} +``` + +`chan configure $chan -encoding` returns the name of the encoding for the +channel, as it always has. + +`chan configure $chan -encoding*` returns a dictionary describing the +configuration of the encoder for the channel. + + +The "**profile**" key provides the encoding profile. Each profile is +independent of the other, and activating one profile cancels any +previous active profile. The profiles are identified below by the +options that activate them. For each option there is a corresponding +channel configuration option prefixed with the word "encoding". + +The profiles are: + +**discard** + +> Not strict. Discards non-conforming data by omitting them from the output. + +**surrogate** + +> Not strict. Each byte of non-conforming data is transformed into a single +> low surrogate code point that can be transformed back to the original byte, +> as described in [Unicode Security +> Considerations](https://www.unicode.org/reports/tr36/#SecureEncodingConversion) +> This accomplishes the same purpose as `tag`, but requires only one character +> per byte instead of two. + +**pass** + +> Not strict. Each non-conforming byte becomes the character having the +> Unicode code-point represented by that single byte. + +**replace** + +> Not strict. When converting an encoded byte sequence to a Tcl string, invalid +> byte sequences are replaced by the U+FFFD REPLACEMENT CHARACTER code point. + +> When encoding a Tcl string, characters that cannot be represented in the +> target encoding are transformed to an encoding-specific fallback character, +> U+FFFD REPLACEMENT CHARACTER for UTF targets and generally `?` for other +> encodings. + +**report** + +> Not strict. Like `pass`, but `result errors` in the return options is a +> dictionary where each key is the starting index in the result of +> noncomforming substring and each value is the corresponding ending index. + +**strict** + +> Strictly conform to the specification for the encoding. It is an error for +> non-conforming data to occur. + +**tag** + +> Not strict. Like `pass`, but tags each non-conforming byte by prefixing it +> with a replacement character, which is normally the standard replacement +> character for the encoding. Each occurrence of the replacement character +> itself is also prefixed with the replacement character. + +**tcl8** + +> The same as `pass`, but may in the future diverge if it is discovered that +> Tcl 8 behaviour does not mirror that described for `pass`. + +# Rationale + +`-strict` was introduced in [TIP +346](https://core.tcl-lang.org/tips/doc/trunk/tip/346.md), which +focused narrowly on issues surrounding byte arrays and non-mappable +characters. It should instead have focused on conformance to the +chosen encoding, which is more fundamental. `-nocomplain`, was +subsequenctly introduced in [TIP +601](https://core.tcl-lang.org/tips/doc/trunk/tip/601.md), but did not +describe its relationship to `-strict`, turned out to be nothing more +than the inverse of `-strict`, and has already been eliminated in the +implementation of Tcl's internal encoding/decoding functions. + +Under this proposal, the syntax for specifying an encoding and its options +is the same for both `encoding convertto/from` and `chan configure -encoding`, +which simplifies the interface. + +# Implementation + +Implementation is in progress. + +# Copyright + +This document has been placed in the public domain. ADDED tip/655.md Index: tip/655.md ================================================================== --- /dev/null +++ tip/655.md @@ -0,0 +1,144 @@ +# TIP 655: Support the styleMask property for NSWindow and NSPanel in Aqua + Author: Marc Culler + State: Final + Type: Project + Vote: Done + Created: 28-Jan-2023 + Keywords: Tk, Aqua + Tcl-Version: 8.7 + Tk-Branch: 655 + Vote-Summary: Accepted 5/0/0 + Votes-For: FV, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP applies only to the Aqua port of Tk. It proposes adding several new +platform-specific options to the wm attributes command for the Aqua window +manager. + +# Rationale + +The Aqua window manager used by macOS provides a number of different styles for +the frame and titlebar of a window. For example, the system color and font +selection dialogs use the NSPanel subclass of NSWindow which has a narrower +title bar and exhibits different behaviors - an NSPanel floats above all other +windows, including windows belonging to other applications, and clicking on the +panel when the app is inactive does not activate it. As another example, modal +dialogs windows associated with a normal document window often have no title bar +and feature rounded corners. + +Many of these styles existed in the Carbon API and Tk has provided access to +some of these Carbon features for a long time via the +*::tk::unsupported::MacWindowStyle* command. Many of the Carbon API calls +continue to work, to some extent, within the current Cocoa API that replaced +Carbon for OSX. This part of the Carbon API was extremely ornate and complex, +so full access from Tk was not practical. In Cocoa the API was simplified +considerably. Objects in the NSWindow class (as well as its NSPanel subclass) +have an integer-valued styleMask property whose bits control the various style +choices for window frames and title bars. The core goal of this TIP is to +provide direct control over the styleMask bits with a command in the main tk +namespace rather than in *::tk::unsupported*. This is handled by giving a Tk +name to each bit and by adding a new *-stylemask* option to the *wm attributes* +command which can be used to set the values of the bits. Changing a bit causes +an instant change to the window decorations. + +On the other hand, the choice of whether the underlying Aqua window for a Tk +Window should be in the NSWindow class or the NSPanel class must be made before +the NSWindow or NSPanel is instantiated and cannot be changed. The way that +this is handled by *::tk::unsupported::MacWindowStyle* is unfortunate. The +implementation essentially creates an intentional race condition. The toplevel +must be created first. Then the user must call +*::tk::unsupported::MacWindowStyle style* to specify the style. And that must +be done in the brief moment after the toplevel command has created a *TkWindow* +with the specified pathname and before that *TkWindow* has actually been mapped. +The user is left to handle this squeeze play on her own. In the interpreter it +is necessary to put both commands on the same line separated by a semicolon. + +This tip does away with the race condition. The choice of which window to use +is made with the new *wm attributes* -class option, which can take two possible +values: *nswindow* and *nspanel*. The implementation of the option allows the +-type option to be specified for a pathname that does not identify a window. In +that case the value of the option is cached in a Tcl hash table and looked up +when the Aqua window is created in the course of mapping a Tk window with that +pathname. It is an error to change the type of a window for which the +underlying Aqua window already exists. + +A different, logically independent, aspect of this tip is to expose the NSWindow +attributes tabbingIdentifier and tabbingMode as wm attributes. This allows +using tabbed windows in a Tk application. A partial implementation of this, +which did not provide enough control to make it practical to use tabs in Tk +applications, has been removed from the *::tk::unsupported::MacWindowStyle* +command. + +# Specification + +Six new options are added to the wm attributes command for macOS. +These are: + +`wm attributes` *window* `-appearance` ?*auto*\|*aqua*\|darkaqua*? + +`wm attributes` *window* `-class` ?*nswindow*\|*nspanel*? + +`wm attributes` *window* `-isdark` + +`wm attributes` *window* `-stylemask` ?*bitnamelist*? + +`wm attributes` *window* `-tabbingid` ?*string*? + +`wm attributes` *window* `-tabbingmode` ?*auto*\|*preferred*\|*disallowed*? + +When using the options -class, -tabbingid, or -tabbingmode it is allowed for the +pathname to not be associated to an existing window. In that case the option +value is cached, and is used when a window with that pathname is created later. +It is an error to modify the class after the underlying macOS window for a +toplevel has been instantiated. + +The allowed bit names for the bitnamelist are: **titled**, +**closable**, **miniaturizable**, **resizable**, +**fullsizecontentview**, **docmodal**, **utility**, +**nonactivatingpanel**, and **HUDwindow**. Each named bit is set to 1 +in the stylemask, and all other bits are set to 0. + +When the fullsizecontentview bit is set to 1 it also causes the macOS window to +be modified so its title bar is transparent. (Otherwise, drawing in the +titlebar area would not be visible.) + +The -tabbingid and -tabbingmode options are used to control how toplevel windows +are displayed as tabs in a tab group. They set the value of the NSWindow +propertied named tabbingIdentifier and tabbingMode. Tabs in the same group must +have the same tabbingid, and a toplevel can only be displayed as a tab if either +its tabbingmode is *preferred* or if its tabbingMode is *auto* and the user has +specified in the System Settings that tabs are preferred when opening documents. + +# Usage + +For example, to create a resizeable NSPanel with red and yellow +buttons in its (narrow) titlebar: + +`wm attributes .t -class nspanel` + +`toplevel .t` + +`wm attributes .t -stylemask {titled closable miniaturizable resizable}` + +# Compatibility + +This TIP proposes new options for the wm attributes command on Aqua. The effect +of some of these can also be acheived by using options available in the +tk::unsupported::MacWindowStyle command. The tip does not propose changing that +command since it is used, for example, in the Python tkinter module as well as +in some standard Tk packages. +. + +# Reference Implementation + +These features are implemented in the +[655](https://core.tcl-lang.org/tk/timeline?t=655) +branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/656.md Index: tip/656.md ================================================================== --- /dev/null +++ tip/656.md @@ -0,0 +1,476 @@ +# TIP 656: A revised proposal for encodings + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 2023-02-13 + Tcl-Version: 8.7 + Tcl-branch: tip-656 + Vote-Summary: Accepted 6/0/0 + Votes-For: AK, JD, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none +----- + +* Abstract +* Rationale +* Specification + * Profiles + * The `tcl8` profile + * The `strict` profile + * The `replace` profile + * The default profile + * The `encoding profiles` command + * Changes to `encoding convertfrom` and `encoding convertto` + * New option `-profile` for `fconfigure` and `chan configure` + * Changes to the C API's + * Differences from the current 8.7 API +* Implementation + * Alternative proposals + * Finer granularity of error class selection + * Include the profile within the encoding parameter + * Alternative fconfigure option name +* Copyright + + + +# Abstract + +This TIP proposes enhancements to the character encoding commands and public C +API's present in Tcl 8.6 based on based on the *profile* concept of TIP 654. It +differs in terms of syntax, C API and semantics related to other options. It +supplants previously accepted TIP's 346, 601 and 633 that targeted the same +functionality. + +The TIP also defines fconfigure options to associate profiles with channels to +control their encoding behavior. + +# Rationale + +Operations involving encoding transforms may encounter multiple types of +errors such as invalid sequences in the source, characters that +cannot be encoded in the target encoding etc. Tcl 8.6 dealt with these +errors by "wishing them away", either by substituting a `?` character +or (effectively) assuming the offending byte was in CP1252 encoding. + +TIP's [346](https://core.tcl-lang.org/tips/doc/trunk/tip/346.md), +[601](https://core.tcl-lang.org/tips/doc/trunk/tip/601.md) and +[607](https://core.tcl-lang.org/tips/doc/trunk/tip/607.md) proposed options +to the `encoding` command that allowed applications to detect and handle +encoding transform errors. Further, +[633](https://core.tcl-lang.org/tips/doc/trunk/tip/633.md) added +corresponding options to `fconfigure` for the same purpose. + +There are however inadequacies in these options as described in +a separate [write-up](https://www.magicsplat.com/tcl9/tcl9unicode.html) and +[mailing list](https://sourceforge.net/p/tcl/mailman/message/37772114/) +and summarized below. + +- The options `-strict` and `-nocomplain` are added to increase or +decrease the "level of strictness" relative to the default. These do not +cover the conformant behaviors specified by the Unicode standard. + +- At the C API level, these translate to the flags `TCL_ENCODING_STRICT` and +`TCL_ENCODING_NOCOMPLAIN` with an additional flag `TCL_ENCODING_STOPONERROR` +that was already present in 8.6 The use of multiple options (plus the default) +is confusing in terms of their interaction and combined behavior. This is +exacerbated by the difference in their treatment between Tcl 8 and Tcl 9. + +- +There is no provision for the standard conformant behavior that uses the +`U+FFFD` replacement character. **This means it is actually not possible to +write a [W3C conformant](https://encoding.spec.whatwg.org/#utf-8) browser (or +other Web content processor) without implementing your own encoders.** + +- Adding further error handling behaviors in the future would require +additional mutually exclusive switches and flags which further complicate +the interface. + +This proposal based on TIP 654's profile model, is intended to address +the above shortcomings. + +# Specification + +## Profiles + +The following types of errors may be encountered when converting +an encoded byte sequence into Tcl's internal form: + +- Case 1. The byte value may be one that should never appear in the specified +encoding or at a particular position in a multibyte encoding. For example, +the values `\xC0` and `\xC1` should never appear at any point in a UTF-8 +encoded byte sequence. As an example of the latter, the byte `\xE0` (amongst +others) should never appear as the lead byte in ShiftJIS. + +- Case 2. The rules for the encoding do not permit the value to have been +encoded in the first place. For example, surrogate Unicode code points +should never be encoded and thus should be treated as an error when +encountered during a decoding operation. (Note the surrogate could appear in +the UTF-16 encoded byte sequence. But the **decoded** value should never be +a surrogate code point.) + +- Case 3. A byte subsequence within a byte sequence that is encoded with a +multibyte encoding terminates prematurely. This may or may not be an error +depending whether the subsequence is in the middle of the containing byte +sequence or at the end. In the latter case, it may just mean more bytes are +needed as may happen when data is read over a streaming interface. For +example, the UTF-8 sequence `\xC2\x41` is a hard error as there is no +trailing byte succeeding the lead byte `\xC2` (`\x41` cannot be a trailing +byte). On the other hand, the sequence `\x41\xC2` may not be an error +because additional data may arrive containing a valid trailing byte to +complete the `\xC2`. + +- Case 4. The decoded values may lie outside the range of Unicode code points. +For example the UTF-32 encoded sequence `\x7F\xFF\xFF\x7F` trivially +transates to the integer value U+7FFFFF7F which is greater than the largest +valid code point U+10FFFF. This is distinguished from Case 2 because it is +treated differently by Tcl in the **current** implementation. + +Similarly, the following types of errors may be encountered when converting +in the other direction: + +- Case 1. The encoding does not support the Unicode code point. For examples, +code points higher than U+007F are not supported in the ASCII encoding. + +- Case 2. The encoding may be able to encode a Unicode code point but the +rules for the encoding do not allow it. For example, the Unicode standard +for UTF-8 encoding prohibits encoding of surrogate code points. So although +the surrogate U+DC00 can be encoded as the byte sequence `\xED\xB0\x80`, it +is prohibited by the standard. + +- Case 3: The value of the code point lies outside the valid code point range. + +A *profile* defines the handling of each of the above error cases by either + +1. Terminating further processing of the source data. The profile does **not** +determine how this premature termination is conveyed to the caller. By default, +this is signalled by raising an exception. The `-failindex` option as +described in TIP 607 may be used instead. + +2. Using a fallback strategy for the offending bytes and continuing processing +the rest of the data. This may be use of a replacement character (either fixed +or dependent on the invalid byte), discarding the invalid bytes etc. as +defined by the profile. + +Note that none of the currently defined profiles distinguish between errors +cases but there is no reason preventing a profile defined in the future to +do so. For example, a `allowsurrogates` profile may pass through +surrogate code points (illegal in UTF-8) but stop processing on other error +cases. + +This TIP defines three profiles, `tcl8`, `strict` and `replace`. + +### The `tcl8` profile + +The `tcl8` profile corresponds to the implementation of encoders in Tcl 8.6. + +When converting to Tcl's string form, with the exception of the special case +noted below, each byte of an illegal byte sequence is mapped to its numerically +equivalent code point. In effect, it treats the byte as being in ISO8859-1 +encoding even though the transform may have specified a different encoding. + +As an special case, for the UTF-8 encoding the illegal sequence `\xC0\x80` +is mapped to U+000000. + +When converting a Tcl string to an encoded byte sequence, values that cannot +be encoded in the target encoding are mapped to an encoding-specific +fallback character, usually `?`. For UTF encodings, this case cannot arise +as they can represent all code points. Additionally, for the error case +where the code point being encoded is prohibited from appearing in +encoded form (surrogates for example), the `tcl8` profile ignores the +mandate and encodes the code point anyways. + +The `tcl8` profile is not conformant with the Unicode standard. Moreover, +it leaves room for silent misinterpretation of data. + +With respect to the current implementation, the `tcl8` profile +replaces the `-nocomplain` option of TIP 601. + +### The `strict` profile + +The `strict` profile implements strictly conformant behavior as defined +in the Unicode standard. All error cases result in the error being signalled. + +With respect to the current implementation, the `strict` profile +replaces the `-strict` option of TIP 346. + + +### The `replace` profile + +The `replace` profile implements an alternate conformant behaviour defined +in the Unicode standard. + +When converting an encoded byte sequence to a Tcl string, invalid byte +sequences are replaced by the U+FFFD REPLACEMENT CHARACTER code point. + +When encoding a Tcl string, characters that cannot be represented in the +target encoding are transformed to an encoding-specific fallback character, +U+FFFD REPLACEMENT CHARACTER for UTF targets and generally `?` for other +encodings. + +When multiple successive invalid bytes are encountered, the Unicode standard +allows for their substitution with a single or multiple replacement characters. +The `replace` profile conforms to this. + +There is no equivalent to the `replace` profile in the current TIP 346/601 +based 8.7 implementation. + +### The default profile + +This TIP does not specify the default profile to be used. That is the subject +of a separate TIP. + +## The `encoding profiles` command + +A new command is added that will return the names of implemented profiles. + +``` +encoding profiles +``` + +## Changes to `encoding convertfrom` and `encoding convertto` + +The commands `encoding convertfrom` and `encoding convertto` support +a new option `profile` that takes a profile name as value. The `-strict` +and `-nocomplain` options are no longer supported. The commands take +the form + +``` +encoding convertfrom DATA +encoding convertfrom ?-profile PROFILE? ?-failindex VAR? ENCODING DATA + +encoding convertto DATA +encoding convertto ?-profile PROFILE? ?-failindex VAR? ENCODING DATA +``` + +The syntax is backward compatible with 8.6. However, it differs from the +current 8.7/9.0 implementation in that there is no ambiguity. +In the current implementation, when two arguments are supplied, +it tries to guess whether the first is an option or an encoding name. +With the above syntax, if any options are specified, the encoding +must be explicitly specified as well. Note it is possible to relax this +based on odd/evenness of the argument count but that would make it +trickier to add options in the future that do not take an argument. + +The `-profile` option specifies the profile to be used to be used +for the conversion as described earlier. If multiple `-profile` options are +passed, the last one will be used. + +The `-failindex` option behaves as defined in TIP 607. However, **although +not specified in that TIP**, in the current 8.7/9.0 implementation the +`-failindex` option also enables the `-strict` option. **This TIP specifically +proposes that the option not make any implicit selection of profiles.** +In addition to the author's opinion that options should be as orthogonal to +each other as possible, the current implied behavior makes it awkward +to write (for example) a proc that takes a profile and returns as much +data as can be read without raising an error. The `-failindex` option now +only determines whether an exception is raised or decoded data is returned +with error location in the passed variable when processing of the input data +is stopped as determined by the profile. + +## New option `-profile` for `fconfigure` and `chan configure` + +A new option `-profile` has been added to the `fconfigure` command. +The option's value must be a profile name. The encoding transforms in use +for the channel's input and output will then be subject to the rules of that +profile. Any failures will result in a channel error. The mode of reporting +channel error is a function of the channel subsystem and not defined by this +TIP. + +The `-strictencoding` and `-nocomplainencoding` options that were +defined by the earlier TIP's and currently implemented in 8.7 and 9.0 +alphas are supplanted by `-profile` and removed. + +## Changes to the C API's + +Two new functions, `Tcl_ExternalToUtfDStringEx` and `Tcl_UtfToExternalDString`, +related to encoding transforms were added by TIP 601 for 8.7. These had the signatures + +``` +Tcl_Size Tcl_ExternalToUtfDStringEx(Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_DString *dsPtr); +Tcl_Size Tcl_UtfToExternalDStringEx(Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_DString *dsPtr); +``` + + +This TIP changes the signatures of these functions to the following: + +``` +int +Tcl_ExternalToUtfDStringEx( + Tcl_Interp *interp, /* For error messages. May be NULL. */ + Tcl_Encoding encoding, /* The encoding for the source string, or NULL + * for the default system encoding. */ + const char *src, /* Source string in specified encoding. */ + Tcl_Size srcLen, /* Source string length in bytes, or < 0 for + * encoding-specific string length. */ + int flags, /* Conversion control flags. */ + Tcl_DString *dstPtr, /* Uninitialized or free DString in which the + * converted string is stored. Must be freed + * after return irrespective of return value */ + Tcl_Size *errorLocPtr); /* Where to store the error location + (or TCL_INDEX_NONE if no error). May be NULL. */ +int +Tcl_UtfToExternalDStringEx( + Tcl_Interp *interp, /* For error messages. May be NULL. */ + Tcl_Encoding encoding, /* The encoding for the converted string, or + * NULL for the default system encoding. */ + const char *src, /* Source string in UTF-8. */ + Tcl_Size srcLen, /* Source string length in bytes, or < 0 for + * strlen(). */ + int flags, /* Conversion control flags. */ + Tcl_DString *dstPtr, /* Uninitialized or free DString in which the + * converted string is stored Must be freed + * after return irrespective of return value */ + Tcl_Size *errorLocPtr); /* Where to store the error location + (or TCL_INDEX_NONE if no error). May be NULL. */ + +``` + +The `Tcl_ExternalToUtfDStringEx` function converts a source buffer from the +specified encoding into UTF-8. The `Tcl_UtfToExternalDStringEx` function does +the converse, converting a source buffer from UTF-8 to the specified encoding. + +The flags parameter may be composed from OR-ing the following values: + +- At most one of `TCL_ENCODING_PROFILE_DEFAULT`, `TCL_ENCODING_PROFILE_TCL8`, +`TCL_ENCODING_PROFILE_STRICT` and `TCL_ENCODING_PROFILE_REPLACE`. +If none are specified, a version-dependent default profile is used. + +- For reasons of backward compatibility and consistency with 8.6 functions, +the `TCL_ENCODING_STOPONERROR` flag remains. It has the same effect +as specifying the `TCL_ENCODING_PROFILE_STRICT` overriding any other +profile flags that might have been specified. + +For preserving future compatibility, any other bits will result in an error being +returned. In particular, callers should not set the `TCL_ENCODING_START` and +`TCL_ENCODING_STOP` flags as those are not supported by the above functions +(even in the current pre-profile implementation) as they do not implement +streaming operation. + +Both functions have the same set of return values: + +- `TCL_OK`: success. Converted string in *dstPtr and NUL terminated in an encoding +specific manner. + +- `TCL_ERROR`: Error other than conversion error, e.g. invalid parameter +values. Error message is stored in the interpreter. + +- `TCL_CONVERT_MULTIBYTE`: Indicates that the source ends in truncated multibyte +sequence. + +- `TCL_CONVERT_SYNTAX`: The source is not conformant to encoding definition + +- `TCL_CONVERT_UNKNOWN`: The source contained a character that could not be +represented in target encoding. + +In the case of the `TCL_CONVERT_*` return codes, + +- If errorLocPtr is NULL, an error message is stored in the interpreter if +it is not NULL. + +- If errorLocPtr is not NULL, no error message is stored as it is +expected the caller is interested in whatever is decoded so far and not treating +this as an error condition. + +### Differences from the current 8.7 API + +As stated above, the signatures of the functions differ from the currently +implemented 8.7 and 9.0 API's. The new signatures are motivated by: + +- The older signatures had no mechanism to signal an error other than +encoding errors in the data stream. In particular, there was no way to signal +errors in parameter values. Examples would be invalid profiles, conflicting +flags, flags not applicable to the given encoding etc. + +- Callers had to generate error messages themselves based on error codes, +including computing the error offset, offending character etc. This is +both inconvenient and avoidable duplication. Passing the interpreter for +the purposes of retrieving error messages is a common convention in the Tcl +core. + +In addition to the change in signatures, +the `TCL_ENCODING_NOCOMPLAIN`, `TCL_ENCODING_STRICT` and +`TCL_ENCODING_MODIFIED` bit flags have been removed. These were +not present in Tcl 8.6 so there is no backward compatibility issue. + +The first two have been supplanted by the profile related flags. The +`TCL_ENCODING_MODIFIED` bit was intended to be used to specify a variant of +UTF-8 or CESU-8 for encoding nul bytes as `\xC0\x80`. This is never set +internally within the Tcl core and not accessible at the script level either. +The motivation of eliminating it arises from the belief that this is actually an +encoding and best modeled as such instead of through flags. If encoding variants +are enabled through flags, then why not CESU-8 as as variant of UTF-8, or +UTF-16LE/UTF-16BE as variants of UTF-16? As an aside, other languages also treat +this "modified" UTF-8 as a separate selectable encoding. A separate encoding +would also make it usable from the script level if so desired without +changing the API. + +# Implementation + +Implementation and tests for Tcl 8.7 and 9.0 are available in the +[tip-656](https://core.tcl-lang.org/tcl/timeline?r=tip-656) and +[tip-656-tcl9](https://core.tcl-lang.org/tcl/timeline?r=tip-656) branches +respectively. Currently these still use the `-encodingprofile` +option name and will be changed to `-profile` dependent +on TIP approval. Manpages have not been updated. + +## Alternative proposals + +There have been a couple of alternatives proposed on the mailing list. + +#### Finer granularity of error class selection + +The [first](https://sourceforge.net/p/tcl/mailman/message/37770900/) is an +`-onerror` option which is similar to the `-profile` option but allows for +finer granularity. + +``` +encoding convertfrom -onerror {surrogates invalid wrongcode} .... +encoding convertfrom -handle {SURROGATE error INVALID replace INCOMPLETE ignore ...} +``` + +The author is not in favor of this as I expect it to add considerable complexity +to implementation and test suites while being minimally useful to the end user. +(It feels like over generalization to me. How often would a user want to +distinguish between invalid cases?). + +#### Include the profile within the encoding parameter + +Another syntactic alternative proposed was to embed the error handling options +into the encoding argument. + +``` +encoding convertfrom {utf-8 strict} +fconfigure CHANNEL -encoding {utf-8 strict} +``` + +Since the difference is primarily in command option processing, implementation +changes are not many. I prefer the first form from a stylistic perspective. For +example, the latter makes it a little more awkard to request a profile using the +default encoding. + +### Alternative fconfigure option name + +The original option to `fconfigure` proposed by this TIP was `-encodingprofile`. +That has been renamed to `-profile` as per Jan's suggestion. This is both +less wordy and does not conflict with `-encoding` when used in shorter forms. + +# Copyright + +This document has been placed in the public domain. + + + + + + + + + + + + + + + + ADDED tip/657.md Index: tip/657.md ================================================================== --- /dev/null +++ tip/657.md @@ -0,0 +1,99 @@ +# TIP 657: Make "-profile strict" the default in Tcl 9.0 + Author: Jan Nijtmans + Author: Nathan Coulter + State: Final + Type: Project + Vote: Done + Tcl-Version: 9.0 + Tcl-Branch: tip-657 + Vote-Summary: Accepted 6/0/1 + Votes-For: AF, AK, JN, KW, MC, SL + Votes-Against: none + Votes-Present: DKF +----- +# Abstract + +This TIP proposes to make "-profile strict" the default. This TIP is +intended as replacement for TIP #601, but builds on top of +[TIP #656](656.md) ("A revised proposal for encodings") + +# Rationale + +The `tcl8` profile is a legacy profile, which doesn't conform +to any recommended behavior, the two other profiles `strict` and +`replace` do. + +Since `strict` is the recommended profile in most situations, it becomes +the default in Tcl 9.0, with a few exceptions. That has some implications +at the script level. + +Many scripts will have to be adapted, either expecting exceptions +for encoding errors or setting the channel profile to "tcl8" or +"replace". And functions like "fcopy", "read" and "gets" now +will throw an exception when encountering encoding-errors, +which might not be expected by external applications/extensions. + +# Specification + +New channels are by default assigned the `strict` profile, and both +`encoding convertfrom` and `encoding convertto` use the `strict` profile +by default. The exception for this is the `stderr` channel, which +will default to the `replace` profile. + +`Tcl_FSEvalFileEx()` uses the `strict` profile, and therefore `source` uses +the strict profile. All commands except `glob` use the `strict` profile. + +`Tcl_ExternalToUtfDStringEx()`, `Tcl_UtfToExternalDStringEx()`, +`Tcl_ExternalToUtf()` and `Tcl_UtfToExternal()`, support operation in a mode +where any encoding error that occurs results in an `EILSEQ` POSIX error. That +mode is now the default. Other modes can be explicitly configured by the +caller ([TIP #656](656.md)) to specify how these functions behave when invalid data are encountered. + +Handling of environment variables (syncing between the ::env array and the +native environment) is still using the `tcl8` profile, as well as the +`glob` command. The reason for this is that in those situations many +applications won't expect exceptions when illegal byte-sequences +happen in (disk-)filenames or in environment variables. That's why +it's out-of-scope for this TIP. [TIP #671](671.md) is an attempt +to solve this problem with environment variables and the `glob` command. + +# Compatibility + +Since this is an incompatible change whenever channels/files/sockets +are used, it has a potential big effect on extensions. All extensions +which could be confronted with encoding errors now have to handle +the possibility of exceptions to be thrown in the case of encoding +errors. + +Also, when trying to open a file, when the filename has surrogate +characters in it (or .. any code-point missing from the system encoding), +opening such file will fail in Tcl 9.0, while it might have succeeded in Tcl 8.x. +e.g.: +
+    set f [open \\U1F91D w]
+    close $f
+    set f [open \\uD83E\\uDD1D r]
+
+This will succeed in Tcl 8.7, but fail in Tcl 9.0, because surrogate +pairs are not equal to the combined character any more. + +The 'http' package is modified because of this change: Since the 'http' package is +not prepared to handle exceptions, it can easily be left in an inconsistent state, +as shown by test-case errors when the default profile was changed to 'strict'. +Therefore, the 'http' package, when run in Tcl 9.0, will use the 'replace' +profile. This makes the package conformant to the W3C recommendations. + +The 'tcltest' package is modified to use the 'tcl8' profile for its internal +channels. For this package, we don't want exceptions to disturb test-outputs. +If a test-case wants to handle a surrogate, so be it, this should not +disturb the testcase. + +# Implementation + +Implementation is available in the +[tip-657](https://core.tcl-lang.org/tcl/timeline?r=tip-657) branch of the Tcl +repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/658.md Index: tip/658.md ================================================================== --- /dev/null +++ tip/658.md @@ -0,0 +1,124 @@ +# TIP 658: Attach identifiers to Tk menu entries + Author: Schelte Bron + State: Final + Type: Project + Vote: Done + Vote-Summary: Accepted 4/0/0 + Votes-For: BG, SL, FV, KW + Votes-Present: none + Votes-Against: none + Created: 16-Mar-2023 + Tcl-Version: 8.7 + Tk-Branch: tip-658 + Keywords: tk menu +----- + +# Abstract + +This tip proposes to enhance the Tk menu widget by attaching an identifier +to each menu entry. + + +# Rationale + +The Tk menu system currently provides a few methods to refer to a menu +entry. To reconfigure an entry after creation, scripts generally use one of +two methods. Both of which have their pitfalls: + +**Index numbers** +Index numbers change when entries are added or deleted, and even +when the -tearoff option of the menu is changed. + +**Patterns** +The wording or formatting of a menu entry label may change during the +lifetime of an application. The developer then has to go through the code to +find all references and change them too. Labels may also change during the +runtime of an application, for example in a bookmarks menu. Problems also +arise when an application uses internationalization. While using the +localized string as the pattern will work most of the time, not every string +matches itself as a string match pattern. And updating a label when the +locale changes is very cumbersome. + +Addressing menu entries would be much easier if they can be referenced using +a fixed identifier. This would also benefit the tooltip package from tklib. + +# Specification + +Similar to canvas items and ttk::treeview items, whenever a menu entry is +created, a unique id is assigned to it. If no id is specified by the +developer, an id is automatically generated. This id stays with the entry +until it is deleted. The id may be used as the index for all widget +commands that take an *index* argument. + +The following widget commands have gained an optional *id* argument: + +* *pathName* **add** *type* ?*id*? ?*option* *value* *option* *value* ...? +* *pathName* **insert** *index* *type* ?*id*? ?*option* *value* *option* +*value* ...? + +Both of these commands now return the id assigned to the entry. If an id is +specified that already exists, the command throws an error. If one of the +reserved indices (active, end, last, or none) is specified as the id, or an +id of the form *number* or @*number* is used, no error is thrown. But the +entry will not be accessible by that id, because the special meaning of +such indexes will take precedence. + +A new widget command is introduced to obtain the id of a menu entry: + +* *pathName* **id** *index* + +The ids of entries are mirrored in cloned menus. + +# Alternative consideration +The presence of the id argument is being detected based on the fact that +option value pairs always have to be given using an even number of arguments. +This is similar to how an optional name is passed to the image create photo +command. +An alternative method would be what ttk::treeview does: Via a read-only -id +option. This would avoid the need for the id widget command. However, the +use of read-only options is uncommon in plain Tk widgets. Making the -id +option writable would unnecessarily complicate the implementation. +Either way, the **add** and especially the **insert** method will have to +return the assigned id. It would be hard to reliably obtain it otherwise. + +The use of tags instead of, or in addition to ids could also be a +possibility. This would allow multiple entries with the same tag to be +addressed together. A use case would be the Cut, Copy, and Delete entries in +an Edit menu, which would all have to be enabled or disabled based on whether +something is selected. The few situations where this could be useful don't +justify the complexity and memory overhead of implementing such a feature. + +User provided ids are not checked against the list of reserved indices +(active, end, last, none), or if they match any of the other forms for +specifying an entry index (*number*, @*number*). +Assigning the ids will be accepted, but the special meaning of these strings +when used as index will take precedence. This means that entries with such +ids will just not be addressable by their id. +An exception can be implemented, if deemed desirable. + +After an index is compared against the special forms mentioned above without +finding a match, a check is made to see if the index equals the id of any +entry. Only if all of that fails, a pattern match against the labels is done. +This order was chosen because doing a pattern match is slow. The id check is +a quick hash table lookup. The situation that an index would match the id of +one entry and the label of a different entry is expected to be extremely +rare to merely hypothetical in a real-life application. New applications are +most likely to start using the id, rather than pattern matching, which is +another reason to favor the id over a pattern. + +In the current implementation, specifying an id that is already used throws +an error. Another option would be to remove the id from the old entry and +assign it to the new entry. This makes ids less reliable, in my opinion. The +whole point of this tip is to have a fixed reference to a menu entry. +Allowing ids to be moved defeats that purpose. Throwing an error is also how +ttk::treeview deals with duplicate ids. + +# Implementation + +Implementation is available in the +[tip-658](https://core.tcl-lang.org/tk/timeline?r=tip-658) branch of the Tk +repository. + +# Copyright + +This document has been placed in the public domain. ADDED tip/659.md Index: tip/659.md ================================================================== --- /dev/null +++ tip/659.md @@ -0,0 +1,51 @@ +# TIP 659: Allow other default profiles than "strict" + Author: Jan Nijtmans + State: Withdrawn + Type: Project + Vote: Pending + Tcl-Version: 9.0 + Tcl-Branch: tip-659 +----- +# Abstract + +This TIP proposes a new `interp profile` command, and a new +environment variable `TCL_PROFILE_DEFAULT`, which allows +the default profile to be different from "strict". This +only makes sense in combination with TIP #657. + +# Rationale + +The idea is that every interpreter has a default profile. It is +set at creation time, using the environment variable `TCL_PROFILE_DEFAULT`. +If this environment variable has the value `tcl8` or `replace`, +the default profile of the interpreter will be as specified. If +the environment variable is missing, or has any other value, +then the default profile will be `strict` + +Also there will be a new command `interp profile` which can set +and get the current default profile of the interpreter. e.g: + +
+% interp profile
+strict
+% interp profile tcl8
+tcl8
+% interp profile
+tcl8
+
+ +# Implementation + +Implementation is available in the +[tip-659](https://core.tcl-lang.org/tcl/timeline?r=tip-659) branch of the Tcl +repository. + + +# Compatibility + +This is 100% upwards compatible. As long as the environment variable +is not set, everything is as before. + +# Copyright + +This document has been placed in the public domain. ADDED tip/660.md Index: tip/660.md ================================================================== --- /dev/null +++ tip/660.md @@ -0,0 +1,334 @@ +# TIP 660: Use signed types for lengths and indices + Author: Ashok P. Nadkarni + State: Final + Type: Project + Vote: Done + Created: 30-03-2023 + Tcl-Version: 8.7 + Tcl-Branch: tip-660 + Vote-Summary: Accepted 9/0/0 + Votes-For: SL, BG, DF, KK, MC, KW, JD, FV, AK + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Tcl 8.x used the signed `int` type for indexing and lengths both internally as +well as in the public API. This was changed for 9.0, primarily via +[TIP 494](https://core.tcl-lang.org/tips/doc/trunk/tip/494.md), to the unsigned +integer type `size_t`, typedef'ed as `Tcl_Size`. + +This TIP proposes changing the `Tcl_Size` type to `ptrdiff_t` for Tcl 9. For +practical purposes, this provides the same width but as a **signed** integer type. + +For Tcl 8.7, where `Tcl_Size` is already typedef'ed as `int`, there is +no change. It is targeted in this TIP only because of the addition of a new +exported stubs function `Tcl_GetSizeIntFromObj` and a #define `TCL_SIZE_MAX`. + + +# Rationale + +**TL;DR** Changing signed types to unsigned will impose a significant burden on +extension writers porting extensions to 9.0 **for no tangible benefit**. This +additional work is independent of the changes required for 32->64 bit migration. +Furthermore, adopting unsigned integers for indices in the Tcl core necessitates +some "unusual" coding patterns that are susceptible to errors and will be a +continuous source of bugs even within the Tcl core. + +Given that TIP 494 has already been passed, there need to be significant reasons +for reverting to the use of a signed type. These are summarized here with +detailed examples given in the **Discussions** section. + +First, from a C language perspective, (paraphrasing Nathan from the chat) +indexing into arrays is tightly coupled to pointer arithmetic which in turn +requires the integer type representing pointer differences to follow the +semantics of the `ptrdiff_t` type. The `size_t` type, being unsigned, does not +meet this criteria. Further, compilers do not guarantee correct operation of +pointer arithmetic on allocations greater than `PTRDIFF_MAX` bytes. +See [C++ standard](https://timsong-cpp.github.io/cppwp/n4861/expr.add), +[C standard](https://port70.net/~nsz/c/c11/n1570.html#6.5.6p9), +[this blog](https://trust-in-soft.com/blog/2016/05/20/objects-larger-than-ptrdiff_max-bytes/), +[gcc ticket](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303#c8) for more. So +in a nutshell, proper handling of allocations that do not fit in `ptrdiff_t` is +problematic. + +Second, even if the above were not the case, changing a variable's type from +signed to unsigned in any code base requires careful inspection of not just the +variable's use in the Tcl API but practically **every single location** where +the variable is referenced. This includes arithmetic operations, comparisons, +iterations, and even I/O. Concrete examples are given in a later section. Even +worse, the compiler will not warn about most of these. The Tcl core itself is an +example of the extent of changes required and manifested bugs point to the ease +with which these can be overlooked despite the utmost discipline and care that +has been taken. As an extension, the changes made to Tk are further evidence of +the porting effort entailed by the use of unsigned indices in Tcl 9. + +The question also has to be asked as to what one might lose by reverting from +`size_t` back to a signed type like `ptrdiff_t`. The change to the use of +`size_t` in lieu of `int` was made to permit indices and lengths beyond the +`int` range, particularly on 64-bit platforms. However, TIP 494 does not state +the motivation for change from a **signed** type to an **unsigned** type. Based +on discussion, it appears that it was at least partly motivated that an unsigned +type expands the possible range from `2**31` to `2**32` or `2**63` to `2**64`. + +This is a false benefit for multiple reasons: + +- As noted earlier, pointer arithmetic on objects that do not fit within the +`PTRDIFF_MAX` range is undefined behavior and compilers cannot be relied on to +correctly handle the larger allocations that `size_t` would purportedly permit. + +- Even if compilers were to generate code correctly, most 32-bit operating +systems do not allow allocations of more than the half the address space without +special kernel configuration. Anyone desiring larger allocations will generally +be using 64-bit systems in any case. And in the case of 64-bit systems, `2**63` +should really suffice forevermore. (Unlimited range indices into virtual lists +have been brought up as a possible use. These are completely unworkable across +the board in the current Tcl implementation without major incompatible changes.) + +- Even if compilers and operating systems support the unsigned range, the +current Tcl implementation of indices does not! In particular, the encoding of +indices internally into a `Tcl_WideInt` value supports both numeric and `end-N` +type of indices. This means the largest index value supported is half the range +of `Tcl_WideInt` (roughly speaking, the positive values are numeric indices and +the negative values `end-N` format indices). Thus a 64-bit *unsigned* `size_t` +is not workable without significant additional work on the internals. + +Any single one of the above reasons precludes any potential benefit of the +expanded range of `size_t` compared to `ptrdiff_t`. We thus have a situation +where significant effort has to be expended, now and in the future, dealing with +unsigned index values for no concrete benefit whatsoever. + +This TIP is intended to remedy this situation. + +# Specification + +The `Tcl_Size` typedef will be changed from `size_t` to `ptrdiff_t`. + +The `TCL_SIZE_MAX` preprocessor constant is defined to hold the maximum +value for a `Tcl_Size`. + +The `TCL_SIZE_MODIFIER` preprocessor constant is defined to hold the +printf family width specifier appropriate for values of type `Tcl_Size`. +(This is similar to existing `TCL_LL_MODIFIER`, `TCL_Z_MODIFIER` etc.) + +All parameters to public API's that pertain to indices and lengths will be +changed to `Tcl_Size` if they are not so already (most are). Internal API's are +not generally specified in TIP's but as a point of information, the same applies +there. + +As an exception to the above, any parameters that were specified as `size_t` +in Tcl 8.x API's will remain so. + +Functions that accepted negative lengths or indices (for example to indicate nul +termination) will revert to their 8.x compatible behavior instead of only +accepting -1 as a special value. + +
+A new function is exported with the following signature + +``` +int Tcl_GetSizeIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *sizePtr); +``` + +to extract a `Tcl_Size` value from a `Tc_Obj`. This is analogous to the +`Tcl_GetIntFromObj` and `Tcl_GetWideIntFromObj`. +
+ +# Implementation + +Implementation for Tcl 9 is in branch +[tip-660](https://core.tcl-lang.org/tcl/timeline?r=tip-660) +and builds with no errors or test failures. Implementation for Tcl 8.7 is branch +[tip-660-tcl8](https://core.tcl-lang.org/tcl/timeline?r=tip-660-tcl8) which +simply exports `Tcl_GetSizeIntFromObj`. + + +# Discussion + +ChatGPT says + +*Overall, changing a signed type to unsigned in C can have significant +ramifications for your program, and it's important to carefully consider the +implications before making the change.* + +Surely no one needs further convincing having heard from ChatGPT :-) but +nevertheless below are specific examples of the kind of additional burden on +developers precipitated by the change to unsigned types. + +**Note with respect to the examples that the issue is not that individual +changes are major. Rather, it is (a) the number of such occurences, (b) the fact +that the every use of indices and lengths has to be examined with no compiler +diagnostics to help and (c) the atypical usage patterns required are not natural +in C programming leading to subtle bugs in further development.** + +### Looping + +Consider the following simplistic but plausible 8.6 extension to reverse a list. + +``` +static int +Sandbox_Cmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter */ + int objc, /* Number of arguments */ + Tcl_Obj *const objv[] /* Argument strings */ + ) +{ + int i, len; + Tcl_Obj *listObj, *objPtr; + + Tcl_ListObjLength(interp, objv[1], &len); + listObj = Tcl_NewListObj(len, NULL); + for (i = len-1; i >= 0; --i) { + Tcl_ListObjIndex(interp, objv[1], i, &objPtr); + Tcl_ListObjAppendElement(interp, listObj, objPtr); + } + Tcl_SetObjResult(interp, listObj); + return TCL_OK; +} + +``` + +Porting this extension to TIP 660 with `Tcl_Size` defined as `ptrdiff_t` would +simply require changing the `int` declaration to `Tcl_Size`. No other changes +are needed and the code would run correctly as before. With TIP 494 (current 9.0 +implementation) on the other hand, changing the variable type to `Tcl_Size` +defined as `size_t` results in a crash (loop never terminates) requiring the +loop condition to be rewritten. + +This required condition rewrite is not even the real problem. The real problem +is that every line of code using variables `i` or `len` has to be **manually** +examined to determine if it need to be adapted to the change to unsigned types. +Compilers do not always warn and unlike the above example, which results in a +crash, other cases may silently corrupt data or produce invalid results. + +These issues arise from the differences between signed and unsigned types in +comparisons, arithmetic and type promotion. Here is another innocuous +command implementation just to illustrate the problem. + +``` +static int +Sandbox_Cmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter */ + int objc, /* Number of arguments */ + Tcl_Obj *const objv[] /* Argument strings */ + ) +{ + int i, len; + const char *s = Tcl_GetStringFromObj(objv[1], &len); + for (i = 0; i < len-1; ++i) { + printf("%c", s[i]); + } + return TCL_OK; +} +``` + +This prints all but the last character of a string in Tcl 8.6. Changing the +`int` declaration to `size_t` for Tcl9, results in uninitialized memory being +accessed and junk printed **but only when an empty string is passed making the +problem easy to miss**. A `ptrdiff_t` type on the other hand continues to work +correctly in all cases. No source code change is required other than the +type declaration. + +### Expressions + +The problems caused by the switch to an unsigned type are further exacerbated by +the fact that the value `-1` is used as an index in several contexts in the Tcl +core such as an index indicating "before the first element", length indicator +for nul terminated strings, etc. To deal with this, the macro `TCL_INDEX_NONE` +is #defined as (effectively) `(size_t) -1`. + +The following pattern that is pervasive in the Tcl core + +``` + if (len < 0) { + len = {strlen, Tcl_GetCharLen etc.}(...) + } +``` + +has then to be replaced by the pattern + +``` + if (len == TCL_INDEX_NONE) { + len = .... + } +``` + +So an extension writer has to look for these cases and fix them. For an idea of +the pervasiveness of this idiom and number of changes required, between Tcl and +Tk, there are close to a couple of hundred such instances. + +There is a bigger issue though which is that the **semantics** are now changed. +While previously an extension could call `Tcl_NewStringObj` (for example) with +any negative value (which can happen for computed values) for the length +parameter to indicate nul terminated arguments, this is no longer the case. An +incompatibility between 8.x and 9.0 is acceptable but not one that offers no +benefit in return. + +Along similar lines, simple comparisons of the type + +``` +if (idx < 0)... +if (last < first)... +if (last + 1 < stringPtr->numChars) +``` + +where `a` and `b` are of type `size_t` have to be rewritten as + +``` +if (idx + 1 < 1) +if (last + 1 < first + 1) +if (last + 2 < stringPtr->numChars + 1) +``` + +and so on. The reason is left as an exercise for the reader. If not obvious, +that should itself indicate the "unnaturalness" of this idiom. And again, as an +indication of the amount of work required on the part of developers porting +extensions, Tk has around a hundred occurences that needed such modification. + +### Additional casts + +Some cases are even more subtle in that they need an additional cast to work +correctly when the type widths differ. For instance, when `objc` is an `int` as +is common for function implementing Tcl commands, a cast is first necessary +where it was not previously required. + +``` +toIdx + 1 >= (size_t)objc + 1 +``` + +or [this](https://core.tcl-lang.org/tcl/file?ci=d89991c58b49eccd&name=generic/tclIOCmd.c&ln=333) +line + +``` +Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt)((Tcl_WideUInt)(lineLen + 1U)) - 1)); +``` + +where with a signed type, a simple `Tcl_NewWideIntObj(lineLen)` would suffice. + +### Generating Tcl_Objs containing indices + +For extensions that implement collections (VecTcl, tarray, BLT, RBC etc.) +returning a `Tcl_Obj *` containing a index resulting from a search can use a +simple `Tcl_NewWideIntObj` call when indices are signed. With unsigned `size_t` +indices, this no longer suffices. The extension has to deal with `mp_int` internal +representation as seen in the [this](https://core.tcl-lang.org/tcl/file?ci=64479ca6e457f48a&name=generic/tclInt.h&ln=4852-4873) +internal use macro. + +Although an extension may copy and adapt this internal macro or perhaps it could be +exported as a stubs function, it illustrates the additional complexities wrought +by unsigned indices. + +### I/O and formatting + +Even I/O or string formatting statements (as in error messages) are not exempt +from needing examination. Specifiers like "%d" now have to be changed to "%u". + +All the issues above disappear if the `Tcl_Size` type is reverted back to +a signed integer type of the appropriate width such as `ptrdiff_t`. + +# Copyright + +This document has been placed in the public domain. ADDED tip/661.md Index: tip/661.md ================================================================== --- /dev/null +++ tip/661.md @@ -0,0 +1,168 @@ +# TIP 661: Disable the Tcl 8 compatibility macros in Tcl 9 by default + Author: Rolf Ade + Author: Harald Oehlmann + State: Final + Type: Project + Vote: Done + Created: 25-04-2023 + Tcl-Version: 9.0 + Tcl-Branch: disabletcl8api + Vote-Summary: 3 / 0 / 0 + Votes-For: SL, AK, KW + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +The TIPs [481](https://core.tcl-lang.org/tips/doc/trunk/tip/481.md) +and [616](https://core.tcl-lang.org/tips/doc/trunk/tip/616.md) +introduced macro constructs which hide the C API changes from Tcl 8.6 +to Tcl 9. This tip proposes to disabling these macros by default. + +# Specification + +The compile time define `TCL_8_API` activates the compatibility macro layer. +The compatibility macro layer is switched off, if not given. + +The compatibility macros are off by default if this TIP is accepted. +They are on by default if this TIP is not accepted. + +If the compatibility macros are switched off, a compile attempt with +an `int *` (instead a `Tcl_Size *`) argument should give the usual +compile error (or warning) for this case, like "wrong pointer type +'int' instead 'Tcl_Size'". + +# Rationale + +## Practical impact of compatibility macros + +The compatibility macros serve to compile with 32 and 64 bit type with the same function call: + +~~~ +int len; +Tcl_Size biglen; +char *string; +string = Tcl_GetStringFromObj(ObjPtr,&len); +string = Tcl_GetStringFromObj(ObjPtr,&biglen); +~~~ + +This will work and has a compiler warning in the 3rd line that the compatibility layer was used. + +The drawbacks of the macros are: + + * Any `NULL` Argument must be changed to `(Tcl_Size *)NULL` on Windows compilers, as `sizeof(NULL)` triggers a compile failure with miss-leading information "error C2100: illegal indirection". The following very common code will not compile any more. + +~~~ +char *string; +string = Tcl_GetStringFromObj(ObjPtr,NULL); +~~~ + + * A full type checking of the arguments are not possible any more. Real program errors may be hidden. Ashok has passed a struct pointer instead of a pointer to a struct element. This error was not found. + * Users may not understand the magic behind, as the user code is changed, which may not be correctly reflected in eventual error messages. The called functions are not in the source code. + * Typically macro side effects may lead to obscure issues, like double increment when `++` is used. This is a theoretical concern about macros, not special to this implementation. + * If the string has more than 31 bit in length, a runtime panic + of TCL happens. This is called "late failure". Without + compatibility macros, the compilation show a correct and real + warning. It is much more probably to see this failure "early" + in tests. + +A compile run without macros should throw an error or warning (depends on used compiler and its settings), like this code snippet: + +~~~ +void test(Tcl_Size *len); + +void fun() { + int len; + test(&len); +} +~~~ + +If a compiler or settings are used which allow to ignore this warning, +this leads to potential memory corruption, as a 64 bit value is written +to a 32 bit int value. This is normal C behaviour and is intentional. + +### With compatibility macros (current main branch) + +Using gcc, the following warnings are thrown. +Using MS-VC the behaviour is similar. + +``` +../generic/tclsample.c:344:39: warning: passing argument 2 of ‘tclStubsPtr->tcl_GetStringFromObj’ from incompatible pointer type [-Wincompatible-pointer-types] + 344 | p = Tcl_GetStringFromObj(objv[1], &len); +/home/username/tcl/main/include/tclDecls.h:4278:48: note: in definition of macro ‘Tcl_GetStringFromObj’ + 4278 | tclStubsPtr->tcl_GetStringFromObj((objPtr), (sizePtr))) + | ^~~~~~~ +../generic/tclsample.c:344:39: note: expected ‘Tcl_Size *’ {aka ‘long int *’} but argument is of type ‘int *’ + 344 | p = Tcl_GetStringFromObj(objv[1], &len); +/home/username/tcl/main/include/tclDecls.h:4278:48: note: in definition of macro ‘Tcl_GetStringFromObj’ + 4278 | tclStubsPtr->tcl_GetStringFromObj((objPtr), (sizePtr))) + | ^~~~~~~ +``` + +### Without compatibility macros (current TIP661 branch) + +Using gcc, only warnings are thrown, no errors. +Using MS-VC the behaviour is similar. +The warnings are as follows: + +``` +../generic/tclsample.c:344:39: warning: passing argument 2 of ‘tclStubsPtr->tcl_GetStringFromObj’ from incompatible pointer type [-Wincompatible-pointer-types] + 344 | p = Tcl_GetStringFromObj(objv[1], &len); + | ^~~~ + | | + | int * +../generic/tclsample.c:344:39: note: expected ‘Tcl_Size *’ {aka ‘long int *’} but argument is of type ‘int *’ +``` + +Remark, that (at least), the warnings are clearer, as the expected type "Tcl_Size *" is mentioned. + +## Verbose description + +All the functions named in the TIPs +[481](https://core.tcl-lang.org/tips/doc/trunk/tip/481.md) and +[616](https://core.tcl-lang.org/tips/doc/trunk/tip/616.md) changed +their prototype from Tcl 8.6 to Tcl 9. This includes often used +functions like `Tcl_GetStringFromObj`. Typically a pointer changed +from `int` to `Tcl_Size` (a signed 64-bit type). + +Those TIPs include a macro compatibility layer. +This layer observes the size of the target of the passed pointer and +finally call a function with an `int`argument or a 64 bit type. + +TIP [664](https://core.tcl-lang.org/tips/doc/trunk/tip/664.md) +changed the macros to trigger warnings, when no 64 bit type is used. +This allows extension authors to be aware of any errors or porting issues. +In addition, it introduces the extension configure flag `-Wno-incompatible-pointer-types`. + +Extension writer should be aware, that action is required. +With Tcl 9 it is possible to have +`Tcl_Obj`s with a string representation greater 2 GByte and lists up +to 2^31 elements. If an unchanged extension call one of these +functions with such a `Tcl_Obj`, the application will abort. + +Without the compatibility macros in place the compiler warning is +about a real thing: a 32-bit pointer may be written with a 64-bit +value, overwriting memory. This means: much earlier fail than with the +compatibility macros. + +Ideally the compatibility macros- which had his role in migrating the +Tcl core to Tcl 9 - could be removed completely. But there are reports +that some parties have binary extensions in the million lines of code +size. To adapt such amount of code to the Tcl 9 API may be a bigger +task. + +Since Tcl 9 has some not backward compatible changes also on script +level such parties may have a legitimate interest to see, what that +script level changes mean for their test suite. Therefor if build with +the compiler flag `-DTCL_8_API` the compatibility macros are activated +to relieve such educational tests. + +# Implementation + +Implementation started in [Tcl branch "disabletcl8api"](https://core.tcl-lang.org/tcl/timeline?r=disabletcl8api). + +# Copyright + +This document has been placed in the public domain. + ADDED tip/662.md Index: tip/662.md ================================================================== --- /dev/null +++ tip/662.md @@ -0,0 +1,55 @@ +# TIP 662: Un-deprecate Tcl_VarEval + Author: Don Porter + State: Final + Type: Project + Vote: Done + Created: 26-Apr-2023 + Tcl-Version: 8.6 + Tcl-branch: tip-662 + Vote-Summary: Accepted 5/0/0 + Votes-For: AK, BG, DGP, JN, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes removal of deprecated status from public routine +**Tcl\_VarEval**. + +# Background + +Since the release of Tcl 8.1, the documentation of **Tcl\_VarEval** +has included the sentence: + + > **Tcl\_VarEval** is now deprecated. + +This deprecation arose in the context of ending public access to +the *result* field of the **Tcl\_Interp** struct. The documentation +of **Tcl\_VarEval** at the time described the way it would manipulate +that field of the interpreter. It must have seemed natural to think +both items needed to disappear together. + +On the trunk of Tcl development, **Tcl\_VarEval** is still described +as deprecated, but the documentation of its function has been revised +to stop speaking of access to forbidden fields of a struct. It is +described completely functionally, and that function has utility in +the right circumstances. + +There does not appear to be any compelling need to remove **Tcl_VarEval** +from the public interface. Indeed when a sweeping effort to complete +deprecations of public routines was undertaken +in TIP [485](485.md), that routine was not included. + +# Specification + +Remove classification of **Tcl_VarEval** as deprecated in the +documentation and anywhere else. + +# Compatibility + +No issues. + +# Copyright + +This document has been placed in the public domain. ADDED tip/663.md Index: tip/663.md ================================================================== --- /dev/null +++ tip/663.md @@ -0,0 +1,64 @@ +# TIP 663: Cease distribution of the ChangeLog files + Author: Don Porter + State: Final + Type: Project + Vote: Done + Created: 26-Apr-2023 + Tcl-Version: 8.7 + Tcl-Branch: tip-663 + Vote-Summary Accepted 9/0/0 + Votes-For: DP, BG, KW, AK, FV, JN, JD, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes we stop distributing the ChangeLog files in the +Tcl and Tk releases. + +# Background + +The source code history of Tcl and Tk goes back to 1998, roughly +corresponding to the 8.0p2 releases. Both projects were in development +many years before that, but our fossil repositories do not record +that work. + +In all our releases of Tcl and Tk since then, we have included files +in the distribution root directory with names matching `ChangeLog*`. +These files recorded the commit logs from source code management +that went into the source code in the release. There are multiple +files with suffixes like `ChangeLog.2004`, because some editors on +some systems at the time could not act on large text files with +adequate performance. When Tcl was developed with SCM systems +based on a central server with limited access, this was a reasonable +way to export development history information to the users of Tcl and Tk. + +Source code management for Tcl and Tk moved to fossil in 2011. +The commit log messages became available publicly to anyone. After +two years, the non-value of continuing to grow the `ChangeLog*` files +became clear. They have been unmaintained since 2013. Everything +in them is now a historic record of events a decade or more in the past, +and available to be searched and discovered online. + +# Rationale + +The value of the contents of the `Changelog*` files no longer reasonably +outweighs the cost of cluttering the root directory. + +# Specification + +End the distribution of the `ChangeLog*` files in all Tcl and Tk source code +releases 8.7 and later. + +# Compatibility + +No issues expected. + +# Implementation + +See the branch [tip-663](https://core.tcl-lang.org/tcl/timeline?r=tip-663) . + +# Copyright + +This document has been placed in the public domain. ADDED tip/664.md Index: tip/664.md ================================================================== --- /dev/null +++ tip/664.md @@ -0,0 +1,79 @@ +# TIP 664: Enable compiler warnings for missing int → Tcl_Size conversions + Author: Jan Nijtmans + State: Withdrawn + Type: Project + Vote: Done + Created: 02-05-2023 + Tcl-Version: 9.0 + Tcl-Branch: tip-664 + Vote-Summary: Accepted 7/0/0 + Votes-For: AF, AK, DKF, JN, KW, MC, SL + Votes-Against: none + Votes-Present: none + Obsoleted-By: 661 +----- + +# Abstract + +The TIPs [481](https://core.tcl-lang.org/tips/doc/trunk/tip/481.md) +and [616](https://core.tcl-lang.org/tips/doc/trunk/tip/616.md) +introduced macro constructs which hide the C API changes from Tcl 8.6 +to Tcl 9 and disable compiler warnings. This tip proposes to enable +those compiler warnings, as a help for people who want to make their +extension fully capable of handling strings > 2^31. + +If users want to disable this warning they can do that by using +their normal compiler options, e.g. (for clang/gcc): +
+    configure CFLAGS=-Wno-incompatible-pointer-types
+
+Users disabling/ignoring this warning are not harmed in any way, +although it is not recommended. This should encourage, rather +than force, extension writers to update their code. + +All _battery-included_ extensions (`Itcl`, `tdbc*`, `thread`) are +already converted to use `Tcl_Size` everywhere necessary. + +# Rationale + +When TIPs [481](https://core.tcl-lang.org/tips/doc/trunk/tip/481.md) +and [616](https://core.tcl-lang.org/tips/doc/trunk/tip/616.md) were +implemented/proposed, the `Tcl_Size` type didn't exist yet. The +main goal for Tcl 9.0 was - at that time - to keep everything +source-compatible as much as possible. +That means that extensions using `Tcl_GetStringFromObj(obj, &len)` +- where `len` points to an `int` variable - should keep working as-is. + +Currently, extension-writers are starting to make their extensions +Tcl-9-ready, which means that they are able to use string/list lengths +> 2^31. That means the `int len` variable has to be replaced +by a `Tcl_Size len` variable. But Tcl doesn't provide any +help finding those instances. This TIP makes it much easier +for extension-writers to find those places in their code, +without any functional disadvantage: If the compiler warning +is ignored, still the extension will work as expected as +long as no strings/lists exceed the 2^31 limit. + +# Implementation + +Implementation is in [Tcl branch "tip-664"](https://core.tcl-lang.org/tcl/timeline?r=tip-664). + +It only removes a lot of type-casts from `tclDecls.h`, which were +originally put there just to prevent this compiler-warning. There +is no change in implementation of any functions, so the only +effect of this proposal is to enable compiler-warnings for this +specific case, nothing else. + +# Compatibility + +If an extension which is originally written for Tcl 8.6 is built +with Tcl 9 and the compiler warnings are ignored by the developer, +and no strings or lists are used larger than 2^31 in size, +everything will function as before. Any use of strings or lists +larger then that in the extension will result in an error-message, +wherever possible. Only `Tcl_GetStringFromObj()` and `Tcl_GetUnicodeFromObj()` +are not capable of returning an error-message, they will panic (as they do now). + +# Copyright + +This document has been placed in the public domain. ADDED tip/665.md Index: tip/665.md ================================================================== --- /dev/null +++ tip/665.md @@ -0,0 +1,56 @@ +# TIP 665: Remove support for internal utf-16 for Tcl 8.7 (and 9.0) + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 02-05-2023 + Tcl-Version: 8.7 + Tcl-Branch: tip-665 + Vote-Summary: Accepted 4/0/1 + Votes-For: AK, JN, KW, SL + Votes-Against: none + Votes-Present: BG +----- + +# Abstract + +This TIP proposes to remove support for building +the Tcl 8.7 and 9.0 core with -DTCL_UTF_MAX=3, +more specifically: any value other than 4. + +Extensions (like Tk) can still use -DTCL_UTF_MAX=3. + +# Rationale + +The TIPs [542](https://core.tcl-lang.org/tips/doc/trunk/tip/542.md) +and [622](https://core.tcl-lang.org/tips/doc/trunk/tip/622.md) +prepared Tcl 8.7 (and 9.0) to use utf-32 internally for all +operations, while - still - being able to use utf-16 internally. +This was used mainly for regression-testing. The "utf.test" +suite carefully compared the result of all utf-related +functions between the 8.6 result and the 8.7 result, making +sure that extensions won't be effected. + +Now that the internal utf-32 handling has stabilized, +this "utf16" mode hinders further development more than that +it helps. Therefore this TIP proposes to remove it +as far as possible. The utf-16 compatibility layer, +which allows extensions (such as Tk) still being +compiled with -DTCL_UTF_MAX=3 is still kept. And +also the file tclUniData.c (which is generated from +the Unicode official data-tables, and kept equal in +Tcl 8.6/8.7/9.0) is left as-is. + +# Implementation + +Implementation is in [Tcl branch "tip-665"](https://core.tcl-lang.org/tcl/timeline?r=tip-665). + +# Compatibility + +Since the compatibility layer is kept as-is for extensions, this change +is fully upwards compatible with 8.6. + +# Copyright + +This document has been placed in the public domain. + ADDED tip/666.md Index: tip/666.md ================================================================== --- /dev/null +++ tip/666.md @@ -0,0 +1,52 @@ +# TIP 666: Change ptrdiff_t → Tcl_Size in Tcl 8.7 (and 9.0) + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 03-05-2023 + Tcl-Version: 8.7 + Tcl-Branch: tip-666 + Vote-Summary: Accepted 5/0/0 + Votes-For: AK, BG, JN, KW, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +The TIPs [627](https://core.tcl-lang.org/tips/doc/trunk/tip/627.md) +and [630](https://core.tcl-lang.org/tips/doc/trunk/tip/630.md) +prepared the Tcl 8.7 (and 9.0) API to be able to use more than 2**31 +arguments in all commands, even though that wasn't possible +internally yet. This TIP proposes to use `Tcl_Size` in stead +of `ptrdiff_t` for all functions mentioned in those 2 TIP's. + +In this way, most of the TIP [#627](https://core.tcl-lang.org/tips/doc/trunk/tip/627.md)/[#630](https://core.tcl-lang.org/tips/doc/trunk/tip/630.md) +implementations vanishes in Tcl 8.7 (but not in 9.0). + +# Rationale + +When TIPs [627](https://core.tcl-lang.org/tips/doc/trunk/tip/627.md) +and [630](https://core.tcl-lang.org/tips/doc/trunk/tip/630.md) +were implemented, the `Tcl_Size` type didn't exist yet. Therefore, +the extension to 64-bit was targeted (but not really functional) +to 8.7, and forwarded to 9.0. Now that `Tcl_Size` exists, it makes +more sense to remove those 64-bit functions from 8.7, so target +those 2 TIP's to 9.0 in stead of 8.7. + +# Implementation + +Implementation is in [Tcl branch "tip-666"](https://core.tcl-lang.org/tcl/timeline?r=tip-666) for Tcl 8.7. + +Part of the implementation for Tcl 9.0 is already committed to [trunk](https://core.tcl-lang.org/tcl/info/cd426d20a9327f49), +ignoring the requirement that Tcl 9.0 should be as much as possible source-compatible 8.7. + +# Compatibility + +This change is 100% upwards compatible for 9.0, but not for 8.7. It will no longer +be possible to use `ptrdiff_t` for the functions mentioned in TIP #627 and TIP #630, +extensions will have to use `Tcl_Size` in stead. + +# Copyright + +This document has been placed in the public domain. ADDED tip/667.md Index: tip/667.md ================================================================== --- /dev/null +++ tip/667.md @@ -0,0 +1,81 @@ +# TIP 667: Make "strict" the default encoding profile. + Author: Nathan Coulter + State: Draft + Type: Project + Vote: Pending + Tcl-Version: 9.0 + Tcl-Branch: tip-667 + Obsoleted-By: 657 +----- +# Abstract + +Although [TIP #657](657.md) purported to be about making the strict profile the +default, it also specified other things that were out of scope, specified +unnecessary implementation details, and included a partial alternative to +[TIP #653](653.md) in its *Compatibility* section (those changes have since +been incorporated into [TIP #653](653.md). This TIP proposes that "strict" +become the default encoding profile for all operations. + +# Rationale + +The `tcl8` profile was until recently the only option for handling +encoding errors in channel content. Now there are two additional profiles +available, `strict` and `replace`. + +The most common use case for encoded data is to expect that if the operation +completed without error, the data were correctly encoded and that no data were +lost in the result. This corresponds to the `strict` encoding profile, so it +makes sense to make this profile the default. Where it is not the default, +data may be silently corrupted, with the corruption being discovered only at +some later date after collateral damage, possibly including exploitation by bad +actors, has been discovered. + +It is expected that scripts that must be adapted due to this change in default +behaviour will fail early and before real damage is done, making it easy to +detect where change is necessary and leading to a more secure and correct +scripting environment overall. Functions like `fcopy`, `read` and `gets` throw +exceptions as soon as bad data is detected. Where this is not desired it is +easy to remedy through trivial mechanical changes to existing scripts. + +# Specification + +New channels are by default assigned the `strict` profile, and both +`encoding convertfrom` and `encoding convertto` use the `strict` profile +by default. + +`Tcl_FSEvalFileEx()` uses the `strict` profile, and therefore `source` uses +the strict profile. The http package leaves any channels it opens in their +default strict configuration, so it too uses the `strict` profile. + +`Tcl_ExternalToUtfDStringEx()`, `Tcl_UtfToExternalDStringEx()`, +`Tcl_ExternalToUtf()` and `Tcl_UtfToExternal()`, support operation in a mode +where any encoding error that occurs results in an `EILSEQ` POSIX error. That +mode is now the default. Other modes can be explicitly configured by the +caller to specify how these functions behave when invalid data are encountered. + +Any test that in the Tcl test suite that requires a channel that is not +configured for strict encoding explicitly configures the channel according to +its needs. + +# Further explanation + + +# Compatibility + +This is an incompatible change for `Tcl_ExternalToUtf()`/`Tcl_UtfToExternal()`, +but since those functions are often called to operate in strict mode, it will +have little effect. + +This is an incompatible change for `Tcl_Read()`, `Tcl_Write()`, `Tcl_Gets()`. +See TIP [653](https://core.tcl-lang.org/tips/doc/trunk/tip/653.md) for details. + +# Implementation + +The branch +[trunk-encodingdefaultstrict](https://core.tcl-lang.org/tcl/timeline?r=trunk-encodingdefaultstrict) +implements this TIP. + + +# Copyright + +This document has been placed in the public domain. ADDED tip/668.md Index: tip/668.md ================================================================== --- /dev/null +++ tip/668.md @@ -0,0 +1,57 @@ +# TIP 668: Consolidate all Tcl_Attempt* functions. + Author: Jan Nijtmans + State: Draft + Type: Project + Created: 11-05-2023 + Tcl-Version: 9.1 + Tcl-Branch: tip-668 +----- + +# Abstract + +The normal functions `Tcl_Alloc()`, `Tcl_Realloc()` (and a few more) +result in a Panic when the memory allocation fails. There are +alternative functions `Tcl_AtteptAlloc()`/`Tcl_AttemptRealloc()` +which return a NULL-pointer in this case. The advantage of the +*Attempt* form of those functions is that we no longer have to +check _before_ the function-call whether the `size` parameter +isn't too big, we can just make the call and check afterwards +whether it was possible or not. This TIP proposes to make this +behavior available to the normal `Tcl_Alloc()`/`Tcl_Realloc()` + +# Rationale + +TODO + +# Implementation + +The functions `Tcl_Alloc()`, `Tcl_Realloc()` have been removed, +and `Tcl_AtteptAlloc()`/`Tcl_AttemptRealloc()` renamed to +`Tcl_Alloc()`, `Tcl_Realloc()`. This means that everything will +keep functioning as before. The only visible change is that +instead of panicing, those functions might unexpectedly +return a NULL-pointer. Most likely, those null-pointers +eventually result in a null-pointer-exception, which is +just as bad as panicing. + +Implementation is in [Tcl branch "tip-668"](https://core.tcl-lang.org/tcl/timeline?r=tip-668). + +Eventually all `Tcl_Alloc()`, `Tcl_Realloc()` calls should +check their result, and handle a clean recovery when +allocation fails. Some newer code (like the improved _list_ +implementation) already does that by using the Attempt* +functions. This change eliminates the need for special +Attempt*-functions, it just provides this for all +normal functions. This makes `Tcl_Alloc()`/`Tcl_Realloc()` +behave the same as the standard C `malloc()`, `realloc()`, +which also return a null-pointer on failure. + +TODO + +# Compatibility + +TODO + +# Copyright + +This document has been placed in the public domain. ADDED tip/669.md Index: tip/669.md ================================================================== --- /dev/null +++ tip/669.md @@ -0,0 +1,36 @@ +# TIP 669: Pipe PIDs as Channel Property + Author: Donal Fellows + State: Draft + Type: Project + Created: 24-05-2023 + Tcl-Version: 9.1 + Tcl-Branch: tip-669 +----- + +# Abstract + +This TIP is about making the information about pipes more regular in +line with the general model of channels. It adds an option, **-pid**, +to the pipe channel type. + +# Outline + +The mechanism behind **chan configure** allows for all sorts of +general concepts to be handled, depending on the channel type. This +TIP makes the information currently available via the **pid** command +also available via a **chan configure*** option for pipe channels, +**-pid**. This option will be read-only. When a pipe channel does not +know what process ID (or IDs) is on the other end, the value of the +option will be empty; this is expected to be the case for pipes made +with **chan pipe**. + +Safe interpreters, in the event that they get a pipe channel, will not +see that the option exists. + +# Implementation + +To do. + +# Copyright + +This document has been placed in the public domain. ADDED tip/670.md Index: tip/670.md ================================================================== --- /dev/null +++ tip/670.md @@ -0,0 +1,223 @@ +# TIP 670: Simple Extra Procedures for File Access + Author: Donal Fellows + State: Final + Type: Project + Vote: Done + Created: 29-05-2023 + Tcl-Version: 8.7 + Tcl-Branch: tip-670 +----- + +# Abstract + +This TIP adds some simple procedures for common types of basic file access. + +# Outline + +I've been doing user support for a while and there are a few basic questions +that come up relatively frequently, such as "How do I read a file?" and "How +do I write a file?" Naturally, there common patterns for this. Let's make a +few of these be procedures in Tcl itself (much like **parray** for printing +arrays). These will be _explicitly_ procedures and they will be made available +for autoloading so they will be less likely to conflict with existing user +code. + +The procedures will be **readFile**, **writeFile** and **foreachLine**. + +Part of the purpose of these procedures is to act as samples of how to do +these sorts of tasks. They are not intended to handle all edge cases. They +are intended to be read by users of Tcl. + +# Description of Procedures + +## readFile + +The **readFile** procedure will take one or two arguments. The first argument +shall be the name of an existing file, and the second argument, if provided +shall be either **text** or **binary** (or any unambiguous prefix thereof) to +indicate which mode to read the file in. The default mode shall be **text**. + +In text mode, the successful result of **readFile** shall be the whole contents +of the file (up to whatever default EOF character Tcl uses), assuming it is +using the system encoding, including any trailing newlines. CRLF sequences and +so on will be normalized. + +In binary mode, the successful result of **readFile** shall be the whole exact +byte content of the file without further interpretation. + +Text mode will be much like this: + + proc readFile {filename} { + set f [open $filename "r"] + set data [read $f] + close $f + return $data + } + +Binary mode will be much like this: + + proc readFile {filename binary} { + set f [open $filename "rb"] + set data [read $f] + close $f + return $data + } + +The actual implementation will be more complex because of argument parsing +and ensuring that resources are managed correctly. + + proc readFile {filename {mode text}} { + # Parse the arguments + set MODES {binary text} + set ERR [list -level 1 -errorcode [list TCL LOOKUP MODE $mode]] + set mode [tcl::prefix match -message "mode" -error $ERR $MODES $mode] + + # Read the file + set f [open $filename [dict get {text r binary rb} $mode]] + try { + return [read $f] + } finally { + close $f + } + } + +## writeFile + +The **writeFile** procedure will take two or three arguments. The first +argument shall be the name of a file to write. The final argument shall be the +contents to write to the file (_overwriting_ any existing file with that name; +the code will not be careful in this regard). If there are three arguments, the +second argument will be either **text** or **binary** (or any unambiguous +prefix thereof) to indicate the mode of operation. The default mode shall be +**text**. The successful result of **writeFile** shall be the empty string. + +In text mode, the file will have the text written to it as provided, without +extra newlines (that is, we will uphold the expectation that using +**writeFile** with the result of **readFile** shall produce an equivalent +file). The platform default encoding and line mode shall be used. It is up to +the caller to provide any trailing newline if one is desired. + +In binary mode, the file will have the binary data written to it exactly as +provided. + +Text mode will be much like this: + + proc writeFile {filename data} { + set f [open $filename "w"] + puts -nonewline $f $data + close $f + } + +Binary mode will be much like this: + + proc writeFile {filename binary data} { + set f [open $filename "wb"] + puts -nonewline $f $data + close $f + } + +The actual implementation will be more complex because of argument parsing +and ensuring that resources are managed correctly. + + proc writeFile {args} { + # Parse the arguments + switch [llength $args] { + 2 { + lassign $args filename data + set mode text + } + 3 { + lassign $args filename mode data + set MODES {binary text} + set ERR [list -level 1 -errorcode [list TCL LOOKUP MODE $mode]] + set mode [tcl::prefix match -message "mode" -error $ERR $MODES $mode] + } + default { + set COMMAND [lindex [info level 0] 0] + return -code error -errorcode {TCL WRONGARGS} \ + "wrong # args: should be \"$COMMAND filename ?mode? data\"" + } + } + + # Write the file + set f [open $filename [dict get {text w binary wb} $mode]] + try { + puts -nonewline $f $data + } finally { + close $f + } + } + +## foreachLine + +The **foreachLine** procedure will take three arguments. The first shall be +the name of a variable in the calling scope, the second shall be the name of a +text file to read, and the third shall be a string containing Tcl code (that +will be evaluated in the caller's context). The platform default encoding will +be used. + +A simplified version of the procedure will be as below: + + proc foreachLine {varName filename body} { + upvar 1 $varName line + set f [open $filename "r"] + while {[gets $f line] >= 0} { + uplevel 1 $body + } + close $f + } + +The full version will be more complex in order to do correct handling. In +particular, errors will leave the file closed, and **return**, **break** and +**continue** will be supported (with normal semantics) within the _body_. + +The more complete version is this: + + proc foreachLine {varName filename body} { + upvar 1 $varName line + set f [open $filename "r"] + try { + while {[gets $f line] >= 0} { + uplevel 1 $body + } + } on return {msg opt} { + dict incr opt -level + return -options $opt $msg + } finally { + close $f + } + } + +The extra complexity with **try** handles getting **return** correct and +ensures that we always **close** the channel. + +Another part of the purpose of **foreachLine** is to provide an example of +how to do the "I'm making a custom looping construct in Tcl code" pattern. +Having such things is good, very good, and part of what we encourage users to +write (because they understand what the things are to iterate over, and we'll +never manage to make all the base iterators in the core) but needs slight +tweaking to make work perfectly; the **foreachLine** source shows how to do +that including handling the tricky edge case that is **return** with a level +specified. + +TIPs [#636](636.md) and [#644](644.md) may cause how the inner loop of +**foreachLine** is implemented. That's fine with me, but doesn't seem to be +particularly necessary here; the code will not get shorter. + +Explicitly omitted are things like filtering of the lines to remove, say, +empty lines and comment lines; that's the sort of thing I put in my own file +iterators, but they're not general enough. And they can be done easily in user +code: + + foreachLine line filename.txt { + set line [string trim $line] + if {$line eq "" || [string match #* $line]} { + continue + } + # Example of normalization + processWordsOfLine [split [regsub -all {\s+} $line " "]] + } + +# Copyright + +This document has been placed in the public domain. ADDED tip/671.md Index: tip/671.md ================================================================== --- /dev/null +++ tip/671.md @@ -0,0 +1,315 @@ +# TIP 671: New encoding profile - lossless + Author: Ashok P. Nadkarni + State: Draft + Type: Project + Created: 2023-06-04 + Tcl-Version: 9.1 + Tcl-branch: tip-671 +----- + +* Abstract +* Rationale +* Relation to other TIP's +* Specification + * The **lossless** profile + * Encoding strings + * Channel configuration + * Implicit use of lossless profiles + * Affected file systems + * File paths + * Global variables + * Internal string representation + * Error exceptions +* Discussion + * Security issues + * Alternative mappings + * Tk compatibility +* Implementation +* References +* Copyright + + + +
+ +# Abstract + +This TIP proposes + +* a new encoding profile, **lossless**, that will preserve roundtripping in the +presence of invalid byte sequences, and + +* use of this new profile in various system interfaces such as those related +to file names, environment etc. + +*Note: Round tripping is not always possible for some encoding even in the +absence of invalid bytes. This is because the mapping between Unicode and +those encodings is one->many. Examples are shiftjis and big5.* + +# Rationale + +The following examples provide the motivation for this TIP. + +Unix file systems treat file paths as simple byte sequences while Tcl expects +them to be in the encoding returned by the `encoding system` command. Further, +the encoding in effect at the time a file is created by an application may +differ from that when the file is later accessed (different user, mounted file +systems etc.) which may result in the latter interpreting the file name as +containing invalid bytes for the encoding. This results in anomalous behavior as +illustrated by the following sequence wherein the `file exists` command claims a +file returned by `glob` does not exist. Other commands like `open`, +`file rename` etc. will also show analogous behavior. + +``` +% mkdir tmp +% encoding system iso8859-1 +% cd tmp +% close [open \xe9 w] +% exec ls -b +\351 +% file exists [lindex [glob *] 0] +1 +% encoding system utf-8 +% file exists [lindex [glob *] 0] +0 +``` + +Similar issues exist with environment variables. For example, when passed down +to child processes two environment variables compare equal when they should not. + +``` +apnadkarni@IO$ export X=$'\351' +apnadkarni@IO$ export Y=$'\303\251' +apnadkarni@IO$ if [ "$X" = "$Y" ]; then echo Equal; else echo Unequal; fi +Unequal +apnadkarni@IO$ ./tclsh +% string equal $env(X) $env(Y) +1 +``` + +Misinterpretation of environment variables can affect searches along `PATH` etc. + +And in command line arguments: + +``` +apnadkarni@IO$ echo 'puts [string equal {*}$argv]' > x.tcl +apnadkarni@IO$ tclsh x.tcl $'\351' $'\303\251' +1 +``` + +So for example, a file name passed down to `tclsh` from the `find` program +will not target the correct file (most likely failing). + +**Note the TIP is not a panacea for all the problems related to encodings in +system interfaces. No general solution is possible and this TIP only addresses +certain common situations.** + +# Relation to other TIP's + +This TIP is orthogonal to +[657](https://core.tcl-lang.org/tips/doc/trunk/tip/657.md) and +[667](https://core.tcl-lang.org/tips/doc/trunk/tip/667.md) which propose +changing the default encoding profile to **strict**. Neither of those TIP's +currently specify the encoding profiles implicitly used by commands like `glob`, +`open` etc. that interface to system API's so the assumption is behavior will +remain as in the examples above. If those TIP's are updated to mandate the +`strict` profile for those commands, the problems are only exacerbated. For +example, the `glob` command in the example above will raise an error exception +making those directories completely unreadable. + +# Specification + +This specification is based on the approach described in +[Unicode TR #36 Section 3.7 Enabling Lossless Conversion](https://www.unicode.org/reports/tr36/#EnablingLosslessConversion) +and Python's [PEP 383](https://peps.python.org/pep-0383/). + +## The **lossless** profile + +A new encoding profile, named **lossless**, is defined which can be specified +anywhere that encoding profiles are accepted. When this profile is in effect +**for ASCII-compatible** encodings (those matching ASCII in the range 0:127), + +* *Passthrough decoding transform* When converting an encoded byte stream to a Tcl +string (Unicode code point sequence), invalid bytes in the range 0x80-0xFF are +mapped to Unicode code points U+DC80-U+DCFF. In ASCII-compatible encodings +invalid bytes can only lie in this range. + +* *Passthrough encoding transform* When converting a Tcl string to an encoded byte +stream, code points in the range U+DC80-U+DCFF are mapped to bytes values +0x80-0xFF. Code points not supported by the encoding are replaced with +a encoding-specific fallback character as for the `tcl8` and `replace` +profiles. + +For encodings that are **not ASCII-compatible**, + +* When converting an encoded byte stream to a Tcl string, invalid bytes +are mapped to the Unicode REPLACEMENT CHAR U+FFFD. + +* When converting a Tcl string to an encoded byte stream, code points in the +range U+DC80-U+DCFF or not supported by the encodings are mapped to the encoding +dependent fallback character. + +The rationale for the distinction between ASCII-compatible encodings and those +that are not is detailed in the [Discussion](#Discussion) section. + +Lossless roundtripping using the `lossless` is only guaranteed when the same +encoding is used for input and output. Writing using a different encoding from +the one used for reading will naturally not be lossless as the invalid byte in +the input encoding that was "passed through" may very well be a valid byte in +the output encoding. In practice, this is not likely as the `lossless` profile is +generally in effect in the system commands which implicitly use the system +encoding for both encoding and decoding. + +For illustrative purposes, the table below shows how the different profiles +behave in their treatment of invalid bytes in an encoded UTF-8 stream. + +``` +Profile Encoded input Tcl string Encoded output + decoding-> encoding-> +tcl8 \x41\xe1\x42 U+0041,U+00E1,U+0042 \x41\xc3\xa1\x42 +strict \x41\xe1\x42 * raises error * +replace \x41\xe1\x42 U+0041,U+FFFD,U+0042 \x41\xef\xbf\xbd\x42 +lossless \x41\xe1\x42 U+0041,U+DCE1,U+0042 \x41\xe1\x42 +``` + +Only the **lossless** profile preserves the original byte sequence after +roundtripping. + +## Encoding strings + +The `encoding convertfrom` and `encoding convertto` commands will accept +`lossless` as a `-profile` option value and implement the appropriate behavior +described earlier depending on direction of conversion. + +Analogously, the `lossless` profile can be effected in public C encoding +API's that accept profiles via their `flags` parameter by specifying the +`TCL_ENCODING_PROFILE_LOSSLESS` flag. These functions are `Tcl_ExternalToUtf`, +`Tcl_UtfToExternal`, `Tcl_ExternalToUtfDStringEx`, `Tcl_UtfToExternalDStringEx`. + +## Channel configuration + +Likewise, channels configured with `-profile lossless` via `fconfigure` or +`chan configure` commands will perform lossless encoding transforms on data +passed through the channel. + +## Implicit use of lossless profiles + +### Affected file systems + +The changes to encoding transforms implicitly used in commands that call +system API's only affects platforms that use the Unix/POSIX API's. +In particular, + +* Windows is not impacted as its system API's use wide characters +strings natively and are not byte streams. + +* The zipfs file system uses its own fallback strategy and will not be +changed under the presumption that the fallbacks implemented there have +been tuned to common usage in the zip world. + +### File paths + +Commands that transfer file paths to or from the system will implicitly use the +system encoding with the `lossless` profile. These include `open`, `cd`, `pwd`, +`open`, `exec` `load`, `info nameofexecutable` as well as the `file` and +`chan` ensembles where applicable. + +Note in the case of `exec` and the pipe version of `open`, passed arguments are +also encoded with the `lossless` profile. + +The equivalent C API's for file access will also use `lossless` profiles when +translating file names into native form. This includes the internal +`ProcessGlobalValue` API's that are used to share native strings across threads +(executable name, encoding and library paths, host names). + +### Global variables + +Values read from the environment and stored in `env` at program start up will be +transformed using the system encoding and the `lossless` profile. Writes to the +`env` will also use the same combination when storing into the native environment. + +Command line arguments stored to `argv` at program start up will be transformed +using the system encoding and `lossless` profile. + +As for file paths, this only affects platforms that use the Unix/POSIX API's. + +### Internal string representation + +The conversions between the different Tcl's internal string representations +would need to allow for isolated low surrogates. This is already the case but +would need to continue to be so even if TIP 657 (which is silent on the matter) +passes. + +## Error exceptions + +There are code paths within the Tcl core where there is no mechanism for +reporting or handling errors. With exception of memory allocation failures +(which result in a panic) encoding operations are always expected to succeed +which was true with the existing `tcl8` profile. The current `lossless` +profile implementation also adheres to this. + +# Discussion + +## Security issues + +The ability to smuggle invalid byte encodings to and from Unicode can lead to +security issues when a Tcl string that was decoded from a byte sequence using +encoding A is then encoded using encoding B. The byte that was invalid in +encoding A might be valid in encoding B and with special security implications +(path separator etc.). **This is a programming error as roundtripping should +always be done using the same encoding.** Nevertheless, to mitigate this, this +specification (following PEP 383** will not map byte values < 128 into the +U+DC00 surrogate space. Instead they are mapped to the encoding specific +replacement character. + +Since values < 128 are valid for all ASCII compatible encodings, there is no +need to map them and thus this is generally not an issue. For encodings that are +not ASCII compatible, such as EBCIDIC, UTF-16 and UTF-32 roundtripping is thus +not possible as they will contain invalid bytes with values < 128 which will be +replaced by a fallback character. + +**In practice, this limitation is of little consequence because the primary use of +the profile is across system interfaces and encodings not compatible with ASCII +are highly discouraged in the POSIX environments this TIP targets.** To quote +from [here](https://www.cl.cam.ac.uk/~mgk25/ucs/iso2022-wc.html) + +*There are only 19 encodings currently used worldwide as legitimate POSIX +multi-byte locale encodings UTF-8, ISO-8859-1, ISO-8859-2, ISO-8859-3, +ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-13, +ISO-8859-15, EUC-JP, EUC-KR, GB2312/EUC-CN, KOI8-R, KOI8-U, VISCII, +WINDOWS-1251, WINDOWS-1256.* + +## Alternative mappings + +There are other code point ranges that could have been used to map invalid +bytes such as code points above U+10FFFF, private use code points, private +use high surrogates etc. The primary reason for choosing U+DC00-U+DCFF was +that private use code points may conflict with some *application* that uses +private use code points for their own purpose. At the end of the day, it was +felt safer to stick to the PEP 383 choice as that has been around for many +years and (presumably) survived conflicts in real world use. + +## Tk compatibility + +If file names containing "wrapped" invalid bytes are displayed in a widget, +the bytes will be displayed using the replacement character glyph. + +# Implementation + +Implementation is in progress in the +[tip-671](https://core.tcl-lang.org/tcl/timeline?r=tip-671) branch. + +# References + +1. [Unicode TR #36 Section 3.7 Enabling Lossless Conversion](https://www.unicode.org/reports/tr36/#EnablingLosslessConversion) + +2. [PEP 383](https://peps.python.org/pep-0383/). + +# Copyright + +This document has been placed in the public domain. + +
+ + + ADDED tip/672.md Index: tip/672.md ================================================================== --- /dev/null +++ tip/672.md @@ -0,0 +1,102 @@ +# TIP 672: Extend $ substitution to include expressions as $(expression) + + Author: Eric Taylor + State: Draft + Type: Project + Created: 2023-06-06 + Tcl-Version: 9.1 + Tcl-Branch: tip-672 +----- + +# Abstract + +This TIP extends the $ substitution to include expressions as +$(expression). + +# Rationale and Discussion + +The current method for expressions using the `[expr]` command has 2 +problems. First, it is difficult to BOTH read and write. Some, as in +TIP 282, go so far as to say it is ugly. + +Secondly, as indicated in TIP 526, expressions should be braced, or +there can be problems with both security and performance. + +Consider the following computation (from TIP 282): +``` + set x [expr {5*$y + 6*$z}] + set w [expr {$x**2 + $y**2}] + set v [expr {$w**2 + $y**2}] +``` +The `[expr {...}]` constructs make the code considerably harder to +read. This TIP would propose that there be a shorthand as such: +``` + set x $(5*$y + 6*$z) + set w $($x**2 + $y**2) + set v $($w**2 + $y**2) +``` +The implementation of this should also eliminate the requirement for +the braces from above, as braces would be assumed and code would be +compiled as though the parentheses were braces. + +Since this is a `$` substitution, it would continue to work inside +double quotes with the expected result. + +There would also be an advantage in some text editors, which already have +parenthesis balancing and syntax coloring features. + +Another Tcl implementation, JimTcl uses this `$(...)` substitution and it +seems to work without problems. + +# Version and Incompatibility + +This TIP would apply to version 9. of Tcl. Since 9.* would be a major +release, it should allow for some incompatibilities. + +One incompatibility is that it would require that the use of the null string `""` +or `{}` as an array name would require a change from using $ substituion to using +the 2 argument form of the set command. + +Thus, to assign the variable `""` to a value, would still work for both scalars +and array variables, as in: +``` + set {} foobar ;# scalar variable + set (index) "array value" ;# array variable +``` +But the use of `$(index)` would have to change by using the set command: + +``` + set var [set (index)] +``` + +One other possible incompatibility would be with the use of the subst command. +The issue here is whether `$(...)` would be a command or variable substitution +that subst has options to suppress. + +# Examples + +``` + % lassign {3.0 4.0} a b + % set c $( sqrt($a**2 + $b**2) ) ;# 3 4 5 triangle + 5.0 + + % lassign {1000 3} total number + % puts "ave = $( double($total)/$number )" ;# demo usage inside quotes + ave = 333.333333333 + + .canvas addtag enclosed $($x - 20) $($x + 20) $($y - 20) $($y + 20) + +``` + +# Specification + +TBD + +# Implementation + +TBD + +# Copyright + +This document has been placed in the public domain. + ADDED tip/673.md Index: tip/673.md ================================================================== --- /dev/null +++ tip/673.md @@ -0,0 +1,63 @@ +# TIP 673: Remove deprecated [trace] subcommands + Author: Don Porter + State: Final + Type: Project + Vote: Done + Created: 07-Jun-2023 + Tcl-Version: 9.0 + Tcl-Branch: tip-673 + Vote-Summary: Accepted 5/0/0 + Votes-For: AK, BG, DGP, JN, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes removal of [trace] subcommands deprecated since the +release of Tcl 8.4. + +# Background + +The built-in command [trace] originally empowered Tcl programmers +to manage traces on Tcl variables. Starting in Tcl 8.4, a new +capability was introduced to manage traces on the renaming or +deletion of commands in an interpreter. The [trace] command was +re-architected to be able to manage both kinds of traces, and +was structured to be extensible to other types of traces. This +extensibility was used again before release of Tcl 8.4.0 to introduce +execution traces [62](62.md). + +The original subcommands used to manage variable traces were left in +place, but documentation in all releases Tcl 8.4.0 and later has declared +them to be deprecated and expected to be removed in a future release. + +# Rationale + +A new major release with an interface declared deprecated on day one +is an odd thing. While there might be rare circumstances where a +compelling need can justify it, the usual practice should be that +if an interface is to be removed, the removal should be accomplished +no later than the next major release. In the alternative, if the need for +continuity is so strong as to compel preservation of a deprecated interface +into a new major release, the decision to deprecate needs reconsideration. + +# Specification + +Remove the subcommands **variable**, **vdelete**, and **vinfo** from +the [**trace**] command implementation and documentation. + +# Compatibility + +Any scripts using the removed subcommands will need converting to use +the **trace ... variable** equivalents available in Tcl 8.4.0 and later. + +# Alternatives + +If this TIP fails a TYANNOTT vote, that outcome will be taken as a decision +to take these subcommands out of deprecated status, with appropriate +updates to comments and documentation. + +# Copyright + +This document has been placed in the public domain. ADDED tip/674.md Index: tip/674.md ================================================================== --- /dev/null +++ tip/674.md @@ -0,0 +1,168 @@ +# TIP 674: a new multiple expression command + Author: René Zaumseil + State: Draft + Type: Project + Vote: Pending + Tcl-Version: 9.1 +----- + +# Abstract + +This TIP tries to address some of the `[expr]` command shortcomings. +It was inspired by discussion on [tip-672] and the syntax of the `switch` command. + +# Rationale + +Tcl has already a `expr` command with a special syntax to do mathematical calculations. +Due to the choosen syntax the usage is sometimes cumbersome and it is not possible to change this. +The new command tries to fill this gap. + +# Specification + +The `let` command has the following syntax: + +~~~tcl + let ?-local? { var expr ?var expr? .. } +~~~ + +The command will sucessively set the `var` to the value of the next `expr`. +If `var` is equal `=` then the value of the expr will be appended to the return value of the `let` command. +If the `-local` switch is given then all used `var` are local to the `let` command. + +# Options + +* Allow multiple arguments instead of a single list of +* Use another name instead of `let`. + +* Define some special variable names (p.e. starting with "@") to define internal variables used in later `expr` without polluting the current namespace. + +* Extend, reduce, change or use a totally different syntax to calculate the given `expr` value. + +* Add syntax to deal with vectors, matrix, etc. + +# Discussion + +* aspect@tkchat: + +Multi arg version: + + let a {$x + 20} b {$x - 20} + +Single arg version is fragile because of mistakes with whitespaces: + + let {a $x + 20} + +Only single var on start of version: + + let var expr ?expr? + +* yorick@tcl-core: + +~~~ +I still prefer two separate commands, and names separate from expressions: + let a {$x + 20} b {$x - 20} + .canvas enclosed {*}[calc {$x + 20} {$x - 20} {$y + 20} {$y - 20}] +If the number of arguments supplied to [let] are odd, the last argument could be the unnamed procedure body to evaluate: + set result [let a {$x + 20} b {$x - 20} { + # do stuff with $a and $b + set c something + return {some result} + }] + # a b and c does not exist at this point +~~~ + +* Steve Landers@tcl-core: I don´t like either of them. Why not enhance canvas... + + .canvas enclosed {$x + 20} {$x - 20} {$y + 20} {$y - 20} + + + +# Examples + +* set variable simple case + +~~~tcl + # expr + set x [expr {1+2}] + set y [expr {3*4}] + set z [expr {$x+$y}] + # let + let {x 1+2 y 3*4 z $x+$y} +~~~ + +* use values + +~~~tcl + canvas .c + set x 10 + set y 10 + # = x,y coord + # expr + .c create text [expr {$x+1}] [expr {$y+1}] -text a + # let + .c create text {*}[let {= $x+1 = $y+1}] -a + # = coord list + # expr + .c create text [list [expr {$x+1}] [expr {$y+1}]] -text b + # let + .c create text [let {= $x+1 = $y+1}] -b +~~~ + +* calculations + +~~~tcl + set i 0.5; + # expr + set x [expr {sin($i)}] + set y [expr {cos($i)+$x}] + set z [expr {$x+$y}] + # let + let {x sin($i) y cos($i)+$x z $x+$y} + let { + x sin($i) + y cos($i)+$y + z $x+$y + } +~~~ + +# Implementation + +The real implementation should be done in C. +The following implementation can be seen as proof of concept. +Especially a proper error handling is missing. + +~~~tcl + proc let {args} { + if {[llength $args] == 2} { + lassign $args mySwitch myList + if {$mySwitch ne {-local}} { + error "wrong switch: $mySwitch" + } + } elseif {[llength $args] == 1} { + lassign $args myList mySwitch + } else { + error {wrong #args, should be: let ?-local? "var expr .."} + } + set myRet {} + set myVars {} + foreach {var exp} $myList { + if {$var eq {=}} { + lappend myRet [uplevel 1 expr [list $exp]] + } else { + uplevel 1 set $var \[expr [list $exp]\] + lappend myVars $var + } + if {$mySwitch eq {-local}} { + uplevel 1 unset -nocomplain {*}$myVars + } + } + return $myRet + } +~~~ + +# Discussion + +# Copyright + +This document has been placed in the public domain. + ADDED tip/675.md Index: tip/675.md ================================================================== --- /dev/null +++ tip/675.md @@ -0,0 +1,79 @@ +# TIP 675: Control cursor blinking cycle in Ttk widgets. + Author: Francois Vogel + State: Final + Type: Project + Vote: Done + Vote-Summary: 4/0/0 + Votes-For: BG, SL, FV, KW + Votes-Against: none + Votes-Present: none + Created: 13-Jun-2023 + Tcl-Version: 8.7 + Keywords: Tk, Ttk, cursor, blink + Tk-Branch: tip-675 +----- + +# Abstract + +This TIP adds script-level control on the on and off times of the insertion cursor of Ttk widgets. + +# Rationale + +From time to time people have been requesting control on the blink cycle of the insertion cursor displayed by certain widgets (entry, spinbox, combobox). Tk provides this feature for a very long time, but Ttk currently doesn't. + +See for instance tickets [3531366fff](https://core.tcl-lang.org/tk/tktview/3531366fffffffffffffffffffffffffffffffff) and [c7046ba187](https://core.tcl-lang.org/tk/info/c7046ba187), and in the newsgroup [here](https://groups.google.com/g/comp.lang.tcl/c/Gc75MZiocaY/m/6bR_FUpvAgAJ) and [there](https://groups.google.com/g/comp.lang.tcl/c/1pjqbtcWRnM/m/gZekObTh5fwJ). + +The most wanted feature is to have a mean to switch cursor blinking entirely off, because some people cannot work with blinking cursors. + +# Specification + +New style defaults "-insertontime" and "-insertofftime" can be set, controlling application-wide cursor blinking times in all Ttk widgets. Values are in milliseconds. + +Setting "-insertofftime" to 0 switches blinking off. + +# Example + +
+package require Tk
+pack [ttk::entry .ee]    ; # cursor blinks
+focus -force .ee         ; # see cursor blinking
+ttk::style configure . -insertofftime 0  ; # stop cursor blinking
+
+ +# Alternatives + +## A - Instead of style defaults, get the values from the user preferences + +In ticket [3531366fff](https://core.tcl-lang.org/tk/tktview/3531366fffffffffffffffffffffffffffffffff), and also in [1dc430ad59](https://core.tcl-lang.org/tk/tktview/1dc430ad598bd5bedc8d8c82478ff5c8c8991e8c), it has been proposed to get the on/off times from the platform environment settings (in the window manager). While respecting user's preferences sounds like a good idea, I believe it sets too high a bar. Retrieving the values from Linux environments is not trivial (see the patches in the first mentioned ticket), and I'm afraid maintenance of such code would be cumbersome. Tk doesn't do that either. As a first step at least, I propose not to bother with the platform settings and let users and script programmers to set their values through: + +
+ttk::style configure . -insertofftime myOFFtime -insertontime myONtime
+
+ +## B - Create a new command instead of using a style default + +For instance one could imagine a new subcommand in the "tk" command: + +
+tk ttkinserttimes ?value value?
+
+ +or a new "ttk" command mimicking the behaviour of the "tk" command: + +
+ttk inserttimes ?value value?
+
+ +but I felt more natural to go for a style default just like all of the other defaults Ttk uses. + +# Implementation + +See branch [`tip-675`](https://core.tcl-lang.org/tk/timeline?r=tip-675) + +# Post-vote note + +Following discussion on the [Tcl Core](https://sourceforge.net/p/tcl/mailman/message/37866508/) mailing list, the possibility of overriding the on and off default times with values obtained from the option database (if such values are specified) has been added after the TIP was voted YES. + +# Copyright + +This document has been placed in the public domain. ADDED tip/676.md Index: tip/676.md ================================================================== --- /dev/null +++ tip/676.md @@ -0,0 +1,176 @@ +# TIP 676: An "expr" alternative - "calc" command aliased to "=" + Author: Colin Macleod + State: Draft + Type: Project + Vote: Pending + Tcl-Version: 9.1 + Created: 23-Jun-2023 +----- + +# Abstract + +This TIP proposes adding a new command **calc** which will allow numeric and +boolean calculations to be written in a more compact form than with **expr**. +The `calc` command will evaluate expressions compatibly with `expr` but in +unbraced, presubstituted form. + +It also proposes to make a standard predefined alias of **=** to **calc** +which will permit numeric computations to be written within other +commands in a more compact and natural form than at present, with no +modification to Tcl's parsing rules. + +# Rationale + +Most newcomers to Tcl, and some oldies, find **expr** awkward. The requirement +to brace expressions for safety and performance leads to e.g. a canvas command +with computed coordinates looking like: + + .canvas addtag enclosed [expr {$x - 20}] [expr {$x + 20}] \ + [expr {$y - 20}] [expr {$y + 20}] + +The wiki page +records many suggestions for a more compact syntax, one of +which has also been proposed in TIP 672. This shows that the issue has been a +concern for many years. However all of these proposals involve changing the +basic Tcl parsing rules (the *dodekalogue*), which has a major impact in terms +of extra complexity and backward compatibility. This TIP aims to allow such +inline expressions to be as concise as possible *without* changing Tcl's +parsing rules. The effect will be to allow the canvas command above to be +written as: + + .canvas addtag enclosed [= $x - 20] [= $x + 20] [= $y - 20] [= $y + 20] + +Note that the values of variables (x and y in the example above) will have +been substituted into the expression *before* `calc` is invoked, +`calc` itself does no further substitutions of any kind. + +There are some downsides to this method: + +* String and list arguments and operations cannot be supported, as arbitrary + strings could have values which cause them to be misinterpreted as + operators, parentheses or numbers - + since the quoting around them would be stripped off before `calc` saw them. + +* Lazy evaluation of `&&`, `||` and `?:` would not be possible. + +* The tokens of the expression must all be passed as separate arguments, + e.g. `[= $x - 20]` not `[= $x-20]`. This is necessary to avoid variable + substitutions introducing new syntax elements, and also to avoid shimmering + of numerical values. + +But many uses of `expr` are for simple numeric calculations where these +restrictions do not matter, but brevity is desirable. The standard `expr` +would still be available for use in the more demanding cases. + +An alternative which already exists for inline calculations is to use +operations from the `mathop` namespace in prefix form. However this is rather +obscure to people who are not Tcl experts, and becomes awkward if several +different operators need to be combined. + +# Specification + +The `calc` command will have syntax: + + * ***calc*** **arg** ?**arg arg ...**? + +It will evaluate expressions in a way which is compatible with `expr` with the +following differences: + +* Only numerical and boolean values and operations are supported. + +* No substitutions (variable, command, backslash) will be performed by the + `calc` command. Any variable or other substitutions which are desired + should be done by the usual Tcl means *before* the `calc` command is + invoked, therefore the arguments to `calc` should *not* be braced. + +* Each syntactic token of the expression must be passed as a separate + argument to `calc`, i.e. each numeric or boolean value, each operator + or parenthesis must be separated by spaces. + +The following alias will be predefined: + + interp alias {} = {} calc + +Defining this as an alias will allow any existing code which defines an "=" +command to continue working. However new code can use `[= ]` as a +compact way to make a calculation. + +# Options + +* Concerns were raised on tcl-core that not being able to support lazy + evaluation of `&&`, `||` and `?:` in `calc` could cause confusion. + If this is felt to be a problem, these operators could be excluded from + `calc` altogether, just as they are not included in the `tcl::mathop` + namespace. + +# Discussion + +The first draft of this TIP proposed implementing this functionality as an +option on the `expr` command so that the arguments would be concatenated and +then tokenised as `expr` does. Peter Da Silva pointed out that this would +allow arguments intended as single values to introduce new syntactic elements, +potentially changing the entire meaning of an expression. E.g. + + set b 3/0 + ... + calc $a - $b + => divide by zero! + +To avoid this I decided to require the arguments to be separate tokens, so +that no substitution of values can introduce new syntactic elements. +At the time I thought this might also enable supporting string and list +values, but later realised that it's not that simple. E.g. if the parser sees +"(" it has no way of telling whether this is the start of a parenthesised +subexpression or just a string value that happens to contain "(". + +So it then became clear that this functionality was sufficiently different +from `expr` to make it a separate command. Also when I looked into the `expr` +parsing code I realised that a separate implementation would be more practical. + +At one stage I considered making invoking `calc` with a single argument a +special case, just returning that argument with no parsing or processing. +However this would prevent detecting what could be a common error case - +passing the expression without spaces as can be done with `expr` - so I +concluded it would be unwise. + +# Examples + +Setting a variable: + + set bright [= $red * 0.3 + $green * 0.59 + $blue * 0.11] + set x [= $radius * cos( $angle )] + +Use with an image command: + + my_img put $shade -to [= $left + $i] $top [= $left + $i + 1] $bottom + +# Implementation + +I have written a prototype of this functionality in Tcl, the code is at +. This code uses a simple +"Pratt" parser and generates bytecode which is then run by +tcl::unsupported::assemble . For the real implementation my intention +would be to translate the same code into C. + +I think byte-compilation of `calc` should be possible and worthwhile. +For the normal case where all operators and parentheses are written as +literals and only numeric or boolean values will be substituted at run-time, +it should be possible to do the parsing at compile-time and generate reusable +bytecode. However there would need to be a run-time check that the +substituted values are actually numeric or boolean. E.g. the command + + calc $a - 2 + +would be compiled assuming that $a has a numeric value and therefore the "-" +is a infix subtraction. But if $a should have the value "-" we need to +reparse this as two unary minus operators. Such cases can be expected to be +rare, but do need to be handled. So the compiled bytecode needs to check that +all substituted values are numeric or boolean and fall back to the uncompiled +implementation if this does not hold. I'm not sure how to write this yet but +think it should be possible. Perhaps it would be enough to just run the +bytecode and if it returns an error then somehow fall back to the uncompiled +implementation? + +# Copyright + +This document has been placed in the public domain. ADDED tip/677.md Index: tip/677.md ================================================================== --- /dev/null +++ tip/677.md @@ -0,0 +1,108 @@ +# TIP 677: Constant Variables + Author: Donal Fellows + State: Final + Type: Project + Vote: Done + Created: 29-Jun-2023 + Tcl-Version: 9.0 + Tcl-Branch: tip-677 + Vote-Summary: 4/0/2 + Votes-For: DKF, BG, MC, KW + Votes-Against: + Votes-Present: SL, DGP +----- + +# Abstract + +This TIP proposes a way to define variables as if they were named constants +in Tcl code. + +# Rationale + +While Tcl doesn't need that many constants by comparison with many other +languages, as we can use symbolic names directly (witness how we handle +flags to `open`), there are still the occasional thing where we want to +have a value in a variable that isn't written to again. + +An example of such is where you store a complex regular expression in a +variable in order to give it a more mnemonic name. Rewriting such is going +to be an infrequent action, as it will require reworking all the code that +uses it as well; for the duration of the execution of a procedure or +existence of a namespace, the variable is not to be changed. + +It's possible to effectively make such variables by using a trace to set a +variable back, but that's quite messy. + +The advantage of having a special mechanism for this is that it is much +easier to see the intention on the part of the author of the code that +the value in a variable not be ever modified during the running of the +code. This will also permit more efficient code generation at some point; +a _known_ constant is much more likely to be analysable during the +generation of bytecode (or during any other possible future execution +strategy). + +# Specification + +This TIP proposes a new command, **const** that defines a "constant" +variable in the current scope. It may be used either in a procedure (or +method or lambda) to define a constant variable with local scope, or in a +namespace (or at the top level) to define a constant variable with scope +to that namespace (according to usual variable scoping rules). + + * **const** _varName value_ + +The _varName_ may be a qualified name. If **const** is used with a qualified +name in a procedure, it does not make a local alias to that name. (That is, +**const** does not duplicate **namespace upvar**.) + +The _varName_ must *not* be the name of an array element, even via +**upvar**. Arrays may not contain constant variables by any means. +The result of the **const** command will be the empty string. +The _varName_ may be an alias (**upvar**, **global**, etc) to a variable +in another scope; it is the target of that alias that will become the +constant. + +A constant variable may be read like any other variable (but the bytecode +compiler _may_ replace its use in code with something more efficient). + +A constant variable may not be written to or unset, except if the local +scope or namespace is being deleted. + +Write and unset traces will not fire on failed writes to or unsets of a +constant variable, except (for unset traces only) when the containing scope +is being deleted. The call to **const** on an existing constant will not +fire a write trace, but a call when the variable is not defined will fire a +write trace on the variable if one is defined. + +The variable must not exist prior to **const** creating a constant variable +(unless it is a constant variable; in that case, **const** silently does +nothing). That is, `$varName` must be in a state where it will fail unless it +is a constant. + +## Introspection + +Two **info** subcommands are provided for working with constants: + +* **info consts** ?_pattern_? + + Returns a lists of constants in the current scope, optionally matching + against _pattern_. (It's **info vars** with additional filtering by + whether the variable is a constant.) + +* **info constant** _varName_ + + Returns a boolean value indicating whether the _varName_ resolves to a + variable that is a constant. + +# Known Consequence + +If a constant variable is created in the global namespace, it necessarily +will endure with that value until the interpreter terminates. + +# Implementation + +See the [`tip-677`](tcl/timeline?r=tip-677) branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/678.md Index: tip/678.md ================================================================== --- /dev/null +++ tip/678.md @@ -0,0 +1,49 @@ +# TIP 678: Better API for Detached Treeview Items + Author: Donal Fellows + State: Final + Type: Project + Vote: Done + Created: 07-Sep-2023 + Tcl-Version: 9.0 + Keywords: Tk, Ttk + Tk-Branch: treeview-list-detached +----- + +# Abstract + +This TIP proposes a method for **treeview** widgets for better working +with detached items. + +# Rationale + +One of the features of the **treeview** is that it allows an item to be +_detached_ and then reattached elsewhere, providing a means where chunks of +the tree can be moved around cheaply. However, as +[this Stack Overflow question](https://stackoverflow.com/q/77036665/301832) +hints at, if you lose the IDs of the detached items, there's no way to get +them back. This is at odds with Tk's general principles of discoverability. + +# Specification + +This TIP proposes a new subcommand for **treeview** widgets, +**detached**, for discovering detached items and querying the detached status +of an item. It can be used in two ways: + + 1. _widget_ **detached** + + Returns a list of all detached items of the treeview widget in an arbitrary + order. (The implementation uses the natural iteration order of the internal + hash table mapping from item names to item records.) + + 2. _widget_ **detached** _item_ + + Returns a boolean value that is true when the given _item_ is detached. + +Items are considered to be detached when they have no parent or siblings +_and are not the root item_. (Note that the root item cannot be detached; +this is enforced by existing code.) Items with a detached parent are not +themselves considered to be detached. + +# Copyright + +This document has been placed in the public domain. ADDED tip/679.md Index: tip/679.md ================================================================== --- /dev/null +++ tip/679.md @@ -0,0 +1,91 @@ +# TIP 679: General access to X window properties + Author: Schelte Bron + State: Draft + Type: Project + Vote: Pending + Created: 22-Sep-2023 + Tcl-Version: 8.7 + Tk-Branch: tip-679 + Keywords: tk, window manager +----- + +# Abstract + +This TIP proposes to add a method to the **wm** command to provide general +access to the X properties of a Tk toplevel window. + +# Rationale + +The **wm** command currently provides the possibility to manipulate a +selected set of X window properties through various subcommands. It may be +useful in some situations to be able to set and retreive other properties as +well. For example, to use a global menu (MAC style common menu bar at the +top of the screen) on KDE, it is necessary to set the +\_KDE\_NET\_WM_APPMENU\_SERVICE\_NAME and +\_KDE\_NET\_WM\_APPMENU\_OBJECT\_PATH properties. Currently you would have +to call out to the external **xprop** command to do that. An additional +complication is that these properties must be set on the wrapper window, +that holds the toplevel and the menubar. There is currently no method to +obtain the id of that window from a script. The information can be extracted +from the output of the external **xwininfo** command. But that is fragile; +the output format may change in future versions. It is also inconvenient to +have to instruct users to install the two packages that provide these +external commands. + +# Specification + +This TIP proposes a new subcommand for the **wm** command, **property**. +This subcommand is only available on the x11 windowing system. The new +subcommand is defined as: + + > **wm** **property** _window_ ?_name_? ?_value_? ?_type_? ?_width_? + +When all arguments are provided, the named property will be set to the +specified _value_ of _type_ and _width_. The _type_ argument defaults to +**STRING**. A property can be deleted by specifying a _type_ of **None**. +Valid values for _width_ are 8, 16, and 32. Some types may place further +restrictions on the set of valid widths. When omitted, _width_ defaults to 8 +for the **STRING** and **UTF8_STRING** types, and 32 otherwise. +The form of the _value_ argument depends on the _width_: When _width_ is 8, +the value should be a byte array, as produced by the _binary encode_ or +_encoding convertto_ commands, for example. For a _width_ of 16, it must be +a list of integers. For a _width_ of 32, _value_ is treated as a list of +integers and/or atom names. +When only the _window_ and _name_ arguments are provided, the value of the +property is returned, if set. For 8-bit values, the result is a byte array. +For other values, a list of integers is returned. The **-propertytype** and +**-propertyformat** return options contain the type and width of the +property. +Finally, when just the _window_ argument is present, the command returns the +names of all properties that have been set for the toplevel window. + +# Implementation + +Implementation is available in the +[tip-679](https://core.tcl-lang.org/tk/timeline?r=tip-679) branch of the Tk +repository. + +# Open Questions + + * The format of the value argument and the return value of queries + currently only depend on the width. Should special treatment be aplied + for certain types: ASCII encoding/decoding of **STRING** types, UTF-8 + encoding/decoding of **UTF8_STRING** types, and integer to atom name + conversion when querying **ATOM** types? + + * To prevent corrupting properties that are manupilated using other wm + commands, the command does not allow modifying properties with names + starting with WM\_ or \_NET\_WM\_. Does that perhaps cast too wide a net? + + * Are return options an acceptable method for returning the type and format + of a queried property? An alternative would be to return a list of value, + type, and format. But then the caller would have to extract the value + from that list in the common case where they are just interested in the + value. + + * Should (parts of) the property subcommand be simulated on windowing + systems other than x11? + +# Copyright + +This document has been placed in the public domain. ADDED tip/680.md Index: tip/680.md ================================================================== --- /dev/null +++ tip/680.md @@ -0,0 +1,115 @@ +# TIP 680: Enhance definition of a "number" in Tcl + Author: Brian Griffin + State: Withdrawn + Type: Project + Vote: Pending + Tcl-Version: 9.1 +----- + +# Abstract + +Enhance the core GetInt, GetDouble, GetBoolean implementations to +accept valid `[expr]` expressions, computing and returning the resulting +value on each invocation. + +# Rationale + +In cases where arguments to commands are expected to be numbers, +integer or real, it is not uncommon to have some calculations required +to predetermine the value needed for the command. This is sometimes +written with inline `expr` command substitutions. + + .c create text [expr {$x+1}] [expr {$y+1}] -text a + +It would be nice to make complex lines like the above, easier to read: + + .c create text {$x+1} {$y+1} -text a + +Now the command looks more like other (expression based) programming languages. + +# Specification + +Modify the `Tcl_GetInt()`, etc., by attempting to parse an expression after +failing to parse a valid number. If it fails, then report the normal +invalid number error, otherwise, evaluate the expression, confirm that +the result is a valid number, and return the number or an error as +appropriate. + +The code should also check the `Tcl_ObjType` for an already compiled +expression to short circuit the string parsing steps. + +# Discussion + +From TIP 674: + +* Steve Landers@tcl-core: I don´t like either of them. Why not enhance canvas... + + .canvas enclosed {$x + 20} {$x - 20} {$y + 20} {$y - 20} + + +Gustaf Neumann: + +This is an interesting idea, somewhat similar to the index +expressions, but with the difference that these "number expressions" +could be used everywhere (for all arguments, but also in other +locations, where Tcl_GetInt*() is not meant to parse an argument). The +latter concerns me a little, since it has implications on provided +stack frames for resolving variables etc. For me, the exact +implications are not clear. + +Peter Da Silva: + +You could avoid breaking any existing code or unexpectedly opening up +a new attack surface by using something like the {*} hack. + + .canvas enclosed {$}{$x + 20} {$}{$x - 20} {$}{$y + 20} {$}{$y - 20} + +vs + + .canvas enclosed [expr {$x + 20}] [expr {$x - 20}] [expr {$y + 20}] [expr {$y - 20}] + + +Donal Fellows: + +Now that's a much more sensible suggestion; no unexpected trouble in +scripts because it is currently definitely an error. I guess we'd need +to pick an initial indicator syntax (either {=} or {$} would work). + +Having canvases do falling back to calling Tcl_Expr() on their +coordinate arguments isn't as good; they need to determine (in item +creation particularly) whether an argument is numeric in order to +decide when to stop parsing values as coordinates and start parsing +them as options. It certainly would be possible, but there would be +some weird edge cases and the performance would likely be terrible. + +Colin Macleod: + +This could work (I would prefer {=} to {$} but that's a detail). +However this would require updating the Dodecalogue, so again it's +much deeper change than what I proposed in tip 676. + +Also I think Peter's warning about "opening up a new attack surface" +should be taken seriously. There may be old code which accepts user +input and then uses it in a numeric context without validation. In +the past bad input would just have caused an error. If a new version +of Tcl makes it possible to enter "1/0" or "[puts $::password] ? 2 : +3" and get this run, it will not be popular. + +Brian Griffin: + +Variable scoping and expressions with side effects (e.g. [expr {$a ++[incr y]}] ) are a serious issue. If a command processes arguments +out of order, then side-effects will have unexpected behavior. + +I do not think the attack surface is any different in any of these +solutions. [expr] is another form of [eval], no matter what other new +short-hand syntax is invented. Any code that effectively does an +[eval] on unwashed data is vulnerable. + +I think the side effects issue alone is enough to disqualify TIP #680. + + +# Copyright + +This document has been placed in the public domain. + ADDED tip/681.md Index: tip/681.md ================================================================== --- /dev/null +++ tip/681.md @@ -0,0 +1,55 @@ +# TIP 681: Ttk "size"-related options + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 07-11-2023 + Tcl-Version: 9.0 + Tk-Branch: gripsize + Vote-Summary: Accepted 4/0/0 + Votes-For: FV, JN, KW, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +The Ttk options related to sizes are not always named _size_. This TIP is meant +to make those options consistent. + +# Rationale + +When Tk was made scalable (Thanks to Csaba!), a lot of ttk options changed +from being integers (pixels) to floats (screen units). This work made it +visible that some options were not named consistently. A major Tk +release is a perfect excuse to correct this. + +There is hardly any code around using those options. The only ones I found +were scrollutil and tablelist from tklib (both from Csaba, and already adapted +for this change) and azure-ttk, sum-valley-ttk and ttk-themes (still need to be adapted) + +If you want to make your ttk widgets/styles work for both Tk 8.x and 9.0, the solution +is to provide both options: ttk simply ignores any unknown options. + +So in "ttk-themes", "-gripcount 16" should be changed to "-gripcount 16 -gripsize 24p". +As a bonus, the grip will become scalable in Tk 9.0, while the code still works with Tk 8.6 too. + +# Implementation + +The following options are renamed: +- -gripcount -> -gripsize (for sash items) +- -indicatordiameter -> -indicatorsize (for indicators) +- -diameter -> -size (for treeitem) + +With respect to -gripcount/-gripsize, there's a factor 2 involved, so "-gripcount 5" is +equivalent to "-gripsize 10" (or "-gripsize 7.5p", if you want to make it scalable). +The other options are renamed, nothing more. + +Implementation is in [Tk branch "gripsize"](https://core.tcl-lang.org/tk/timeline?r=gripsize). + +Since this is the first TIP brought into voting state for Tk 9.0, the renumbering +from 8.7 -> 9.0 is also done in the implementation branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/682.md Index: tip/682.md ================================================================== --- /dev/null +++ tip/682.md @@ -0,0 +1,120 @@ +# TIP 682: Create tmp. widget in "option get" call + Author: René Zaumseil + State: Draft + Type: Project + Vote: Pending + Tcl-Version: 8.7 +----- + +# Abstract + +This TIP will allow the "option get" call to return option values of not already existing widgets. +Only the parent widget of the given widget path should exist. + +# Rationale + +Currently it is not possible to get values of not already existing widgets from the option database. +When creating megawidgets or wrapping existing widgets it can be necessary to get option values +before creating an widget. Currently this can be done p.e. with creating an frame widget, get option values, +and destroy the frame widget.i + +The goal of this tip is to extend "option get" for this use case. +Alternatively a new method p.e. "option getnext" (the name is open for discussion) could be used. + +# Examples + +* current "option get" behaviour: + +~~~tcl + % option add *width 10 + % option get . width Width + 10 + % option get .x width Width + bad window path name ".x" + % option get .x.y width Width + bad window path name ".x.y" +~~~ + +* new "option get" behaviour: + +~~~tcl + % option add *width 10 + % option get . width Width + 10 + % option get .x width Width + 10 + % option get .x.y width Width + bad window path name ".x.y" +~~~ + +# Implementation + +The following C-code part from tkoOption.c should be changed. + +Original code: + +~~~c + case OPTION_GET: { + Tk_Window window; + Tk_Uid value; + + if (objc != 5) { + Tcl_WrongNumArgs(interp, 2, objv, "window name class"); + return TCL_ERROR; + } + window = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), tkwin); + if (window == NULL) { + return TCL_ERROR; + } + value = Tk_GetOption(window, Tcl_GetString(objv[3]), + Tcl_GetString(objv[4])); + if (value != NULL) { + Tcl_SetObjResult(interp, Tcl_NewStringObj(value, -1)); + } + break; +~~~ + +New version: + +~~~c + case OPTION_GET: { + Tk_Window window; + Tk_Uid value; + + if (objc != 5) { + Tcl_WrongNumArgs(interp, 2, objv, "window name class"); + return TCL_ERROR; + } + window = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), tkwin); + if (window == NULL) { + Tcl_Obj *res = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(res); + window = Tk_CreateWindowFromPath(interp,tkwin,Tcl_GetString(objv[2]),NULL); + if (window == NULL) { + Tcl_SetObjResult(interp, res); + Tcl_DecrRefCount(res); + return TCL_ERROR; + } + Tcl_DecrRefCount(res); + Tcl_ResetResult(interp); + value = Tk_GetOption(window, Tcl_GetString(objv[3]), + Tcl_GetString(objv[4])); + if (value != NULL) { + Tcl_SetObjResult(interp, Tcl_NewStringObj(value, -1)); + } + Tk_DestroyWindow(window); + } else { + value = Tk_GetOption(window, Tcl_GetString(objv[3]), + Tcl_GetString(objv[4])); + if (value != NULL) { + Tcl_SetObjResult(interp, Tcl_NewStringObj(value, -1)); + } + } + break; +~~~ + + +# Copyright + +This document has been placed in the public domain. + ADDED tip/683.md Index: tip/683.md ================================================================== --- /dev/null +++ tip/683.md @@ -0,0 +1,49 @@ +# TIP 683: Remove legacy "pack" and "scrollbar" syntax + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 17-11-2023 + Tcl-Version: 9.0 + Tk-Branch: tk-legacy + Vote-Summary: 6 / 0 / 0 + Votes-For: AK, DKP, FV, JN, KW, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Tk's "pack" and "scrollbar" commands have a legacy syntax, which is not +supported any more, but it still works in Tk up to 8.7. The code +related to this was never removed. Tk 9.0 is the right time to - finally - +get rid of this outdated code and documentation. + +Also, the "-file" argument of "wish" is removed. + +# Rationale + +In versions of Tk before 4.0, the `scrollbar` `get` and `set` widget commands +had a different form. This old form is not noticeable any more: +
+% .s set
+wrong # args: should be ".s set firstFraction lastFraction"
+
+but if you provide 4 parameters in stead of 2 it still works. + +The `pack` command has 4 old sub-commands (from before Tk 3.3), which +are not in use any more. Those are `after`, `append`, `before`, and `unpack`. +They are documented in the `pack-old.n` manpage, but nowhere else. + +Tk doesn't use this old syntax anywhere any more. Applications shouldn't +use it any more; Any application using it was developed before Tk 4.0! + +The "-file" argument of "wish" has been deprecated since 1994 (Tk 4.0). + +# Implementation + +Implementation is in [Tk branch "tk-legacy"](https://core.tcl-lang.org/tk/timeline?r=tk-legacy). + +# Copyright + +This document has been placed in the public domain. ADDED tip/684.md Index: tip/684.md ================================================================== --- /dev/null +++ tip/684.md @@ -0,0 +1,132 @@ +# TIP 684: Add Support for Touchpad Scrolling to Tk + Author: Marc Culler + State: Final + Type: Project + Vote: Done + Created: 28-11-2023 + Tcl-Version: 8.7 + Tk-Branch: touchpad_events + Vote-Summary: 7 / 0 / 0 + Votes-For: MC,KW,FV,SL,JN,DF,AK + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes to add Tk support for scrolling via the two-finger +gesture with a touchpad. It targets Tk 8.7 and the upcoming Tk 9.0. + +# Background + +Tk has supported mouse wheels since 1998. The design was that a +system-generated event reporting a click of the mouse wheel would be +translated to a modified TkKeyEvent. The type of the TkKeyEvent would +be a Tk-specific value (MouseWheelEvent), and the unsigned integer +keycode field of the TkKeyEvent would be repurposed to hold a signed +delta value. In the original implementation the value used in the +keycode field varied between platforms. + +When it became common for laptops to have touchpads which can +interpret the two-finger scroll gesture, Tk inherited support for that +gesture by default. On all three of the major Tk platforms - Windows, +macOS and linux - the system would report touchpad scroll events by +using the same framework as was used for mouse wheel events. Windows +reports touchpad scroll events with MOUSEWHEEL and HMOUSEWHEEL +messages, but these messages have delta values which are not multiples +of 120. MacOS uses NSScrollWheel events to report touchpad scrolls, +but sets the hasPreciseScrollingDeltas property to YES. Linux sends +Button-4 and Button-5 events for touchpad scrolls. This accidental Tk +support for touchpads did not work great - it was not able to take +advantage of the high precision - but it was usable. + +In 2020, TIP \#563 was passed. The stated purpose of the TIP was to +add a feature which made spinning the mouse wheel while the mouse +pointer was inside a horizontal scrollbar cause horizontal scrolling +to occur. The implementation of the TIP also devoted considerable +effort to uniformizing the MouseWheel bindings across platforms. + +However, the effect of TIP \#563 on Tk's accidental touchpad interface +was overlooked. A two-finger touchpad scroll almost always has +non-zero values for both Δx and Δy. The implementation of TIP \#563 +had the effect that the result of performing a two-finger scroll +gesture while the mouse pointer is in a vertical scrollbar would be to +scroll vertically by Δx + Δy. In particular, when a user was +attempting to slowly scroll downward the actual scrolling could move +in both directions. This problem was reported in ticket +[\[de3bbbcb68\]](https://core.tcl-lang.org/tk/tktview/de3bbbcb68) + +# Rationale + +This TIP proposes to both fix the issue reported in the ticket +mentioned above and to improve Tk by providing deliberate support for +scrolling with the two-finger gesture on a touchpad. + +# Limitations + +The implementation is currently limited to Windows and macOS Aqua. An +X11 implementation using libinput should be possible, but would +require understanding how to incorporate libinput into Tk. Testing +indicates that the undesirable artifacts are less severe in linux. + +# Specification + +The implementation of this TIP adds a new Tk-specific event type named +TouchpadScroll. As with MouseWheelEvent, a TouchpadScroll event +repurposes the TkKeyEvent struct. The event type is set to +TouchpadScroll and the 32 bit keycode field is used to store both Δx +and Δy as signed 16 bit values with Δx in the high order 16 bits and +Δy in the low order 16 bits. + +To facilitate unpacking the delta values the implementation provides a +utility function named `::tk::PreciseScrollDeltas`. It can be used in +a binding script as follows: +
+lassign [tk::PreciseScrollDeltas %D] deltaX deltaY
+
+ +To take full advantage of touchpad scrolling a widget should be able +to scroll at pixel resolution. While this is the case for text and +canvas widgets, there are many other widgets, such as listbox and +treeview, which can only scroll by "units", i.e. lines or +average-width characters. Since touchpad events are generated about 60 +times per second during a scroll gesture, it does not work to scroll +by one unit each time that a TouchpadScroll event is received. In +order to deal with this issue, the serial field of the TkKeyEvent is +used to hold a counter which is incremented each time that a +TouchpadScroll event is generated. This allows a binding script to, +for example, only respond to every 5th TouchpadScroll event by testing +if the counter is divisible by 5. The value of the serial field is +accessible in a binding script via the %# substitution. + +The TIP implementation includes TouchpadScroll event bindings for all +of the standard tk and ttk widgets for which such events are +appropriate. MouseWheelEvent bindings are also included, so these +widgets can be scrolled with either a mouse wheel or a touchpad. + +# Backwards Compatibility + +If the TIP implementation were merged, MouseWheelEvent bindings in +third-party widgets would continue to work as before, provided that +the user is using a mouse wheel. However, the two-finger scroll +gesture would no longer cause MouseWheelEvents to be generated. Hence +these third-party widgets would need to add TouchpadScroll bindings in +order to be scrollable with the two-finger gesture. + +# Implementation + +The implementation of this TIP is in the Tk [touchpad_events](https://core.tcl-lang.org/tk/timeline?r=touchpad_events) branch. + +# Acknowledgements + +This TIP project benefited from contributions from several people +besides the author. Christopher Chavez provided a great deal of +helpful background information about how scrolling works. Csaba +Nemethi provided both feedback and code for the project. Nicolas Bats, +who first reported the scrolling problem, contributed extensive +testing. Thanks to all of them. + + +# Copyright + +This document has been placed in the public domain. ADDED tip/685.md Index: tip/685.md ================================================================== --- /dev/null +++ tip/685.md @@ -0,0 +1,78 @@ +# TIP 685: rename "string is unicode" to "string is transferable" + Author: Harald Oehlmann + State: Final + Type: Project + Vote: Done + Created: 10-01-2024 + Tcl-Version: 8.7 + Tcl-Branch: tip-685 + Vote-Summary: 4 / 2 / 0 + Votes-For: BG, KW, MC, SL + Votes-Against: DP, JN + Votes-Present: none + Obsoleted-By: 652 +----- + +# Abstract + +This TIP proposes to rename "string is unicode" to "string is transferable". + +# Background + +[TIP 597](https://core.tcl-lang.org/tips/doc/trunk/tip/597.md) introduced "string is unicode". Please refer to this TIP for a description. +[TIP 652](https://core.tcl-lang.org/tips/doc/trunk/tip/652.md) proposes to remove this class from the "string is" command. + +On a core list discussion, it was expressed: + + * "string is unicode" may have value + * the class name "unicode" is miss-leading. + * the more appropriate class name "transferable" was proposed. + * a more generic command to get the list of all unicode character classes included in a string may superseed this command. + * the use of the ICU library may be the next step for those tasks. + +# Rationale + +The current class name "unicode" is seen as miss-leading, see [TIP 652](https://core.tcl-lang.org/tips/doc/trunk/tip/652.md). + +The name "transferable" suggests, that the string is tested to be ready for a transfer to an external +resource like a file or data base. + +It is proposed, that this TIP is voted together with [TIP 652](https://core.tcl-lang.org/tips/doc/trunk/tip/652.md). + +# Specification + +Rename: + +
+string is unicode ?-strict? data
+
+ +to + +
+string is transferable ?-strict? data
+
+ +If [TIP 652](https://core.tcl-lang.org/tips/doc/trunk/tip/652.md) is accepted, this TIP is automatically widthdrawn. + +Rename the directly connected C API function +
+Tcl_UniCharIsUnicode
+
+ +to + +
+Tcl_UniCharIsTransferable
+
+ +The manual page adds a phrase like: +"The purpose is to test a string to be transfered to an external resource." + +# Implementation + +The implementation of this TIP is in the Tcl [tip-685](https://core.tcl-lang.org/tcl/timeline?r=tip-685) branch. + +# Copyright + +This document has been placed in the public domain. ADDED tip/686.md Index: tip/686.md ================================================================== --- /dev/null +++ tip/686.md @@ -0,0 +1,86 @@ +# TIP 686: Make NextWord/SelectNextWord behavior platform-independant + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 29-1-2024 + Tcl-Version: 8.7 + Tk-Branch: tip-686 + Vote-Summary: 3 / 0 / 0 + Votes-For: FV, JN, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +The virtual events \<\\>/\<\\> currently +behave in a platform-dependent way. On Windows, invoking those events, +the insert cursor will move to the beginning of the next word. On +UNIX, those events will make the insert cursor move to the end of +the current word, but - if the cursor is already at the end of +a word - it will jump to the end of the next word. + +This TIP proposes the make this behavior platform-independent: +\<\\> will move to the beginning of the next word. +\<\\> will extend the selection to the end of the +current word (or the next one, if the current position is +already at the end of the current word) + +# Rationale + +The current behavior for \<\\> is not 'logical' on UNIX: +In stead of jumping to the next word it actually jumps to the +end of the current word. When traversing words, the behavior +on Windows is more logical: There it actually moves the +insert cursor to the beginning of the next word. + +The current behavior for \<\\> is not 'logical' +on Windows. If you want to select a range of text, the +normal way to do this is use \<\\> to move to the +word you want to begin selecting. Then use \<\\> +if you want to select a single word, use \<\\> +again if you want two words, and so on. Doing this, +will result in the spacing after the words being included +in the selection as well: You need to press \<\\> +(eventually multiple times if there is more than one space). +On UNIX, this use-case works as expected. + +This proposal is the same as currently implemented in +notepad++. It's a compromise between the original +Windows and the original UNIX behavior. But then +(contrary to most compromises) a compromise which +takes the best of both worlds. + +So, let 'W' mean: including the spaces after the word +and 'U' not including those spaces. Then, let's compare with +other editors/viewers: + +``` +| editor |<>|<>| +| -------------- | ---------- | ---------------- | +|Tk 8.6 (windows)| W | W | +|Tk 8.6 (UNIX) | U | U | +|TIP #686 | W | U | +|notepad++ | W | U | +|word/wordpad | W | W | +|nedit (UNIX) | W | W | +|gedit | U | U | +|Adobe Acrobat | U | U | +``` + +Most editors take either the Windows approach, either the UNIX +approach. Notepad++ is the only editor I found which takes +the compromise approach, as in this TIP. + +Nedit takes the Windows approach, even though it is running +on UNIX. Adobe Acrobat reader takes the UNIX approach, even +though it's running on Windows. + +# Implementation + +Implementation is in [Tk branch "tip-686"](https://core.tcl-lang.org/tk/timeline?r=tip-686). + +# Copyright + +This document has been placed in the public domain. ADDED tip/687.md Index: tip/687.md ================================================================== --- /dev/null +++ tip/687.md @@ -0,0 +1,53 @@ +# TIP 687: locale support for word handling in text and entry + Author: Jan Nijtmans + State: Draft + Type: Project + Vote: Pending + Created: 30-1-2024 + Tcl-Version: 9.1 + Tk-Branch: tip-687 + Vote-Summary: + Votes-For: + Votes-Against: + Votes-Present: +----- + +# Abstract + +This TIP proposes to add the `-locale` option to the +text and entry widget and it's derivatives (so ttk and +spinbox as well). This option can be used to change the +algorithm used in virtual events `<>`, +`<>`, `<>`, `<>` +(and it's variants like `<>`). +The locale will be handed to the ICU library, so it +can adapt the char- or word-division algorithm to +the specific locale. + +If the locale is "", the ICU default locale is used. A +special locale "`regexp`" can be used to fall-back to a +locale-independent algorithm, using a regular expression. + +Text tags have the new `-locale` option too. There's +also a new method [`$text locale index`] which can +be used to determine which locale is set for a specific +text index. + +# Rationale + +This TIP started with a [ticket](https://core.tcl-lang.org/tk/tktview/168f3ef130), +requesting to make the word break algorithm switchable: The ICU method of +char-/word-division is designed for natural languages, less for programming +languages. + +The difference can be noted - for example - in the word `aujourd'hui`. With the +ICU algorithm, this is a single word. Using the "`regexp`" locale, it's split +into two parts. + +# Implementation + +Implementation is in [Tk branch "tip-687"](https://core.tcl-lang.org/tk/timeline?r=tip-687). + +# Copyright + +This document has been placed in the public domain. ADDED tip/688.md Index: tip/688.md ================================================================== --- /dev/null +++ tip/688.md @@ -0,0 +1,152 @@ +# TIP 688: clock command revision and speedup + Author: Harald Oehlmann + Author: Sergey G. Brester + State: Final + Type: Project + Vote: Done + Created: 27-02-2024 + Tcl-Version: 8.7 + Tcl-Branch: tip-688 + Vote-Summary: 3 / 0 / 0 + Votes-For: JN, MC, SL + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +Fix low [performance](#performance) of the clock command by a C implementation. +Change some corner cases in free scanning and format preferences. +Add new scan/format tolkens for zone and local seconds. +Add option *-now* to **format** to internalize common **clock seconds** +call. + +# Rationale + +The clock command was seen by FlightAware as critical for server +applications. A bounty was opened. + +Sergey Brester developped a clock command rewrite in C in 2017 to get +FlightAware bounty #4. Since then, the branch is in use at FlightAware. +The branch originated for 8.6 was never merged due to small changes in +the command. The massive speedup by a factor of 15 to 100 can be viewed +[below](#performance) and is documented in this [RFC ticket](https://core.tcl-lang.org/tcl/info/ddc948cff9). + +Sergey decided in this complete rewrite to do some changes as documented in the upper RFC and listed below. + +# Specification + +The main specification item is [**SPEED**](#performance) and lower memory footprint. + +The proposed changes are: + + * clock scan: preference of Gregorian date "%Y%m%d" over Julian date "%Y%j" if both are specified. See this [ticket](http://core.tcl.tk/tcl/tktview?name=e7a722cd35). + Note: this only affects an ambiguous date (if day *%m%d* distinguish from *%j*), so basically only invalid input. + + * Different priority of conflicting free form scan items: result for free scanning by relative date with given month. In the following example, current TCL applies "next 1 January" first", the proposal last. (see note on free form below) + +~~~ + % # FreeScan : relative date with ordinal month (I said January) + % clock scan "5 years 18 months 385 days next 1 January" -base 0 -gmt 1 +-Fri Jul 21 02:00:00 CEST 1978 ++Sat Jan 21 01:00:00 CET 1978 +~~~ + + * Different priority of conflicting free form scan by relative date with given month and relative weekday. (see note on free form below) + +~~~ + % # FreeScan : relative date with ordinal month and relative weekday (I said Fri in January) + % clock scan "5 years 18 months 385 days next January Fri" -base 0 -gmt 1 +-Sat Jul 22 02:00:00 CEST 1978 ++Fri Jan 27 01:00:00 CET 1978 +~~~ + + * additionally scan/format token *%Es* introduced to parse or format local seconds (in opposition to *%s* for posix seconds) + + * two extended tokens: *%EJ* (calendar) and *%Ej* (astronomical) Julian day number with time fraction (as floating point number).
+ (initially provided in [GH/tclclockmod/PR/16](https://github.com/sebres/tclclockmod/pull/16)) + + The format group *%Ej* can be also used to convert float date-times of SQLite database, for example: + +~~~ +% clock format 1514764800 -format %Ej -gmt 1 +2458119.5 +sqlite> select julianday(1514764800, 'unixepoch'); +2458119.5 + +% clock format [clock scan 2458119.5 -format %Ej -gmt 1] -format {%Y-%m-%d %T} -gmt 1 +2018-01-01 00:00:00 +sqlite> select datetime(2458119.5); +2018-01-01 00:00:00 +~~~ + + * value *-now* will be accepted as clock value for format or add functions, e. g. **clock format -now -f %u** + + * new option clock scan ... **?-validate boolean?** (default 0), if 1 it'd check the scanned input and scan will fail by invalid values (like 30 Feb, or 13th month, or 61 minute, etc)
+ (initially provided in [GH/tclclockmod/PR/10](https://github.com/sebres/tclclockmod/pull/10) as a faster, in C-written replacement for tcl'ed variant of [ticket [3475995]](https://core.tcl-lang.org/tcl/info/3475995fffffffff))
+ Examples: + +~~~ +% clock scan "30 February 2018" +1519945200 +% clock scan "30 February 2018" -valid 1 +unable to convert input string: invalid day + +% clock scan "2024-13-01" +1735686000 +% clock scan "2024-13-01" -valid 1 +unable to convert input string: invalid month + +% clock scan "2024-12-01 30:00" +1733007599 +% clock scan "2024-12-01 30:00" -valid 1 +unable to convert input string: invalid time (hour) +~~~ + + * own extensions made in ParseClockFormatFormat, ParseClockScanFormat or DateParseActions are no more effective, as the scanning and formatting is pure C-implementation now + +## Note about free form scan + +The current 8.6.14 manual has the following warning on free form scanning: + +If the **clock scan** command is invoked without a *-format* option, then +it requests a *free-form scan. This form of scan is deprecated.* +The reason for the deprecation is that there are too many ambiguities. +(Does the string **2000** represent a year, a time of day, or a quantity?) +No set of rules for interpreting free-form dates and times has been found +to give unsurprising results in all cases. + +

Performance

+ +Current performance increase (in comparison vs the original clock-ensemble): + +type of clock usage       | performance increase to original         | new clock-engine   | original clock +-------- | -------------------- | ----------- | ------------ +`clock format` | 15 - 20 times faster | 0.27 - 4.28 µs/# | 5.45 - 45 µs/# +`clock scan -format` | 40 - 70 times (up to 100 times faster \*)
\* some previously extremely slow scans | 0.44 - 1.72 µs/# | 21 - 120 µs/# +`clock scan` (freescan) | 15 - 20 times | 0.51 - 5.84 µs/# | 12 - 77 µs/# +`clock add` | 50 - 90 times | 0.31 - 0.68 µs/# | 15 - 45 µs/# + +The difference is much more larger, if the tests are running multi-threaded with parasitic load. + +#### How the performance can be measured: + +Tcl-core has a file [tests-perf/clock.perf.tcl](/tcl/file?name=tests-perf/chan.perf.tcl) which can be used to compare the execution times of original clock and new engine. +It can be also simply performed from the tclsh, using original and new branches.
+Here is a diff illustrating that (which amounted to almost 95x speed-up): + +~~~diff + % timerate -calibrate {} + % clock scan "" -timezone :CET; clock scan "" -gmt 1; # warming up + % timerate { clock scan "2009-06-30T18:30:00 CEST" -format "%Y-%m-%dT%H:%M:%S %z" -gmt 1 } +- 62.0972 µs/# 16094 # 16103.8 #/sec 999.392 net-ms ++ 0.654699 µs/# 1437085 # 1527419 #/sec 940.858 net-ms +~~~ + +# Implementation + +Implementation is in [TCL branch "tip-688"](https://core.tcl-lang.org/tcl/timeline?r=tip-688). + +# Copyright + +This document has been placed in the public domain. ADDED tip/689.md Index: tip/689.md ================================================================== --- /dev/null +++ tip/689.md @@ -0,0 +1,151 @@ +# TIP 689: "namespace unknown" independent on caller namespace + Author: Harald Oehlmann + Author: Jan Nijtmans + Author: Sergey G. Brester + State: Draft + Type: Project + Vote: Pending + Created: 13-03-2024 + Tcl-Version: 8.7 and 9.0 + Tcl-Branch: tip-689 + Vote-Summary: + Votes-For: + Votes-Against: + Votes-Present: +----- + +# Abstract + +[TIP 181](./181.md) introduced *namespace unknown* to call the unknown handler of the caller namespace. +This TIP proposes to call the unknown handler of the namespace, +where the command could not be resolved. + +# Rationale + +A namespace assembles all commands of a package. +The purpose of a procedure registered by *namespace unknown* is to to dynamically handle procs in a namespace which do not exist on initial setup. +One application is auto loading on first use but other dynamic functions are possible. +Currently, this only works, if called from the own namespace. +If called from another namespace, the unknown handler of the other namespace is called. + +This makes this feature unusable, as it is designed to be called from the outside. + +Example: + +~~~ + namespace eval ::t1 { namespace unknown ::u1 } + proc ::u1 args {puts "u1 $args"} + namespace eval ::t2 { namespace unknown ::u2 } + proc ::u2 args {puts "u2 $args"} + % namespace eval ::t1 {::t1::test} + u1 ::t1::test + % namespace eval ::t1 {::t2::test} + u1 ::t2::test +~~~ + +As a demonstration, the TIP implementation also supplies a new ::tcl::clock +unknown handler, replacing the old `tclIndex` method for the `clock` command. + +# Specification + +*namespace unknown* should call the unknown function of the namespace where the proc was not found. + +This changes the upper example to: + +~~~ + % namespace eval ::t1 {::t2::test} + u2 ::t2::test +~~~ + +# Details + + 1. *namespace unknown* will be invoked independently to the current namespace of current frame. + In opposite to [TIP 181](./181.md) even for this call:
+ ` ::A::B::C::D::cmd`
+ if *unknown* handler is set for any of that namespaces. + + 2. The precedence of handler invocation: deepest NS with unknown-handler always wins (regardless from where exactly it was executed), + thereby absolute namspace paths over relative paths. For the case of relative command name, firstly the current namespace and all + parents will be inspected, hereafter if no one handler found, the affected namespaces relative global namespace, + at end the global *::unknown* handler.
+ For instance, for this call:
+ + ~~~ + namespace eval ::A::B { C::D::cmd } + ~~~ + + the order of search for *namespace unknown* handler will be: + + ~~~ + ::A::B::C::D + ::A::B::C + ::A::B + ::A + ::C::D + ::C + :: + ~~~ + + 3. The handler always get an originally supplied command name, which corresponds the command relative the caller frame + (and therefore like by global *::unknown*, relative to `[uplevel {namespace current}]`). + + ~~~ + % namespace eval ::A::B::C { cmd } + = cmd + % namespace eval ::A::B { C::cmd } + = C::cmd + % namespace eval ::A { B::C::cmd } + = B::C::cmd + % ::A::B::C::cmd + = ::A::B::C::cmd + ~~~ + + To obtain real normalized command name inside the handler, one could use something like this (e. g. with *auto_qualify* like global *::unknown* does): + + ~~~ + # fully-qualified command name: + lindex [auto_qualify $cmd [uplevel {namespace current}]] 0 + # fully-qualified command name (without auto_qualify): + regsub -all {(::){2}} [uplevel {namespace current}]::$cmd {::} + # relative command name: + regsub {^(::){1,2}foo::bar(::){1,2}} [uplevel {namespace current}]::$cmd {} + ~~~ + + Suggestion (not a part of this TIP, just as nice to have):
+ For the last (to obtain normalized relative name) one could extend command *namespace tail* like this: + + ~~~ + % namespace tail + namespace tail string ?relative? + % namespace tail ::foo::bar::xxx::yyy ::foo::bar + xxx::yyy + ~~~ + + 4. Like in original implementation of [TIP 181](./181.md), + only the first found *unknown* handler will be invoked. + If logic of code expects to call *unknown* of near parent namespace instead, the handler must do that inside itself, + for example using *tailcall* (to unfold recursion). + + 5. There is a small compatibility issue possibly, because of the precedence matter.
+ For instance:
+ in case of 2 nested namespaces with handlers (`::A::B` and `::A::B::C`), for the call: + + ~~~ + namespace eval ::A::B { C::cmd } + ~~~ + + it'd invoke handler of `::A::B::C` now, where previously it'd rather invoke handler of `::A::B` (since another was not implemented yet).
+ Although a negative impact is hardly believable, because previously it was rather unexpected behaviour. + +# History + +This TIP started as a [bug ticket](https://core.tcl-lang.org/tcl/info/910d67a229fe7f65), +not realizing that there was already a TIP describing the current behavior. + +# Implementation + +Implementation is in [TCL branch "tip-689"](https://core.tcl-lang.org/tcl/timeline?r=tip-689). + +# Copyright + +This document has been placed in the public domain. Index: tip/69.md ================================================================== --- tip/69.md +++ tip/69.md @@ -6,11 +6,11 @@ Type: Project Vote: Pending Created: 16-Oct-2001 Post-History: Discussions-To: news:comp.lang.tcl - Tcl-Version: 9.0 + Tcl-Version: 9.1 ----- # Abstract This document describes various improvements to the existing Tcl hash ADDED tip/690.md Index: tip/690.md ================================================================== --- /dev/null +++ tip/690.md @@ -0,0 +1,123 @@ +# TIP 690: Make "clock scan -valid 1" the default + Author: Jan Nijtmans , Rolf Ade + State: Final + Type: Project + Vote: Done + Created: 20-03-2024 + Tcl-Version: 9.0 + Tcl-Branch: tip-690 + Vote-Summary: Accepted 6/0/0 + Votes-For: AK, FV, JN, MC, KW, SL + Votes-Against: None + Votes-Present: None +----- + +# Abstract + +[TIP 688](./688.md) introduced a new *clock scan -validate 1* option, +which can detect more errors in the string being parsed, in stead of +trying to output a best-guess. This TIP proposes to make *1* the +default. If you don't want that, use *clock scan -validate 0*. + +# Rationale + +The current Tcl *clock scan* command accepts a wide range of strings +as dates which are obviously not a valid date string and does a +"best-guess" for this strings. This is not only true for the so called +"free format scan" but even if the -format option is used. + +Example: + +~~~ + % clock scan 2024-30-40 -format %Y-%m-%d -gmt 1 + 1783641600 + % clock format 1783641600 -format %Y-%m-%d -gmt 1 + 2026-07-10 +~~~ + +This behaviour is rarely useful while validating user input. And is +almost never useful while parsing data formats which include dates. +A common pattern to overcome this *clock scan* behaviour in practise +if not using the "free form scan" is to string compare the original +date string with the result after a round-trip: + +~~~ + set date 2024-30-40 + if {$date ne [clock format [clock scan $date -format %Y-%m-%d -gmt 1] -format %Y-%m-%d -gmt 1]} { + # Not a valid date + } +~~~ + +Since [TIP 688](./688.md) is is possible to use just the +*-validate 1* flag instead. And this works even for the "free format +scan". + +Since "clock scan" is throwing an exception for *some* errors, but +just gives an illogical answer for other situations, this TIP +proposes to throw an exception for all such situations instead. + +Example: + +~~~ + $ tclsh9.0 + % clock scan "feb 30, 2024 12:00" -gmt 1 + unable to convert input string: invalid day +~~~ + +This behaviour change was left out of [TIP 688](./688.md) just to +prevent that the discussion got sidetracked by this behaviour change +from the main propose. The author of TIP 688 itself uses *-validate 1* +as default in his code. + +In the supposed to be rare cases were the current "best-guess" *clock +scan* behaviour is seen as feature this behaviour can be restored with +a local *-validate 0* flag: + +Example: + +~~~ + $ tclsh9.0 + % clock scan 2024-30-40 -format %Y-%m-%d -gmt 1 -validate 0 + 1783641600 +~~~ + +In Tcl 8.6, this command (without `-validate 0`) gives the same answer +`1783641600`, which corresponds to the 1th of March. + +# Specification + +If the *-validate* option is not specified in the *clock scan* command, the value `1` will be assumed. + +Note that the *-validate* option is located inside the (undocumented) ::tcl::unsupported::clock::configure +command. It is likely that this command will be removed in a future Tcl version. + +# Compatibility + +Very probably there is code out which banks on the current *clock +scan* behaviour to work as expected (e.g. splitting a date like +2023-11-03 into integers(!), do arithmetic as add 6 month, concat to +a date string and *clock scan* that). In that cases `-validate 0` +must be used. + +But in much more cases this behaviour change would improve the quality +of existing reasonable code. Since *clock scan* right now raises error +on format error + +Example: + +~~~ + % clock scan 2023-10-ab -format %Y-%m-%d + input string does not match supplied format +~~~ + + +such code has error handling at that places. In this cases the +detection of not valid date strings will just be better. + +# Implementation + +Implementation is in [TCL branch "tip-690"](https://core.tcl-lang.org/tcl/timeline?r=tip-690). + +# Copyright + +This document has been placed in the public domain. ADDED tip/691.md Index: tip/691.md ================================================================== --- /dev/null +++ tip/691.md @@ -0,0 +1,120 @@ +# TIP 691: Setting -profile for tclsh/wish and the "source"/"open" commands. + Author: Jan Nijtmans + State: Draft + Type: Project + Vote: Pending + Created: 21-03-2024 + Tcl-Version: 8.7 and 9.0 + Tcl-Branch: tip-691 + Vote-Summary: + Votes-For: + Votes-Against: + Votes-Present: +----- + +# Abstract + +Tclsh and Wish, and the "source" and "open" commands have no +possibility to set the profile of the channel used to read the file. + +Older UNIX platforms used the ISO8859-1 encoding, while many +older Windows systems use the CP1252 encoding. Starting with +Tcl 9.0 (TIP #587), the default encoding for the source command +is UTF-8. That creates problems for old Tcl scripts, which +were originally written in ISO8859-1 or CP1252: due to the +strict profile such scripts will start throwing an exception +in Tcl 9. As a quick workaround, one possibility would be +to change back the profile to "tcl8", as it was in Tcl 8.x. + +This TIP is meant to provide a syntax for that. + +On systems where the system-encoding was big5 or shiftjis, +it's best to explicitly provide the known encoding. E.g. +
+$ tclsh -encoding shiftjis 
+
+Automatic detection of the encoding is out-of-scope +for this TIP. + +# Rationale + +Example: +
+$ tclsh8.6 my_script.tcl
+
+ +Assume this script is written in ISO8859-1 encoding, but the system +encoding is UTF-8. Then, in Tcl 8.6 this will run fine. In Tcl 9.0 +it will not run any more if there are bytes > 0x7F (unless they +form valid UTF-8 pairs, which is not very likely). + +Best would be to convert "my_scipt.tcl" to UTF-8, then it will +run fine in both Tcl 8.6 and 9.0. But may-be that's not +possible (because the script is on a CDROM, for example) + +Another example: +
+$ tclsh8.6
+source my_scipt.tcl
+
+Same problem. The only way to remedy this is: +
+$ tclsh9.0
+set f [open my_script.tcl]
+fconfigure $f -profile tcl8
+eval [read $f]
+
+This TIP proposes a new syntax: +
+$ tclsh9.0
+source -profile tcl8 my_scipt.tcl
+
+ +Finally +
+$ tclsh9.0
+set f [open my_script.tcl]
+fconfigure $f -profile tcl8
+eval [read $f]
+
+In the new syntax this could be shortened to: +
+$ tclsh8.6
+set f [open my_script.tcl TCL8]
+eval [read $f]
+
+ +# Specification + +The `Tcl_FSEvalFileEx`, `Tcl_GetStartupScript`, `Tcl_SetStartupScript` functions +are modified such that special values `TCL_ENCODING_UTF8_STRICT`, +`TCL_ENCODING_UTF8_REPLACE` or `TCL_ENCODING_UTF8_TCL8` are accepted +as encoding names as well. + +tclsh/wish will get a new *-profile* option, setting the profile +to one of the available profiles. This option cannot be combined +with the *-encoding* option; it only can be used in combination +with the `UTF-8` encoding (which is implicit and the default). + +In addition, the `source` command also gets a new *-profile* which +works exactly the same as the tclsh/wish command-line option. + +Finally the `open` command gets 3 new `access` options (second +form only), `STRICT`, `TCL8` and `REPLACE`. + +Currently one of `RDWR`, `RDONLY` or `WRONLY` is mandatory for +the second form of the `access` options. We don't want to make +it mandatory to specify `{RDONLY TCL8}`, that's why another +change is done making `RDONLY` the default. + +# Implementation + +Implementation is in [TCL branch "tip-691"](https://core.tcl-lang.org/tcl/timeline?r=tip-691). + +There is also a simplified implementation for 8.6 in +[TCL branch "tip-691-for-8.6"](https://core.tcl-lang.org/tcl/timeline?r=tip-691-for-8.6) +where `-profile anyvalue` is just a dummy option, doing nothing. It won't be documented in 8.6. + +# Copyright + +This document has been placed in the public domain. ADDED tip/692.md Index: tip/692.md ================================================================== --- /dev/null +++ tip/692.md @@ -0,0 +1,48 @@ +# TIP 692: Revise Tcl_GetAliasObj, remove Tcl_GetAlias() + Author: Jan Nijtmans + State: Final + Type: Project + Vote: Done + Created: 21-03-2024 + Tcl-Version: 9.0 + Tcl-Branch: tip-692 + Vote-Summary: Accepted 6/0/0 + Votes-For: AK, FV, JN, MC, KW, SL + Votes-Against: None + Votes-Present: None +----- + +# Abstract + +Tcl_GetAliasObj and Tcl_GetAlias() are two functions doing the +same job but with a slightly different interface. No known +extension uses Tcl_GetAlias(), while Tcl_GetAliasObj() was +never extended to Tcl 9's 64-bit environment. This TIP +is meant to remedy that. + +# Rationale + +Let's complete the 64-bit transition for Tcl_GetAliasObj() + +For Tcl_GetAlias() it would be possible to do the same. But +this function is not used anywhere in Tcl, and there is no known +extension using it. + + +# Specification + +Revise Tcl_GetAliasObj() such that it's argcPtr parameter changes from +type "int *" to "Tcl_Size *". Remove Tcl_GetAlias() in Tcl 9.0 +(deprecating it in Tcl 8.6/8.7). + +When an extension is compiled with `-DTCL_8_API`, Tcl_GetAliasObj() +will be usable with both "int *" as "Tcl_Size *" parameter, the same +way as the other functions mentioned in TIP #616. + +# Implementation + +Implementation is in [TCL branch "tip-692"](https://core.tcl-lang.org/tcl/timeline?r=tip-692). + +# Copyright + +This document has been placed in the public domain. ADDED tip/693.md Index: tip/693.md ================================================================== --- /dev/null +++ tip/693.md @@ -0,0 +1,102 @@ +# TIP 693: Restart the changes files + Author: Don Porter + State: Final + Type: Project + Vote: Done + Created: 27-Mar-2024 + Tcl-Version: 8.7 and 9.0 + Vote-Summary: Accepted 8/0/0 + Votes-For: DP, BG, AK, KW, MC, SL, FV, JN + Votes-Against: none + Votes-Present: none +----- + +# Abstract + +This TIP proposes a re-purposing and reformatting of the *changes* file. + +# Background + +Both Tcl and Tk have files named *changes* in the root directory +of their source code distributions. These files have been growing +since at least 1990. The *changes* file in Tcl is one of the largest +files in the distribution. + +New content has been appended to the end of these files. The contents +at the start of the files are some of the oldest contents of Tcl/Tk, +and of least value to any contemporary reader. + +Unlike the recently deleted ChangeLog files (see TIP [663](663.md)), +the maintenance of the *changes* file is not incorporated into the +normal workflow of core developers. This leaves the *changes* file +as a burden of release engineering of increasingly dubious value. + +The formatting of items in the *changes* file has evolved into a set of +single line summaries, duplicating information from the Timelines +available online, with abbrevation that often becomes too cryptic. + +Each release also prompts the creation of a file of Release Notes +which announces the release. This is yet another duplication of +information, but one that uses more flexible structure and achieves +better readability. The Release Notes are available from the +download area on SourceForge, but are not included in the release +itself at all. + +# Rationale + +The release of Tcl/Tk and the experience of Tcl/Tk users will be +improved with a reboot of these files. + +# Specification + +Following the example of the *README* file, the contents of +the changes files will be in Markdown. The file name will +become *changes.md*. + +Each minor release will restart with a new file, with +no content carried over from the prior minor releases (but see below). +The purpose of the file is to summarize differences in the release +compared with the previous minor release, limited to those changes that +have importance to programmers writing programs with the package. + +The intent of the *changes.md* file is to be read by people. Fitness +for automated processing is of secondary importance. The file may +begin with a brief introduction, and the bulk of the file is made of +Markdown lists of items each describing a change of importance to programmers. + +A precise format for each item in the file is not specified. +It is trusted that something workable will arise as we go. It is +advised to aim for something more like the current Release Notes than +the current *changes* entries. Items in the *changes.md* file should +be suitable to transfer to the Release Notes with little or no editing. +Brevity is important, but not to the point of becoming incomprehensible. +Markdown features should be used generously to provide hyperlinks to +TIPs or tickets or online resources where useful. References to illustrative +examples in the test suite are also an option. + +Items should not be dated, and need not be presented in +chronological order. Credit should not be included. The Timelines +and tickets are the place for that. Any change that creates an +incompatibility should be indicated either by a mark or by segregation +into a separate list. + +In an alpha or beta release, the items in the *changes.md* file are edited +to reflect the revised set of changes. The *changes.md* file does not +contain a record of what features appeared in what alpha or beta release. + +In a patch release, the changes new to the patch release are pre-pended +to appear in section(s) at the beginning of the *changes.md* file. This +keeps the most recent, most useful information at the beginning of the file. + +If the same bug is fixed in patch releases of multiple minor release +sequences, the *changes.md* files of those branches may share an item +in common. Branch merging should be able to achieve this without undue +trouble. + +Core developers are encouraged to add items to the *changes.md* file +when they merge a change to the development branch, though it is +recognized it will take time to cultivate these habits. + +# Copyright + +This document has been placed in the public domain. ADDED tip/694.md Index: tip/694.md ================================================================== --- /dev/null +++ tip/694.md @@ -0,0 +1,40 @@ +# TIP 694: Define a definite test environment + Author: chw + State: Draft + Type: Project + Vote: Pending + Created: 2024-04-11 + Tcl-Version: any + Vote-Summary: + Votes-For: + Votes-Against: + Votes-Present: +----- + +# Abstract + +This TIP proposes to establish a defined environment to perform an environment for testing Tcl + +# Background + +Following debates in https://core.tcl-lang.org/tcl/tktview/167e0635db79f05d23d766376f6eed32b1572451 +it becomes obvious that very defined and confined environments for testing +corner cases of Tcl are desperately required. + +# Rationale + +As outlined above, a defined, confined environment for test and verification +with authoritative predication seems helpful in order to reduce discussion, distrust, and anger and to enable progress. + +# Specification + +Nothing can be exactly specified in this TIP for the time being. +However, to fulfill this TIP some defined platform has to be +chosen and agreed upon. Ideally an open source operating system +with suitable tooling due to its potentially eternal availability. +Plus of course the reciproce availability of the test tools +(currently valgrind). + +# Copyright + +This document has been placed in the public domain. Index: tip/86.md ================================================================== --- tip/86.md +++ tip/86.md @@ -4,11 +4,11 @@ State: Draft Type: Project Vote: Pending Created: 08-Feb-2002 Post-History: - Tcl-Version: 8.7 + Tcl-Version: 9.1 Implementation-URL: http://pdqi.com/download/tclline-8.4.9.diff.gz ----- # Abstract