UPDATE: Latest version 0.2.6 fixes some parsing bugs. See below for the new source code files.
I have a new FLTK-native application: Flume. To quote the intro in the help file, "Flume is a fast, light utilitarian math environment. It can be used from the command-line for simple calculations, or in GUI form as a desktop calculator or a one-column spreadsheet. Calculations are performed with floating point math, so the range and precision of numbers is somewhat limited, but suitable for most general calculations. Flume uses the FLTK user interface library, which makes it is especially efficient on TinyCore Linux. The source code of Flume is released under the GNU license."
Why make Flume? I wanted a calculator application that was small and fast, like the other parts of the Tiny Core Linux environment, but I've come to think of the push-button style calculator apps cumbersome. I mean, why mimic a $5 push-button calculator in the GUI and poke at it with the mouse when my laptop already has all the numeric and alphabetic buttons I need? And why limit it to a single result line, or just a few, when the computer can easily recalculate dozens of lines, even with editing? The Gnome scientific calculator in Fedora takes something like 5 seconds to open on the EeePC 1000 that I use at work: a frustration every time I use it. In TC, Flume opens instantaneously, and is more powerful in many ways. I know, many calculator apps allow you to type instead of poking with the mouse, but they can't rush a flow of fresh results to me each time I press enter.
I am posting Flume 0.2.5 as the initial Alpha Release version for testing. If you are inclined to build and test it, I would appreciate your feedback. If you happen to find a mathematical error or other bug, please try to post the exact input you tried and the output you got, along with what you expected. It may be convenient to use the comment feature (text after a semi-colon in an expression is considered a comment and not evaluated) and file save feature. Then you can attach or post your flume save file here. The parsing code is a bit tricky, so I'm sure it has more limitations, quirks, or outright bugs than I currently know about.
If you have any code ideas, or suggestions for additional functions, let me know. Flume will perhaps never (!) have all of the built-in functions of Excel or OO Calc, but I'd like to include that core group of features and functions that most users want to use most of the time. A few key statistics and financial functions are obvious gaps currently.
How to use it? Well, if you build the executable, you can just start the GUI from the command-line:
$ ./flume
Type a mathematical expression and press the Enter key, then Flume will try to calculate it. You can enter more expressions, or edit previous ones, and Flume will recalculate all of them. The [ ! ] button will pop up a little quick-reference window, and the [ ? ] button will open the help file.
In the GUI, you can refer to the previous result row by placing the single-quote or special operand p[1] in your expression.
0: 1 + 2 = 3
1: p[1] + 1 = 4
If you want to use the command-line mode, just enter an expression after any command-line args:
$ ./flume "3 + 5"
Double-quotes are needed if any of your math expression uses special characters in the command shell like parentheses.
For debugging, you can enable extra information by using the --t N option on the command-line, where N can range from 0 (blab about everything) to 5 (say almost nothing). Actually, you may not be too interested in the debugging output, but I find it useful.
In later releases, I may come up with a compile-time way to strip out all of the debugging code to squeeze down the executable size a bit.
In this first post, I will attach a screen shot and the source code files. In a second or later posts, I'll post the help and build files. I may find another venue to publish a full extension (.tgz) package of the alpha, beta, and normal releases. If so, I'll post a link here. Once I get things to a good, stable release state, I'll submit it for the official Tiny Core repository.
Hope you like it. I find it pretty useful already.
Minor edit: fixed the misnamed screenshot.
--
Mike Lockmoore