WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Flume: A fast, light utilitarian math environment ALPHA VERSION  (Read 2962 times)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Flume: A fast, light utilitarian math environment ALPHA VERSION
« on: September 07, 2010, 10:57:15 PM »
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. ;D

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



« Last Edit: September 10, 2010, 04:14:32 PM by MikeLockmoore »

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flume: A fast, light utilitarian math environment ALPHA VERSION
« Reply #1 on: September 07, 2010, 11:00:00 PM »
Here are the Flume help file and application icon files in two forms, png and gif; for alpha version 0.2.5.

UPDATE: help file updated for version 0.2.6 with some minor wording changes.


« Last Edit: September 10, 2010, 04:15:23 PM by MikeLockmoore »

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flume: A fast, light utilitarian math environment ALPHA VERSION
« Reply #2 on: September 07, 2010, 11:01:22 PM »
Here are the makefile and packaging script for alpha version 0.2.5 (and hopefully later).

EDIT: Sorry, I thought I posted the makefile.  Here it is.
« Last Edit: September 08, 2010, 08:28:53 AM by MikeLockmoore »

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flume: A fast, light utilitarian math environment ALPHA VERSION
« Reply #3 on: September 10, 2010, 01:18:06 PM »
I've set up a Google Sites website for hosting my personal software projects: https://sites.google.com/site/lockmoorecoding/.  You can get to it through the little globe icon under my name on postings (<---  :)).  I have a .tgz extension file for the current ALPHA version (0.2.5) of Flume posted there and some of my other stuff.  Anyone is welcome to look at my code and try something out.
--
Mike Lockmoore.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flume: A fast, light utilitarian math environment ALPHA VERSION
« Reply #4 on: September 10, 2010, 04:13:18 PM »
I just found a bug in the parsing of Flume that led to problems handling scientific notation numbers (1.0e-2).  The solution helped me realize I could make the handling of x or X more intelligent.  I allow X to represent the multiplication operator (along with the C-standard '*').  Before, you had to have spaces around the X, otherwise Flume thought it might be part of a hexadecimal number (0x123ABC).  But now, Flume only assumes x or X is part of a hexadecimal number if immediately preceded by zero.  So now "6x7" expands nicely into "6 x 7" which is correctly multiplied, while "0x7" still represents the hex number 7.  The fix for scientific numbers ensures they are recognized as such and correctly accept negative exponents and not assume the negative is a subtraction operator.  Changes are in version the new ALPHA release 0.2.6.

Project download page:
[removed: see extensions submission guidelines]
--
ML
« Last Edit: September 13, 2010, 11:55:19 AM by ^thehatsrule^ »