Tech Is Hard

Credibility = Talent x Years of experience + Proven hardcore accomplishment

PIM using REBOL 1

OK. Something new. Ideas beget [usually bigger] ideas, before they’re even fully hatched.
I took a look at finance41 this last weekend. Very cool. It gains both simplicity and freedom for the user in terms of input. You can see a resemblance between its syntax and other formats like tweets and RTM for GTD.

It makes me wonder about financial software I use and the style I think we’re accustomed to.  With strict representations not only of specific bank accounts, et al., but also of categories of spending.  Hierarchical categories (categorization is another topic to hit on big time) , arguably the least useful way to find things.  In finance41, you decide what’s an account and what tags you want to apply to a transaction.  In that environment, it makes sense to make accounts only for your assets and liabilities and use tags for expenses and incomes.

It allows a query by multiple tags or defining macro tags, allowing me to slice and dice the data any way (that’s not available in f41, yet).  An example transaction in f41 is

@visa -119.23 on 23 Jul tile cutter from ace hardware #home #diy #kitchen

(Anything that’s not a date, amount, account or tag goes in the description field — but the separate items can appear in any order).  I can’t for the life of me see now why I need to be so formal as I have about the expense and income categories. I know what you’re thinking, “won’t that record the transaction in multiple registers and cause integrity issues?” Not if there’s no register or journal representing an expense or income. Just scan the transactions based on tags, which could be predefined in sets for convenient reporting.

Another thing I’d add is allow the tags and description to interleave.

And vastly expand the idea using REBOL.

I wrote these parse rules:

sentence:    [ copy the-subject subject 
               date-rule amount-rule (find-ctx the-subject)]
subject:     [ #"@" letter-char any name-char ]
date-rule:   [ thru "on" 
               some ws copy the-day day-rule 
               some ws copy the-month month-rule 
amount-rule: [ opt sign-char any digit-char opt ["."] 0 2 digit-char ]
day-rule:    [ [#"1" | #"2" | #"3"] [#"0" | #"1"] |
               [#"1" | #"2"] digit-char |
month-rule:  [ "JAN" | "FEB" | "MAR" | "APR" | "MAY" | "JUN" |
               "JUL" | "AUG" | "SEP" | "OCT" | "NOV" | "DEC"
ws:          charset reduce [tab newline #" "]
name-char: [ letter-char | digit-char ]
letter-char: charset [#"A" - #"Z" #"a" - #"z"]
sign-char: [ #"+" | #"-" | none ]
digit-char: charset [#"0" - #"9"]

and a sample sentence of:

sampleStatement: “@visa on 19 Dec -230.21”

In the sentence rule, we call find-ctx with the value we found for @visa (or anything else beginning with ‘@’). find-ctx looks like

find-ctx: func [{find, inseet or update context} ctx [string!]][
	either found? ctx: find myContexts new-ctx: copy ctx [
		do ctx/2
		print ["new context" new-ctx] 

(BTW the parse is returning false right now, which means it’s not completing properly, but it is getting all my data, and since we’ll be adding a bunch of stuff to this, I’m not going to sweat it.)

>> myContexts: [] parse/all sampleStatement sentence
new context @visa
== false
>> myContexts: ["@visa" [print "a visa charge"]] parse/all sampleStatement sentence
a visa charge
== false

When a context is found we can execute code specifically for it. I hope to gather information as they’re added to make some sort of meta connections.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: