sharing programmer-to-programmer. please enjoy. pages are formatted for landscape tablet, laptop, or monitor.

gyges, technical spreadsheet

greek, gyges-hecatoncheires (hundred-handed)

daily use in production

gyges is a technical spreadsheet with an eye towards keyboard-centric use, power user capability, better mathematical expression, and complete automation. it is one of my forever tools — no migrations, no end-of-life.

while i needed gyges for my robotics, i actually built it because i knew it was a herculean effort that would teach me difficult concepts, trade-offs, and when to stop optimizing ;) theory is fine, but a working program is the real test.

  • universe (top line) 36 user tabs plus 4 system ones

  • source (next down) displays and edits cell contents

  • x-axis (third down) shows column headers

  • y-axis (on left) shows row numbers

  • main (large middle) traditional spreadsheet grid

  • command (bottom line) for entering commands

  • keys (right of command) most recent keys pressed

  • status (next up) real-time configurable status

  • mode (left of status) current system mode

for more information, see the yVIEW entry.

overall layout

gyges’ look-and-feel, like all my applications, is controlled by the yVIEW library. that library handles my universal standard screen elements in both curses and opengl. each of these can be hidden and shown as needed, and some can be configured in real-time, such as the source editing line.

universe line

the universe line (topmost) is usually called tabs in spreadsheets. gyges has 36 normal tabs available, 0-9 and A-Z. tab 0 is shown in orange as current. all the other tabs are not allocated/used, so they are in tan/brown.

moving between tabs with a comma is easy, just type ,B to move to tab B. you can also cursor the allocated/used tabs with ,[ first, ,> next, ,< previous, and ,] last.

i don’t like hidden things, so the last four buffers are viewports into gyges internal workings. for instance, the summary tab (in red as it is used) contains all the valid cell ranges in use. i found this very useful to debugging.

source line — simple cell entry overview

source line (second line down) shows cell 0b1 as empty (null character). when the source line is tan/brown it means view-only.

typing a + sign automatically begins cell entry for a positive number. the source line is blue, meaning text entry.

typing enter adds the cell and goes back to view-only tan/brown. the cell below now shows the result.

moved right to 0c1 and typed -42. the minus sign automatically triggers input of a negative number.

enter then move right to 0d1 and typed =b1+c1. the equal sign automatically triggers input of a numeric formula.

enter then move right to 0e1 and typed =`. the back-tick triggers wander mode (red) which allows pointing rather than typing the target cells.

moved to the left and the cell automatically updates to reflect the position 0b1. the 0e1 in the left side shows where the formula will be.

used + - * / to continue the wandering until the formula is built as desired. other symbols can be used also, this is just a quick example.

accepting the formula creates the cell in 0e1 and shows the result. all this can be done with many other types of data.

source entry can do visual selection, copy/paste, multiple text registers, and is fully scriptable with macros. please see ySRC entry for more information. source editing is the same in all my programs.

  • one shows basic number formats

  • two is how many decimals to show (0-9)

  • three is large number formats

  • four is specialty formats for small numbers

  • five shows the technical format clearly

  • align are the basic alignments

  • bracket formats are for headers and such

  • fill are also often for headers

  • indent is to get integers and floats aligned

  • large are metric units deca to yotta

  • small are metric units from deci to yocto

most formats can be mixed. numbers can’t use fills (too confusing). some notations obviate the need for units (like exponential). these are standard across all my applications. i picked them for general usefulness.

column widths are the same. lots of presets like fn=normal, fw=wide, fm=minimal, etc. detailed adjustments are h=one cell narrower, H is five narrower, l=one cell wider, and L is five wider.

i implemented row height formatting, but it is really only useful for adding lots of text. get a bloody word processor or database for that. so i ripped row height formatting back out ;)

at the bottom of the main area, i used a ruler fill on empty merged cells to give me obvious guidelines — very useful. fills can serve many purposes.

cell formatting sampler

hitting f then a character changes the formatting

take a break for a demonstration

quick formula operators overview

  • precedence follows c-language

  • left middle has arithmetic

  • center middle has logical

  • bottom has bitwise

  • top center shows real-time variables

  • top left shows some formulas

  • top right shows some logic tests

  • across the middle is a longer formula

variables are one of my favorites, small but mighty. they are a short name preceded by one of four directional arrows. the arrow points to the cell target. you refer to the variable in a formula, it uses the target’s value.

powers are also a favorite as it clarifies many formulas. the one i really like is the second example on the left where variable a is raised to the power of variable y. very useful. the square root sign is helpful too.

across the middle is a sightly longer formula that helps demonstrate the functions form () which shows the actual formula, rpn () showing the RPN version, and reqs () which lists the required cells.

for more information, see the yRPN library and the yCALC library entries.

absolute favorite are the pointers and references. as every c programmer knows, once you have pointers, anything is possible. & defines references and * dereferences both cells and whole ranges. they are very, very helpful.

given my focus on spider robotics, trigonometry is vital — jointed legs add flexibility, but also a wicked complexity.

after basics, almost all trig functions are just simplifiers. but, simpler representation means clearer and traceable.

sin, cos, and tan have greek symbol shortcuts, seen to the right. all trig names on chart are in gyges, plus more.

given byte-code execution of calculations, additional functions don’t slow gyges down at all. really.

quick function overview (trigonometry focus)

this gyges screenshot is from a demonstration of operators and formulas in the yCALC library gallery entry.

quick cursor movement sampler

if you like vi/vim, you will love the standards. if you don't, this is hellish ;) if you like mouse movement, please forget you were ever here ;))

to the left is a snapshot from a movement demonstration which shows unit, direct, page relative, and scrolling moves. none are earth shattering.

for more information, please see the yMAP library entry. it services every opengl and curses program to make sure moves are universal.

movement is critical. and, exact, predictable movement is inseparable from automation. therefore, the yMAP library provides consistent movement keys across all my programs. that then allows my yMACRO library the ability to safely automate literally everything.

this is only part of the movement available. end moves have been expanded and are just too much for a screenshot, also excluded are things like searches, cursoring, and hints. for more information, please refer to the yMAP library.

first and foremost, human readable, 8-bit ascll. i have to be able to debug quickly and not fuss with specialty file viewers when gyges is giving me file reading troubles. i just don’t have that kind of time.

second, i am focused on spreadsheets. NOT databases hidden in spreadsheets. NOT powerpoint shapes mixed ito cells. NOT charts, extensive note taking, or anything else that has a better home.

while some of my files are big, they are fast enough for me. if i hit a barrier, i can easily make it a binary database that reads as fast as my helios (locate), polymnia (code analysis), or metis (task management) databases.

and, a simple file format

file reading and writing is coordinated and handled by the yPARSE library and yFILE library. for more information, please see those entries.

finally, import/export quick look

what i do is include a #@ style, #@ x-parse, and #@ titles line in all extracts and most reports. these give any import specific direction to properly handle the data.

x-parse has a big dot for column beginning, dash means continuance, and small dot means throw away space. there are other potential symbols depending on format.

titles then assign terse data filtering style column headers. empty and comment rows are ignored.

i have several major formats for import/export, needed to suit varying circumstances — printable values, comma delimited, ascii delimited, source values, and native format are the most common. frankly, i use printable values the most. below is the system-wide project overview report from polymnia (code analysis).

source code is GPL3 licensed, https://github.com/heatherlyrobert/gyges

Previous
Previous

charybdis-adialeiptos -- specialty desktop pager

Next
Next

color management with iris-chrysopteros (prd)