Skip to content
Tcl Source Code History Of Ticket 0d2bcd9544
Login

History Of Ticket 0d2bcd9544

Artifacts Associated With Ticket 0d2bcd9544

  1. Ticket change [af2f9a7cd3] (rid 136448) by anonymous on 2014-01-12 00:21:31:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      ~ Prototype
      
      lgroup listIn lengthOfSublist ?stepForward?
      
      stepForward defaults to $lengthOfSublist
      
      ~ Example
      
      set l {a b c d e f g h}
      lgroup $l 4 # {a b c d} {e f g h}
      lgroup $l 3 # {a b c} {d e f} {g h}
      lgroup $l 1 # a b c d e f g h
      lgroup $l -1 # error
      lgroup $l 3 2 # {a b c} {c d e} {e f g} {g h}
      lgroup $l 2 3 # {a b} {d e} {g h}
      
      ~ Usefulness
      
      This can be used to rearrange results returned by SQLite3.
      
      ~ Incomplete implementation
      
      Since I just use it to process what SQLite3 returns, I have ignored the "stepForward". I think rewrite it in C will speed it up. I didn't check whether $lengthOfSublist equals to zero.
      
      proc lgroup {listIn lengthOfSublist} {
      	set i 0
      	foreach it $listIn {
      		lappend tmp $it
      		if {[llength $tmp] == $lengthOfSublist} {
      			lappend result $tmp
      			set tmp {}
      		}
      		incr i
      	}
      	if {[expr [llength $listIn] % $lengthOfSublist] != 0} {
      		lappend result $tmp
      	}
      	return $result
      }
      
    5. is_private initialized to: "0"
    6. login: "anonymous"
    7. priority initialized to: "5 Medium"
    8. private_contact initialized to: "c1589a2fa4fc7951c4aba10439d3b95af55c3a63"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "anonymous"
    13. subsystem initialized to: "- New Builtin Commands"
    14. title initialized to: ""lgroup" to regroup a list"
    15. type initialized to: "RFE"
  2. Ticket change [a439b40204] (rid 136449) by anonymous on 2014-01-12 00:42:44:

    1. comment changed to:
      ~ Prototype
      
      lgroup listIn lengthOfSublist ?stepForward?
      
      stepForward defaults to $lengthOfSublist
      
      ~ Example
      
      set l {a b c d e f g h}
      lgroup $l 4 # {a b c d} {e f g h}
      lgroup $l 3 # {a b c} {d e f} {g h}
      lgroup $l 1 # a b c d e f g h
      lgroup $l 0 # {}
      lgroup $l -1 # error
      lgroup $l 3 2 # {a b c} {c d e} {e f g} {g h}
      lgroup $l 2 3 # {a b} {d e} {g h}
      
      ~ Usefulness
      
      This can be used to rearrange results returned by SQLite3.
      
      ~ Incomplete implementation
      
      Since I just use it to process what SQLite3 returns, I have ignored the "stepForward". I think rewrite it in C will speed it up. I didn't check whether $lengthOfSublist is a negative number or zero.
      
      proc lgroup {listIn lengthOfSublist} {
      	set i 0
      	foreach it $listIn {
      		lappend tmp $it
      		if {[llength $tmp] == $lengthOfSublist} {
      			lappend result $tmp
      			set tmp {}
      		}
      		incr i
      	}
      	if {[expr [llength $listIn] % $lengthOfSublist] != 0} {
      		lappend result $tmp
      	}
      	return $result
      }
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  3. Ticket change [5de3b8b891] (rid 136451) by anonymous on 2014-01-12 00:58:21:

    1. comment changed to:
      ~ Prototype
      
      lgroup listIn lengthOfSublist ?stepForward?
      
      stepForward defaults to $lengthOfSublist
      
      ~ Example
      
      set l {a b c d e f g h}
      lgroup $l 4 # {a b c d} {e f g h}
      lgroup $l 3 # {a b c} {d e f} {g h}
      lgroup $l 1 # a b c d e f g h
      lgroup $l 0 # {a b c d e f g h}
      lgroup $l -1 # error
      lgroup $l 3 2 # {a b c} {c d e} {e f g} {g h}
      lgroup $l 2 3 # {a b} {d e} {g h}
      
      ~ Usefulness
      
      This can be used to rearrange results returned by SQLite3.
      
      ~ Incomplete implementation
      
      Since I just use it to process what SQLite3 returns, I have ignored the "stepForward". I think rewrite it in C will speed it up. I didn't check whether $lengthOfSublist is a negative number or zero.
      
      proc lgroup {listIn lengthOfSublist} {
      	set i 0
      	foreach it $listIn {
      		lappend tmp $it
      		if {[llength $tmp] == $lengthOfSublist} {
      			lappend result $tmp
      			set tmp {}
      		}
      		incr i
      	}
      	if {[expr [llength $listIn] % $lengthOfSublist] != 0} {
      		lappend result $tmp
      	}
      	return $result
      }
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  4. Ticket change [8737ac1288] (rid 136452) by dkf on 2014-01-12 21:56:37:

    1. assignee changed to: "dkf"
    2. comment changed to:
      ~ Prototype
      
      lgroup listIn lengthOfSublist ?stepForward?
      
      stepForward defaults to $lengthOfSublist
      
      ~ Example
      
      set l {a b c d e f g h}
      lgroup $l 4 # {a b c d} {e f g h}
      lgroup $l 3 # {a b c} {d e f} {g h}
      lgroup $l 1 # a b c d e f g h
      lgroup $l 0 # {a b c d e f g h}
      lgroup $l -1 # error
      lgroup $l 3 2 # {a b c} {c d e} {e f g} {g h}
      lgroup $l 2 3 # {a b} {d e} {g h}
      
      ~ Usefulness
      
      This can be used to rearrange results returned by SQLite3.
      
      ~ Incomplete implementation
      
      Since I just use it to process what SQLite3 returns, I have ignored the "stepForward". I think rewrite it in C will speed it up. I didn't check whether $lengthOfSublist is a negative number or zero.
      
      proc lgroup {listIn lengthOfSublist} {
      	set i 0
      	foreach it $listIn {
      		lappend tmp $it
      		if {[llength $tmp] == $lengthOfSublist} {
      			lappend result $tmp
      			set tmp {}
      		}
      		incr i
      	}
      	if {[llength $listIn] % $lengthOfSublist} {
      		lappend result $tmp
      	}
      	return $result
      }
      
    3. icomment:
      Don't worry about getting performance or the C implementation. Worry about <i>why</i> and <i>what</i> (i.e., a clear justification for this command and an exact specification of the behaviour).
      
    4. login: "dkf"
    5. mimetype: "text/html"
    6. username: "dkf"
  5. Ticket change [2215ec6652] (rid 136460) by dkf on 2014-01-13 19:40:17:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. subsystem changed to: "17. Commands I-L"
  6. Ticket change [d14c74aa62] (rid 145210) by anonymous on 2016-03-06 15:25:17:

    1. closedate changed to: "2457454.14256604"
    2. closer changed to: "anonymous"
    3. icomment:
      I'm the reporter. Since this is not quite appropriate for the Tcl core, I'm closing this ticket.
      
    4. login: "anonymous"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"