00:09:11 schmir [~schmir@p54A90FE9.dip0.t-ipconnect.de] has joined #scheme 00:13:05 R3cur51v3 [~Recursive@173-23-121-135.client.mchsi.com] has joined #scheme 00:18:04 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 00:20:21 cafaro [~cafaro@unaffiliated/cafaro] has joined #scheme 00:20:26 -!- cafaro [~cafaro@unaffiliated/cafaro] has left #scheme 00:22:31 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 241 seconds] 00:27:47 -!- unkanon [~unkanon@dyn-160-39-34-114.dyn.columbia.edu] has quit [Read error: Connection reset by peer] 00:40:37 -!- schmir [~schmir@p54A90FE9.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 00:49:28 -!- dfkjjkfd [~paulh@145.120.22.32] has quit [Quit: Lost terminal] 00:53:38 -!- elderK [~k@pdpc/supporter/active/elderk] has left #scheme 00:59:07 araujo [~araujo@190.38.51.34] has joined #scheme 00:59:07 -!- araujo [~araujo@190.38.51.34] has quit [Changing host] 00:59:07 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 01:03:53 Rmind [~Gmind@113.190.193.141] has joined #scheme 01:09:31 masm [~masm@bl19-143-194.dsl.telepac.pt] has joined #scheme 01:11:50 -!- ASau [~user@95-24-172-135.broadband.corbina.ru] has quit [Ping timeout: 240 seconds] 01:12:42 -!- Intensity [ik2HgrTECt@unaffiliated/intensity] has quit [Quit: Intensity] 01:13:49 ASau [~user@95-24-172-135.broadband.corbina.ru] has joined #scheme 01:15:41 -!- jcowan [~John@p-69-195-52-55.dsl1.rtr.chat.fpma.frpt.net] has quit [Quit: Leaving] 01:22:13 -!- DrDuck [~duck@216.186.151.63] has quit [Remote host closed the connection] 01:25:51 DrDuck [~duck@216.186.151.63] has joined #scheme 01:29:03 -!- Caleb-- [~caleb@bzq-79-180-8-245.red.bezeqint.net] has quit [Ping timeout: 240 seconds] 01:29:23 -!- Rmind [~Gmind@113.190.193.141] has left #scheme 01:35:26 -!- githogori [~githogori@241.sub-75-208-18.myvzw.com] has quit [Remote host closed the connection] 01:41:05 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 01:47:11 pantsd [~hkarau@nat/uwaterloo/x-khqpqfrjapavoaku] has joined #scheme 01:49:14 bitweiler [~bitweiler@99.190.66.15] has joined #scheme 01:49:56 So I'm thinking of working on an improved matrix math library for scheme with support for sparse representations, but I'm wondering if someone has allready done this? 01:50:26 kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #scheme 02:03:49 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 02:25:24 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 260 seconds] 02:30:37 -!- xwl_ [~wixu@nat/nokia/x-bvyeqngoxvefhowc] has quit [Remote host closed the connection] 02:31:26 xwl_ [~wixu@nat/nokia/x-dlodecbjjhadjyfx] has joined #scheme 02:37:55 -!- myu2 [~myu2@v077103.dynamic.ppp.asahi-net.or.jp] has quit [Remote host closed the connection] 02:46:42 -!- tupi [~david@186.205.37.15] has quit [Quit: Leaving] 02:48:20 jcowan [~John@p-69-195-52-55.dsl1.rtr.chat.fpma.frpt.net] has joined #scheme 02:56:29 -!- pavelludiq [57f63ac1@gateway/web/freenode/ip.87.246.58.193] has quit [Ping timeout: 265 seconds] 02:56:34 kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #scheme 02:56:36 -!- drdo [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 03:07:32 drdo [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 03:07:36 Azuvix [~Azuvix@71-215-25-216.bois.qwest.net] has joined #scheme 03:08:01 X-Scale [email@2001:470:1f14:135b::2] has joined #scheme 03:13:16 -!- R3cur51v3 [~Recursive@173-23-121-135.client.mchsi.com] has quit [Read error: Operation timed out] 03:17:29 hoi 03:19:39 Boo. 03:20:18 ooB 03:22:37 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 03:23:32 -!- drdo [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 03:23:47 drdo [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 03:23:58 moin 03:25:16 Well. Rochester. 03:25:56 -!- Azuvix [~Azuvix@71-215-25-216.bois.qwest.net] has quit [Quit: Leaving] 03:29:14 geoct [~torous@74.111.196.18] has joined #scheme 03:29:17 Boo is a nice language I heard. 03:30:09 -!- Hal9k- [~Lernaean@24-107-60-232.dhcp.stls.mo.charter.com] has quit [Ping timeout: 255 seconds] 03:30:55 i have read that htdp was designed for people new to programming while sicp was something of a more intermediate book. For someone who already knows another language is it still suggested to start with htdp. I apologize in advance if this has already been asked before 03:31:44 homie` [~levgue@xdsl-78-35-140-11.netcologne.de] has joined #scheme 03:32:16 Which is better, Boo or Goo? 03:33:32 Boo is similar to python and better at interacting with CLR than Ironpython. Goo is Object-oriented scheme ? 03:33:45 -!- homie [~levgue@xdsl-78-35-135-96.netcologne.de] has quit [Ping timeout: 255 seconds] 03:36:14 There is also Xoo, but it's not a language. 03:36:57 natural language ? 03:37:06 That too. 03:37:10 And a Moo which could be written in Boo or Goo by You. 03:37:38 Moo ain't gonna write no goo in Boo. 03:38:07 Would you, could you, in a Zoo? 03:38:20 I would not, could not, in a Zip, never mind a Zoo. 03:38:34 Would you, could you, with a Grue? 03:38:46 I would not, could not, when I'm Blue. 03:38:50 (boo hoo) 03:39:49 And Old Man Kangaroo, too. 03:42:14 #drseuss 03:44:17 #kipling 03:44:30 *jcowan* thinks "fakeroot" is distinctly cool. 03:45:09 githogori [~githogori@adsl-66-123-22-146.dsl.snfc21.pacbell.net] has joined #scheme 03:46:03 Not always was the Kangaroo as now we do behold him, but a Different Animal with four short legs. 03:52:40 timj_ [~timj@e176195137.adsl.alicedsl.de] has joined #scheme 03:53:20 anyone see this, btw? 03:53:38 he makes the case that "first," "rest" would have been better than "car," "cdr." 03:54:28 didn't know there was a "csr" at some point. 03:55:29 -!- bgs100 [~ian@unaffiliated/bgs100] has quit [Quit: night] 03:55:47 -!- timj [~timj@e176195132.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 03:59:46 Cxr, too. 04:28:12 -!- corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has quit [Ping timeout: 255 seconds] 04:29:19 interesting 04:40:33 myu2 [~myu2@58x5x224x106.ap58.ftth.ucom.ne.jp] has joined #scheme 05:03:36 -!- xwl_ [~wixu@nat/nokia/x-dlodecbjjhadjyfx] has quit [Remote host closed the connection] 05:05:00 how do I test whether a list is null or not ? 05:05:27 length ? 05:05:36 rudybot: (length '()) 05:05:37 minsa: your sandbox is ready 05:05:37 minsa: ; Value: 0 05:05:44 rudybot: (null? '()) 05:05:45 jonrafkind: your sandbox is ready 05:05:45 jonrafkind: ; Value: #t 05:05:53 dont use length, because its linear in the size of the list 05:06:09 whereas null? is constant time 05:06:11 xwl_ [~wixu@nat/nokia/x-xcafkpaeicpqnojy] has joined #scheme 05:06:17 ok. 05:15:27 -!- geoct [~torous@74.111.196.18] has left #scheme 05:15:57 rudybot: (define (flatten alist) (cond (((null? alist) '()) ((list? (car alist)) (append (flatten (car alist)) (flatten (cdr alist))) ) (else (cons (car alist) (flatten (cdr alist))))))) 05:15:58 minsa: error: eval:1:127: else: not allowed as an expression in: (else (cons (car alist) (flatten (cdr alist)))) 05:17:01 I tried to make sure it is of the form (cond ( ) ( ) (else ) ) but it's still wrong. 05:19:28 There should only be two parentheses in (((null?..., and one less closing paren at the end. 05:20:11 MichaelRaskin [~MichaelRa@195.178.216.22] has joined #scheme 05:21:39 Quetzalcoatl_ : thnx a lot. I was doing (cond ( )) while it should be (cond () ()). 05:21:41 thank you. 05:22:25 minsa: You're welcome. 05:41:26 -!- X-Scale [email@2001:470:1f14:135b::2] has quit [Quit: Time left until the Epochalypse: 27yrs 3wks 1day 3hrs 32mins 38secs] 05:43:15 Chipmunk [~Kaushik@nat/google/x-iidahlqcpibidvvg] has joined #scheme 05:51:56 -!- bitweiler [~bitweiler@99.190.66.15] has left #scheme 05:55:21 minsa: any editor with indentation would show you that the structure of your code was wrong. 06:05:43 -!- mmc [~michal@cs181176169.pp.htv.fi] has quit [Ping timeout: 240 seconds] 06:09:59 -!- foof [~user@li126-140.members.linode.com] has quit [Ping timeout: 260 seconds] 06:14:39 -!- MichaelRaskin [~MichaelRa@195.178.216.22] has quit [Ping timeout: 246 seconds] 06:22:14 zac314159 [~user@c-68-84-149-234.hsd1.nm.comcast.net] has joined #scheme 06:25:08 bye 06:25:10 -!- ian1 [~ian@c-71-205-106-44.hsd1.mi.comcast.net] has quit [Quit: WeeChat 0.3.3] 06:25:55 MichaelRaskin [~MichaelRa@195.178.216.22] has joined #scheme 06:33:54 pumpkin [~pumpkin@209-6-232-56.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com] has joined #scheme 06:33:54 -!- pumpkin [~pumpkin@209-6-232-56.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com] has quit [Changing host] 06:33:54 pumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 06:36:55 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 276 seconds] 06:39:07 mmc [~michal@cs181176169.pp.htv.fi] has joined #scheme 06:40:58 foof [~user@li126-140.members.linode.com] has joined #scheme 06:41:46 accel [~accel_@unaffiliated/accel] has joined #scheme 06:41:58 is there any scheme implementation with a C++ interace like pythonbind or luabind? 06:53:47 -!- homie` [~levgue@xdsl-78-35-140-11.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 06:55:57 homie [~levgue@xdsl-78-35-140-11.netcologne.de] has joined #scheme 07:00:04 dfkjjkfd [~paulh@145.120.22.20] has joined #scheme 07:01:04 Hal9k [~Lernaean@24-107-60-232.dhcp.stls.mo.charter.com] has joined #scheme 07:01:04 -!- Hal9k [~Lernaean@24-107-60-232.dhcp.stls.mo.charter.com] has quit [Changing host] 07:01:04 Hal9k [~Lernaean@unaffiliated/kusanagi] has joined #scheme 07:01:47 -!- dfkjjkfd [~paulh@145.120.22.20] has quit [Client Quit] 07:04:35 -!- ASau [~user@95-24-172-135.broadband.corbina.ru] has quit [Remote host closed the connection] 07:07:09 ASau [~user@95-24-172-135.broadband.corbina.ru] has joined #scheme 07:12:01 -!- jcowan [~John@p-69-195-52-55.dsl1.rtr.chat.fpma.frpt.net] has quit [Ping timeout: 276 seconds] 07:12:57 jcowan_ [~John@p-69-195-52-55.dsl1.rtr.chat.fpma.frpt.net] has joined #scheme 07:14:56 -!- jcowan_ [~John@p-69-195-52-55.dsl1.rtr.chat.fpma.frpt.net] has quit [Client Quit] 07:19:10 -!- masm [~masm@bl19-143-194.dsl.telepac.pt] has quit [Ping timeout: 276 seconds] 07:36:03 hkBst [~quassel@gentoo/developer/hkbst] has joined #scheme 07:41:49 -!- accel [~accel_@unaffiliated/accel] has quit [Quit: leaving] 07:44:46 notsonerdysunny [~chatzilla@121.243.182.185] has joined #scheme 08:04:35 -!- martinhex [~mjc@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 08:10:50 martinhex [~mjc@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 08:19:46 nilg [~user@77.70.2.229] has joined #scheme 08:26:25 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 08:27:20 schmir [~schmir@mail.brainbot.com] has joined #scheme 08:28:02 -!- xwl_ [~wixu@nat/nokia/x-xcafkpaeicpqnojy] has quit [Remote host closed the connection] 08:33:37 -!- weinholt [weinholt@debian/emeritus/weinholt] has quit [Remote host closed the connection] 08:56:33 -!- nilg [~user@77.70.2.229] has quit [Remote host closed the connection] 09:01:50 nilg [~user@77.70.2.229] has joined #scheme 09:06:29 xwl_ [~wixu@nat/nokia/x-okmtpxxykgvzkaxa] has joined #scheme 09:10:21 -!- nilg [~user@77.70.2.229] has quit [Read error: Connection reset by peer] 09:13:16 RageOfThou [~RageOfTho@users-146-124.vinet.ba] has joined #scheme 09:13:23 -!- MrFahrenheit [~RageOfTho@users-146-124.vinet.ba] has quit [Ping timeout: 240 seconds] 09:13:34 nilg [~user@77.70.2.229] has joined #scheme 09:15:22 gravicappa [~gravicapp@ppp91-78-228-104.pppoe.mtu-net.ru] has joined #scheme 09:21:36 -!- mg4001 [~mg4001@cpe-76-93-28-217.socal.res.rr.com] has quit [Remote host closed the connection] 09:29:54 Rmind [~Gmind@113.190.193.141] has joined #scheme 09:33:18 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 09:34:59 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 240 seconds] 09:36:32 -!- homie [~levgue@xdsl-78-35-140-11.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 09:38:15 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 09:40:46 -!- myu2 [~myu2@58x5x224x106.ap58.ftth.ucom.ne.jp] has quit [Remote host closed the connection] 09:49:16 schmir [~schmir@mail.brainbot.com] has joined #scheme 09:50:21 MrFahrenheit [~RageOfTho@users-146-124.vinet.ba] has joined #scheme 09:50:40 -!- RageOfThou [~RageOfTho@users-146-124.vinet.ba] has quit [Read error: Connection reset by peer] 09:52:23 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 09:54:36 schmir [~schmir@mail.brainbot.com] has joined #scheme 09:56:51 RageOfThou [~RageOfTho@users-146-124.vinet.ba] has joined #scheme 09:56:58 -!- MrFahrenheit [~RageOfTho@users-146-124.vinet.ba] has quit [Read error: Connection reset by peer] 09:59:35 -!- zac314159 [~user@c-68-84-149-234.hsd1.nm.comcast.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 10:00:31 -!- RageOfThou [~RageOfTho@users-146-124.vinet.ba] has quit [Read error: Connection reset by peer] 10:00:41 -!- Rmind [~Gmind@113.190.193.141] has left #scheme 10:00:56 RageOfThou [~RageOfTho@users-146-124.vinet.ba] has joined #scheme 10:06:24 homie [~levgue@xdsl-78-35-140-11.netcologne.de] has joined #scheme 10:06:29 zac314159 [~user@c-68-84-149-234.hsd1.nm.comcast.net] has joined #scheme 10:13:36 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 10:18:00 -!- nilg [~user@77.70.2.229] has quit [Read error: Connection reset by peer] 10:24:54 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 246 seconds] 10:25:24 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 10:36:03 karljoh [karljoh@h-79-127.A165.priv.bahnhof.se] has joined #scheme 10:39:29 -!- notsonerdysunny [~chatzilla@121.243.182.185] has quit [Ping timeout: 240 seconds] 10:43:48 Rmind [~Gmind@113.190.193.141] has joined #scheme 10:49:33 stis [~stis@1-1-1-39a.veo.vs.bostream.se] has joined #scheme 10:55:12 -!- Rmind [~Gmind@113.190.193.141] has left #scheme 10:57:23 schmir [~schmir@mail.brainbot.com] has joined #scheme 11:37:45 dfkjjkfd [~paulh@245-15-ftth.onsnetstudenten.nl] has joined #scheme 11:37:58 -!- karljoh [karljoh@h-79-127.A165.priv.bahnhof.se] has quit [] 11:56:14 pavelludiq [57f63ac1@gateway/web/freenode/ip.87.246.58.193] has joined #scheme 12:02:51 -!- saccade [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Quit: This computer has gone to sleep] 12:13:24 fradgers- [~fradgers-@5e0b815c.bb.sky.com] has joined #scheme 12:19:46 masm [~masm@2.80.143.194] has joined #scheme 12:22:51 -!- ASau [~user@95-24-172-135.broadband.corbina.ru] has quit [Remote host closed the connection] 12:29:03 -!- mmc [~michal@cs181176169.pp.htv.fi] has quit [Ping timeout: 240 seconds] 12:29:19 Rmind [~Gmind@113.190.193.141] has joined #scheme 12:30:38 -!- Rmind [~Gmind@113.190.193.141] has left #scheme 12:31:13 ASau [~user@95-24-172-135.broadband.corbina.ru] has joined #scheme 12:36:14 sunnyps [~sunnyps@120-88-37-91.thane.hns.net.in] has joined #scheme 12:42:57 Rmind [~Gmind@113.190.193.141] has joined #scheme 12:48:37 -!- zac314159 [~user@c-68-84-149-234.hsd1.nm.comcast.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 12:51:23 _danb_ [~user@124-149-166-62.dyn.iinet.net.au] has joined #scheme 12:56:42 mmc [~michal@cs181176169.pp.htv.fi] has joined #scheme 12:59:34 myu2 [~myu2@v077103.dynamic.ppp.asahi-net.or.jp] has joined #scheme 13:04:09 -!- Rmind [~Gmind@113.190.193.141] has left #scheme 13:17:31 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit: adu] 13:21:05 nilg [~user@77.70.2.229] has joined #scheme 13:28:59 zevarito [~zevarito@r186-48-199-182.dialup.adsl.anteldata.net.uy] has joined #scheme 13:35:47 -!- masm [~masm@2.80.143.194] has quit [Ping timeout: 240 seconds] 13:49:00 masm [~masm@2.80.143.194] has joined #scheme 13:52:12 tupi [~david@186.205.37.15] has joined #scheme 13:54:49 -!- zevarito [~zevarito@r186-48-199-182.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 240 seconds] 14:00:03 zevarito [~zevarito@r186-48-199-182.dialup.adsl.anteldata.net.uy] has joined #scheme 14:12:45 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 246 seconds] 14:13:04 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Remote host closed the connection] 14:13:09 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 14:13:58 Rmind [~Gmind@113.190.193.141] has joined #scheme 14:14:11 suddenly remember about fibonacci 14:19:00 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 14:23:39 Rmind: ??? 14:24:04 ya 14:24:08 hi cky 14:24:10 :P 14:24:23 I was going to make an example for my friend about Scheme recursion 14:24:30 but forgot about fib define 14:24:33 =) 14:24:49 I haven't touched Scheme for days 14:26:06 :-P 14:26:07 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit: adu] 14:26:48 I knew fib(1) = fib(0) + fib(1) 14:26:54 as fib(0) = 1 14:27:04 but how to define in scheme ? 14:27:14 already forgot 14:27:17 =)) 14:28:58 rudybot: (define fib (let ((sqrt5 (sqrt 5))) (lambda (n) (round (/ (expt (/ (add1 sqrt5) 2) n) sqrt5))))) 14:28:59 cky: your r5rs sandbox is ready 14:28:59 cky: Done. 14:29:27 rudybot: (map fib '(1 2 3 4 5 6 7 8 9 10)) 14:29:28 cky: error: reference to an identifier before its definition: add1 in module: 'program 14:29:38 rudybot: init racket 14:29:38 cky: your racket sandbox is ready 14:29:40 rudybot: (define fib (let ((sqrt5 (sqrt 5))) (lambda (n) (round (/ (expt (/ (add1 sqrt5) 2) n) sqrt5))))) 14:29:41 cky: Done. 14:29:44 rudybot: (map fib '(1 2 3 4 5 6 7 8 9 10)) 14:29:44 cky: ; Value: (1.0 1.0 2.0 3.0 5.0 8.0 13.0 21.0 34.0 55.0) 14:30:50 Rmind: (Obviously that's neither a recursive nor iterative solution by any means, and apt to fail for large values of n if the result gets beyond floating-point limits.) 14:31:01 can I just mak a fib like (fib 10) 14:31:09 rudybot: (fib 10) 14:31:09 cky: ; Value: 55.0 14:31:23 oh, impressive 14:31:26 :)) 14:31:29 :-P 14:32:30 wat is add1 ? 14:32:37 from racket ? 14:32:38 rudybot: (add1 42) 14:32:39 cky: ; Value: 43 14:32:42 Rmind: Yes. 14:32:51 Rmind: You can use (+ sqrt 1) if you want. 14:33:00 Uh. 14:33:07 You can use (+ sqrt5 1) instead of (add1 sqrt5) 14:33:13 + and sqrt at the same time ? 14:33:21 No, sqrt5, not sqrt. 14:33:23 My typo. 14:33:37 sqrt5 is a variable defined to be (sqrt 5). 14:33:44 ok :)) 14:33:47 It just means the value is stored so it doesn't have to be recalculated every time. 14:33:49 this's very tricky 14:33:58 :-P 14:34:15 not a real rec example of fib =)) 14:34:19 Nope. 14:34:19 but faster 14:34:21 :P 14:34:25 Faster for small values. :-) 14:34:30 Inaccurate for big values. 14:34:46 that's what I worry about 14:34:48 Well, mathematically it's accurate for all values, but floating point doesn't model mathematics very well. 14:34:49 :)) 14:35:32 did you use Scheme in any real project or program ? 14:35:36 :P 14:36:05 Depends on what you mean by "real". I don't use it for production code at work, but I've written things like MD5 and Jaro-Winkler in Scheme. 14:36:36 Oh, and recently I wrote an implementation of "ls -lR" in Guile. :-P 14:36:54 (That uses Guile's ftw library though, so it's not as gnarly as first meets the eye.) 14:38:51 rudybot: (define (fib n) (let loop ((a 0) (b 1) (n n)) (if (< n 1) a (loop b (+ a b) (- n 1))))) 14:38:51 cky: Done. 14:39:00 rudybot: (map fib '(1 2 3 4 5 6 7 8 9 10)) 14:39:01 cky: ; Value: (1 1 2 3 5 8 13 21 34 55) 14:39:13 ^-- Iterative implementation of fib. 14:39:43 (Time complexity: O(n).) 14:40:32 Adamant [~Adamant@unaffiliated/adamant] has joined #scheme 14:40:42 Rmind: ^^--- 14:40:54 :P 14:40:59 -!- pumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 240 seconds] 14:41:24 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 14:41:35 still don't know why you avoid doing recursion =) 14:41:46 mmm, ftw 14:41:59 rudybot: (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) 14:41:59 cky: Done. 14:42:05 rudybot: (map fib '(1 2 3 4 5 6 7 8 9 10)) 14:42:06 cky: ; Value: (1 1 2 3 5 8 13 21 34 55) 14:42:14 Rmind: ^^--- Naive recursive implementation of fib. 14:42:21 the naive recursive solution is exponential-time 14:42:24 (Time complexity: O(2^n).) 14:42:27 elly: Exactly. 14:42:29 -!- tupi [~david@186.205.37.15] has quit [Ping timeout: 240 seconds] 14:42:34 and the naive iterative solution is linear time :P 14:42:39 That. 14:42:43 nice 14:42:43 ('naive') 14:42:47 :P 14:42:59 Rmind: Do you understand O(n) vs O(2^n)? 14:43:05 ya 14:43:08 Good. :-) 14:43:10 the complexity 14:43:20 or how much computation 14:43:29 it must does 14:43:48 To do a recursive solution that's O(n), you need to memoise all the intermediate values. 14:44:01 mmm, memoization. 14:44:02 Just 2 closest ? 14:44:08 I think 14:44:20 No, I'm thinking of a global cache. 14:44:24 no, all the intermediate values 14:44:56 What elly said. 14:46:51 Rmind: The best Fibonacci calculation I know of is O(n). (This applies even to the non-iterative method I first posted; to get truly accurate results for big n, you need bignums, and that's O(n) in the size of the bignum.) 14:47:34 By which I mean, operations on bignums are not constant-time, but rather depend on the size of the bignum in question. 14:48:41 -!- Rmind [~Gmind@113.190.193.141] has quit [Ping timeout: 264 seconds] 14:48:43 I do not think you can compute fib in less than O(n) 14:48:48 Indeed. 14:48:55 (I guess, since this is scheme, perhaps it ought to be (O n)? :) 14:48:56 ) 14:48:59 :-P 14:54:12 -!- sunnyps [~sunnyps@120-88-37-91.thane.hns.net.in] has quit [Quit: Leaving] 14:56:02 Rmind [~Gmind@113.190.193.141] has joined #scheme 14:56:58 elly: You can compute fib in O(lg(n)), assuming exponentiation takes lg(n) steps (with IEEE 754 floating point it's O(1) for small n). 14:57:05 -!- Chipmunk [~Kaushik@nat/google/x-iidahlqcpibidvvg] has quit [Ping timeout: 264 seconds] 14:57:30 foof: oh, that did not occur to me 14:57:32 freaky 14:57:49 exponentiation is not lg(n) for bignums, is it? 14:58:46 exponentiation is lg(n) for bignums, O(1) for floats 14:59:11 weird :O 14:59:36 foof: What's the time complexity of bignum division? 14:59:43 which is not the reason you can compute fib quickly 15:00:48 (I don't get the impression that the final division by sqrt(5) is a simple right-shift, for example.) 15:01:36 (did u mean bit shift ?) 15:01:53 Rmind: In concept, yes. In implementation, probably not. 15:02:14 IEEE 754 double precision values can enumerate exactly all the pairs of immortal rabbits on growth steroids in the world, so it's surely good enough for any practical application of fibs 15:02:39 Jafet: O_o 15:03:11 Rmind: With IEEE754 doubles, instead of doing real bit shifts, you simply adjust the exponent field of the number. 15:03:34 Rmind: (Unless you run into numeric underflow, but I'm not talking about that.) 15:03:50 Double precision fails for fib at around fib(73). 15:03:56 Yep. 15:08:23 It can give decent approximations all the way out to F_1476 15:08:31 corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has joined #scheme 15:09:34 femtoo [~femto@95-89-248-96-dynip.superkabel.de] has joined #scheme 15:13:41 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 15:21:53 foof: not a big issue because I don't use the repl module, but when playing with it the other day I noticed that using an incomplete sexp line, like '(+ 1 2' breaks it (looks like read/ss never returns) 15:22:58 when 'read' is used instead of 'read/ss' it gives an error (which is better than hanging up) 15:29:06 -!- Rmind [~Gmind@113.190.193.141] has left #scheme 15:38:18 tizoc: What if you then type ) in the next line? 15:38:43 tizoc: (I don't have Chibi installed, so can't tell either way, but that seems the common sense answer.) 15:38:55 That way, you can cut and paste multi-line code into the REPL. 15:39:15 cky: nothing happens, but works as expected when not using the repl module 15:39:28 Hmmm. 15:40:30 cky: there are two separate issues, one is that read/ss never returns if you send an incomplete sexp 15:40:31 try this 15:40:37 ah wait, you don't have chibi installed :) 15:41:20 cky: anyway, if I do this: (call-with-input-string "(+ 1" read/ss), it does nothing for a while, and then segfaults 15:41:56 what is read/ss supposed to do? 15:42:09 the other issue is that for the repl, maybe the stuff sent to read/ss shouldn't be incomplete anyway (so the repl should handle that first) 15:42:47 elly: it is like read but with support for shared structures (srfi 38) 15:43:05 elly: http://srfi.schemers.org/srfi-38/srfi-38.html 15:44:12 ahh 15:44:25 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 15:56:29 jewel [~jewel@196-210-134-54.dynamic.isadsl.co.za] has joined #scheme 15:57:58 Chipmunk [~Kaushik@74.125.63.65] has joined #scheme 15:59:26 bgs100 [~ian@unaffiliated/bgs100] has joined #scheme 15:59:43 -!- homie [~levgue@xdsl-78-35-140-11.netcologne.de] has quit [Ping timeout: 240 seconds] 16:02:29 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:02:54 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:04:23 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:06:37 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:07:55 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:08:02 parolang [~user@c-64-246-121-114.oregonrd-wifi-1261.amplex.net] has joined #scheme 16:10:14 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:12:13 Intensity [VOKDVyUpGI@unaffiliated/intensity] has joined #scheme 16:13:15 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:13:16 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:15:40 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:15:40 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:17:20 -!- parolang [~user@c-64-246-121-114.oregonrd-wifi-1261.amplex.net] has quit [Remote host closed the connection] 16:17:41 parolang [~user@c-64-246-121-114.oregonrd-wifi-1261.amplex.net] has joined #scheme 16:17:41 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:20:11 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:22:19 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:22:40 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:24:20 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:25:35 is racket in debian? 16:26:11 jewel: Not officially. There is an alpha package though. 16:26:23 how do I get that? 16:26:45 Clone git://git.debian.org/git/collab-maint/racket 16:26:52 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:28:00 You can then do: git checkout debian/5.0.2-1 16:28:05 and do the usual package build from there. 16:28:29 (By which I mean, I usually do dpkg-buildpackage -b -rfakeroot -uc -us, but you may prefer to do it differently.) 16:29:26 cky, thanks 16:29:30 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:29:31 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:29:31 My pleasure. 16:29:56 homie [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:30:41 -!- parolang [~user@c-64-246-121-114.oregonrd-wifi-1261.amplex.net] has quit [Ping timeout: 264 seconds] 16:31:27 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 16:31:43 -!- homie [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:32:13 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:32:14 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:35:05 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:35:05 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:35:36 parolang [~user@c-64-246-121-114.oregonrd-wifi-1261.amplex.net] has joined #scheme 16:35:38 cky: FYI racket is sitting in NEW still. Not sure when ftp-masters will get to look at it. 16:35:53 -!- hkBst [~quassel@gentoo/developer/hkbst] has quit [Remote host closed the connection] 16:38:32 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 16:39:19 -!- wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has quit [Read error: Connection reset by peer] 16:40:44 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat 0.3.2] 16:40:54 tupi [~david@186.205.37.15] has joined #scheme 16:53:35 WonTu [~WonTu@p57B54D7D.dip.t-dialin.net] has joined #scheme 16:53:49 -!- WonTu [~WonTu@p57B54D7D.dip.t-dialin.net] has left #scheme 16:53:56 -!- femtoo [~femto@95-89-248-96-dynip.superkabel.de] has quit [Ping timeout: 260 seconds] 16:59:23 homie [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 17:07:10 bremner: Well, no time before Squeeze's release, I'm sure. :-) 17:11:05 cky: probably you are correct. 17:11:44 cky: racket looks scarier than it is because of the rename. So now we have this enourmous package that apperently needs to be vetted. 17:12:02 Yipes. 17:17:34 hrm, /w 2 17:17:36 fail 17:17:56 -!- MichaelRaskin [~MichaelRa@195.178.216.22] has left #scheme 17:18:16 Just use ESC-2 if you're using irssi. :-P 17:18:22 it makes me really happy that (: id ( (a) (a -> a))) is a valid type declaration in racket 17:18:34 Fancy. 17:18:40 cky: I have just shy of 300 windows :P remembering to use the special-case ones for 1 through 20 is not worth it 17:18:55 elly: !!!! 17:19:12 That's almost as bad as.... 17:19:23 no-one 17:19:24 ...well, 3 years ago or so, I used to keep 350 tabs open in my browser. 17:19:30 leppie: :-P 17:19:33 insane... 17:19:39 I know. I don't do that any more. 17:19:48 you probably have 20k unread emails in your inbox? 17:19:54 Probably. 17:19:57 lol 17:20:36 i can only imagine try to reopen a browser after crashing with 350 tabs, trying to retore all of them 17:20:49 s/retore/restore/ 17:21:44 It takes forever. 17:22:18 femtoo [~femto@95-89-248-96-dynip.superkabel.de] has joined #scheme 17:22:19 fortunately irssi is very stable 17:22:42 this particular instance has been running for 189d 10h 7m 50s 17:23:03 Nice. :-) 17:23:17 and has 68MB of RAM allocated 17:36:28 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 240 seconds] 17:38:17 eno [~eno@nslu2-linux/eno] has joined #scheme 17:39:10 Caleb-- [thedude@bzq-79-180-8-245.red.bezeqint.net] has joined #scheme 18:07:39 -!- corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has quit [Quit: Leaving] 18:07:48 -!- osoleve [~sabayonus@adsl-074-166-228-237.sip.bct.bellsouth.net] has quit [Read error: Connection reset by peer] 18:08:44 corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has joined #scheme 18:21:14 wbooze [~levgue@xdsl-78-35-191-205.netcologne.de] has joined #scheme 18:22:02 osoleve [~sabayonus@adsl-074-166-228-237.sip.bct.bellsouth.net] has joined #scheme 18:25:10 drdo` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 18:27:00 -!- drdo [~user@2.208.54.77.rev.vodafone.pt] has quit [Ping timeout: 255 seconds] 18:36:14 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 18:44:19 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 18:48:40 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 276 seconds] 18:57:18 -!- nilg [~user@77.70.2.229] has quit [Remote host closed the connection] 19:04:10 -!- femtoo [~femto@95-89-248-96-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 19:06:11 -!- drdo` [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 19:06:28 drdo` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 19:06:43 githogori_ [~githogori@92.sub-75-210-155.myvzw.com] has joined #scheme 19:13:24 lotia [~lotia@l.monkey.org] has joined #scheme 19:14:01 -!- drdo` [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 19:14:17 drdo` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 19:14:50 -!- corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has quit [Remote host closed the connection] 19:18:24 corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has joined #scheme 19:27:23 -!- _danb_ [~user@124-149-166-62.dyn.iinet.net.au] has quit [Ping timeout: 240 seconds] 19:29:59 femtoo [~femto@95-89-248-96-dynip.superkabel.de] has joined #scheme 19:31:45 choas [~lars@p5792CEE4.dip.t-dialin.net] has joined #scheme 19:33:59 saccade [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 19:39:39 -!- DrDuck [~duck@216.186.151.63] has quit [Ping timeout: 260 seconds] 19:42:49 zevarito_ [~zevarito@r186-48-199-182.dialup.adsl.anteldata.net.uy] has joined #scheme 19:44:46 -!- zevarito [~zevarito@r186-48-199-182.dialup.adsl.anteldata.net.uy] has quit [Read error: Connection reset by peer] 19:59:48 -!- drdo` [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 20:00:05 drdo` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 20:03:37 femtooo [~femto@95-89-248-96-dynip.superkabel.de] has joined #scheme 20:06:35 -!- femtoo [~femto@95-89-248-96-dynip.superkabel.de] has quit [Ping timeout: 240 seconds] 20:11:03 -!- mmc [~michal@cs181176169.pp.htv.fi] has quit [Ping timeout: 240 seconds] 20:17:07 Euthydemus [~euthydemu@vaxjo7.80.cust.blixtvik.net] has joined #scheme 20:34:47 -!- parolang [~user@c-64-246-121-114.oregonrd-wifi-1261.amplex.net] has quit [Ping timeout: 240 seconds] 20:39:57 -!- ToxicFrog [~ToxicFrog@2607:f2c0:f00e:500:222:15ff:fe91:b24c] has quit [Remote host closed the connection] 20:41:13 ToxicFrog [~ToxicFrog@2607:f2c0:f00e:500:222:15ff:fe91:b24c] has joined #scheme 20:41:30 -!- ToxicFrog [~ToxicFrog@2607:f2c0:f00e:500:222:15ff:fe91:b24c] has quit [Read error: Connection reset by peer] 20:42:26 ToxicFrog [~ToxicFrog@2607:f2c0:f00e:500:222:15ff:fe91:b24c] has joined #scheme 20:43:47 -!- jewel [~jewel@196-210-134-54.dynamic.isadsl.co.za] has quit [Ping timeout: 240 seconds] 20:46:12 zevarito [~zevarito@r186-48-238-165.dialup.adsl.anteldata.net.uy] has joined #scheme 20:47:43 -!- zevarito_ [~zevarito@r186-48-199-182.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 240 seconds] 20:50:00 pchrist_ [~spirit@gentoo/developer/pchrist] has joined #scheme 20:52:11 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Ping timeout: 240 seconds] 20:55:29 Dawgmatix [~dman@c-76-124-9-27.hsd1.nj.comcast.net] has joined #scheme 21:12:30 rgrau [~user@62.Red-88-2-20.staticIP.rima-tde.net] has joined #scheme 21:12:44 pdponze [~pdponze@144.85.121.191] has joined #scheme 21:22:41 -!- martinhex [~mjc@93-97-29-243.zone5.bethere.co.uk] has quit [Read error: Connection reset by peer] 21:23:11 martinhex [~mjc@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 21:23:51 schmir [~schmir@p54A912FE.dip0.t-ipconnect.de] has joined #scheme 21:32:49 -!- Chipmunk [~Kaushik@74.125.63.65] has quit [Ping timeout: 260 seconds] 21:32:54 -!- schmir [~schmir@p54A912FE.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 21:34:09 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 272 seconds] 21:34:36 -!- drdo` [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 21:34:54 drdo` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 21:37:14 -!- femtooo [~femto@95-89-248-96-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 21:46:18 -!- pdponze [~pdponze@144.85.121.191] has left #scheme 21:49:55 -!- drdo` [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 21:50:13 drdo` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 21:53:59 -!- leppie [~lolcow@196-215-20-67.dynamic.isadsl.co.za] has quit [Read error: Connection reset by peer] 21:54:31 leppie [~lolcow@196-215-20-67.dynamic.isadsl.co.za] has joined #scheme 21:55:12 -!- zevarito [~zevarito@r186-48-238-165.dialup.adsl.anteldata.net.uy] has quit [Remote host closed the connection] 22:00:17 kuribas [~user@d54C43829.access.telenet.be] has joined #scheme 22:21:24 DrDuck [~duck@216.186.151.63] has joined #scheme 22:28:46 rpg [~rpg@216.243.156.16.real-time.com] has joined #scheme 22:28:52 -!- rpg [~rpg@216.243.156.16.real-time.com] has quit [Excess Flood] 22:29:14 rpg [~rpg@216.243.156.16.real-time.com] has joined #scheme 22:34:03 -!- gravicappa [~gravicapp@ppp91-78-228-104.pppoe.mtu-net.ru] has quit [Ping timeout: 240 seconds] 22:34:15 schmir [~schmir@p54A908C2.dip0.t-ipconnect.de] has joined #scheme 22:37:18 jlongster [~user@c-98-242-90-116.hsd1.ga.comcast.net] has joined #scheme 22:37:27 -!- dfkjjkfd [~paulh@245-15-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 22:40:03 -!- stis [~stis@1-1-1-39a.veo.vs.bostream.se] has quit [Remote host closed the connection] 22:44:14 -!- jlongster [~user@c-98-242-90-116.hsd1.ga.comcast.net] has quit [Remote host closed the connection] 22:45:28 jlongster [~user@c-98-242-90-116.hsd1.ga.comcast.net] has joined #scheme 22:47:47 -!- drdo` [~user@2.208.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 22:48:06 drdo` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 22:49:14 mokrzu [~mokrzu@public2804.xdsl.centertel.pl] has joined #scheme 22:50:43 hello, how can i (in Scheme) change doted pair ((((1 . 9) . 3) . 4) . 5) to list ? 22:51:34 humm 22:52:08 I would write a procedure that looped to each element of the pair 22:52:14 and that would add each pair to a list 22:52:21 give me 1 minute, I will do it 22:52:32 ok 22:53:09 -!- choas [~lars@p5792CEE4.dip.t-dialin.net] has quit [Quit: leaving] 23:02:07 argh infinite loop 23:02:08 :x 23:05:49 thanks that you tried 23:07:56 drdo`` [~user@2.208.54.77.rev.vodafone.pt] has joined #scheme 23:08:08 I'm still trying but maybe someone else will help you better than me 23:09:36 -!- drdo` [~user@2.208.54.77.rev.vodafone.pt] has quit [Ping timeout: 255 seconds] 23:09:38 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 23:10:15 humm ok is this what you want? 23:10:28 > (pair-to-list '((((1 . 9) . 3) . 4) . 5)) 23:10:28 (((((1) 9) 3) 4) 5) 23:10:28 > 23:10:47 or you want just one list with all the elements instead of a list of lists? 23:12:42 i want just one list 23:12:54 (1 9 3 4 5) 23:13:23 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 240 seconds] 23:13:31 something quick and dirty: http://paste.lisp.org/display/118103 23:13:36 where did you get the weird dotted list from, anyway? 23:13:58 -!- saccade [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Quit: Leaving] 23:15:22 sloyd_, (cons (cons (cons (cons 1 9) 3) 4) 5) 23:15:22 i get it when i tried to add some number to all elements of list 23:15:23 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 240 seconds] 23:15:26 qsun [~qsun@66.220.3.138] has joined #scheme 23:15:27 ^_^ 23:15:48 i guess he was doing it wrong. 23:17:06 mwolfe [~michael@cpe-67-49-72-40.socal.res.rr.com] has joined #scheme 23:17:37 ok, it work's thanks ;) 23:18:24 mokrzu, what were you trying to do originally? 23:20:44 write function that takes (list, num_a, num_b) and returns list where all num_a values are changed to num_b values 23:21:16 in that case, you had a problem in your original function 23:23:54 yes, but now i only need to find out why your solution works. thanks for help, bye 23:24:09 like this? 23:24:09 > (replace-in-lst '(1 2 3 2 5 2) 2 9) 23:24:09 (2 9 2 9 2 9) 23:24:17 yes 23:24:19 oops 23:24:40 > (replace-in-lst '(1 2 3 2 5 2) 2 9) 23:24:40 (1 9 3 9 5 9) 23:24:40 > 23:24:41 '(1 9 3 9 5 9) 23:24:42 i meant like that :D 23:24:58 paste us your code 23:27:25 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 23:27:42 mokrzu, solution: http://paste.lisp.org/display/118104 23:27:44 i gotta go now 23:28:34 ok, thanks for help 23:28:43 -!- mokrzu [~mokrzu@public2804.xdsl.centertel.pl] has quit [Quit: Leaving] 23:30:23 -!- jlongster [~user@c-98-242-90-116.hsd1.ga.comcast.net] has quit [Ping timeout: 240 seconds] 23:35:06 unkanon [~unkanon@dyn-160-39-34-114.dyn.columbia.edu] has joined #scheme 23:35:44 so I'm switching away from Haskell because with it being purely functional it feels too constrained to me 23:35:53 however I'd still like to stay within the functional paradigm 23:36:12 I was looking at CL but then I saw this: http://wiki.apache.org/couchdb/ClouchDB 23:36:23 -!- schmir [~schmir@p54A908C2.dip0.t-ipconnect.de] has quit [Ping timeout: 272 seconds] 23:36:30 and it kinda hurts my eyes to see a function being called with no parameters 23:36:50 scheme doesn't seem to have couchdb interface that I could compare 23:36:58 Chicken scheme does, I believe 23:37:25 I'll look for it then. but am I being unrealistic with my expectations? 23:37:41 looking at that code from that link it looks procedural 23:37:57 Well, lisp and its cousins are not purely functional 23:38:25 yes not purely, but scheme is the most functional out of the impure, right? 23:38:42 Yes, at least if you consider scheme's core definition 23:38:45 or should I expect to see code like (create-db) in a line by itself in Scheme? 23:39:10 Well it would be inside a function definition probably, but it could happen 23:39:44 the reason I likw functional so much is because the code is so clear, and everything you're doing is in your face (without monads) 23:40:14 I always fear code like (create-db) because if I ever see it in someone else's code I might ask "create which db? and why wasn't that db passed as a parameter to this function?" 23:40:21 It's all up to the programmer, and the developer of extension libraries etc. what paradigms they prefer 23:41:05 Yeah i don't like that example either, using essentially a hidden global for the db connection 23:41:30 THat's not very schemish but that doesn't mean someone couldn't do it 23:42:38 yes I don't like that at all, especially because it's completely unnecessary 23:43:13 it's unnecessary in CL too, especially when CL is not only a lisp, but includes a standard object system 23:44:32 yes the CLOS I heard about it. 23:44:47 what I'm saying is I'm not against OO when it helps but it seems gratuitous there 23:45:28 Yeah i just mean that OO would still be more explicit in that case, in not having a hidden global for the connection 23:45:54 I see. I'll take your word for it as I have no idea what it'd look like. 23:46:42 Well I mean that if you were doing such an interface in OO style, you'd have an actual "connection" object which would be passed around to the methods using it 23:47:28 unkanon: Unfortunately the couchdb egg is *STILL* not documented (DerGuteMoritz!!), but the tests are a good indication of the API: http://anonymous:@code.call-cc.org/svn/chicken-eggs/release/4/couchdb/trunk/tests/run.scm 23:47:29 http://tinyurl.com/363zb68 23:47:45 oic, that would be a lot nicer, because then you can see what's going on 23:48:08 As you can see, the make-connection procedure accepts a server URI and database name 23:48:26 *unkanon* is looking 23:49:12 What it really comes down to is that in scheme (and lisp generally) you can as functional as you want, or as procedural, or as OO as you want, and when you're using other people's code it can vary 23:49:51 Indeed 23:49:57 Different people, different styles 23:50:20 But generally, overly procedural code is Frowned Upon :) 23:51:03 it's good that it's frowned upon 23:51:30 Yeah, but we're not pedantic about it 23:51:43 now with scheme I've been using Racket 23:51:59 Procedural and OO constructs are defined functionally anyway (although the compiler might optimize some of that away), in fact it's a fun starting exercise to make an object system, various looping constructs, etc. :) 23:52:12 but if I wanted to put my code on a server online, then do I have to look for hosts that offer scheme hosting? 23:52:31 unkanon: Better look for VPS services instead 23:52:42 You mean writing a web app in scheme and hosting that? Or just hosting a code repository 23:52:48 I don't think you'll find many (if any!) services that offer hosted Scheme 23:52:55 yes a web app 23:52:57 (are there Haskell services?) 23:53:06 If you mean a web app, yeah you'll probably have to deal with a vps 23:53:09 no but since haskell compiles it doesnt matter 23:53:17 Scheme compiles too 23:53:55 it does? 23:53:56 how? 23:53:58 Chicken compiles to C 23:54:04 Racket compiles to a VM, IIRC 23:54:15 Same way any other language does :) 23:54:18 saccade [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 23:54:26 There are also native-code compilers 23:54:27 to a VM? like smalltalk? (but smalltalk doesn't compile, I know) 23:55:00 Some probably do i suppose, I'm only familiar with chicken which compiles to C and thence to native code 23:55:12 Gambit compiles to C as well 23:55:36 There is probably at least one scheme for the jvm as well, although clojure is the more popular lispish thing there 23:56:05 Yeah, there are a few schemes for the jvm but they're not really maintained 23:56:21 (Kawa and SISC) 23:56:24 now when it compiles to C, that must be awesome to still have continuations in compiled code, no? 23:56:24 yeah clojure probably has all the mindshare of lispy people there 23:57:01 unkanon: Most compilers use continuation passing style as an intermediate compilation phase 23:57:14 That gives you continuations almost for free 23:57:55 -!- fradgers- [~fradgers-@5e0b815c.bb.sky.com] has left #scheme 23:57:58 SSA and CPS are highly related 23:58:02 true. it's still badass though 23:58:33 SSA is a very good idea. 23:58:42 those are the usual standards for imperative and functional compilers 23:59:36 SSA and CPS are standards for imperative languages too? never knew