00:15 (quit) Fare: Ping timeout: 265 seconds 00:19 (quit) speps: Quit: WeeChat 0.3.3 00:31 (join) Fare 00:47 PascalHunger: Fare: Just many more implementations then most langs etc 01:06 (join) vu3rdd 01:09 (quit) grasshops: Quit: This computer has gone to sleep 01:42 (join) rbarraud 01:47 (quit) Fare: Quit: Leaving 01:56 (quit) offby1: Ping timeout: 240 seconds 02:59 (quit) jonrafkind: Ping timeout: 276 seconds 03:25 (join) dzhus 03:42 (join) masm 03:52 (join) vu3rdd` 03:58 (quit) vu3rdd: Ping timeout: 264 seconds 03:58 (quit) vu3rdd`: Remote host closed the connection 04:07 PascalHunger: why does scheme get left out alot of business use? 04:07 PascalHunger: More in the academic field? 05:30 (join) Lajla 05:35 (join) vu3rdd 06:02 (quit) rbarraud: Remote host closed the connection 06:34 (join) anachreon 06:34 anachreon: hiya 06:34 anachreon: following up from yesterday 06:35 anachreon: a: i am not looking for this as a 'support' channel (yes i do read the irc logs) 06:35 anachreon: b: the questions asked were not answered in a ny faq or searching the list logs 06:36 anachreon: c: frustration from inexperience? unqualified value judgement 06:37 anachreon: so, can anyone answer the question: can it create a stadalone exceutable (all dependencies taken care of). i've read a little on raco, but don't know how this applied to OS X and linux 06:38 anachreon: and: can the executables be used in a commercial environment (ie: sell the executable) 06:45 anachreon: nobody 'jumping in' to 'help'? 06:47 (quit) anachreon: 07:01 bremner: heh. He reads logs apparently :) 07:02 bremner: anachreon: since you read logs, here is my advice, again. Hang around for a while if you want an answer. People are not likely to answer on the off chance you read it in the logs. 07:18 Lajla: Also, anarchon, if you read this in the logs, since racket is under the GNU LGPL, it impliues that you can sell the xecutables. 07:24 bremner: well, as would the GPL. The details here are a bit subtle, because (more unqualified value judgment) the question is not completely specified, But I don't think it is fruitful for me to speculate on what the real question is. 07:27 (quit) Lajla: Ping timeout: 264 seconds 07:37 PascalHunger: is there any books on just racket itself? 07:40 bremner: afaik, not yet. 07:58 (quit) dzhus: Remote host closed the connection 08:31 (join) b-man_ 08:35 (join) palinurus 08:52 (part) palinurus 08:56 PascalHunger: bremner: bummer 09:02 (join) Lajla 09:06 bremner: maybe ask the "how to design programs" people; I seem to recall a "racket edition" was at least hypothesized 09:10 (join) jsnikeris 09:12 (join) danbrown 09:18 (quit) Lajla: Ping timeout: 276 seconds 09:22 (join) Lajla 10:18 (join) MayDaniel 10:30 (join) jsnikeri` 10:34 (quit) jsnikeris: Ping timeout: 252 seconds 10:34 samth: PascalHunger, there are no dead-tree books on Racket in particular 10:34 samth: I recommend the Guide: http://docs.racket-lang.org/guide/index.html 10:34 samth: jay-mccarthy is indeed the current maintainer of the webserver, and the author of much of its code 10:36 (join) offby1 10:57 (part) jsnikeri`: "ERC Version 5.3 (IRC client for Emacs)" 11:16 (quit) vu3rdd: Remote host closed the connection 11:43 (quit) danbrown: Quit: danbrown 11:50 (join) sstrickl 12:00 stamourv: PascalHunger: actually, there _is_ a book on racket, but it's in french 12:00 stamourv: http://www.editions-ellipses.fr/fiche_detaille.asp?identite=7515 12:01 Lajla: stamourv, it looks more as if it's about scheme, but uses DrRacket as its example implementation 12:01 stamourv: Lajla: I didn't read it, but the description talks about GUIs and networking 12:01 stamourv: which would have to be racket-specific 12:02 Lajla: Well, it only mentions racket from the last paragraph "Le logiciel utilisé est DrRacket..." 12:03 stamourv: "Il contient tout le nécessaire pour programmer en Scheme, construire des interfaces graphiques et accéder à Internet." 12:03 stamourv: "interfaces graphiques" = GUI 12:04 stamourv: "Internet" is pretty self-explanatory 12:04 Lajla: Yeah, I got that idea, but I don't know, it seems to be your native language, but to me it seems more that the thing is about scheme and just uses racket as an implementation. 12:05 stamourv: well, for the basics, scheme and racket are very close 12:05 stamourv: so if you start with scheme basics and add the racket liraries, you end up with a pretty good understanding of racket 12:06 Lajla: Yeah, I guess. 12:06 Lajla: Now hope PascalHunger has better French than I. =) 12:11 jay-mccarthy: PascalHunger: i ran the benchmark using httperf as best as it seemed manuel did 12:23 (quit) sstrickl: Quit: sstrickl 12:28 (join) sstrickl 12:34 (join) jonrafkind 12:38 (join) anRch 13:04 (quit) MayDaniel: 14:43 (quit) anRch: Quit: anRch 14:59 (quit) b-man_: Read error: Connection reset by peer 15:00 (join) mceier 15:08 clklein: Am I just missing it, or is there no way to rotate a pict in slideshow? 15:09 jay-mccarthy: the old drawing library does not support rotation well 15:09 jay-mccarthy: robby once told me to make a custom dc% that catches the draws and does the rotation there 15:09 jay-mccarthy: obvs i didn't do it :) 15:09 clklein: heh 15:10 clklein: unrotated it is then! 15:10 jay-mccarthy: i have (define diamond-key (circle 20)) in my slideshow because it was too hard to get a diamond... even though that's what my paper uses 15:12 clklein: I was about to ask, "Isn't that one triangle on top of another?" 15:12 clklein: but one is rotated, right? 15:18 samth: if there was a way to convert a 2htdp/image image to a pict, that would be great 15:19 samth: clklein, i feel like you're uniquely placed to make this sort of request :) 15:19 clklein: I was actually just going over there now :) 15:29 clklein: nobody home 15:29 clklein: That's probably good though; he probably would have suggested that I implement it. 15:30 samth: can we suggest that you implement it? :P 15:31 clklein: No, you can only trick me into being assigned the task. 15:32 clklein: And I'm on to that plan now. 15:32 samth: darn 16:04 clklein: parser-tools/lex is surprisingly pleasant to use 16:05 clklein: "surpisingly" because I'm normally convince that anything parsing-related is awful 16:05 jonrafkind: peg is nice 16:05 jay-mccarthy: i like it too 16:06 jay-mccarthy: i did this the other day: 16:06 jay-mccarthy: http://github.com/jeapostrophe/openmpi/blob/master/ffi/constants.rkt 16:06 clklein: My only surprise so far is that (* (complement #\newline)) and (* (char-complement #\newline)) are not the same 16:06 jay-mccarthy: i like making a little parser really fast 16:07 clklein: I'm sad when I can't use read and match :) 16:08 (quit) jonrafkind: Read error: Connection reset by peer 16:08 clklein: Do we have a PEG library? 16:09 (join) jonrafkind 16:09 jay-mccarthy: jon has one he keeps to himself 16:09 clklein: jonrafkind: (a PEG library) 16:09 jonrafkind: my peg parser? 16:09 jonrafkind: its on github.. 16:09 jonrafkind: http://github.com/kazzmir/Pegs 16:10 jonrafkind: its really slow though.. 16:10 FareWell: Why slow? you use bad datastructures? you don't memoize? 16:11 jonrafkind: too many lambdas 16:12 PascalHunger: jay-mccarthy: do you have any numbers from the benchmark? 16:12 FareWell: lambda-overflow. That's an interesting concept. 16:12 FareWell: And no partial-evaluating beta-expander? 16:12 jay-mccarthy: PascalHunger: I did 3.2k reqs/sec on a dynamic work load 16:13 clklein: jonrafkind: how many lambdas per second? 16:13 jonrafkind: not sure 16:13 jonrafkind: LPS 16:13 PascalHunger: jay-mccarthy: how many req/sec was php and all that again? 16:14 jay-mccarthy: hop was like 5k, php was about 4, everything else was 3-ish or under 16:14 jay-mccarthy: i'm willing to bet i could go higher with a few tricks, but for now i'm fine being competitive with the masses 16:15 jonrafkind: clklein, eli did a PEG thing as an interpreter more or less and it was a bit faster than mine 16:15 jonrafkind: i have a C++ peg generator that generates direct code and another version that makes an interpreter, the interpreter was 6x slower 16:15 jonrafkind: so i was hoping to get the direct version in scheme to be faster than the interpreted version 16:16 clklein: but your LPS was too high 16:18 jonrafkind: yea I was generating naive code that made lambd'as all over the place 16:18 jonrafkind: i have to write a smarter generator 16:18 jonrafkind: scheme.. racket.. bah 16:19 jay-mccarthy: you're a bad person 16:19 PascalHunger: jay-mccarthy: hmmmm 16:19 PascalHunger: jay-mccarthy: its like almost the web server should be left to the web server, scheme is so much faster then php. If tied to a web server I would think it could outperform all of that 16:20 jonrafkind: if someone asked you "whats the difference between racket and scheme?" what would you say? and limit your response to like 2 sentences 16:20 (join) MayDaniel 16:21 (quit) Lajla: Ping timeout: 264 seconds 16:22 PascalHunger: jonrafkind: quite a bit different....if you mean plt scheme then maybe not so much :) 16:23 jonrafkind: nothing really comes to my mind when I think of racket and scheme as programming languages 16:23 jonrafkind: racket has a much larger API for writing compilation frameworks, but you could almost claim thats a library issue 16:24 (join) blake_johnson 16:25 PascalHunger: I am still learning really, I sorta started with mit scheme and did some bigloo i am new to racket 16:25 PascalHunger: racket just seems like the most popular right now 16:27 stamourv: jonrafkind: here's my attempt: Scheme is defined as minimalist. Racket gives you the tools you need to get work done 16:27 stamourv: maybe a bit too marketing-ish 16:28 jonrafkind: i mean the difference between haskell and scheme is sort of easy. lazy, statically typed 16:28 jonrafkind: the difference between racket and scheme is.. a bunch of libraries?? 16:28 stamourv: well, we got lazy and typed too 16:29 stamourv: well, the libraries are the most immediately apparent difference, I 16:29 stamourv: 'd say 16:29 jonrafkind: but so can scheme (in theory) 16:29 jonrafkind: i mean what inherint differences are there 16:29 stamourv: immutable pairs 16:29 jonrafkind: thats a library issue 16:29 blake_johnson: the module system 16:29 stamourv: not really, RnRS specifies pairs as mutable in the core 16:29 clklein: I wouldn't consider the compilation API to be a library. 16:29 jonrafkind: i think people can make modules out of scheme macros 16:30 jonrafkind: but the compilation stuff can be made out of other macros (dybvig's psyntax) 16:30 stamourv: meh, yes, but the result may not be nice 16:30 jonrafkind: so long as the core supports hygiene 16:31 jonrafkind: certainly all this stuff is baked into racket as opposed to scheme.. 16:31 stamourv: and there's also a bunch of small things: order of evaluation is specified, where internal definitions can occur, top-level semantics, etc. 16:31 blake_johnson: what about continuation marks? 16:31 jonrafkind: its sort of like, racket is scheme with all the tools you could build in scheme, already built-in 16:32 clklein: Could the compilation framework be implemented as an R6 library to the extent necessary to support Typed Racket? 16:32 jonrafkind: well im not sure.. 16:32 stamourv: clklein: not sure, what about local-expand? 16:32 jay-mccarthy: at the most pure level the difference is continuation marks, the macro api, and the full continuation/parameter support 16:32 jay-mccarthy: to me at least 16:32 jay-mccarthy: those aren't libraries and they are really distinctive 16:33 jay-mccarthy: i don't think those things are the reasons people think they use racket 16:33 clklein: What about all the language-as-OS stuff? 16:33 stamourv: but stepping back, which 2 sentences you use to explain the difference really depends on your audience 16:33 jay-mccarthy: but the libraries and languages need those things and people come for them 16:33 jay-mccarthy: clklein: good point. that too 16:33 stamourv: application programmers won't notice most of the stuff we mentioned 16:33 jonrafkind: explain the difference between racket/scheme to a java programmer (ok, maybe impossible..) 16:34 jay-mccarthy: stamourv: they will notice typed racket and its interoperability and that comes from these things 16:34 jay-mccarthy: they will notice the web server, ditto 16:34 stamourv: then I guess the library argument (+ contracts, maybe?) is more likely to work 16:35 stamourv: jay-mccarthy: yes, but if your goal is to sell the language, talking about what they will notice at first sounds like a better plan, IMO 16:35 (join) Lajla 16:36 jay-mccarthy: sales was not jonrafkind's question to me 16:36 jonrafkind: right 16:36 jay-mccarthy: jonrafkind: if someone asked you "whats the difference between racket and scheme?" what would you say? and limit your response to like 2 sentences 16:36 jonrafkind: what technical features distinguish the two languages without getting too subtle 16:36 stamourv: ok, I understood it as being as sales question, nevermind 16:36 jay-mccarthy: if he had asked... 16:36 jay-mccarthy: f someone asked you "whats the difference between racket and python?" what would you say? and limit your response to like 2 sentences 16:36 jay-mccarthy: or 16:36 jay-mccarthy: f someone asked you "whats the difference between racket and java?" what would you say? and limit your response to like 2 sentences 16:36 stamourv: I read it as: why should I use racket over scheme 16:36 jonrafkind: paranthesis! 16:37 jay-mccarthy: then i would give a more sales answer but still talk more about core language features 16:37 jonrafkind: im trying to find reasons to think of racket as its own language, as opposed to just an extended scheme 16:38 Lajla: 'A dialect of scheme' is pretty accurate, nay? 16:38 jonrafkind: no 16:38 Lajla: Motivate. 16:38 jonrafkind: that has 0 information 16:38 jay-mccarthy: jonrafkind: is python a de-extended scheme with different syntax? 16:39 jonrafkind: well.. their closures are broken and they dont have continuations 16:39 jonrafkind: and tail-recursion is a big one 16:39 jay-mccarthy: that's what i mean by de-extended 16:39 blake_johnson: what about c and c++, are they different languages or just an extension? 16:39 clklein: jonrafkind: "just" an extended scheme is a significant point. Scheme is just an extended lambda calculus. 16:40 jonrafkind: ha, its a reasonable stretch to make 16:40 jonrafkind: the line bewteen c/c++ is fairly blury.. 16:40 bremner: not with c99 16:40 Lajla: clklein, well, some would say the call-by-value model screws that. 16:43 jonrafkind: and if racket is an extended scheme, at some point (5 years) racket2 will be an extended racket 16:43 clklein: Lajla: OK, choose an accurate name for the e ::= \x.e | e e | x CBV PL. 16:44 jonrafkind: racket is the quantum language, as soon as you define it, it changes! 16:44 Lajla: clklein, I have no idea what is supposed to be, an BNF for an expression? 16:44 jonrafkind: clklein makes redex models for breakfast 16:44 Lajla: You can never know the speed at which a racket program runs and where the control lies at the same time. 16:44 clklein: Lajla: yes 16:45 Lajla: clklein, I have no idea how to name it. names run out a lot, that's why some things get meaningless and bizarre names like 'lambda calculus' 16:45 Lajla: Let's just call it kappa calculus 16:46 clklein: Well, whatever the name is, Scheme is just an extended version of that 16:46 Lajla: clklein, I agree. 16:46 clklein: But it's extended enough that we give it a new name 16:47 Lajla: Well, racket has a different name than scheme. 16:47 Lajla: But if we can call a scheme a 'dialectof lisp' I see now objections with calling racket a dialect of scheme. 16:47 Lajla: Racket is more a superset of scheme than scheme is of the original lisp, for instance. 16:49 (quit) blake_johnson: Quit: blake_johnson 16:49 Lajla: But I don't see this fetish with classification that a lot of people have. Racket is racket, and if you call it x or y or a dialectof ALGOL isn't going to change what it is. 16:53 (join) blake_johnson 17:00 (quit) Lajla: Ping timeout: 245 seconds 17:01 (quit) MayDaniel: Read error: Connection reset by peer 17:15 samth: jonrafkind, the most significant differences are the module + macro system (which go together) and the facilities provided by the runtime (cont marks, delimited cont, custodians, eventspaces, finalizers, futures, threads, etc) 17:28 (join) danbrown 17:50 (nick) samth -> samth_away 17:54 (join) rbarraud 17:55 FareWell: Lajla: you remind me favorite explanation of static scoping: If you call a tail a leg, how many legs has a dog? Five? No! Calling a tail a leg doesn't make it a leg. - Honest "megamurderer" Abe 17:55 (join) carleastlund 17:55 (quit) jonrafkind: Read error: Connection reset by peer 17:56 (join) jonrafkind 17:57 (nick) FareWell -> Fare 18:09 (quit) blake_johnson: Quit: blake_johnson 18:14 (join) Lajla 18:27 (quit) danbrown: Quit: danbrown 18:36 (join) danbrown 19:00 stamourv: jay-mccarthy: drdr looks broken 19:05 (quit) danbrown: Quit: danbrown 19:18 (quit) mceier: Quit: leaving 19:39 (quit) sstrickl: Quit: sstrickl 19:54 jonrafkind: stamourv, did you send him an email? 19:58 (join) adadglgmut_ 20:02 (quit) adadglgmut: Ping timeout: 276 seconds 20:02 (join) adadglgmut 20:03 (quit) adadglgmut_: Ping timeout: 252 seconds 20:13 (join) adadglgmut_ 20:17 (quit) adadglgmut: Ping timeout: 272 seconds 20:23 (quit) jonrafkind: Ping timeout: 265 seconds 20:35 (quit) adadglgmut_: Ping timeout: 252 seconds 20:39 (join) jimmy_ 20:41 jimmy_: greetings! I already have a programming background, and i'm wondering if going through htdp is worth the time? Or should I start with something else? Or if I should only take a look at particular sections? 20:50 (quit) masm: Quit: Leaving. 20:51 Lajla: The answer to that quaestion will be completely dependent on the person answering it. =) 20:51 Lajla: jimmy_, what background? 20:52 jimmy_: lajlafigured, just really bad at starting topics of conversation.! 20:52 jimmy_: lakla: and accidentally hitting the enter key 20:52 jimmy_: lajla: i already have a ba in cs, so I'm not an intro student like the book purports to be targeted towards 20:53 Lajla: jimmy_, well, do you want to learn scheme/racket or do you want to learn how to design programs. 20:53 jimmy_: i am new to lisp/scheme however, and since I've felt like my education was lacking and maybe out of practice I figured I'd start with a book meant for beginners using scheme, 20:54 Lajla: SICP and HtdP more focus on programming in general and using scheme as an example though. But there is some tutorial called 'teach yourself scheme in fixnum days' floating arounmd. 20:55 jimmy_: lajla: hmm. I want to learn how to use scheme to make more interesting programs 20:55 Lajla: Problem is that is, in my opinion, should be called 'teach yourself a some-what outdated version of PLT' 20:56 Lajla: jimmy_, well, I supposed you could give both SICP and HtdP a chance then, the problem is that they explain the basics of scheme interlaced in large amounts of text that basically try to explain to you stuff you probably already know. But the level increases quite steeply. 20:56 jimmy_: lajla: so have you read either of those books yourself and judged it to have been worth your time? 20:57 jimmy_: lajla: in htdp i'm just at the point where they teach you how to make your own structures, but for me sicp distracts me with the math to the point where I feel i'm missing the point. 20:59 Lajla: jimmy_, a criticism a lot of people have, I liked sicp more but sort of gave up on both on them. I find that teaching method to not suit me, but I see why it suits most people. 21:02 jimmy_: lajla, what started all this was stumbling on the story of Lisp's use at the jet propulsion laboratory, and how the author described doing so very much with so few resources (hardware wise), and how the codebase was able to be worked on 'effortlessly' among different implementations of lisp, and how it was used to make intermediate custom compilers for things 21:02 Lajla: jimmy_, hmm, lisp or scheme? 21:03 Lajla: Some people might shoot me for this, but I think the difference between CL and scheme is as large as C and Java, similar syntax, different semantics. 21:03 Lajla: People just consider them similar I think beause their syntax is unlike anything else. 21:03 Fare: eli: linux 64-bit binaries OK? 21:03 Fare: or you want to recompile your own? 21:03 (join) sstrickl 21:04 jimmy_: lajla; the tone of liberation that the article exuded is what has motivated me to pick up lisp/scheme. (the article was on lisp, they mentioned a few different kinds over the course of the article, maclisp and harlequin come to mind) 21:04 (quit) sstrickl: Read error: Connection reset by peer 21:05 Lajla: jimmy_, 'tone of liberation'? 21:05 (quit) carleastlund: Quit: carleastlund 21:05 Lajla: And I guess then htdp and sicp are probably for you because they deal with these sort of situations, the former more than the latter which is more abstract though. 21:05 Lajla: Teaching you how to use streams and make rational numbers, but not really what to use them for. 21:06 jimmy_: lajla, I have to start somewhere, and i haven't managed to find a definitive article that suggests which I should learn, which i'm sure has something to do with what i'd like to use the language for, of which i'm specifically unsure 21:06 eli: Fare: Hopefully it will work. I'm running an old fedora on the x86_64 machine, but won't hurt to try. 21:07 Fare: ok. 21:08 jimmy_: lajla, sorry that was a bit dramatic, but what I meant was that the author described an environment where he was able to code against the problems he faced with relative ease compared to the team working on other similar projects using c 21:08 (join) b-man_ 21:08 Lajla: jimmy_, I can imagine yes. 21:08 Lajla: Lisps are quite good for these kind of things. 21:08 Lajla: But nowadays, people also use Python a lot for this. 21:09 Lajla: jimmy_, but basically, you will indeed never get a definite answer if scip or htdp is better. 21:09 Lajla: When people say that one is better I would take their advice with a grain of salt more than when tey say they honestly don't know and it depends on whom you're trying to teach what 21:10 jimmy_: lajla: I was talking about which i should learn, lisp or scheme, as you described that their differences to you are quite drastic 21:11 Lajla: jimmy_, there's also clojure nowadays. 21:11 Lajla: Another language which looks like this (+ 1 2 3) and is some sort of hybrid approach in some way. A lisp-1 with a lot of things more like CL. 21:12 Fare: eli: it's only over 7.2 MB of code, 1.1 million words, 160 thousand lines. 21:12 jimmy_: lajla: I guess I'll just have to read them and decide for myself :-) 21:12 eli: Fare: Are you trying to scare me? 21:13 jimmy_: lajla: and for reference, the article I was referring to is http://www.flownet.com/gat/jpl-lisp.html 21:13 Fare: eli: no. Do you have zsh? 21:13 Lajla: jimmy_, but in the end, CL is more practical and Scheme is more 'elegant' if you like, but in the end, scheme can do almost all things CL can do but not at the same performance due to declarations, and you have to do it yourself. CL on the other hand does not offer some very fundamental things that are hard to make out of oter things if you lack them such as continuations (intereting, wildly hard to grasp, and ultimately barely useful) and ta 21:13 Lajla: il-call optmization (very useful and once you had it you don't want tos top) 21:13 Fare: I'm ashamed to not write my scripts in Lisp, but oh well. 21:13 eli: Fare: Yes, I have zsh 21:13 eli: (And really like to use it.) 21:15 Fare: my parser depends on fixing a bug in SBCL (which I have locally, but won't make it upstream until next week), so I'll have it compile out of the box with ccl (which I can test), making it trivial to try with allegro 21:15 jimmy_: lajla: unfortunately, I do not know enough about what you're talking about for any of that to mean much, except for no tail-call optimization. but I'm sure I'll find out 21:16 bremner: jimmy_: if you want to talk about scheme in general, there are more people in #scheme 21:17 Lajla: jimmy_, you know what tco is right? 21:17 Fare: eli: I assume you have readlink -f 21:17 eli: Fare: Yes, and I'm familiar with the headaches that not having it leads to. 21:18 jimmy_: lajla: you're talking about the feature wherein a special case of recursion can be optimized to avoid keeping stack state, where the special case is that the recursive call is the last call of the routine? 21:18 Lajla: jimmy_, that's the most important implication of it yes. But the tail call needn't be recursive at all. 21:19 Lajla: Also, continuations are actually in a way related to this. 21:19 jimmy_: bremner: thanks 21:19 Lajla: Basically we say that the call is a tail call if its continuation is the same as that of the calling function, broadly speaking 21:20 bremner: yikes. how the heck could a novice be expected to understand that? 21:20 jimmy_: lajla: er, is the same? you mean if I do the same thing in each call?, as opposed to recursively calling myself on two different data sets based on some stated? 21:20 Lajla: jimmy_, no, the continuation is te same, let me try this. 21:21 Lajla: Say I have in C style the expression 5 + 3 * 7 21:21 Lajla: 3 * 7 is evaluated first right? 21:21 jimmy_: yes 21:21 Lajla: Now, the answer to that is 21, and there is a continuation waiting for that answer, basically the rest of the compuation that users that answer, let's just write hat down as 5 + x 21:21 jimmy_: ok 21:22 Lajla: That's the continuation of '3 * 7' in '5 + 3 * 7' 21:22 jimmy_: ok 21:22 Lajla: Now, Scheme offers first class continuations, we can capture such a continuation and use it as a data structure, and they are pretty much simply procedures as it turns out. 21:23 Lajla: So basically, when we call a function inside a function. And the continuation of the inner function is the same as that of the outer function or basically the 'place' in the program that awaits the answer crudely said, then it's a tail call. 21:23 jimmy_: ok, so in what kind of case would recursion NOT be what you describe 21:23 Fare: Lajla: it's "add 5, display the result, do a big mess with the screen, prompt for another command, loop" 21:23 Lajla: Well, recursion is a special case. 21:23 Lajla: Even if I call another function, it can still be a tail call. 21:24 Lajla: jimmy_, listen to fare, he or she is right, just makes things so complicated that it may hurt. 21:25 jimmy_: it makes it complicated to not have it, you mean? 21:25 Lajla: jimmy_, but as the name suggests, a continuation of some compuation is basically conceptually the rest of the program that uses that value and continues from it, and as it turns out, continuations are basically ordinary functions. 21:25 Lajla: jimmy_, no, fare's explaination is a bit more complex than mine. 21:26 Lajla: jimmy_, but you have a good idea of what a continuation is now? 21:26 jimmy_: yes, but I feel that theres more to it than that, or at least more coming. 21:26 jimmy_: and fare: :-p 21:27 Lajla: Well, continuations, though existing basically everywhere are relevant in scheme because in scheme these can be captured and stored in variables and used at random points. 21:27 Lajla: You can basically just capture a continuation of some random part in the program and say 'let's give this other part of the program that continuation' depending on runtime-known information even. 21:27 jimmy_: I am new and understand the following statement to be unlearned, but that seems contrived, and I can't see how I will take advantage of that 21:27 Lajla: Which is cute, complicated, fun, and ultimately not extremely useful. =) 21:28 jimmy_: so, that is called tail call optimization 21:28 Lajla: Well, that is called first class continuations. 21:28 jimmy_: oh whoops, right. 21:29 Lajla: tail call optimization is an optimization technique that can (and for a language to be called scheme, must) be applied at tail calls. 21:29 Lajla: And a tail call is simply a call whose continuation is the same as that of the calling function. Or conceptually 'the last call' 21:29 Lajla: In C style languages, a limited form of continuations are return statements for instance. 21:30 jimmy_: ok 21:30 jimmy_: ok, so what isn't a tail cal 21:30 jimmy_: l 21:30 jimmy_: literally, a call that isn't the last call? 21:30 Lajla: Basically when you use return, you give what ever expression you use as argument for that return statement the continuation that is the same as your original calling function. So basically, each time you do a function call, you capture the continuation, or return adress, and you use it later. 21:30 Lajla: Yap, basically. 21:31 Lajla: If I have (define (f x) (if (g x) (h x) (+ 2 (i x))) 21:31 Lajla: Then in that function, the calls to h and + are tail calls. 21:31 Lajla: + is just a procedure in scheme, there are no 'operators' 21:31 Lajla: g is not a tail call, and neither is i. 21:32 Lajla: Because the value g and i return still live inside the function body and are used. If it's a tail call, the value they return can just be passed without checking what it is to the original funtion that called f. 21:32 (join) adadglgmut 21:32 Lajla: Say we have a function like (define (f x) (if #f 5 (g x)) 21:32 Lajla: ) 21:33 jimmy_: we loop forever 21:34 Lajla: No matter what (g x) returns, the return value of f will always be that of (g x), so it can just basically call g and pass it the original return address or 'continuation' of f to it and break f down from the stack frame. 21:34 Lajla: g and f are different functions here. 21:34 Lajla: But say they are not. 21:34 Lajla: THen we loop forever yes. 21:34 Lajla: Tail recursion is a very important consequent of tail call optimization, but not the only one. 21:35 jimmy_: ook 21:35 Lajla: But often, the two terms are used synonymously, though some would object noting that tail calls which are not recursive calls are still tail calls and should be optimized. 21:35 jimmy_: \making some more sense, but in your first example, why is hx considered tail call when the continuation of f depends on g x? 21:36 Lajla: It doesn't, there is an if in there. 21:36 Lajla: So assuming that (g x) evaluates to some value considered true. Then the other branch of the if-then-else will be ignored. 21:37 Lajla: So in his case, f will either evaluate to the thing that (h x) evaluates to, or that which (+ 2 (i x)) evaluates to. 21:37 Lajla: But it needs the value of (g x) to determine which 21:37 Lajla: The call to + is a tail call. But the call to i is not. 21:37 jimmy_: right because the continuation of i x in this case is not another i x, its, + stuff 21:38 jimmy_: no, 21:38 Lajla: Yap, the continuation of (i x) in this case is first (+ 2 ...) and on top of that composed the original continuation of f. 21:38 Lajla: Which depends on where f is called basically. 21:39 Lajla: But continuations are usually the thing people learn last about scheme actually. They're known to be a bit overwhelming and mind-crushing. 21:39 jimmy_: but if g x were true, then the continuation for f x would be evaluated the same way as if we were to evaluate h x, 21:39 (join) adadglgmut_ 21:39 jimmy_: and thats what you mean if the continuations are the same 21:39 Lajla: Well, (h x) in that continuation, yes. 21:40 Lajla: Assuming that (h x) gets called, then its continuation is the same as that of the original f function. 21:40 Lajla: Which is one of the ways to define a tail call. 21:40 Fare: zsh is just a bad lisp 21:41 Lajla: But yes, one of the advantages of TCO is that you don't really need loops. 21:41 Lajla: Or well, some would say that tail recursions are loops. 21:41 jimmy_: oh, so you mean at runtime, you can even go in and say, well i know I wont be reaching the rest of f x if we get to h x, so I can remove f x state from the stack and attach the returning, context pointer thing, to the processing of h x 21:42 Lajla: Yes, exactly! 21:42 jimmy_: hmmmmm 21:42 Fare: the REAL advantage of TCO is that your loop-building can be MODULAR. 21:42 Lajla: If (g x) evaluates to a true value in that context. THen the other branch can be thrown away basically. 21:42 (quit) adadglgmut: Ping timeout: 264 seconds 21:42 Lajla: Fare, explain? 21:43 Fare: anything you can do with TCO, you can do with loops --- by making your code monolithic. 21:43 Lajla: I thought the real advantage of it was that it gives us a way to still just feel superior to people who use CL. =( 21:43 Lajla: Ahhh 21:43 Fare: TCO allows you to put the building blocks of your overall program in nice, abstract, reusable modules. 21:43 Lajla: Yap. 21:44 Lajla: jimmy_, this is quite interesting maybe what can be done in scheme. I code a lot of my stuff like that, basically in those modules which are defined in terms of each other. 21:44 Lajla: Each module calls another one of those at the end basically. 21:44 Fare: See the discussion on Steele's blog post: http://projectfortress.sun.com/Projects/Community/blog/ObjectOrientedTailRecursion 21:44 (notice) rudybot: http://tinyurl.com/yjbgks3 21:45 Lajla: Hah, even steele uses tail calls and tail recursion synonymously to get corrected. 21:45 Fare: Lajla: with TCO, your loop modules need not recurse. 21:46 Lajla: True, but it usually makes sense to define them in terms of each other. 21:46 Fare: as still be components of an overall recursive definition. 21:46 Fare: can be done with higher-order elements, and the fix-point outside of them. 21:47 jimmy_: you're talking about how you can describe something recursively, but still in some cases unwind it iteratively? 21:47 Lajla: jimmy_, but maybe this is a bit too far-fetched for a newbie. But in the end, the most important differences between scheme and CL would be that scheme has TCO. And that in scheme functions and values occupy the same space in variables. 21:48 (join) adadglgmut 21:48 jimmy_: and CL differentiates between functions and variables in some meaningful way? 21:49 jimmy_: in terms of how they are referenceable? 21:49 Lajla: Yap, CL uses different namespaces. A variable can hold both a function and a value and you use special syntax to get the function. 21:49 (quit) adadglgmut: Client Quit 21:50 Lajla: Like, say I have a basic qsort, as in, it takes a list, a relational operator, and it returns its sorted version according to that. In Scheme I would use (qsort '(1 28 18 41 -29 3 4) <) for instance 21:50 (quit) adadglgmut_: Ping timeout: 265 seconds 21:50 jimmy_: ok 21:50 Lajla: In CL you would use (qsort '(1 28 18 41 -29 3 4) (function <)) 21:50 Lajla: Or #'< for short instead of (function <) 21:51 jimmy_: ok 21:51 Lajla: Basically the function form takes a name, and looks up a function with that name. 21:51 Lajla: Whereas in Scheme, < is just a symbol which evaluates to the value its bound to, like all symbols, and this can be a number, a function, a vector, you name it. 21:51 jimmy_: I take it scheme's approach is more than just syntactic sugar? 21:52 Lajla: In Scheme, functions and values occupy the same variables, in CL there are two namespaces broadly speaking, one for functions and one for values. 21:53 Lajla: Which also means that in scheme, this is possible: ((order-add 4) 2 3) or something, where (order-add 4) itself evaluates to a function. 21:53 Lajla: Functions in both scheme and common lisp can output functions. 21:54 Lajla: But basically (order-add 0) evaluates to addition, (order-add 1) to multiplication, (order-add 2) to exponentiation, then tetration, then pentation and so forth. 21:54 jimmy_: does this present issues when translating approaches that handle functions as variables, needing to result in different approaches? or is it a syntax thing? 21:54 Lajla: It's far more than simply a syntax thing I guess. 21:55 Lajla: It just means that in scheme you store functoins in variables just like any other values. 21:55 jimmy_: i like that 21:55 Lajla: And in CL you use more of a C-style like thing by declaring that. 21:55 jimmy_: ok, and so CL doesn't have tail call optimization 21:55 Lajla: jimmy_, how it crudely works is a function call of the form (+ 1 2) is that it just evalutes all sub-expressions, three in this case, and tries to apply the evaluation of the first with the evaluations of the rest as arguments 21:56 Lajla: jimmy_, not by standard, but some implementations support it. 21:56 Lajla: But it's not mandated 21:56 jimmy_: ahaaa 21:56 jimmy_: That changes the landscape 21:56 Lajla: I guess, but then again, most scheme implementations support a lot more than the core standard, which is bizarrely small. 21:57 jimmy_: i imagine the same argument can be made with lisps? 21:57 jimmy_: sorry, i'm really not trying to start a flame war, I'm just trying to learn the space 21:58 Lajla: That's also a difference between CL and Scheme. CL's standard is basically quite large. Scheme's is very small with a lot of things you can 'optionally' support. But there are various other standards on top of it. So basically an implementation can claim to support the core R5RS completely together with SRFI 1 though 50 or something. 21:58 Lajla: jimmy_, no, CL has a very large standard compared to scheme. 21:58 Lajla: The schem standardis more spread out across different documents and standards if you like. 21:58 Lajla: So basically implementations can choose, and advertise, how much of it all they support. 21:59 jimmy_: and lisps to a much lesser degree? 21:59 Lajla: In CL there is more portability, but in SCheme, new ideas prove themselves and fight for acceptance. 21:59 Lajla: Yap, the common lisp standard is larger and there is no such thing as 'supporting only a part for a specific domain' 22:00 jimmy_: hmm 22:00 jimmy_: do you use both for different tasks, (those not predicated on some external requirement?) 22:00 Lajla: See it like that the schems tandard is more broken up in multiple layers and is more the work of the scheme community opposed to some organ like ANSI and as evolved naturally over time to meet demand, but it poses some portability risks and you have to be aware of what you use when you code if you want it to be portable. 22:00 Lajla: I have never used CL in my life. =) 22:01 jimmy_: hehe 22:01 jimmy_: ok, 22:01 jimmy_: well that exhausts the questions i have so far 22:01 Lajla: But some people will call you insane for using scheme for 're-inventing the wheel all the time', but those people are often not aware of the fact that there are further layers on top of the R5RS standard. 22:01 jimmy_: thank you for your insight 22:02 Lajla: You're welcome, maybe you can hop by on #clojure to learn some things there too. 22:03 jimmy_: perhaps i will 22:03 PascalHunger: Good Evening! 22:04 Lajla: Hai pasc 22:05 PascalHunger: So I guess racket will be my preferred scheme environment 22:05 PascalHunger: Although bigloo is fairly "cool" 22:05 Lajla: Rabbit pwnz all. 22:06 PascalHunger: So where are you located Lajla? 22:07 Lajla: Nederlands basically. 22:07 PascalHunger: ah 22:07 Lajla: It's a pretty cool country, it lets me commit suicide if I want to and it doesn't affraid of anything. 22:07 Lajla: PascalHunger, you? 22:07 PascalHunger: lajla is slang in some parts of argentina hehe 22:08 PascalHunger: I am in the US 22:08 PascalHunger: I think you can kill yourself in any country, heh 22:10 Lajla: PascalHunger, in North Korea though, they apparently send your family to labour camps. 22:11 Lajla: PascalHunger, but what does it mean in Argentina? 22:15 PascalHunger: its spelled different 22:15 PascalHunger: but can be slang for a small girl heh 22:16 Lajla: PascalHunger, as in, lolita? 22:17 Lajla: Has to be said though, the book has an impressive literary quality for a non-native in spite of or perhaps due to the controversial subject. 22:17 Lajla: That sounded so praetentious 'literary quality' 22:17 Lajla: 'I liked the book' 22:17 Lajla: THat's better 22:18 PascalHunger: Lajla: sounds more like loholita in english ....its used by youth in some cities 22:18 PascalHunger: Lajla: what does it mean to you? 22:19 Lajla: PascalHunger, I just chose it due to phonetically pleasing, but it's apparently a semitic female name meaning 'night' 22:19 Lajla: To me it's just an IRC handle. 22:19 PascalHunger: ah 22:19 Lajla: My real name is even more praetentious, it means 'Immortal' in some ancient lithurgical language. 22:20 PascalHunger: so how long have you been using scheme / racket / lisp ... 22:20 Lajla: Which would some-what compromise the benefits of legality of suicide. 22:20 PascalHunger: are you thinking about suicide or something man? 22:20 Lajla: No idea, 1-2 months maybe. 22:20 Lajla: My passage of time sense is very bad. 22:20 Lajla: PascalHunger, no, but I just like the fact that I legally can. 22:21 Lajla: Kind of a sucker for personal freedoms. 22:21 PascalHunger: I see 22:21 PascalHunger: I actually used mit scheme a little back in 2003/2004 ish 22:21 PascalHunger: but then quit and just starting back up with racket 22:23 Lajla: PascalHunger, how long ago? 22:26 PascalHunger: Lajla: how long what? i started back up? 22:26 PascalHunger: Lajla: 4 days ago? 22:30 Lajla: Ahhh 22:30 (quit) b-man_: Remote host closed the connection 22:31 Lajla: I think I saw you before here. 22:59 Lajla: PascalHunger, the pivotal quaestion though, why are you? 23:40 (join) jonrafkind 23:57 (join) samth 23:57 samth: eli, ping 23:58 eli: samth: ? 23:58 samth: eli, can you vote up a couple of my answers on stack overflow? 23:58 eli: You're using it now? 23:59 samth: yeah, i figured you needed some help :) 23:59 samth: but it's very annoying having only 1 rep 23:59 eli: I can't find you.