anoved

Jim DeVona [1 ]

Snippets:

[2 ] Here is a benchmark procedure I use as a simple alternative to the bench package for quick timing comparison tests:

#
# Parameters:
#        script, the code to benchmark. Executed in caller's context.
#        iterations, number of times to execute script. Defaults to 1.
#
# Returns:
#        a two-element list reporting the average iteration time to execute script
#        and the total elapsed time in microseconds.
#
proc benchmark {script {iterations 1}} {
        set start   [clock microseconds]
        set average [uplevel 1 [list time $script $iterations]]
        set end     [clock microseconds]
        set total   [expr {$end - $start}]
        return      [list [lindex $average 0] $total]
} 

Recent Projects:

  • Shapetcl [3 ]: A C extension that provides general-purpose read/write access to ESRI shapefiles. API not finalized.
  • arcencode [4 ]: A Tcl implementation of the coordinate list compression algorithm used by MapQuest and Google Maps.
  • Tcl Doctools for BBEdit [5 ]: Syntax highlighting and preview filter for writing doctools markup in BBEdit.

Past Projects:

  • LDTrim [6 ]: LDraw code formatter/prettifier.
  • LDMerge [7 ]: LDraw part library management tool.
  • PreL3P [9 ] [8 ]: LDraw color substitution tool.
  • strpdf [10 ]: Annotated PDF overlay generator (using pdf4tcl).
  • Pascal's Triangle and Binomial Expansion [11 ]: A little mathematical visualization.
  • Starpacker [12 ]: Easily turn Starkits into executables for any platform.
  • tcl_ref [13 ]: Tcl/Tk syntax reference plugin for DuckDuckGo search engine.
  • …and a few other blog posts. [14 ]