00:04:22 -!- saccade_ [n=saccade@18.188.74.28] has quit ["This computer has gone to sleep"] 00:07:15 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit [Remote closed the connection] 00:09:09 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 00:20:10 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 00:28:49 blackened`_ [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 00:29:05 -!- blackened`_ [n=blackene@ip-89-102-28-224.karneval.cz] has quit [Client Quit] 00:33:14 blackened`_ [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 00:33:23 -!- blackened`_ [n=blackene@ip-89-102-28-224.karneval.cz] has left #scheme 00:36:43 blackened`_ [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 00:37:06 -!- blackened`_ [n=blackene@ip-89-102-28-224.karneval.cz] has quit [Client Quit] 00:39:01 EleminoP [n=EleminoP@iub-vpn-194-63.noc.indiana.edu] has joined #scheme 00:40:15 would someone help me with writing a procedure that computes the sum of a list of numbers? 00:42:14 (define (sum xs) (if (null? xs) 0 (+ (car x) (sum (cdr xs))))) 00:42:23 writing it as a fold would be better though 00:42:28 MononcQc: Erm. 00:43:10 I think EleminoP wanted help with a homework exercise, not a solution. 00:43:10 Ok I'll keep it shut :( 00:43:33 well thanks 00:43:43 MononcQc: It's okay, I've done the same thing before. 00:43:44 yeah, it's homework 00:43:57 seems very simple now 00:44:02 then try doing it a different way ;) 00:44:25 EleminoP: Now write it so it is properly tail-recursive. 00:44:30 exactly 00:45:04 i don't know what "tail-recursive" means 00:45:55 If you take the procedure I have written and evaluate it with the list (1 2 3), it ends up giving (+ 1 (+ 2 (+ 3 0))) 00:46:05 ah, yeah 00:46:10 so, get rid of the 0 00:46:28 not exactly. Tail recursive would mean evaluate it such as it expands the following way: 00:46:43 (+ 1 0), then (+ 1 2), then (+ 3 3) 00:47:02 the sum is calculated precisely for each element of the list and you only store 1 value in memory 00:47:10 no need to have the whole chain of operations created 00:47:13 EleminoP: Are you using DrScheme by an chance? 00:47:18 no 00:47:24 (I'm not sure I'm actually helping here) 00:47:54 Do you have access to an editor or interpreter that will expand your code as it runs? 00:47:55 -!- mrsolo [n=mrsolo@nat/yahoo/x-upwpxnnvixvntaru] has quit ["Leaving"] 00:48:19 -!- etoxam [n=||||||||@84.79.67.254] has quit [Read error: 110 (Connection timed out)] 00:48:31 (It's easier to grasp what tail recursion is if you can see the stack expand during execution.) 00:48:33 i think so. i'm using chez scheme. 00:48:39 (trace sum) 00:48:51 (sum '(1 3 4 2)) 00:49:00 then it shows me what it does or something 00:49:02 is that what you mean? 00:49:17 Try tracing the execution of (sum '(1 2 3 4 5 6 7 8 9)) 00:49:35 http://mitpress.mit.edu/sicp/full-text/book/ch1-Z-G-7.gif this would be normal recursion, 00:49:42 http://mitpress.mit.edu/sicp/full-text/book/ch1-Z-G-10.gif and this would be tail recursion 00:49:47 (SICP to the rescue!) 00:49:55 MononcQc: Yes, that is a good example of non-tail recursion. 00:50:26 See how there is information left on the stack each time the recursive call is made, and how that information is needed to compute the final answer? 00:50:40 That's bad for large lists: You can run out of stack space. 00:51:31 So here's a "make-up" exercise for you: Write a `sum` function (helper functions are allowed) that will not make the stack grow arbitrarily large for arbitrarily long lists. 00:52:09 oh man 00:54:36 wait, in that solution MononcQc gave me earlier, why isn't there a lambda? 00:54:42 or is that implied 00:56:32 lambdas are anonymous functions. As you use (define (name vars) ), you say it is a function with a name 00:56:53 the equivalent with a lambda would have been (define sum (lambda (xs) (...))) 00:57:20 hmm, ok 00:57:31 so (define (name vars) ...) is kind of a shortcut for (define name (lambda (vars) ... )) 00:57:43 alright 00:59:14 i don't think i know enough to rewrite it so it's properly tail-recursive 01:00:55 I find it hard to explain without giving the answer, maybe TimMc can do better 01:02:52 is giving straight answers forbidden? 01:03:14 eh, nvm. you're trying to teach me properly. 01:03:37 yeah. 01:04:17 i appreciate it 01:05:03 Here's an idea: let's change our current call structure from (+ 3 2 1 ... (sum n)) to something that doesn't grow continuously. 01:05:09 ski_ [n=md9slj@remote1.student.chalmers.se] has joined #scheme 01:05:32 All operations are basically (+ a b) where b is another function call. 01:06:48 so if we decide to give the 'b function the parameter 'a', it should be able to do the computations itself.... resulting in c = (+ a b), then e = (+ c d), then g = (+ e f) 01:07:43 if you want a shortcut (and a better description of it), you can read http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%_sec_1.2.1 instead 01:08:03 chylli [n=lchangyi@60.211.214.32] has joined #scheme 01:09:44 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 01:11:20 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 01:13:34 EleminoP: Sorry, I wandered off for a bit. 01:14:09 it's alright. 01:14:27 So, instead of doing all the work on the way back up the stack, can you do a little work each time you recurse, and pass that forwards? 01:14:39 i'm sure you can 01:15:58 I know *I* can. But can you? :-P 01:16:26 man, idk 01:16:26 Sorry, I couldn't find anything for idk. 01:16:35 Hah. 01:16:36 Let me put it another way: Imagine you were asked to add up a list of numbers. How would you do it? 01:18:26 one on top of the other 01:19:04 EleminoP: Let's say the numbers you want to add are on postcards by the side of a long road. You'll have to walk along the road to read them and use them for computation. Your current program walks along until it finds the last postcard, then backtracks, adding as it goes. 01:19:13 -!- mike8901 [n=mike@129.116.46.184] has left #scheme 01:19:25 That makes it walk the entire distance *twice*. What a pain! 01:19:44 ah, i see 01:19:45 I bet you could walk to the end of the road and have the answer without having to walk all the way back. 01:19:49 so yeah, you add them as you go 01:20:05 1st card plus 2nd 01:20:09 then that plus 3rd 01:20:20 Where do you put the answer of that first addition? 01:20:36 can i just remember it? 01:20:36 You have to give it to the next recursive step, you know. 01:20:43 some sorta variable 01:20:43 -!- jonrafkind [n=jon@crystalis.cs.utah.edu] has quit [Read error: 60 (Operation timed out)] 01:20:57 "Remembering" involves binding and passing a value. 01:21:09 You're on the right track. 01:21:29 (you're better than I am at that, TimMc ;P) 01:21:51 MononcQc: (Thanks!) 01:22:24 it's like mononQc said earlier, something like: (a+b) = c, (c+d) = e, (e+f) = g 01:22:27 QinGW [n=wangqing@203.86.89.226] has joined #scheme 01:22:59 EleminoP: How would you do this using iteration (in a language like Java, where it is a standard idiom?) 01:23:13 scheme is the first language i've begun to learn 01:23:36 lucky you (really, scheme is pretty neat, and I say that as a scheme beginner who knows a few other languages) 01:24:18 luz [n=davids@189.122.90.116] has joined #scheme 01:24:22 Ah, so that approach won't work, then! 01:24:32 i guess not 01:25:31 I'll give you this one, then: When you need to "remember" one or more values from one recursive step to the next, you'll need more arguments in your function definition. 01:26:02 (If you add two values, you will need a function that has 2 parameters) 01:26:49 EleminoP: The value you are remembering from one step to the next is called the "accumulator". 01:27:07 alright 01:28:29 So, make a new function called `sum-accum` that takes TWO arguments: A list of the remaining things to be added, and the accumulator (the sum of everything added so far.) 01:29:04 EleminoP: Clearly, when you call it the first time, you can just pass it an accumulator arugment of zero. :-) 01:29:12 can i define a function within a function? 01:29:35 i think i know the answer 01:29:43 no 01:29:52 yes you can 01:30:00 oh 01:31:59 i don't think i'm getting any closer 01:32:20 i keep just going back to that original solution 01:36:01 (define (fn lst) (define ( accumulator)) ...) 01:36:27 as a clue 01:37:09 -!- Nshag [i=user@Mix-Orleans-106-2-77.w193-248.abo.wanadoo.fr] has quit ["Quitte"] 01:39:10 saccade_ [n=saccade@65-78-24-131.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 01:41:54 jcowan [n=jcowan@72.14.228.129] has joined #scheme 01:45:05 i really appreciate the lesson, i'm very distracted right now though 01:47:02 understanding tail recursion is really helpful later on. Once you grasp it well enough, it usually makes your programs much lighter 01:47:21 and faster in many cases 01:47:39 i'd think it's something we'll learn eventually 01:47:58 Tail recursion: see recursion, then see tail recursion. 01:47:59 want a more advanced structure to try and work with? 01:48:25 sure 01:48:32 (define (fn lst) 01:48:32 (define (fn-loop xs acc) 01:48:32 (fn-loop )) 01:48:32 (fn-loop lst 0)) 01:48:46 try to make your sum function conform to a similar form 01:49:01 xs is the rest of the list you have to evaluate, acc is the accumulator, and lst is the complete list 01:49:27 (it's not exactly complete, it will recurse infinitely unless you make it stop yourself) 01:49:49 but this should help you get the structure 01:50:57 Continuation passing style: see tail recursion, then see continuation passing style. 01:51:10 I have yet to see continuations 01:51:24 I think the SICP will tell me about it at some point once I,m far enough inside it 02:01:45 mononqc : is this the best way to do this? 02:01:46 (define repeat-down 02:01:46 (lambda (n p) 02:01:46 (if (> n -1) 02:01:46 (begin 02:01:46 (p n) 02:01:48 (repeat-down (- n 1) p))))) 02:01:55 n = an integer, p = a function 02:02:52 (repeat-down 10 write) ;=> 109876543210 02:02:56 that's what it's supposed to do 02:03:07 it seemed like a messy way to do it to me 02:05:01 well, it's not the cleanest way, but you see with (- n 1) that you have the main element to tail recursion 02:05:43 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit ["ChatZilla 0.9.85 [Firefox 3.5.3/20090824101458]"] 02:06:29 oic 02:07:07 i thought that was sorta like the (sum (cdr xs)) earlier 02:07:20 i have a lot to learn! 02:07:25 i think i'll give it a rest for tonight 02:07:32 EleminoP, that is what you need to do each part of the list 02:07:56 then you need a second variable for the current sum 02:08:36 (sum-iter ) 02:09:01 in the end will it be like (sum '(1 2 3 4 5) 5) ;=> 15 ?? 02:09:17 EleminoP: Nope, that will add to 30. 02:09:25 oh 02:09:34 Erm, 20. 02:09:38 oh, i see 02:09:51 (sum '(1 2 3 4 5) 0) => 15 02:10:51 EleminoP: Once you have (sum-iter '(1 2 3 4 5) 0) ;=> 15, then you can write a "wrapper" function: (define (sum xs) (sum-iter xs 0)) 02:11:24 this looks very much like an example that was early in my assignment 02:11:31 (define count-elements 02:11:31   (lambda (n ls) 02:11:31     (if (null? ls) 02:11:31         n 02:11:31         (count-elements (+ n 1) (cdr ls))))) 02:11:57 then they did (define list-length (lambda (ls) (count-elements 0 ls))) 02:12:20 lisppaste: url? 02:12:21 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 02:12:32 EleminoP, that's near to that 02:12:41 well no, that's p. much tail recursion there 02:14:22 EleminoP: It's good that you reognized that. (Recognition of coding patterns is an important skill.) 02:14:46 good to hear 02:14:56 *yitz_* wonders how long it takes to learn scheme by lurking in #screen 02:14:59 * #scheme 02:15:25 EleminoP: Do you see how the count-elements function uses an accumulator to avoid putting off work 'til the end? 02:17:24 EleminoP: The result is that a Scheme compiler or interpreter can just drop all the intermediate stack frames, providing constant-space computation. 02:18:13 yeah, i see 02:20:04 EleminoP: At first, you might find recursion to be an annoying way of representing iteration. 02:20:11 yitz_: Probably forver. Writing code would be a lot faster. 02:20:43 I started reading the sicp book but got sidetracked 02:21:41 EleminoP: It will become apparent, however (if it hasn't already), that using recursion can make your programs *easier* to read, which is incredibly important. 02:22:16 (Over time and on average, computers get faster, but humans don't get smarter.) 02:22:28 yitz_, I'm about to finish chapter 2. It's really worth it, even you don't go all the way in 02:22:35 doing the exercises is a must though 02:22:57 TimMc, they'll make processors slower and slower to save energy, and will instead add cores :) 02:23:11 chandler: It's possible to learn almost entirely by watching, but not *well*. 02:23:28 TimMc and MononcQc : thank you very much for your attempted teachings 02:23:36 EleminoP: No problem! 02:23:37 i learned some 02:23:44 i need to get to sleep 02:23:48 what is the saying? You remember 10% of what you hear, 40% of what you write, 90% of what you do? something like that? 02:23:56 good night then 02:23:57 EleminoP: You'll learn more if you try to explain it to someone else. :-) 02:24:10 yeah, goodnight 02:24:12 -!- EleminoP [n=EleminoP@iub-vpn-194-63.noc.indiana.edu] has left #scheme 02:24:14 MononcQc: And 110% of what you teach. 02:24:23 TimMc, true ;) 02:24:41 it's why I'm trying to write a book on Erlang in fact. forces me to learn *everything* 02:25:26 You just have to make sure *you* know the subject decently well, otherwise the victim^Wstudent learns -10%. :-( 02:25:38 yeah, I have reviewers :) 02:30:54 -!- MononcQc [n=mononcqc@modemcable062.225-20-96.mc.videotron.ca] has quit ["DOWNLOADING NEXT VERSION OF INTERNET"] 02:31:04 -!- chylli [n=lchangyi@60.211.214.32] has quit [Remote closed the connection] 02:32:03 ct2rips_ [n=ct2rips@dslb-092-073-182-078.pools.arcor-ip.net] has joined #scheme 02:40:15 jcowan, did you ping me earlier? I can't remember. 02:40:15 Riastradh, memo from jcowan: don't forget to post your time draft. 02:40:22 Well, there I go. 02:40:59 Indeed. 02:43:08 chylli [n=lchangyi@60.211.214.32] has joined #scheme 02:49:47 -!- ct2rips [n=ct2rips@dslb-092-073-160-174.pools.arcor-ip.net] has quit [Connection timed out] 02:51:18 ventonegro [n=alex@189.62.119.12] has joined #scheme 02:51:34 jcowan: 02:52:34 tjafk1 [n=timj@e176208112.adsl.alicedsl.de] has joined #scheme 02:52:55 incubot: if-those-assholes-in-the-other-departement-would-have-brains-this-function-would-not-need-to-exist 02:52:58 Title: Departement Elektrotechniek - ESAT 02:53:06 Riastradh: While you're here, can you by chance provide an example of real-life `let-syntax' use for jcowan? 02:53:40 Hmm. I know I have used it in anger, but not often. 02:55:18 I've used MACROLET in anger in That Other Language as well, but I can't seem to find where at the moment. 03:02:02 -!- syntropy [n=who@unaffiliated/syntropy] has quit [Read error: 104 (Connection reset by peer)] 03:02:11 -!- p1dzkl [i=p1dzkl@208.92.234.202] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- ski_ [n=md9slj@remote1.student.chalmers.se] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- mreggen [n=mreggen@cm-84.215.28.167.getinternet.no] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- offby1 [n=user@q-static-138-125.avvanta.com] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- eno [n=eno@nslu2-linux/eno] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- hiyuh [n=hiyuh@KD124214245222.ppp-bb.dion.ne.jp] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- ponzao___ [n=vesam@xdsl-83-150-86-25.nebulazone.fi] has quit [anthony.freenode.net irc.freenode.net] 03:02:11 -!- elf [i=elf@antenora.aculei.net] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- roderic [n=user@bubbles.ccs.neu.edu] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- gnomon [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- qebab [i=finnrobi@gaupe.stud.ntnu.no] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- Elly [n=pyxystyx@unaffiliated/elly] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- chandler [n=n@opendarwin/developer/chandler] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- tizoc [n=user@unaffiliated/tizoc] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- ventonegro [n=alex@189.62.119.12] has quit [anthony.freenode.net irc.freenode.net] 03:02:12 -!- felipe [n=felipe@my.nada.kth.se] has quit [anthony.freenode.net irc.freenode.net] 03:02:20 p1dzkl [i=p1dzkl@208.92.234.202] has joined #scheme 03:02:44 ski_ [n=md9slj@remote1.student.chalmers.se] has joined #scheme 03:02:44 sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has joined #scheme 03:02:44 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 03:02:44 mreggen [n=mreggen@cm-84.215.28.167.getinternet.no] has joined #scheme 03:02:44 offby1 [n=user@q-static-138-125.avvanta.com] has joined #scheme 03:02:44 eno [n=eno@nslu2-linux/eno] has joined #scheme 03:02:44 hiyuh [n=hiyuh@KD124214245222.ppp-bb.dion.ne.jp] has joined #scheme 03:02:44 ponzao___ [n=vesam@xdsl-83-150-86-25.nebulazone.fi] has joined #scheme 03:02:44 elf [i=elf@antenora.aculei.net] has joined #scheme 03:02:44 tizoc [n=user@unaffiliated/tizoc] has joined #scheme 03:02:44 roderic [n=user@bubbles.ccs.neu.edu] has joined #scheme 03:02:44 qebab [i=finnrobi@gaupe.stud.ntnu.no] has joined #scheme 03:02:44 chandler [n=n@opendarwin/developer/chandler] has joined #scheme 03:02:44 Elly [n=pyxystyx@unaffiliated/elly] has joined #scheme 03:02:44 gnomon [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 03:03:57 syntropy [n=who@unaffiliated/syntropy] has joined #scheme 03:07:57 ventonegro [n=alex@189.62.119.12] has joined #scheme 03:09:36 -!- tjafk2 [n=timj@e176199129.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 03:09:37 There are many uses of LET-SYNTAX in MIT Scheme. 03:10:16 The real difference between LET-SYNTAX and (top-level) DEFINE-SYNTAX, though, is that the macro transformers in LET-SYNTAX can refer to local variables bound in the LET-SYNTAX. 03:14:43 Is that useful for syntax-rules transformers? 03:17:49 Yes, certainly. 03:18:33 If some local body of code has a great deal of repetition in it, with many repeated references to the same local variables, LET-SYNTAX can be used to reduce the clutter in the repetition, for which it is helpful to have a concise and uncluttering LET-SYNTAX. 03:19:56 -!- Fade [i=fade@66.207.216.43] has quit [Read error: 131 (Connection reset by peer)] 03:21:07 -!- luz [n=davids@189.122.90.116] has quit [Remote closed the connection] 03:24:41 Fade [i=fade@outrider.deepsky.com] has joined #scheme 03:32:22 -!- dysinger [n=dysinger@c-24-18-234-48.hsd1.wa.comcast.net] has quit [Read error: 110 (Connection timed out)] 03:48:37 eno_ [n=eno@70.137.166.234] has joined #scheme 03:49:50 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 03:50:25 -!- eno [n=eno@nslu2-linux/eno] has quit [Nick collision from services.] 03:50:35 -!- eno_ is now known as eno 03:59:13 -!- ventonegro [n=alex@189.62.119.12] has quit [] 04:03:34 -!- Fade [i=fade@outrider.deepsky.com] has quit [Read error: 104 (Connection reset by peer)] 04:04:47 felipe [n=felipe@my.nada.kth.se] has joined #scheme 04:12:29 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 04:12:38 Fade [i=fade@outrider.deepsky.com] has joined #scheme 04:18:32 -!- incubot [i=incubot@klutometis.wikitex.org] has quit [Remote closed the connection] 04:19:18 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 04:20:31 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit [Remote closed the connection] 04:21:12 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 04:22:28 -!- ASau [n=user@83.69.240.52] has quit [Read error: 113 (No route to host)] 04:22:48 -!- ASau` [n=user@83.69.240.52] has quit [Read error: 113 (No route to host)] 04:23:23 incubot [i=incubot@klutometis.wikitex.org] has joined #scheme 04:23:33 lowlycoder [n=x@unaffiliated/lowlycoder] has joined #scheme 04:24:07 besides sicp, paip, onlisp, lisp, eopl, what should i read? 04:24:22 -!- elmex [i=elmex@ist.m8geil.de] has quit [Remote closed the connection] 04:24:25 elmex [i=elmex@ist.m8geil.de] has joined #scheme 04:26:35 -!- jcowan [n=jcowan@72.14.228.129] has quit ["Leaving"] 04:27:24 -!- elmex [i=elmex@ist.m8geil.de] has quit [Remote closed the connection] 04:27:48 elmex [i=elmex@ist.m8geil.de] has joined #scheme 04:29:20 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 04:30:47 -!- elmex [i=elmex@ist.m8geil.de] has quit [Remote closed the connection] 04:34:09 ebzzry [n=ebzzry@124.217.72.37] has joined #scheme 04:35:26 elmex [i=elmex@89.144.17.55] has joined #scheme 04:35:26 -!- elmex [i=elmex@89.144.17.55] has quit [Remote closed the connection] 04:35:44 -!- ebzzry [n=ebzzry@124.217.72.37] has quit [Client Quit] 04:35:47 elmex [i=elmex@ist.m8geil.de] has joined #scheme 04:39:58 lowlycoder: GEB :-) 05:05:26 -!- Modius [n=Modius@24.174.112.56] has quit [Read error: 104 (Connection reset by peer)] 05:05:53 Modius [n=Modius@24.174.112.56] has joined #scheme 05:06:56 -!- dmoerner [n=dmr@89-151.res.pomona.edu] has quit ["Leaving"] 05:08:33 eno_ [n=eno@70.137.150.186] has joined #scheme 05:10:39 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 145 (Connection timed out)] 05:12:42 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 110 (Connection timed out)] 05:15:38 -!- eno_ is now known as eno 05:16:25 geb is worthless for anyone that's taken a complexity course, in my not so humble opinion 05:18:20 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Read error: 131 (Connection reset by peer)] 05:18:48 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 05:19:32 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit [Remote closed the connection] 05:22:00 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 05:23:18 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 05:24:40 lowlycoder: Not sure where you're getting that from. THere's a lot of (random) good stuff in that book. 05:24:45 mmc [n=mima@cs137104.pp.htv.fi] has joined #scheme 05:28:06 i feel the book has very little tehnical ontentcc 05:33:05 I don't think it was meant to have technical content 05:43:38 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 05:44:26 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 05:45:31 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 05:56:38 -!- sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has quit [] 05:57:25 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 05:57:45 peddie [n=peddie@67.170.201.38] has joined #scheme 05:59:17 QinGW [n=wangqing@203.86.89.226] has joined #scheme 06:01:08 -!- mmc [n=mima@cs137104.pp.htv.fi] has quit [Read error: 110 (Connection timed out)] 06:10:26 copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has joined #scheme 06:27:56 I have a list of strings, something like: '("1.0" "14.0" "32.0" "12.0" "2.0" "20.0") etc 06:28:40 why yes, yes you do 06:28:41 I'm trying to sort them from lowest to highest, however, string (sort list (lambda (a b) (not (string syntropy: if you're using PLT, then: 06:31:18 rudybot: eval (sort '("1.0" "14.0" "32.0" "12.0" "2.0" "20.0") < #:key string->number #:cache-keys? #t) 06:31:18 eli: your r5rs sandbox is ready 06:31:19 eli: error: reference to an identifier before its definition: sort in module: 'program 06:31:26 rudybot: init scheme 06:31:26 eli: your scheme sandbox is ready 06:31:28 rudybot: eval (sort '("1.0" "14.0" "32.0" "12.0" "2.0" "20.0") < #:key string->number #:cache-keys? #t) 06:31:28 eli: ; Value: ("1.0" "2.0" "12.0" "14.0" "20.0" "32.0") 06:31:48 synx: If you're not using plt, then you need to do the decorate-undecorate steps yourself. 06:31:50 Ohh, I see, conversion to number and back to string... 06:32:07 No, it only converts to numbers, and uses the results as keys. 06:32:09 not back 06:33:01 It's something that Perlers are rude enough to call with some name that I don't remember, but is very common (and easy) in lisp/scheme. 06:33:11 oh, right numeric order... 06:33:35 I know it as natural sort 06:34:23 "natural"? What's natural about it? 06:34:54 the natural progression I guess 06:35:13 -!- jao [n=jao@60.Red-88-6-175.staticIP.rima-tde.net] has quit [Read error: 110 (Connection timed out)] 06:35:20 the way non coding people see it 06:35:38 You mean the specific ordering by number values? 06:35:43 yes 06:36:10 Ah -- what I'm talking about is the method of "decorating" the list with some keys, and then removing it. 06:36:24 or sorting stuff like 1.2.3 06:36:27 oh ok :) 06:36:46 There: "Schwartzian Transform". 06:37:01 May the Schwartz be with you 06:37:13 -!- elmex [i=elmex@ist.m8geil.de] has quit [Remote closed the connection] 06:37:14 Which wikipedia declares to be "a Perl programming idiom" 06:38:11 And only later says "The Schwartzian Transform is a version of a Lisp idiom known as decorate-sort-undecorate" -- but I don't see how it's "a version of" rather than "the same as" 06:38:13 eli: when you cache the keys in sort, do you first collect the keys or do you just cache them inline? 06:38:36 elmex [i=elmex@ist.m8geil.de] has joined #scheme 06:38:45 leppie: How do you know it's me who's doing that? 06:39:08 i dont 06:39:24 Anyway (it is me who wrote that), it just does the simple thing of finding all of the keys and then removing them from the result. 06:39:45 There's no saving if you do it as needed -- and it's better to run the key function in a predictable way. 06:40:08 ahh ok, was just interested (and a lucky guess then) 06:41:32 It's really simple to write a wrapper that does the same job, but it's common enough that it helps to have the function do it for you. (For example, sort files by times, etc.) 06:47:42 Is anyone here both awake and using ubunto? 06:48:04 -!- araujo [n=araujo@gentoo/developer/araujo] has quit ["Leaving"] 06:50:11 ASau [n=user@host184-230-msk.microtest.ru] has joined #scheme 06:53:19 ubuntu ? 06:53:32 i'm using latest ubuntu on amd64 06:55:30 -!- rstandy [n=rastandy@net-93-144-73-142.t2.dsl.vodafone.it] has quit [Read error: 110 (Connection timed out)] 06:57:15 lowlycoder: Do you have an idea which (dev) package is needed for "Xaw"? 06:59:50 ~/work:$ apt-cache search xaw | grep dev 06:59:50 libxaw7-dev - X11 Athena Widget library (development headers) 06:59:53 doesn't work? 07:00:39 lowlycoder: I don't know -- it's a dept machine so I need some name to ask them to install. (And I'm not an ubuntu user, which is why I never remember how to find these things...) 07:00:45 lowlycoder: ... and thanks. 07:01:13 ~/work:$ apt-cache search xaw | grep dev 07:01:14 libxaw7-dev - X11 Athena Widget library (development headers) 07:01:14 libxt-dev - X11 toolkit intrinsics library (development headers) 07:01:14 xaw3dg-dev - Xaw3d widget set development package 07:01:14 libmjpegtools-dev - MJPEG video capture/editting/playback MPEG encoding 07:01:24 that's actuallly the full result; at first i only pasted the top one 07:01:38 -!- brx [i=brx@erxz.com] has quit [Read error: 60 (Operation timed out)] 07:01:45 can't you inhstall it locally? 07:02:12 I have no idea. 07:02:13 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 07:02:29 Like I said, I try to keep my interactions with ubuntus to a minimum... 07:03:13 QinGW [n=wangqing@203.86.89.226] has joined #scheme 07:03:22 what linux distro do you use? 07:03:33 Fedora. 07:04:00 That's what I use on my servers almost always. 07:04:46 brx [i=brx@erxz.com] has joined #scheme 07:08:03 instead of locally, I should have said ~ 07:09:02 Yeah, I got that. 07:11:54 leppie|work [i=52d2e3c8@gateway/web/freenode/x-agdnjcvodpfasgnr] has joined #scheme 07:18:46 -!- lowlycoder [n=x@unaffiliated/lowlycoder] has quit [Read error: 104 (Connection reset by peer)] 07:23:47 lowlycoder [n=x@unaffiliated/lowlycoder] has joined #scheme 07:47:36 charmless [n=charmles@207.47.213.196] has joined #scheme 08:08:17 Fufie [n=poff@Gatekeeper.vizrt.com] has joined #scheme 08:12:10 -!- leppie|work [i=52d2e3c8@gateway/web/freenode/x-agdnjcvodpfasgnr] has quit ["Page closed"] 08:14:45 alaricsp [n=alaricsp@relief.warhead.org.uk] has joined #scheme 08:16:26 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 08:17:33 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 60 (Operation timed out)] 08:29:25 leppie|work [i=52d2e3c8@gateway/web/freenode/x-vnbwuuapxxsgkabv] has joined #scheme 08:30:32 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 08:39:02 *eli* yawns so much that he swallows a speaker and a stack of blank cds 08:41:26 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 08:43:31 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 08:47:17 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 08:57:11 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 08:59:08 masm [n=masm@bl9-113-62.dsl.telepac.pt] has joined #scheme 09:00:40 QinGW [n=wangqing@203.86.89.226] has joined #scheme 09:01:12 offby1` [n=user@q-static-138-125.avvanta.com] has joined #scheme 09:01:35 rudybot_ [n=luser@q-static-138-125.avvanta.com] has joined #scheme 09:07:18 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Remote closed the connection] 09:13:02 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 09:15:51 -!- rudybot [n=luser@q-static-138-125.avvanta.com] has quit [Read error: 110 (Connection timed out)] 09:15:58 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 60 (Operation timed out)] 09:16:30 -!- offby1 [n=user@pdpc/supporter/monthlybyte/offby1] has quit [Read error: 110 (Connection timed out)] 09:18:16 is there a way in xmonad to force a redraw of the entire screen? 09:38:35 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 09:39:25 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 09:46:34 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 09:47:09 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 09:57:16 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Remote closed the connection] 10:04:35 -!- ve [n=a@94.193.95.252] has quit [Read error: 145 (Connection timed out)] 10:10:00 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 10:10:30 attila_lendvai [n=ati@apn-94-44-10-244.vodafone.hu] has joined #scheme 10:20:22 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Remote closed the connection] 10:21:17 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 10:22:09 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 10:30:57 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 10:34:56 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 10:36:59 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 10:59:13 thesnowdog [i=thesnowd@114.73.162.79] has joined #scheme 10:59:56 thesnowdog_ [i=thesnowd@114.73.162.79] has joined #scheme 11:00:05 -!- thesnowdog [i=thesnowd@114.73.162.79] has quit [Client Quit] 11:00:23 -!- thesnowdog_ is now known as thesnowdog 11:02:04 -!- ski_ [n=md9slj@remote1.student.chalmers.se] has quit ["Lost terminal"] 11:13:25 ve [n=a@94-193-95-252.zone7.bethere.co.uk] has joined #scheme 11:18:06 leppie [n=lolcow@41.244.199.242] has joined #scheme 11:18:12 -!- chylli [n=lchangyi@60.211.214.32] has quit [Read error: 104 (Connection reset by peer)] 11:18:17 hotblack23 [n=jh@p5B054008.dip.t-dialin.net] has joined #scheme 11:26:27 -!- leppie [n=lolcow@41.244.199.242] has quit [Read error: 131 (Connection reset by peer)] 11:30:57 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Read error: 104 (Connection reset by peer)] 11:31:07 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 11:39:01 -!- charmless [n=charmles@207.47.213.196] has quit [] 11:45:53 leppie [n=lolcow@41.244.199.242] has joined #scheme 11:46:02 HG` [n=HG@xdslej006.osnanet.de] has joined #scheme 11:48:45 -!- emma [n=em@cpe-98-14-154-71.nyc.res.rr.com] has quit ["Lost terminal"] 11:49:00 -!- HG` [n=HG@xdslej006.osnanet.de] has quit [Client Quit] 11:49:14 -!- emmy [n=em@cpe-98-14-154-71.nyc.res.rr.com] has quit [Remote closed the connection] 11:55:44 mario-goulart [n=user@67.205.85.241] has joined #scheme 11:58:12 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 11:58:42 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 11:59:14 danfowler [n=Dfowler@ip-66-9-231-226.autorev.intellispace.net] has joined #scheme 12:00:06 -!- ecraven [n=nex@140.78.42.103] has quit ["brb"] 12:02:38 -!- danfowler [n=Dfowler@ip-66-9-231-226.autorev.intellispace.net] has quit [Read error: 104 (Connection reset by peer)] 12:04:53 ecraven [n=nex@140.78.42.103] has joined #scheme 12:10:43 danfowler [n=Dfowler@ip-66-9-231-226.autorev.intellispace.net] has joined #scheme 12:12:24 HG` [n=HG@xdslej006.osnanet.de] has joined #scheme 12:15:03 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 12:22:42 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 12:28:15 -!- Fufie [n=poff@Gatekeeper.vizrt.com] has quit ["Leaving"] 12:32:18 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 12:36:57 reprore_ [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 12:37:07 -!- reprore_ [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 12:37:10 -!- ve [n=a@94-193-95-252.zone7.bethere.co.uk] has quit [Read error: 110 (Connection timed out)] 12:39:55 ve [n=a@94-193-95-252.zone7.bethere.co.uk] has joined #scheme 12:46:38 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit ["Leaving."] 12:47:05 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 12:49:35 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 12:53:52 -!- leppie [n=lolcow@41.244.199.242] has quit [Read error: 145 (Connection timed out)] 12:56:10 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 13:02:15 Nshag [i=user@Mix-Orleans-106-1-47.w193-248.abo.wanadoo.fr] has joined #scheme 13:06:52 luz [n=davids@189.122.90.116] has joined #scheme 13:10:26 leppie [n=lolcow@41.244.199.242] has joined #scheme 13:11:16 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 13:25:56 Edico [n=Edico@unaffiliated/edico] has joined #scheme 13:29:56 -!- HG` [n=HG@xdslej006.osnanet.de] has quit [Client Quit] 13:35:47 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Read error: 104 (Connection reset by peer)] 13:38:57 -!- alaricsp [n=alaricsp@relief.warhead.org.uk] has quit [Read error: 110 (Connection timed out)] 13:39:35 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 13:52:38 Fufie [n=innocent@86.80-203-225.nextgentel.com] has joined #scheme 13:54:36 -!- Fufie [n=innocent@86.80-203-225.nextgentel.com] has quit [Client Quit] 13:55:36 MrFahrenheit [n=RageOfTh@users-38-81.vinet.ba] has joined #scheme 13:55:46 annodomini [n=lambda@130.189.179.215] has joined #scheme 13:56:04 -!- leppie [n=lolcow@41.244.199.242] has quit [Remote closed the connection] 13:58:04 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 14:02:48 _Pb [n=Pb@75.131.194.186] has joined #scheme 14:03:04 Edico [n=Edico@unaffiliated/edico] has joined #scheme 14:04:58 Fufie [n=innocent@86.80-203-225.nextgentel.com] has joined #scheme 14:14:34 sphex [n=nobody@modemcable244.185-56-74.mc.videotron.ca] has joined #scheme 14:16:46 -!- _Pb [n=Pb@75.131.194.186] has quit ["Leaving"] 14:30:21 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 14:30:56 -!- sphex_ [n=nobody@modemcable244.185-56-74.mc.videotron.ca] has quit [Read error: 110 (Connection timed out)] 14:32:07 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 14:41:21 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Remote closed the connection] 14:44:05 -!- thesnowdog [i=thesnowd@114.73.162.79] has quit [Read error: 110 (Connection timed out)] 14:45:05 bweaver [n=user@75-148-111-133-Chattanooga.hfc.comcastbusiness.net] has joined #scheme 14:46:42 chandler: ping 14:47:54 minion: memo for chandler: the `begin' that you're talking about is not reasonable with the current setup -- you'd need to also add something that plays the splicing role that `begin' does now. 14:47:54 Remembered. I'll tell chandler when he/she/it next speaks. 14:49:42 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 14:52:02 why cant begin just always splice? given 'body' is always(?) an implicit begin 14:53:19 because what chandler suggests means that (begin a (begin b c) d) is not always equivalent to (begin a b c d) 14:53:56 I dont know what he said 14:54:13 See his resent email. 14:54:22 on the list? 14:54:25 Yes. 14:54:32 s/resent/recent/ 14:55:58 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 14:56:00 R6RS list? and a hint for the topic please 14:56:17 Sveklo1 [n=sveklo1@a88-115-8-123.elisa-laajakaista.fi] has joined #scheme 15:01:35 -!- mario-goulart [n=user@67.205.85.241] has quit [Remote closed the connection] 15:02:58 leppie|work: http://lists.r6rs.org/pipermail/r6rs-discuss/2009-September/005369.html 15:06:01 ta eli 15:06:28 ok, people just use weird names on irc! 15:08:28 leppie|work: Yeah, but chandler keeps an informative /whois 15:11:34 i dont follow the conversation, actually I dont find anything wrong with begin, so it does not really concern me (bigger fish to fry for me) 15:13:16 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Remote closed the connection] 15:15:40 leppie [n=lolcow@41.244.199.242] has joined #scheme 15:21:41 ski_ [n=md9slj@remote1.student.chalmers.se] has joined #scheme 15:26:59 -!- offby1` is now known as offby1 15:27:43 sstrickl [n=sstrickl@129.10.112.116] has joined #scheme 15:31:02 -!- copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has quit [] 15:32:49 eli: Yo. 15:32:49 chandler, memo from eli: the `begin' that you're talking about is not reasonable with the current setup -- you'd need to also add something that plays the splicing role that `begin' does now. 15:33:13 metasyntax [n=taylor@75-149-208-121-Illinois.hfc.comcastbusiness.net] has joined #scheme 15:33:45 eli: No, I don't think I'm suggesting that. What I am suggesting is that (begin a b c d) at the REPL top level is not equal to entering each of `a' `b' `c' `d' individually. 15:35:10 Of course it's not. 15:35:44 Riastradh: In Andre's world, it is - and this property is (apparently) paramount over all other concerns. 15:36:00 As a beginner, this is highly non-obvious. 15:36:42 As a beginner, you probably won't be defining many macros interactively at the REPL, TimMc. 15:36:48 Then again, I *have* seen some weird differences in behavior between top-level and other (begin ...) 15:37:09 Riastradh: Fair enough. 15:38:10 And that's what this issue is really about, if my telepathy correctly informs me about the discussion in which I had no part. 15:39:25 (There is another very tiny issue, of whether the compiler will open-code calls to primitives that you have not yet shadowed, but later plan to shadow, at the REPL. By default, the compiler shouldn't do this at the REPL (although it is welcome to in modules) -- but in, say, Scheme48, you can ask for it to happen by typing `,set inline-values'.) 15:41:55 -!- leppie [n=lolcow@41.244.199.242] has quit [Read error: 145 (Connection timed out)] 15:43:20 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 15:46:37 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 15:47:03 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 15:47:26 Sveklo1_ [n=sveklo1@a88-115-8-123.elisa-laajakaista.fi] has joined #scheme 15:48:20 -!- Sveklo1 [n=sveklo1@a88-115-8-123.elisa-laajakaista.fi] has quit [Read error: 104 (Connection reset by peer)] 15:48:46 -!- ASau [n=user@host184-230-msk.microtest.ru] has quit ["off"] 15:48:56 Dark-Star [i=Darkstar@p57B563E5.dip.t-dialin.net] has joined #scheme 15:53:06 -!- mmc [n=mima@192.100.124.219] has quit [Remote closed the connection] 15:56:31 is it just me, or does ypsilon scheme's code look remarkably clean 15:56:43 nope, it is 15:56:59 it compiles even on MSVC 15:57:04 even in CLR mode 15:57:17 -!- hiyuh [n=hiyuh@KD124214245222.ppp-bb.dion.ne.jp] has quit ["|_ e /\ \/ i |/| G"] 15:57:36 oh, I was talking about the C++ stuff :) 15:57:46 leppie: neat. as purely managed code even? 15:58:03 the c++ part of ypsilon rightt? 15:58:11 not purely, about 20% is still compiled natively 15:58:30 yes lowlycoder 15:58:39 what are the downsides fo ypsilon? 15:58:41 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from services.] 15:58:50 sladegen [n=nemo@unaffiliated/sladegen] has joined #scheme 15:58:54 it looks kinda too good to be true ; almost real time gc, readable implementation, ... 15:58:57 compiled natively, or compiled to unsafe code or whatever it's called? 15:59:02 lowlycoder: it's not very fast 15:59:27 it looks great on those benchmarks on the wiki 15:59:42 IIRC the benchmarks conveniently skipped the native-compiling and JIT implementations 15:59:58 it compiles as a mixed mode dll, meaning some natively compiled sections exists 16:00:02 ah 16:00:10 ah, i do recall not seeing gambit on the benchmarks 16:00:18 but that is propriety MS stuff :( 16:00:28 thesnowdog [i=thesnowd@114.73.23.227] has joined #scheme 16:00:35 hiyuh [n=hiyuh@124.214.245.222] has joined #scheme 16:00:37 it's a pity, as it makes life very easy if you need to mix C/C++ with the CLR 16:00:54 eg for speed 16:01:02 lowlycoder: I was thinking more of R6RS implementations 16:01:11 oh, like ikarus? 16:01:16 Ikarus, Larceny, PLT 16:01:17 you can even decorate on method level I think 16:01:39 I seem to recall seeing some R6RS benchmarks that did compare it against those, but I don't remember where. 16:01:40 chandler: you should know by now IronScheme is the slowest R6RS 16:01:48 rae r6rs schemes in general faaster than r5rs since there's more implementation knowledge, or slowser due to new requirements? 16:02:16 I don't think any such comparisons can be drawn on the basis of the supported standards 16:02:20 Where is Ypsilon's compiler? I can't find it anywhere obvious in its source tree. 16:02:35 it's an interpreter Riastradh 16:03:09 but it does do some 'JIT'/unrolling stuff IIRC 16:03:39 Ah: http://www.ccs.neu.edu/home/will/Twobit/benchmarksGenuineR6Linux.html 16:03:40 *gnomon* hears the distant echo of Riastradh's epic facepalm 16:03:53 Where's its macro expander, then? 16:04:04 That counts as a compiler. 16:04:15 chandler: thanks 16:04:20 probably in those .cpp files :p 16:05:13 Riastradh: look in heap/boot/macro I think. 16:05:22 okay, so ypsilon is slower by a factor of 10 on mnost of them ... why does it dominate on read2, read3, and bibfreq? 16:05:25 Aha! 16:05:37 *offby1* flinches 16:05:51 Gosh, Ikarus is pretty spanktastic on those benchmarks, chandler. 16:06:15 in heap/boot/ Riastradh 16:06:38 err oops :p 16:06:52 lowlycoder: If you look at the descriptions of the benchmarks, you might see why. 16:07:33 lowlycoder: Actually, it's read1, read2, and read3 that it performs well on. 16:07:43 The benchmark name is above the result.s 16:07:56 tReads nboyer.sch 2500 times using Latin-1 transcoding. 16:08:04 Ah; those would be the benchmarks where Ypsilon can leverage the strengths of its implementation language. 16:08:06 this doesn't ecplain why interpreted beats compiled 16:08:21 Because what's being tested is all native code in Ypsilon, I'd guess. 16:08:23 oh, it's using C++ functions? 16:08:37 Good grief! The reader is written in C++? 16:08:44 -!- sphex [n=nobody@modemcable244.185-56-74.mc.videotron.ca] has quit [Read error: 110 (Connection timed out)] 16:09:12 Well, sure! What else could it be? 16:09:13 *gnomon* coughs 16:09:41 Mosh is rather fast too 16:09:46 jlongster [n=user@c-68-59-187-95.hsd1.tn.comcast.net] has joined #scheme 16:10:16 Riastradh: As are the transcoders, which are also stressed in this benchmark. 16:11:56 sphex [n=nobody@modemcable232.140-82-70.mc.videotron.ca] has joined #scheme 16:13:05 lowlycoder: In any event, if you aren't terribly concerned about performance, I wouldn't let it dictate your choice of implementation. 16:14:16 chandler: I actually lied earlier, there is one slower R6RS, CommonLarceny 16:14:58 jonrafkind [n=jon@crystalis.cs.utah.edu] has joined #scheme 16:15:06 I wonder how well a bytecode interpreter written in managed C++ would perform. 16:15:34 managed C++ is slow 16:15:36 Managed C++? 16:15:56 you can do the same in C# 16:16:24 Riastradh: it is 'managed' (iow CLR) extensions to the MS VC compiler 16:16:36 ? 16:17:02 Riastradh: a dialect of C++ which enforces greater type safety and provides garbage collected objects, that can be compiled to pure CLR bytecode. 16:17:05 Egads, am I reading this right? Does Ypsilon default to UCS-4 as its internal string encoding format? 16:17:14 I understand the words `manage' and `extension', and I have a rough idea of what `the MS VC compiler' and `CLR' are, but that doesn't help me to understand the meaning of your sentence. 16:17:18 so instead of compiling C++ to native code, it compiles it to CLR bytecode 16:17:22 gnomon, yes, as the R6RS basically requires. 16:18:07 wihich in turn can run on .NET 16:18:10 gnomon: Why is that an "egads"? I think we're past the point where we can sensibly expect one-byte-per-"character" memory usage. 16:18:20 which is suppose to make stuff safer and slower 16:18:39 and to provide direct integration with code written in other CLR languages 16:18:43 I see. 16:18:52 What does the word `managed' have to do with it? 16:19:11 and it is directly callable by other CLR languages 16:19:23 `Managed' is Microsoft's term for pure-CLR bytecode. 16:19:26 Why isn't it just called `C++ on CLR' or something? 16:19:36 I dont really now, maybe managed memory management? 16:19:40 What does the word `managed' have to do with the CLR at all? 16:19:44 The CLR allows this to be mixed with unsafe code, for which I think the term is "unmanaged extensions". 16:20:22 I think it has to do with the verifiability of code 16:20:23 Riastradh: Purely managed code can be sandboxed. Mixed code can't be, since it calls out to native code or does non-type-safe thing. 16:20:26 *things. 16:21:28 In any event, this is all Microsoft's terminology. I disclaim responsibility for the sensibility of these terms. 16:22:11 Riastradh: the CLR spec is an interesting read 16:22:38 When Microsoft ceases to be associated with the CLR, maybe I'll be inclined to read it. 16:25:30 http://www.ecma-international.org/publications/standards/Ecma-335.htm <-- the recent addition of the patent statement might change your mind 16:25:36 chandler: performance is funny; i'm writing a 30fps game ... but yspeilon seems to yhave no problem with it's pinball games 16:26:01 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit [Remote closed the connection] 16:27:34 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 16:28:13 lowlycoder: I don't know anything about how they write those games. Are they purely Scheme? What are the performance demands of the application? 16:29:01 i suspect the highly configurable parts ink scheme; the highly intensive parts in c++ 16:29:13 i wish they had better documentation on ffi 16:29:20 it appears their only documentation is the souce coder 16:33:01 -!- Dark-Star [i=Darkstar@p57B563E5.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 16:34:10 lowlycoder: You might be interested in this game written almost entirely in Gambit: http://www.gamerizon.com/ 16:34:43 i had problems with gambit gc 16:34:45 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 16:34:47 not sure how these guys avoikded it 16:34:57 30ms is not too long if you have pauses 16:35:25 -!- Sveklo1_ [n=sveklo1@a88-115-8-123.elisa-laajakaista.fi] has quit ["Leaving..."] 16:39:39 lowlycoder: http://www.reddit.com/r/programming/comments/9ad60/another_realworld_use_of_scheme_quantz_a_newly/c0c073b 16:39:42 -rudybot_:#scheme- http://tinyurl.com/q27jyo 16:41:16 p1dzkl: interesting; thanks :-) 16:45:29 -!- attila_lendvai [n=ati@apn-94-44-10-244.vodafone.hu] has quit ["..."] 16:58:55 -!- jonrafkind [n=jon@crystalis.cs.utah.edu] has quit [No route to host] 16:59:14 jonrafkind [n=jon@eng-5-9.hotspot.utah.edu] has joined #scheme 17:07:26 mario-goulart [n=user@67.205.85.241] has joined #scheme 17:14:46 gmh33 [n=gmh33@pool-71-166-14-120.bltmmd.east.verizon.net] has joined #scheme 17:20:17 incubot: may the quantz be with you 17:20:21 ruby is just lisp with ugly syntax :P 17:21:01 copumpkin [n=pumpkin@dhcp-212-249.cs.dartmouth.edu] has joined #scheme 17:21:35 oh, is that a yome project? neat 17:23:22 -!- jonrafkind [n=jon@eng-5-9.hotspot.utah.edu] has quit [Success] 17:24:49 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 17:26:15 ASau [n=user@83.69.240.52] has joined #scheme 17:27:36 mrsolo [n=mrsolo@nat/yahoo/x-eqguxdknkslplbpk] has joined #scheme 17:28:02 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 17:31:18 -!- ve [n=a@94-193-95-252.zone7.bethere.co.uk] has quit [Read error: 113 (No route to host)] 17:32:04 -!- mreggen [n=mreggen@cm-84.215.28.167.getinternet.no] has quit ["leaving"] 17:35:41 sylecn [n=sylecn@wireless-128-62-222-166.public.utexas.edu] has joined #scheme 17:37:53 antoszka [n=antoszka@unaffiliated/antoszka] has joined #scheme 17:40:37 -!- sylecn [n=sylecn@wireless-128-62-222-166.public.utexas.edu] has quit ["Leaving"] 17:47:47 Well, I'm baffled. 17:48:03 When Scheme48 switches threads, how/where does it restore the proposal of the thread to which it is switching? I can't find this! 17:48:20 Oh, never mind. 17:48:47 It happens in scheme/vm/interp/interrupt.scm's S48-POP-INTERRUPT-STATE. 17:49:26 But that means that RELINQUISH-TIMESLICE must be doing the wrong thing. 17:58:22 jonrafkind [n=jon@crystalis.cs.utah.edu] has joined #scheme 18:00:00 -!- copumpkin [n=pumpkin@dhcp-212-249.cs.dartmouth.edu] has quit [] 18:04:17 mmc [n=mima@cs137104.pp.htv.fi] has joined #scheme 18:08:08 Summermute [n=scott@c-68-34-67-216.hsd1.dc.comcast.net] has joined #scheme 18:12:56 mickn [n=mickn@69-165-160-149.dsl.teksavvy.com] has joined #scheme 18:13:49 Wondering - In PLTs "Typed Scheme", how does one write a function type annotation for a function with keyword arguments? There are no examples provided in the docs that I can see. Odd. 18:15:53 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 18:16:44 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 18:17:21 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [Client Quit] 18:18:42 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 18:19:31 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 18:22:02 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 18:27:43 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 18:29:07 -!- MrFahrenheit [n=RageOfTh@users-38-81.vinet.ba] has quit [Read error: 104 (Connection reset by peer)] 18:29:17 MrFahrenheit [n=RageOfTh@users-38-81.vinet.ba] has joined #scheme 18:34:43 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit ["Leaving."] 18:37:19 pheze [n=pheze@modemcable026.85-56-74.mc.videotron.ca] has joined #scheme 18:42:46 -!- mickn [n=mickn@69-165-160-149.dsl.teksavvy.com] has left #scheme 18:56:43 jjjj2 [n=jon@crystalis.cs.utah.edu] has joined #scheme 18:58:15 -!- jjjj2 [n=jon@crystalis.cs.utah.edu] has quit [Client Quit] 18:58:42 samth [n=samth@punge.ccs.neu.edu] has joined #scheme 19:01:33 Fare [n=Fare@ita4fw1.itasoftware.com] has joined #scheme 19:02:22 Summermute: currently, Typed Scheme does not support defining functions with keyword arguments 19:02:35 I hope to add this capability reasonably soon, but not immediately 19:04:07 -!- leppie|work [i=52d2e3c8@gateway/web/freenode/x-vnbwuuapxxsgkabv] has quit [Ping timeout: 180 seconds] 19:06:55 copumpkin [n=pumpkin@dhcp-212-249.cs.dartmouth.edu] has joined #scheme 19:08:51 -!- ASau [n=user@83.69.240.52] has quit [Remote closed the connection] 19:08:57 That's was my guess. Too bad, really. Thanks for the info. 19:09:09 ASau [n=user@83.69.240.52] has joined #scheme 19:09:25 I'm trying to (check-equal? (macroexpand-1 '(foo bar)) ...) in a test 19:10:10 And BTW, in general, typed scheme really rocks. 19:10:11 albacker [n=eni@unaffiliated/enyx] has joined #scheme 19:10:20 (where (macroexpand-1 x) is (syntax->datum (expand-once expr)) 19:10:54 Summermute: thanks 19:10:55 but apparently, even though foo is imported by a (require ...) for expansion at compile time, it isn't for expansion at runtime 19:11:12 can a PLT module guru help? 19:11:25 jld [i=jld@kurobara.xlerb.net] has joined #scheme 19:11:45 or is there a better way to test the results of macro-expansion? 19:11:56 Of course, Fare. The call to EXPAND-ONCE happens at run-time, after all. 19:12:05 -!- jld [i=jld@kurobara.xlerb.net] has left #scheme 19:12:29 sure, but then how do I make the macro available at runtime for my unit-testing? 19:12:30 I suspect that it uses whatever is the current namespace. 19:12:38 and/or how should I unit-test my macros? 19:13:48 -!- ASau [n=user@83.69.240.52] has quit [Remote closed the connection] 19:14:04 So if FOO is defined by frob/grovel.ss, you can probably make it available to EXPAND-ONCE using (PARAMETRIZE ((CURRENT-NAMESPACE (MODULE->NAMESPACE 'FROB/GROVEL))) (EXPAND-ONCE ...)). 19:14:09 I'm currently writing a fairly complex compiler (Scala'ish type system, CPS based, compile to machine code) and planning to use Typed Scheme - so I plan to be spending alot of time with it. I imagine I'll appreciate just about any way you can enhance the language. 19:14:28 ASau [n=user@83.69.240.52] has joined #scheme 19:16:26 Riastradh, whoa. How do I determine the namespace for module macros in the current directory? (and why do you shout?) 19:17:48 I don't know; I made that up on the spot (based on the manual), but it looks plausible, and I think that you're in more of a position to discern whether it's doing the right thing for you. 19:18:26 ok apparently I can do a (string->path "/foo/bar/baz.ss") 19:18:37 Riastradh, thanks a lot 19:19:10 (but now, next problem, it wants an absolute pathname, and I need to be independent from where the code is checked out) 19:19:44 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit ["+++ killed by SIGSEGV +++"] 19:19:51 Use some sort of (CURRENT-WORKING-DIRECTORY) or something? 19:20:22 will that be bound to the directory where the file being tested is? 19:20:27 jjjj2 [n=jon@crystalis.cs.utah.edu] has joined #scheme 19:20:49 Oh, right, you want not the current directory, but the load pathname. 19:20:58 *load-pathname* isn't defined 19:21:59 -!- jjjj2 [n=jon@crystalis.cs.utah.edu] has quit [Client Quit] 19:23:03 Hmm. Perhaps the procedures described at are relevant. 19:23:17 that's what I was reading. Thanks 19:23:27 Oh, there is a CURRENT-LOAD-RELATIVE-DIRECTORY. 19:23:36 (dynamic-require-for-syntax ...) maybe? 19:24:00 well spot! 19:25:09 No, you probably don't want DYNAMIC-REQUIRE-FOR-SYNTAX: that will make the bindings provided by the module available in the environment for the syntax phase of the current namespace. 19:25:31 *Fare* next goes looking for merge-pathnames and finds build-path 19:27:03 whoa, thanks a whole lot. 19:27:09 Fare: what exactly are you trying to do 19:27:11 There's gotta be a better way, though 19:27:20 samth: unit-testing the expansion of some macros. 19:27:35 how do you usually do that? 19:27:39 Perhaps DYNAMIC-REQUIRE is preferable to MODULE->NAMESPACE, if you just want to test the provided macros as users would use them: the latter will probably give you all the internal bindings. 19:27:54 generally that's pretty hard, since there's no easy way to check the bindings 19:28:02 "check the bindings"? 19:28:17 check that the `let' you expand into is the right `let' 19:28:18 etc 19:28:29 I just want to expand-once the macro in a context where I did the alpha-conversion manually 19:28:41 if it's the wrong let, I'll notice. 19:28:47 what do you mean, did the alpha manually? 19:29:02 I pass arguments that don't have name clashes 19:29:10 ah, ok 19:29:27 and otherwise trust the hygiene 19:29:38 usually i test macros by running the code, and seeing that it behaves correctly 19:29:42 under the theory that some testing is better than no testing. 19:29:51 but if you want to use expand, it should be pretty easy 19:30:17 you just need to set up an appropriate namespace, and run `expand' with that as a the current namespace 19:30:30 well, under the "write the tests first" theory, I first write the test for the macro expansion. 19:30:38 Then I write the expanded macro 19:30:47 then I use that as a test for the macro 19:30:53 then I write the macro. 19:31:19 hmm 19:31:43 I would have thought that this was the HtDP way of writing things recommended by matthias 19:31:57 to set up the namespace appropriately, you probably want to use `define-namespace-anchor' 19:32:01 does matthias not believe in HtDP and not teach you to do that? I'm incensed! 19:32:03 that's usually the easiest way 19:32:13 no, matthias does believe in htdp, and so do i 19:32:29 but i don't think HTDP says anything about the output of macro expansion :) 19:32:48 well, HtDP sucks then. I'm back to SICP. :) 19:33:19 langmartin [n=user@exeuntcha.tva.gov] has joined #scheme 19:34:19 whoa, after a cursory look at docs.plt-scheme.org I have no idea how to use define-namespace-anchor. I guess I have reading to do. Do you have examples somewhere? 19:34:46 *Fare* is trying to train ebzzry to use the HtDP method, and train myself too along the way. 19:36:07 roughly, you define a namespace anchor in a file 19:36:25 and reuse it in another file? 19:36:26 then you create a namespace from that anchor with `namespace-anchor->namespace' 19:36:50 then using `eval' or `expand' in that namespace is like the code was in that file/module 19:36:57 btw, is there a way to get introspection at the MzScheme or DrScheme REPL, to tell me where the hell it believes a given identifier comes from? 19:37:20 samth: what if said form defines stuff? 19:37:20 try (identifier-binding #'crazy-identifier) 19:37:32 which form? 19:38:06 ok, my hardware is currently misbehaving 19:38:09 i'll be right back 19:38:13 -!- samth [n=samth@punge.ccs.neu.edu] has quit ["Ex-Chat"] 19:38:17 (eval '(define foo bar) namespace) 19:40:19 samth [n=samth@129.10.112.119] has joined #scheme 19:44:10 dysinger [n=dysinger@c-24-18-234-48.hsd1.wa.comcast.net] has joined #scheme 19:45:20 -!- samth [n=samth@129.10.112.119] has quit [Read error: 131 (Connection reset by peer)] 19:55:25 -!- MrFahrenheit [n=RageOfTh@users-38-81.vinet.ba] has quit [Read error: 104 (Connection reset by peer)] 19:55:40 MrFahrenheit [n=RageOfTh@users-38-81.vinet.ba] has joined #scheme 19:59:38 -!- albacker [n=eni@unaffiliated/enyx] has quit ["Leaving"] 20:04:17 _ryanc_ [n=ryanc@129.10.110.209] has joined #scheme 20:04:40 deadowl [n=deadowl_@132.198.36.233] has joined #scheme 20:04:52 anyone know where I should go to find info on linked list algorithms? 20:09:01 Can you be any more specific, deadowl? Most algorithms involving lists aren't very interesting on their own... 20:09:24 -!- saccade_ [n=saccade@65-78-24-131.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit ["This computer has gone to sleep"] 20:10:21 deadowl, Google and Wikipedia can help you 20:15:21 dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has joined #scheme 20:16:42 hey all; PLT web server question. I want to dump the default configuration-table struct. Is there a function that returns it? 20:18:26 -!- pheze [n=pheze@modemcable026.85-56-74.mc.videotron.ca] has quit ["leaving"] 20:23:09 -!- _ryanc_ [n=ryanc@129.10.110.209] has quit [Remote closed the connection] 20:33:21 albacker [n=eni@unaffiliated/enyx] has joined #scheme 20:33:36 -!- deadowl [n=deadowl_@132.198.36.233] has quit [Read error: 110 (Connection timed out)] 20:40:19 kilimanjaro [n=kilimanj@70.116.95.163] has joined #scheme 20:40:23 -!- mmc [n=mima@cs137104.pp.htv.fi] has quit [Read error: 110 (Connection timed out)] 20:47:51 aha, there it is. All this time I was misreading the docs--I thought that default-configuration-table-path was a func that returned the path, but actually it's just a constant path object. 20:51:19 rdd` [n=user@c83-250-145-223.bredband.comhem.se] has joined #scheme 20:51:53 -!- albacker [n=eni@unaffiliated/enyx] has quit ["."] 20:55:34 -!- lowlycoder [n=x@unaffiliated/lowlycoder] has quit ["leaving"] 20:57:48 -!- sstrickl [n=sstrickl@129.10.112.116] has quit [] 21:02:55 -!- Fare [n=Fare@ita4fw1.itasoftware.com] has quit ["Leaving"] 21:06:57 masm1 [n=masm@bl8-56-138.dsl.telepac.pt] has joined #scheme 21:08:53 -!- masm [n=masm@bl9-113-62.dsl.telepac.pt] has quit [Read error: 60 (Operation timed out)] 21:10:52 -!- langmartin [n=user@exeuntcha.tva.gov] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 21:14:06 sstrickl [n=sstrickl@dublin.ccs.neu.edu] has joined #scheme 21:14:32 -!- mario-goulart [n=user@67.205.85.241] has quit [Remote closed the connection] 21:15:46 sepult [n=levgue@87.78.103.239] has joined #scheme 21:27:38 -!- apgwoz [n=apgwoz@216.156.136.2.ptr.us.xo.net] has quit [Remote closed the connection] 21:34:18 mreggen [n=mreggen@cm-84.215.28.167.getinternet.no] has joined #scheme 21:37:16 untouchable [i=un@dhcp-129-64-166-32.dorm.brandeis.edu] has joined #scheme 21:38:11 ive just got a quick question as im trying to learn scheme, i keep getting the error "!#unspecified" when i try to run a recursive func i wrote 21:38:41 ive been able to figure out that it is something with the call or my cond statement but i cant figure out hwo to fix it 21:38:56 lisppaste: url 21:38:56 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 21:39:53 untouchable: Paste your code on that web page. I'll take a look at it. 21:40:24 untouchable pasted "takesteps function" at http://paste.lisp.org/display/87133 21:40:32 there 21:40:43 oh i forgot to take out the null part 21:40:52 i know that wont work just had it in there as a note 21:40:57 (begin (display ...) ...) 21:41:16 untouchable: So, the first thing I notice is that you have ((display x) ...) 21:41:26 yeah 21:41:37 That displays the value of x and then evaluates to (# ...) 21:41:42 rudybot_: eval ((display 'foo) (display 'bar)) 21:41:43 sladegen: your sandbox is ready 21:41:43 sladegen: error: procedure application: expected procedure, given: #; arguments were: # 21:41:51 rudybot_: eval (begin (display 'foo) (display 'bar)) 21:41:51 sladegen: ; stdout: "foobarfoobar" 21:42:03 So then it tries to call # as a function! 21:42:28 untouchable: As sladegen suggested, use (begin ...) to sequence expressions. 21:43:03 okay 21:43:07 ill triac 21:43:20 sorry ive only been playing with scheme for about 2 weeks on and off 21:43:31 untouchable: In general, a left-paren means "call a function". 21:43:47 ahh 21:44:02 and then when the right-paren for begin closes, it stops with the display? 21:44:26 untouchable: Not sure what that question meant. 21:44:37 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 21:45:12 haha idk ill just try it and then probably understand 21:45:21 you could just do (display x) (display " ") (cond ...) as there is implicit "begin" inside define. 21:45:22 also going to read up on this begin stuff 21:45:24 untouchable: (begin (foo 1) (bar 7 'a) (baz "quux")) calls (foo 1), then (bar 7 'a), then (baz "quux") and evaluates to the value of that last one. 21:46:02 r5rs begin 21:46:03 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_idx_136 21:46:05 -rudybot_:#scheme- http://tinyurl.com/w4m4a 21:46:33 untouchable: there is also a "begin0" which works just like begin, except it returns the result of the first expression instead of the last. 21:47:06 useful for doing an operation, then doing cleanup / error handling / whatever, then returning the value. 21:47:26 s/value/result of the operation/ 21:47:26 dstorrs: That's a construct I really miss in Java. 21:48:18 speaking of constructs that I miss...is there a way to make a value that is false in boolean context, but is a string in a string context? 21:48:29 (I'm using the word 'context' in a Perl sense.) 21:50:14 could sort of do it with exceptions, but that's a bigger hammer than I was looking for. 21:50:21 dstorrs: What is ""context" in a Perl sense" in a Scheme sense? 21:50:26 oh im an idiot 21:50:38 well i got that working 21:50:50 untouchable: Not an idiot, a beginner! :-P 21:51:08 so all i had to do was take out that first left-paren after the (TAKESTEPS x) part and it worked fine 21:51:14 and the matching right-paren 21:51:26 untouchable: Yup. 21:51:28 or i couldve put a (begin ...) block in there? 21:51:33 and left the parens 21:51:35 TimMc: e.g: (foo) returns some value. I would like to be able to write: (let ((x (foo))) (if (not x) (display x))) 21:51:36 That would have worked as well. 21:51:48 ahh, thanks for the help 21:51:57 wish the book had mentioned that stuff 21:52:07 and it would print a useful string that described the exact problem. 21:52:38 scheme is different then other langs ive done but its nice so far 21:52:41 untouchable: I would guess that sequencing is not discussed until the material side effects. 21:52:47 *material on 21:53:27 its in the chapter about modularity, objects and state 21:53:59 are there any major differences between mit-scheme and plt-scheme besides syntax things like print/display 21:58:25 brb 22:00:04 -!- bohanlon [n=bohanlon@pool-71-184-223-212.bstnma.fios.verizon.net] has quit ["leaving"] 22:03:59 untouchable: Absolutely, there are quite a few differences. 22:04:38 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 22:04:53 I don't know MIT Scheme at all, but I do know that PLT does some things... uniquely. 22:06:42 -!- linas [n=linas@gnucash.org] has quit [Read error: 110 (Connection timed out)] 22:07:44 arcfide [i=1000@140-182-147-167.dhcp-bl.indiana.edu] has joined #scheme 22:07:59 -!- jlongster [n=user@c-68-59-187-95.hsd1.tn.comcast.net] has quit [Read error: 113 (No route to host)] 22:08:22 ve [n=a@94-193-95-252.zone7.bethere.co.uk] has joined #scheme 22:11:48 -!- hotblack23 [n=jh@p5B054008.dip.t-dialin.net] has quit ["Leaving."] 22:13:00 -!- untouchable [i=un@dhcp-129-64-166-32.dorm.brandeis.edu] has quit ["( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )"] 22:18:49 linas [n=linas@gnucash.org] has joined #scheme 22:18:51 untouchable [i=un@129.64.166.32] has joined #scheme 22:20:55 which RnRS introduced the requirement that the empty list must be quoted? 22:24:40 -!- rotty_ is now known as rotty 22:25:05 It was before R3RS at least. 22:25:18 I can't seem to find a copy of R2RS off-hand. 22:29:43 -!- sepult [n=levgue@87.78.103.239] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 22:32:26 -!- untouchable [i=un@129.64.166.32] has quit ["( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )"] 22:33:33 -!- rdd` [n=user@c83-250-145-223.bredband.comhem.se] has quit [Read error: 104 (Connection reset by peer)] 22:46:42 -!- danfowler [n=Dfowler@ip-66-9-231-226.autorev.intellispace.net] has quit [Read error: 104 (Connection reset by peer)] 22:48:04 chandler, try calling it the `RRRS' instead. 22:53:21 -!- jonrafkind [n=jon@crystalis.cs.utah.edu] has quit [Read error: 113 (No route to host)] 22:55:39 We need a new scheme standard that uses tetration instead of exponentiation 23:00:48 -!- sstrickl [n=sstrickl@dublin.ccs.neu.edu] has quit [] 23:03:50 -!- saccade [n=saccade_@COMBINATOR.MIT.EDU] has quit ["Leaving"] 23:04:48 saccade [n=saccade@dhcp-18-188-74-28.dyn.mit.edu] has joined #scheme 23:06:57 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 23:07:20 Am I the only one who believes changing top-level, library, and internal bodies to all have traditional REPL semantics is a BAD thing? 23:07:27 Maybe I am not following the discussion. 23:07:37 It seems that many people suggest this. 23:08:10 I can see a desire to have the REPL behave like the rest of them, but changing the rest of them to a more restrictive REPL form seems a little strange to me. 23:10:14 copumpkin: It's not exponentiation to begin with, it's function iteration. 23:10:54 (Revised (Revised 'Report-on-Scheme)) 23:11:52 -!- bweaver [n=user@75-148-111-133-Chattanooga.hfc.comcastbusiness.net] has quit [Read error: 113 (No route to host)] 23:11:55 "exponentiation" of the composition operator? :) 23:13:33 -!- saccade [n=saccade@dhcp-18-188-74-28.dyn.mit.edu] has quit ["This computer has gone to sleep"] 23:14:08 saccade [n=saccade_@COMBINATOR.MIT.EDU] has joined #scheme 23:14:14 -!- lisppaste [n=lisppast@common-lisp.net] has quit ["Want lisppaste in your channel? Email lisppaste-requests AT common-lisp.net."] 23:14:18 lisppaste [n=lisppast@common-lisp.net] has joined #scheme 23:15:19 saccade_ [n=saccade@18.188.74.28] has joined #scheme 23:16:10 It's a little silly to use the name and syntax of exponentiation to refer to that multiple composition pattern, since it is used to define *all* the hyper operators. 23:17:03 (iterate add1 7) ; => +7 23:17:47 *copumpkin* sees nothing wrong with it :) 23:18:12 :-P 23:18:38 seems like you can have exponentiation with natural exponents on any monoid 23:19:02 or a semigroup if you don't care about ^0, I guess 23:19:06 TimMc: It's not function composition, it's string concatenation, and the exponentiation is string exponentiation. 23:19:41 arcfide: Bleh, I think you're right. 23:19:47 -!- kilimanjaro [n=kilimanj@70.116.95.163] has quit ["Leaving"] 23:20:18 copumpkin: Don't you get all Haskelly on me! 23:20:34 monoids are from algebra, not from haskell :) 23:20:49 I actually wish haskell had more algebra in it! 23:21:23 (or from CT, but if I said that I'd get kicked from here) 23:21:46 Connecticut? 23:21:51 ...yes ;) 23:24:07 Hezy [n=hezy@62.56.254.219] has joined #scheme 23:24:23 untouchable [i=un@dhcp-129-64-166-32.dorm.brandeis.edu] has joined #scheme 23:24:37 -!- Hezy [n=hezy@62.56.254.219] has left #scheme 23:26:58 whats the best way to increment a variable and have it stay 23:27:09 have it stay? 23:27:15 i mean 23:27:28 say f = 10 23:27:31 (+ 1 f) 23:27:36 but then have f = 11 23:27:47 dmoerner [n=dmr@89-151.res.pomona.edu] has joined #scheme 23:27:50 do i just redefine it? 23:28:00 (define (+ f 1)) 23:28:12 Gah, not more defmacro lovers! 23:28:15 :o 23:28:47 defmacro? 23:29:23 now now, people's macrosexual preferences should not be judged, lest ye yourself be judged 23:30:18 untouchable: are you sure you need that? 23:30:39 haha well i guess not 23:30:58 i just have to keep count of something and i figured the best way would just increment a var 23:31:07 but that may not be as easy said as done in scheme 23:31:15 yeah, but that's awfully imperative, don't you think? :) 23:31:21 zbigniew: Judge me all you want on my use of SYNTAX-CASE, but please, keep your kinkiness in private! 23:31:23 it's certainly easily done 23:31:37 *copumpkin* isn't an expert, but remembers using something like set! for that purpose 23:31:44 many many moons ago 23:32:00 arcfide: your baroque fetishes are of no interest to me 23:32:15 yeah i was just reading about set 23:32:26 since i figured that sounded close 23:32:57 I'm not really sure what's considered good style in scheme, but I'd guess it's best to avoid things like set! if you can 23:33:44 hmm well i have a recursive func that i need to track the number of cycles with 23:33:47 untouchable: You *could* use set! or define, but I'll bet you 3 bytes that you don't need to use mutation. 23:34:09 untouchable: pass the value around when you recurse? 23:34:12 i'll up that bet to a DWORD 23:34:25 not an option sadly 23:34:30 but thats what i did at first 23:34:30 untouchable: why not? 23:34:42 and TimMc, theres always a better way :P 23:34:50 *TimMc* just remembered that a "bit" is an eighth of a dollar... 23:35:04 MononcQc [n=mononcqc@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 23:35:39 zbigniew: You're incomprehensible obsession with CAR and CDR offend me. 23:35:51 copumpkin, its part of an assignment and it can only take 1 arg 23:35:58 s/offend/offends 23:36:13 even if set! isnt right, thats what i was gonna do to start with 23:36:20 minion: thwap to arcfide 23:36:20 arcfide: have a look at thwap: THWAP! http://www.angryflower.com/bobsqu.gif and http://www.angryflower.com/itsits.gif (see also: http://www.unmutual.info/misc/sb_itsits.mp3 ) 23:36:22 and would rather have it by my answer then someone elses 23:36:33 but im curious what you would do 23:36:37 chandler: Are you around? 23:36:49 untouchable: Perhaps what you want is a helper function that can do the real work, and carry the counter argument around. 23:37:20 yeah thats a good idea 23:37:52 but ima go with my answer for now 23:37:59 and see how it turns out 23:38:25 untouchable: I really would avoid set! if you can... the helper function that takes two arguments is a pretty common solution 23:39:31 would scheme differentiate between 2 funcs with the same name but diff #s of args like java does? 23:39:37 or would i need diff names? 23:40:25 -!- masm1 [n=masm@bl8-56-138.dsl.telepac.pt] has quit ["Leaving."] 23:41:31 untouchable: Scheme doesn't dispatch that way. 23:41:41 untouchable: "generic functions" is the scheme equivalent to that sort of overloading. But there's also case-lambda, if it's just the number that differs... 23:46:30 TimMc, composition satisfies enough properties of multiplication, and turns up as a form of multiplication in enough contexts, to reasonably well justify the notation. E.g., composition of linear maps is `isomorphic' to multiplication of matrices -- in other words, considering linear maps between finite-dimensional vector spaces, if [T] is the matrix of T with respect to some basis, then for linear maps T and U, [T o U] = [T] * [ 23:46:54 Riastradh: you got truncated at [T] * [ 23:47:04 [T o U] = [T] * [U]. 23:47:52 -!- MrFahrenheit [n=RageOfTh@users-38-81.vinet.ba] has quit [Read error: 110 (Connection timed out)] 23:48:56 gotta run :) 23:49:05 -!- copumpkin [n=pumpkin@dhcp-212-249.cs.dartmouth.edu] has quit ["Leaving..."] 23:57:12 arcfide: but seriously, pattern matching is not a prerequisite for hygiene 23:59:08 zbigniew: Indeed not. 23:59:32 But all the useful macro systems that I have seen rely on DEFINE-SYNTAX. 23:59:44 `Rely on DEFINE-SYNTAX'? 23:59:52 Riastradh: Okay, i should clarify. 23:59:58 They don't lose information like DEFMACRO does.