An old engine

Totally not related to programming…

I have read about the first diesel engine (1938, Sulzer, number  241001-002 DE) utilized by the Romanian railway: http://www.derbysulzers.com/cfrprototype.html and I as very please that the article had also some nice photos. And it also mentioned that the train is at the Dej (city in Romania) rail depot. And to my biggest surprise, here it is:


Hm, what does a Windows XP screenshot do in Microsoft’s flagship Office product do? No idea, I just received it today:


You just have to move your mouse to show the tooltips for the Message Options, and the screenshot will pop out in a second.

Regardless, clicking it will bring back the standard Windows 7 message box, so it seems a screenshot was lost in the transition somewhere.



While trying to read some fine details about some C macros … I couldn’t. Somehow the browser rendered the parts of the

text describing the __COUNTER__ behaviour outside of the visible area …


Ohh, might be that I use Firefox. Let’s see with Internet Explorer.


Nope… Same problem.

Let’s fall back to our old friend … lynx.


Works as expected.

The following script goes into /usr/local/bin. Call it svn-color.py

#!/usr/bin/env python

 Author: Saophalkun Ponlu (http://phalkunz.com)
 Contact: phalkunz@gmail.com
 Date: May 23, 2009
 Modified: June 15, 2009
 Additional modifications:
 Author: Phil Christensen (http://bubblehouse.org)
 Contact: phil@bubblehouse.org
 Date: February 22, 2010

import os, sys, re, subprocess

tabsize = 4

colorizedSubcommands = (

statusColors = {
    "M"     : "31",     # red 
    "\?"    : "37",     # grey
    "A"     : "32",     # green
    "X"     : "33",     # yellow
    "C"     : "30;41",  # black on red
    "-"     : "31",     # red
    "D"     : "31;1",   # bold red
    "\+"    : "32",     # green

def colorize(line): 
    for color in statusColors:
        if re.match(color, line):
            return ''.join(("\001\033[", statusColors[color], "m", line, "\033[m\002"))
        return line

def escape(s):
    s = s.replace('$', r'\$')
    s = s.replace('"', r'\"')
    s = s.replace('`', r'\`')
    return s

def line_exp(x):
    return {
        'A': "Added",
        'D': "Deleted",
        'M': "Modified",
        'R': "Replaced",
        'C': "Conflicts",
        'X': "Externals",
        'I': "Ignored",
        '?': "Untracked"

passthru = lambda x: x
quoted = lambda x: '"%s"' % escape(x)

if __name__ == "__main__":
    all_lines = []
    cmd = ' '.join(['svn']+[(passthru, quoted)[' ' in arg](arg) for arg in sys.argv[1:]])
    output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
    cancelled = False
    for line in output.stdout:
        line = line.expandtabs(tabsize)
        if(sys.argv[1] in colorizedSubcommands):
            if not line.startswith("Performing") and len(line)>2:
                all_lines.extend( [line] )
            print line

    prev_beg = ''
    for line in all_lines:
		if prev_beg != line[0]:
			print line_exp(line[0])
			prev_beg = line[0]
		line = colorize(line.rstrip())
		line = line.translate(None, '\2')
		line = line.translate(None, '\1')
		print "\t", line

    print ""

And modify ~/.bashrc to contain:

alias svn=/usr/local/bin/svn-color.py

The most confusing reply

While starting dropbox from the command line …

me@tide:~ > dropbox start
Starting Dropbox…Dropbox isn’t running!
me@tide:~ >

Starting Dropbox … Dropbox is’t running. I know that, this is the reason I wanted to start it … but “Dropbox is’t running” after Starting is just confusing me, so did you manage to start it or not?

Done! Sorry, done, What? Did I manage to start Dropbox or not?

Seems someone did not pay too much attention to the intuitiveness of the command line application’s reply. But it’s ok, anyway who is using command line anymore?

So, as usual I try to convert a pretty big Word document (found in a Dropbox folder) to PDF and save it directly into the same folder for later mobile consumption… and word panicks:


Voooow….. This operations has just been working with my “old word (2010)” … But this shiny new Office 365 seems it cannot handle this. As a revenge I will call it Office 364.

Certainly, the culprit is that the Dropbox client tries to work with the file … while it is being used by word. Oh no, this won’t work. Let’s pause syncning in Dropbox, save the file (with a bunch of extra keystrokes, when compared with my old version … I can’t say that I like it) and reenable syncing. Does it work now? Yes, it certainly does. …. However it should not be this complicated. Should it?

… and by default comes without C++ support (yes, that means: no cl.exe🙂 ). Obviously C++ programmers are not typical programmers, so if you want to enjoy the latest C++11 and C++14 (or more in detail: https://msdn.microsoft.com/en-us/library/hh567368.aspx ) features supported by the latest reincarnation of this magnificent tool, after the download firstly select Custom …


followed by the selection of Visual C++.


Certainly, feel free to select more components as per your requirements. Now, after downloading several gigabytes, you can finally compile code available only to gcc or clang. The process is described more in detail at: http://blogs.msdn.com/b/vcblog/archive/2015/07/24/setup-changes-in-visual-studio-2015-affecting-c-developers.aspx . And do not worry if you didn’t know this. From the first minute you try to create a new project you will have the possibility to install the C++ tools as per the post above.