00:01:15 -!- Paraselene_ [~Not@79-67-148-135.dynamic.dsl.as9105.com] has quit [Disconnected by services] 00:01:16 Paraselene [~Not@79-67-148-135.dynamic.dsl.as9105.com] has joined #scheme 00:12:27 chandler: SRFI 41 has it as CONST under ``Utilities'', but like SRFI 26 I find that just using LAMBDA is usually better. 00:25:52 -!- ASau [~user@83.69.227.32] has quit [Remote host closed the connection] 00:29:39 -!- hadronzoo [~hadronzoo@rrcs-67-78-79-54.sw.biz.rr.com] has quit [Quit: hadronzoo] 00:30:35 ASau [~user@83.69.227.32] has joined #scheme 00:48:28 -!- fabe [~fabe@p54A7D87A.dip.t-dialin.net] has quit [Ping timeout: 265 seconds] 00:48:38 fabe [~fabe@p54A7E3F2.dip.t-dialin.net] has joined #scheme 00:53:00 doc_who [~doc_who@c-98-231-201-176.hsd1.md.comcast.net] has joined #scheme 00:53:02 bzzbzz [~franco@modemcable240.34-83-70.mc.videotron.ca] has joined #scheme 00:57:01 -!- Zarutian [~zarutian@194-144-84-110.du.xdsl.is] has quit [Quit: Zarutian] 01:06:04 -!- Nshag [~none@AClermont-Ferrand-551-1-7-10.w92-133.abo.wanadoo.fr] has quit [Read error: Connection reset by peer] 01:15:25 -!- nego [~nego@c-76-16-30-244.hsd1.il.comcast.net] has quit [Quit: leaving] 01:27:08 hadronzoo [~hadronzoo@ppp-70-251-102-238.dsl.rcsntx.swbell.net] has joined #scheme 01:32:45 -!- fabe [~fabe@p54A7E3F2.dip.t-dialin.net] has quit [Remote host closed the connection] 01:47:52 saccade_ [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 01:54:07 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Remote host closed the connection] 02:16:50 is there anyone out there that has a momment to help me understand: 02:16:54 (define doubler (lambda (f) (lambda (x) (f x x)))) 02:17:03 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Quit: snarkyboojum] 02:17:53 and what's da problemmo? 02:18:03 so doubler is a function (define doubler (lambda... 02:18:16 that takes one arg, (f) 02:18:24 yes 02:18:29 then i don't get it :) 02:18:51 what does lambda expression do? 02:19:06 creates an annonymous function 02:19:11 you are using it already in the define. 02:19:42 right... so it's doing the same thing as in step one. 02:19:43 this is from tspl4, btw 02:20:00 and i'm not a student trying to get my homework done 02:20:06 just not bright 02:20:08 RageOfThou [~RageOfTho@users-55-250.vinet.ba] has joined #scheme 02:20:16 did you try running that code? 02:20:20 y 02:20:23 it works 02:20:43 (define double (doubler +)) 02:21:12 (double 12/3) => 8 02:21:27 what am i assigning the second lambda expression to? 02:21:33 did you try not applying it? how about running it without the define? 02:22:05 no, lemme see 02:22:29 well, you are binding it to the symbol double with that define. but you don't have to. 02:23:14 try applying it without using a top level name. 02:24:10 -!- MrFahrenheit [~RageOfTho@users-33-31.vinet.ba] has quit [Ping timeout: 265 seconds] 02:24:41 i haven't even gotten to apply yet 02:24:56 okay, maybe i'll just revisit this later 02:25:20 sladegen: ty 02:25:38 well, i don't mean using 'apply'. i mean perfoming an application. you are doing it already when you eval any scheme expression. 02:27:08 can you explain in your own words what you have to do in order to evaluate ((doubler +) (+ 1 2))? 02:27:37 when i just run the lambda expression i get # 02:27:46 i'm starting to get it, i think 02:27:58 my synapses are firing, at least 02:28:21 yes, you get an opaque representation of a procedure. 02:28:22 doubler takes one arg, that is a function 02:29:05 and returns a... 02:29:32 function? 02:29:49 as you can see... each level of parenthesis in scheme is meaningful. 02:30:08 Fabse [~mightyfid@wikipedia/Track-n-Field] has joined #scheme 02:31:34 *sladegen* nods. and what do evaluation rules of scheme say about procedure in first element of a list? 02:32:14 sorry if it sounds like a dummy talk, but i'm not much of a pedagogue ;) 02:32:19 it's the function that takes the rest of the list as arguments 02:32:21 metasyntax [~taylor@pool-71-127-125-129.aubnin.fios.verizon.net] has joined #scheme 02:34:16 sstrickl_ [~sstrickl@c-98-216-238-231.hsd1.ma.comcast.net] has joined #scheme 02:34:19 which in this case would be? ... and what would you expect to see as a result of evaluating ((doubler +) (+ 1 2)), then? 02:34:49 -!- sstrickl [~sstrickl@c-98-216-238-231.hsd1.ma.comcast.net] has quit [Disconnected by services] 02:34:49 -!- sstrickl_ is now known as sstrickl 02:35:33 i get it 02:36:04 let's hope so ;) 02:36:11 incubot: get him! 02:38:13 perhaps... as a next step try dooing the next step ((doubler (doubler *)) 3)... 02:39:13 hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 02:39:40 incubot: ((lambda (x) (x x)) (lambda (y) (y y))) 02:39:42 Eval 30738 timed out. 02:39:57 rudybot: eval ((lambda (x) (x x)) (lambda (y) (y y))) 02:40:00 sladegen: your sandbox is ready 02:40:10 sladegen: error: with-limit: out of time 02:40:16 incubot: don't you like me? 02:40:20 it looks like you will be writing something cool. 02:40:35 incubot: a will? 02:40:39 will you add that, or shall I? 02:40:54 incubot: double or nothing! 02:40:57 It would be much easier if speical cases were excluded, such as eszett (german double s). 02:42:11 rudybot: tr8 en de Poland over all! 02:42:11 sladegen: tr is, like, use ,t8 02:42:17 when you call doubler, it *executes* the first lambda, taking the f argument, and returns an anonymous function, which itself takes one argument, and once executed, uses the function passed at definition time... 02:42:21 rudybot: t8 en de Poland over all! 02:42:22 sladegen: Polen über alle! 02:42:25 BMeph [~BMeph@den-69-171-160-96.evdo.leapwireless.net] has joined #scheme 02:42:49 -!- BMeph [~BMeph@den-69-171-160-96.evdo.leapwireless.net] has left #scheme 02:42:58 thanks a lot. 02:43:06 yes, this is what is reffered to in literature as closure. 02:43:37 but definition is a seperate step that is orthogonal to what lambda does. 02:44:37 lambda creates local closed over environment while define operates on global, top level environment. 02:45:14 okay, i see that 02:47:09 incubot: another mind infected, stand down. 02:47:12 I stand corrected ;) 02:47:15 -!- emma [~em@unaffiliated/emma] has quit [Ping timeout: 260 seconds] 02:50:11 underdev: last tidbit... notice that there is a difference between what lambda and define return. 02:50:34 or rather what one doesn't return... 02:51:58 the closed lambda becomes the function definition of the defined symbol, which in this case takes one arg, and uses the function sent as an argument as the function that evaluates the defined symbols argument. 02:52:23 *underdev* takes a deep breath 02:52:44 timj_ [~timj@e176193175.adsl.alicedsl.de] has joined #scheme 02:53:02 i don't know how well that was stated, but i get it :)P 02:53:51 the usual nomencature used is that define binds name to the procedure returned by lambda. 02:54:46 lambda creates a new object, define side effects global environment that already exists. 02:56:07 this may be the only freenode channel where terms like orthogonal and nomenclature are considered polite conversation 02:56:11 -!- timj__ [~timj@e176198113.adsl.alicedsl.de] has quit [Ping timeout: 248 seconds] 02:56:47 can haz cheezburger? 02:57:18 cat like programming detected. 02:57:36 you do not have to hold onto the procedure created by lambda with define... that's why i suggested you try thinking about the next step of ((doubler (doubler *)) 3). 02:59:03 heh, if i only hadn't made a typo in the nomenomenclasure... l) 02:59:03 right, but in this case the author is showing that you CAN hold that procedure... it's the introduction to "define" 02:59:29 nomnomnomenenclature 03:00:31 -!- hadronzoo [~hadronzoo@ppp-70-251-102-238.dsl.rcsntx.swbell.net] has quit [Quit: hadronzoo] 03:01:11 ah, ok, then. it's just that "anonymous functionality" of lambda is often more emphasized in higher order programming enabled by scheme. 03:02:10 hadronzoo [~hadronzoo@ppp-70-251-102-238.dsl.rcsntx.swbell.net] has joined #scheme 03:02:40 the author says that using a lambda to indicate that a defined symbol is bound to a function is prefered to a defun like style 03:03:05 -!- bgs100 is now known as bgs000 03:03:23 there is no need to pollute the name space with one-off utility procedures. or as in this example utility functions are hidden in higher order closures. 03:04:15 right, so if you are mapping, you don't have to define a function, just use a lambda. Is that what you are saying?> 03:04:50 don't have to define a function in the global namespace, i mean 03:05:04 well, that's a matter of stylistic preference. (define (f x ...) ...) is equivalent to (define f (lambda (x ...) ...). 03:05:49 right, he says the latter is more idiomatic scheme 03:06:49 *sladegen* nods. it's especially useful when you need to create many functions of the same shape but parametrized with different peocedures, like in this case. 03:07:18 okay, it was a pleasure and a real help. I'm going to put my nose back to this grindstone now.. thank you very much 03:07:38 np, and have fun! 03:08:22 -!- hadronzoo [~hadronzoo@ppp-70-251-102-238.dsl.rcsntx.swbell.net] has quit [Quit: hadronzoo] 03:11:44 -!- sepult [~levgue@xdsl-87-79-171-47.netcologne.de] has quit [Remote host closed the connection] 03:23:11 hadronzoo [~hadronzoo@ppp-70-251-102-238.dsl.rcsntx.swbell.net] has joined #scheme 03:28:55 -!- RageOfThou [~RageOfTho@users-55-250.vinet.ba] has quit [Ping timeout: 260 seconds] 03:29:35 emma [~em@unaffiliated/emma] has joined #scheme 03:29:57 is there an equivalent of "return" in scheme? for instance, in an if clause, if i wanted to return a value as a consequent, but still have the consequent wrapped in parenthesis? 03:31:21 (if (= n 0) "oops") -> (if (= n 0) (*RETURN "oops")) 03:32:02 why would you want to wrap it in parenthesis? as i said earlier every paren in scheme has meaning. 03:32:41 well, try it and see... try wrapping it in parens? see what error you get... 03:33:44 Homogeneity. See, i can kick 6 syllable words around too! 03:34:22 underdev: call-with-current-continuation: http://community.schemewiki.org/?call-with-current-continuation 03:34:24 underdev: You didn't hear this from me, but you can use continuations to simulate a return. 03:34:28 klutometis: Jinx! 03:34:28 use it with care, though 03:34:57 if you understand this... you may have other question later on. as a rule scheme "returns" value of last expression in a sequence. 03:34:59 cky: uh, oh; how do you break a jinx on irc again: do i have to wait for you to invoke my username? 03:35:10 r5rs begin 03:35:11 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_idx_136 03:35:11 -rudybot:#scheme- http://tinyurl.com/w4m4a 03:35:16 I don't make people shut up on jinxes, it's just a way of saying, hey, we're on the same track! 03:35:26 oh, nice; thanks 03:35:29 :-) 03:35:29 *sladegen* jinx some more. info overload! 03:36:31 incubot: (let ((n 0)) (if (= n 0) "oops")) 03:36:32 oops 03:36:39 incubot: (let ((n 1)) (if (= n 0) "oops")) 03:36:40 # 03:36:48 incubot: (let ((n 1)) (if (= n 0) ("oops"))) 03:36:49 # 03:36:58 incubot: (let ((n 0)) (if (= n 0) ("oops"))) 03:36:58 Error: call of non-procedure: "oops" 03:37:06 d'oops. 03:37:28 sladegen: is that a hybrid homerism? 03:37:31 incubot: (call/cc (lambda (return) (let ((n 0)) (if (= n 0) (return "oops")))) 03:37:31 Error: unterminated list 03:37:37 incubot: (call/cc (lambda (return) (let ((n 0)) (if (= n 0) (return "oops"))))) 03:37:37 oops 03:38:09 it's heterohomoiconoclism. 03:38:24 underdev: Again, you didn't hear or see this from me. :-P 03:38:30 *underdev* golfcla[s 03:38:42 *underdev* golf claps 03:39:00 cly, thanks you 03:39:06 *cky* will have to remember sladegen's new word for the next Scrabble. 03:39:29 underdev: do you understand the differences in what i gave incubot to eval? 03:40:27 yes, i know that to wrap "oops" in () would to make it a function call, that's why i wanted to know if there was a function to return "oops" as a value 03:40:30 what 03:40:32 reading raw specification of if may be instructive, too. 03:40:32 underdev: If you simply just need a form to return your "oops" in, (values "oops") will do the trick too. 03:40:44 r5rs if 03:40:45 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_idx_98 03:40:45 -rudybot:#scheme- http://tinyurl.com/4xlwxg 03:41:05 sladegen: Nice. Well, of course I prefer to use SRFI 23 error in that case. 03:41:26 cky, yeah, that's what i was looking for 03:41:33 thanks again 03:42:04 underdev: Of course, there's a whole rabbit hole with that one; the next step after error is conditions. :-P 03:42:09 (If that's what they're called now.) 03:42:18 Uh, was thinking of the Schemish word for exceptions. 03:42:19 underdev: if it's self-evaluting object like a string, number or symbol you can just insert it as is. well, you'd need to quote symbol. 03:42:45 oh! quote it? 03:42:57 unless you were after symbol's value. 03:43:29 incubot: (values + '+) 03:43:30 # 03:43:38 Hmm. 03:43:42 incubot: (list + '+) 03:43:42 (# +) 03:43:46 incubot: (let ((foo 'bar)) (list 'foo foo)) 03:43:47 (foo bar) 03:44:16 no, (if (= 1 1) ('"foo") (('"bar"))) returns procedure application: expected procedure, given: "foo" (no arguments) 03:44:18 Interestingly, incubot only shows the first value. :-P 03:44:53 Michael_Mohamed [~Mohamdu@CPE0013f7bc6820-CM0013f7bc681c.cpe.net.cable.rogers.com] has joined #scheme 03:45:21 > (if (= 1 1) (values "foo") ((values "bar"))) => "foo" 03:45:23 underdev: no need for parenthesis. as a penance you have to reread rules of evaluation in scheme, again. 03:45:51 -!- hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote host closed the connection] 03:46:27 no, i no i don't need them syntactically, and that the prefered way would be to place the value w/o parens 03:46:32 i know* 03:47:26 -!- Mohamdu [~Mohamdu@CPE0013f7bc6820-CM0013f7bc681c.cpe.net.cable.rogers.com] has quit [Ping timeout: 246 seconds] 03:48:25 mastertogo1 [~togo@ip70-171-249-111.tc.ph.cox.net] has joined #scheme 03:48:54 underdev: as said before. the trouble may be when you want to do more than one thing in given branch of 'if'... then you need to 'begin'... 03:51:05 i was just wondering how to keep (if ()()()) in the face of a return value that wasn't a function call. 03:51:52 -!- mastertogo1 is now known as mastertogo 03:52:09 scheme expression does not have to be a list... it can first of all be an aaaaa.... 03:52:42 this small thing invented by the geeks... oops, i mean greeks. 03:53:49 hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 04:09:01 -!- proq [~user@unaffiliated/proqesi] has quit [Ping timeout: 264 seconds] 04:15:46 incubot: (+ 1 2) 04:15:46 3 04:15:50 incubot: "foo" 04:15:52 snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 04:15:55 incubot: (begin "foo") 04:15:56 foo 04:15:59 incubot: (begin "foo: bar") 04:15:59 foo: bar 04:16:09 incubot: (begin "rudybot: eval (+ 1 2)") 04:16:09 rudybot: eval (+ 1 2) 04:16:35 incubot: (begin "minion: chant") 04:16:35 minion: chant 04:16:36 MORE THAN 04:17:03 minion: add incubot as: (begin "minion: chant") 04:17:03 OK, done. 04:17:05 minion: incubot? 04:17:06 incubot: (begin "minion: chant") 04:17:06 minion: chant 04:17:06 MORE THAN 04:17:40 Pitty that offby1 made rudybot not listen to *bots. 04:18:06 incubot: (begin "gabot: slap incubot") 04:18:06 gabot: slap incubot 04:18:06 *gabot* slaps incubot 04:18:26 incubot: (begin "minion: kill incubot") 04:18:26 minion: kill incubot 04:18:27 die, incubot 04:19:32 -!- xwl [~user@125.34.170.89] has quit [Remote host closed the connection] 04:28:49 xwl [~user@125.34.170.89] has joined #scheme 04:32:09 -!- hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote host closed the connection] 04:34:03 -!- dfkjjkfd [~paulh@35-13-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 04:35:30 incubot: roll under and live! 04:35:34 For strings, it is very rare to use any other. This is quite important for modern Unicode-based string libraries, as those can't live with the "string is an array of equally-sized memory cells"-idea anymore. 04:36:14 blah, blah, blah 04:40:24 HG` [~HG@xdsley228.osnanet.de] has joined #scheme 04:40:32 incubot: (begin "a\nb") 04:40:33 b 04:41:22 kniu [~kniu@pool-71-105-70-131.lsanca.dsl-w.verizon.net] has joined #scheme 04:51:31 -!- HG` [~HG@xdsley228.osnanet.de] has quit [Quit: HG`] 04:54:05 -!- Fabse [~mightyfid@wikipedia/Track-n-Field] has quit [] 04:55:09 HG` [~HG@xdsley228.osnanet.de] has joined #scheme 04:57:35 -!- HG` [~HG@xdsley228.osnanet.de] has quit [Client Quit] 05:04:05 -!- adzuci [~ada2358@login.ccs.neu.edu] has quit [Ping timeout: 246 seconds] 05:04:09 -!- Contra [~Contra@login.ccs.neu.edu] has quit [Ping timeout: 265 seconds] 05:05:34 Contra [~Contra@login.ccs.neu.edu] has joined #scheme 05:06:00 adzuci [~ada2358@login.ccs.neu.edu] has joined #scheme 05:06:06 ahhh, the good 'ld yung times: http://tinyogg.com/watch/ddtGl/ and the good 'ld old old times: http://tinyogg.com/watch/aSpF2/ 05:06:09 HG` [~HG@85.8.71.220] has joined #scheme 05:06:24 *sladegen* goes to meet Morpheus. 05:06:33 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Ping timeout: 276 seconds] 05:12:27 snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 05:12:33 -!- HG` [~HG@85.8.71.220] has quit [Quit: HG`] 05:12:38 -!- ktzqbp [~ktzqbp@unaffiliated/ktzqbp] has quit [Read error: Connection reset by peer] 05:12:51 -!- jonrafkind [~jon@c-67-172-254-235.hsd1.ut.comcast.net] has quit [Ping timeout: 265 seconds] 05:22:33 jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has joined #scheme 05:24:18 turbofail [~user@c-67-180-111-45.hsd1.ca.comcast.net] has joined #scheme 05:47:10 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Ping timeout: 264 seconds] 05:53:03 snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 05:58:24 -!- parolang [~user@8e4a01246100775874c4f448e9887093.oregonrd-wifi-1261.amplex.net] has quit [Remote host closed the connection] 06:06:48 -!- mathk [~mathk@lns-bzn-58-82-251-215-44.adsl.proxad.net] has quit [Read error: Connection reset by peer] 06:06:58 mathk [~mathk@lns-bzn-20-82-64-46-177.adsl.proxad.net] has joined #scheme 06:14:34 HG` [~HG@xdsl-92-252-60-76.dip.osnanet.de] has joined #scheme 06:24:02 tessier [~treed@kernel-panic/copilotco] has joined #scheme 06:24:17 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 06:44:11 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 265 seconds] 06:49:08 Checkie [9645@unaffiliated/checkie] has joined #scheme 06:49:26 -!- hadronzoo [~hadronzoo@ppp-70-251-102-238.dsl.rcsntx.swbell.net] has quit [Ping timeout: 246 seconds] 06:51:27 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 06:54:52 hadronzoo [~hadronzoo@ppp-70-251-78-203.dsl.rcsntx.swbell.net] has joined #scheme 06:56:11 -!- HG` [~HG@xdsl-92-252-60-76.dip.osnanet.de] has quit [Ping timeout: 248 seconds] 07:00:38 hohoho [~hohoho@2002:6fbc:2911:6:21e:c2ff:feb4:2a5d] has joined #scheme 07:02:48 -!- hadronzoo [~hadronzoo@ppp-70-251-78-203.dsl.rcsntx.swbell.net] has quit [Read error: Connection reset by peer] 07:10:33 hadronzoo [~hadronzoo@ppp-70-251-119-74.dsl.rcsntx.swbell.net] has joined #scheme 07:13:56 -!- jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has quit [Ping timeout: 246 seconds] 07:15:48 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 07:22:44 karme [~user@HSI-KBW-078-043-001-160.hsi4.kabel-badenwuerttemberg.de] has joined #scheme 07:29:50 R3cur51v3 [~Recursive@173-30-222-57.client.mchsi.com] has joined #scheme 07:35:27 -!- hadronzoo [~hadronzoo@ppp-70-251-119-74.dsl.rcsntx.swbell.net] has quit [Quit: hadronzoo] 07:52:09 heina [~heina@h220-215-160-087.catv02.itscom.jp] has joined #scheme 07:55:30 fabe [~fabe@p54A7E3F2.dip.t-dialin.net] has joined #scheme 08:10:42 -!- karme [~user@HSI-KBW-078-043-001-160.hsi4.kabel-badenwuerttemberg.de] has quit [Read error: Connection reset by peer] 08:20:36 -!- heina is now known as mytoh 08:41:33 snarkyboojum_ [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 08:43:14 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Ping timeout: 240 seconds] 08:43:14 -!- snarkyboojum_ is now known as snarkyboojum 08:54:59 -!- R3cur51v3 [~Recursive@173-30-222-57.client.mchsi.com] has quit [Quit: This system is going down for poweroff RIGHT FREAKING NOW!!] 08:56:59 stis [~stis@1-1-1-39a.veo.vs.bostream.se] has joined #scheme 09:02:57 melba [~blee@unaffiliated/lazz0] has joined #scheme 09:09:40 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 265 seconds] 09:11:12 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 09:15:08 -!- xwl [~user@125.34.170.89] has quit [Remote host closed the connection] 09:16:44 xwl [~user@125.34.170.89] has joined #scheme 09:19:43 masm [~masm@2.80.155.189] has joined #scheme 09:28:18 -!- mytoh [~heina@h220-215-160-087.catv02.itscom.jp] has quit [Quit: Leaving...] 09:52:38 -!- xwl [~user@125.34.170.89] has quit [Remote host closed the connection] 09:53:13 xwl [~user@125.34.170.89] has joined #scheme 09:56:21 phao [~phao@189.107.213.90] has joined #scheme 10:10:02 -!- jmcphers [~jmcphers@218.185.108.156] has quit [Remote host closed the connection] 10:24:48 heina [~heina@h220-215-160-087.catv02.itscom.jp] has joined #scheme 10:25:26 alvatar [~alvatar@33.232.218.87.dynamic.jazztel.es] has joined #scheme 10:28:29 Kibane [Kibane@83.231.94.3] has joined #scheme 10:37:47 kolistivra [~J@78.170.197.45] has joined #scheme 10:41:53 HG` [~HG@xdslex142.osnanet.de] has joined #scheme 10:41:53 hi, is it possible to define a function within another function? the code http://pastebin.com/0EpFD4Ys gives me "define: found a definition that is not at the top level" error with DrScheme advanced student mode(this is actually the mode in which i have to code the program). Also, being a beginner, can you point me how i can write any part of this code better? thanks... 10:43:29 kolistivra: it is possible but you must put the definition on top. 10:43:39 For example: 10:43:58 (define (one-procedure a) 10:44:04 (define (another-procedure b) 10:44:17 (+ a b) 10:44:29 that would work 10:44:39 but the internal definitions must be at the top 10:44:50 (because the compiler usually turns them into a letrec construct) 10:47:52 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Remote host closed the connection] 10:48:03 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 10:48:12 Kibane: when i run your example code{ (define (one-procedure a) (define (another-procedure b) (+ a b))) }, i still get the same error. 10:50:50 Try this: 10:50:53 (define (example a) 10:50:53 (define (add1 var) 10:50:53 (+ 1 var)) 10:50:53 (add1 a)) 10:50:53 (example 10) 10:57:28 Kibane:well, though this code does not work in advanced student mode (it gives define: expected only one expression for the function body, but found one extra part error) it works in r5rs mode etc. 10:59:06 Maybe the student mode forbids it. 10:59:47 Kibane: well, probably it is as you say.. i will try to find another way. at worst, i will separate it into two. thanks for your help 11:00:20 -!- kolistivra [~J@78.170.197.45] has left #scheme 11:23:26 -!- HG` [~HG@xdslex142.osnanet.de] has quit [Ping timeout: 240 seconds] 11:23:40 -!- phao [~phao@189.107.213.90] has quit [Quit: Leaving] 11:25:12 HG` [~HG@xdslex142.osnanet.de] has joined #scheme 11:25:28 -!- hohoho [~hohoho@2002:6fbc:2911:6:21e:c2ff:feb4:2a5d] has quit [Remote host closed the connection] 11:25:50 hohoho [~hohoho@2002:7230:12e0:6:21e:c2ff:feb4:2a5d] has joined #scheme 11:34:42 virl [~virl__@chello062178085149.1.12.vie.surfer.at] has joined #scheme 11:49:56 phao [~phao@189.107.213.90] has joined #scheme 11:52:43 -!- phao [~phao@189.107.213.90] has quit [Client Quit] 12:08:58 readline-style input is surprisingly tedious to get right 12:23:29 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Disconnected by services] 12:23:38 sladegen [~nemo@unaffiliated/sladegen] has joined #scheme 12:34:47 -!- bgs000 is now known as bgs100 12:39:34 jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has joined #scheme 12:49:41 -!- hohoho [~hohoho@2002:7230:12e0:6:21e:c2ff:feb4:2a5d] has quit [Ping timeout: 268 seconds] 12:53:51 sepult [~levgue@xdsl-87-79-143-160.netcologne.de] has joined #scheme 12:56:54 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Remote host closed the connection] 12:57:48 MrFahrenheit [~RageOfTho@users-55-90.vinet.ba] has joined #scheme 13:04:23 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Remote host closed the connection] 13:04:23 not so surprisingly 13:04:33 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 13:05:42 fradgers- [~fradgers-@5ac735ac.bb.sky.com] has joined #scheme 13:06:03 foof: are you doing a shell in chibi? (if talking about readline) 13:12:56 hotblack23 [~jh@p4FC5BCD7.dip.t-dialin.net] has joined #scheme 13:19:03 sladegen: yes 13:20:30 slowly but steadily 13:21:51 and you are binding to some C readline library or trying less indirect route? 13:22:13 no, i wrote my own readline library in pure portable scheme 13:22:56 niiice. perhaps i'll port smsw, then ;) 13:23:28 (modulo the termios FFI wrapper which can easily be replaced by a call to (system "stty ...")) 13:23:55 what's smsw? 13:27:50 github.com/ypb/smsw 13:28:41 it's nothing fancy, but it's tied up in scsh, now. 13:28:48 MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 13:37:05 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Remote host closed the connection] 13:37:26 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Ping timeout: 240 seconds] 13:41:44 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 13:44:13 snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 13:46:02 -!- alvatar [~alvatar@33.232.218.87.dynamic.jazztel.es] has quit [Quit: leaving] 13:47:13 -!- snorble [~none@s83-179-14-105.cust.tele2.se] has left #scheme 14:25:13 hadronzoo [~hadronzoo@ppp-70-251-119-74.dsl.rcsntx.swbell.net] has joined #scheme 14:25:47 -!- hotblack23 [~jh@p4FC5BCD7.dip.t-dialin.net] has quit [Quit: Leaving.] 14:30:03 jewel [~jewel@196-210-187-11-tbnb-esr-2.dynamic.isadsl.co.za] has joined #scheme 14:32:54 dfkjjkfd [~paulh@35-13-ftth.onsnetstudenten.nl] has joined #scheme 14:40:11 alvatar [~alvatar@197.127.222.87.dynamic.jazztel.es] has joined #scheme 14:41:36 -!- mastertogo [~togo@ip70-171-249-111.tc.ph.cox.net] has quit [Read error: Connection reset by peer] 14:41:38 -!- Kibane [Kibane@83.231.94.3] has quit [] 14:42:07 mastertogo [~togo@ip70-171-249-111.tc.ph.cox.net] has joined #scheme 14:45:06 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 265 seconds] 15:00:33 kolistivra [~J@78.170.197.45] has joined #scheme 15:01:19 hi, how can I filter a list based on two conditions? i.e is there a logical conjuction(and) operator in scheme? 15:03:19 incubot: (and #t #t) 15:03:20 #t 15:03:24 \o/ 15:03:55 well, i should have thought tha =) & / && came directly to my mind.. sorry 15:04:03 it's a lisp thing 15:07:35 incubot: (or) 15:07:36 #f 15:07:52 incubot: (or (or)) 15:07:52 #f 15:08:03 incubot: (and) 15:08:03 #t 15:08:19 \o/ 15:08:50 \o/ 15:08:52 incubot: (and (or)) 15:08:53 #f 15:09:06 incubot: (or (and)) 15:09:06 #t 15:10:17 incubot: (xor) 15:10:17 Error: unbound variable: xor 15:10:47 incubot: you better shift your registers, man. 15:10:52 difference in intent allows the machine to recognize more clearly what we are doing when we use this procedure in some blazing numerical code, and consequently the machine can simply place the quotient and remainder in two registers, rather than allocating a list on the heap. 15:11:36 stack of heaps, i say! 15:12:49 -!- xwl [~user@125.34.170.89] has quit [Remote host closed the connection] 15:19:27 -!- heina [~heina@h220-215-160-087.catv02.itscom.jp] has quit [Quit: Leaving...] 15:19:47 -!- yosafbridge [~yosafbrid@li14-39.members.linode.com] has quit [Quit: Coyote finally caught me] 15:21:06 yosafbridge [~yosafbrid@li14-39.members.linode.com] has joined #scheme 15:22:58 heina [~heina@h220-215-160-087.catv02.itscom.jp] has joined #scheme 15:24:17 -!- heina [~heina@h220-215-160-087.catv02.itscom.jp] has quit [Client Quit] 15:24:20 Peteris [~peteris_e@84.237.180.192] has joined #scheme 15:35:32 Mohamdu [~Mohamdu@CPE0013f7bc6820-CM0013f7bc681c.cpe.net.cable.rogers.com] has joined #scheme 15:35:50 pjb` [~t@81.202.18.80.dyn.user.ono.com] has joined #scheme 15:36:43 -!- mastertogo [~togo@ip70-171-249-111.tc.ph.cox.net] has quit [Ping timeout: 248 seconds] 15:38:16 -!- jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has quit [Ping timeout: 265 seconds] 15:38:26 -!- Michael_Mohamed [~Mohamdu@CPE0013f7bc6820-CM0013f7bc681c.cpe.net.cable.rogers.com] has quit [Ping timeout: 240 seconds] 15:44:52 hi! someone here knows how to make emacs recognize #; and #| |# comments? 15:46:29 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Ping timeout: 265 seconds] 15:52:43 mastertogo [~togo@ip70-171-249-111.tc.ph.cox.net] has joined #scheme 15:52:51 snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 15:57:05 -!- ASau [~user@83.69.227.32] has quit [Remote host closed the connection] 15:58:29 alvatar: notice that lisp mode already recognize #|comment|# 15:58:39 ASau [~user@83.69.227.32] has joined #scheme 16:01:20 pjb`: I'm using Quack 16:03:44 kar8nga [~kar8nga@jol13-1-82-66-176-74.fbx.proxad.net] has joined #scheme 16:04:18 *sladegen* would be interested in recognizing (| ...) as proper syntax in scsh... /sigh@lazybum 16:05:20 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Quit: snarkyboojum] 16:06:22 I don't know what Quack is. There are two parts: recognize the comments for movement or for font-locking. It seems that for font locking, there are also two ways emacs "recognize" comments. The first one are the comment-start and comment-end variables. It seems that it does font-locking of comments automatically from these variables. The other one is the font-lock mechanism, where you put regular expressions on font-lock-keywords to 16:06:22 colorize them. For the movements, it must be implemented by mode sepcific movement commands. See for example the variable forward-sexp-function. 16:07:25 pjb`: thanks 16:07:34 -!- dfkjjkfd [~paulh@35-13-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 16:07:40 pjb`: I've switched on lisp-mode and it seems to recognize them 16:07:58 apparently quack is only for the repl interaction 16:08:17 -!- MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit [Quit: Leaving] 16:08:20 pjb`: this is quack: www.neilvandyke.org/quack/ 16:09:33 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Quit: Leaving] 16:15:36 jonrafkind [~jon@c-67-172-254-235.hsd1.ut.comcast.net] has joined #scheme 16:24:22 -!- HG` [~HG@xdslex142.osnanet.de] has quit [Quit: HG`] 16:29:28 schmir [~schmir@p54A9356C.dip0.t-ipconnect.de] has joined #scheme 16:36:32 jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has joined #scheme 16:37:31 Kizaru [~plaz@pool-173-76-170-157.bstnma.fios.verizon.net] has joined #scheme 16:42:23 jmcphers [~jmcphers@218.185.108.156] has joined #scheme 16:54:41 -!- schmir [~schmir@p54A9356C.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 17:07:59 From experience, how easy does it become to develop array-heavy algorithms in scheme? 17:08:36 I'm just learning, but I perceive that it would still be quite harder than C++, for example. Does it even out in the long haul? 17:09:31 do you want multi-dimensional arrays? 17:09:43 scheme has vector,which is about the same as plain arrays in c++ 17:09:45 not necessarily 17:10:04 yes, I learned about it today 17:10:26 its just that 17:10:40 (vector-ref) seems inconvenient compared to [i] 17:11:38 well.. thats life in scheme 17:11:58 I'm just wondering if it could be used in programming competitions 17:12:07 of course 17:14:14 For example, rotating a 2d array would be a hassle for me in lisp, I guess 17:14:43 maybe it would help to define helper functions, like (at i j) 17:15:42 yea, thats a good idea 17:15:56 there are probably some libraries floating around that deal with multi-dimensional arrays 17:24:58 -!- gravicappa [~gravicapp@ppp85-140-116-223.pppoe.mtu-net.ru] has quit [Ping timeout: 264 seconds] 17:25:58 gravicappa [~gravicapp@ppp85-141-164-164.pppoe.mtu-net.ru] has joined #scheme 17:32:21 TR2N [email@89.180.215.53] has joined #scheme 17:40:49 -!- 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] 17:43:57 -!- alvatar [~alvatar@197.127.222.87.dynamic.jazztel.es] has quit [Quit: leaving] 17:52:11 -!- cmatei [~cmatei@95.76.18.242] has quit [Ping timeout: 248 seconds] 17:56:16 alvatar [~alvatar@197.127.222.87.dynamic.jazztel.es] has joined #scheme 17:56:54 rtra [~rtra@unaffiliated/rtra] has joined #scheme 17:58:02 -!- ve [~a@smith.xen.tardis.ed.ac.uk] has quit [Ping timeout: 240 seconds] 17:58:27 ve [~a@smith.xen.tardis.ed.ac.uk] has joined #scheme 17:58:33 cmatei [~cmatei@95.76.18.242] has joined #scheme 18:05:51 -!- Kizaru [~plaz@pool-173-76-170-157.bstnma.fios.verizon.net] has left #scheme 18:10:19 HG` [~HG@xdslfa076.osnanet.de] has joined #scheme 18:20:13 -!- `net` [not@2001:5c0:1400:b::697f] has quit [Ping timeout: 268 seconds] 18:27:30 saccade_ [~saccade@dhcp-18-111-84-184.dyn.mit.edu] has joined #scheme 18:32:24 `net` [not@2001:5c0:1400:b::73bf] has joined #scheme 18:34:14 rdd [~user@c83-250-52-182.bredband.comhem.se] has joined #scheme 18:38:34 -!- jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has quit [Ping timeout: 246 seconds] 18:45:02 MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 18:49:43 phao [~phao@189.107.164.106] has joined #scheme 18:57:43 -!- MrFahrenheit [~RageOfTho@users-55-90.vinet.ba] has quit [Read error: No route to host] 18:57:57 MrFahrenheit [~RageOfTho@users-55-90.vinet.ba] has joined #scheme 19:02:37 askhader [~askhader@taurine.csclub.uwaterloo.ca] has joined #scheme 19:03:09 Suppose I have some sort of an ADT that I have in memory, and it's sorted. I want to write it in it's "sorted" state. What is this process called? 19:04:31 askhader: that just sounds like "writing" 19:04:35 can you be more specific? 19:04:49 Okay 19:04:49 PiRSquared17 [~chatzilla@ip72-192-23-71.ri.ri.cox.net] has joined #scheme 19:05:02 Suppose I have a binary search tree that is sorted in some way. 19:05:08 Can I just "write" it to a file? 19:05:19 And then read it back in and it'll be sorted as I wrote it? 19:06:02 ah 19:06:11 Mm.. torrents at 2.5MB/s 19:06:12 you _might_ be able to 'write' it to a file. 19:06:13 Try It And See. 19:06:36 but often your data contains stuff that isn't 'writeable', like structures you've defined with "define-struct", or functions. 19:06:46 Right, so how do I deal with those situations? 19:06:57 askhader: write your own function that does the writing for you. 19:07:02 I assume there must be a more efficent way than writing it line by line (node per line) and then re-sorting after reading it in? 19:07:04 a specialized "write-binary-tree" function. 19:07:38 askhader: well, in your "write-binary-tree", make sure you write it out in sorted order, so that when you later read it in (with a "read-binary-tree" function that you, alas, also have to write) it'll already be sorted. 19:07:50 Hm 19:07:51 I see 19:07:51 Thanks 19:09:15 just out of curiosity -- what have you got in your tree that doesn't already "write" itself? structures? 19:09:24 For examples. 19:09:26 example* 19:10:21 some schemes -- PLT in particular -- let you define a reader and writer for your structures. That might be useful 19:10:46 (in fact, PLT scheme lets you make your structure "transparent" when you define it, so that it automatically reads and writes) 19:11:29 rudybot: eval (define-struct frotz (plotz)) 19:11:37 rudybot: eval (define f (make-frotz "poo")) 19:11:39 rudybot: eval f 19:11:40 *offby1: ; Value: #(struct:frotz "poo") 19:11:56 hm, that's transparent ... and yet I don't recall asking it to be transparent ... 19:17:07 ah 19:17:12 ah ha 19:21:29 jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has joined #scheme 19:22:24 Aw man my mom is gonna be /pissssseeed/ when she gets home. Running an ethernet cable to my room =P 19:22:33 From the baement... 19:23:18 -!- kolistivra [~J@78.170.197.45] has left #scheme 19:31:24 Belaf [~campedel@194.209.131.192] has joined #scheme 19:31:34 -!- Belaf [~campedel@194.209.131.192] has left #scheme 19:35:04 so she'll buy you a wifi link 19:35:05 :) 19:35:15 only seven months 'til Christmas 19:37:00 Hahah 19:37:01 Indeed. 19:37:05 But that was meant for another channel 19:38:34 -!- Consalvo [~user@67-23-7-228.static.slicehost.net] has quit [Read error: Connection reset by peer] 19:40:59 -!- PiRSquared17 [~chatzilla@ip72-192-23-71.ri.ri.cox.net] has quit [Ping timeout: 260 seconds] 19:42:11 geckosenator [~sean@dsl-63-249-91-224.dhcp.cruzio.com] has joined #scheme 19:43:11 -!- ve [~a@smith.xen.tardis.ed.ac.uk] has quit [Ping timeout: 260 seconds] 19:44:45 ve [~a@smith.xen.tardis.ed.ac.uk] has joined #scheme 19:45:13 -!- rtra [~rtra@unaffiliated/rtra] has quit [Remote host closed the connection] 19:47:31 -!- alvatar [~alvatar@197.127.222.87.dynamic.jazztel.es] has quit [Quit: leaving] 19:47:39 -!- jewel [~jewel@196-210-187-11-tbnb-esr-2.dynamic.isadsl.co.za] has quit [Ping timeout: 265 seconds] 19:48:52 -!- askhader [~askhader@taurine.csclub.uwaterloo.ca] has quit [Quit: leaving] 19:55:35 MonononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 19:55:39 ros3 [~roselynro@70-36-146-118.dsl.dynamic.sonic.net] has joined #scheme 19:59:15 -!- MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit [Ping timeout: 265 seconds] 20:02:30 -!- Peteris [~peteris_e@84.237.180.192] has left #scheme 20:02:53 -!- MonononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit [Quit: Leaving] 20:03:04 PiRSquared17 [~chatzilla@ip72-192-23-71.ri.ri.cox.net] has joined #scheme 20:03:59 -!- ros3 [~roselynro@70-36-146-118.dsl.dynamic.sonic.net] has quit [Quit: ros3] 20:05:10 -!- sepult [~levgue@xdsl-87-79-143-160.netcologne.de] has quit [Read error: Connection reset by peer] 20:06:27 sepult [~levgue@xdsl-87-79-136-79.netcologne.de] has joined #scheme 20:09:26 -!- m811 [~user@150.181.35.213.dyn.estpak.ee] has quit [Quit: "If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs."] 20:12:28 aintme [~Miranda@178.37.221.87.dynamic.jazztel.es] has joined #scheme 20:13:31 -!- aintme [~Miranda@178.37.221.87.dynamic.jazztel.es] has quit [Quit: /* */] 20:22:03 -!- jgracin [~jgracin@vipnet4921.mobile.carnet.hr] has quit [Ping timeout: 248 seconds] 20:30:11 -!- PiRSquared17 [~chatzilla@ip72-192-23-71.ri.ri.cox.net] has quit [Ping timeout: 265 seconds] 20:33:57 -!- hadronzoo [~hadronzoo@ppp-70-251-119-74.dsl.rcsntx.swbell.net] has quit [Ping timeout: 276 seconds] 20:38:54 hadronzoo [~hadronzoo@ppp-70-251-110-167.dsl.rcsntx.swbell.net] has joined #scheme 20:44:48 -!- cpr420 [~cpr420@unaffiliated/cpr420] has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!] 20:46:44 -!- rdd [~user@c83-250-52-182.bredband.comhem.se] has quit [Remote host closed the connection] 20:46:48 pavelludiq [~quassel@87.246.29.84] has joined #scheme 20:46:50 dsmith [~dsmith@cpe-173-88-196-177.neo.res.rr.com] has joined #scheme 20:47:14 -!- pavelludiq [~quassel@87.246.29.84] has quit [Client Quit] 20:47:17 pavelludiq [~quassel@87.246.29.84] has joined #scheme 20:51:19 -!- hadronzoo [~hadronzoo@ppp-70-251-110-167.dsl.rcsntx.swbell.net] has quit [Read error: Operation timed out] 20:51:58 lolcow [~lolcow@196-210-254-202.dynamic.isadsl.co.za] has joined #scheme 20:52:03 -!- leppie [~lolcow@196-210-254-202.dynamic.isadsl.co.za] has quit [Read error: Connection reset by peer] 20:54:29 dfkjjkfd [~paulh@35-13-ftth.onsnetstudenten.nl] has joined #scheme 20:56:09 -!- melba [~blee@unaffiliated/lazz0] has quit [Read error: Connection reset by peer] 20:57:32 hadronzoo [~hadronzoo@ppp-70-251-85-232.dsl.rcsntx.swbell.net] has joined #scheme 21:00:44 -!- pavelludiq [~quassel@87.246.29.84] has quit [Remote host closed the connection] 21:01:00 pavelludiq [~quassel@87.246.29.84] has joined #scheme 21:01:36 Lectus [~Frederico@189.105.26.250] has joined #scheme 21:02:10 -!- hadronzoo [~hadronzoo@ppp-70-251-85-232.dsl.rcsntx.swbell.net] has quit [Ping timeout: 264 seconds] 21:04:53 pavelludiq_ [~quassel@87.246.29.84] has joined #scheme 21:07:14 hadronzoo [~hadronzoo@adsl-209-30-48-79.dsl.rcsntx.swbell.net] has joined #scheme 21:07:59 Nshag [~none@AClermont-Ferrand-551-1-7-10.w92-133.abo.wanadoo.fr] has joined #scheme 21:32:24 pavelludiq__ [~quassel@87.246.29.84] has joined #scheme 21:33:51 -!- pavelludiq [~quassel@87.246.29.84] has quit [Remote host closed the connection] 21:33:56 -!- pavelludiq_ [~quassel@87.246.29.84] has quit [Remote host closed the connection] 21:35:19 -!- pavelludiq__ [~quassel@87.246.29.84] has quit [Remote host closed the connection] 21:35:29 pavelludiq [~quassel@87.246.29.84] has joined #scheme 21:36:16 -!- kar8nga [~kar8nga@jol13-1-82-66-176-74.fbx.proxad.net] has quit [Read error: Connection reset by peer] 21:42:20 -!- pavelludiq [~quassel@87.246.29.84] has quit [Remote host closed the connection] 21:42:41 haole [~ivan@187.23.86.52] has joined #scheme 21:43:03 parolang [~user@ppp-69-221-9-72.dsl.toldoh.ameritech.net] has joined #scheme 21:43:52 hi there... i want to ask for an opinion: i'm in a point in my software that i have to write some data from a file, call an external script to operate on it and then read back this info... but i'm trying to keep things as close to functional programming as i can... what would a scheme programmer do? use "begin" expressions? 21:44:59 -!- mathk [~mathk@lns-bzn-20-82-64-46-177.adsl.proxad.net] has quit [Quit: ..zzZzzZ] 21:47:03 -!- saccade_ [~saccade@dhcp-18-111-84-184.dyn.mit.edu] has quit [Quit: This computer has gone to sleep] 21:53:58 *shrug* 21:54:11 I wouldn't worry too much about being functional, if you're writing to the disk and starting subprocesses. 21:54:43 just try to keep the non-functional stuff minimal. 21:55:02 Maybe your function looks like (define (process-data input) ...), where "input" is a string, and the output is also a string. 21:55:16 under the covers this functions writes to a file, and invokes another program ... 21:55:36 ... in fact it shouldn't do much more than that. 21:55:45 hopefully that function will be simple enough that it's easy to test 21:55:53 ros3 [~roselynro@70-36-146-118.dsl.dynamic.sonic.net] has joined #scheme 21:56:02 then the rest of your code invokes this function, blissfully ignorant of the ugliness within. 21:58:05 -!- joast [~rick@76.178.178.72] has quit [Ping timeout: 240 seconds] 21:58:09 haole: Yes, do it purely functionally: serialize you data as a sexp, then write it to the file: (write (serialize my-data) port). To read it back: (deserialize (read port)) 21:59:35 offby1, could be... that's the path i'm going on right now 22:00:19 pjb`, this could work, but i'm having problems with opening and closing these ports, because my functions is very recursive and, if i don't have the sense of sequentiallity, how can i close a port after opening it? 22:00:30 that is the real problem, i think 22:00:41 i'm still noob and trying to learn :) 22:00:54 haole: is your code simple enough for you to paste, and us to understand? 22:01:25 haole: you don't. You let scheme do it for you; see: call-with-input-file and call-with-output-file. 22:02:21 (call-with-output-file "file.data" (lambda (port) (write (serialize data) port))) 22:02:30 gonna study both possibilities... i'm gonna pastebin it, but right now it is the most ugly procedure in my code... :D 22:02:33 (call-with-input-file "file.data" (lambda (port) (deserialize (read port)))) 22:02:58 -!- HG` [~HG@xdslfa076.osnanet.de] has quit [Quit: Leaving.] 22:03:06 pjb`, gonna study that... 22:03:10 thanks! :D 22:05:15 -!- haole [~ivan@187.23.86.52] has quit [Quit: Saindo] 22:07:12 -!- parolang [~user@ppp-69-221-9-72.dsl.toldoh.ameritech.net] has quit [Remote host closed the connection] 22:07:23 R3cur51v3 [~Recursive@173-30-222-57.client.mchsi.com] has joined #scheme 22:12:26 -!- stis [~stis@1-1-1-39a.veo.vs.bostream.se] has quit [Read error: Connection reset by peer] 22:13:31 -!- MrFahrenheit [~RageOfTho@users-55-90.vinet.ba] has quit [Ping timeout: 248 seconds] 22:19:09 -!- Nshag [~none@AClermont-Ferrand-551-1-7-10.w92-133.abo.wanadoo.fr] has quit [Quit: Quitte] 22:19:14 -!- pjb [~t@81.202.18.80.dyn.user.ono.com] has quit [Remote host closed the connection] 22:33:26 -!- fabe [~fabe@p54A7E3F2.dip.t-dialin.net] has quit [Remote host closed the connection] 22:35:42 PiRSquared17 [~chatzilla@ip72-192-23-71.ri.ri.cox.net] has joined #scheme 22:35:53 kewler ---> (call-with-input-file "file.data" (compose deserialize read)) 22:36:27 -!- gravicappa [~gravicapp@ppp85-141-164-164.pppoe.mtu-net.ru] has quit [Ping timeout: 248 seconds] 22:36:54 askhader [~askhader@taurine.csclub.uwaterloo.ca] has joined #scheme 22:38:51 Say I want to take a year (2010 for example) and then store it in the conventional plt-sceme 'data' struct- how do I do this? 22:39:11 (make-foo 2010) 22:39:27 first you need to define foo though, (define-struct foo (date)) 22:40:51 are you sure it's 'date' ? what about for seconds? Hours? Minutes? 22:41:45 (define-struct a-date (seconds hours minutes year)) 22:41:47 is that better? 22:42:27 jonrafkind: I am refering to the conventional 'date' struct http://docs.plt-scheme.org/reference/time.html 22:42:51 I try to store the year, say 2010 and I get thrown the error make-date: expected argument of type ; given 2010 22:43:09 you probably tried (make-date 2010) or something? 22:43:21 Er no 22:43:25 I filled every necessary field 22:43:37 paste your code 22:43:53 MrFahrenheit [~RageOfTho@users-55-201.vinet.ba] has joined #scheme 22:44:45 k, just a background. What I did was I pulled the date from (current-seconds), converted to date struct. Wrote the fields to file and am reading them back from the file and attempting to re-store. http://pastebin.com/BmcQVazN 22:46:34 i dunno, print out the values that you are reading/writing 22:47:43 What? 22:48:28 do you know how to print values to the console? 22:48:32 printf? 22:49:50 (display "text") 22:49:52 ? 22:50:27 im not asking how to do it, im asking askhader if he knows how to use printf 22:50:28 What good will that do me? 22:50:32 I know what the values are. 22:50:37 mzscheme is telling me what the value is 22:50:40 "2010" 22:51:09 can you invoke `make-date' on values you supply by hand? as in (make-date 0 0 0 0 0 0 2010 0 0) or whatever it is 22:51:16 if that works then there is something wrong with your program 22:51:39 Look, the year that it wants is is of type 22:52:00 Does this mean I just take the last 2 digits? 22:52:04 parolang [~user@8e4a01246100775874c4f448e9887093.oregonrd-wifi-1261.amplex.net] has joined #scheme 22:52:16 jonrafkind: If you don't know how 'date' works, it's okay to say so 22:52:40 (make-date 1 2 1 1 1 2010 0 0 #f 0) 22:52:43 this works, does it not? 22:53:12 Oh I see. 22:53:19 I put the fields in the wrong ordr. 22:53:21 order* 22:53:27 you're welcome 22:53:30 Er wait. 22:53:32 Actually I didn't. 22:53:45 They are in the correct order. 22:54:48 Oh, perhaps it's a string that it is receiving 23:03:42 snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 23:12:24 somnium [~user@adsl-65-181-75.dab.bellsouth.net] has joined #scheme 23:14:34 does anyone know of any implementations of persistent datastructures in scheme (especially along the lines of Okasaki's Purely Functional Data Structures)? 23:15:00 -!- MrFahrenheit [~RageOfTho@users-55-201.vinet.ba] has quit [Ping timeout: 265 seconds] 23:17:53 jonrafkind: Don't you know that PLT dates are limited to 2000-2059?? 23:18:11 im sorry!!!! 23:18:15 >.> 23:18:23 ha ha ha 23:18:30 >) 23:19:26 *foof* celebrates the new year every hour, on the hour \o/ 23:21:10 why not every second 23:22:06 geckosenator: you wouldn't get to do the countdown 23:22:30 ktzqbp [~ktzqbp@unaffiliated/ktzqbp] has joined #scheme 23:22:52 -!- dfkjjkfd [~paulh@35-13-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 23:23:56 cpr420 [~cpr420@unaffiliated/cpr420] has joined #scheme 23:27:36 living on a boat is making me lose my sanity 23:32:10 -!- PiRSquared17 [~chatzilla@ip72-192-23-71.ri.ri.cox.net] has quit [Read error: Connection reset by peer] 23:32:47 PiRSquared17 [~chatzilla@ip72-192-23-71.ri.ri.cox.net] has joined #scheme 23:35:18 somnium` [~user@adsl-65-187-209.dab.bellsouth.net] has joined #scheme 23:37:07 haole [~ivan@187.23.86.52] has joined #scheme 23:37:38 hello there... how do i print a string to the screen in the middle of a recursion? no matter what i do, all of the strings that i wanted to print are printed only in the end of the recursion... 23:38:22 What interpreter are you using? 23:38:41 -!- somnium [~user@adsl-65-181-75.dab.bellsouth.net] has quit [Ping timeout: 265 seconds] 23:39:42 haole: (display "somestring") not work for you? 23:40:08 -!- geckosenator [~sean@dsl-63-249-91-224.dhcp.cruzio.com] has quit [Remote host closed the connection] 23:40:10 Try it in http://codepad.org 23:40:34 PiRSquared17, mzscheme 23:40:50 IJP, no... it only shows them at the end, all at the same time... like it was doing something lazy 23:41:09 paste it 23:41:10 -!- masm [~masm@2.80.155.189] has quit [Quit: Leaving.] 23:41:44 PiRSquared17, right... i'll make a test case, so gimme a moment :D 23:41:48 somnium`` [~user@adsl-65-176-243.dab.bellsouth.net] has joined #scheme 23:42:01 -!- somnium`` [~user@adsl-65-176-243.dab.bellsouth.net] has left #scheme 23:43:39 -!- ktzqbp [~ktzqbp@unaffiliated/ktzqbp] has quit [Ping timeout: 248 seconds] 23:44:25 -!- somnium` [~user@adsl-65-187-209.dab.bellsouth.net] has quit [Ping timeout: 264 seconds] 23:44:45 -!- sepult [~levgue@xdsl-87-79-136-79.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:45:05 IRC client for Emacs? 23:45:52 PiRSquared17, yes 23:45:55 PiRSquared17:It's not for nothing that my emacs icon is a kitchen sink 23:46:01 oh, no, sorry 23:46:02 :D 23:46:12 There are seldom applications for which an emacs plugin does not exist. 23:46:21 is there a procedure to make my application wait? that would help me with the test case 23:46:27 vi plugins? 23:47:03 geckosenator [~sean@dsl-63-249-91-224.dhcp.cruzio.com] has joined #scheme 23:47:08 haole: (sleep n) ? 23:47:24 saint_cypher [~saint_cyp@c-76-126-70-224.hsd1.ca.comcast.net] has joined #scheme 23:47:27 askhader, could be :D brb 23:47:47 PiRSquared17: they exist, but I don't think they have an IRC client yet 23:48:08 nano plugins? 23:48:51 off topic... 23:48:58 I spoke too soon http://www.vim.org/scripts/script.php?script_id=931 23:49:28 dfkjjkfd [~paulh@35-13-ftth.onsnetstudenten.nl] has joined #scheme 23:49:52 haole: could you paste your code? 23:51:56 ... 23:53:10 .... 23:53:53 ..... 23:54:38 .... 23:54:52 ... 23:55:27 .. 23:55:33 -!- ChanServ has set mode +o chandler 23:55:48 haole: are you there? 23:55:50 If someone doesn't respond right away, that's their decision. 23:56:05 Don't feel obligated to add noise in the interim. 23:57:12 Sorry