Hard-to-find tips on otherwise easy-to-do tasks involving everyday technology, with some advanced insight on history and culture thrown in. Brought to you by a master dabbler. T-S T-S's mission is to boost your competitiveness with every visit. This blog is committed to the elimination of the rat from the tree of evolution and the crust of the earth.
Thursday, August 27, 2009
Horizontal Scrolling in Windows
Saturday, August 22, 2009
NEdit = Super Edit
In each section (denoted by nedit.whatever - shown here just as a label - don't add this line) add the lines given
nedit.highlightPatterns: Ada:Default\n\
Autohotkey:1:0{\n\
comment:"(;.+$)|(^/\\*.+^\\*/)":::Comment::\n\
hotkey:"^[ \\t]*[^:]+(?=::)":::Flag::\n\
command:"^ *[a-zA-Z0-9_]+(?=($|[ \\t]*,|[ \\t]+[^ \\t:=(]))":::Keyword::\n\
string:"""[^""]*""|'[^']*'":::String1::\n\
builtin:"(?iif|loop|return|break|continue|while)\\s*(?=\\()":::Subroutine::\n\
expression:"^\\s*\\w+\\s*(?=[:=])":::Storage Type::\n\
}
nedit.languageModes: Ada:.ada .ad .ads .adb .a:::::::\n\
Autohotkey:.ahk::Smart:None:4::".,/\\\\`'!$@#%^&*()-=+{}[]"":;<>?~|":
nedit.macroCommands: \
Comments>Comment@Autohotkey:F3::: {\n\
replace_in_selection("^", "; ", "regex")\n\
process_cancel()\n\
}\n\
Comments>Uncomment@Autohotkey:F4::: {\n\
replace_in_selection("^; ", "", "regex")\n\
}\n
Thursday, August 20, 2009
Correctly Setting Your Prompt in tcsh or csh
set prompt='%~/ !>'
How to set your PATH - the wrong way :
(wrong)
setenv PATH whatever
or
set PATH ($PATH:/dir/dir2)
right way :
set path ($path /dir/dir2)
(that's magic, $PATH gets set automatically, in tcsh or csh - bash is crap of course)
Good aliases to set
ll ls -l !\*
lt ls -lt !\* \| less -X
nes echo \$cwd/!\*
Wednesday, August 19, 2009
Perl Tk Tutorial
http://www.bin-co.com/perl/perl_tk_tutorial/contents.php
I tried starting a debate on which was better for what I wanted to do - perl or autohotkey. Looks like I end up with people tell me how to do what I want in AHK. AHK is super - light, has a basic visual frontend for simple GUI creation, is dead simple to install, no dependencies, and generates executable. Perl is super for serious stuff though.
Guruspeak :
Problem with AHK solutions is that they are tied to a specific platform. Tools like Perl and Java are generally more portable. (With Perl it depends on the availability of the module for multiple platforms esp. with GUI.) You can also consider using Qt directly since it is cross platform. This was built by a company called Trolltech who were acquired by Nokia http://qt.nokia.com/products and this is the backbone for KDE's GUI.
Response :
All too heavy. Autohotkey seems to be the only thing that's light and comes with a decent visual WYSIWYG frontend. And they have a forum with great people who help you out.
Tuesday, August 18, 2009
The Hardest Part - Made Easy

The "macros" part promises to be interesting. I've never done anything like it before. But, my recent brush with iPhone programming has me thinking along the right lines I think - though a true CS programmer might get a shock at my approach :
Have your utility functions
Have an execute queue
Have macro queues
When an event needs to be handled, add the required function call to the execute queue and to the "history" macro queue; then call the execute function which takes that queue as its input
When a macro is called, dump all of its contents into the execute queue and call the execute function
So, you're really building a parser and an exec function, etc. Like I said, a CS man would know exactly where to look to get this done in 5 minutes. Good programmers can code. Great programmers can reuse.
Image courtsey of flamingtext.com btw - see your name in big lights, make cool logos.