2013-03-26 GnuCash IRC logs

00:08:33 *** nodje has joined #gnucash
01:25:08 *** ErKa has quit IRC
03:45:52 *** Bodhi-Baum has joined #gnucash
04:14:35 *** Bodhi-Baum has quit IRC
04:28:11 *** Krzysiek_K has quit IRC
05:14:35 *** nodje has quit IRC
06:00:38 *** aqua___ has joined #gnucash
06:31:17 *** Jimraehl has left #gnucash
07:05:30 *** Jimraehl has joined #gnucash
07:10:23 *** fell_ has joined #gnucash
07:10:24 *** gncbot sets mode: +o fell_
07:11:03 *** rouch has joined #gnucash
07:15:38 *** rouch has quit IRC
08:13:59 *** shanny has joined #gnucash
09:13:37 *** shanny has quit IRC
09:31:31 *** aqua___ has quit IRC
10:21:11 *** joslwah has joined #gnucash
10:22:29 <joslwah> O.k. Next question. Can xaccAccountForEachTransaction be used from guile? If so how do you define the callback function? Doing (lambda (x y) blah) doesn't seem to work.
10:22:52 <joslwah> Alternatively, is there a way of getting a list of all the transactions in an account?
10:28:32 <warlord> I dont think that you can call that API from Scheme. You can use xaccAccountGetSplits
10:29:00 <warlord> (then you just need to handle the case of multiple splits from the same transaction into the same account)
10:31:30 *** ErKa has joined #gnucash
10:32:05 <joslwah> That's not a problem.
10:32:20 <joslwah> O.k. So where do I find docs on xaccAccountGetSplits?
10:33:52 <joslwah> And where is it defined? I can't find it with find and egrep.
10:36:00 <joslwah> Do you mean xaccAccountGetSplitList?
10:38:20 <joslwah> I think you do, and that gets me going. Thanks.
10:42:05 <warlord> Yes, that's the API
10:45:03 <joslwah> Presumably you can just do something like get the transaction and then find the GUid of the transaction and confirm that you haven't seen it before?
10:49:41 <warlord> Yes, that's certainly one option, but you have a shortcut, which is that multiple splits for the same transaction should be adjacent in the list, so you just need to see if "this split's txn" is the same as the 'previous split's txn"
10:49:53 *** cphuntington97 has joined #gnucash
10:50:12 *** calbasi has joined #gnucash
10:50:12 <joslwah> Should, or always are?
10:54:41 <warlord> I don't think I can guarantee "always", but it should due to the way the list is sorted.
10:55:03 <joslwah> You mean, I can claim that it should be and if it isn't then it wasn't my fault everything went wrong?
10:55:07 <joslwah> 8-)
11:02:23 <warlord> LOL
11:02:29 <warlord> Well, test your data and see ;)
11:03:53 <joslwah> At the moment I'm just playing with a report that will delete all the transactions associated with an unreconciled split in a given account.
11:04:08 <joslwah> So, I'm not sure that my data being safe is a good assumption.
11:15:03 <joslwah> Right, that works now, assuming that the first split of a transaction that occurs within an account is unreconciled.
11:17:34 *** kpreid_ has joined #gnucash
11:20:26 *** kpreid has quit IRC
11:20:27 *** kpreid_ is now known as kpreid
11:26:16 <warlord> I dont understand what you're trying to do.
11:27:14 <warlord> Note that if you delete the transactions as you're processing the split-list you may wind up with a crash as the list gets modified from under you (or, more likely, an object gets destroyed from under the list)
11:27:34 <joslwah> Honestly. At the moment I'm playing and working out how to do things.
11:27:52 <joslwah> So, I need to collect a list of transactions to delete and then delete afterwards?
11:27:57 <joslwah> I was wondering about that.
11:28:18 <joslwah> Except that I'm given the full split-list first (in the guile) so it shouldn't be a problem should it?
11:28:26 <joslwah> I'm not using any of the iterators.
11:28:31 <joslwah> At least not directly.
11:29:01 *** calbasi has left #gnucash
11:29:20 <joslwah> I've not managed to create a crash yet, and I'm testing on randomly ordered data.
11:30:07 <warlord> Well, I'm not sure why you need to delete anything. But here's the issue. You're given a list of splits. Let's say you're at item #X and delete the transaction. Item #x+1 is a split also associated with the transaction. When you iterate to the next item in the list (X+1) it will be pointing to a deleted split.
11:30:45 <warlord> This issue will only occur if you have split transactions with multiple splits into the account in question.
11:30:49 *** aqua___ has joined #gnucash
11:31:00 <joslwah> And I can't check the parent since it doesn't exist any more.
11:31:04 <warlord> Right.
11:31:17 <joslwah> Yeah. I'll need to work out a way round that.
11:31:46 <joslwah> In a sense, that is the sort of thing I'm trying to work out. So I work out the edge cases first.
11:32:46 <warlord> I would iterate over the split-list and collect a list of to-be-deleted transactions. Then iterate over the second list and delete them.
11:33:44 <joslwah> Exactly what I've just coded.
11:34:08 <joslwah> Oooo, and it worked first time. I always worry when that happens. 8-)
11:34:16 <warlord> LOL
11:34:46 <joslwah> Having said that, if I were writing in Common Lisp I'd expect it to work first time, since typos and the like get picked up by SLIME.
11:37:00 <warlord> :)
11:37:34 <joslwah> One of the advantages of LISP (and guile counts for this purpose) is that changes like the one you described are really easy. Much quicker and easier than in C.
11:39:50 <warlord> Yes, I know.
11:40:30 <warlord> My main issue with guile is that you don't get syntax errors until runtime (e.g. wrong # of arguments to a procedure, or wrong type of objects).
11:43:12 <joslwah> I'm getting frustrated by that as well. When using SLIME I get all the information about what the args are, and what optional args there are etc.
11:43:20 <joslwah> And it makes it really quick and easy.
11:43:53 <joslwah> Also, there isn't the separation between write-time, compile-time and run-time. They merge, which makes for incredibly fast dev.
11:43:59 <joslwah> And I'm missing that at the moment.
11:44:17 <warlord> I understand.
11:44:42 <joslwah> Also, the problem that if a routine isn't called then errors aren't noticed. But that is a side-effect of the LISP background because it might be an error now, but that part may be rewritten before it ever gets run.
11:44:59 <joslwah> But in the context of merging with C it doesn't sit that nicely.
11:53:15 <warlord> Yeah.
11:53:38 <joslwah> Right. I think that's enough for now. Other jobs on the list. 8-(
11:53:40 <warlord> When you are doing a code rototill there's no good way to notice quickly that you missed a change.
11:54:11 *** benoitg has joined #gnucash
11:54:51 <joslwah> Thanks for the help. Is there a reason there isn't a file-selector option among the different types of option? I'm thinking the best way of having the interface is that it will load the base data from a file.
12:11:50 <warlord> Probably because nobody needed one.
12:13:49 <joslwah> O.k. Right. I'm off. Thanks again.
12:14:02 <warlord> later
12:16:11 *** joslwah has left #gnucash
12:21:22 *** benoitg has quit IRC
12:25:22 *** rpg has joined #gnucash
12:34:11 *** jtp273 has joined #gnucash
12:37:46 *** rpg_ has joined #gnucash
12:37:46 *** rpg has quit IRC
12:38:26 <jtp273> I have been using gnucash since Jan 1, 2009 - so I have data in all my accounts going back to 1/1/2009. Over 1MB of data. Is there a way to get rid of everything before 1/1/2012 to make the file smaller? Or way to improve the speed when loading?
12:39:52 *** aqua___ has quit IRC
12:45:28 <warlord> jtp273: unfortunately we don't really have a good tool to do that. My suggestion is to just leave the app open :)
12:46:51 <jtp273> Ok, thanks for the reply.
12:49:06 <warlord> There was a perl script written and emailed to the -user list that might do it..
12:49:20 <warlord> But of course any changes to your data files might cause data corruption.
13:02:05 *** jtp273 has quit IRC
13:02:28 *** jtp273 has joined #gnucash
13:04:56 *** jtp273 has left #gnucash
13:18:25 *** StuM1 has quit IRC
14:19:45 *** shanny has joined #gnucash
14:27:13 *** ErKa has quit IRC
14:39:02 *** aqua___ has joined #gnucash
14:59:22 *** deSt has joined #gnucash
15:01:37 *** deSt has quit IRC
15:03:40 *** ErKa has joined #gnucash
15:15:35 *** aqua___ has quit IRC
15:17:52 *** benoitg has joined #gnucash
15:29:43 *** shanny has quit IRC
15:37:49 *** KaiForce has joined #gnucash
16:26:16 *** Krzysiek_K has joined #gnucash
16:27:57 *** Krzysiek_K has left #gnucash
16:59:43 *** StuM has joined #gnucash
17:02:38 *** arrainey has joined #gnucash
17:12:53 *** arrainey has quit IRC
17:13:26 *** arrainey has joined #gnucash
17:18:41 *** arrainey has quit IRC
17:19:14 *** arrainey has joined #gnucash
17:22:20 *** aqua___ has joined #gnucash
17:29:54 *** arrainey has quit IRC
17:30:26 *** arrainey has joined #gnucash
17:38:23 *** aqua___ has quit IRC
17:50:50 *** arrainey has quit IRC
18:11:23 *** rpg_ has quit IRC
18:43:36 *** benoitg has quit IRC
18:50:06 *** ErKa has quit IRC
19:04:10 *** fell__ has joined #gnucash
19:04:10 *** gncbot sets mode: +o fell__
19:11:57 *** fell_ has quit IRC
19:41:55 *** fell__ is now known as fell
19:58:38 *** arrainey has joined #gnucash
20:03:41 *** arrainey has quit IRC
20:04:13 *** arrainey has joined #gnucash
20:09:15 *** arrainey has quit IRC
20:09:48 *** arrainey has joined #gnucash
20:14:50 *** arrainey has quit IRC
20:15:21 *** arrainey has joined #gnucash
20:20:23 *** arrainey has quit IRC
20:20:56 *** arrainey has joined #gnucash
20:26:01 *** arrainey has quit IRC
20:26:34 *** arrainey has joined #gnucash
20:36:46 *** arrainey has quit IRC
20:37:19 *** arrainey has joined #gnucash
20:47:32 *** arrainey has quit IRC
20:48:05 *** arrainey has joined #gnucash
20:57:29 *** KaiForce has quit IRC
21:05:08 *** arrainey has quit IRC
21:05:40 *** arrainey has joined #gnucash
21:10:42 *** arrainey has quit IRC
21:11:15 *** arrainey has joined #gnucash
21:16:18 *** arrainey has quit IRC
21:16:51 *** arrainey has joined #gnucash
21:16:57 *** benoitg has joined #gnucash
21:18:26 *** benoitg has quit IRC
21:25:01 *** nodje has joined #gnucash
21:32:27 *** arrainey has quit IRC
21:33:00 *** arrainey has joined #gnucash
21:38:28 *** ErKa has joined #gnucash
21:43:30 *** arrainey has quit IRC
21:48:24 *** nodje has quit IRC
21:48:58 *** nodje has joined #gnucash
22:31:52 *** TommyT has joined #gnucash
22:57:25 *** kpreid has quit IRC
22:58:01 *** kpreid has joined #gnucash
23:01:28 *** TommyT has quit IRC
23:02:30 *** kpreid has quit IRC
23:02:55 *** kpreid has joined #gnucash
23:18:52 *** ErKa has quit IRC
23:21:15 *** fell has quit IRC