<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Russell Standish</title>
    <description>The latest articles on DEV Community by Russell Standish (@highperformancecoder).</description>
    <link>https://dev.to/highperformancecoder</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F56268%2F12b3c894-54c0-438b-bfe8-d601f5080dcb.jpeg</url>
      <title>DEV Community: Russell Standish</title>
      <link>https://dev.to/highperformancecoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/highperformancecoder"/>
    <language>en</language>
    <item>
      <title>Tramp mode not working on emacs 26</title>
      <dc:creator>Russell Standish</dc:creator>
      <pubDate>Tue, 18 Sep 2018 23:32:51 +0000</pubDate>
      <link>https://dev.to/highperformancecoder/tramp-mode-not-working-on-emacs-26-5095</link>
      <guid>https://dev.to/highperformancecoder/tramp-mode-not-working-on-emacs-26-5095</guid>
      <description>

&lt;p&gt;On a recent upgrade to emacs, I discovered that remote editing of files via tramp stopped working. This bugged me a lot, as I use it a lot. After much Googling (much), I came across a workaround using sshfs, which allows mounting a remote ssh connection as an fuse mount point.&lt;/p&gt;

&lt;p&gt;But the real reason why tramp stopped working is that now an extra “method” parameter is required in the tramp string, eg&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
^X^F /ssh:remote:file&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can abbreviate ssh to ‘-‘ if you have not changed the defaults too much.&lt;/p&gt;

&lt;p&gt;A nice additional feature is the su and sudo methods, eg&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
^X^F /sudo:/etc/passwd&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;See &lt;a href="https://www.masteringemacs.org/article/whats-new-in-emacs-26-1"&gt;What’s new in emacs 26.1&lt;/a&gt; (search for “tramp”).&lt;/p&gt;


</description>
      <category>emacs</category>
      <category>remoteediting</category>
      <category>tramp</category>
      <category>angeftp</category>
    </item>
    <item>
      <title>Making the web great again</title>
      <dc:creator>Russell Standish</dc:creator>
      <pubDate>Sat, 03 Feb 2018 04:37:57 +0000</pubDate>
      <link>https://dev.to/highperformancecoder/making-the-web-great-again-dde</link>
      <guid>https://dev.to/highperformancecoder/making-the-web-great-again-dde</guid>
      <description>

&lt;p&gt;After a number of years getting increasingly frustrated at how slow websites were on my phone, I finally bit the bullet and &lt;strong&gt;disabled Javascript&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I mostly use my phone to read news websites/aggregator such as slashdot, which are text heavy. Javascript really only serves the useless function of serving ads, which I don’t read. I really only kept Javascript on because many sites do not work properly without it.&lt;/p&gt;

&lt;p&gt;When I open up slashdot with Javascript disabled, I get the message:&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
It looks like your browser doesn't support Javascript or it is disabled. Please use the desktop site instead.&lt;br&gt;
&lt;/code&gt;&lt;br&gt;&lt;br&gt;
The link to the desktop site just takes you back to the same address, but in the web browser (using just the standard Android browser, as Chrome is rather heavy weight), there is the option “Desktop view”. Setting this now takes one to the desktop version of the Slashdot website. And apart from having to zoom in a bit to be able to read the text, load times are, well, blisteringly fast. Pages load in seconds, rather than minutes. And no more browser crashes. Bliss!!!!&lt;/p&gt;

&lt;p&gt;So I’m going all retro, and reading the web like its 1996. And it is so much better!&lt;/p&gt;


</description>
      <category>javascript</category>
      <category>heavywebsites</category>
    </item>
    <item>
      <title>Cross-compiling openSUSE build service projects</title>
      <dc:creator>Russell Standish</dc:creator>
      <pubDate>Tue, 24 Oct 2017 03:33:21 +0000</pubDate>
      <link>https://dev.to/highperformancecoder/cross-compiling-opensuse-build-service-projects-58f5</link>
      <guid>https://dev.to/highperformancecoder/cross-compiling-opensuse-build-service-projects-58f5</guid>
      <description>

&lt;p&gt;I recently needed to debug one of my OBS projects that was failing on the ARM architecture. Unfortunately, my only ARM computer (a Raspberry Pi) was of a too-old architecture to run the OBS toolset directly – the Raspberry was armv6l, and I needed armv7l.&lt;/p&gt;

