Page 1 of 1

Pstocks

Posted: Tue 24 Jan 2012, 22:06
by jpeps
Based on a script posted by technosaurus. Initially opens up editor for creating a quote page. List one symbol per line. Includes a doc that lists optional format strings.

Pstocks will use mc calculator if loaded for more accurate rounding of volume

http://murga-linux.com/puppy/viewtopic. ... 69&start=7


Also runs from terminal: "pstocks [symbol]" or "pstocks -q" (quotepage).

Version 1.5 Added variable at top of script for setting minimum volume, and set default at 100,000 vs 200,000.

Version 1.6 Kills orphaned pstock processes on exit

Posted: Thu 02 Feb 2012, 21:59
by jpeps
Version 1.5 Added a variable at top of script for setting minimum volume; also lowered the default to 100,000.

Posted: Sun 05 Feb 2012, 04:03
by technosaurus
I apologize for contributing bad examples but I only recently learned of the speed gains with gtkdialog's -s option (I already posted in the gtkdialog tips thread)

rather than doing
gtkdialog -p MAIN_DIALOG
it is extremely faster (especially for large tables) to
gtkdialog -s <<< "${MAIN_DIALOG}"

it may help when you follow a lot of stocks
(now off to write my pupzip replacement with this new-found knowledge, it already loads up ~10x faster than xarchive)

Posted: Sun 05 Feb 2012, 06:11
by jpeps
technosaurus wrote: (now off to write my pupzip replacement with this new-found knowledge, it already loads up ~10x faster than xarchive)
Interesting..I couldn't confirm. I ran 10 trials both ways, and actually got a .0124 second advantage with -p (statistically insignificant). --measured through load up.

I ran the measurement differently, ending after <window>' , and got a slightly better time for -s of about .01 second with 20 trials. Maybe not statistically significant, but could be theoretically faster.

Posted: Sun 05 Feb 2012, 07:18
by technosaurus
Thunor has fixed it in recent gtkdialogs and it only makes a difference in really large (typically autogenerated) guis, but I still use older pups to ensure packages I build work on both old and new versions of pup, so I use gtkdialog3 (and now gtkdlg1 - goingnuts' backport to gtk1)

Posted: Mon 20 Feb 2012, 17:41
by jpeps
Version 1.6: Kills orphaned pstock processes on exit.