00:02:15 -!- em [~em@unaffiliated/emma] has quit [Ping timeout: 260 seconds] 00:09:13 em [~em@unaffiliated/emma] has joined #scheme 00:35:40 chromaticwt [~user@75-173-92-60.albq.qwest.net] has joined #scheme 00:37:50 pjb- [~t@81.202.16.46.dyn.user.ono.com] has joined #scheme 01:48:43 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 245 seconds] 02:00:18 -!- gffa [~gffa@unaffiliated/gffa] has quit [Quit: sleep] 02:01:40 Brendan_T [~brendan@46.105.251.111] has joined #scheme 02:38:12 -!- tupi [~david@189.119.192.96] has quit [Quit: Leaving] 02:38:18 -!- em [~em@unaffiliated/emma] has quit [Remote host closed the connection] 02:39:03 em [~em@unaffiliated/emma] has joined #scheme 02:42:26 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Remote host closed the connection] 02:44:23 -!- em [~em@unaffiliated/emma] has quit [Read error: Connection reset by peer] 02:44:35 em [~em@unaffiliated/emma] has joined #scheme 02:59:47 -!- Brendan_T [~brendan@46.105.251.111] has quit [Remote host closed the connection] 03:00:47 Brendan_T [~brendan@46.105.251.111] has joined #scheme 03:01:23 -!- Brendan_T [~brendan@46.105.251.111] has quit [Remote host closed the connection] 03:07:29 Brendan_T [~brendan@46.105.251.111] has joined #scheme 03:08:19 -!- Brendan_T [~brendan@46.105.251.111] has quit [Remote host closed the connection] 03:11:47 Brendan_T [~brendan@46.105.251.111] has joined #scheme 03:12:40 -!- Brendan_T [~brendan@46.105.251.111] has quit [Remote host closed the connection] 03:18:30 -!- gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Ping timeout: 258 seconds] 03:22:23 wolfpython [~wolf@58.212.31.196] has joined #scheme 03:22:54 gienah [~mwright@ppp121-44-88-164.lns20.syd6.internode.on.net] has joined #scheme 03:24:03 gnomon [~gnomon@174.119.66.178] has joined #scheme 03:42:33 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 03:52:52 Brendan_T [~brendan@46.105.251.111] has joined #scheme 03:57:15 -!- tessier [~treed@kernel-panic/copilotco] has quit [Ping timeout: 255 seconds] 04:06:31 -!- jcowan [~John@cpe-98-14-172-212.nyc.res.rr.com] has quit [Quit: Leaving] 04:24:10 can I ask sicp questions here? 04:28:11 Sure. there is also a #sicp channel 04:30:21 chromaticwt: you could always try asking the question and seeing what happens. 04:31:18 ok, I have a question about exercise 1.11. f(n) = f(n-1) + 2f(n-2)... if n >= 3. 04:31:41 so 2f(n-2) means 2 * f(n-2) right? or also, f(n-2) + f(n-2). 04:32:05 but, this only holds true for true functions. 04:32:57 -!- em [~em@unaffiliated/emma] has quit [Ping timeout: 276 seconds] 04:32:59 so 2(rand (- n 2)) would not be the same as 2f(n-2); if that makes sense? 04:34:35 hmm....you could do 2f(n-2) by using (* 2 (f (- n 2))) 04:34:48 so I only have to compute f(n -2) once, in this case, then multiply by two. I don't have to compute it twice then add, but if I did I would get the same answer. 04:35:37 You can memorize partial results in order to optimize your algorithm. 04:37:14 ok, so I could do f(n-2) + f(n-2) if I wanted to, or I could just multiply f(n-2) * 2. But this only works if f is a true function. Is this correct? 04:37:52 What do you mean by _true function_ ? 04:38:44 ok, so (square x) would be a true function, because for every input there is only one output, and there are no dependencies on other variables, or functions. 04:39:01 chromaticwt: the problem gives you the rule for a base case and a recursive rule and is asking you to transform that to an iterative form. 04:39:04 (rand n) which would produce different outputs for the same input, would not be a true function. 04:41:17 em [~em@unaffiliated/emma] has joined #scheme 04:42:19 this is utterly irrelevant to the question, however. 04:43:47 chromaticwt: the important question is given any arbitrary n, what information do you need to retain to calculate f(n). this gives you the form for a tail recursive call. 04:46:05 -!- em [~em@unaffiliated/emma] has quit [Ping timeout: 258 seconds] 04:47:04 em [~em@unaffiliated/emma] has joined #scheme 04:48:03 yeah, my question isn't really about the problem per say. I was just thinking like: 04:48:15 -!- wolfpython [~wolf@58.212.31.196] has quit [Ping timeout: 248 seconds] 04:48:23 2f(n) = f(n) + f(n), but only if f is a function. 04:48:39 is that a true statement. That was more of what I was trying to ask. 04:49:07 2f(n) may or may not = f(n) + f(n) is f is not a function. 04:50:22 2 * = + (unless you are dealing with some esoteric math structure) 04:51:07 ok, cool. 04:51:37 http://en.wikipedia.org/wiki/Distributive_property 04:52:27 -!- em [~em@unaffiliated/emma] has quit [Remote host closed the connection] 04:52:38 2 * = (1 + 1) * = (1 * ) + (1 * ) = + 04:54:03 (+ (rand n) (rand n)) may or may not equal (* 2 (rand n)), because rand is computed twice. 04:54:40 (+ (rand n) (rand n)) <<-- you are summing two different quantities. 04:54:54 chromaticwt: you might be interested in learning some elementary recursion theory. it has some simple rules about a subset of all functions. which happen to be all computable functions. (convenient) 04:55:01 so if the second part of 1.11 was f(n) = f(n-1) + 2rand(n-2) + 3rand(n-3)... then the way in which it was computed would matter. 04:55:20 rand obviously is not a function in the mathematical sense of the word. 04:57:07 or if f in any other way was not a function in the mathematical sense of the word. if like if it was a function that had internal mutable state and used that state to compute it's value. 04:58:12 chromaticwt: rand deals with the notion of time, unlike most mathematical functions. 04:58:13 rudybot: (define foo () (let ((count 0)) (set! count (+ count 1)) count)) 04:58:14 tali713: your sandbox is ready 04:58:14 tali713: error: eval:1:0: define: bad syntax (multiple expressions after identifier) in: (define foo () (let ((count 0)) (set! count (+ count 1)) count)) 04:58:33 rudybot: (define (foo) (let ((count 0)) (set! count (+ count 1)) count)) 04:58:34 tali713: Done. 04:58:39 rudybot: foo 04:58:39 tali713: ; Value: # 04:59:07 rudybot: (define bar (foo)) 04:59:07 tali713: Done. 04:59:15 rudybot: (foo) 04:59:16 tali713: ; Value: 1 04:59:18 rudybot: (foo) 04:59:18 tali713: ; Value: 1 04:59:35 lol, okay, bad demonstration. it's been a while. 05:00:38 rudybot: (let ((count 0)) (define foo () (set! count (+ count 1)) count)) 05:00:38 pjb-: your sandbox is ready 05:00:39 pjb-: error: eval:1:17: define: bad syntax (multiple expressions after identifier) in: (define foo () (set! count (+ count 1)) count) 05:00:44 rudybot: (let ((count 0)) (define foo () (set! count (+ count 1)) count)) 05:00:44 pjb-: error: eval:1:17: define: bad syntax (multiple expressions after identifier) in: (define foo () (set! count (+ count 1)) count) 05:00:58 rudybot: (let ((count 0)) (define (foo) (set! count (+ count 1)) count)) 05:00:58 pjb-: error: eval:1:0: begin (possibly implicit): no expression after a sequence of internal definitions in: ((define (foo) (set! count (+ count 1)) count)) 05:01:04 so, also normal order vs applicative order matters when it's not completely functional programming, but with strictly functional programming, it doesn't matter so much? 05:01:39 rudybot: (define foo (lambda () (let ((count 0)) (lambda () (set! count (+ 1 count)) count)))) 05:01:39 tali713: Done. 05:01:48 yes 05:01:51 rudybot: (define bar (foo)) 05:01:52 tali713: Done. 05:01:59 rudybot: (bar) 05:02:00 tali713: ; Value: 1 05:02:01 rudybot: (bar) 05:02:02 tali713: ; Value: 2 05:02:18 chromaticwt: absolutely. 05:03:13 chromaticwt: of course conditionals raise some hairy questions if you are over eager in your evaluation. 05:10:24 -!- pjb- [~t@81.202.16.46.dyn.user.ono.com] has quit [Ping timeout: 240 seconds] 05:10:25 Riastradh, your site is serving your blag as ISO-8559-1, but it contains UTF-8! 05:10:50 Also, bananas. 05:25:14 -!- rff [~rff@ip72-207-248-18.br.br.cox.net] has quit [Ping timeout: 260 seconds] 05:26:12 rudybot: (define foo (let ((count 0)) (lambda () (set! count (+ 1 count)) count))) 05:26:12 leppie: your sandbox is ready 05:26:12 leppie: Done. 05:26:31 rudybot: (values (foo) (foo)) 05:26:31 leppie: ; Value: 1 05:26:32 leppie: ; Value#2: 2 05:37:41 -!- djanatyn is now known as djanatyn|afk 05:44:27 gnomon: Riastradh is still here? 05:48:48 leppie, did Riastradh leave?? 05:49:48 been gone for about a month now :( 05:50:07 rudybot: seen Riastradh 05:50:08 leppie: Riastradh was seen in/on #scheme five weeks ago, saying "gnus is a multiparameter family of mailers, with a high-dimensional parameter space. Nobody has found good mailer in there, although there are many local optima.", and then Riastradh was seen quitting in/on fsf/member/riastradh five weeks ago, saying "Ping timeout: 248 seconds" 05:51:18 *aspect* has to ask: "in/on"? Is rudybot designed by a comittee? 05:56:22 tessier [~treed@mail.copilotco.com] has joined #scheme 05:57:14 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 06:03:36 *offby1* frets 06:03:42 aspect: patches welcome 06:03:57 I swear I had a good reason for that 06:04:54 rudybot: seen Lean McBean the Mean Queen 06:04:54 offby1: expecting: seen 06:18:16 gravicappa [~gravicapp@ppp91-77-174-77.pppoe.mtu-net.ru] has joined #scheme 06:24:58 -!- chromaticwt [~user@75-173-92-60.albq.qwest.net] has quit [Ping timeout: 260 seconds] 06:29:12 -!- EmmanuelOga [~emmanuel@190.244.27.236] has quit [Ping timeout: 240 seconds] 06:29:58 -!- leo2007 [~leo@123.114.42.230] has quit [Ping timeout: 258 seconds] 06:31:23 jewel [~jewel@196-215-16-235.dynamic.isadsl.co.za] has joined #scheme 06:52:18 kudkudyak [~sun@94.72.158.83] has joined #scheme 06:53:29 chromaticwt [~user@75-173-92-60.albq.qwest.net] has joined #scheme 07:05:40 fschwidom [~fschwidom@2.212.186.130] has joined #scheme 07:30:43 -!- fschwidom [~fschwidom@2.212.186.130] has quit [Remote host closed the connection] 07:47:42 -!- realitygrill [~realitygr@76.226.206.250] has quit [Quit: realitygrill] 07:59:15 -!- homie [~levgue@xdsl-78-35-164-84.netcologne.de] has quit [Read error: Connection reset by peer] 07:59:22 -!- wbooze [~levgue@xdsl-78-35-164-84.netcologne.de] has quit [Read error: Connection reset by peer] 08:00:41 wbooze [~levgue@xdsl-78-35-153-178.netcologne.de] has joined #scheme 08:00:41 homie [~levgue@xdsl-78-35-153-178.netcologne.de] has joined #scheme 08:11:59 leo2007 [~leo@123.123.249.218] has joined #scheme 08:32:23 -!- dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has quit [Quit: dnolen] 08:34:49 offby1: Please don't wipe rudybot's database, in case that's the last artifact we have of Riastradh's existence. 08:35:05 Maybe we should just email him and see what's going on. 08:35:12 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 08:59:12 -!- Brendan_T [~brendan@46.105.251.111] has quit [Ping timeout: 255 seconds] 09:13:24 fschwidom [~fschwidom@2.212.186.130] has joined #scheme 09:14:23 -!- pchrist_ [~spirit@gentoo/developer/pchrist] has quit [Ping timeout: 276 seconds] 09:30:01 brandelune_ [~suzume@pl316.nas982.takamatsu.nttpc.ne.jp] has joined #scheme 09:30:34 wolf__ [~wolf@121.229.42.224] has joined #scheme 09:45:28 denisw [~denisw@dslb-188-103-190-118.pools.arcor-ip.net] has joined #scheme 09:47:27 -!- drdo [~drdo@85.207.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 09:53:44 molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has joined #scheme 10:04:02 ccorn [~ccorn@g132123.upc-g.chello.nl] has joined #scheme 10:05:10 -!- molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has quit [Quit: molbdnilo] 10:11:12 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 255 seconds] 10:11:18 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 10:13:00 drdo [~drdo@85.207.54.77.rev.vodafone.pt] has joined #scheme 10:13:04 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 10:21:14 -!- fschwidom [~fschwidom@2.212.186.130] has quit [Read error: Connection reset by peer] 10:35:30 -!- wolf__ [~wolf@121.229.42.224] has quit [Ping timeout: 258 seconds] 10:35:55 -!- brandelune_ [~suzume@pl316.nas982.takamatsu.nttpc.ne.jp] has quit [Quit: brandelune_] 10:37:22 molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has joined #scheme 10:46:14 certainty [~david@port-13195.pppoe.wtnet.de] has joined #scheme 10:50:29 bokr [~eduska@109.110.56.168] has joined #scheme 10:57:00 Well, Riastradh has posted to the MIT Scheme mailing lists this month, so we can safely say that he hasn't fallen off the planet. 10:58:37 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Ping timeout: 240 seconds] 11:06:13 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 240 seconds] 11:08:15 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 11:13:21 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 252 seconds] 11:16:00 -!- gravicappa [~gravicapp@ppp91-77-174-77.pppoe.mtu-net.ru] has quit [Ping timeout: 260 seconds] 11:29:41 -!- bokr [~eduska@109.110.56.168] has quit [Quit: Leaving.] 11:30:25 brandelune_ [~suzume@pl316.nas982.takamatsu.nttpc.ne.jp] has joined #scheme 11:31:12 -!- denisw [~denisw@dslb-188-103-190-118.pools.arcor-ip.net] has quit [Ping timeout: 240 seconds] 11:32:37 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 258 seconds] 11:33:25 gravicappa [~gravicapp@ppp91-77-164-230.pppoe.mtu-net.ru] has joined #scheme 11:34:00 -!- chromaticwt [~user@75-173-92-60.albq.qwest.net] has quit [Ping timeout: 240 seconds] 11:35:17 kk` [~kk@77.107.164.131] has joined #scheme 11:35:17 -!- kk` [~kk@77.107.164.131] has quit [Changing host] 11:35:17 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 11:41:45 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 11:42:19 rudybot: seen sjamaan 11:42:19 leppie: sjamaan was seen in/on #scheme two weeks ago, saying "A slightly different thing", and then sjamaan was seen leaving the channel in/on #scheme two weeks ago, saying ""Fuck this shit"" 11:42:34 him too, perhaps the same reason 11:43:33 fds: well there goes my theory that he was steve jobs ;P 11:43:50 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 11:57:19 albacker [~eni@unaffiliated/enyx] has joined #scheme 12:06:14 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 12:08:51 -!- molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has quit [Quit: molbdnilo] 12:13:57 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 12:14:45 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 12:19:24 masm [~masm@bl19-128-151.dsl.telepac.pt] has joined #scheme 12:24:10 -!- homie [~levgue@xdsl-78-35-153-178.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 12:24:20 -!- wbooze [~levgue@xdsl-78-35-153-178.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 12:24:44 wolfpython [~wolf@180.111.193.241] has joined #scheme 12:27:00 -!- wolfpython [~wolf@180.111.193.241] has quit [Max SendQ exceeded] 12:27:36 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 12:27:51 wolfpython [~wolf@180.111.193.241] has joined #scheme 12:28:29 wbooze [~levgue@xdsl-78-35-153-178.netcologne.de] has joined #scheme 12:29:33 homie [~levgue@xdsl-78-35-153-178.netcologne.de] has joined #scheme 12:29:56 ijp [~user@host109-154-207-248.range109-154.btcentralplus.com] has joined #scheme 12:36:09 -!- Euthy [~euthy@unaffiliated/euthydemus] has quit [Ping timeout: 256 seconds] 12:39:52 -!- gravicappa [~gravicapp@ppp91-77-164-230.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 12:43:27 -!- wolfpython [~wolf@180.111.193.241] has quit [Ping timeout: 248 seconds] 12:44:08 Is Riastradh the only one that can change the topic? 12:44:55 If he's the only one with contact to the chanopping system. 12:45:15 He isn't. In fact, the current topic wasn't set by Riastradh... 12:45:35 So it seems 12:45:47 Or is it unusual that he stays away for so long? 12:46:08 leppie: sjamaan is well and alive but left due to a high workload and gavino trolling in here 12:46:15 Indeed, he's a very popular local character. :-) 12:47:42 Maybe's arranged that fistfight with Mr. Wall. 12:55:16 If someone could update the topic to something like "R.I.P. John McCarthy" that would be nice 13:03:25 -!- X-Scale [email@2001:470:1f14:135b::2] has quit [Ping timeout: 240 seconds] 13:05:51 Guest18367 [email@89.180.150.131] has joined #scheme 13:09:45 pjb- [~t@81.202.16.46.dyn.user.ono.com] has joined #scheme 13:10:25 molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has joined #scheme 13:10:32 -!- snorble [~snorble@s83-191-238-172.cust.tele2.se] has left #scheme 13:10:50 -!- Guest18367 [email@89.180.150.131] has quit [Remote host closed the connection] 13:11:23 snorble [~snorble@s83-191-238-172.cust.tele2.se] has joined #scheme 13:13:18 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Quit: leaving] 13:13:52 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 13:23:30 rff [~rff@ip72-207-248-18.br.br.cox.net] has joined #scheme 13:27:04 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 252 seconds] 13:27:39 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 13:28:57 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 240 seconds] 13:44:25 gffa [~gffa@unaffiliated/gffa] has joined #scheme 13:49:00 -!- brandelune_ [~suzume@pl316.nas982.takamatsu.nttpc.ne.jp] has quit [Quit: brandelune_] 13:56:05 stis [~stis@1-1-1-39a.veo.vs.bostream.se] has joined #scheme 14:00:12 lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has joined #scheme 14:00:54 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 14:01:00 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 14:01:03 -!- lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has quit [Remote host closed the connection] 14:02:23 denisw [~denisw@dslb-188-103-190-118.pools.arcor-ip.net] has joined #scheme 14:03:47 MrFahrenheit [~RageOfTho@users-60-106.vinet.ba] has joined #scheme 14:26:31 -!- leo2007 [~leo@123.123.249.218] has quit [Quit: rcirc on GNU Emacs 23.3.50.1] 14:39:53 nilboog [~null@178-36-230-145.adsl.inetia.pl] has joined #scheme 14:40:27 -!- molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has quit [Quit: molbdnilo] 14:52:34 Oh. I've missed that. First DMR, now McCarthy :( 14:56:06 molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has joined #scheme 14:56:13 -!- pjb- [~t@81.202.16.46.dyn.user.ono.com] has quit [Ping timeout: 260 seconds] 15:01:53 kuribas [~user@94-227-36-25.access.telenet.be] has joined #scheme 15:08:30 -!- luist [~luist@189.59.201.53] has quit [Remote host closed the connection] 15:08:46 luist [~luist@189.59.201.53] has joined #scheme 15:22:44 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 15:24:57 -!- ChanServ has set mode +o Riastradh 15:28:28 -!- Riastradh changed the topic of #scheme to: (let ((meta '("http://paste.lisp.org/new/scheme" "http://ccl.clozure.com/irc-logs/scheme/")) (scheme '("http://schemers.org/" "http://community.schemewiki.org/" "http://library.readscheme.org/" "http://mitpress.mit.edu/sicp/" "http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/" "http://www.htdp.org/" "http://www.scheme.com/tspl/"))) (map surf-to (append meta scheme))) ; 15:28:38 gnomon, fixed. 15:28:43 -!- Riastradh has set mode -o Riastradh 15:28:50 Oops. 15:28:51 -!- ChanServ has set mode +o Riastradh 15:29:57 leo2007 [~leo@123.123.249.218] has joined #scheme 15:30:11 -!- Riastradh changed the topic of #scheme to: (map surf-to '("http://paste.lisp.org/new/scheme" "http://ccl.clozure.com/irc-logs/scheme/" "http://schemers.org/" "http://community.schemewiki.org/" "http://library.readscheme.org/" "http://mitpress.mit.edu/sicp/" "http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/" "http://www.htdp.org/" "http://www.scheme.com/tspl/")) ; RIP John McCarthy, 1927--2011 15:32:47 Apparently Riastradh's ears were burning. :-) 15:32:54 -!- Riastradh has set mode -o Riastradh 15:33:28 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Quit: leaving] 15:33:47 Oops 15:34:10 -!- samth_away is now known as samth 15:48:57 -!- molbdnilo [~Ove@c80-216-198-94.bredband.comhem.se] has quit [Quit: molbdnilo] 15:48:59 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 15:49:20 Also: I am Steve Jobs, but shhhh -- don't tell anyone. 15:49:24 -!- Riastradh [~riastradh@fsf/member/riastradh] has left #scheme 15:50:04 You can turn off the batsignal now 15:50:10 -!- jewel [~jewel@196-215-16-235.dynamic.isadsl.co.za] has quit [Ping timeout: 260 seconds] 15:53:15 ohwow [~oh@www.nig.gs] has joined #scheme 15:53:18 -!- ohwow [~oh@www.nig.gs] has left #scheme 16:01:42 Gulli [c290166d@gateway/web/freenode/ip.194.144.22.109] has joined #scheme 16:03:00 lol 16:03:32 soveran [~soveran@186.19.214.247] has joined #scheme 16:04:39 -!- gienah [~mwright@ppp121-44-88-164.lns20.syd6.internode.on.net] has quit [Quit: leaving] 16:08:46 im trying to make a tailrecursive function that makes a list. A function that works like this (listme 5), and it will return a list (1, 2, 3, 4, 5) 16:08:54 http://pastebin.com/fpKYVicn 16:09:01 can anyone tell me what im doing wrong in the code? 16:10:36 One thing is that cons takes two arguments. 16:10:58 Also, you shouldn't have brackets on their own lines. ;-) 16:11:13 yup, I it takes s and (+ x 1) 16:11:22 dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 16:11:51 Not in your code it doesn't. It takes (s (+ x 1)) 16:13:01 ahh ok 16:13:34 hmm 16:13:48 but still I only get 0 if i run (listme 5) >< 16:14:07 it seems so logical to me that this should work 16:16:12 Well, what are the two arguments to help? 16:16:34 -!- pygospa [~Pygosceli@kiel-5f769ac2.pool.mediaWays.net] has quit [Disconnected by services] 16:16:46 pygospa [~Pygosceli@kiel-5f77ba09.pool.mediaWays.net] has joined #scheme 16:17:30 -!- djanatyn|afk is now known as djanatyn 16:17:30 s is the sum, it's supposed to hold the constructed list, and i just increments the numbers so they can be added to the list 16:18:14 so basically its passing a new list to s each time in the tail recursive loop 16:18:48 Well, when you call the function with (help 0 0), s isn't a list, it's a number. 16:20:01 hmm 16:20:14 I tried doing (help 0 '()) 16:20:16 but it didnt help 16:20:24 *bumtish* 16:20:46 Your function compares x and s with =, so that assumes they must both be numbers. 16:20:53 ahh 16:20:55 ofcourse 16:20:56 >< 16:21:06 null? test then 16:21:13 woops 16:21:14 or no 16:21:19 = 0 s 16:21:20 If you want to test if it's empty, then yes. :-) 16:21:33 lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has joined #scheme 16:21:34 You said s was a list, so s can't be 0. 16:21:34 i i mean 16:21:57 realitygrill [~realitygr@76.226.206.250] has joined #scheme 16:22:08 did (if (= 0 x) 16:22:15 now I get an empty list back 16:22:23 which is better than the things before :D 16:22:27 What is x? 16:22:29 gonna see if I can get this going 16:22:37 Okay, go and think for a while. :-) 16:22:46 I should be studying anyway... 16:24:00 -!- markskilbeck [~Mark@unaffiliated/markskilbeck] has quit [Ping timeout: 240 seconds] 16:30:24 >< 16:30:40 http://pastebin.com/SMPuRr1c 16:30:58 Can you give me a hint on what im doing wrong here? 16:32:45 gravicappa [~gravicapp@ppp91-77-164-230.pppoe.mtu-net.ru] has joined #scheme 16:34:28 :) 16:35:56 Gulli, see how you're calling the internal function help. 16:36:17 markskilbeck [~Mark@unaffiliated/markskilbeck] has joined #scheme 16:36:55 hmm 16:37:17 The first time when you call it - there's the problem. 16:38:10 Btw, having a debuger for scheme is a nice feature. It showed me right away that your help function returns too soon (i didn't study the rest of the code). 16:38:32 What IDE are you using? 16:38:55 dr.Racket the successor of dr.Scheme. 16:39:05 ahh Im using it too 16:39:37 There's a debug button next to the "Run" button. 16:40:27 ahh 16:40:32 And I can step through it 16:42:24 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 16:45:12 clsmith [~cls@ambrose.lubutu.com] has joined #scheme 16:47:25 hey all. am i right in thinking scheme will optimise tail-recursive quasiquotation? e.g., (define (foo n) (if (= n 0) '() `(bar ,@(foo (- n 1))))) 16:51:15 I'd be surprised. 16:51:25 That expands to (define (foo n) (if (= n 0) '() '(list 'bar foo (- n 1)))) 16:51:34 and in that expansion, the call to "foo" is not in tail position. 16:51:37 ecraven [~nex@www.nexoid.at] has joined #scheme 16:51:50 oops, s/'(list/(list/ 16:53:13 oh, is '- in the tail position there? i can never remember what scheme is smart enough to optimise 16:53:49 Keep getting a list inside a list 16:53:50 http://pastebin.com/TuGiGZvt 16:53:50 with respect to the call to "list", I think the call to - is in tail position. 16:53:58 anyone know how I can get by this >< 16:54:39 offby1: mmm. i would have expected the compiler to automatically restructure it into a tail-recursive let 16:54:44 i think ghc does that... 16:55:19 EmmanuelOga [~emmanuel@190.244.27.236] has joined #scheme 16:55:24 clsmith: I don't think that will happen, but it should be easy to find out empirically 16:56:11 how would i go about doing that? 16:56:18 *clsmith* is new to scheme ;p 16:56:38 clsmith: just run the code with a very large n, and see if your program runs out of memory. 16:57:07 haha, i thought i could do that, but wondered if there was something less drastic ;) okay 16:57:07 actually, "-1" would be a good choice for n. In this case, -1 is effectively +infintiy 16:57:26 pon1980 [~pon1980@h195n2-haes-a12.ias.bredband.telia.com] has joined #scheme 16:58:06 sure does 16:58:50 well, actually, even if it _were_ tail-recursive, it'd use up all available memory (since it conses at every iteration), so that's not a good test after all 16:59:37 yeah, true. i get a stack overflow though, which i *guess* means it isn't tail-recursive 16:59:54 yeah. 17:00:00 that would be the sign :) 17:00:04 except for the cons 17:00:12 oh, stack. so yes. 17:00:27 *qu1j0t3* maybe needs more coffee 17:00:40 coffee does sound good 17:00:42 djcb [~user@a88-112-255-94.elisa-laajakaista.fi] has joined #scheme 17:01:01 clsmith: keeps the blood flowing. :) 17:10:48 Gulli, cons accepts two parameters, but if you want to build a list - the second parameter should be a list. Anything else and you get that "." as in (1.2). 17:10:49 Example: (equal? (cons 1 '(2)) '(1 2)) 17:10:57 But (equal? (cons 1 2) '(1 2)) 17:12:11 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Read error: Connection reset by peer] 17:12:17 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 17:13:24 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 17:14:56 emma [~em@unaffiliated/emma] has joined #scheme 17:15:53 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 258 seconds] 17:18:39 soveran [~soveran@186.19.214.247] has joined #scheme 17:19:30 rudybot: (cons 0 0) 17:19:31 offby1: your sandbox is ready 17:19:31 offby1: ; Value: (0 . 0) 17:19:37 rudybot: (cons 0 (cons 0 empty)) 17:19:37 offby1: ; Value: (0 0) 17:22:52 dont get it >< 17:28:25 it's sublt 17:28:27 it's subtle 17:29:04 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 17:35:23 Gulli, maybe you should invest time in reading http://htdp.org 17:39:53 dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has joined #scheme 17:48:21 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 17:55:32 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 17:56:37 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 17:58:44 -!- Gulli [c290166d@gateway/web/freenode/ip.194.144.22.109] has quit [Ping timeout: 265 seconds] 18:00:33 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 18:00:42 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 18:00:42 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 18:01:59 Gulli [c290166d@gateway/web/freenode/ip.194.144.22.109] has joined #scheme 18:03:14 The thing that is bugging me is 18:03:26 I know how I can do this without making in tail recursive 18:04:05 I know that Im passing lists each time 18:04:26 and constructing a list so that another list is inside 18:04:50 I just can't see how it's done tail recursively 18:05:26 maybe post the non-tail-recursive version so we can see what success looks like 18:05:28 Can you paste a non-tail-recursive version? 18:05:38 Hm, offby1 beat me to it. :-P 18:06:56 sure, wait a sec, need to write it 18:07:15 Gulli: hinst: start from 5, then work to 0 18:07:20 (I just know that i can do it by using cons and construction the help function with the increment 18:08:34 hmm 18:17:45 -!- denisw [~denisw@dslb-188-103-190-118.pools.arcor-ip.net] has quit [Ping timeout: 260 seconds] 18:18:40 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 18:20:35 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Write error: Connection reset by peer] 18:21:36 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 18:27:56 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 260 seconds] 18:39:31 -!- leo2007 [~leo@123.123.249.218] has quit [Ping timeout: 252 seconds] 18:45:04 danishman [~kvirc@0xbcb095dd.ngnqu1.dynamic.dsl.tele.dk] has joined #scheme 18:53:48 -!- albacker [~eni@unaffiliated/enyx] has quit [Read error: Connection reset by peer] 18:55:59 Euthy [~euthy@unaffiliated/euthydemus] has joined #scheme 19:00:44 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 19:02:45 jewel [~jewel@196-215-16-235.dynamic.isadsl.co.za] has joined #scheme 19:09:40 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 19:10:26 confab_ [~win7@c-24-10-60-185.hsd1.ca.comcast.net] has joined #scheme 19:11:00 -!- confab_ [~win7@c-24-10-60-185.hsd1.ca.comcast.net] has quit [Client Quit] 19:13:11 Thanks for updating the topic. :) 19:16:11 As R. mentioned Steve Jobs: Did he ever do something for scheme? 19:19:05 i doubt it 19:22:00 -!- Euthy [~euthy@unaffiliated/euthydemus] has quit [Ping timeout: 255 seconds] 19:23:03 soveran_ [~soveran@186.19.214.247] has joined #scheme 19:24:56 HG` [~HG@tmo-102-81.customers.d1-online.com] has joined #scheme 19:26:42 -!- soveran [~soveran@186.19.214.247] has quit [Ping timeout: 276 seconds] 19:26:45 mmc1 [~michal@178-85-65-177.dynamic.upc.nl] has joined #scheme 19:27:11 -!- HG` [~HG@tmo-102-81.customers.d1-online.com] has quit [Client Quit] 19:42:16 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 19:44:21 -!- soveran_ [~soveran@186.19.214.247] has quit [Remote host closed the connection] 19:46:51 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 276 seconds] 19:53:30 -!- kniu [~karl@pool-108-17-80-180.pitbpa.fios.verizon.net] has quit [Remote host closed the connection] 19:58:02 karl [~karl@pool-108-17-80-180.pitbpa.fios.verizon.net] has joined #scheme 19:58:28 -!- karl is now known as Guest49052 20:02:03 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 255 seconds] 20:02:49 djcb` [~user@a88-112-255-94.elisa-laajakaista.fi] has joined #scheme 20:03:57 -!- danishman [~kvirc@0xbcb095dd.ngnqu1.dynamic.dsl.tele.dk] has left #scheme 20:04:50 -!- djcb [~user@a88-112-255-94.elisa-laajakaista.fi] has quit [Ping timeout: 260 seconds] 20:13:05 wbooze` [~levgue@xdsl-78-35-137-29.netcologne.de] has joined #scheme 20:13:32 djcb`` [~user@a88-112-255-94.elisa-laajakaista.fi] has joined #scheme 20:13:54 homie` [~levgue@xdsl-78-35-137-29.netcologne.de] has joined #scheme 20:15:01 -!- wbooze [~levgue@xdsl-78-35-153-178.netcologne.de] has quit [Ping timeout: 240 seconds] 20:15:11 -!- djcb` [~user@a88-112-255-94.elisa-laajakaista.fi] has quit [Ping timeout: 248 seconds] 20:15:48 -!- homie [~levgue@xdsl-78-35-153-178.netcologne.de] has quit [Ping timeout: 252 seconds] 20:25:19 -!- jewel [~jewel@196-215-16-235.dynamic.isadsl.co.za] has quit [Ping timeout: 248 seconds] 20:25:35 jao [~user@pdpc/supporter/professional/jao] has joined #scheme 20:26:13 -!- stis [~stis@1-1-1-39a.veo.vs.bostream.se] has left #scheme 20:29:54 soveran [~soveran@186.19.214.247] has joined #scheme 20:43:50 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 20:44:15 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Read error: Connection reset by peer] 20:48:33 soveran [~soveran@186.19.214.247] has joined #scheme 20:58:34 -!- ccorn [~ccorn@g132123.upc-g.chello.nl] has quit [Quit: ccorn] 21:03:56 Euthy [~euthy@unaffiliated/euthydemus] has joined #scheme 21:05:51 -!- emma [~em@unaffiliated/emma] has quit [Ping timeout: 252 seconds] 21:07:40 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 21:07:48 emma [~em@unaffiliated/emma] has joined #scheme 21:09:04 ccorn [~ccorn@g132123.upc-g.chello.nl] has joined #scheme 21:09:08 -!- mmc1 [~michal@178-85-65-177.dynamic.upc.nl] has quit [Quit: Leaving.] 21:09:30 mmc1 [~michal@178-85-65-177.dynamic.upc.nl] has joined #scheme 21:17:10 -!- ccorn [~ccorn@g132123.upc-g.chello.nl] has quit [Quit: ccorn] 21:19:49 soveran [~soveran@186.19.214.247] has joined #scheme 21:27:55 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 260 seconds] 21:33:13 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 21:39:37 Modius_ [~Modius@cpe-70-123-140-183.austin.res.rr.com] has joined #scheme 21:41:03 -!- Modius [~Modius@cpe-70-123-140-183.austin.res.rr.com] has quit [Ping timeout: 252 seconds] 21:41:20 soveran [~soveran@186.19.214.247] has joined #scheme 21:41:58 -!- gravicappa [~gravicapp@ppp91-77-164-230.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 21:43:55 -!- certainty [~david@port-13195.pppoe.wtnet.de] has quit [Quit: Lost terminal] 21:51:47 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 22:02:00 snizzo [~quassel@host185-237-dynamic.31-79-r.retail.telecomitalia.it] has joined #scheme 22:27:14 boei [~boei@129.Red-81-32-229.dynamicIP.rima-tde.net] has joined #scheme 22:31:49 choas [~lars@p5795C79E.dip.t-dialin.net] has joined #scheme 22:54:57 -!- choas [~lars@p5795C79E.dip.t-dialin.net] has quit [Ping timeout: 258 seconds] 23:02:50 soveran [~soveran@186.19.214.247] has joined #scheme 23:03:56 -!- masm [~masm@bl19-128-151.dsl.telepac.pt] has quit [Quit: Leaving.] 23:04:39 brandelune_ [~suzume@pl316.nas982.takamatsu.nttpc.ne.jp] has joined #scheme 23:09:50 -!- pygospa [~Pygosceli@kiel-5f77ba09.pool.mediaWays.net] has quit [Quit: Lost terminal] 23:09:54 -!- gnomon [~gnomon@174.119.66.178] has quit [Ping timeout: 258 seconds] 23:10:24 pygospa [~Pygosceli@kiel-5f77ba09.pool.mediaWays.net] has joined #scheme 23:11:17 gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 23:24:05 -!- kuribas [~user@94-227-36-25.access.telenet.be] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:26:34 chromaticwt [~user@75-173-92-60.albq.qwest.net] has joined #scheme 23:32:52 -!- lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has quit [Remote host closed the connection] 23:34:53 wisey [~Steven@host86-147-41-203.range86-147.btcentralplus.com] has joined #scheme 23:36:12 boei_ [~boei@129.Red-81-32-229.dynamicIP.rima-tde.net] has joined #scheme 23:37:25 -!- boei_ [~boei@129.Red-81-32-229.dynamicIP.rima-tde.net] has quit [Client Quit] 23:39:09 -!- boei [~boei@129.Red-81-32-229.dynamicIP.rima-tde.net] has quit [Ping timeout: 252 seconds] 23:39:59 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 258 seconds] 23:40:23 preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 23:41:07 -!- preflex_ is now known as preflex 23:41:57 -!- samth is now known as samth_away 23:42:15 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 23:47:31 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 23:53:22 -!- chromaticwt [~user@75-173-92-60.albq.qwest.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:54:19 snizzo_ [~quassel@host3-236-dynamic.31-79-r.retail.telecomitalia.it] has joined #scheme 23:55:12 -!- snizzo [~quassel@host185-237-dynamic.31-79-r.retail.telecomitalia.it] has quit [Ping timeout: 240 seconds] 23:57:17 soveran [~soveran@186.19.214.247] has joined #scheme