2009 Apr 27 00:03:49 hey 2009 Apr 27 00:04:20 -*- inimino looks at watch 2009 Apr 27 00:04:51 -*- inimino isn't actually wearing a watch 2009 Apr 27 00:05:37 anybody awake? 2009 Apr 27 00:07:26 hi 2009 Apr 27 00:07:32 hey aamar 2009 Apr 27 00:07:46 hey inimino 2009 Apr 27 00:08:49 where is everybody? 2009 Apr 27 00:09:43 I haven't seen chrisconley or nicou recently 2009 Apr 27 00:11:04 maybe I should have sent a reminder to the list yesterday 2009 Apr 27 00:11:32 it seemed like there were a few other people around here and there... 2009 Apr 27 00:11:54 yeah 2009 Apr 27 00:12:36 mariorz -- you around? 2009 Apr 27 00:13:31 hey guys 2009 Apr 27 00:13:45 i am but sadly noy up to date 2009 Apr 27 00:13:53 s/noy/not/ 2009 Apr 27 00:13:56 where are you at? 2009 Apr 27 00:14:02 ok 2009 Apr 27 00:14:37 I got up to 2.58 (a), 2009 Apr 27 00:14:51 2.27 2009 Apr 27 00:15:03 not too far behind... 2009 Apr 27 00:15:10 no, not far at all 2009 Apr 27 00:15:20 yeah this is good news, figured you guys were way ahead 2009 Apr 27 00:15:30 I got up to 2.58 a. also 2009 Apr 27 00:16:01 and a partial answer to b. 2009 Apr 27 00:17:07 okay, great 2009 Apr 27 00:17:20 so what do you want to do? 2009 Apr 27 00:17:38 mariorz, are there specific questions we can help you catch up on? 2009 Apr 27 00:18:10 I guess there are solutions in the logs, that might be enough? 2009 Apr 27 00:18:43 aamar: not really did not have much time this week at all, im planning on working on sicp all day tomorrow 2009 Apr 27 00:18:46 thanks though 2009 Apr 27 00:18:56 ok 2009 Apr 27 00:19:29 yes i was planning on just understanding the solutions form the logs but since im not so far may do some of them myself 2009 Apr 27 00:20:00 you can get through the picture ones pretty quickly 2009 Apr 27 00:20:40 actually if you skim that whole section I'm not sure you'd be much worse off 2009 Apr 27 00:20:56 okay, so why don't we keep to our original schedule of 2.42 to 2.58 ? 2009 Apr 27 00:21:06 ok, sounds good 2009 Apr 27 00:21:15 inimino: lol, noted 2009 Apr 27 00:21:26 here's my 2.42 2009 Apr 27 00:21:29 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.42 2009 Apr 27 00:21:46 http://mibbit.com/pb/3YyMzb 2009 Apr 27 00:24:58 okay, you are using a different method of data storage; I thought about changing it to only store rows, but I didn't end up changing it. 2009 Apr 27 00:25:38 yeah 2009 Apr 27 00:26:02 the signature of adjoin-position ends up not making any sense 2009 Apr 27 00:26:12 but storing the column seemed unnecessary 2009 Apr 27 00:26:20 other than that these look very similar 2009 Apr 27 00:26:57 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.42.output 2009 Apr 27 00:27:01 I tested this one 2009 Apr 27 00:27:10 agreed 2009 Apr 27 00:27:11 looks like we got the same results also 2009 Apr 27 00:27:14 2.43 ? 2009 Apr 27 00:27:17 sure 2009 Apr 27 00:27:21 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.43 2009 Apr 27 00:27:51 http://mibbit.com/pb/stpEQo 2009 Apr 27 00:28:32 I had the same reasoning as you. 2009 Apr 27 00:28:57 we got the same answer, yeah 2009 Apr 27 00:29:02 you tested it though 2009 Apr 27 00:29:12 and got surprising answers, I guess? 2009 Apr 27 00:29:56 It didn't seem to match up that well, but I couldn't really tell a clear pattern. 2009 Apr 27 00:30:11 hm ok 2009 Apr 27 00:30:17 It probably would have made more sense to just find queens solutions for an 8 x N board 2009 Apr 27 00:30:27 yeah 2009 Apr 27 00:30:37 Oh well, I didn't sweat it too much. 2009 Apr 27 00:30:52 yeah, experimental error ;) 2009 Apr 27 00:31:22 I'll be interested to see if someone else gets a different answer by reasoning though when they catch up 2009 Apr 27 00:31:27 anyway, next one? 2009 Apr 27 00:31:30 yes, 2009 Apr 27 00:31:35 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.44 2009 Apr 27 00:31:49 http://mibbit.com/pb/LTQss7 -- 2.44 2009 Apr 27 00:32:04 same 2009 Apr 27 00:32:17 yep 2009 Apr 27 00:32:19 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.45 2009 Apr 27 00:32:29 http://mibbit.com/pb/ONBrW4 -- 2.45 2009 Apr 27 00:33:09 ha, same, except mine doesn't call the inner function! 2009 Apr 27 00:33:48 http://mibbit.com/pb/UQXNUx -- 2.45 fixed 2009 Apr 27 00:33:55 heh, ok 2009 Apr 27 00:34:09 next? 2009 Apr 27 00:34:13 yeah 2009 Apr 27 00:34:16 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.46 2009 Apr 27 00:34:30 http://mibbit.com/pb/ieeN40 -- 2.46 2009 Apr 27 00:35:11 ooh 2009 Apr 27 00:35:20 basically the same, again 2009 Apr 27 00:35:31 yours has an extra abstraction 2009 Apr 27 00:35:37 yes 2009 Apr 27 00:35:39 which is nice 2009 Apr 27 00:35:47 yeah, the same apart from that 2009 Apr 27 00:35:59 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.47 2009 Apr 27 00:36:19 next? 2009 Apr 27 00:36:23 yeah 2009 Apr 27 00:36:24 http://mibbit.com/pb/y0BBV4 2009 Apr 27 00:37:02 http://mibbit.com/pb/HgIBqu 2009 Apr 27 00:37:09 sorry second one has more info 2009 Apr 27 00:37:17 ok 2009 Apr 27 00:37:29 ok, same 2009 Apr 27 00:37:38 next? 2009 Apr 27 00:37:48 http://mibbit.com/pb/yEPXCI -- 2.48 2009 Apr 27 00:37:54 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.48 2009 Apr 27 00:38:32 yeah I didn't really understand what about that involves the earlier exercise 2009 Apr 27 00:38:52 but I guess they just meant that the arguments would be vectors 2009 Apr 27 00:39:33 yes, that must be it. 2009 Apr 27 00:39:44 But it's true that it doesn't really interact with the vectors directly. 2009 Apr 27 00:39:51 yeah 2009 Apr 27 00:39:59 alright, next? 2009 Apr 27 00:40:23 ok 2009 Apr 27 00:40:33 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.49 2009 Apr 27 00:40:34 http://mibbit.com/pb/cnkEpk -- 2.49 2009 Apr 27 00:41:02 boooring is right! 2009 Apr 27 00:41:12 lol 2009 Apr 27 00:41:33 yeah you also defined a more reasonably constructor but I just punted 2009 Apr 27 00:41:47 That constructor might hurt readability though, I wasn't sure. 2009 Apr 27 00:41:58 I didn't think so 2009 Apr 27 00:41:58 This is not how I hope to define graphics in the future. 2009 Apr 27 00:42:12 well 2009 Apr 27 00:42:23 you ever use OpenGL? ;) 2009 Apr 27 00:42:44 Ah, yeah, been there, a while back. 2009 Apr 27 00:43:14 yeah, big arrays of floats 2009 Apr 27 00:43:26 if you squint it looks like a vector ;) 2009 Apr 27 00:43:54 You also could have done it as a list of points, and by default each point continues from the previous point. 2009 Apr 27 00:43:55 alright, next one? 2009 Apr 27 00:44:01 ah, yes 2009 Apr 27 00:44:17 I think OpenGL has a triangle format like that 2009 Apr 27 00:44:21 yes. 2009 Apr 27 00:44:29 each subsequent point defines a new triangle 2009 Apr 27 00:44:48 http://mibbit.com/pb/Jnk1dB -- 2.50 2009 Apr 27 00:45:01 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.50 2009 Apr 27 00:46:11 hm 2009 Apr 27 00:46:28 flip-horiz disagree 2009 Apr 27 00:46:30 yeah 2009 Apr 27 00:46:35 and rotate270 2009 Apr 27 00:47:05 flip-horiz the new origin should be in the bottom right corner, right? 2009 Apr 27 00:47:33 i.e. x = 0, y = 1 2009 Apr 27 00:47:53 I agree it should be bottom right, but I interpret that as x = 1, y = 0 2009 Apr 27 00:48:46 for example, rotate90 would also have the origin be in the bottom right 2009 Apr 27 00:49:01 true 2009 Apr 27 00:49:16 and SICP has rotate90's first vector being (make-vect 1.0 0.0) 2009 Apr 27 00:50:35 for rotate270, I'm wrong -- rotate90 and rotate270 must have different origins. 2009 Apr 27 00:50:37 yeah 2009 Apr 27 00:50:59 oh my 2009 Apr 27 00:51:12 my rotate270 and flip-horiz are identical 2009 Apr 27 00:51:14 lol 2009 Apr 27 00:51:35 ha 2009 Apr 27 00:51:48 and yeah, lower right is x = 1, y = 0 2009 Apr 27 00:52:16 same with me! 2009 Apr 27 00:52:46 haha 2009 Apr 27 00:53:26 ok so is this correct? 2009 Apr 27 00:53:28 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.50 2009 Apr 27 00:54:31 http://mibbit.com/pb/SDMRjV -- 2.50 corrected 2009 Apr 27 00:54:45 ok we agree 2009 Apr 27 00:54:46 yours is showing up unchanged for me 2009 Apr 27 00:54:53 oh 2009 Apr 27 00:55:02 maybe reload again? 2009 Apr 27 00:55:10 or shift-refresh or something? 2009 Apr 27 00:55:27 anyway it's the same as yours now 2009 Apr 27 00:55:41 just flipped in flip-horiz 2009 Apr 27 00:55:42 shift-refresh does it 2009 Apr 27 00:55:46 ok, cool 2009 Apr 27 00:55:54 does that force a cache-refresh? 2009 Apr 27 00:56:01 yeah 2009 Apr 27 00:56:28 ok, next one? 2009 Apr 27 00:56:32 http://mibbit.com/pb/KAREFS -- 2.51 2009 Apr 27 00:56:36 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.51 2009 Apr 27 00:57:26 oh I forgot to do the rotation one 2009 Apr 27 00:57:35 and my paint-top is also different 2009 Apr 27 00:58:00 yes, our vectors are in different orders... 2009 Apr 27 00:59:08 yeah 2009 Apr 27 00:59:22 yours look right to me... double-checking. 2009 Apr 27 00:59:52 ok 2009 Apr 27 01:01:07 yes, agreed -- yours are right, I got the x and y confused in this one 2009 Apr 27 01:01:17 ok 2009 Apr 27 01:01:24 I'm pretty sure your rotation is correct 2009 Apr 27 01:02:01 ok 2009 Apr 27 01:02:06 ok I actually skipped 2.52 2009 Apr 27 01:02:35 http://mibbit.com/pb/ATrE0x -- 2.52 2009 Apr 27 01:02:39 but I'm not planning on doing it so I don't mind looking at your solution 2009 Apr 27 01:02:39 not particularly interesting 2009 Apr 27 01:02:44 ok 2009 Apr 27 01:02:54 2.3 ? 2009 Apr 27 01:03:09 yeah, ok 2009 Apr 27 01:03:53 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.53 2009 Apr 27 01:04:52 http://mibbit.com/pb/BAj3gC -- 2.53 2009 Apr 27 01:05:32 oh... yes 2009 Apr 27 01:05:44 I forgot what memq returns other than false 2009 Apr 27 01:06:27 "Otherwise, it returns the sublist of the list beginning with the first occurrence of the symbol" 2009 Apr 27 01:06:34 yeah 2009 Apr 27 01:06:52 that is actually much more useful 2009 Apr 27 01:07:06 ok 2009 Apr 27 01:07:19 next? 2009 Apr 27 01:07:23 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.54 2009 Apr 27 01:08:59 http://mibbit.com/pb/fnQKaQ -- 2.54 2009 Apr 27 01:09:58 i should remember to stop using length so much 2009 Apr 27 01:10:48 yeah I think that is O(n^2) 2009 Apr 27 01:10:54 you check for pair? which is good 2009 Apr 27 01:11:24 I guess it's not necessary since we know they are supposed to be lists 2009 Apr 27 01:11:41 and actually 2009 Apr 27 01:12:05 oh no I guess that's ok 2009 Apr 27 01:12:19 I didn't run mine 2009 Apr 27 01:13:00 it seems to give me the right answers 2009 Apr 27 01:13:05 ok 2009 Apr 27 01:13:22 so if you had expensive eq? comparisons and short lists yours would be faster 2009 Apr 27 01:13:53 long lists that are usually the same length would make yours faster 2009 Apr 27 01:14:19 alright, next one? 2009 Apr 27 01:14:37 http://mibbit.com/pb/peebIT -- 2.55 2009 Apr 27 01:15:05 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.55 2009 Apr 27 01:15:45 ok, looks the same 2009 Apr 27 01:16:03 next one? 2009 Apr 27 01:16:28 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.56 2009 Apr 27 01:16:47 http://mibbit.com/pb/xF3rei -- 2.56 2009 Apr 27 01:18:11 whoops 2009 Apr 27 01:18:14 ok, my make-exponentiation has a bunch of cases wrong 2009 Apr 27 01:18:24 I forgot to actually do the math when they are both numbers 2009 Apr 27 01:19:47 http://mibbit.com/pb/cxII9N -- 2.56, revised 2009 Apr 27 01:20:25 updated mine too 2009 Apr 27 01:20:53 looks just the same now 2009 Apr 27 01:20:58 ok, next one? 2009 Apr 27 01:21:23 otherwise the same, yep 2009 Apr 27 01:21:48 I found this one tough 2009 Apr 27 01:22:06 ah yeah this one took a while 2009 Apr 27 01:22:11 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.57 2009 Apr 27 01:22:26 http://mibbit.com/pb/xrXwAa -- 2.57 2009 Apr 27 01:23:11 Ah, I think I went too far trying to get it to reduce easily 2009 Apr 27 01:23:21 hm yeah 2009 Apr 27 01:23:29 you went way beyond 2009 Apr 27 01:23:33 I think 2009 Apr 27 01:23:44 either that or I misread the problem 2009 Apr 27 01:23:46 -*- inimino reads again 2009 Apr 27 01:24:31 I think I did go way beyond, though I think the solution works. 2009 Apr 27 01:24:50 looking at yours 2009 Apr 27 01:25:25 mine is more of a sketch than a solution 2009 Apr 27 01:26:04 it's a different way of handling it but I think it works. 2009 Apr 27 01:26:16 I didn't do the multiplicative part of the problem at all 2009 Apr 27 01:26:22 ok 2009 Apr 27 01:27:13 alright, next one? 2009 Apr 27 01:27:17 for me as well, it was basically the same as the sum changes 2009 Apr 27 01:27:25 ok 2009 Apr 27 01:27:48 yeah, they could have just had us do one of them 2009 Apr 27 01:27:53 http://mibbit.com/pb/vfP32Q -- 2.58 2009 Apr 27 01:27:54 http://inimino.org/~inimino/projects/2009/SICP/chap_2/2.58 2009 Apr 27 01:29:56 ok, I don't think I needed to test for (null? (cdr x)) but apart from that we have the same 2009 Apr 27 01:30:06 (a) -- we have the same answers 2009 Apr 27 01:30:16 yeah 2009 Apr 27 01:31:21 alright 2009 Apr 27 01:31:27 for (b) -- we have the same as far as I got. 2009 Apr 27 01:31:42 yeah 2009 Apr 27 01:32:24 nearly the same -- you use memq in product? as well, which is equivalent or better 2009 Apr 27 01:32:53 maybe it doesn't matter 2009 Apr 27 01:33:17 it will always match on the first operator anyway assuming sum? returns false 2009 Apr 27 01:33:22 In augend, I think (eql? '+ (car s)) won't work 2009 Apr 27 01:33:31 because the operators are now infix 2009 Apr 27 01:34:12 well it's supposed to look at each one until it finds a '+ 2009 Apr 27 01:34:37 it also reverses the input 2009 Apr 27 01:34:53 but I figured if all we have are infix + and * that's ok 2009 Apr 27 01:35:10 should the recursive call be (augend (cdr s)) ? 2009 Apr 27 01:35:49 lol 2009 Apr 27 01:35:57 yeah that looks less like an infinite loop 2009 Apr 27 01:36:12 It seems like in the "else" branch of augend, you're recursing without changing anything. 2009 Apr 27 01:36:23 yeah 2009 Apr 27 01:36:54 yeah it should be (augend (cdr s)) you are right 2009 Apr 27 01:37:37 that was as far as I got also 2009 Apr 27 01:38:17 so what about next time? 2009 Apr 27 01:38:28 mariorz: you still around? 2009 Apr 27 01:38:47 yes 2009 Apr 27 01:38:49 whats up 2009 Apr 27 01:39:09 just wondering how far think you can get by the next meeting 2009 Apr 27 01:39:22 i think ill be on schedule for the next meet 2009 Apr 27 01:39:31 ok, awesome 2009 Apr 27 01:39:43 in 2 weeks? 2009 Apr 27 01:39:47 yeah 2009 Apr 27 01:39:50 yes 2009 Apr 27 01:40:21 anybody looked ahead in 2.3? 2009 Apr 27 01:40:39 not me 2009 Apr 27 01:40:41 should we shoot for the end? 2009 Apr 27 01:40:44 2.72? 2009 Apr 27 01:40:52 ill go trough your solutions for the rest of 2.2 2009 Apr 27 01:41:11 sounds good 2009 Apr 27 01:41:16 ok, cool 2009 Apr 27 01:41:20 2.72 sounds good 2009 Apr 27 01:41:25 we'll shoot for 2.72 then 2009 Apr 27 01:41:51 cool 2009 Apr 27 01:42:01 see you all on May 10! 2009 Apr 27 01:42:20 ok good progress -- talk to you all next week 2009 Apr 27 01:42:24 oh, in 2 weeks! 2009 Apr 27 01:42:34 laters