&lt;p&gt;After poking around a lot to figure out how to run OBS as a cross compiler, I eventually had success. These are my notes, which refer to doing this on an OpenSUSE Tumbleweed system on a 64 bit Intel CPU.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install the emulator&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
zypper install qemu&lt;br&gt;
zypper install build-initvm-x86-64&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enable binfmt support for ARM (allows the running of ARM executable on x86_64 CPUs)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
cat &amp;gt;/etc/binfmt.d/arm.conf &amp;lt;&amp;lt;EOF&lt;br&gt;
:arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:&lt;br&gt;
\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff&lt;br&gt;
:/usr/bin/qemu-arm-binfmt:P&lt;br&gt;
:armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2&lt;br&gt;
8:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\x&lt;br&gt;
ff:/usr/bin/qemu-armeb-binfmt:P&lt;br&gt;
EOF&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;restart the binfmt service&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;systemctl restart systemd-binfmt&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;run osc build using:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
osc build --alternative-project=openSUSE:Factory:ARM standard armv7l ecolab.spec&lt;br&gt;
&lt;/code&gt;&lt;br&gt;&lt;br&gt;
This will fail, because it can’t run the ARM executables.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;copy the qemu-arm-binfmt executable into the build root&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
cp /usr/bin/qemu-arm-binfmt /var/tmp/build-root/standard-armv7l/usr/bin&lt;br&gt;
&lt;/code&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;rerun the osc build command above. It will complain that the built root is corrupt. Do not clean the build root, but just type continue.&lt;/li&gt;
&lt;/ol&gt;


</description>
      <category>opensusebuildservice</category>
      <category>crosscompilation</category>
    </item>
    <item>
      <title>How to build a Macintosh executable that will run on older versions of MacOSX.</title>
      <dc:creator>Russell Standish</dc:creator>
      <pubDate>Mon, 13 Mar 2017 06:30:26 +0000</pubDate>
      <link>https://dev.to/highperformancecoder/how-to-build-a-macintosh-executable-that-will-run-on-older-versions-of-macosx-k1p</link>
      <guid>https://dev.to/highperformancecoder/how-to-build-a-macintosh-executable-that-will-run-on-older-versions-of-macosx-k1p</guid>
      <description>&lt;p&gt;This took me a good day of drilling into MacOSX, with a paucity of appropriate advice on the internet, which is why I’m writing this post.&lt;/p&gt;

&lt;h2&gt;
  
  
  -mmacosx-version-min compiler flag
&lt;/h2&gt;

&lt;p&gt;The first hint is to use the -mmacosx-version-min compiler flag, which takes values like 10.9 (for Mavericks) or 10.12 (for Sierra). If you are compiling everything from self-contained source code, it suffices to add this compiler flag to your CFLAGS variable, and build away. I discovered by experimentation that Mavericks was about the earliest OSX that support the C++11 standard library.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking the minimum version of an executable or library
&lt;/h2&gt;

&lt;p&gt;Use otool -l &lt;em&gt;executable or library&lt;/em&gt; and then look for the tag LC_VERSION_MIN_MACOSX&lt;/p&gt;

&lt;h2&gt;
  
  
  MACOSX_DEPLOYMENT_TARGET environment variable
&lt;/h2&gt;

&lt;p&gt;If you don’t specify the above compiler flag, then the clang compiler will examine the value of the MACOSX_DEPLOYMENT_TARGET environment variable, and use that the target of the compiler. This is useful as a way of setting the deployment target without editing a bunch of files (say you’re compiling a bunch of 3rd party libraries).&lt;/p&gt;

&lt;p&gt;If the environment variable not set, then the current OSX release version is used.&lt;/p&gt;

&lt;h2&gt;
  
  
  MacPorts
&lt;/h2&gt;

&lt;p&gt;The problem with MacPorts is that it overrides the MACOSX_DEPLOYMENT_TARGET and sets it to your current machine’s value.&lt;br&gt;&lt;br&gt;
After a lot of browsing of the TCL scripts that MacPorts used, I found that you can add it as a configuration option to /opt/local/etc/macports/macports.conf&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;macosx\_deployment\_target 10.9 buildfromsource always
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The second option is required to prevent macports downloading prebuilt binary packages.&lt;/p&gt;

&lt;p&gt;Final tip is if you have already built some packages before setting the above options, then you can rebuild the ports via&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;port upgrade --force installed
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>mac</category>
    </item>
    <item>
      <title>Saying goodbye to Aegis</title>
      <dc:creator>Russell Standish</dc:creator>
      <pubDate>Mon, 20 Jun 2016 02:16:39 +0000</pubDate>
      <link>https://dev.to/highperformancecoder/saying-goodbye-to-aegis-1fog</link>
      <guid>https://dev.to/highperformancecoder/saying-goodbye-to-aegis-1fog</guid>
      <description>&lt;p&gt;After nearly 16 years, I am now saying a long farewell the the Aegis source code management system (&lt;a href="http://aegis.sf.net"&gt;http://aegis.sf.net&lt;/a&gt;). Aegis was, in its day, years ahead of its time. But now, with Aegis’s author dead, and only a handful of stalwarts promoting and maintaining Aegis, it is time to look for a replacement. After now more than 18 months of using git and github in anger, I think I finally have have an SCM that is up to the job. On the plus side, Github’s enormous developer community, and fork/pull request model means that people are more likely to contribute. Whilst Aegis has something similar, the reality is very few people will bother to download and install Aegis, so you’re left implementing clunky workflows combining multiple SCMs. More than once, the heterogenous repositories lead to code regressions.&lt;/p&gt;

&lt;p&gt;The biggest hurdle was how to handle continuous integration, a feature Aegis had from its inception. After a considerable learning curve, I found a solution in terms of TravisCI, which integrates quite nicely with Github. Then I needed something to replace the versioning workflow I had with Aegis. After studying Gitflow, I realised it was pretty close to what I was doing with Aegis, so I have implemented a versioning workflow using a script “makeRelease.sh” that uses the git tag feature to add version numbers, and added a dist target to the Makefile to create clean tarballs of a particular version.&lt;/p&gt;

&lt;p&gt;I’m changing things slightly, though. Whereas Aegis branch numbers bear no relation to delta numbers, so branch ecolab.5.32 is actually incremental work on top of ecolab release 5.D29, with my new workflow, branches and deltas will be identical. Release 5.32.1 will be an incremental beta release on ecolab.5.32. Also to indicate that the new system is in place, Aegis’s delta numberings (D in final place) are gone, and versions will be purely numeric.&lt;/p&gt;

&lt;p&gt;You can check out the new stuff in the github repositories, &lt;a href="https://github.com/highperformancecoder/minsky"&gt;https://github.com/highperformancecoder/minsky&lt;/a&gt; and &lt;a href="https://github.com/highperformancecoder/ecolab"&gt;https://github.com/highperformancecoder/ecolab&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>scm</category>
    </item>
    <item>
      <title>Living la vida Hackintosh</title>
      <dc:creator>Russell Standish</dc:creator>
      <pubDate>Tue, 04 Aug 2015 04:47:27 +0000</pubDate>
      <link>https://dev.to/highperformancecoder/living-la-vida-hackintosh-19dn</link>
      <guid>https://dev.to/highperformancecoder/living-la-vida-hackintosh-19dn</guid>
      <description>&lt;p&gt;Like many, I make a living from open source software development, which I develop on Linux, but then build on Windows and Macintosh. I do have a Mac, a rather cute Mac mini, which is a cost effective way of owning the platform, however it does have a couple of disadvantages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I need to test my software on a minimally installed user machine, not my developer machine, to ensure I have bundled all the necessary dynamic libraries required for my software to run.&lt;/li&gt;
&lt;li&gt;I need to build a 32 bit version of the software for maximum compatibility, whereas my Mac mini is 64 bits&lt;/li&gt;
&lt;li&gt;I’d like to have my Macintosh environment with me when travelling, without having to throw the mac mini in my suitcase, along with montor, keyboard etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Yes, I know, I could buy a Mac laptop, but I don’t particularly like MacOS for my development environment, so it would still be an extra piece of hardware to throw into the suitcase.&lt;/p&gt;

&lt;p&gt;The answer to all of these questions is to load MacOSX onto a Virtual Machine, such as Oracle’s Virtual Box, available as Freeware. Initially, I loaded the MacOSX Snow Leopard distribution provided with my Mac Mini into Virtual Box. This worked on some versions of Virtual Box, but not others, so I was constantly having to ignore the pleading to upgrade Virtual Box. Then I discovered I could run the Vbox image on my main Linux computer, provided I didn’t need to boot it, as MacOSX checks that it is running on genuine hardware at boot time only. This was a great liberation – I could now do the Macintosh portioon of my work from the comfort of my linux workstation.&lt;/p&gt;

&lt;p&gt;Then, unfortunately, upgrades happened – both the Mac Mini to Yosemite, and my Linux machine to OpenSUSE 13. With the upgrades, Virtual Box also neeeded to be upgraded, with the result that the VMs would only run on the Mac Mini. Unhappy day.&lt;/p&gt;

&lt;p&gt;But now I have discovered the iBoot tool from Tony Mac &lt;a href="http://www.tonymacx86.com"&gt;http://www.tonymacx86.com&lt;/a&gt;. This great tool allows one to install a “Hackintosh”, Macintosh operating system running on a virtual machine anywhere – exactly what I need. Whilst Apple seem to take a dim view towards people running their software on virtual machines – really that is exactly what I need to do, and all other alternatives don’t cut the mustard.&lt;/p&gt;

&lt;p&gt;To get iBoot to work took a little bit of getting used. The most important points were:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ensure EFI boot is disabled. Virtual Box will enable it by default if you tell it you’re loading MacOSX.&lt;/li&gt;
&lt;li&gt;Other settings to be selected are PA/NX, VT-x/AMD-V and Nested Paging&lt;/li&gt;
&lt;li&gt;Under display, select 3D acceleration, and about 20MB of video memory&lt;/li&gt;
&lt;li&gt;Make sure the SATA type is AHCI&lt;/li&gt;
&lt;li&gt;The other item that really tripped me up was getting the correct version of iBoot. Initially, I downloaded iBoot-3.3.0, which did not work. What I had to do was consult my processor information in /proc/cpuinfo, which told me:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Then I looked up Intel chips on Wikipedia, and found that chip’s model number on the “Haswell” page. So I needed to download iBoot-Haswell-1.0.1, which did the trick.&lt;/p&gt;

&lt;p&gt;With the iBoot.iso file, put it into your virtual DVD drive, and boot up your virtual machine. If you already have MacOSX installed in your VM, you can use the right arrow key to select it and boot it. Since that is the situation I found myself in, that is what I did. However, if you don’t, you just replace the iBoot.iso image with a MacOSX install disk, and boot that instead.&lt;/p&gt;

&lt;p&gt;That’s it. I’m now in the processing of cloning one of my VMs and upgrading it to Yosemite! Wish me luck.&lt;/p&gt;

</description>
      <category>mac</category>
      <category>hackintosh</category>
      <category>vm</category>
    </item>
    <item>
      <title>Regression test coverage analysis in TCL</title>
      <dc:creator>Russell Standish</dc:creator>
      <pubDate>Tue, 25 Nov 2014 05:38:09 +0000</pubDate>
      <link>https://dev.to/highperformancecoder/regression-test-coverage-analysis-in-tcl-25eo</link>
      <guid>https://dev.to/highperformancecoder/regression-test-coverage-analysis-in-tcl-25eo</guid>
      <description>

&lt;p&gt;If you’re like me, you like having lots of regression tests to keep you covered from making stupid mistakes when hacking up some complicated piece of code. Whilst code coverage tools exist for the major development enviroments, one major blind spot is how do do coverage analysis of TCL, which becomes a problem when your application (eg &lt;a href="http://minsky.sf.net"&gt;Minsky&lt;/a&gt;) starts to sport a significant amount of application logic in TCL.&lt;/p&gt;

&lt;p&gt;A quick Google indicated that you could buy into the Active TCL way of doing things (not so useful for me), or use and application called &lt;a href="https://sourceforge.net/projects/nagelfar"&gt;Nagelfar&lt;/a&gt;. Unfortunately, Nagelfar really assumes you are coding in a standard environment, such as wish or tclsh, not in an application scripting environment such as Minsky or &lt;a href="http://ecolab.sf.net"&gt;EcoLab&lt;/a&gt;. Then the realisation I could do it fairly simply in TCL. Well I did have a few false turns which took its time, but I found I could attach a command to fire on every step executed in TCL. Then I peek into the immediately enclosing stack frame to look at details such as which line I’m executing, and save these to a database. Since I’m doing this in the EcoLab environment, I make use of the cachedDBM class to accumulate executaion counts as their found. Finally, I write a C++ program that reads in a TCL file, identifies which proc I’m in and checks whether an entry for the proc, or for the file line number is in the database, and produces output not unlike gcov, with ### indicating a line that wasn’t executed.&lt;/p&gt;

&lt;p&gt;The C++ code is called tcl-cov, and is currently located in Minsky’s test directory, although I’m considering moving it to the ecolab utilities directory.&lt;/p&gt;

&lt;p&gt;The TCL code to be added to the main application? Here is is:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight tcl"&gt;&lt;code&gt;&lt;span class="k"&gt;proc&lt;/span&gt; attachTraceProc &lt;span class="p"&gt;{&lt;/span&gt;namesp&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    foreach p &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;info&lt;/span&gt; commands &lt;span class="nv"&gt;$namesp&lt;/span&gt;*&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        if &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt; ne &lt;span class="s2"&gt;"::traceProc"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            trace add execution &lt;span class="nv"&gt;$p&lt;/span&gt; enterstep traceProc
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    # recursively process child namespaces
    foreach n &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;namespace&lt;/span&gt; children &lt;span class="nv"&gt;$namesp&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        attachTraceProc &lt;span class="nv"&gt;${n}&lt;/span&gt;::
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;`

&lt;span class="c1"&gt;# check whether coverage analysis is required  &lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;info&lt;/span&gt; exists env&lt;span class="p"&gt;(&lt;/span&gt;MINSKY&lt;span class="se"&gt;\_&lt;/span&gt;COV&lt;span class="p"&gt;)]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
# trace add execution proc leave enableTraceProc  
 proc traceProc &lt;span class="p"&gt;{&lt;/span&gt;args&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
 array set frameInfo &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;info&lt;/span&gt; frame -2&lt;span class="p"&gt;]&lt;/span&gt;  
 if &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;$frame&lt;/span&gt;Info&lt;span class="p"&gt;(&lt;/span&gt;type&lt;span class="p"&gt;)&lt;/span&gt;==&lt;span class="s2"&gt;"proc"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
 minsky.cov.add &lt;span class="nv"&gt;$frame&lt;/span&gt;Info&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;proc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;$frame&lt;/span&gt;Info&lt;span class="p"&gt;(&lt;/span&gt;line&lt;span class="p"&gt;)&lt;/span&gt;  
 &lt;span class="p"&gt;}&lt;/span&gt;  
 if &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;$frame&lt;/span&gt;Info&lt;span class="p"&gt;(&lt;/span&gt;type&lt;span class="p"&gt;)&lt;/span&gt;==&lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
 minsky.cov.add &lt;span class="nv"&gt;$frame&lt;/span&gt;Info&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;$frame&lt;/span&gt;Info&lt;span class="p"&gt;(&lt;/span&gt;line&lt;span class="p"&gt;)&lt;/span&gt;  
 &lt;span class="p"&gt;}&lt;/span&gt;  
 &lt;span class="p"&gt;}&lt;/span&gt;  
# open coverage database, and set cache size  
 minsky.cov.init &lt;span class="nv"&gt;$env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;MINSKY&lt;span class="se"&gt;\_&lt;/span&gt;COV&lt;span class="p"&gt;)&lt;/span&gt; w  
 minsky.cov.max&lt;span class="se"&gt;\_&lt;/span&gt;elem 10000  
# attach trace execuation to all created procs  
 attachTraceProc ::  
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The name of the coverage database is passed in via the MINSKY_COV environment variable. minsky.cov.add is a command for adding 1 to the counter for file/line, or proc/line as appropriate. The traceProc command is attached to all defined procs, which requires walking through all namespaces, hence the recursive call into attachTraceProc (which starts in global namespace ::).&lt;/p&gt;

&lt;p&gt;That’s it! Enjoy.&lt;/p&gt;


</description>
      <category>tcl</category>
      <category>tdd</category>
      <category>testcoverage</category>
    </item>
  </channel>
</rss>
