WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!  (Read 3831 times)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
I'm posting the source code and build files for my latest version of Flume: 0.9.2.  I still consider this beta software, especially since I have made some significant changes since the last version.  If you try it, please be careful and skeptical at first.  If you see obvious problems or questionable behavior, please share so we can make Flume better!  

What's new in version 0.9.2 (changes since version 0.9.0):

 *  Flume now accommodates FLTK/X desktop settings in .Xdefaults such as window color and button style scheme (thanks to forum member tinypoodle for prodding me about this)

 * Flume now offers a OPTIONAL reverse-polish notation (RPN) mode, similar to old HP calculators or the Forth programming language (thanks to forum member floppy for encouragement):
  [RPN mode checked]  3 2 * 1 + = 7

* Flume now better manages number formats (real, integer, scientific notation) when the expression involves mixed types and when the result requires or is best expressed in another format (thanks to forum member Frank for encouragement):
     0.5 / 0.25 = 2
     10 / 3e0 = 3.33333333

* Flume now offers "as ___" post-fix functions to display a result in another format; available options are: as hex, as bin, as int (decimal integer) or as integer, as real, as sci (thanks to forum member TheNewbie for feedback, but this is for now a fairly simple implementation):

     254 + 1 as hex = 0xFF ;

* Flume now offers an OPTIONAL "Track significance" mode, which rounds results according to  guidelines taught in the physical sciences:
   2e2 + 6e1 = 300 ; result rounded to 100s place, it would be 260 normally
   321.2 * 22.0 = 7070.0 ; result rounded to three digits, it would be 7066.4 normally

* New round(num, placevalue) function: rounds the "num" number to the placevalue number.  
   Examples:
   round(321, 100) = 300
   round(351, 100) = 400

* fix in log10 function

Attached is a gzipped source tar archive.  If you can't build this and would still like to participate in beta-testing, please send me a private message.  Hope you enjoy this new version!

EDIT: first version I posted left out some last-minute changes.  Correct tarball attached now.  Plus I added a screenshot of the new version, sporting the FLTK "Plastic" theme.
EDIT2: corrected rounding behavior note in the 2e2 + 6e1 example.
--
Mike Lockmoore
« Last Edit: December 31, 2010, 02:09:14 AM by MikeLockmoore »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!
« Reply #1 on: December 30, 2010, 12:05:56 AM »
No longer any error output when scrolling in help browser whatsoever.

Snapping to edge still occurs under jwm with Maximize-x & Maximize-y.

FLTK theme settings in .Xdefaults fully implemented (though I do get a surprisingly poisonous colour for what I defined as "green", unlike to other FLTK apps...).

Small software needn't be fugly!     ;D
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!
« Reply #2 on: December 31, 2010, 02:14:44 AM »
@tinypoodle: Unlike some of my other projects, Flume uses pretty standard UI elements and default colors, which are read in from the .Xdefaults settings in a FLTK-standard way.  So if your green looks weird in Flume, I would think it would also look weird in AppBrowser and other apps in TC base.  Is that not the case?  Which app(s) shows the color is a nicer way?  Can you post your .Xdefaults file so I can try it? -- ML

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!
« Reply #3 on: December 31, 2010, 07:54:23 PM »
A picture is worth a thousand words ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!
« Reply #4 on: January 02, 2011, 11:38:17 PM »
@tinypoodle: Yikes!  Not my cup of tea.   :P Yes, I see what you mean by "poisonous green" now.  However, the core System Stats applet also has this same green in its big text display window, so this is not a Flume-specific issue.  

In your .Xdefaults file, you ask the FLTK apps to have a green background for text widgets.  This is what you get!  A lot of green!  The strange thing for me is that you don't see a similar type of green for all the widgets that have text in them, and that the window backgrounds are not very brown, but quite red on my screen.  So FLTK must be using a modified version of "brown" for some widgets and a bright green for others.  

Anyway, you can override the general widget colors for my FLTK apps by passing in -fg and -bg and -bg2 color specifiers on the command line (see the description of Fl::args( ) in the FLTK docs: http://www.fltk.org/doc-1.0/functions.html#12_2).  I tried this:

   flume -bg2 mint

And saw something a bit closer to the rest of the applications.  Experiment with different color names, then you can update your wbar or other launcher to start Flume with one you like.
--
Mike

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!
« Reply #5 on: January 03, 2011, 12:01:22 AM »
Hmm, the system stats window appears in same color as flumes help browser here...

'brown' is always the same redish with consistence.

'mint' seems to be unknown on my system, but 'flume -bg2 lightgreen' becomes tolerable  ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!
« Reply #6 on: January 04, 2011, 09:52:28 AM »
Maybe you can use RGB number codes somehow for a custom color?  Unfortunately, I don't have time to look up the syntax at the moment.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Flume 0.9.2, now with RPN, FLTK scheme colors and other features!
« Reply #7 on: January 04, 2011, 07:21:16 PM »
Well, turned out...

Code: [Select]
flume -bg2 #00FF00 
'-bg2' not recognized! Cannot continue.
Expression cannot be calculated!

was obviously not the correct syntax!   :P

Code: [Select]
flume -bg2 '#00FF00'

seems to do the trick   ;D
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)