Math-Intensive Reports with GNU Emacs and Calc, Part 1
I'm trained as an engineer, and I work in the structural analysis field. As part of my job, I have to perform structural stress analyses and document the results in reports. For me, GNU Emacs has solved several longstanding problems related to the authoring and publication of such reports.
The unique situation that engineering analysts like me encounter is preliminary engineering calculation reports must be written at specific points in time as an engineering project evolves. These preliminary reports must be complete and accurate relative to the current state of the design, even if the design itself is still incomplete and in flux. Such reports are required by contract to be delivered to design review meetings as an integral part of the in-process documentation of a design. They are checked by the customer's representatives, and if problems are found (either with the hardware as exposed by the analysis or with the analysis report itself), they must be corrected right away. This is a different matter considering the problem of writing papers whose accuracy is checked only once before publication in a scholarly journal.
I know other engineers (of whatever specialty area) experience the same problems, and I believe they will be interested in learning about useful software tools that can solve them. In fact, almost anyone who needs to write reports documenting on-going calculations should find this article to be of use.
I have only recently started using Emacs. In fact, this article evolved from numerous small text files I'd made for testing various aspects of Emacs. For years I had been intrigued by what I'd heard about it, but I also felt intimidated by its legendary size and complexity. Three things finally compelled me to buckle down and try Emacs. The first was my discovery that Emacs is actually quite small compared to the average late-1990s word processor installation. The second was a sense of revulsion that overcame me when my favorite word processor, WordPerfect, was consigned to the scrap heap of history by a notably inferior product being pushed along by a marketing juggernaut. The third and most important was calc.el, the Elisp Calc math package. Today, having become fairly comfortable with Emacs+Calc, I am not looking back.
If you do math, you probably recognize that it's not only about the numbers. It's about your assumptions, your mathematical model of reality, your results, your interpretation and understanding of them and your ability to make them clear to other readers. It's about leaving behind a record of what you did and why you did it, so others can review, comment on, criticize and update what your work. Only in this way can a calculation carry any significance. In short, I am talking about a report.
Whether it's figuring out your car's gas mileage or the best way to intercept an incoming asteroid, you need to keep a record for yourself as well as for others. Therefore, you need to write a report. It may be only a few sentences, or it could be a thousand pages. It may be only for yourself, if you think you might have trouble remembering what you did, or it may be to convince NASA authorities to accept your science payload for a ride on the Space Shuttle. While you alone are responsible for calculating your car's miles per gallon, your calculations of the structural integrity of a Shuttle payload affect, and are affected by, a great many people. In cases like these, a formal report is absolutely required.
The great bugaboo with all such reports, however, is the need to track changes. The calculation results need to be updated every time design changes are made, and the report must be reissued for design review meetings. What kinds of design changes? Many: changes in dimensions, material specifications, the manner of attaching and fastening parts, numbers and sizes of bolts and screws and estimated loading cases, to mention a few. In an engineering design project, redesigns come almost hourly in the early phases. Later on, as the design becomes more mature, things stabilize a bit, and the rate at which design changes occurs drops dramatically. The problem is, by this time in the project, you have generated many pages of extremely detailed analyses. Coping with even a minor change can set your publication date back by weeks. Keeping a stress calculation report current, based on the latest design information, is a massive headache. Enter Emacs+Calc.
Emacs is described by its author as an "extensible, customizable, self-documenting real-time display editor". Emacs is written almost entirely in its own version of the Lisp language (Emacs Lisp, or elisp). Elisp is a general-purpose programming language. Almost all of Emacs' built-in editing functions are implemented as calls to a predefined library of elisp functions. Emacs is extensible because expert users can write full-fledged application program libraries in elisp. Once a useful elisp library or application program has been written and tested, it becomes available to any user of Emacs, whether or not he knows elisp. Indeed, the Emacs distribution comes with a great many elisp packages, and many more are available from various sources on the Internet.
If you have ever used the Autocad drafting package, you'll know that it also uses an embedded version of Lisp (Autolisp) as a medium for writing all kinds of extensions. There is a lively trade in Autolisp libraries and applications among the worldwide body of Autocad users. Not all of these users know how to write anything at all in Autolisp, but one doesn't need to know Autolisp simply to use an Autolisp add-on package. It's the same way with Emacs and elisp.
Using elisp software, it is possible to use Emacs as your primary user interface to a computer system. Emacs' elisp packages make it possible to:
send and receive e-mail;
post and read NNTP news messages;
launch programs on both local and remote computers;
send data to programs and view the output;
browse the World Wide Web;
upload and download files with FTP;
remotely operate computers via Telnet or SSH;
fill out on-line forms and interact with databases;
create gorgeous print documents with LaTeX or groff;
create and manipulate XML data and documents; and
perform simple and fancy mathematics.
All this is done without leaving Emacs.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Home, My Backup Data Center
- Tech Tip: Really Simple HTTP Server with Python
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



47 min 49 sec ago
3 hours 3 min ago
3 hours 31 min ago
4 hours 29 min ago
5 hours 58 min ago
7 hours 7 min ago
7 hours 53 min ago
8 hours 14 min ago
14 hours 29 min ago
20 hours 7 min ago