2009 Sep 28 00:03:12 hey aamar, you around? 2009 Sep 28 00:04:30 hey inimino 2009 Sep 28 00:04:37 hey 2009 Sep 28 00:05:13 how's it going? 2009 Sep 28 00:05:23 good 2009 Sep 28 00:06:28 had a busy couple weeks and didn't get very far in SICP though 2009 Sep 28 00:06:47 how did SICP go since last time? 2009 Sep 28 00:07:12 busy with work? 2009 Sep 28 00:07:19 do you have a startup? 2009 Sep 28 00:07:33 work, yeah 2009 Sep 28 00:07:50 just freelance stuff, not a startup 2009 Sep 28 00:09:30 I am up to 3.77, did you finish the whole chapter? 2009 Sep 28 00:10:11 I got to the last one 2009 Sep 28 00:10:16 Didn't finish that one. 2009 Sep 28 00:10:22 ok 2009 Sep 28 00:10:26 3.81 was unexpectedly hard 2009 Sep 28 00:11:12 ah 2009 Sep 28 00:12:32 should we start? 2009 Sep 28 00:12:40 sure 2009 Sep 28 00:12:41 3.71 ? 2009 Sep 28 00:12:54 ok 2009 Sep 28 00:13:14 http://github.com/aalearn/aalearn-sicp/blob/master/ch3-outline.scm#L1355-1379 2009 Sep 28 00:13:25 http://inimino.org/~inimino/projects/2009/SICP/chap_3/3.71 2009 Sep 28 00:16:37 hadn't seen "let*" before -- handy 2009 Sep 28 00:17:09 I've been trying to use only things given in the text 2009 Sep 28 00:17:16 but I was lazy in that case :) 2009 Sep 28 00:18:03 it could be rewritten as nested lets 2009 Sep 28 00:18:18 so, different approaches 2009 Sep 28 00:18:40 I think using dupes is a more abstract, composable approach 2009 Sep 28 00:19:22 roughly corresponds to weight-equal 2009 Sep 28 00:19:26 I wanted to have the pairs in the output though 2009 Sep 28 00:19:36 yeah, similar 2009 Sep 28 00:19:48 I think dupes is handy if we just want to return the weights, rather than the pairs 2009 Sep 28 00:19:52 right 2009 Sep 28 00:20:21 yeah 2009 Sep 28 00:20:36 weight-equal came out a bit ungainly and I wasn't really satisfied with it 2009 Sep 28 00:20:54 but we did get the same numbers :) 2009 Sep 28 00:21:05 ok, I find them conceptually similar as well 2009 Sep 28 00:21:08 okay, next one? 2009 Sep 28 00:21:11 sure 2009 Sep 28 00:21:22 http://inimino.org/~inimino/projects/2009/SICP/chap_3/3.72 2009 Sep 28 00:21:38 http://github.com/aalearn/aalearn-sicp/blob/master/ch3-outline.scm#L1381-1400 2009 Sep 28 00:22:58 you solved, numbers which can be written as the sum of two cubes in 3 different ways 2009 Sep 28 00:23:07 instead of numbers that are the sum of two squares 2009 Sep 28 00:23:49 -*- inimino re-reads the problem 2009 Sep 28 00:24:02 oh 2009 Sep 28 00:24:05 heh 2009 Sep 28 00:24:31 you're right 2009 Sep 28 00:24:39 that explains why the numbers are different 2009 Sep 28 00:24:56 (and why this took some time to run) 2009 Sep 28 00:26:11 alright, your solution looks correct 2009 Sep 28 00:26:15 I was about to ask why you only compute third-pair / third-weight after doing the first test... 2009 Sep 28 00:26:24 But I imagine that is for performance reasons 2009 Sep 28 00:26:29 yes 2009 Sep 28 00:26:56 ok 2009 Sep 28 00:27:10 changing the cube-sums to cube-squares, I think yours will work too 2009 Sep 28 00:27:21 I think the exercise I solved turned out to be much more interesting, but it's not what the book asked for ;) 2009 Sep 28 00:27:22 I mean square-sum ! 2009 Sep 28 00:27:38 yeah, agreed 2009 Sep 28 00:27:42 ok, next one? 2009 Sep 28 00:28:09 erm, I actually skipped 3.73 2009 Sep 28 00:28:09 ok 2009 Sep 28 00:28:10 http://github.com/aalearn/aalearn-sicp/blob/master/ch3-outline.scm#L1401-1411 2009 Sep 28 00:28:14 ok 2009 Sep 28 00:28:24 it looked kind of straightforward 2009 Sep 28 00:28:35 this one took a lot of time too 2009 Sep 28 00:28:54 I was confused by the diagram 2009 Sep 28 00:29:07 I may come back and fill it in 2009 Sep 28 00:29:16 let's go to 3.74 2009 Sep 28 00:29:21 ok 2009 Sep 28 00:29:28 http://github.com/aalearn/aalearn-sicp/blob/master/ch3-outline.scm#L1413-1439 2009 Sep 28 00:29:36 http://inimino.org/~inimino/projects/2009/SICP/chap_3/3.74 2009 Sep 28 00:30:24 slightly different answers 2009 Sep 28 00:30:47 yeah, I had yours originally and changed it 2009 Sep 28 00:30:57 same, I had yours and changed it 2009 Sep 28 00:31:01 :) 2009 Sep 28 00:31:02 hehe 2009 Sep 28 00:31:03 as best as I can tell -- sign-change-detector expects arguments in the nonintuitive order 2009 Sep 28 00:31:09 (sign-change-detector new old) 2009 Sep 28 00:31:33 ok 2009 Sep 28 00:31:56 hm... 2009 Sep 28 00:32:12 I guess there are four ways you could write this 2009 Sep 28 00:32:26 really? 2009 Sep 28 00:32:54 based on the permutations of argument order in sign-change-detector, and of whether you start the output stream 'one ahead' or 'one behind' 2009 Sep 28 00:33:06 right 2009 Sep 28 00:33:23 probably doesn't matter much in practice 2009 Sep 28 00:33:28 well, only 2 combinations will give you the same result as "Alyssa"'s version 2009 Sep 28 00:33:46 the other two will give you the wrong zero crossing values 2009 Sep 28 00:34:09 ah, true 2009 Sep 28 00:34:42 since sign-change-detector (in the book) appears to accept arguments in the new old order, 2009 Sep 28 00:35:01 you want to pass it into stream-map as follows: 2009 Sep 28 00:35:18 (stream-map detector (item-n+1) (item-n)) 2009 Sep 28 00:35:35 yes I think you are right 2009 Sep 28 00:35:38 that means that the first of the two streams should be one further ahead of the second 2009 Sep 28 00:35:46 which means that the second stream should start later. 2009 Sep 28 00:36:12 ok 2009 Sep 28 00:36:26 are any of the people doing this group learning session learning scheme as a first language 2009 Sep 28 00:36:27 yeah, I think yours is correct 2009 Sep 28 00:36:52 lmr: I don't think so, in this group 2009 Sep 28 00:36:59 lmr: no, not my first language 2009 Sep 28 00:37:08 not even my first programming language 2009 Sep 28 00:37:14 haha 2009 Sep 28 00:37:32 hmm. 2009 Sep 28 00:37:36 ok. 2009 Sep 28 00:37:41 3.75 ? 2009 Sep 28 00:37:44 sure 2009 Sep 28 00:37:51 http://github.com/aalearn/aalearn-sicp/blob/master/ch3-outline.scm#L1442-1452 2009 Sep 28 00:37:56 http://inimino.org/~inimino/projects/2009/SICP/chap_3/3.75 2009 Sep 28 00:38:11 rofl. 2009 Sep 28 00:38:23 brb food. 2009 Sep 28 00:38:50 I think that's just about character-for-character the same 2009 Sep 28 00:39:02 yep, except for the argument order on sign-change-detector 2009 Sep 28 00:39:06 otherwise exact match 2009 Sep 28 00:39:12 cool 2009 Sep 28 00:39:38 oh, right 2009 Sep 28 00:39:45 ok, 3.76? 2009 Sep 28 00:40:13 yes 2009 Sep 28 00:40:21 http://github.com/aalearn/aalearn-sicp/blob/master/ch3-outline.scm#L1453-1461 2009 Sep 28 00:40:55 http://inimino.org/~inimino/projects/2009/SICP/chap_3/3.76 2009 Sep 28 00:41:45 hm, typo in mine 2009 Sep 28 00:42:05 should be s/smooth/smoothed in two places 2009 Sep 28 00:42:39 also argument order, again :) 2009 Sep 28 00:43:03 ah, I missed that part of the question 2009 Sep 28 00:43:34 yours looks right, with that change 2009 Sep 28 00:43:52 ok 2009 Sep 28 00:44:02 yours looks right also 2009 Sep 28 00:44:05 next one? 2009 Sep 28 00:44:26 http://github.com/aalearn/aalearn-sicp/blob/master/ch3-outline.scm#L1463-1490 2009 Sep 28 00:44:29 http://inimino.org/~inimino/projects/2009/SICP/chap_3/3.77 2009 Sep 28 00:44:40 ah, this one seemed quite obvious, unless I missed some subtlety 2009 Sep 28 00:45:43 there is a subtlety, though it's not a very interesting one 2009 Sep 28 00:46:01 I think you have to delay the first argument to the recursive call to integral 2009 Sep 28 00:46:07 oh, delay 2009 Sep 28 00:46:35 I guess you could just use cdr instead of stream-cdr there 2009 Sep 28 00:46:52 since the cdr of a stream is already a promise 2009 Sep 28 00:47:01 yes, without that it gives ;Aborting!: maximum recursion depth exceeded 2009 Sep 28 00:47:20 oh, interesting 2009 Sep 28 00:49:11 well, that's as far as I got 2009 Sep 28 00:49:23 ok 2009 Sep 28 00:49:42 I only did a few more... pick up here next time? 2009 Sep 28 00:50:03 yeah, I kind of want to review the rest of these 2009 Sep 28 00:50:43 this was a long chapter :) 2009 Sep 28 00:50:51 ok -- through 4.1 ? 2009 Sep 28 00:51:02 yep 2009 Sep 28 00:51:09 yeah, have you looked ahead? 2009 Sep 28 00:51:12 lots of reading in the first part of Ch. 4 2009 Sep 28 00:51:21 just looked ahead for a minute 2009 Sep 28 00:51:37 4.1.1 only has one exercise 2009 Sep 28 00:51:45 but a lot of reading 2009 Sep 28 00:51:51 4.1.2 goes through 4.10 2009 Sep 28 00:52:11 (exercise 4.10, that is) 2009 Sep 28 00:52:28 And those look substantial, basically re-implementing lots of scheme in scheme 2009 Sep 28 00:52:30 I see 2009 Sep 28 00:52:32 yeah 2009 Sep 28 00:52:45 maybe just through 4.1.1? 2009 Sep 28 00:53:12 agreed 2009 Sep 28 00:53:16 ok, cool 2009 Sep 28 00:53:25 see you in a couple weeks then :) 2009 Sep 28 00:53:57 cool, see you then 2009 Sep 28 01:07:14 so there's only the two of you? 2009 Sep 28 01:08:08 lmr: by now, yes, unless mariorz catches back up 2009 Sep 28 01:08:36 haven't seen him since three or four meetings ago though 2009 Sep 28 01:09:16 all the others dropped off even earlier :) 2009 Sep 28 01:10:57 hmm. 2009 Sep 28 01:11:20 hehe. 2009 Sep 28 01:11:47 yeah, it's a pity 2009 Sep 28 01:12:25 I would say, do /lots/ of recruitment before you start, because you won't be picking up new people on the way and there will be a lot of attrition 2009 Sep 28 01:14:51 yeah, only problem I have is the math in chapters 3/4. 2009 Sep 28 01:15:21 But, well I'm in chapter one still so I have a while. 2009 Sep 28 01:15:31 there's very little math 2009 Sep 28 01:15:52 algebra will get you through, I'd say, pretty much all the exercises 2009 Sep 28 01:16:36 some of them touch on calculus but only in passing, so far anyway 2009 Sep 28 01:17:05 oh ok 2009 Sep 28 01:17:53 there's actually a lot of math, what I meant to say is that there is no advanced math 2009 Sep 28 01:20:22 hehe 2009 Sep 28 01:20:32 ;\