00:47 (quit) zenlunatic: Quit: Lost terminal 01:45 (quit) jay-mccarthy: Quit: jay-mccarthy 01:59 (quit) mheld: Quit: mheld 02:22 (nick) fmu` -> fmu 03:15 (join) sunnyps 03:18 (quit) parcs: Ping timeout: 272 seconds 03:19 (join) parcs 03:21 (quit) jonrafkind: Ping timeout: 255 seconds 03:42 (join) evhan 03:46 (quit) evhan: Quit: evhan 05:36 (join) aLeSD 05:47 aLeSD: hi all 05:57 aLeSD: I have a problem 05:58 aLeSD: I am a problem 06:00 aLeSD: the question is : could I program in objects in racket ? 06:21 Lajla: aLeSD, you mean object oriented 06:21 Lajla: ? 06:21 aLeSD: yes 06:21 aLeSD: hi Lajla 06:22 Lajla: aLeSD, you can. 06:23 Lajla: As a matterof fact 06:23 Lajla: And if the searc function at the sie were a bit sooner. 06:23 Lajla: faster 06:23 Lajla: I'd give you the docs. 06:23 aLeSD: lol 06:23 aLeSD: thnaks 06:23 Lajla: http://docs.racket-lang.org/guide/classes.html?q=object%20oriented 06:23 Lajla: And there we go 06:26 aLeSD: Lajla, my idea is to create lots of object that I will use in my animations 06:26 aLeSD: what do u think ? 06:26 aLeSD: Is it a good idea 06:26 aLeSD: ? 06:40 (quit) aLeSD: Ping timeout: 255 seconds 06:54 (join) aLeSD 06:58 Lajla: aLeSD, not sure, I don't really use fluxus. 06:58 Lajla: And I have never been a fan of this type of OO. 06:58 Lajla: Where you go have to declare all kinds of stuff. 06:58 Lajla: I'll rather have the pure actor model. 06:58 aLeSD: np ... it is on racket 06:58 Lajla: And I think 'responses' are kind of silly. 06:59 Lajla: aLeSD, fluxus? 06:59 aLeSD: I have to do a recursion inside a function ? 06:59 aLeSD: and won't define another function outside 07:00 Lajla: aLeSD, yeah. 07:00 Lajla: Even loops in scheme are just syntactic sugar over recursion. 07:00 aLeSD: how ? 07:00 Lajla: Do you have your code? 07:00 Lajla: (Also, don't worry about it being inefficient, Scheme has tail call optimization which means that tail recursion will just get compiled to a loop) 07:00 aLeSD: give me the line I will code it and then show u 07:00 Lajla: What line? 07:00 Lajla: What do you mean? 07:01 aLeSD: I mean the command I have to use 07:01 aLeSD: I would like to use lambda 07:01 aLeSD: but then I have noname function to call for recusrsion 07:01 Lajla: For recursion? 07:01 aLeSD: yes 07:01 Lajla: Ahhh 07:01 Lajla: Well, you can use the named let. 07:02 aLeSD: mmm 07:02 Lajla: Which is actually used quite often, let me draw you an example. 07:02 aLeSD: understood 07:02 Lajla: You know how let works right? 07:02 aLeSD: I am using it for variables 07:02 aLeSD: let is the same o a block in c/c++ 07:02 aLeSD: {} 07:08 Lajla: aLeSD, http://codepad.org/oxEp9I3D 07:08 Lajla: Yeah, exactly. 07:08 Lajla: Except that they can go arbitrarily deep, and they evaluate to a value. 07:09 Lajla: Also, quite often, there is only going to be one expression inside the body. 07:09 Lajla: you can do more than one, but in rue schem style only one is used, and you generally only need one. 07:10 aLeSD: mm 07:11 aLeSD: if I want to create a temporary var I code 07:11 aLeSD: (let (a 5) ... ) ? 07:11 Lajla: No, (let ((a 5)) ...) 07:12 Lajla: Let is actually quite like a function. 07:12 Lajla: Where a is an argument 07:12 Lajla: And 5 is just directly passed to it. 07:12 Lajla: In fact, (let ((a 5)) ...) is completely identical to ((lambda (a) ...) 5) 07:12 aLeSD: mmm 07:12 Lajla: Which is what a lot of compilers rewrite it to before compilation 07:13 aLeSD: it gives me bad syntax 07:13 Lajla: (let ((a 5)) (+ a 4)) ? 07:13 aLeSD: maybe I have to code a body 07:14 aLeSD: ok 07:15 aLeSD: Lajla, I don't understand the double brackets 07:16 Lajla: aLeSD, well, it's when you want to have more than one binding. 07:16 Lajla: (let ((a 5) (b 3)) ...) 07:16 Lajla: That's why they are double. 07:16 aLeSD: I want one binding and a function 07:17 aLeSD: (let ((a 5)) recurs ((n )) ... ) 07:17 Lajla: Ahhh 07:17 Lajla: No, then you have to do (let blabla ((a 5)) (blabla (- a 1))) 07:17 Lajla: For instance 07:17 Lajla: Which will recur forever without stopping. 07:18 aLeSD: I want a global for the function 07:18 Lajla: You want to define a global name? 07:18 Lajla: Then you just use (define (blabla x) ...) 07:18 Lajla: At the top level. 07:18 aLeSD: I hate my english 07:18 Lajla: I love my English. 07:19 Lajla: aLeSD, what is your native language? 07:19 aLeSD: italian 07:19 aLeSD: spanish 07:19 Lajla: Ah, two languages I don't speak I guess. 07:20 aLeSD: I will improve my english 07:20 Lajla: Good boy. 07:20 Lajla: I will improve your grasp of functional programmin in the meanwhile. 07:32 aLeSD: Lajla, I am going crazy 07:36 Lajla: aLeSD, I am already wofully past that line. 07:37 (quit) aLeSD: Read error: Connection reset by peer 07:39 (join) jay-mccarthy 07:50 (join) aLeSD 07:59 (quit) aLeSD: Ping timeout: 240 seconds 08:32 (join) MayDaniel 08:32 (join) aLeSD 08:36 (join) martinhex 08:36 (quit) jay-mccarthy: Quit: jay-mccarthy 08:49 (nick) Lajla -> We 08:49 (nick) We -> Lajla 09:15 (join) mceier 09:27 (quit) aLeSD: Quit: Leaving 09:41 (quit) MayDaniel: Read error: Connection reset by peer 09:50 (join) jay-mccarthy 09:53 (quit) jay-mccarthy: Client Quit 10:03 (quit) sunnyps: Read error: Connection reset by peer 10:27 (join) jay-mccarthy 10:27 (quit) jay-mccarthy: Client Quit 11:25 (join) jay-mccarthy 11:53 (join) anRch 11:54 (join) MayDaniel 12:13 (quit) jay-mccarthy: Quit: jay-mccarthy 12:18 (join) jonrafkind 12:22 (join) mheld 12:25 (quit) anRch: Quit: anRch 12:28 (join) mwolfe 12:32 (join) anRch 12:39 (join) offby1` 12:40 (quit) offby1: Ping timeout: 260 seconds 12:58 (quit) anRch: Quit: anRch 15:15 (quit) jonrafkind: Read error: Connection reset by peer 15:18 (join) jonrafkind 16:37 (join) j`ey 16:37 j`ey: can anyone shed light on what mcons is? 16:39 jonrafkind: it makes a mutable cons 16:39 jonrafkind: cons just makes an immutable cons set 16:39 j`ey: oh okay, I got rid of it now anyway 16:39 j`ey: made sure it was in r5rs mode 16:39 jonrafkind: rudybot: eval (let ([x (mcons 1 2)]) (set-mcar! x 12) (mcar x)) 16:39 rudybot: jonrafkind: your sandbox is ready 16:39 rudybot: jonrafkind: ; Value: 12 17:02 (quit) tv|z: Ping timeout: 240 seconds 17:03 (part) j`ey 17:04 (join) tv|z 17:06 Lajla: So like, that conses are immutable by default, is this some performance choice? 17:06 Lajla: I also noticed yesterday that #lang racket doesn't like one-armed ifs. 17:07 jonrafkind: hm there is a blog post about the immutable vs mutable thing 17:10 Lajla: I will rely on you to find it since this is too vague to search for, and you are my little oracle. 17:11 jonrafkind: yea searching.. 17:12 jonrafkind: http://blog.racket-lang.org/2007/11/getting-rid-of-set-car-and-set-cdr.html 17:12 jonrafkind: finally 17:12 rudybot: http://tinyurl.com/2bws4fr 17:12 jonrafkind: it was older than i thought 17:13 Lajla: jonrafkind, most obedient. 17:14 jonrafkind sits in the corner 17:14 Lajla: You will receive less whipping tonight for this servitude. 17:15 Lajla: How does the above guarantee left to right order? 17:18 jonrafkind: immutable cons? 17:20 Lajla: Ah 17:20 Lajla: So cons guarantees it first evaluates it left operant 17:20 Lajla: and then its right? 17:21 jonrafkind: well thats racket's evaluation order 17:21 jonrafkind: all evaluation is left to right afaik 17:21 jonrafkind: i mean a macro can screw with that, but i dont think many do 17:21 Lajla: Oh okay. 17:21 Lajla: I gues. 17:22 Lajla: Never bothered to test that. 17:22 Lajla: Or look it up. 17:22 jonrafkind: you aren't supposed to rely on it supposdly 17:22 Lajla: So it's not really an efficiency decision? 17:22 Lajla: Yeah 17:22 Lajla: So that is why I do not care. 17:22 Lajla: Because I am a good boy. 17:22 Lajla: And seperate my functions which cause side effects from those that return a value. 17:23 jonrafkind: yesm 17:23 Lajla: I take that back, I don't when I handle ports. 18:13 (join) j`ey 18:55 (quit) sid3k: Remote host closed the connection 18:55 (join) sid3k 19:06 (quit) MayDaniel: Read error: Connection reset by peer 19:46 (part) j`ey 19:53 (join) dnolen 20:12 (quit) offby1`: Read error: Connection reset by peer 20:21 (quit) abbe: Quit: abbe 20:51 (quit) mwolfe: Remote host closed the connection 21:15 (quit) mceier: Quit: leaving 21:20 (quit) parcs: Ping timeout: 240 seconds 21:22 (join) parcs 22:05 (join) jay-mccarthy 23:16 (quit) dnolen: Quit: dnolen