Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 11.5 ('Weeds')
Instant purchase and download via GumRoad!

REVIEW

Calca

Issue: 11.5 (September/October 2013)
Author: Marc Zeedar
Article Description: No description available.
Article Length (in bytes): 5,631
Starting Page Number: 13
Article Number: 11502
Related Web Link(s):

http://calca.io

Full text of article...

I'm a word guy, not a numbers guy, so I'm more likely to use a word processor than a spreadsheet. But at times I need to do calculations a little more sophisticated than can be done with a calculator. In the past I've turned to Solver, a terrific text-based calculator that lets you type in formulas such as 10% of $47 to get $7.05. Solver's great, but it's a special app just for math. Now we've got Calca, a Markdown text editor that lets you mix math right with your text!

I've written a lot about Markdown in this magazine, so you know I'm a huge fan (almost all the articles for xDev are written in Markdown now). Markdown is a plaintext format that includes some structure elements and allows easy conversion to HTML, XML, PDF, and other formats.

But if you've ever wanted to include calculation tables in your Markdown text, you had to do those in a spreadsheet and copy/paste the results into your text document. If the numbers changed at a later date, you had to start all over again in the spreadsheet.

Calca brilliantly solves that problem. With Calca, you can type normal Markdown text as always—it's a simple Markdown editor like many out there—but when you want, you can simply include math problems and Calca will solve them. Writing 2 + 10 => will cause Calca to insert a 12 as the answer. You can't edit the answer—it's a special block of text with a gray background.

Your math formulas can be complicated if you'd like, and you can even include math symbols and common functions (such as sin(pi/6) => 0.5).

But what really makes Calca shine is that it can act like a spreadsheet with named cells. That's my favorite feature of a spreadsheet, though most spreadsheets make it too complicated to use. With Calca, just type a name, an equals sign, and a value. That's it!

myValue = 10

Now Calca knows there's a variable called myValue and I can use it in other calculations. Typing 5 + myValue => causes Calca to correctly show the answer as 15.

For instance, Calca loves a calculation like this:

trip cost = flight + (hotel + food) * days

days = 7

flight = $500

hotel = $120

food = $30

trip cost => $1,550`

Calca has neat touches, too, so that when I click on "flight" above, it highlights "flight" in both places (the top formula and in the list).

The program even supports functions:

f(x, y) = x^2 + 2y^2

f(3, 5) => 59`

The first line defines the equation, the second calls it with data (parameters 3 and 5). The answer, 59, was computed by Calca.

Even crazier, Calca can actually look up information on Google for you and use it in your calculations! Just put a ? to the right of the equal sign and Calca will look up the info. That means formulas such as inches in a mile = ? becomes inches in a mile = 63360 #googled (the latter bit is a comment) and AAPL = ? becomes AAPL = 464.98 #googled (Apple's share value on the day I wrote this review). That's pretty awesome.

Of course, I'm no mathematician, but those of you who are will appreciate that I've barely touched the surface of what Calca can do (it supports derivatives, matrices, complex numbers, and more I don't know anything about). I love that it can work with binary and hex and even logic programming.

Calca's terrific. The only drawback I can find is that it doesn't include handy shortcuts for Markdown like most Markdown editors. That means I probably wouldn't use Calca as my main editor, but if I am working on something that requires calculations, I'd definitely do the document in Calca. (And since Markdown files are plaintext, you can easily switch your documents between editors as needed.)

Note that there also is an iPhone/iPad version of Calca for just $3. Since both apps use iCloud for syncing, all your Mac documents are automatically available on your iOS devices and vice versa. Sweet! If you're a developer, I guarantee you'll find a ton of uses for Calca

End of article.