00:12 (join) zenlunatic 00:45 (join) jeapostrophe 00:50 (join) neilv 01:41 (quit) neilv: Quit: Leaving 01:46 (quit) jeapostrophe: Quit: jeapostrophe 01:50 (quit) mheld: Quit: mheld 02:06 (join) jeapostrophe 02:06 (quit) jeapostrophe: Client Quit 02:47 (join) MayDaniel 03:01 (join) aLeSD 03:01 aLeSD: hi all 03:01 aLeSD: merry Christmass 03:01 aLeSD: hi Lajla 04:12 (quit) jonrafkind: Ping timeout: 276 seconds 04:19 aLeSD: I got an error : expected procedure 04:19 aLeSD: and given #void 04:19 aLeSD: what does it mean ? 04:28 Lajla: aLeSD, can you give me your code? 04:28 aLeSD: Lajla, I resolved it 04:28 aLeSD: with (begin 04:28 Lajla: Ahhh 04:28 aLeSD: could u explain me ? 04:28 Lajla: aLeSD, yeah (x y z) is not a sequencer like in C { ... } is. 04:29 Lajla: (x y z) is like x(y, z) in C. 04:29 Lajla: It performs a function call with x as the function, and y and z as arguments. 04:29 aLeSD: yeah 04:29 Lajla: But the difference is that x can be an arbitrarily complex expression. 04:29 Lajla: Just like y and z. 04:29 aLeSD: but I coded (x (y z)) 04:29 Lajla: Ahhh 04:29 Lajla: Well, then it starts to call y with z as argument. 04:30 Lajla: Is like x(y(z)) 04:30 aLeSD: mmm 04:30 Lajla: In C 04:30 aLeSD: (x ((y) (z))) 04:30 Lajla: THen it tries to call y and z with no arguments. 04:30 Lajla: Like x(y(),z()) in C 04:30 aLeSD: ah 04:30 aLeSD: I have scheme 04:30 aLeSD: hate 04:31 aLeSD: now I have a math problem 04:31 aLeSD: I will resolve it with scilab 04:32 Lajla: Hating scheme is bad. 04:32 Lajla: Because it is the single most awesoe language on the planet. 04:32 Lajla: aLeSD, the reason behind the weird syntax by the way is that shceme is homo-iconic. 04:32 Lajla: There is a close correspondance between code and data. 04:32 aLeSD: ehm ? 04:32 Lajla: (x y z) is also a list. 04:32 Lajla: Basically, it's a list of three symbols. 04:32 Lajla: Which is considered as a program. 04:33 Lajla: (+ 1 2 3) is when considered as data, a list of a symbol and three numbers. 04:33 Lajla: And when considered as a simple program, a program that sums three numbers and prints that output. 04:46 Lajla: aLeSD, but another reason is that the name of a function needn't be a function call and can be an arbitrarily complex expression. 04:46 Lajla: Like, that (square-or-duble "square") funcion I had last time. 04:46 Lajla: You can do ((square-or-double "square") 1 2) 04:46 Lajla: Which then squares it. 04:47 aLeSD: ok 04:51 aLeSD: I have a prob 04:52 aLeSD: (translate (vector (* r (sin(* vel (time)))) (* r (cos(* vel (time)))) 0 ) ) 04:52 aLeSD: it isn't a circle 04:52 aLeSD: is it strange ? 05:20 (quit) martinhex: Remote host closed the connection 05:40 (quit) aLeSD: Ping timeout: 276 seconds 06:00 (quit) MayDaniel: Read error: Connection reset by peer 06:30 (quit) abbe: Remote host closed the connection 06:30 (join) abbe 06:30 (quit) abbe: Changing host 06:30 (join) abbe 06:58 (quit) abbe: Ping timeout: 260 seconds 07:03 (join) abbe 07:03 (quit) abbe: Changing host 07:03 (join) abbe 07:30 (join) aLeSD 07:31 aLeSD: how could i give a variable a value ? 07:31 (join) MayDaniel 07:31 aLeSD: something like : var = sum(4,5); (c style) 07:32 Lajla: aLeSD, define 07:33 Lajla: (define var (+ 4 5)) 07:33 aLeSD: ok 07:33 Lajla: Like I said before, (define (f x) ...) is the same as (define f (lambda (x) ...)) 07:33 aLeSD: I think that my problem is the delay that I have between the two time I run (time) function 07:33 Lajla: Functions are simply stored in variables like any other value. 07:33 Lajla: aLeSD, I meant to ask you, what is that thing suppoed to do. 07:34 aLeSD: I am creating sever sphere 07:35 aLeSD: that move following the sin cos coordinates 07:35 Lajla: Ahhh 07:35 Lajla: You are making a parametric aequation. 07:35 Lajla: So like 07:35 Lajla: time is a variable? 07:35 Lajla: Because (time) calls a unction here, not sure if you want that. 07:36 aLeSD: the arg of sin cos is the time 07:36 Lajla: But 07:36 aLeSD: and to make them go to different velocity I am (* n (time)) 07:36 Lajla: If you want to make them the same. 07:36 aLeSD: but the trajectory is not a circle 07:36 Lajla: You can use let. 07:36 Lajla: Like (let ((the-time (time))) ...) 07:36 aLeSD: it doesn't work 07:36 Lajla: And place your code in ... 07:36 Lajla: And use the-time instead of (time) in that. 07:36 Lajla: Let creates a local block. 07:36 aLeSD: mmm 07:37 Lajla: Like, if you use (let ((x 3) (y 4)) (+ x y)) 07:37 Lajla: You have created two local variables, x and y, that only last up to the end of the block. 07:37 aLeSD: I have a math prob 07:37 aLeSD: jus a sec 07:37 Lajla: Essentially like in a function, except you don't call a function. 07:38 aLeSD: understand 07:39 aLeSD: yes... but my problem is different now 07:39 aLeSD: I am doing like 07:39 Lajla: Hmm, go on. 07:39 (quit) MayDaniel: Read error: Connection reset by peer 07:40 aLeSD: (translate (vector (* r (sin (* vel (time))) (* r (cos (* vel (time))) 0 )) 07:41 aLeSD: (draw-sphere) 07:41 aLeSD: and I run it continuously 07:41 aLeSD: but the trajectory is not circular 07:42 aLeSD: I understood 07:44 aLeSD: ok it works 07:44 aLeSD: my faULT 07:44 aLeSD: Lajla, but I have a doubt 07:45 aLeSD: #f::52: define: not allowed in an expression context in: (define t time) 07:45 aLeSD: I had to remove the define and use (time) directly 07:45 Lajla: aLeSD, where had you put the define? 07:46 Lajla: aLeSD, can you use codepad.org to upload your code. 07:46 Lajla: It's pretty nice. 07:46 Lajla: http://codepad.org/ZfZaIojw 07:46 Lajla: Look, 99 bottles of beer for you. 07:47 aLeSD: the editor I am using (fluxus) doesn't support copy paste 07:47 Lajla: Really? 07:47 Lajla: THat is very awkward. 07:47 Lajla: You might want to write it in another editor and then output it. 07:48 Lajla: But aLeSD I guarantee you that Scheme is a very good language for writing such things once you realize how it works. It works quite different from C. 07:48 aLeSD: I have to use drscheme 07:48 aLeSD: wait 07:48 Lajla: But Scheme has been used for these things a lot, like a lot of 3D films have used Scheme to program facial expressions and those things, because it's very good for that. 07:50 aLeSD: Lajla, when I put require 07:50 aLeSD: I get: fluxus-017/drflux: standard-module-name-resolver: collection not found: "fluxus-017" in any of: (# #) 07:50 Lajla: Ahhh 07:50 Lajla: Well, it means that it's apparently not in the folder. 07:50 aLeSD: and I have /usr/local/lib/fluxus-017/drflux.ss 07:51 Lajla: aLeSD, can you paste your code? 07:52 aLeSD: #lang scheme 07:52 aLeSD: (require fluxus-017/drflux) 07:52 aLeSD: it is all 07:55 aLeSD: Lajla, http://codepad.org/mbb4pUl7 07:58 (join) mceier 07:58 aLeSD: how can I give the interpreter all the path to the module ? 08:01 Lajla: Hmm 08:01 Lajla: I suppose you want to put fluxus in /home/ale .... / collects 08:01 Lajla: That is how most people do it I guess. 08:01 Lajla: It's handier to keep that together 08:02 Lajla: Also, you might want to ue #lang racket 08:02 aLeSD: but only the ss file ? 08:02 Lajla: Well, all of it. 08:02 Lajla: I don't know what fluxus is as I said. =P 08:02 aLeSD: I am using the plt-scheme version 08:02 Lajla: Oh. 08:02 Lajla: You might want to update to the latest versoin then. 08:02 Lajla: But aLeSD your indentation tyle is a bit off. 08:03 Lajla: You generally want to indent it like I did in my example. 08:03 Lajla: Not use ) below each other. 08:03 Lajla: Because there are going to be a lot of them. 08:03 Lajla: http://codepad.org/6QMIMFIF like this 08:14 aLeSD: ok 08:19 Lajla: aLeSD, is it working if you replaced the paths? 08:21 aLeSD: I copied the files in my home 08:21 aLeSD: and it works 08:21 aLeSD: but (time) function is not avaible in drscheme 08:21 aLeSD: available 08:22 Lajla: Hmm 08:22 Lajla: what is it supposed to do? 08:22 Lajla: Like I said, I didn't know it. 08:22 aLeSD: time: bad syntax in: (time) 08:22 aLeSD: do u know a function that give me the time ? 08:22 Lajla: Ohh 08:22 Lajla: You mean the current unix time? 08:23 Lajla: http://docs.racket-lang.org/reference/time.html there are a lot 08:23 aLeSD: it gives you a number that is the seconds from when the program starts 08:24 Lajla: http://docs.racket-lang.org/reference/time.html#(def._((quote._~23~25kernel)._current-milliseconds)) 08:24 (join) jeapostrophe 08:28 aLeSD: ok it works 08:29 aLeSD: Lajla, thanks 08:31 (join) MayDaniel 08:31 Lajla: aLeSD, I live to serve. 08:33 (quit) aLeSD: Ping timeout: 240 seconds 08:48 (nick) jeapostrophe -> jay-mccarthy 08:49 (quit) jay-mccarthy: Quit: jay-mccarthy 08:49 (join) jay-mccarthy 08:59 (quit) jay-mccarthy: Quit: jay-mccarthy 09:02 MindFrog: hey there can anyone tell me how to break a dolist loop? 09:03 MindFrog: (break) gives me undefined identifier error 09:12 Lajla: MindFrog, c-c-c-c-ccCONTINUATIONS 09:13 MindFrog: sorry? 09:14 Lajla: MindFrog, continuations, never heard of them? 09:14 MindFrog: ergh, I'm afraid not ^^ 09:14 Lajla: MindFrog, can you use pastebin or codepad to give me the relevant part of the code. 09:15 (join) jay-mccarthy 09:15 Lajla: In the meanwhile: http://community.schemewiki.org/?call-with-current-continuation marvel at their astounding brilliancy yet nigh complete uselessness. 09:15 MindFrog: http://pastebin.com/eAzfJc0f 09:15 MindFrog: after this: 09:15 MindFrog: (set! res #f))) 09:15 MindFrog: I wanted to stop the loop 09:15 MindFrog: because if res is ever set to #f, it's not worth to keep looping 09:19 Lajla: MindFrog, http://pastebin.com/cjychAek 09:19 Lajla: I have taken the liberty to significantly re-write your code. 09:19 Lajla: But basically. 09:19 Lajla: धीOr actually, I goofed. =( 09:20 Lajla: Pardon. 09:20 (quit) jay-mccarthy: Quit: jay-mccarthy 09:20 Lajla: But ehh, basically, I added a return thingy to it with continuations. 09:20 Lajla: So whenever (return x) is encountered in the loop. 09:20 Lajla: It stops the loop, and the entire part from (call/cc (lambda (return) ...) up evaluates to x. 09:20 Lajla: And I goofed because in my version it returns fromt he first iteration on. 09:21 MindFrog: hummmmmmmmmm 09:22 MindFrog: ohh I see 09:22 MindFrog: ah ok 09:22 MindFrog: thx Lajla 09:23 MindFrog: jesus, why isn't there a break command? lol 09:23 Lajla: http://pastebin.com/useifY0b 09:23 Lajla: MindFrog, maybe there is. 09:23 Lajla: But the point is, this is Scheme. 09:23 Lajla: A language built on not adding feature above feature, but removing the restrictions that make those features necessary. 09:23 Lajla: Basically 09:24 Lajla: continuations are your building block to create gotos, returns, brekas, contnuatue statements et cetera from. 09:24 Lajla: Continuations are the generalization of all of those. 09:24 MindFrog: k, I'm reading the link you sent 09:24 MindFrog: thx a lot! 09:24 Lajla: So scheme does not natively have all those things, but allows you to define them yourself using continuations. 09:27 Lajla: MindFrog, hold on, I'm making something for you right now. 09:39 (quit) mceier: Quit: leaving 09:44 Lajla: MindFrog: http://codepad.org/2Ud7mPR4 09:44 (quit) MayDaniel: 09:44 Lajla: Basically, you now have (do-each (k '(0 1 2 3 4 5))) some-code) 09:45 Lajla: Where some-code is the code you loop over, and in that k, is just bound to each member of the list. 09:45 Lajla: Also, you can loop over two lists at once. 09:45 Lajla: and in that, you can return by using the return statement. 09:45 Lajla: Or you can give it a name yourself like I did in the first. 09:45 Lajla: You can also return the return statement by the way. =P 09:45 Lajla: (return return) is acceptable, but weird 09:53 (join) mheld 09:58 (join) jay-mccarthy 10:01 Lajla: MindFrog, no idea if you left, but this is la grande versione: http://codepad.org/9N5ZpPkU 10:01 Lajla: It also has a counter 10:01 (join) MayDaniel 10:06 (quit) jay-mccarthy: Quit: jay-mccarthy 10:12 MindFrog: sorry Lajla 10:13 MindFrog: great job, thank you very much 10:13 MindFrog: works like a charm 10:14 MindFrog: you guys rock, great channel ^^ ;) 10:14 Lajla: MindFrog, some people would say though that it is 'un scheme' to choose identifiers for people. 10:14 Lajla: And people should be able to choose their own. 10:14 Lajla: And pick the name of their own return statements. 10:14 MindFrog: humm, is it? 10:14 Lajla: Yeah. 10:14 MindFrog: I'm new to scheme 10:15 Lajla: This is why for instance in 'named lets', you choose the name of your recursion point. 10:15 MindFrog: it's too different from other languages, a bit tricky sometimes but I like it 10:15 Lajla: Like (let recur ((x 10)) (if (zero? x) #t (recur (- k 1)))) 10:15 MindFrog: ah yep yep 10:15 Lajla: You choose the name of your recursion point basically. 10:16 Lajla: Also in many scheme OO systems, they let you choose the name of your 'this' at some point. 10:16 Lajla: But my syntax generally lets you choose the name, but if you don't fill it in, it assumes a default one. 10:16 Lajla: Also, it's important with nested do-each loops. 10:16 Lajla: Like, if you nest a do-each loop inside another one. 10:16 Lajla: What does 'return' then rever to? 10:17 Lajla: If you can name them yourself, you can give each do-each loop a different one like outer-return and inner-return, so that the inner one can in fact return to the outer one directly. 10:17 MindFrog: hmmmmmm 10:17 Lajla: Also, some purists would say that using set! without reaaaally having to warrants execution. :') 10:18 MindFrog: a return to another return 10:19 Lajla: Yeah 10:19 Lajla: like, you can do the same thing with functions 10:19 Lajla: give them a return statement. 10:19 Lajla: But you can have inner functions in scheme. 10:19 Lajla: If you can name the return 'statement' 10:19 MindFrog: the closest thing I've done is to make a function that returns another function 10:19 Lajla: You can let an inner function directly return to the outer one. 10:22 Lajla: MindFrog: http://codepad.org/xtcJzhD1 10:24 MindFrog: hm I see 10:24 MindFrog: never had heard about that 10:25 Lajla: MindFrog, about continuations? 10:25 MindFrog: yeah 10:25 Lajla: Hmm 10:25 Lajla: some would argue that continuations were the start of scheme development. 10:25 MindFrog: I'm still reading on wikipedia abou tit, seems such a powerfull tool 10:25 Lajla: Extremely. 10:25 MindFrog: * about it 10:25 Lajla: But, continuations are considered harmful. 10:25 MindFrog: huh, why? 10:26 Lajla: They are more powerful thatn gotos, and subsequently a way to completely obfuscate and destroy the maintainability of code if used unwisely. 10:26 Lajla: THerefore they are best kept abstracted inside micros. 10:26 Lajla: It's very difficult for a human being to reason about them. 10:26 Lajla: Like continuations being passed themselves. 10:26 Lajla: Like, say you have a function which names its return continuation simply ret. 10:27 Lajla: And you do (ret ret) in it. 10:27 Lajla: THat function then returns its own continuation 10:27 Lajla: And you have it as an object outside the function. 10:27 Lajla: Pretty difficult to reason about how that behaves 10:27 Lajla: But basically, say you have that function, and you do (define foo (function-that-returns its own continuation)) 10:28 MindFrog: O.o 10:28 Lajla: If you then pass foo an argument, that argument then continues at this point, so if you pass it 3 10:28 Lajla: The program continues at that point, as if it were if foo was defined as 3. 10:28 MindFrog: ok this is confusing 10:29 Lajla: THat is why they are considered harmful. =P 10:32 MindFrog: lol, right.. 10:32 MindFrog: so basically, it's a nightmare for beginners like me 10:32 MindFrog: hehe 10:32 Lajla: But basically all your fancy control structure stuff like coroutines, exceptions, prolog-style backtracing can be implemented on top of continuations. 10:33 Lajla: Well, as a generla rule, you want a machine to generate continuation-based code, it's very hard for human beings. 10:33 Lajla: So it's usually abstracted away in macros. 10:34 Lajla: You can also by the way define loops in terms of them, instead of using tail recursion. 10:38 MindFrog: well 10:38 MindFrog: tail recursion simulates a loop, right? 10:39 Lajla: Or the reverse, yeah. 10:39 Lajla: But, tail recurson is closely related to continuations. 10:39 Lajla: घलIn fact a call is a tail-call if and only if its continuation is the same as that of the calling function. 10:41 MindFrog: humm 10:43 (quit) MayDaniel: Read error: Connection reset by peer 10:48 cky: Continuations are awesomesauce. 10:51 MindFrog: hehe 11:07 (join) jonrafkind 11:10 Lajla: jonrafkind, 11:11 jonrafkind: yes 11:11 Lajla: continuations are fun, right? 11:11 Lajla: Asnwered before asked. 11:11 Lajla: soo, MindFrog they are. 11:11 Lajla: So awesome in fact 11:11 Lajla: that he answered before I asked. 11:11 Lajla: Which by the way 11:11 bremner: continuations are scheme's way of saying you really didn't want to do that :) 11:11 Lajla: can be implemented with continuations 11:11 jonrafkind: continuations are fun like rubbing alcohol is fun 11:11 Lajla: Continuations are like that time machine box from pirmer. 11:11 MindFrog: haha 11:11 Lajla: I once made a graph explaining them via that time travel box. 11:12 MindFrog: .:16:11:23:. that he answered before I asked. 11:12 MindFrog: .:16:11:27:. Which by the way 11:12 MindFrog: .:16:11:30:. can be implemented with continuations 11:12 MindFrog: lol 11:12 Lajla: It is true. 11:12 jonrafkind: you have a problem and you think you can solve it with continuations. now you have two problems 11:12 MindFrog: oh jesus jonrafkind 11:12 MindFrog: I understood that it's confusing but with practice the problem will be solved 11:12 Lajla: Jonrafkind is a cynical man. 11:13 Lajla: No, not really. 11:13 jonrafkind: see how many hours/weeks/years it takes you to decipher this ((call/cc call/cc) (call/cc call/cc)) 11:13 MindFrog: huh 11:14 Lajla: Ahahaha 11:14 Lajla: MindFrog, this is why they are considered harmful. 11:14 MindFrog: cool stuff 11:14 MindFrog: xD 11:49 (join) aLeSD 12:07 Lajla: aLeSD, yo. 12:07 Lajla: you mised some great stuff. 12:08 (join) mceier 12:11 aLeSD: Lajla, what hppend ? 12:11 Lajla: aLeSD, we were talking about continuations. 12:11 Lajla: The coolest part of scheme. 12:11 aLeSD: ehm 12:11 Lajla: Isn't that right, jonrafkind? 12:11 jonrafkind: sure 12:12 aLeSD: I have some problem to understand what continuation is 12:12 aLeSD: could u give a example ? 12:13 Lajla: aLeSD, basically, the continuation is the generalisaiton of the return statement, the break statement, the goto, the loop, the exception, and all that. 12:13 Lajla: It's sort of like an inverted call-stack. 12:14 Lajla: It tells you what is going to happen after some function call, not what happened before it. 12:14 Lajla: aLeSD, but like ehh 12:14 Lajla: say you have a return statement in C. 12:14 Lajla: Say that is not a statement, but a function 12:15 Lajla: A function that accepts an argument, and with that argument simulates the exact thing that would have happened if that function had returned that argument. 12:15 Lajla: THat's basically the continuation of that function, which is of course different for each different call to that function 12:15 aLeSD: ok I need 12 hours to think about 12:16 aLeSD: with beers ... of course 12:16 Lajla: Aaha 12:16 Lajla: It is not unusual. 12:17 Lajla: aLeSD: http://codepad.org/xVXdqnDG 12:18 (quit) aLeSD: Quit: Leaving 12:23 (quit) mheld: Quit: mheld 12:34 (join) mheld 12:50 MindFrog: Lajla do you know who is Fill? 12:51 MindFrog: that's the nick I use on other irc networks but in here it's already registered :( 12:54 (join) dnolen 12:55 Lajla: MindFrog, no, never met him or her. 12:55 Lajla: Small chance too. 12:55 MindFrog: humm, so maybe it's me 12:55 MindFrog: LOL 12:56 MindFrog: I don't remember 12:56 Lajla: It's a common word 12:56 MindFrog: but I had already connected to freenode before, and if I'm not wrong, I used the nick Fill, just don't know if I registered it 12:56 MindFrog: how long does a nick take to expire? 12:57 MindFrog: hum sorry this is a bit offtopic 12:58 offby1 shot a nick, just to watch it expire 12:58 MindFrog: ^^ 12:58 Lajla: Oh well, I still have not been banned myself for repeated offtopicity, though I feel it coming. 12:59 MindFrog: lol, nah 12:59 MindFrog: you're such a great helper 13:00 Lajla: I also have a tendency to defend people who say that Scheme has little industry potential. 13:00 Lajla: Don't ever say that here by the way. 13:00 Lajla: You will acquire the wrath of the gods, you will set in motion the apolocolypse. 13:01 MindFrog: hehe 13:01 offby1: offtopicosity 13:01 Lajla: offtopicity should be a word. 13:02 MindFrog: honestly I didn't know scheme existed before going to university this year. I'm in computers engineering, 1st year, and the language we learn on the first 6 months is scheme 13:02 MindFrog: but, indeed, it's cool, I like it 13:02 Lajla: That is because many theoretical foundations of many languages originated from, or were first investigated using, scheme. 13:02 Lajla: Also, a scheme program is pretty close to a description of the flow of computation in data form. 13:02 MindFrog: sounds nice 13:03 MindFrog: I'm enjoying it 13:03 Lajla: That still does not excuse you from ever mentioning its lack of industry potential. 13:03 MindFrog: and now I'll learn about continuations :P 13:03 Lajla: Heed my words. 13:03 Lajla: Yeah 13:03 MindFrog: I agree 13:03 Lajla: continuations were also used in a lot of stuff. 13:09 (quit) mheld: Quit: mheld 13:15 offby1: MindFrog: it's not a particularly popular language. 13:15 MindFrog: true 13:16 offby1: MindFrog: http://www.paulgraham.com/popular.html :-) 13:17 Lajla: offby1, depends in what area, it has always been pretty popular with people with no sense of practicality trying to research how to apply continuations to natural language semantic formalisms. 13:17 Lajla: But never really with videogame developers. 13:17 MindFrog: hah 13:17 MindFrog: nice article offby1 13:17 Lajla: But interestingly enough, scheme has been used a lot in 3D film development 13:18 Lajla: Like, facial expression simulation and all that 13:18 MindFrog: is that your website? 13:19 Lajla: Isn't the official scripting language of GNU nowadays some form of scheme that runs on a orrible implementation? 13:20 Lajla: Oh lol, Jonrafkind, you'll love this article. 13:20 MindFrog: hummmm 13:20 MindFrog: I think the gimp uses some scheme scripts 13:21 Lajla: yeah, that is Guille. 13:21 Lajla: THe point about rms is that he lacks any notion of empathy. 13:21 Lajla: And is really like 'What is good for me is good for everyone' 13:21 Lajla: And he likes his lisp. 13:22 Lajla: Even though, of course, lisp is only meant for the most enlightened and brilliant spawns of man 13:23 offby1: MindFrog: heh, no, I am not Paul Graham. 13:23 Lajla: =( 13:23 Lajla: A lot of that article is outdated or nonsensical though. 13:23 offby1: Lajla: I know, it's a disappointment to me, too 13:23 Lajla: I especially fell over the use of 'strongly typed' and 'type declrations' 13:28 offby1 never tires of reading Paul Graham 13:28 offby1: "Perl ... was not only designed for writing throwaway programs, but was pretty much a throwaway program itself." 13:29 Lajla: I write much funnier. 13:30 Lajla: "I for one hate with a passion that new misodendric hype of basically 1 em line spacing in papers. I’m still not really sure if they actually hit enter twice after every line or make some switch that does that automatically for each line, but as they use LaTeX I would not be surprised if they actually accomplished their treeslaughter by the former." 13:30 Lajla: See 13:30 Lajla: I write much funnier. 13:59 (join) mheld 13:59 (quit) Lajla: Ping timeout: 250 seconds 14:22 (quit) cinch: Quit: Leaving 14:28 (quit) mheld: Quit: mheld 14:30 (join) jao 14:30 (quit) jao: Changing host 14:30 (join) jao 14:42 (join) cinch 14:50 (quit) cinch: Read error: Operation timed out 14:52 offby1: if by "funny" you mean "eye-glazingly boring and also possibly schizoid", sure 14:52 offby1: oh, that comment wasn't filled with the Christmas spirit, now was it :-| 15:05 rapacity: the spirit of christmas is commercialism 15:14 (quit) parcs: Ping timeout: 240 seconds 15:16 (join) parcs 15:22 (join) jay-mccarthy 15:25 (quit) jay-mccarthy: Client Quit 15:51 (join) Lajla 15:53 (nick) MindFrog -> Fill 15:55 (join) jay-mccarthy 16:09 (join) MayDaniel 16:11 (quit) jay-mccarthy: Quit: jay-mccarthy 16:15 (join) jay-mccarthy 16:19 (quit) Fill: Quit: brb .•«UPP»•. 16:19 (join) Fill 16:20 Lajla: Does anyone know why values / call-with-values can't simply be replaced by saying that continuations generated by call/cc can accept multiple arguments? 16:20 Lajla: Or well, it removes the values. 16:20 (quit) Fill: Client Quit 16:20 Lajla: Not the call-with-values 16:20 (join) Fill 16:21 offby1: I seem to recall a long discussion on #scheme about that, but have no idea what points were raised or how it turned out 16:21 (quit) zenlunatic: Ping timeout: 240 seconds 16:21 Lajla: Well they banned me there for for inappropriate humour eh. 16:22 Lajla: But I've never really gotten the values part of call-by-values. 16:22 Lajla: What stops you from using (call/cc (lambda (cont) (cont x y z))) instead of that 16:23 offby1: *shrug* 16:23 Lajla: (define (values . xs) (call/cc (lambda (cont) (apply cont x y z)))) 16:23 Lajla: offby1, oh come on. 16:23 offby1: here's what stops me: I never actually use call/cc for anything. 16:23 Lajla: Surely you mus know this. 16:23 Lajla: blasphemy. 16:23 offby1: Once in a blue moon I use let/ec 16:23 Lajla: Well. 16:24 Lajla: Okay, but assume 'a scheme' where continuations can have multiple values. 16:24 Lajla: So I just did (define (values . xs) (call/cc (lambda (k) (apply k xs)))) 16:24 Lajla: And I abstracted it away from you. 16:24 Lajla: There has to be a reason why they just didn't say that continuations can accept multiple arguments. 16:27 Lajla: eli, you are usually the only guy around here with knowledge about this language who doesn't completely hate me, do you know this? 16:44 (quit) MayDaniel: Read error: Connection reset by peer 16:59 (quit) jay-mccarthy: Ping timeout: 255 seconds 17:02 (quit) tv|z: Ping timeout: 265 seconds 17:03 (join) tv|z 17:19 (join) aLeSD 17:19 aLeSD: Lajla, but u never sleep 17:21 Lajla: aLeSD, I had a power outage though, does that count? 17:21 Lajla: Also, I am in EU, no idea where you are. 17:21 aLeSD: EU also 17:22 Lajla: Ahhh 17:22 Lajla: Eastside, brotha. 17:22 Lajla: Of the atlantic at least 17:22 aLeSD: Italy 17:28 Quetzalcoatl_: rudybot: (define (_values . args) (let/cc cc (apply cc args))) 17:28 rudybot: Quetzalcoatl_: Done. 17:28 Quetzalcoatl_: rudybot: (call-with-values list (_values 'x 'y 'z)) 17:28 rudybot: Quetzalcoatl_: error: context expected 1 value, received 3 values: x y z 17:29 Quetzalcoatl_: (call-with-values (lambda () (_values 'x 'y 'z)) list) 17:30 Quetzalcoatl_: rudybot: (call-with-values (lambda () (_values 'x 'y 'z)) list) 17:30 rudybot: Quetzalcoatl_: ; Value: (x y z) 17:30 Lajla: Quetzalcoatl_, well, yeah, this is because call/cc only returns single argument procs. 17:30 Lajla: Ohhh, wait. 17:30 Lajla: I get the obstacle. 17:30 Lajla: call/cc of course has to know the arity when it creates it, which it cannot. 17:30 Quetzalcoatl_: call/cc creates a variable-arity continuation. 17:30 Lajla: Or wait. 17:30 Lajla: really? 17:30 Quetzalcoatl_: The more arguments you pass, the more values it generates. 17:31 Lajla: But like 17:31 Lajla: Ehh 17:31 Lajla: theoretically. 17:31 Quetzalcoatl_: Not theoretically-- that's the way it's implemented. 17:31 Lajla: (call-with-values list (call/cc (lambda (k) ...))) 17:31 Lajla: Shouldn't k in ... be bound to list? 17:31 Lajla: No, I was going to follow it up with omething. 17:32 Lajla: धीOr wait, I reverse them 17:32 Lajla: (call-with-values (call/cc (lambda (k) ...)) k) 17:32 Lajla: Ehh the last k is suppoesd to be list. 17:32 Lajla: But call-with-values basically calls its first argument with its second as continuation, right? 17:33 Lajla: So shouldn't k just be bound to the list function there? 17:33 Quetzalcoatl_: rudybot: (_values 'x 'y 'z) 17:33 rudybot: Quetzalcoatl_: ; Value: x 17:33 rudybot: Quetzalcoatl_: ; Value#2: y 17:33 rudybot: Quetzalcoatl_: ; Value#3: z 17:34 Lajla: rudybot: (call-with-values (call/cc (lambda (k) (k 1 2 3)) list) 17:34 rudybot: Lajla: Not the call-with-values 17:35 offby1: rudybot: (apply values (build-list 20)) 17:35 rudybot: *offby1: error: procedure build-list: expects 2 arguments, given 1: 20 17:35 offby1: rudybot: (apply values (build-list 20 values)) 17:35 rudybot: *offby1: ; Value: 0 17:35 rudybot: *offby1: ; Value#2: 1 17:35 rudybot: *offby1: ; Value#3: 2 17:35 rudybot: *offby1: ; Value#4: 3 17:35 rudybot: *offby1: ; Value#5: 4 17:35 rudybot: *offby1: ; five values is enough for anybody; here's the rest in a list: (5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) 17:35 Lajla: offby1, why doesn't he work we me? 17:35 Lajla: rudybot: (call-with-values (call/cc (lambda (k) (k 1 2 3))) list) 17:35 rudybot: Lajla: your sandbox is ready 17:35 rudybot: Lajla: error: context expected 1 value, received 3 values: 1 2 3 17:35 Lajla: Ahh, there. 17:36 Lajla: Hmm 17:36 Lajla: rudybot: ((call-with-values (call/cc (lambda (k) k) list) 1 2 3) 17:36 rudybot: Lajla: error: eval:1:0: read: expected a `)' to close `(' 17:36 Lajla: rudybot: ((call-with-values (call/cc (lambda (k) k)) list) 1 2 3) 17:36 rudybot: Lajla: error: context expected 1 value, received 0 values 17:37 (quit) aLeSD: Ping timeout: 264 seconds 17:39 Quetzalcoatl_: rudybot: (call-with-values (lambda () (call/cc (lambda (k) k))) list) 17:39 rudybot: Quetzalcoatl_: ; Value: (#) 17:39 Quetzalcoatl_: Too many lambdas. The let/cc macro is easier to read. 17:40 Lajla: Ohhh, yeah, hat was where I fucked up. 17:41 Lajla: rudybot: ((call-with-values (lambda () (let/cc k k)) list) 1 2 3) 17:41 rudybot: Lajla: error: procedure application: expected procedure, given: (#); arguments were: 1 2 3 17:41 Lajla: rudybot: (call-with-values (lambda () (let/cc k (k 1 2 3))) list) 17:41 rudybot: Lajla: ; Value: (1 2 3) 17:41 Lajla: rudybot: (call-with-values (lambda () (let/cc k (k 1 2 3))) vector) 17:41 rudybot: Lajla: ; Value: #(1 2 3) 17:41 Lajla: Schweet 17:43 Lajla: Okay, so like, indeed with call-with-values, the current continuation extracted with call/cc is just bound to whatever procedure is given, right? 17:43 Lajla: rudybot: (call-with-values (lambda () (let/cc k (eqv? k vector)) vector) 17:43 rudybot: Lajla: error: eval:1:0: read: expected a `)' to close `(' 17:43 Lajla: rudybot: (call-with-values (lambda () (let/cc k (eqv? k vector))) vector) 17:43 rudybot: Lajla: ; Value: #(#f) 17:43 Lajla: Guess not 17:44 Lajla: rudybot: (call-with-values (lambda () (let/cc k (eqv? vector vector))) vector) 17:44 rudybot: Lajla: ; Value: #(#t) 17:46 (join) mheld 17:47 Quetzalcoatl_: rudybot: (let/cc cc (cc 'multiple 'values 'with 'continuations)) 17:47 rudybot: Quetzalcoatl_: ; Value: multiple 17:47 rudybot: Quetzalcoatl_: ; Value#2: values 17:47 rudybot: Quetzalcoatl_: ; Value#3: with 17:47 rudybot: Quetzalcoatl_: ; Value#4: continuations 17:48 Lajla: You don't say. 17:48 Lajla: THen I truly don't know what the use of this values is? 17:48 Lajla: At least, as a primitive. 17:49 Lajla: I always wondered why it couldn't be done as this, but it can apparently. 17:49 jonrafkind: a continuation is ridiculously heavy-weight compared to `values' 17:50 Lajla: rudybot: (+ 1 (let/cc k (k 1 2 3)) 2) 17:50 rudybot: Lajla: error: context expected 1 value, received 3 values: 1 2 3 17:50 Lajla: jonrafkind, hmm 17:50 Lajla: Ahh 17:50 Lajla: Racket doesn't use CPS does it? 17:51 jonrafkind: i dont think so 17:52 (join) MayDaniel 17:52 Lajla: And like, cps does remove this weight, right? 17:53 jonrafkind: yea 17:55 Lajla: Schweet. 17:56 Lajla: Maybe (most certainly) I am a total noob, but I am kind of scratching for a good reason to not use CPS. 18:20 (quit) MayDaniel: 18:27 (join) cinch 19:10 (quit) dnolen: Quit: dnolen 19:15 (quit) mheld: Quit: mheld 19:16 (quit) cinch: Quit: Leaving 19:33 (join) clklein_ 19:37 (join) fmu` 19:39 (quit) clklein: *.net *.split 19:39 (quit) fmu: *.net *.split 19:55 (quit) mceier: Quit: leaving 20:02 (join) mheld 20:02 (join) cinch 20:14 (join) aLeSD 21:16 (join) dnolen 21:21 (quit) aLeSD: Ping timeout: 240 seconds 21:39 (quit) dnolen: Quit: dnolen 21:49 (join) dnolen 22:02 (quit) dnolen: Quit: dnolen 22:04 (join) jay-mccarthy 22:36 (quit) jao: Ping timeout: 250 seconds 22:46 (quit) jay-mccarthy: Quit: jay-mccarthy 23:01 (quit) clklein_: Ping timeout: 240 seconds 23:06 (join) clklein 23:20 (join) jay-mccarthy 23:24 (quit) parcs: Quit: WeeChat 0.3.3 23:27 (join) zenlunatic 23:30 (join) parcs