00:00:00 --- log: started forth/21.06.28 01:06:51 --- quit: rain3 (Ping timeout: 120 seconds) 01:43:25 --- join: rain3 joined #forth 02:40:58 --- join: Glider_IRC__ joined #forth 02:43:49 --- quit: Glider_IRC_ (Ping timeout: 120 seconds) 03:34:10 --- quit: X-Scale (Ping timeout: 120 seconds) 05:55:26 --- join: Frek joined #forth 06:03:45 --- quit: Frek (Quit: ) 09:20:53 siraben: ah, neat; I was watching the OPLSS security-typed-languages lectures the other day, sounds like this is the same thing 09:42:53 tabemann - regarding aligned word access being atomic on ARM - that's often not the case because of the odd caching model. You MUST use load exclusive followed by store exclusive to have any confidence your operation is atomic. 10:34:13 --- quit: rain3 (Ping timeout: 120 seconds) 11:58:53 --- join: X-Scale joined #forth 12:18:16 I asked Dan a question about installing avrforth on atmega328P, and he responded by putting a new release on the site with support for 328*, 168p, and 88p: 12:18:20 http://krue.net/avrforth/ 12:18:35 I forgot my programmer today, but was planning to try uploading that tomorrow 13:56:21 --- quit: cbridge_ (Quit: bye) 13:56:31 --- join: cbridge_ joined #forth 14:40:57 --- join: Glider_IRC_ joined #forth 14:43:51 --- quit: Glider_IRC__ (Ping timeout: 120 seconds) 14:59:18 maw 15:11:33 wam 15:18:07 maw dave0 15:24:31 super maw io 15:26:41 maw crc 15:27:38 what is maw 15:27:46 like a condensed 'morning'? 15:33:21 --- join: mark4 joined #forth 15:33:21 --- mode: ChanServ set +o :mark4 15:34:45 http://dpaste.com/EJC2J9TKC <-- can anyone here tell me wtf i screwed up in my list management code that makes the directory listing NOT sorted right? 15:34:53 been banging my head against this wall for 4 days 15:50:16 mark4: that's not forth code! 15:50:56 it could be, dave 15:51:02 you just have to believe 15:52:01 close enough for government work :) 15:54:23 mark4: could it be that add_entry cannot put d2 at the head of the list? 15:54:58 mark4: try adding entries in this order: bbb ccc aaa 15:55:09 mark4: see if it comes out as aaa bbb ccc 15:56:30 add_entry seems to be right 15:56:39 but if its not i cannot see HOW 15:57:01 i have changed the sense on the sort too 15:57:06 mark4: readdir() is at the mercy of the underlying filesystem 15:57:13 it changes the order but it does not result in a sorted list 15:57:23 if you want the entries ordered by name in any reliable sense, you have to do it yourself 15:57:53 i am doing it myself 15:58:05 but dirs and files while kept separate are not properly sorted 15:58:17 i even wrote a custom version of strcmp to see if somehow there was a bug in that 15:58:24 highly highly unlikely but i had to test 15:58:26 mark4: going by your comment on line 222, you always insert n2 /after/ n1, but what if n2 should be the new head of the list? 15:58:42 thats taken care of 15:59:09 node_insert() handles the case of an empty list 15:59:17 so does the append() function 15:59:43 mark4: no no not an empty list... what if the list already contains bbb ccc and you try to add aaa 16:00:22 the strcmp should not allow out of order insertions 16:00:25 thats the problem 16:00:33 im getting out of order insertions or something 16:01:14 mark4: first time around the loop in add_entry, n1 points to bbb ... then you compare and aaa should come /before/ n1 ... but there's nowhere in the code to handle that case 16:01:55 mark4: i think that adding aaa to a list of bbb ccc, your current code would give bbb aaa ccc 16:02:00 no. n1 points to the head of the list. if the new entry is greater than the current item n1 then we do n1=n1->next 16:02:11 till the current scanned item is greater than the one were adding 16:02:25 how? 16:02:55 oooh! 16:03:17 if we nave bbb ccc ddd as the lsit and i try to add aaa there is nothing to handle that? 16:03:31 i.e. the item being added is smaller than the item at the head of the list! 16:03:36 mark4: i think so 16:03:38 that might be it! 16:03:42 mark4: yes :-) 16:03:51 i haven't tested your code, i just went by inspection 16:04:18 working in languages without proper repls isnt fun :( 16:06:31 ok that was def part of it 16:07:26 eris[m]12: forth's repl is what drew me to forth :-) 16:08:08 i have only ever used edit-compile-run in c for so many years :-( 16:08:12 so there must be more than one problem because fixing that only partially fixed the unsortedness 16:10:29 a bytepusher? 16:10:55 http://dpaste.com/5LMKVQFC7 16:11:05 ah! 16:13:42 mark4: from gdb, it looks like every entry falls through to line 223 where l->head != NULL && n1 == l->head - in other words every entry is being inserted after the first entry of the list, or becomes the first entry if the list is empty 16:13:56 ah, this is one of the list of memory addresses 16:14:20 HOW? WHY? 16:14:31 thats like saying the string compare is not working 16:14:42 and if thats the case my rewrite of it failed identically 16:15:13 you can check this by setting a breakpoint on add_entry and stepping through 16:17:35 but WHY is it doing that? 16:18:06 if(cmp <= 0) that if is never true? 16:18:13 cmp = strcmp(d2->name, d1->name); 16:18:20 then this call never returns a value <= zero 16:18:52 consider d1->name is always "." 16:19:07 it cant be 16:19:11 that can only happen once :) 16:19:20 there can never be more than one . in a dir :) 16:20:18 ah wait, sorry, i screwed up that strcmp line when copying it 16:20:55 :) 16:24:04 mark4, did you try printing out the whole list every time you insert something? 16:27:13 i didnt think of that :) 16:35:28 ok things are def getting added out of order :( 16:35:39 http://dpaste.com/4NRS2YAUG 16:37:18 it def looks like items are being appended onto the end of the list 16:37:53 which tells me strcmp is returning wrong results but I absolutely do not believe that 16:49:44 mark4: https://dpaste.com/63DE2X72T 16:53:13 that doesnt make sense 16:55:01 output looks correct here though 16:56:15 yea but i dont understand it 16:57:12 it IS correect now but i TOTALLY do not understand how you even came up with that or what it is doing 16:57:19 node_insert(n1, n2); 16:57:44 n2->payload = d2; 16:57:47 and it invalidates that line 16:59:44 how does that work? 17:00:02 ive been fighting this for 4 days solid 17:00:12 if cmp < 0, then surely d2->name should come before d1->name? 17:00:37 you didn't have a node_insert_before, so that payload SWAP is an improvisation to get one 17:00:38 yea i need to fix my list code to be insert before not insert after 17:00:42 that was a mistake on my part 17:09:22 ty :) 17:09:49 mark4: where can i send the invoice? :) 17:19:29 to joe biden 17:20:12 he lives on pensylvania avenye in washington dc :) 17:20:17 pennsynvania? 17:20:59 pennsylvania 17:21:35 ya double n 17:21:48 1200 i thin but i could be wrong about hta 17:21:53 1700? i ferget 17:22:40 1600 17:25:04 yea 17:25:14 was too lazy to go look it up heh 20:53:56 maw 23:46:21 --- join: rain3 joined #forth 23:59:59 --- log: ended forth/21.06.28