2009 Nov 09 00:38:58 hm 2009 Nov 09 00:39:28 aamar: should we meet in 20 minutes or 40 minutes ago? :) 2009 Nov 09 00:39:48 ha, I was thinking 20 minutes from now 2009 Nov 09 00:39:52 ok, good 2009 Nov 09 00:40:07 maybe I can get a little further then 2009 Nov 09 01:02:56 got through 4.22 2009 Nov 09 01:04:41 ah, I only got up to 4.17 2009 Nov 09 01:05:15 -*- inimino was short on time the last two weeks 2009 Nov 09 01:07:21 same here 2009 Nov 09 01:07:40 alright, shall we start? 2009 Nov 09 01:07:48 yes 2009 Nov 09 01:07:50 4.11 2009 Nov 09 01:07:55 ok 2009 Nov 09 01:08:17 http://github.com/aalearn/aalearn-sicp/blob/master/ch4-outline.scm#L254-261 2009 Nov 09 01:08:45 http://inimino.org/~inimino/projects/2009/SICP/chap_4/4.11 2009 Nov 09 01:12:11 the thing about (set-cdr! frame frame) is that you will get an infinite structure, even after you set-car! 2009 Nov 09 01:14:29 I think you could copy the entire contents of frame, however, then (set-cdr! frame copy), and that would work 2009 Nov 09 01:14:40 I don't know how to create a copy of a list in Scheme though 2009 Nov 09 01:14:41 hm. 2009 Nov 09 01:15:47 if you think of it in terms of pointers, after (set-cdr! frame frame), frame is a pair, the cdr of which contains a pointer to itself 2009 Nov 09 01:16:28 got ir 2009 Nov 09 01:16:30 got it 2009 Nov 09 01:16:31 ok 2009 Nov 09 01:16:34 right 2009 Nov 09 01:16:41 ok 2009 Nov 09 01:16:56 copying doesn't seem to be the right solution... 2009 Nov 09 01:17:40 I'm not sure how well that would work either 2009 Nov 09 01:19:17 (set-cdr! frame (cons (car frame) (cdr frame))) 2009 Nov 09 01:19:53 ah, that looks plausible 2009 Nov 09 01:20:03 I will try it out later 2009 Nov 09 01:20:07 create a new pair... that seems like it should work 2009 Nov 09 01:20:10 ok 2009 Nov 09 01:20:32 would be more elegant than my (list 'frame ...) stuff I think 2009 Nov 09 01:20:38 alright, next one? 2009 Nov 09 01:20:44 yeah 2009 Nov 09 01:20:51 ok 2009 Nov 09 01:21:04 http://inimino.org/~inimino/projects/2009/SICP/chap_4/4.12 2009 Nov 09 01:21:34 http://github.com/aalearn/aalearn-sicp/blob/master/ch4-outline.scm#L265-282 2009 Nov 09 01:21:58 http://github.com/aalearn/aalearn-sicp/blob/master/ch4-outline.scm#L265-296 actually 2009 Nov 09 01:25:28 I agree with your ';non-intuitive' comment, but I did it the same way 2009 Nov 09 01:27:44 yes, interesting 2009 Nov 09 01:27:50 I wondered about the inner env-loop too 2009 Nov 09 01:29:16 possibly it was to make lookup-variable-value and set-variable-value! look more similar, so that this very exercise would make more sense 2009 Nov 09 01:30:53 So our answers are pretty similar -- except I couldn't figure out a way to make passing #f back look clean, which is why I added the if-not-found proc 2009 Nov 09 01:31:29 ah 2009 Nov 09 01:32:02 that's probably a better idea, I had to add a comment about a possible bug returning #f could have caused 2009 Nov 09 01:32:19 Well, both answers seem correct to me. 2009 Nov 09 01:32:29 yeah, agreed 2009 Nov 09 01:32:48 Let's go to 4.13 2009 Nov 09 01:33:07 ok 2009 Nov 09 01:33:12 http://inimino.org/~inimino/projects/2009/SICP/chap_4/4.13 2009 Nov 09 01:33:38 http://github.com/aalearn/aalearn-sicp/blob/master/ch4-outline.scm#L297-318 2009 Nov 09 01:36:09 hm, my implementation of deleting the head of a list was completely incorrect 2009 Nov 09 01:37:02 your delete-head! looks correct, though 2009 Nov 09 01:37:40 yes, was just testing them out to make sure 2009 Nov 09 01:38:14 mine seems to work -- you have to set-car! and set-cdr! 2009 Nov 09 01:38:32 yeah, (set-car! x (cdr x)) should be a type error 2009 Nov 09 01:38:43 putting a list in the place of an element 2009 Nov 09 01:39:12 type error! 2009 Nov 09 01:39:28 Are there type-safe lisps? 2009 Nov 09 01:39:40 I don't know, I guess there must be 2009 Nov 09 01:39:46 they have everything else ;) 2009 Nov 09 01:40:11 likely true 2009 Nov 09 01:40:37 ok otherwise our answers are exactly the same, modulo differences in the previous answer 2009 Nov 09 01:41:02 should we go to 4.14 ? 2009 Nov 09 01:41:25 ok, sure 2009 Nov 09 01:41:34 http://inimino.org/~inimino/projects/2009/SICP/chap_4/4.14 2009 Nov 09 01:41:54 http://github.com/aalearn/aalearn-sicp/blob/master/ch4-outline.scm#L319-323 2009 Nov 09 01:42:18 looks the same 2009 Nov 09 01:42:28 except that I spelled "created" as "creating"... 2009 Nov 09 01:42:31 similar, I think 2009 Nov 09 01:42:49 ever since I switched to Dvorak I can't seem to keep my suffixes straight :/ 2009 Nov 09 01:43:15 when did you switch? 2009 Nov 09 01:43:29 about a year ago, I think 2009 Nov 09 01:44:06 took a few weeks to get used to it 2009 Nov 09 01:44:24 I tried once a while back, didn't stick with it though. 2009 Nov 09 01:44:24 it is fast and a lot more comfortable 2009 Nov 09 01:44:39 yeah, it didn't do anything for my accuracy 2009 Nov 09 01:44:57 I end up spelling things phonetically a lot more frequently now 2009 Nov 09 01:45:22 I'm not sure how that worked 2009 Nov 09 01:45:50 that's surprising; hadn't heard that happening before 2009 Nov 09 01:46:04 yeah, I wasn't expecting it 2009 Nov 09 01:46:18 My main problem was switching back to qwerty mid-sentence 2009 Nov 09 01:46:55 heh, I don't think I had that, except for a few things like passwords 2009 Nov 09 01:47:28 I can still type on qwerty but I have to look at the keys now 2009 Nov 09 01:47:37 strange how the brain works 2009 Nov 09 01:49:05 but it just seems like there's some sort of thought -> sound -> typing loop that happens now so I end up mixing up homophones quite frequently 2009 Nov 09 01:49:19 anyway... shall we look at the next one? 2009 Nov 09 01:50:04 yes 2009 Nov 09 01:50:23 ah, this one :) 2009 Nov 09 01:50:26 http://inimino.org/~inimino/projects/2009/SICP/chap_4/4.15 2009 Nov 09 01:50:32 http://github.com/aalearn/aalearn-sicp/blob/master/ch4-outline.scm#L325-332 2009 Nov 09 01:52:15 ok, we both have seen this before, I think. 2009 Nov 09 01:52:23 yeah, similar answers, though we started from opposite ends of the proof 2009 Nov 09 01:52:26 yeah, looks like it ;-) 2009 Nov 09 01:53:09 alright, 4.16? 2009 Nov 09 01:53:36 interesting, long post about busy beaver numbers which makes use of this result on aaronson's blog 2009 Nov 09 01:53:41 http://www.scottaaronson.com/writings/bignumbers.html 2009 Nov 09 01:53:44 yes, 2009 Nov 09 01:53:45 oh? 2009 Nov 09 01:54:07 heh 2009 Nov 09 01:54:28 Yeah, I had not previously heard about this busy beaver sequence, and found it very interesting. 2009 Nov 09 01:54:35 But let's go to 4.165 2009 Nov 09 01:54:37 4.16 2009 Nov 09 01:54:38 http://github.com/aalearn/aalearn-sicp/blob/master/ch4-outline.scm#L335-373 2009 Nov 09 01:55:26 ah, yeah, ok 2009 Nov 09 01:55:32 -*- inimino snaps back to attention ;) 2009 Nov 09 01:55:48 http://inimino.org/~inimino/projects/2009/SICP/chap_4/4.16 2009 Nov 09 01:56:33 hm, very different answers 2009 Nov 09 01:56:56 ah, yeah, yours is correct 2009 Nov 09 01:57:22 I will do this one again for next time (and finish b and c properly) 2009 Nov 09 01:57:40 ok 2009 Nov 09 01:57:49 should we do 4.17? 2009 Nov 09 01:57:59 I skimped some on this one 2009 Nov 09 01:58:33 yeah, I ended this one in mid-sentence I'm afraid 2009 Nov 09 01:59:12 http://inimino.org/~inimino/projects/2009/SICP/chap_4/4.17 2009 Nov 09 01:59:31 and I'm still not quite sure that where I was going with that sentence even made a lot of sense 2009 Nov 09 02:01:04 It might have ended up where I ended up. Mine ends with a period, but I'm not sure it's complete thought. 2009 Nov 09 02:01:21 but yeah, I think we were heading to the same place there 2009 Nov 09 02:01:52 4.17 to 4.20 all took a lot of hard thinking and were not very satisfying. 2009 Nov 09 02:01:56 I didn't feel that I quite had a solid grasp of what the consequences of all of this are 2009 Nov 09 02:02:34 heh, I was actually hoping the coming exercises would clear things up but perhaps not 2009 Nov 09 02:02:52 4.21 was a good one, and helpful 2009 Nov 09 02:03:04 4.22 was difficult and I'm not sure I got it right. 2009 Nov 09 02:03:26 In order to 4.24, which is a performance test, it actually wants us to get all of the code from the book evaluated. 2009 Nov 09 02:03:29 Which I didn't do. 2009 Nov 09 02:03:41 ah 2009 Nov 09 02:03:55 by the way: http://mitpress.mit.edu/sicp/code/index.html 2009 Nov 09 02:04:06 handy! 2009 Nov 09 02:04:08 complete code from the book, I found that last week 2009 Nov 09 02:04:11 yeah 2009 Nov 09 02:04:37 haven't tested any of it, but it may help 2009 Nov 09 02:04:52 I suspect some of the stuff coming up I may be more likely to want to actually try and run 2009 Nov 09 02:06:04 4.21 looks quite cool 2009 Nov 09 02:07:08 where should we pick up for next time? 2009 Nov 09 02:07:17 good question 2009 Nov 09 02:08:36 4.18 through something in the middle of 4.2? 2009 Nov 09 02:08:45 sounds good 2009 Nov 09 02:09:03 4.26 is the end of 4.2.1 2009 Nov 09 02:09:23 4.2.2 gets us to 4.31 2009 Nov 09 02:09:27 4.3.1 I mean 2009 Nov 09 02:09:43 n/m got it right the first time 2009 Nov 09 02:09:59 4.34 is the last exercise in 4.2 2009 Nov 09 02:10:14 I think getting all the way through 4.34 might be challenging. 2009 Nov 09 02:10:21 hm, maybe 4.31 or 4.34? 2009 Nov 09 02:10:33 hm, it does look like a lot of text 2009 Nov 09 02:10:42 much shorter than 4.1 though 2009 Nov 09 02:10:58 I think we can make it to 4.34, actually 2009 Nov 09 02:11:15 or rather a lot of code 2009 Nov 09 02:11:27 yeah, I think we can do taht 2009 Nov 09 02:11:40 ok 2009 Nov 09 02:11:41 -*- inimino will make an effort to make more time this time around 2009 Nov 09 02:13:06 alright, see you in two weeks, then, and should we meet at 0100 UTC again next time? 2009 Nov 09 02:14:48 yes, sounds great 2009 Nov 09 02:14:58 ok, see you then