XABACUS(6)
๐ XABACUS ๐
ok bestie come SIT DOWN because we are talking about xabacus from the Games Manual, and she is that girl ๐
this is the Abacus X widget, she's ancient, she's iconic, and she has like a hundred options. buckle up ๐ฆ
โจ NAME โจ
xabacus โ Abacus X widget. that's it, that's the name, she's an abacus and she's an X widget, main character energy fr ๐
๐ SYNOPSIS ๐
/usr/games/xabacus [-geometry
[{width}][x{height}][{+-}{xoff}[{+-}{yoff}]]] [-display [{host}]:[{vs}]]
[-[no]mono] [-[no]{reverse|rv}] [-{foreground|fg} {color}]
[-{background|bg} {color}] [-{border|bd} {color}] [-frame {color}]
[-primaryBeadColor {color}] [-leftAuxBeadColor {color}]
[-rightAuxBeadColor {color}] [-secondaryBeadColor {color}]
[-highlightBeadColor {color}] [-primaryRailColor {color}]
[-secondaryRailColor {color}] [-highlightRailColor {color}]
[-lineRailColor {color}] [-bumpSound {filename}] [-moveSound {filename}]
[-dripSound {filename}] [-[no]sound] [-delay msecs] [-[no]script]
[-[no]demo] [-demopath {path}] [-{demofont|demofn} {fontname}]
[-{demoforeground|demofg} {color}] [-[no]teach] [-[no]rightToLeftAdd]
[-[no]rightToLeftMult] [-[no]lee] [-rails {int}] [-leftAuxRails {int}]
[-rightAuxRails {int}] [-[no]vertical] [-colorScheme {int}] [-[no]slot]
[-[no]diamond] [-railIndex {int}] [-[no]topOrient] [-[no]bottomOrient]
[-topNumber {int}] [-bottomNumber {int}] [-topFactor {int}]
[-bottomFactor {int}] [-topSpaces {int}] [-bottomSpaces {int}]
[-topPiece {int}] [-bottomPiece {int}] [-topPiecePercent {int}]
[-bottomPiecePercent {int}] [-shiftPercent {int}] [-subdeck {int}]
[-subbead {int}] [-[no]sign] [-decimalPosition {int}] [-[no]group]
[-groupSize {int}] [-[no]placeOnRail] [-[no]decimalComma] [-base {int}]
[-subbase {int}] [-[no]subdecksSeparated] [-[no]altSubbeadPlacement]
[-anomaly {int}] [-shiftAnomaly {int}] [-anomalySq {int}]
[-shiftAnomalySq {int}] [-displayBase {int}] [-[no]pressOffset]
[-romanNumerals {none|ancient|modern}] [-[no]latin] [-romanMarkers
{none|ancient|modern|late|alt}]
[-{chinese|japanese|korean|russian|danish|roman|medieval|generic}]
[-museum {it|uk|fr}] [-version]
like. look at her. SO many flags. she's high maintenance and we love that for her ๐ญ๐
๐ DESCRIPTION ๐
so this is an implementation of the classic Chinese Abacus (Suanpan), which has its origins in the 12th century. ancient. historic. literally the blueprint ๐ซถ
the device has two decks. each deck, separated by a partition, normally has 13 rails on which are mounted beads. each rail on the top deck contains 1 or 2 beads, and each rod on the bottom deck contains 4 or 5 beads. each bead on the upper deck has a value of five, while each bead on the lower deck has value of one. beads are considered counted when moved towards the partition separating the decks โ i.e. to add a value of one, a bead in the bottom deck is moved up, and to add a value of 5, a bead in the top deck is moved down. okay so the whole vibe is "beads slide toward the middle, that's when they count" โจ
the basic operations of the abacus are addition and subtraction. multiplication can be done by mentally multiplying the digits and adding up the intermediate results on the abacus. division would be similar where the intermediate results are subtracted. there are techniques like using your thumb and forefinger which does not apply with mouse entry ๐ also with multiplication, one can carry out calculations on different parts of the abacus for scratch work โ here it is nice to have a long abacus.
the pre-WWII Japanese Abacus (Soroban) (or Korean Jupan) is similar to the Chinese Abacus but has only one bead per rail on the top deck. the later Japanese Abacus was further simplified to have only 4 beads per rail on the bottom deck.
the Roman Hand-Abacus predates the Chinese Abacus and is very similar to the later Japanese Abacus, but seems to have fallen out of use with the Fall of the Roman Empire (at least 3 are in existence). the Roman Abaci are brass plates where the beads move in slots. in addition to the normal 7 columns of beads, they generally have 2 special columns on the right side. in two examples: the first special column was for 12ths (12 uncia (ounces) = 1 as) and had one extra bead in the bottom deck. also the last column was a combination of halves, quarters, and twelfths of an ounce and had no beads in the top deck and 4 beads at the bottom (beads did not have to come to the top to be counted but at one of 3 marked points where the top bead was for halves, the next bead for quarters, and the last two beads for twelfths). in another surviving example: the 2 special columns were switched and the combination column was broken into 3 separate slots. if available, decimal input is ignored.
the Russian Abacus was invented in the 17th century โ here the beads are moved from right to left. it has colored beads in the middle for ease of use. quarters represent 1/4 Rubles and are only present historically on the Russian Abacus (Schoty). some of the older Schoty have an extra place for the 1/4 Kopek (quarter percent) as well as the 1/4 Ruble (quarter).
the Danish Abacus was used in the early 20th century in elementary schools as a teaching aid ๐
the Medieval Counter is a primitive form of the abacus and was used in Europe as late as the 1600s. it was useful considering they were using it with Roman Numerals. this is similar to the Salamis Greek Tablet from 4th or 5th Century BCE.
the Mesoamerican Nepohualtzintzin is a Japanese Abacus base 20. the Mesoamericans had base 20 with the exception of the 3rd decimal place where instead of 20*20=400 the third place marked 360 and the 4th place was 20*360, etc. they independently created their own zero (only the Sumerian and early Babylonian culture (base 60) and India (base 10) have done this) but the anomaly took away its true power ๐ญ
an easy way of figuring out time in seconds given hours, minutes, and seconds can be done on the abacus with Sumerian abacus with topFactor 10, topNumber 5 and bottomNumber 9 using base 60. no written record of such a device exits but its plausible that one did. (yes bestie, the original says "exits", we are not fixing it, we are respecting the lore ๐ )
the Chinese Solid-and-Broken-Bar System is a base 12 numbering system and not really an abacus. when the abacus is setup in this way though (topFactor 3, topNumber 3, bottomNumber 2, base 12, displayBase 12), it is easy to relate the two.
the signed bead is an invention of the author, and is not present on any historical abacus (to his knowledge) and is used to represent negatives. "New & Improved" abacus models have two auxiliary decks stacked above the principal deck that enable multiplication, division, square-root, and cube-root computations to be performed with equal ease as addition and subtraction (well, so I have read).
๐ฅ FEATURES ๐ฅ
ok this is the fun part, all the stuff you can actually DO:
- click "mouse-left" button on a bead you want to move. the beads will shift themselves to vacate the area of the column that was clicked. slay ๐ซถ
- click "mouse-right" button, or press "C" or "c" keys, to clear the abacus.
- press "-" or "_" keys to complement the beads on the rails.
- press "U" or "u" keys to undo last move.
- press "R" or "r" keys to redo the last undo.
- press "I" or "i" keys to increment the number of rails. press "D" or "d" keys to decrement the number of rails.
- press "F" or "f" keys to switch between Chinese, Japanese, Korean, Russian, Danish, Roman, and Medieval formats. there is an extra "Generic" format โ this allows one to break some rules binding the other formats (for example, if one wanted more beads on top deck than on bottom deck you would use this, in addition to resource option changes).
- press "V" or "v" keys to change the Roman Nvmerals format. (pardon typo/humor, but ran out of letters ๐ญ)
- press "~" key to toggle Latin Numerals (when Roman Nvmerals and quarter beads or twelfth beads are activated).
- press "G" or "g" keys to toggle (usu.) commas between groups of digits.
- press "#" key to toggle place on rail (or between rails) for group and decimal separators.
- press "|" key to toggle vertical placement (best for Russian and Danish Abacus, and Medieval Counters).
- press "S" or "s" keys to toggle the sign bead.
- press "P" or "p" keys to change the piece setting from none|quarter|eighth|twelfth beads. originally intended for the Roman Hand Abacus (twelfths) and the Russian Abacus (quarter rubles).
- press "T" or "t" keys to change piece percent setting for none|quarter|eighth|twelfth beads. originally intended for the older Russian Abacus (quarter kopeks).
- press "B" or "b" keys to change subdeck setting to be interpretted as none|quarter|eighth|twelfth beads. originally intended for Roman Hand Abacus twelfths and possibly eighths. for twelfths, the the lowest value of two at bottom of the rightmost column of beads are a twelfth of the column second from right. middle is worth a quarter and the top is worth a half. for eighths, middle and bottom are both worth an eight and the top a half. (for quarters, all are worth a quarter.)
- press "K" or "k" to toggle the subdeck separation.
- press "L" or "l" to toggle which side the subdeck symbols are placed.
- press "M" or "m" keys to switch between it, uk, and fr museum formats.
- press "Z" or "z" keys to change the Roman markerz on the frame. (markerz ๐ we keep it)
- press "O" or "o" keys to toggle the demo mode.
- press "$" key to toggle the teach mode.
- in teach mode, "+" key toggles starting side to sum, ""*" key toggles for starting side for multiplicand.
ngl that line in the original is a little cursed but we reproduce it exactly, bestie, no cap ๐
- press ">" or "." keys to speed up the movement of beads. press "<" or "," keys to slow down this movement.
- press "@" key to toggle the sound.
- press "Esc" key to hide program.
- press "Q", "q", or "CTRL-C" keys to kill program.
the abacus may be resized. beads will reshape depending on the room they have.
Demo Mode: in this mode, the abacus is controlled by the program. when started with the demo option, a second window is presented that should be placed directly below the abacus-window. descriptive text, and user prompts are displayed in this window. pressing 'q' during the demo will quit it. clicking the left mouse-button with the pointer in the window will restart the demo (beginning of current lesson).
๐ OPTIONS ๐
so many options. one bullet each. let's go โจ
-geometry {+|-}X{+|-}Yโ sets the initial position of the abacus window (resource name "geometry").-display host:dpyโ specifies the X server to contact.-[no]monoโ lets you display the abacus window on a color screen as if it were monochrome (resource name "mono").-[no]{reverse|rv}โ lets you see the abacus window in reverse video (resource name "reverseVideo").-{foreground|fg} colorโ specifies the foreground of the abacus window (resource name "foreground").-{background|bg} colorโ specifies the background of the abacus window (resource name "background").-{border|bd} colorโ specifies the foreground of the bead border (resource name "borderColor").-frame colorโ specifies the foreground of the frame (resource name "frameColor").
...and bestie we are SO not done, there's more coming ๐ don't go anywhere ๐ฆ
-primaryBeadColorcolor โ sets the foreground of the beads, bestie โจ (resource name"primaryBeadColor").-leftAuxBeadColorcolor โ the foreground of the beads for the left auxiliary abacus in Lee's Abacus ๐ (resource name"leftAuxBeadColor").-rightAuxBeadColorcolor โ the foreground of the beads for the right auxiliary abacus in Lee's Abacus ๐ (resource name"rightBeadColor"โ yes, that's what it's called, no I'm not kidding, write it down exactly like that).-secondaryBeadColorcolor โ the secondary color of the beads ๐ฆ (resource name"secondaryBeadColor").-highlightBeadColorcolor โ the highlight color of the beads, it's giving main character bead ๐ (resource name"highlightBeadColor").-primaryRailColorcolor โ the foreground of the rails ๐ธ (resource name"primaryRailColor").-secondaryRailColorcolor โ the secondary color of the rails ๐ (resource name"secondaryRailColor").-highlightRailColorcolor โ the highlight color of the rails, periodt โจ (resource name"highlightRailColor").-lineRailColorcolor โ the color of the lines when you're using checkers ๐ฅ (resource name"lineRailColor").-bumpSoundfilename โ points at the file for the bump sound, aka the lil noise the beads make when they move ๐ซถ (resource name"bumpSound").-moveSoundfilename โ the file for the move sound, for when the decimal point marker slides around ๐ (resource name"moveSound").-dripSoundfilename โ the file for the drip sound, which plays when you change the format ๐ง (resource name"dripSound").-[no]soundโ decides whether a sliding bead makes a sound or not, no cap ๐ (resource name"sound").-delaymsecs โ how many milliseconds it takes to move a bead (or a whole group of beads) one single space โฑ๏ธ (resource name"delay").-[no]scriptโ logs the application to stdout every single time the user clicks to move the beads ๐ (resource name"script"). The output is a set of auxiliary, deck, rail, beads added or subtracted, and the number of text lines (4). You can edit this to add text to the lesson and use it as a new demo, keeping the generated numbers and the number of lines constant. (The Windows version writes toabacus.xml.)-[no]demoโ runs it in demo mode ๐. In this mode the abacus is controlled by the current lesson (resource name"demo"). When you start it with the demo option, a window holds descriptive text, and the user prompts show up in that window. Pressing'q'during the demo quits it. Clicking the left mouse-button with the pointer in the window restarts the demo (beginning of the current lesson). The demo usesabacusDemo.xml, and currently there are 4 editions possible: Chinese, Japanese (and Roman), Korean, and Russian (and Danish) ๐.-demopathpath โ the path for the demo, possibly something like/usr/local/share/games/xabacus๐บ๏ธ (resource name"demoPath"), with the file name ofabacusDemo.xml. For this to actually work, the program must be compiled with XML2 โ otherwise it'll use a brief static fallback demo. (Not me warning you in advance, fr fr.)-demofontfontstring โ the font for the explanatory text that shows up in the secondary window during the demo ๐. The default font is 18 point Times-Roman (-*-times-*-r-*-*-*-180-*). The alternate font is8x13.-demofgcolor โ the foreground of the abacus demo window โจ (resource name"demoForeground").-demobgcolor โ the background of the abacus demo window ๐ (resource name"demoBackground").-[no]teachโ runs it in teach mode ๐. In this mode the abacus is controlled by 2 numbers separated by an operator:"+"for addition,"-"for subtraction,"*"for multiplication, and"/"for division. The square root operation is represented by the number to be operated on followed by the character"v"โ which leaves you with an answer from which you must divide by 2. Similarly, the cube root operation is represented by the number to be operated on followed by the character"u"โ which leaves you with an answer from which you must divide by 3. Press the return key to progress through the steps (resource name"teach").-[no]rightToLeftAddโ sets the order for the teach starting side for addition and subtraction ๐งฎ. The default is the traditional left to right. Right to left seems easier though (resource name"rightToLeftAdd").-[no]rightToLeftMultโ sets the order for the teach starting side for multiplication โจ. The default is the traditional left to right. Right to left seems more straight forward (resource name"rightToLeftMult").-[no]leeโ lets you turn the two extra auxiliary abaci on and off ๐ (resource name"lee").-railsint โ the number of rails (resource name"rails").-leftAuxRailsint โ lets you set the number of rails for the left auxiliary abacus in Lee's Abacus ๐ (resource name"leftAuxRails").-rightAuxRailsint โ lets you set the number of rails for the right auxiliary abacus in Lee's Abacus ๐ฆ (resource name"rightAuxRails").-[no]verticalโ lets you set the abacus to allow a Russian orientation ๐ท๐บ (resource name"vertical").-colorSchemeint โ the color scheme for the abacus ๐ (resource name"colorScheme"), where0-> none,1-> darken middle bead (2 beads if even),2-> darken first bead of a group,4-> use secondary color for second half of a row of beads (but if odd color middle bead),8-> use secondary color for second third of a row of beads,16-> use secondary color in alternate groups. Use a mask of 31 for combinations.-[no]slotโ lets you have either slots or rails โจ (resource name"slot").-[no]diamondโ lets you have either diamond or round beads ๐ (resource name"diamond").-railIndexint โ the index of color for the rails of the abacus ๐ (resource name"railIndex"), where a value is0or1.-[no]topOrientโ the orientation of the beads on top โฌ๏ธ (resource name"topOrient").-[no]bottomOrientโ the orientation of the beads on bottom โฌ๏ธ (resource name"bottomOrient").-topNumberint โ the number of beads on top (resource name"topNumber").-bottomNumberint โ the number of beads on bottom (resource name"bottomNumber").-topFactorint โ the multiply factor for the beads on top โ๏ธ (resource name"topFactor").-bottomFactorint โ the multiply factor for the beads on bottom โ๏ธ (resource name"bottomFactor").-topSpacesint โ the number of spaces on top (resource name"topSpaces").-bottomSpacesint โ the number of spaces on bottom (resource name"bottomSpaces").-topPieceint โ the number of pieces on top (resource name"topPiece").-bottomPieceint โ the number of pieces on bottom (resource name"bottomPiece").-topPiecePercentint โ the number of piece percents on top ๐ฏ (resource name"topPiecePercent").-bottomPiecePercentint โ the number of piece percents on bottom ๐ฏ (resource name"bottomPiecePercent").-shiftPercentint โ the shift of rails for piece percents, and it also may influence the precision of the calculation ๐ง (resource name"shiftPercent").-subdeckint โ the special subdecks column (resource name"subdeck").-subbeadint โ the special subbeads (resource name"subbead").-[no]signโ lets you set the abacus to allow negatives โ (resource name"sign").-decimalPositionint โ the number of rails to the right of the decimal point (normally2) ๐ข (resource name"decimalPosition").-[no]groupโ lets you group the displayed digits for readability โจ (resource name"group").-groupSizeint โ the group size to the left of the decimal point (normally3) ๐ (resource name"groupSize").-[no]placeOnRailโ lets you place the decimal and group separators on the rail (or just after) ๐ (resource name"placeOnRail").-[no]decimalCommaโ lets you swap"."for","so you can have a different display format ๐ (resource name"decimalComma").-baseint โ the base used on the abacus (default is base10) ๐ (resource name"base").-subbaseint โ the base for the Roman subdeck, can be set to8or the default of12๐๏ธ (resource name"subbase").-[no]subdecksSeparatedโ lets you have the subdecks separated โ๏ธ (resource name"subdecksSeparated").-[no]subdecksSeparatedโ lets you have the subdecks separated (resource name"placeOnRail").
Okay bestie, not me pointing out that the manpage literally lists-[no]subdecksSeparatedtwice ๐ โ same flag, but the second one carries a different resource name,"placeOnRail". I'm not fixing it, I'm not merging it, I'm just reporting the facts, because that's what the page says. Periodt.
-anomalyint โ the offset from the base for a multiplicative factor of the rail with the anomaly (if there's none, this is set to0) ๐ธ (resource name"anomaly").-shiftAnomalyint โ the offset from the decimal point for the anomaly (usually2) ๐ฆ (resource name"shiftAnomaly").-anomalySq intโ this sets the offset from base for the second anomaly. If thereโs no second anomaly, this is set to0. Resource name:"anomalySq". โจ-shiftAnomalySq intโ this sets the offset in rails from the first anomaly (usually2). Resource name:"shiftAnomalySq". Also the original manpage literally has a chaotic lildoing).at the end of this entry, so weโre preserving that lore ๐-displayBase intโ this sets the base displayed (default is base10). Resource name:"displayBase". If this is different from"base", then it is implemented using"long long"and the calculation is limited by its bounds. Also the fractional part does not scale with the"displayBase", so if the"displayBase"is greater than the"base"it loses some precision. Also no rounding is done. Periodt.-[no]pressOffsetโ lets you put a pixel space between all the beads so there is room for the bead to move when pressed. Resource name:"pressOffset". Cute.-romanNumerals {none|ancient|modern}โ lets you set the abacus to allow Roman Numerals. Resource name:"romanNumerals". Modern Roman Numerals above3999are normally represented with bars on top, but due to ASCII constraints this is represented instead in lower case (historically case was ignored). Roman Numerals above3,999,999were not represented historically. Roman numerals change withdisplayBasein an"experimental"way. When used with twelfths and subdecks, named fraction symbols are used. Due to ASCII constraints the sigma is represented asE, the backwards C is represented asQ, the mu as au, and the Z with a-through the center as az. If available, decimal input is ignored. ๐-[no]latinโ lets you set the abacus to allow latin fractions instead of symbolic in the Roman numeral output. Resource name:"latin". Obsessed.-romanMarkers {none|ancient|modern|late|alt}โ lets you set Roman numerals of a specific type on the frame of the abacus. Resource name:"modernRoman". Yes, the resource name ismodernRoman, notromanMarkers. The lore is lore-ing.-chineseโ specifies the format on the abacus (resource name"format") to"Chinese"for the Chinese Suanpan. โจ-japaneseโ specifies the format on the abacus (resource name"format") to"Japanese"for the Japanese post-WWII Soroban. This is also similar to the Roman Hand Abacus.-koreanโ specifies the format on the abacus (resource name"format") to"Korean"for the Korean Jupan or Japanese pre-WWII Soroban.-russianโ specifies the format on the abacus (resource name"format") to"Russian"for the Russian Schoty. To complete, specifypiece"to be4, for the older Schoty also specifypiecePercent"to be4. The quotes are doing their own thing, iykyk.-danishโ specifies the format of the abacus (resource name"format") to"Danish"for the Danish Elementary School Abacus teaching aid.-romanโ specifies the format on the abacus (resource name"format") to"Roman"for the Roman Hand Abacus, note beads move in slots. To complete, specifyromanNumerals". Yes, that quote is in the original. We donโt question the icon.-medievalโ specifies the format of the abacus (resource name"format") to"Medieval"for the Medieval Counter, with counters instead of beads.-genericโ specifies the format on the abacus (resource name"format") to"Generic". This option specifies a format that is more configurable by using resources, since there are few rules to govern its behavior.-museum {it|br|fr}โ specifies the country code for the museum of the abacus in the Museum of the Thermae, Rome, the British Museum, London, or the Cabinet de medailles, Bibliotheque nationale, Paris.-versionโ tells you what version of xabacus you have. ๐
โจ REFERENCES โจ
- Luis Fernandes
https://www.ee.ryerson.ca/~elf/abacus/ - Lee Kai-chen, How to Learn Lee's Abacus, 1958, 58 pages.
- Abacus Guide Book, 57 pages.
- Georges Ifrah, The Universal History of Numbers, Wiley Press 2000, pp 209-211, 288-294.
- Review of the above:
http://www.ams.org/notices/200201/rev-dauben.pdf - David Eugene Smith, History of Mathematics Volume II, Dover Publications, Inc 1958, pp 156-195.
๐ SEE ALSO ๐
X(1)xcubes(6)xtriangles(6)xhexagons(6)xmlink(6)xbarrel(6)xpanex(6)xmball(6)xpyraminx(6)xoct(6)xrubik(6)xskewb(6)xdino(6)
๐ COPYRIGHTS ๐
ยฎ Copyright 1994-2021, David A. Bagley
Luis Fernandes, <elf AT ee.ryerson.ca> wrote an independent program (xabacus 1.00) with a demo mode and postscript file. I tried, with his permission, to take the best features of both into one program. Also, I had help with some of the abacus in the Java version by Sarat Chandran, <saratcmahadevan AT yahoo.com> and some of these ideas were ported back into this X version.
๐ญ BUG REPORTS AND PROGRAM UPDATES ๐ญ
Send bugs (or their reports, or fixes) to the author:
David A. Bagley, <bagleyd AT verizon.net>
The latest version is currently at:
https://www.sillycycle.com/abacus.html http://www.ibiblio.org/pub/Linux/apps/math/
This page is serving V8.3.6, dated 23 Apr 2021, and itโs XABACUS(6) โ slay, bestie. ๐
โจ
๐ฆ where this page comes from
- debian bookworm: xabacus 8.5.1-1 ยท Custom
- debian bookworm: xmabacus 8.5.1-1 ยท Custom
- debian trixie: xabacus 8.5.1-1+b1 ยท Custom
- debian trixie: xmabacus 8.5.1-1+b1 ยท Custom
- ubuntu noble: xabacus 8.5.1-1build2 ยท Custom
- ubuntu noble: xmabacus 8.5.1-1build2 ยท Custom
- ubuntu questing: xabacus 8.5.1-1build2
- ubuntu questing: xmabacus 8.5.1-1build2
- ubuntu resolute: xabacus 8.5.1-1build3 ยท Custom
- ubuntu resolute: xmabacus 8.5.1-1build3 ยท Custom
- ubuntu stonking: xabacus 8.5.1-1build3 ยท Custom
- ubuntu stonking: xmabacus 8.5.1-1build3 ยท Custom
- Copyright 1994 - 2021 David A. Bagley
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms