00:02:20 -!- jonrafkind [~jon@crystalis.cs.utah.edu] has quit [Ping timeout: 255 seconds] 00:04:50 imran_sr [~imran@75-18-254-4.lightspeed.uncyca.sbcglobal.net] has joined #scheme 00:04:58 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 00:07:13 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 00:10:02 -!- Genosh [~Genosh@83.57.60.194] has quit [Ping timeout: 276 seconds] 00:33:05 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Quit: jeapostrophe_] 00:33:20 kephas [~pierre@AStrasbourg-551-1-20-162.w86-213.abo.wanadoo.fr] has joined #scheme 00:33:39 -!- nowhereman [~pierre@AStrasbourg-551-1-32-94.w83-196.abo.wanadoo.fr] has quit [Ping timeout: 240 seconds] 00:33:48 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 00:33:48 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Client Quit] 00:36:27 Azuvix [~user@174-27-38-209.bois.qwest.net] has joined #scheme 00:38:35 -!- kilimanja is now known as kilimanjaro 00:38:40 -!- kilimanjaro [~kilimanja@ip24-255-34-109.tc.ph.cox.net] has quit [Changing host] 00:38:40 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 00:46:51 adu [~ajr@pool-173-66-10-221.washdc.fios.verizon.net] has joined #scheme 00:47:38 -!- MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit [Quit: Leaving] 00:50:59 -!- turbofail [~user@adsl-69-238-246-201.dsl.pltn13.pacbell.net] has quit [Remote host closed the connection] 00:52:41 -!- shadow_walker [~shadow_wa@187.37.211.118] has quit [Remote host closed the connection] 01:08:56 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 01:10:34 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Client Quit] 01:17:02 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 01:18:10 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Client Quit] 01:22:35 jengle [~jengle@64-252-187-48.adsl.snet.net] has joined #scheme 01:22:51 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 01:23:03 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Client Quit] 01:28:45 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 01:29:29 pnkfelix [~Adium@c-71-225-45-140.hsd1.nj.comcast.net] has joined #scheme 01:29:37 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 01:34:01 -!- aisa [~aisa@c-68-35-167-179.hsd1.nm.comcast.net] has quit [Ping timeout: 240 seconds] 01:40:07 -!- mickn [~mickn@unaffiliated/mickn] has quit [Quit: Leaving] 01:41:45 -!- bgs100 [~ian@unaffiliated/bgs100] has quit [Quit: nighty night] 01:54:03 -!- RoaryLion is now known as copumpkin_ 01:54:27 -!- masm [~masm@2.80.146.105] has quit [Quit: Leaving.] 01:56:29 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Quit: jeapostrophe_] 02:02:19 -!- pnkfelix [~Adium@c-71-225-45-140.hsd1.nj.comcast.net] has quit [Quit: Leaving.] 02:04:18 -!- seangrove [~user@c-71-198-44-87.hsd1.ca.comcast.net] has quit [Ping timeout: 245 seconds] 02:13:27 _danb_ [~user@124-169-4-124.dyn.iinet.net.au] has joined #scheme 02:14:28 -!- timj_ [~timj@e176194064.adsl.alicedsl.de] has quit [Ping timeout: 252 seconds] 02:16:09 timj_ [~timj@e176194064.adsl.alicedsl.de] has joined #scheme 02:19:48 shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has joined #scheme 02:21:45 -!- xwl_ [~user@nat/nokia/x-hzisikakvticzufc] has quit [Remote host closed the connection] 02:23:28 xwl_ [~user@nat/nokia/x-mnfsgglafnayhiko] has joined #scheme 02:30:58 -!- Azuvix [~user@174-27-38-209.bois.qwest.net] has quit [Remote host closed the connection] 02:37:37 aisa [~aisa@c-68-35-167-179.hsd1.nm.comcast.net] has joined #scheme 02:40:26 -!- xwl_ [~user@nat/nokia/x-mnfsgglafnayhiko] has quit [Remote host closed the connection] 02:46:35 somnium [~user@adsl-65-187-133.dab.bellsouth.net] has joined #scheme 02:51:50 -!- copumpkin_ [~copumpkin@131.247.67.79] has quit [Remote host closed the connection] 02:52:37 timj__ [~timj@e176196141.adsl.alicedsl.de] has joined #scheme 02:54:53 -!- aisa [~aisa@c-68-35-167-179.hsd1.nm.comcast.net] has quit [Quit: leaving] 02:55:58 -!- timj_ [~timj@e176194064.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 03:00:16 -!- specbot [~specbot@common-lisp.net] has quit [Ping timeout: 240 seconds] 03:00:41 -!- lisppaste [~lisppaste@common-lisp.net] has quit [Ping timeout: 255 seconds] 03:08:11 -!- jimmy_sjtu [~jimmy@2001:da8:8000:e192:225:b3ff:fe76:3140] has quit [Quit: Leaving] 03:12:13 -!- imran_sr [~imran@75-18-254-4.lightspeed.uncyca.sbcglobal.net] has quit [Quit: Leaving] 03:28:03 -!- tupi [~david@186.205.37.15] has quit [Quit: Leaving] 03:41:01 -!- RageOfThou [~RageOfTho@users-55-234.vinet.ba] has quit [Ping timeout: 240 seconds] 03:42:57 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Remote host closed the connection] 03:46:32 pnkfelix [~Adium@c-71-225-45-140.hsd1.nj.comcast.net] has joined #scheme 03:50:57 seangrove [~user@c-71-198-44-87.hsd1.ca.comcast.net] has joined #scheme 03:57:24 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 04:06:54 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Quit: jeapostrophe_] 04:08:01 -!- shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has quit [Remote host closed the connection] 04:09:19 shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has joined #scheme 04:13:40 MichaelRaskin [~MichaelRa@195.178.216.22] has joined #scheme 04:14:20 hi all. 04:17:53 -!- jengle [~jengle@64-252-187-48.adsl.snet.net] has quit [Quit: jengle] 04:18:26 -!- shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has quit [Remote host closed the connection] 04:22:40 jengle [~jengle@64-252-187-48.adsl.snet.net] has joined #scheme 04:23:01 I'm trying to solve ex. 1.11 in sicp: A function f is defined by the rule that f(n) = n if n<3 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) if n> 3. Write a procedure that computes f by means of a recursive process. Write a procedure that computes f by means of an iterative process. 04:23:36 i know there are solutions on the net but i don't just want the answer, i want to understand how to get there 04:24:02 Where are you so far? 04:24:05 writing the recursive version is obvious but the iterative version is hard 04:24:14 OK. 04:24:20 Take the recursive version and turn it inside out! 04:24:23 Have you implemented an iterative Fibonacci? 04:24:29 It sounds flippant, but it's more or less what you'll end up doing. 04:24:38 pavelludiq [~quassel@87.246.61.65] has joined #scheme 04:24:40 Riastradh: yes 04:25:17 Can you lisppaste it, just so I can refer to parts of it by name? 04:25:29 *offby1* nods gravely 04:25:33 this'm good exercise. 04:25:38 mm hmm. 04:27:24 shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has joined #scheme 04:27:32 Riastradh: paste.lisp.org isn't responding, so here's the next best thing i could find: http://www.pastie.org/1257246 04:28:18 OK. What do a and b represent here? 04:28:28 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 04:29:26 -!- shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has quit [Remote host closed the connection] 04:30:13 a represents the sum of the preceding two numbers 04:31:02 ... in the sequence 04:31:24 OK. What is that sum? Can you relate it to the Fibonacci function? 04:32:11 the sum is (+ a b) 04:32:39 Yes... But can you say anything about what a represents, without reference to a or b? 04:32:54 It may help if you print out a and b on each iteration. 04:34:58 a = f(n-1) + f(n - 2) 04:35:22 i'm sorry if i'm misunderstanding 04:36:15 a represents the transformation to the next number in the sequence 04:38:51 OK. Now what's f here? 04:39:18 oops, i meant fib(n-1) + fib(n-2) 04:39:34 Right. And what's fib(n) again? 04:40:10 fib(n) = fib(n-1) + fib(n-2) 04:40:33 Right. So the value of a at the nth iteration is, in fact, fib(n). 04:40:55 ...or, perhaps, to avoid confusion with the initial value n, the value of a at the kth iteration is fib(k). 04:40:59 What about b? 04:41:42 b is fib(n-1) 04:42:14 Exactly. So in terms of a and b, fib(n + 1) = a + b = fib(n) + fib(n - 1). 04:44:18 ok, that makes sense. 04:44:32 What if instead of fib(n) = fib(n - 1) + fib(n - 2), it were fib(n) = fib(n - 1) + 2 fib(n - 2)? 04:45:05 How would you change the (iterative) definition of the FIB procedure in Scheme? 04:46:17 (iter (+ a (* 2 b)) a (-1+ count)) 04:48:45 -!- pavelludiq [~quassel@87.246.61.65] has quit [Read error: Connection reset by peer] 04:49:06 copumpki_ [~copumpkin@user-142hbak.cable.mindspring.com] has joined #scheme 04:50:42 nataraj [~nataraj@122.165.223.135] has joined #scheme 04:59:24 i think i sort of understand now :) 05:00:28 jengle: By force of habit, I always write (+ a (* 2 b)) as (+ a b b), at least for real numbers. 05:00:45 cky: why is that? 05:00:53 jengle: Which one is easier to read? :-) 05:01:18 Similarly with (* pi (expt r 2)) vs (* pi r r). 05:01:32 saves a procedure call, too. 05:01:47 but that's not really something you need to care about with scheme, i suppose. 05:01:49 True, though readability is always my first priority. 05:02:20 jengle: IMO the textbook "How to Design Programs" provides a better description of a *process* to follow when solving these sorts of problems. (OTOH, it takes that book several chapters before it gets to the topic of "accumulators", which is how you'd solve this problem.) 05:11:32 -!- mjonsson [~mjonsson@cpe-98-14-173-5.nyc.res.rr.com] has quit [Read error: Operation timed out] 05:15:10 -!- copumpki_ [~copumpkin@user-142hbak.cable.mindspring.com] has quit [Remote host closed the connection] 05:27:25 -!- adu [~ajr@pool-173-66-10-221.washdc.fios.verizon.net] has quit [Quit: adu] 05:30:33 -!- _danb_ [~user@124-169-4-124.dyn.iinet.net.au] has quit [Ping timeout: 245 seconds] 05:34:00 rdd [~rdd@c83-250-48-164.bredband.comhem.se] has joined #scheme 05:35:58 -!- rmrfchik [~paul@195.191.11.247] has quit [Ping timeout: 245 seconds] 05:36:06 vu3rdd [~vu3rdd@164.164.250.10] has joined #scheme 05:36:20 http://pastie.org/1257320 05:36:26 *araujo* just added support for that syntax 05:36:51 rmrfchik [~paul@195.191.11.247] has joined #scheme 05:40:23 adu [~ajr@pool-173-66-10-221.washdc.fios.verizon.net] has joined #scheme 05:40:39 -!- somnium [~user@adsl-65-187-133.dab.bellsouth.net] has quit [Remote host closed the connection] 05:45:05 Here is a subtle issue. Consider the following two choices of semantics for mutable parameters, continuations, and threads: 05:45:08 -!- jewel [~jewel@196-215-16-131.dynamic.isadsl.co.za] has quit [Ping timeout: 245 seconds] 05:45:16 -!- rmrfchik [~paul@195.191.11.247] has quit [Ping timeout: 240 seconds] 05:46:35 rmrfchik [~paul@195.191.11.247] has joined #scheme 05:47:32 (a) Continuations themselves know nothing about parameters. (parametrize ((p e)) ...) = (dynamic-wind swap (lambda () ...) swap), where swap = (let ((v e)) (lambda () (let ((t (p))) (p v) (set! v t] 05:49:55 (b) Reifying a continuation stores the current map from parameters to values. (DYNAMIC-WIND remembers it too, as appropriate.) (parametrize ((p e)) ...) = (let ((parametrization (current-parametrization))) (set-parametrization! (extend parametrization p e)) (begin0 ... (set-parametrization! parametrization))) 05:50:25 (In both cases, the map from parameters to their values is thread-local.) 05:52:11 If parameters are immutable (except through PARAMETRIZE), these two choices of semantics are indistinguishable. But if parameters are mutable, then there are observable differences. 05:53:06 Which choice is better, and why? 05:55:16 Let me simplify (b) to avoid referring to first-class parametrizations, which are a red herring: 05:55:42 (parametrize ((p e)) ...) = (let ((t (p))) (p e) (begin0 ... (p t))) 06:00:31 -!- seangrove [~user@c-71-198-44-87.hsd1.ca.comcast.net] has quit [Ping timeout: 252 seconds] 06:25:35 -!- jengle [~jengle@64-252-187-48.adsl.snet.net] has quit [Quit: jengle] 06:27:25 MrFahrenheit [~RageOfTho@users-55-231.vinet.ba] has joined #scheme 06:29:39 -!- vu3rdd [~vu3rdd@164.164.250.10] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 06:30:02 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 265 seconds] 06:30:57 -!- Kerrick [~Kerrick@b01-1.nat.iastate.edu] has quit [Ping timeout: 250 seconds] 06:34:23 -!- homie [~user@xdsl-87-79-85-232.netcologne.de] has quit [Read error: Connection reset by peer] 06:35:41 homie [~user@xdsl-87-79-85-232.netcologne.de] has joined #scheme 06:40:53 -!- homie [~user@xdsl-87-79-85-232.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 06:44:30 -!- sbplr [~sbplr@unaffiliated/sbplr] has quit [Quit: Leaving.] 06:44:56 sbplr [~sbplr@unaffiliated/sbplr] has joined #scheme 06:48:18 homie [~user@xdsl-87-79-85-232.netcologne.de] has joined #scheme 06:52:10 -!- rdd [~rdd@c83-250-48-164.bredband.comhem.se] has quit [Ping timeout: 265 seconds] 06:56:32 -!- sbplr [~sbplr@unaffiliated/sbplr] has quit [] 06:59:41 -!- MrFahrenheit [~RageOfTho@users-55-231.vinet.ba] has quit [Ping timeout: 240 seconds] 07:27:31 gravicappa [~gravicapp@91.78.230.198] has joined #scheme 07:34:51 xwl_ [~user@nat/nokia/x-tnzbyrgspsaekzfw] has joined #scheme 07:35:11 wbooze` [~user@xdsl-78-34-200-122.netcologne.de] has joined #scheme 07:35:22 homie` [~user@xdsl-78-34-200-122.netcologne.de] has joined #scheme 07:36:42 pavelludiq [~quassel@87.246.61.65] has joined #scheme 07:37:25 -!- homie` [~user@xdsl-78-34-200-122.netcologne.de] has quit [Client Quit] 07:37:34 -!- wbooze` [~user@xdsl-78-34-200-122.netcologne.de] has quit [Client Quit] 07:37:52 -!- wbooze [~user@xdsl-87-79-85-232.netcologne.de] has quit [Ping timeout: 252 seconds] 07:38:04 -!- homie [~user@xdsl-87-79-85-232.netcologne.de] has quit [Ping timeout: 265 seconds] 07:49:24 -!- pnkfelix [~Adium@c-71-225-45-140.hsd1.nj.comcast.net] has quit [Quit: Leaving.] 07:55:43 hohoho [~hohoho@p021285.tokynt01.ap.so-net.ne.jp] has joined #scheme 07:59:40 homie [~user@xdsl-78-34-200-122.netcologne.de] has joined #scheme 07:59:42 wbooze [~user@xdsl-78-34-200-122.netcologne.de] has joined #scheme 08:08:11 rasterbar [~user@unaffiliated/rasterbar] has joined #scheme 08:09:13 -!- nataraj [~nataraj@122.165.223.135] has quit [Remote host closed the connection] 09:01:48 shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has joined #scheme 09:03:21 -!- xwl_ [~user@nat/nokia/x-tnzbyrgspsaekzfw] has quit [Remote host closed the connection] 09:04:25 shadow_w_ [~shadow_wa@189-47-230-90.dsl.telesp.net.br] has joined #scheme 09:06:11 -!- gravicappa [~gravicapp@91.78.230.198] has quit [Remote host closed the connection] 09:06:23 -!- shadow_walker [~shadow_wa@201-43-173-188.dsl.telesp.net.br] has quit [Ping timeout: 245 seconds] 09:06:56 -!- shadow_w_ [~shadow_wa@189-47-230-90.dsl.telesp.net.br] has quit [Remote host closed the connection] 09:07:56 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 240 seconds] 09:10:53 pavelludiq_ [~quassel@87.246.61.65] has joined #scheme 09:11:56 -!- pavelludiq [~quassel@87.246.61.65] has quit [Read error: Connection reset by peer] 09:34:17 nowhere_man [~pierre@AStrasbourg-551-1-85-249.w81-51.abo.wanadoo.fr] has joined #scheme 09:34:39 -!- adu [~ajr@pool-173-66-10-221.washdc.fios.verizon.net] has quit [Quit: adu] 09:34:40 -!- kephas [~pierre@AStrasbourg-551-1-20-162.w86-213.abo.wanadoo.fr] has quit [Ping timeout: 265 seconds] 09:37:22 masm [~masm@bl19-146-105.dsl.telepac.pt] has joined #scheme 09:43:12 adu [~ajr@pool-173-66-10-221.washdc.fios.verizon.net] has joined #scheme 09:44:42 -!- adu [~ajr@pool-173-66-10-221.washdc.fios.verizon.net] has quit [Client Quit] 09:48:15 schmir [~schmir@mail.brainbot.com] has joined #scheme 09:48:56 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 09:49:11 shadow_walker [~shadow_wa@189-47-230-90.dsl.telesp.net.br] has joined #scheme 09:50:26 -!- shadow_walker [~shadow_wa@189-47-230-90.dsl.telesp.net.br] has quit [Remote host closed the connection] 09:59:27 -!- pavelludiq_ [~quassel@87.246.61.65] has quit [Read error: Connection reset by peer] 10:16:08 shadow_walker [~shadow_wa@189-47-230-90.dsl.telesp.net.br] has joined #scheme 10:42:00 -!- hohoho [~hohoho@p021285.tokynt01.ap.so-net.ne.jp] has quit [Remote host closed the connection] 10:49:18 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 10:53:10 _danb_ [~user@124-169-4-124.dyn.iinet.net.au] has joined #scheme 10:55:35 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 10:59:33 fradgers- [~fradgers-@5e065bfd.bb.sky.com] has joined #scheme 11:03:44 -!- NNshag [user@lns-bzn-43-82-249-172-161.adsl.proxad.net] has quit [Quit: Quitte] 11:06:59 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 250 seconds] 11:08:53 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 11:10:17 -!- shadow_walker [~shadow_wa@189-47-230-90.dsl.telesp.net.br] has quit [Remote host closed the connection] 11:14:04 Fabse [~mightyfid@p5DF633A0.dip.t-dialin.net] has joined #scheme 11:14:07 -!- Fabse [~mightyfid@p5DF633A0.dip.t-dialin.net] has quit [Changing host] 11:14:08 Fabse [~mightyfid@wikipedia/Track-n-Field] has joined #scheme 11:15:17 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 11:22:39 -!- Fabse [~mightyfid@wikipedia/Track-n-Field] has quit [] 11:37:38 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 11:38:51 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 11:50:59 pavelludiq [~quassel@87.246.61.65] has joined #scheme 12:09:49 -!- MichaelRaskin [~MichaelRa@195.178.216.22] has quit [Remote host closed the connection] 12:10:16 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 12:22:17 pnkfelix [~Adium@c-71-225-45-140.hsd1.nj.comcast.net] has joined #scheme 12:35:02 shadow_walker [~shadow_wa@187.82.197.198] has joined #scheme 13:02:53 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Quit: jeapostrophe_] 13:04:18 -!- shadow_walker [~shadow_wa@187.82.197.198] has quit [Ping timeout: 245 seconds] 13:10:25 lisppaste [~lisppaste@common-lisp.net] has joined #scheme 13:10:54 minion [~minion@common-lisp.net] has joined #scheme 13:11:00 specbot [~specbot@common-lisp.net] has joined #scheme 13:13:03 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 13:14:03 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 13:15:43 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 13:16:26 shadow_walker [~shadow_wa@187.82.87.248] has joined #scheme 13:22:37 -!- Axsuul [~someone@97-93-99-133.static.mtpk.ca.charter.com] has quit [Ping timeout: 250 seconds] 13:25:16 -!- shadow_walker [~shadow_wa@187.82.87.248] has quit [Remote host closed the connection] 13:32:49 MrFahrenheit [~RageOfTho@users-55-146.vinet.ba] has joined #scheme 13:37:30 _danb_` [~user@124-169-4-124.dyn.iinet.net.au] has joined #scheme 13:38:22 -!- _danb_ [~user@124-169-4-124.dyn.iinet.net.au] has quit [Ping timeout: 240 seconds] 13:41:44 drdo [~user@194.210.228.14] has joined #scheme 13:42:03 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Quit: jeapostrophe_] 13:44:50 -!- hypercube31 [~hypercube@66.90.18.146] has quit [Quit: Leaving] 13:49:46 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 13:54:13 femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #scheme 13:54:32 -!- _danb_` [~user@124-169-4-124.dyn.iinet.net.au] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 13:55:36 rpg [~rpg@216.243.156.16.real-time.com] has joined #scheme 13:56:05 _danb_ [~user@124-169-4-124.dyn.iinet.net.au] has joined #scheme 14:04:05 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Quit: jeapostrophe_] 14:04:52 Yvemath [~kuwo@122.161.59.82] has joined #scheme 14:05:13 "Noob question" how to begin with scheme ? 14:07:11 tupi [~david@139.82.89.24] has joined #scheme 14:08:17 Yvemath: I hear that How to Design Programs (http://www.htdp.org/) is a good starting resource. 14:08:30 Yvemath: There's also Teach Yourself Scheme in Fixnum Days. 14:09:09 Yvemath: Of course, everybody talks about SICP (Structure and Interpretation of Computer Programs; http://mitpress.mit.edu/sicp/) 14:09:59 gravicappa [~gravicapp@ppp91-78-230-198.pppoe.mtu-net.ru] has joined #scheme 14:13:10 cky: i already know about the algorithms and the logic and concept you follow while writing a program, I 've been a good C, C++, VB.Net, FoxPro, BASIC coder (in windows envi.) and a beginner "common-lisp" programmer in the past and now-a-days mingling with PHP,XHTML,CSS,Javascript. When i was taught about lisp, we had NO practicals, but i've got the concept of prefix expressions, which i assume is also been used by Scheme. Thanks for the suggesstions, let me h 14:14:27 Yvemath: You got cut off at "let me h" 14:14:34 cky: Also which compiler would you recommend ? guile or scheme compiler implemented over gcc ? Is Dr.Scheme < the famous compiler available-for-use in open-source linux distros, or is it a windows-choice ? 14:14:39 let me have a look inside these 2 books :) 14:14:42 there. 14:14:53 Yvemath: Racket is available for Linux, yes. 14:15:10 Yvemath: (DrRacket is the new name for DrScheme.) 14:15:26 sjamaan: sorry... Thought , my IRC client clips the messages into 2 parts {over} the RFC specification. - but oops. wont happen again. 14:15:39 cky: Thanks a lot. 14:15:43 <_danb_> Yvemath: on debian it's still at plt at least on my version 14:15:50 <_danb_> * plt-scheme 14:16:07 <_danb_> and the binary is called mzscheme 14:16:21 _danb_: Debian needs to get with the times. ;-) 14:16:43 _danb_: More seriously, 4.x and below are still called PLT Scheme, and 5.x is Racket. 14:17:04 fortunately, :) i'm using arch-linux, and it is available in extra repositories. 14:17:11 <_danb_> that figures I think debian testing is 4.2.1 14:17:29 cky => PLT Racket (a varient of scheme) Environment, right ? 14:17:33 _danb_: Also, mzscheme is the console-mode program, drscheme is the full graphical IDE-like program. 14:17:54 Yvemath: I can't believe that's what the Arch package is described, but, yes, that's fine. 14:18:01 *how 14:18:27 Yvemath: I say this because it's called PLT Scheme or Racket, not usually PLT Racket. :-P 14:18:38 oh, hehe. 14:18:42 <_danb_> yes, I pretty much went straight to emacs (M-x run-scheme) which is why I use mzscheme 14:19:28 Yvemath: HtDP and Teach Yourself Scheme are both apparently focused on Racket, so you'd do well to use those two books, yes. 14:19:49 hehe _danb_ i 've tried much and still failed to get addicted to emacs. Good luck on your part, it's a good program in the long way. 14:20:06 <_danb_> oh yeh, emacs has got me pretty bad now 14:20:08 Yvemath: Someone also wrote an SICP module for Racket for people who want to go through SICP using Racket. :-) 14:20:41 _danb_: I'm a vi person, but I like paredit and use it for writing Scheme code. 14:21:06 firecrow8 [~fcrow@69.38.169.34] has joined #scheme 14:22:33 <_danb_> yup, paredit's great; I use viper mode in emacs ;) it took 2 goes before I moved permanently to emacs from vim 14:22:59 cky: My apologies, but is Racket a totally diff. language ? seems like it is just another new-born dialect of scheme. 14:23:12 Yvemath: No, Racket is PLT Scheme with a new name. 14:23:31 Yvemath: So, to the extent that PLT Scheme is a new language, so then is Racket. And to the extent that it's not, then not. 14:24:42 _danb_: What I want to know (and will find out) is how Dvorak-friendly Emacs's default keybindings are. 14:25:01 ok, so now we 'are' racketeers. 14:25:09 _danb_: I already got used to the fact that (in vi) H, J, K, and L won't all be adjacent to each other. 14:25:26 Yvemath: Well, it's a little more complicated than that. :-) 14:25:35 Yvemath: PLT Scheme was already quite different from "standard" Scheme. 14:25:42 Yvemath: Even before the name change. 14:26:04 Just to make things more complicated: racket includes a _number_ of languages, some of them not scheme at all. 14:26:10 cky: umm, May i ask, in what terms ? This is going to be interesting. 14:26:13 What offby1 said, too. 14:26:19 It also I think includes reasonably strict versions of R5RS and R6RS 14:26:24 Yvemath: I'll let the Racket devs tell you that one. :-P 14:26:36 Yvemath: I think there's a kind of JavaScript in there somewhere 14:26:43 O_o 14:27:01 also they have what they call "teaching languages" -- stripped-down versions of scheme that are easier to understand, and that give more-helpful errors 14:27:27 when you run their interpreter, you get to choose which language you want. You can also specify the language at the top of a script file. 14:27:46 <_danb_> offby1: I found that language selection thing quite confusing 14:27:57 _danb_: Just choose "Module" and you'll be fine. 14:28:05 _danb_: I'm used to it enough that I no longer even think about it, really. 14:28:10 <_danb_> even though it was for pedagogical purposes 14:28:12 Then at the top of your file, write something like "#lang r5rs" or "#lang r6rs" or "#lang racket". 14:28:16 _danb_: say ... aren't you the fellow they banned from #erlang? :-) 14:28:56 "Module" is now under a better name of "use languauge from source", and should be the default for everything (except the teaching languages for HtDP, but even that will eventually change.) 14:28:56 <_danb_> hmmmmm 14:29:50 BTW, the teaching languages are not strictly *stripped* -- there's nontrivial amounts of code dedicated to make them newbie friendly. 14:29:57 copumpki_ [~copumpkin@131.247.67.79] has joined #scheme 14:30:01 i see. 14:30:38 For example, in Beginner, all function calls are actually macros -- this way it can be a first order language that barfs at you if you use a function as an expression. 14:31:06 (Something that is very idiomatic to scheme, but can confuse newbies before the know that functions are plain values.) 14:31:14 yeah, yeah. From a newbie's point of view, though, they're simplified. 14:31:45 ...they never see the reinforced glass and concrete that goes into making it a safe playpen. :-) 14:31:59 In any case, even if you know enough programming, you might still have a quick go at HtDP -- it's much more than just the technical aspects of programming. 14:32:53 cky: Oh, they see it -- they just get to play a bit in the little kids pool, then on the shalow end of the big one, then they even get to play in the deep end. 14:33:02 By then they can go to swim in the sea too. 14:33:34 BTW, Teach Yourself Scheme in Fixnum Days is pretty old and heavily outdated in some parts. 14:34:00 The main thing is that it's stuck in the `define-macro' days 14:34:12 eli: Indeed; I was just responding to offby1's comment that "from a newbie's point of view they're simplified", and thus that newbies don't see all the complicated code that makes it safe and "simple". 14:34:37 eli: Oh, wow. I haven't read either, so, didn't know that. 14:35:28 Yeah -- note that it's no longer included in the releases... It was dropped once we moved to 4.0, and now there's the guide that replaces it. 14:35:57 *nods* 14:36:08 so how to leave the cli-version of racket ? i entered into it, and got the "racket" welcome message! but exit,quit,leave all seems to fail and returns a reference to undefined identifier : leave "message" 14:36:46 Yvemath: ^D 14:36:53 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 14:36:55 That's the standard way to leave command-line programs of all sorts. 14:37:18 Well, for programs that respond well to end-of-input, anyway (which is what ^D does: it signals end of file). 14:37:24 ... but (exit) should work too. 14:37:43 (^D doesn't usually work for Windows, for example.) 14:38:00 Indeed, ^D is a Unix-specific keybinding. 14:38:05 cky: i tried ^C quit and ^Z stop, but thanks to ^D eof which worked. 14:38:19 Yvemath: Glad to be of help. :-) 14:38:26 thanks there. 14:38:49 Yvemath: If you're using linux, then a very effective way to terminate a program is C-\ 14:38:58 i also like the fact, that "help" on command-line opens the help file in the web browser, and informs you to go there. "Nice"! 14:39:01 eli: Doesn't that dump core, and not let programs clean up? 14:39:14 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Client Quit] 14:39:16 (Well, short of installing a SIGQUIT handler, but few programs do.) 14:39:34 When you use C-c, you send a break signal, that racket (and many other languages) intercepts and handles internally as an exception. 14:39:52 <_danb_> Yvemath: yeh, the help thing is good; you can also do (help symbol) 14:40:02 C-\ doesn't let it clean up -- but a well behaved OS should have no problems with that. 14:40:03 <_danb_> like (help exit) 14:40:12 (Incidentally, Java programs run under the JDK have a SIGQUIT handler that dumps the stack traces for all running threads, but does not actually terminate the program.) 14:40:33 dnm [~dnm@static-71-166-174-24.washdc.east.verizon.net] has joined #scheme 14:40:35 As for dumping core, I don't know if it does... (I have it disabled by default, and I very rarely use that C-\ thing) 14:40:45 *nods* 14:40:45 <_danb_> cky: yes, I remember hitting C-\ and getting reams of stuff from java 14:41:03 _danb_: Indeed, and that's by design. 14:41:07 For C-\? That's surprising. 14:41:10 eli: Yep. 14:41:31 I though that it should kill the process before it has a chance to burp and vomit. 14:41:40 <_danb_> oh it vomits 14:41:46 No, there is no keybinding that sends SIGKILL. 14:42:09 <_danb_> actually, I might have been using jruby 14:42:20 *eli* never even bothered to check which signal is sent... 14:42:29 _danb_: Same diff. It still uses the Java VM's SIGQUIT handler. 14:42:41 I guess I'm spoiled by not using java. 14:42:46 Hehehehe. :-) 14:45:43 vu3rdd [~vu3rdd@122.167.68.118] has joined #scheme 14:54:14 -!- cpressey|away is now known as cpressey 14:55:48 scheme is confusing or "more simple" than what i did imagined :\ 14:56:08 s/did/had/ 14:58:37 jengle [~jengle@64-252-187-48.adsl.snet.net] has joined #scheme 15:00:24 Yvemath: ?? 15:00:33 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 15:01:52 cky: defining a function is very simple. (define function-name (operation argument argument)) or (define (function-name argument argument) expression) 15:02:49 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Quit: leaving] 15:03:26 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 15:03:37 -!- chturne [~chturne@nas45-44.york.ac.uk] has quit [Quit: Leaving] 15:04:16 Yvemath: Okay, so what's confusing about that? 15:08:42 bweaver [~user@75-148-111-133-Chattanooga.hfc.comcastbusiness.net] has joined #scheme 15:11:07 aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has joined #scheme 15:11:51 cky: i've no idea, how to return a varible, like in other languages :\ 15:15:30 A variable is not a value. You can't return a variable. You can return the value of the variable, though. 15:15:55 yes, that is what i meant. 15:15:55 rudybot: eval (define (some-function argument) (let ((variable (+ argument 1))) variable)) 15:15:57 chandler: your racket sandbox is ready 15:16:00 rudybot: (some-function 2) 15:16:00 chandler: How do I define a key to be bound? (global-set-key "M-c" 'some-function) doesn't do it, I get "starts with non-prefix key". What are the meta, control, shift (and so on) keys called? 15:16:06 rudybot: eval (some-function 2) 15:16:06 chandler: ; Value: 3 15:16:07 Grr. 15:16:23 offby1: The nonsense-spouting mode of rudybot is very annoying when I forget to use `eval'. 15:17:07 offby1: Please consider disabling it, at least selectively when the input looks like it could sensibly be passed to `eval' (e.g. it begins with a paren). 15:17:20 Yvemath: Anyway, that shows how to return the value of a variable - just use its name. 15:18:33 chandler: got it :) 15:22:11 <_danb_> Yvemath: ruby allows you to do something similar; I'll often leave off the return statement and just have an expression at the end of a def; so this sort of thing has crept into blub languages now 15:22:52 _danb_: Hehehehe (re Ruby as Blub). :-P 15:23:18 _danb_: Mind you, Ruby is just copying Perl in that regard. 15:23:44 <_danb_> I'm reading Doug Hoyte's "Let over Lambda" - he tries to stress that the term isn't meant to be too derogatory 15:23:54 nowhereman [~pierre@AStrasbourg-551-1-71-217.w92-141.abo.wanadoo.fr] has joined #scheme 15:23:59 _danb_: dunno about ruby. the fact that python is still fast than ruby MIR, and there are no hopes that it'll improve any sooner, i've chosen to learn Haskell and Scheme. 15:24:30 Yvemath: MRI isn't a good place to start when comparing performance. JRuby is a better implementation to measure against. 15:24:44 -!- nowhere_man [~pierre@AStrasbourg-551-1-85-249.w81-51.abo.wanadoo.fr] has quit [Ping timeout: 272 seconds] 15:25:17 Yeah, but again, it's ruby implemented in JVM. :s i'd better write code in C & C++ if i want that. 15:25:33 Yvemath: What? You're comparing apples with oranges. 15:25:49 Yvemath: C and C++ are unmanaged languages. Java, Ruby, Scheme, etc. are all managed. 15:26:34 um, unmanaged ? 15:26:55 you meant the "english" meaning or something else ? 15:27:10 Yvemath: There's a specific meaning of a managed language versus an unmanaged one. 15:27:45 -!- copumpki_ is now known as pumpkin 15:27:46 cky: ok, got it. ;P 15:28:01 Managed is the category of languages that the average manager might prescribe 15:28:10 Not sure where scheme fits in on that one 15:28:16 Hehehehehe. 15:29:51 Yvemath: C and C++ allow your program direct access to the machine, without any sort of runtime required (of course you can choose to use one---but none is required). Managed languages cannot function without a runtime. 15:30:29 :) 15:30:33 Yvemath: In exchange for that managedness, though, you don't have to worry about memory allocation so much, and a lot of things like array bounds checking is done for you. 15:30:54 (so you don't get undefined behaviour if your program accesses a non-existent array element) 15:31:28 Also, managed languages allow latent typing, whereas it's pretty hard to do on an unmanaged system. 15:31:32 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 15:32:10 that explains a lot. 15:32:47 (C++ can, to a degree, using RTTI, but, like, a lot of C++ programmers think RTTI is too "dynamic" and avoid it anyway. :-P) 15:34:47 shadow_walker [~shadow_wa@187.82.79.239] has joined #scheme 15:39:02 jeapostrophe_ [~jay@lallab.cs.byu.edu] has joined #scheme 15:45:19 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Quit: Leaving] 15:47:21 -!- gravicappa [~gravicapp@ppp91-78-230-198.pppoe.mtu-net.ru] has quit [Ping timeout: 250 seconds] 15:48:06 -!- _danb_ [~user@124-169-4-124.dyn.iinet.net.au] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 15:50:36 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Remote host closed the connection] 15:50:36 -!- shadow_walker [~shadow_wa@187.82.79.239] has quit [Read error: Connection reset by peer] 15:57:58 StucKman [~mdione@lakshmi.inria.fr] has joined #scheme 15:58:48 given a list l and a function f, how can I call f with the elements in l as its positional arguments? 15:59:14 that is, if l= (list 1 2 3), then (foo f l) is (f 1 2 3) 16:00:38 I see apply, but (apply f l) reminds me more to a curryfication 16:01:23 gravicappa [~gravicapp@ppp85-141-164-164.pppoe.mtu-net.ru] has joined #scheme 16:01:27 alvatar [~alvatar@201.127.222.87.dynamic.jazztel.es] has joined #scheme 16:03:35 apply is the answer. 16:03:44 -!- drdo [~user@194.210.228.14] has quit [Ping timeout: 276 seconds] 16:04:09 ah, k 16:06:20 -!- tupi [~david@139.82.89.24] has quit [Remote host closed the connection] 16:08:24 -!- jengle [~jengle@64-252-187-48.adsl.snet.net] has quit [Quit: jengle] 16:08:59 joebo [~Joe@cpe-66-61-120-119.neo.res.rr.com] has joined #scheme 16:10:01 -!- StucKman [~mdione@lakshmi.inria.fr] has left #scheme 16:11:17 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 16:27:44 rdd [~rdd@c83-250-48-164.bredband.comhem.se] has joined #scheme 16:32:20 shadow_walker [~shadow_wa@187.82.93.91] has joined #scheme 16:41:22 jewel [~jewel@196-210-134-108.dynamic.isadsl.co.za] has joined #scheme 16:45:27 -!- jeapostrophe_ [~jay@lallab.cs.byu.edu] has quit [Quit: jeapostrophe_] 16:46:33 Ragnaroek_ [~chatzilla@pD9E273BF.dip.t-dialin.net] has joined #scheme 16:49:05 -!- Ragnaroek [~chatzilla@pD9E240B0.dip.t-dialin.net] has quit [Ping timeout: 276 seconds] 16:49:12 -!- Ragnaroek_ is now known as Ragnaroek 16:50:22 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 16:58:42 jengle [~jengle@64-252-187-48.adsl.snet.net] has joined #scheme 16:59:44 hi all. 17:00:18 Riastradh: you around? 17:10:01 -!- alvatar [~alvatar@201.127.222.87.dynamic.jazztel.es] has quit [Quit: leaving] 17:10:18 alvatar [~alvatar@201.127.222.87.dynamic.jazztel.es] has joined #scheme 17:10:25 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 252 seconds] 17:21:26 -!- zbignova is now known as zbigold 17:22:44 -!- jonrafkind [~jon@crystalis.cs.utah.edu] has quit [Read error: Connection reset by peer] 17:26:45 Nope, sorry. 17:31:42 howdy 17:32:01 i was wondering if you might be able to offer me a bit more insight into that iteration problem i was talking about last night 17:32:44 i was beginning to understand what you were showing me but i'm still unsure of how to apply it to the problem 17:34:34 -!- dnm [~dnm@static-71-166-174-24.washdc.east.verizon.net] has quit [Ping timeout: 272 seconds] 17:35:38 jengle pasted "iterative procedures" at http://paste.lisp.org/display/116024 17:38:36 -!- zbigold is now known as zbigone 17:39:39 jengle: The idea is this: you want to calculate the most recent element. You also want to hold back the last N elements to allow you to calculate the most recent element. 17:40:18 In the case of Fibonacci sequence, you only need to hold back the last 1 element. 17:40:35 Does that make more sense? 17:41:14 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 17:41:57 yes, that makes sense. and i understand that in the case of the fibonacci sequence, the computation would be the previous number plus the current one. 17:42:13 but i can't figure out what the computation would be for this problem 17:42:25 O_o 17:43:15 I can't give you more clues without the whole answer away. You're like _that_ close to it. 17:43:57 And if I give you the answer, you'll kick yourself. :-P 17:44:28 mickn [~mickn@unaffiliated/mickn] has joined #scheme 17:46:34 In your pasted version of Fibonacci, do you know what a and b are? Riastradh went through it with you, but I don't think it's sunk in for you yet. 17:47:52 -!- joebo [~Joe@cpe-66-61-120-119.neo.res.rr.com] has quit [Ping timeout: 272 seconds] 17:49:55 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 17:50:08 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 17:52:05 -!- Ragnaroek [~chatzilla@pD9E273BF.dip.t-dialin.net] has quit [Ping timeout: 240 seconds] 17:52:50 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 17:55:05 -!- shadow_walker [~shadow_wa@187.82.93.91] has quit [Read error: Connection reset by peer] 17:57:26 dnm [~dnm@static-71-166-174-24.washdc.east.verizon.net] has joined #scheme 17:59:46 Ragnaroek [~chatzilla@pD9E25391.dip.t-dialin.net] has joined #scheme 18:00:19 foof: what I meant was that if an alloction using a third-party library fails due to memory exhaustion, it might make sense (?) to run the chibi GC to free up some memory. There's no third-party GC involved -- it might just be a malloc() call that fails. 18:03:40 jengle, I have a tutorial on lisp and fibonacci somewhere 18:04:22 I also have a completed solution, if jengle does become _totally_ stuck. :-P 18:04:32 it comes second where you google fibonacci.lisp 18:06:57 Iterative Fibonacci is easy, but iterative SICP exercise 1.11 is something else if you want to avoid calculating extra values. :-) 18:07:17 I'll lisppaste my solution. jengle is on their honour not to look at it, unless they want to kick themself. :-) 18:08:55 cky pasted "SICP 1.11 iterative solution" at http://paste.lisp.org/display/116025 18:09:18 Fare: ^^--- 18:09:36 jengle: Don't cheat, solve it yourself first. :-D 18:12:55 arcfide [1000@140-182-225-15.dhcp-bl.indiana.edu] has joined #scheme 18:13:13 cky: yes? 18:13:22 http://fare.tunes.org/files/fun/fibonacci.lisp 18:14:02 Fare: Wow, that's something else. 18:17:45 Fare: I could probably port my SICP 1.11 answer to use your iter-1 framework. 18:19:16 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 18:20:49 shadow_walker [~shadow_wa@187.82.113.206] has joined #scheme 18:21:55 united_anand [anandhegde@140-182-226-233.dhcp-bl.indiana.edu] has joined #scheme 18:22:04 hi aaron 18:22:07 Hello united_anand. 18:25:36 [1]kevin [xiuwen@140-182-227-56.dhcp-bl.indiana.edu] has joined #scheme 18:25:44 <[1]kevin> hello aaron 18:25:48 <[1]kevin> hi anand 18:25:59 hey xiuwen 18:27:14 -!- mickn [~mickn@unaffiliated/mickn] has quit [Quit: Leaving] 18:27:17 hakuna [~phenom@140-182-226-24.dhcp-bl.indiana.edu] has joined #scheme 18:27:23 sdhcf 18:27:24 Hello hakuna 18:27:43 hey team 18:27:56 mickn [~mickn@unaffiliated/mickn] has joined #scheme 18:30:29 femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #scheme 18:30:52 -!- arcfide [1000@140-182-225-15.dhcp-bl.indiana.edu] has left #scheme 18:30:57 -!- united_anand [anandhegde@140-182-226-233.dhcp-bl.indiana.edu] has quit [Quit: HydraIRC -> http://www.hydrairc.com <- IRC with a difference] 18:31:23 -!- shadow_walker [~shadow_wa@187.82.113.206] has quit [Ping timeout: 245 seconds] 18:32:23 i don't want to cheat :) 18:32:49 -!- [1]kevin [xiuwen@140-182-227-56.dhcp-bl.indiana.edu] has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Po-ta-to, boil em, mash em, stick em in a stew.] 18:34:44 jengle: :-) 18:35:12 jengle: Then, think about what makes the Fibonacci function work. In the case of your Fibonacci function, you have a = F(n), and b = F(n - 1). 18:36:29 jengle: In the case of SICP 1.11, you need 3 variables: a = F(n), b = F(n - 1), c = F(n - 2). 18:36:43 Once you have those, piecing together what needs to be done on each iteration should be straightforward. 18:42:28 shouldn't a = f(n), b = 2*f(n-1) and c = 3*f(n-2)? 18:44:46 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 18:47:28 jumbo [~phenom@140-182-214-244.dhcp-bl.indiana.edu] has joined #scheme 18:48:19 -!- hakuna [~phenom@140-182-226-24.dhcp-bl.indiana.edu] has quit [Ping timeout: 252 seconds] 18:51:36 -!- jumbo [~phenom@140-182-214-244.dhcp-bl.indiana.edu] has quit [Ping timeout: 240 seconds] 18:52:32 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Ping timeout: 276 seconds] 18:57:58 -!- mickn [~mickn@unaffiliated/mickn] has quit [Quit: Leaving] 19:03:11 jeapostrophe_ [~jay@lallab.cs.byu.edu] has joined #scheme 19:04:26 femtooo [~femto@95-89-197-196-dynip.superkabel.de] has joined #scheme 19:07:31 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping timeout: 240 seconds] 19:08:11 those multiplications are throwing me off 19:09:39 -!- MrFahrenheit [~RageOfTho@users-55-146.vinet.ba] has quit [Read error: No route to host] 19:09:58 MrFahrenheit [~RageOfTho@users-55-146.vinet.ba] has joined #scheme 19:11:35 this is frustrating... i feel like i should be capable of doing this. 19:13:41 it's not very encouraging for someone who wants to be a computer scientist 19:13:44 I have to say that I think that's the most difficult exercise I've done in SICP. Not that I'm that far in myself. But I'm somewhere in the middle of the second chapter. 19:18:13 URL to the exercise? 19:19:24 jengle: use memoization, and transform your bogo-f into a bigo-f :) 19:22:25 Fare: buzz words that i don't understand :/ 19:23:16 Fare: Go up a little, it's exercise 1.11 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%_sec_1.2.3 19:23:41 The recursive version is trivial, but the iterative version required me to learn some stuff 19:24:20 I think that my brain overheated a few times, as seems to be happening with jengle :) 19:25:05 -!- alvatar [~alvatar@201.127.222.87.dynamic.jazztel.es] has quit [Quit: leaving] 19:25:19 just transform your recursive version into a tail-recursive version trivially 19:25:59 by having explicit accumulators out of the variables otherwise implicitly accumulated on the stack 19:32:06 kilimanjaro [~kilimanja@ip24-255-34-109.tc.ph.cox.net] has joined #scheme 19:32:06 -!- kilimanjaro [~kilimanja@ip24-255-34-109.tc.ph.cox.net] has quit [Changing host] 19:32:06 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 19:36:13 -!- chandler [~n@opendarwin/developer/chandler] has quit [Read error: Operation timed out] 19:37:06 chandler [~n@new.unmutual.info] has joined #scheme 19:37:25 -!- chandler [~n@new.unmutual.info] has quit [Changing host] 19:37:25 chandler [~n@opendarwin/developer/chandler] has joined #scheme 19:37:43 ray_ [ray@xkcd-sucks.org] has joined #scheme 19:38:04 -!- ray [ray@xkcd-sucks.org] has quit [Ping timeout: 272 seconds] 19:39:05 -!- aoh [~aki@80.75.102.51] has quit [Ping timeout: 255 seconds] 19:45:23 shadow_walker [~shadow_wa@187.37.211.118] has joined #scheme 19:58:53 -!- jengle [~jengle@64-252-187-48.adsl.snet.net] has quit [Quit: jengle] 20:00:15 aoh [~aki@80.75.102.51] has joined #scheme 20:01:04 bgs100 [~ian@unaffiliated/bgs100] has joined #scheme 20:06:09 femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #scheme 20:08:43 -!- femtooo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping timeout: 240 seconds] 20:11:18 SirNick [~nick@199.223.126.66] has joined #scheme 20:11:23 -!- jewel [~jewel@196-210-134-108.dynamic.isadsl.co.za] has quit [Ping timeout: 245 seconds] 20:12:43 wbooze` [~user@xdsl-78-34-243-233.netcologne.de] has joined #scheme 20:12:59 homie` [~user@xdsl-78-34-243-233.netcologne.de] has joined #scheme 20:15:08 -!- wbooze [~user@xdsl-78-34-200-122.netcologne.de] has quit [Ping timeout: 245 seconds] 20:16:04 -!- homie [~user@xdsl-78-34-200-122.netcologne.de] has quit [Ping timeout: 272 seconds] 20:31:44 -!- pnkfelix [~Adium@c-71-225-45-140.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 20:34:14 Unthahorsten [~Unthahors@del63-3-88-177-167-25.fbx.proxad.net] has joined #scheme 20:34:20 Axsuul [~someone@97-93-99-133.static.mtpk.ca.charter.com] has joined #scheme 20:35:38 hotblack23 [~jh@p57B5A279.dip.t-dialin.net] has joined #scheme 20:46:51 BW^- [~Miranda@92.83.161.164] has joined #scheme 20:47:09 are calls to named lets technically equivalent to lambda invocations, i.e. they can return a return value? 20:47:56 saccade [~saccade@c-71-192-201-31.hsd1.ma.comcast.net] has joined #scheme 20:47:58 all expressions return values 20:48:20 can they be used to make recursive loops? 20:48:27 named lets? yea 20:48:32 (i'm quite sure they can, though right now at this late hour i can't visualize how) 20:48:37 can you give a real short code example of that ? :) 20:48:40 (let loop () (loop)) 20:48:48 no recursion in it. 20:48:56 what would you say its doing? 20:49:00 ah i mean.. multi-level recursion 20:49:11 like, process a tree data structure 20:50:40 sorry for even addressing it, i think i see the answer here now. :) 20:50:53 (let loop ([nodes nodes] [parents '()]) (if (null? nodes) (loop (car parents)) ...) ;; ok i got tired of writing the example 20:50:55 I don't understand your questions, so I'm not sure how to help 20:51:17 you can call the named let with the same number of arguments as you have bindings 20:51:39 If you understand how to rewrite a named let as a `letrec', then you can probably reduce your question to some other question about `letrec' 20:52:02 its basically the same as (define (loop [arg1 x] [arg2 y]) ...), in racket at least 20:52:40 isn't `loop' bound within the inits (`x' and `y' there) in racket? 20:53:22 Yes, it is 20:53:29 you mean you can call loop where I wrote x? 20:53:32 schmir [~schmir@mail.brainbot.com] has joined #scheme 20:53:44 Yes 20:53:54 heh I suppose so. i dont know why you would do such a thing 20:54:03 rudybot: eval (define (loop (arg loop)) arg) 20:54:09 rudybot: eval (eq? loop (loop)) 20:54:10 chandler: ; Value: #t 20:54:43 rudybot: eval (define (loop [arg (loop)]) arg) 20:54:44 jonrafkind: your sandbox is ready 20:54:50 rudybot: eval (loop) 20:55:03 jonrafkind: error: with-limit: out of time 20:55:58 rudybot: "Hello world!" 20:56:04 BW^-: hello, just refactoring some code a bit, and my emacs is set up so that when i press tab it intends the line properly ... is there a way to tell emacs to do that to the whole document? 20:56:21 BW^-: You have to use eval, unfortunately. 20:56:24 ah 20:56:31 rudybot: eval "Hello world!" 20:56:40 BW^-: your sandbox is ready 20:56:41 BW^-: ; Value: "Hello world!" 20:56:45 yey :) 20:57:55 -!- rdd [~rdd@c83-250-48-164.bredband.comhem.se] has quit [Read error: Operation timed out] 21:00:49 ah, now made a recursive tree search thing using only a named let, simple as always. super. 21:04:56 Oh no, jengle gave up? :-O 21:05:10 franki^: Did you see the solution I posted? You can compare it with your version and see how it compares. 21:06:09 -!- shadow_walker [~shadow_wa@187.37.211.118] has quit [Remote host closed the connection] 21:07:48 femtooo [~femto@95-89-197-196-dynip.superkabel.de] has joined #scheme 21:08:12 cky: I just had a look at it, and it's much prettier than my solution. :) However I'm not well-versed in DO 21:08:32 I also plan on reading through Fare's article when I get home from work. 21:08:58 :-) 21:09:05 Yeah, Fare's code is hardcore. :-) 21:10:19 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping timeout: 240 seconds] 21:10:38 can you post a link to fares article.. just googled for it and found this instead "Cab Fare Scheme Leads To 59 Arrests" 21:10:59 http://fare.tunes.org/files/fun/fibonacci.lisp 21:12:45 grettke [~grettke@cpe-65-30-30-255.wi.res.rr.com] has joined #scheme 21:14:28 -!- BW^- [~Miranda@92.83.161.164] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 21:16:42 franki^: It's trivial to rewrite DO loops as named LETs. 21:16:54 I can post one and you can compare the two. 21:18:25 Please do 21:18:42 Thanks for this nice article, I loved the Alan Perlis quote :) 21:20:24 what is the quote? 21:20:38 cky pasted "SICP 1.11 iterative solution using named LET" at http://paste.lisp.org/display/116032 21:20:54 "You think you know when you can learn, are more sure when you can write, even more when you can teach, but certain when you can program." 21:21:10 franki^: The two are exactly identical. Any DO loop can be trivially expanded to an equivalent named LET form. 21:21:43 Unthahorsten: Nice. 21:26:16 -!- pavelludiq [~quassel@87.246.61.65] has quit [Remote host closed the connection] 21:27:00 franki^: Anyway, does the named LET version make more sense to you? Once you look at the two enough, you should be able to mentally translate any DO loop into named LET without problems. 21:27:26 cky: Walk through a simple translation on paper, it is obvious isn't it? 21:27:34 Exactly. :-) 21:29:44 cky: I think I see what's going on, although I might bother you about it again over the weekend, if that's okay with you? Pretending to work gets in the way of studying Scheme. ;) 21:30:45 Sure, that's good with me. :-D 21:32:44 -!- Unthahorsten [~Unthahors@del63-3-88-177-167-25.fbx.proxad.net] has quit [Quit: goodbye] 21:32:48 Unfortunately I need to do it to keep a roof over my head :\ 21:33:11 Awwww.... 21:34:33 -!- aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has quit [Quit: leaving] 21:37:00 dfkjjkfd [~paulh@145.120.22.35] has joined #scheme 21:37:34 Yeah, one of these days I'll find a better way to make money, or win the lottery and go back to uni. We'll see... 21:37:49 franki^: Well, what's your current way? 21:38:10 If I win the lottery, I'm not going to uni. I'm starting my own company. 21:38:47 If I do get around to starting my company, most/all coding will be done with Scheme. 21:39:03 I teach English slash pretend to write PHP, an unusual combination perhaps. 21:39:51 That's something hardcore. :-) 21:40:09 I work for a Mexican web hosting company. They just like having a native English speaker around 21:40:19 Hahahahahaha. 21:40:34 ;) 21:40:36 Do you live in Mexico then? Or do you just get Mexican wages living in the US? 21:40:52 I live in Mexico, I'm actually British though 21:41:11 And I doubt I'd be able to survive on these wages in the US! 21:42:09 Yeah, indeed. I feel really bad about people who have to. :-( 21:42:18 (And there are plenty of people in that boat. :-() 21:42:31 Yeah, I bet :( 21:42:50 Luckily my life is pretty comfortable, but not nearly enough Scheme in it! 21:43:00 Hahahaha, awwww.... 21:43:12 -!- githogori [~githogori@adsl-66-123-22-146.dsl.snfc21.pacbell.net] has quit [Remote host closed the connection] 21:43:41 Like I said, if I start a company, it'll be a software company that codes primarily Scheme. But first, I gotta get much, much better at Scheme. :-P 21:44:22 Well, good luck with that, I'll work on getting better at Scheme too and you can give me a job. ;) 21:44:28 Hehehehe. 21:47:39 -!- chandler [~n@opendarwin/developer/chandler] has quit [Read error: Operation timed out] 21:50:42 cky: got a good business idea? 21:51:06 chandler [~n@new.unmutual.info] has joined #scheme 21:51:17 -!- chandler [~n@new.unmutual.info] has quit [Changing host] 21:51:17 chandler [~n@opendarwin/developer/chandler] has joined #scheme 21:53:44 grettke: "Fake it till you make it" 21:53:45 :-P 21:53:54 hehehe 21:55:25 -!- jimrees_ [~jimrees@ita4fw1.itasoftware.com] has quit [Ping timeout: 240 seconds] 22:05:03 Alex-_ [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #scheme 22:06:43 -!- alexsuraci [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Ping timeout: 240 seconds] 22:06:44 -!- alexsuraci` [~Alex@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Ping timeout: 265 seconds] 22:08:28 alexsuraci` [~Alex@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #scheme 22:09:03 -!- saccade [~saccade@c-71-192-201-31.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 22:11:23 -!- zbigone is now known as zbiback 22:11:55 -!- femtooo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping timeout: 240 seconds] 22:12:27 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 22:12:36 -!- firecrow8 [~fcrow@69.38.169.34] has left #scheme 22:12:49 -!- SirNick [~nick@199.223.126.66] has quit [Read error: Connection reset by peer] 22:13:58 femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #scheme 22:14:35 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Remote host closed the connection] 22:14:50 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 22:22:04 -!- jeapostrophe_ [~jay@lallab.cs.byu.edu] has quit [Quit: jeapostrophe_] 22:22:41 -!- gravicappa [~gravicapp@ppp85-141-164-164.pppoe.mtu-net.ru] has quit [Ping timeout: 265 seconds] 22:22:58 -!- grettke [~grettke@cpe-65-30-30-255.wi.res.rr.com] has quit [] 22:23:49 -!- hotblack23 [~jh@p57B5A279.dip.t-dialin.net] has quit [Quit: Leaving.] 22:24:58 whittle [~jason@pool-74-108-152-157.nycmny.east.verizon.net] has joined #scheme 22:29:55 -!- fradgers- [~fradgers-@5e065bfd.bb.sky.com] has left #scheme 22:32:34 -!- bweaver [~user@75-148-111-133-Chattanooga.hfc.comcastbusiness.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:35:33 -!- whittle [~jason@pool-74-108-152-157.nycmny.east.verizon.net] has quit [Quit: leaving] 22:38:57 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Quit: Leaving] 22:46:03 Azuvix [~user@174-27-51-173.bois.qwest.net] has joined #scheme 22:46:22 -!- homie` [~user@xdsl-78-34-243-233.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:46:54 mjonsson [~mjonsson@cpe-98-14-173-5.nyc.res.rr.com] has joined #scheme 22:46:58 -!- wbooze` [~user@xdsl-78-34-243-233.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:50:35 homie [~user@xdsl-78-34-243-233.netcologne.de] has joined #scheme 22:52:48 wbooze [~user@xdsl-78-34-243-233.netcologne.de] has joined #scheme 22:56:55 drdo [~user@98.192.108.93.rev.vodafone.pt] has joined #scheme 23:04:01 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Read error: Operation timed out] 23:07:47 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 23:10:20 SirNick [~nick@199.223.126.66] has joined #scheme 23:15:56 -!- dnm [~dnm@static-71-166-174-24.washdc.east.verizon.net] has quit [Ping timeout: 272 seconds] 23:24:05 jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 23:24:18 -!- jeapostrophe_ [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Client Quit] 23:27:30 -!- Azuvix [~user@174-27-51-173.bois.qwest.net] has quit [Remote host closed the connection] 23:32:15 -!- nowhereman [~pierre@AStrasbourg-551-1-71-217.w92-141.abo.wanadoo.fr] has quit [Ping timeout: 240 seconds] 23:32:52 -!- alexsuraci` [~Alex@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Disconnected by services] 23:34:28 nowhereman [~pierre@AStrasbourg-551-1-20-243.w86-213.abo.wanadoo.fr] has joined #scheme 23:34:36 -!- dnm_ [~dnm@c-68-34-57-169.hsd1.va.comcast.net] has quit [] 23:46:57 jengle [~jengle@64-252-187-48.adsl.snet.net] has joined #scheme 23:50:08 -!- snorble [~none@s83-179-14-105.cust.tele2.se] has quit [Ping timeout: 272 seconds] 23:54:39 saccade [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 23:59:50 -!- Yvemath [~kuwo@122.161.59.82] has quit [Ping timeout: 265 seconds]