00:00:00 --- log: started retro/14.12.07 01:29:54 --- join: mnemnion (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #retro 01:34:30 --- quit: mnemnion (Ping timeout: 265 seconds) 02:58:15 --- join: crc (sid2647@gateway/web/irccloud.com/x-vapuuqofhujagkjg) joined #retro 03:29:47 --- join: mnemnion (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #retro 03:32:52 Ok, now that I have slept, let's see if I can figure out this negative address STORE thing 03:34:33 --- quit: mnemnion (Ping timeout: 255 seconds) 03:43:44 crc: Any idea what could cause the address to be negative? 04:40:44 --- quit: crc (Ping timeout: 260 seconds) 05:34:09 --- join: crc (sid2647@gateway/web/irccloud.com/x-abtcqertcjgthscq) joined #retro 06:17:32 --- join: probonono (~User@unaffiliated/probonono) joined #retro 07:08:37 --- join: mnemnion (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #retro 09:33:48 not off the top of my head 09:46:28 Ok 09:48:05 The value is always -22881 09:48:24 And there is another value on the stack, which depends on the character I enter 09:56:17 check the subtraction opcode; it might be subtracting the values in the wrong order 10:31:58 Thanks, will do 10:33:06 Yes, it's definitely in the wrong order 10:33:19 I'll fix the other non-commutative operators too 10:34:27 That was it! 10:37:02 Now it doesn't crash 10:37:20 Although I'm not sure if the retro prompt is behaving correctly 10:37:52 * FreeFull looks at the documentation 10:39:15 putn makes it exit without error o.o 10:39:49 Also exits when input the terminating quote for a string 10:40:02 Debug time 10:47:01 --- join: beretta (~beretta@cpe-65-185-42-203.columbus.res.rr.com) joined #retro 10:48:42 debugging should go more smoothly now though 10:51:52 Especially when you're finding bugs for me, without even looking at the code =P 10:52:09 I suppose that comes with having implemented it yourself before 10:55:00 check the GT_JUMP and LT_JUMP as well. GT should be opcode 10, and LT should be 11. (I think this is reveresed in the code you posted yesterday) 11:02:23 lol 11:02:33 what? 11:03:25 crc: cool... can you do that with my crap-tastic programming too? (debug w/o looking) 11:03:33 crc: According to http://retroforth.org/docs/The_Ngaro_Virtual_Machine.html LT is 10 11:04:57 Also putn seems to work for some reason now, strings still make it fail 11:05:45 FreeFull: looking at the VM implementations and metacompiler, this appears wrong. I think the document had them backwards; I’ll update it 11:06:16 beretta: depends on what you’re writing. FreeFull is working on an Ngaro implementation, which I have plenty of experience with... 11:07:04 Ngaro's pretty cool. 11:07:50 Ok, putn seems to sometimes quit, sometimes not, and strings are guaranteed quit 11:08:45 crc: Is the documentation right or wrong on LT/GT there? 11:09:54 FreeFull: the online documentation is wrong. It was corrected in the repository / release downloads for 11.6, but apparently not the HTML copy online 11:10:53 Ah, that's good to know 11:11:08 I'll use the offline documentation from now on then 11:12:10 http://bazaar.launchpad.net/~crc-x/retro-language/retro/revision/433.1.1 was the revision that fixed it; I’m regenerating the doc now 11:12:14 Uh, I switched it around, and now it doesn't recognise 3 as valid 11:16:51 try: 11:16:51 10 => { // GT_JUMP 11:16:51 self.cond_stack_jump(|a, b| b > a); 11:16:51 } 11:16:51 11 => { // LT_JUMP 11:16:51 self.cond_stack_jump(|a, b| b < a); 11:16:52 } 11:17:05 Yes, that's what I tried 11:17:18 It went from accepting numbers, to not accepting numbers 11:17:53 Doesn't quit on strings though.. 11:18:33 "Hello" puts doesn't print out anything 11:18:53 Other than the prompt 11:19:52 Oh, you swapped b and a around 11:20:14 crc: That's actually equivalent to what I had originally ( a < b and a > b ) 11:21:12 Ok, switched it to your version, now back to the status quo 11:22:01 Ok, it seems to quit when it tries to print out numbers that are more than one digit long 11:23:42 can you post the full code? (I installed rust, so should be able to take a closer look at it now) 11:31:00 Ok, will upload it to github 11:32:34 Actually, I'll just zip it up for now 11:34:17 crc: https://dl.dropboxusercontent.com/u/85039664/ngaro-rs.zip 11:35:58 crc: I haven't tested it on Windows at all, but I don't think it'll behave directly. I haven't put disabling the terminal's input buffering and echoing yet either, I've been using stty for that 11:38:03 ok. I’m testing under Linux 11:44:37 found a bug in opcode 7. Here’s a fixed version: 11:44:41 7 => { // LOOP A 11:44:41 let mut data = self.pop_data(); 11:44:41 data -= 1; 11:44:41 if data > 0 { 11:44:41 self.jump(); 11:44:42 self.push_data(data); 11:44:42 } else { 11:44:43 self.ip += 1; 11:44:43 } 11:44:44 } 11:50:55 Thanks 11:52:37 Yep, that makes it work! 11:53:27 crc: Does it now work, as far as you can tell? 11:54:58 the ‘elements’ function is crashing when I try to run test/core.rx now 11:55:33 How are you trying to run it? I don't have any file IO yet 11:56:34 cargo run retroImage Ah 11:57:20 I'll take a look at it 11:57:52 You're right about elements crashing 11:59:18 looks like it’s not allocating enough space for the memory: try @memory putn 11:59:45 it’s only showing the same value as ‘here’, which is the size of the image 12:00:36 That is odd 12:00:57 It should be allocating 1024*1024 items 12:01:33 Oh, I think I know what the issue is 12:01:42 I forgot to initialise the rest with 0, probably 12:01:58 Yeah, that's it 12:09:07 ok putn 1048576 12:09:13 That should be enough, right? 12:09:16 * crc is watching it slowly work through the tests 12:09:19 yes 12:10:45 I'm running the tests now, it's looking pretty good 12:10:54 I expect my implementation is quite slow compared to what you've written 12:11:07 By the way, add the --release flag to cargo run to make it compile with optimisations 12:12:54 360 tests run: 360 passed, 0 failed. 12:13:07 186 words checked, 0 words unchecked, 37 i/o words ignored. 12:13:43 excellent, so all of the core functionality is working as expected. (the others tests cover retro itself moreso; the core.rx should cover all of the byte codes in enough detail) 12:14:03 Alright, thank you 12:14:19 I wouldn't get this far without your help :) 12:14:39 not a problem 12:15:18 * crc is going to be headed out for a few hours, but will be back tonight if you need any more help 14:07:23 * crc has returned 14:10:48 Welcome back 23:59:59 --- log: ended retro/14.12.07