Tikmark AWK & Tcl Applications

The ideas behind this website are (1) using AWK-scripts for engineering calculations , (2) designing a Tcl/Tk graphical interface for managing lots of awkscripts and (3) the game of Mahjongg .... specifically x-mahjongg..... more specifically, the Mohave graphical launcher for x-mahjongg.

These are all works in process, and this site is actually a labor of love more than it is work.

png

AWK as an Engineering Tool

On the [awkeng] page, there are links to some great AWK sites that offer much to introduce and explain AWK and offer AWK resources, and I will add little or nothing here to those explanations.

But, simply, AWK is a scripting language that was born of Unix and comes embedded in all Linux / Unix operating systems. It runs from the command line, and is very powerful in handling information in text files, but that alone is not what makes it attractive to engineering:

  • It is supremely elegant in handling text and numbers. Commands are brief and powerful, and programs can be written in just a few lines of code; ironically, most of the script will deal simply with reading the input and printing the output.
  • It's a scripting language, so you don't need a compiler, and the script file is readable, "commentable", editable ASCII text.
  • The syntax is not all that cryptic (though many "code poets" do strive to write efficient but cryptic code). Certainly it is no harder than learning a spreadsheet "language". And, after 25 years of spreadsheets, I need a change of scenery.
  • I am a "hobbyist" programmer, and learned enough AWK in eight hours to do day-to-day mechanical engineering stuff.
  • Unlike compiled (binary) program files, when you give an awkscript to someone and they complain about it (which they must of course !), you simply smile and say "hey buddy, there's the script, do what you want with it".
  • And my best reason ....
  • It is much easier to follow a list of annotated AWK commands than it is to hack your way through a spreadsheet that someone passed on to you with multiple sheets, a spider web of cell links ( to files that don't reside on your system !) and hidden macros. This makes AWK code highly transferrable and easily read and modified by the next owner.

AWK and Tcl books

Writing an Engineering AWKscript

AWKscripts for Mechanical Engineering

Home heating script added Aug.2008 (Oil versus geothermal heat pump).



Tclforawk

png

Tclforawk is a graphical interface for organizing and running groups of awkscripts. It is written in another scripting language - Tcl/Tk - that runs on any computer system. The script file is free to download, use and modify.



Mohave

jpg

I like solitaire mahjongg in its many computer variations, and x-mahongg is a basic version of the game that is started from the command line. However ........ although the command line rules for doing work, pushing buttons and viewing images rules for playing games. X-mahjongg unfortunately uses a command line startup, something like xmahjongg --tileset name --layout name --background name etc etc This requires me to remember all the tilesets, layouts and backgrounds (which I can't because I have run out of brainspace.) So I wrote Mohave, to start-up x-mahjongg nicely.



Htags

This is a simple HTML tagger for basic HTML documents, reports, and web pages. No bells, no whistles.



Tikmark Javascripts

These calculators were originally written as student study-aids for my courses at Wentworth Institute. They will open in a web browser, and will work if you allow Javascripts.
The Javascripts are embedded in the html files so you can save them to your computer and run them off-line as well. If you do so, be sure to grab the images as well.



Reference and Resources for AWK

Reference and Resources for TCL- TK