Accounting-useful Vocabulary & Methods in CoSy
Presentation Text ( script , executed lines )
| ======================== | Sun.Aug,20230820 | ======================== | | 1032 | | 1154 |* Intelligent Paper . Possible in Forth but not in C IF YOU ARE GOOD AT NUMBERCRUNCHING NO MATTER YOUR `DRUTHERS THE MOST VALUABLE TO CRUNCH ARE ONES WITH CURRENCY SYMBOLS ATTACHED > ENTERPRIZES ARE ACCOUNTING STRUCTURES WITH PEOPLE ATTACHED < BOARD ROOM SYSTEMS https://www.cosy.com/BobA/vita.htm APL level tasks : Xerox , RGE , Manhattan APL+PC.CoSy , MEJA Trust o So far have avoided renaming Forth words | exception | alias: $ swap | Thu.Aug,20230824 BAA Zoom comparison w https://dyalog.com APL showed how much simpler w equivalent ` power but more immediate transparent documentation 4th.CoSy is THERE'S NO QUESTION WHETHER YOU CAN OR CAN'T DO SOMETHING It's all open code so you can always roll your own | ================================================== | | ACOUNTING USEFUL VOCABULARY & METHODS | | DAILY INLINE LOG LEDGER ENTRIES ` C:\CoSyBob\BobA.csy F>/\ ` text v@ s" | Sun.Jan,20230101 | " prt>=f rShow R0 ` .\CoSy\AcntFns.f F> `( rUpdate Eval )` 1 _at Eval : ledgerlns lfVM s" (' " con ['] dlb 'm s" (' " in { s" ')" prt<=l } 'm ; t0 ' Eval 'm >t0> fmt rUpdate t0 flip >t0> fmt rUpdate t0 fmttbl| rUpdate t0 3 _at ' +/ 'm ,/ +\ enc' enc t0 $ cL fmttbl| rUpdate | append running balance | CONVERSION OF ACCOUNT .CSV DOWNLOADS ` C:\CoSyBob\acnts\y23\BobA\Chase4301ytd.CSV F> >t0> t0 rUpdate t0 "lf ` , ,L csv>DT >t1> t1 # t1 #' t1 dsc t1 1 _at t1 fmtDT rUpdate t1 dsc { "bl ssd } 'm enc t1 0 _at! t1 dsc | t1 dsc blMV |>| TransactionDate PostDate Description Category Type Amount Memo t1 `( TransactionDate Description Amount Memo Category Type PostDate )` dsel >t1> t1 1th ' reverse 'm enc t1 1 _at! t1 DT>lst flip fmttbl| rUpdate t1 >T0> T0 fmtDT rUpdate T0 1th >t1> t1 fmttbl| rUpdate t1 dsc ' m/d/y>ts 'm enc t1 0 _at! t1 2 _at ' str>f 'm enc t1 2 _at! | ` C:/CoSyBob/acnts/y22/BobA/AmazonChase.cdt F>/\ 1th flip -1 _at 3 _at |>| -43.21 (' 20230101 _i s" Opening Balance " -43.21 _f -43.21 _f ec ec ec ') R0 enc T0 1th flip cL flip >t1> fmttbl| | ( tbl (' DataCol ResCol ') -- insert running total of DataCol in ResCol ) | 20230705 | from ` acnts work : tblbal 2p> dsc at ,/ +\ enc' enc L@ R@ 1th at! 2P ; t1 i( 2 3 )i tblbal t1 fmttbl| rUpdate t1 enc T0 1 _at! ` Balance enc T0 dsc 3 _at! `( date description amount balance )` T0 dsc 4 _iota at! T0 fmtDT rUpdate | T0 ` C:/CoSyBob/acnts/y23/BobA/AmazonChase.cdt \/>F ` C:/CoSyBob/acnts/y23/BobA/AmazonChase.cdt F>/\ fmtDT rUpdate *| 1218 | In after-chat about the possibility of High Level Language in Forth . I commented that APLs , array programming languages are the highest , in a class by themselves , And CoSy is one . They extract the most generic computing structures and operations into a concise vocabulary . Don Golding in particular raised the question of learning yet another language . This is a classic issue in APL which has evolved and generalized from matrix algebra . It is worth noting that therefore the vocabulary and the expression of algorithms tends to be intrinsically parallel . Mathematics is a matter of learning language ; learning a vocabulary where many of the definitions may be difficult and ` strange . But the effort to learn is repaid by the abilities the words provide . This has been aptly said about APL , I believe even by Ken Iverson himself , -- and can be well applied to Forth . The impromptu comparison at the British APL Association Zoom Thursday 20230824 between Adám Brudzewsky of Dyalog APL demonstrating the parameters to ⎕CSV and ( 1200 ⌶ ) something to me showed the significant simplicity and immediacy of understanding provided by CoSy's open definitions and simple ` help vocabulary particularly ` :?? which finds the definitions of words in the scripts making up CoSy
and returning surrounding text delimited by totally empty lines .
Definitions of words themselves provide examples of usage of all the
words defining them .As an example , here are the definitions of all the words used in Saturday's demo in order of their use , starting with the text being copied in to T0 . It is important to understand that CoSy is just a vocabulary in Forth and when you tap F6 it executes directly in ( Reva ) Forth . CoSy words . I see there are 35165 characters in 1243 lines in the result so I've put it in a scrolling window . You will see there are often families of similar words which , for instance , return an underlying boolean ` vector of occurrences where a tested condition is true , the corresponding indexes , and the actual values . Words that are in the underlying Reva Forth scripts don't follow the empty line convention so whole surrounding blocks of code are returned . It is clear many words need to be better documented . Any dates refer to dates in my Worklogs on which the word was defined or modified .I trust this gives some indication of the facilities for learning the meanings and usages of CoSy words . A top priority is replacing the development GUI with more standard web browser interface & tools , in fact making CoSy webspaces available as a ` service . Then it would be reasonable to have the help on a word appear in a tool tip when hovering on it . I also hope this gets across what a powerful environment CoSy is for Forth development itself . See αlphas for charter subscription offer . Bob A | 20230828.2020 | Email<>BradN , SV-FIG Brad , I very much appreciate your well intentioned feedback . After I get accounting in order the rest of this month , upgrading the documentation will be a priority . CoSy has been brought this far as a solo effort ( upon the Reva Forth base ) despite some rather significant difficulties and with revenue which rounds to $0 . It has been , first of all a matter of bushwhacking a path from open-to-the-chip ( x86 ) Forth to the dynamic lists of APL/K . The CoSy.f you reference is the main CoSy script , and what order you see comes from order of definition as needed structures or vocabulary are defined . For instance ` operators , aka adverbs , verbs which take ` ticked ( addresses of ) verbs , are defined pretty much together , eg: all the ` eac h adverbs :
'm 'd 'L 'R `( monadic dyadic Left Right )` . As are
more everyday level definitions in furniture.f
. You will see a number of families of words , in APLs relegated
to separate libraries like the venerable Finnish
idiom list . I contend far more meaningful names can be
created with Chuck Moore's brilliant simplicity of whitespace being
the prime delimiter than trying to stuff everything useful into a
rich but limited number of symbols . ( I like
symbols otherwise I never would have gotten into APL ; I look
forward to the openness of Unicode . ) K and J
are a step backwards trying to make do with ASCII , but without the
clarity of the whitespace rule . For instance , the vocabulary which returns portions of lists before or after , either including or excluding the delimiter : I think they are rather self-explanatory and such names are only possible in Forth . The alternative would be names like part_before_including_first . If you want to make a set of such aliases be my guest .| 20190203 | \/ | vocabulary found useful over the years | \/ | There is no question programming in CoSy , even for me , is often finding the word which does some task rather than reinvent the process . Early on , when definitely still in K.CoSy , I made a table of all the Reva .Forth words , linked in the F1 help . And definitely a cheat sheet is needed . I went to Antwerp to get one for K😉: https://cosy.com/language/index.html#K , https://cosy.com/views/APL94.txt : I'd contend that math notation in general just started out as " personal shorthand " , eg: Dirac bra and ket ( which I dislike ) . Donald McIntyre in particular used to give talks at APL conferences on such things as the history of ` + .At his workshop, Arthur handed out a 2-sided, 8-panel, K I'm not against having more verbose aliases for anything found to be cryptic . But having a set of related words like ` memb Wordsfor membership , either returning booleans or values or their complements would get too prolix for me . Ironically , if I could think of good mnemonic symbolic ` abbreviations for ` reverse and ` take I would have . A couple of other words you mention , like VM ( vector to matrix ) , are more historical idiosyncrasies . Transliteration tables are trivial at the array level . But while I think the fundamental notions underlying languages are best products of single heads , it then takes a community to winnow a most mutually understandable vocabulary . I don't know that I would call APLs or K " domain specific " . One of the brilliances was to extend array structures to characters , and nests of arrays themselves . The idea of simplifying to lists-of-lists goes back at least to Backus . Their limitation is closing off " lower level " sequential item-by-item processing . That's where CoSy being simply a vocabulary in open Forth is in a class by itself . What it needs now is more heads -- and the accounting structures to manage their contributions -- and calculate the vig for the governments . Current CoSy is only the trail bushwhacked from coast to coast . There's lots to be done before it's a smooth autobahn -- simply a facility available on the cloud or mated to particular hardware . Thank you for your very useful and needed feedback . Bob A | -- On 2023-08-28 22:49, Brad Nelson wrote:
Peace thru Freedom Honesty enforced thru Transparency ,
_______________________________________________ --
|