00:02 (quit) mheld: Quit: mheld 00:03 (quit) stamourv: Read error: Connection reset by peer 00:03 (join) stamourv` 00:04 (quit) samth: Ping timeout: 250 seconds 00:05 (join) samth 00:29 (nick) offby1 -> ophphby1 01:00 (quit) mwolfe: Remote host closed the connection 01:11 (join) jonrafkind 01:26 Lajla: (call/cc jonrafkind) 01:27 Lajla: Ohhh 01:27 Lajla: (eqv? (compose) values) actually returns true 01:41 jonrafkind: rudybot: (eqv? (compose) values) 01:41 rudybot: jonrafkind: your sandbox is ready 01:41 rudybot: jonrafkind: ; Value: #t 01:41 jonrafkind: wtf 01:44 Lajla: jonrafkind, makes sense, no? 01:45 Lajla: values is the identity function 01:45 Lajla: From the perspective of a function that can take arbitrary arguments. 01:45 Lajla: It returns all those arbitrary arguments 01:46 jonrafkind: rudybot: (compose) 01:46 rudybot: jonrafkind: ; Value: # 01:46 jonrafkind: i did not know that 01:48 Lajla: jonrafkind, why not? I mean, values is basically the identity function, and a composition of nothing is the identity function. 01:48 Lajla: the identity function itself is the identity of functional composition and all that. 01:58 (join) Sam__ 01:58 Sam__: Is my function "summe" a higher order function ? http://codepad.org/2tihMehw 01:59 Lajla: Sam__, ah 01:59 Lajla: At last, you are back 01:59 askhader: Sam__ No. 01:59 Lajla: It is not. 01:59 Lajla: A higher order function is a function which takes a function as argument. 02:00 jonrafkind: Sam__, if you passed `f' into summe then `summe' would be higher order 02:01 Lajla: What you basically want is this: http://codepad.org/XDThKK1p 02:02 Lajla: jonrafkind, see, you can do it. 03:13 Sam__: i read in my book a higher order function is a function which takes a function as a argument AND/ OR has a Functions as output 03:13 Sam__: is this wrong ? 03:21 Lajla: No 03:21 Lajla: that's cool. 03:27 Sam__: Ok is this (apply + (map abs '(1 2 3 -4))) higher order func ? 03:28 Lajla: Both map and apply are higher order functions 03:28 Lajla: abs is not. 03:29 (quit) jonrafkind: Ping timeout: 250 seconds 03:39 (join) aLeSD 03:48 (quit) Sam__: Ping timeout: 265 seconds 04:26 (quit) aLeSD: Ping timeout: 246 seconds 05:22 (quit) unkanon-work: Ping timeout: 255 seconds 05:23 (join) unkanon-work 05:44 (quit) unkanon-work: Ping timeout: 240 seconds 05:46 (join) unkanon-work 06:21 (nick) ophphby1 -> offby1 06:37 (join) sam__ 06:38 sam__: How i can romove a quote ? ''(0 0 1) -> '(0 0 1) ?? 06:39 offby1: cdr 06:39 offby1: rudybot: ''(0 0 1) 06:39 rudybot: *offby1: your scheme sandbox is ready 06:39 rudybot: *offby1: ; Value: (quote (0 0 1)) 06:39 offby1: rudybot: (cdr ''(0 0 1)) 06:39 rudybot: *offby1: ; Value: ((0 0 1)) 06:39 offby1: oops :-) 06:39 offby1: rudybot: (second ''(0 0 1)) 06:39 rudybot: *offby1: ; Value: (0 0 1) 06:39 offby1: *ahem* 06:47 clklein: sam__: ''(0 0 1) is shorthand for (quote (quote (0 0 1)), which is a list where the first element is the symbol quote and the second element is the list containing 0, 0, 1 06:47 clklein: quote is surprising at first 06:47 sam__: Nad 06:48 sam__: And how i can easy remove the first ' ? 06:49 clklein: You have a list containing two elements: 'quote and '(0 0 1). 06:50 clklein: You want to extract the second element of that list. 06:50 clklein: Do you know how to get 7 out of '(3 7)? 06:51 sam__: yea cdr lst 06:51 sam__: hmm i know hat you want to say me 06:51 sam__: ok i try something with my code 06:53 clklein: (cdr '(3 7)) is '(7). I think you want (car (cdr '(3 7)) = 7 06:54 clklein: alternatively, (second '(3 7)) = 7 06:55 offby1: why does that sound so familiar 07:11 (quit) coldhead: Quit: Bothallchoractorschumminaroundgansumuminarumdrumstrumtruminahumptadumpwaultopoofoolooderamaunsturnup 07:38 (join) Yann3 07:38 (quit) Yann1: Ping timeout: 240 seconds 07:42 (join) masm 07:48 (join) Qvist_ 07:56 (quit) sam__: Ping timeout: 265 seconds 08:05 (join) mheld 08:31 Lajla: clklein, I find that this is the part that silly way of saying that 'quote is a symbol goes wrong.i 08:33 (join) MayDaniel 08:35 clklein: offby1: because you jumped right to the answer without explaining why :) 08:36 clklein: Lajla: I don't understand. (symbol? 'quote) is true. 08:37 Lajla: I was under the impression that a function call evaluated each sub expression in the environment of the function call. 08:37 Lajla: What you mean to say is 'In most environments the datum 'quote _evaluates_ to the symbol quote. 08:38 Lajla: 'quote however is a list of two identifiers/symbols quote and quote. 08:38 Lajla: In things like ''quote or (let ('-) '3) it shows just how easily it can break, I really don't like it. 08:38 Lajla: Especially that defenders of seeing like that often don't do so consistently and get caught up in it. 08:39 Lajla: Like jonrafkind first saying that a symbol evaluates to itself because 'quote is a symbol and later having to admit that the idea is meaningless because everything evaluates to itself under this model. 08:40 clklein: I don't think it's accurate to say that 'quote is a list. 08:40 Lajla: Of course it is, it just _evaluates_ to a symbol, and only does so in specific environments. 08:40 clklein: In the same way that (+ 1 5) is not a list 08:41 Lajla: (ऋऋ+ 1 5) is a list, it however evaluates to a number 08:41 Lajla: You can at max say that considered an expression its _value_ is a number. 08:41 Lajla: But since racket is not purely functional, an expression is not identical to its value. 08:41 Lajla: And this still depends on the environment. 08:41 clklein: When you say it's a list, you're referring to one particular representation of the abstract syntax 08:42 clklein: and it's not even the one that Racket uses 08:42 Lajla: In the environment created by (let ('-) 'quote) is most certainly not a symbol. 08:42 Lajla: I'm referring to a definition that doesn't break up on itself. 08:43 Lajla: In any case saying 'quote is a symbol is incomplete. You can make it work, but you have to say 'in an environment which .... 'quote is a symbol' 08:43 (join) lucian 08:43 Lajla: Because what it "is" depends on the environment it is situated in. 08:43 Lajla: Which is very nonstandard use of the term "is" in programming languages, but not for the term "evaluates to" 08:44 Lajla: Also, how are you going to explain the difference between syntax and function calls in this idea? 08:44 Lajla: Clearly if you say that (+ 1 2) "Is" a list et cetera, you no longer say that a function call evaluates its sub forms. 08:44 Lajla: So what does syntax do, it devaluates them? 08:44 clklein: I have no idea what you're talking about 08:45 Lajla: clklein, like I said if 'quote "is" a list or not in your model depends on the environment. 08:45 clklein: No 08:45 Lajla: In the local environment created by (let ((quote +)) ...) 08:45 Lajla: 'quote isn't a symbol. 08:46 Lajla: The syntax becomes erronous. 08:46 clklein: I'm just objecting to you referring to every piece of abstract syntax as a list 08:46 clklein: That's not useful or correct. 08:46 Lajla: It doesn't break apart though. 08:46 (quit) MayDaniel: Read error: Connection reset by peer 08:46 Lajla: Under (let ((quote +)) ...) 08:47 Lajla: I'm fine with calling it syntax and not saying it's a list. 08:47 (quit) _danb_: Ping timeout: 255 seconds 08:47 Lajla: But there is still a destinction between "is" something and "evaluates to" something. 08:47 Lajla: "is" is irrespective of surrounding context and environment at the very least in standard terminology. 08:47 clklein: OK 08:47 Lajla: 'quote is an expression which evaluates to a symbol in most contexts. 08:48 clklein: that's fine 08:48 clklein: I don't disagree. 08:49 Lajla: clklein, well, I do disagree with you, sorry. =( 08:49 Lajla: But 08:49 (join) dnolen 08:49 Lajla: I would say that your view is also valid if you extend it and say" 'quote is a symbol in an environment that meeds certain criteria" 08:50 Lajla: Then you just use the word "is" different than I do, albeit noncontradictory and consistently 08:50 clklein: Lajla: You're welcome to 08:50 Lajla: Variety is the spice of life and diversity the source of creativity. 09:14 (join) mceier 09:15 (quit) lucian: Remote host closed the connection 09:16 (join) jao 09:16 (quit) jao: Changing host 09:16 (join) jao 09:16 (quit) Qvist_: Quit: leaving 09:18 (join) corruptmemory 09:32 (quit) mheld: Quit: mheld 09:34 (join) Yann1 09:35 (quit) Yann3: Ping timeout: 240 seconds 09:37 (join) Samy 09:41 Samy: I want generate all possible list of lists like this '('(1 0 0) '(1 0 0) ' (1 0 0) each clip can be (1 0 0) or ( 0 1 0) or ( 0 0 1) . Can pls say to me how i can do that ? 09:45 (part) mattmight 09:45 Lajla: See, this is what you get, now you let him to believe that '('(1 0 0) '(1 0 0) '(1 0 0)) is a list of lists rather than a list of lists of lists. 09:45 Lajla: Samy, what you want is '((1 0 0) (1 0 0) (1 0 0)) 09:48 Samy: yea 09:48 Samy: I want this 09:48 Samy: I must generate all variations of it 09:48 Samy: you know how i can do that ? 09:49 (quit) dnolen: Quit: dnolen 09:50 Samy: I need lists like this '((1 0 0) (1 0 0) (1 0 0)) or '((0 1 0) (1 0 0) (1 0 0)) or '((0 0 1) (0 1 0) (1 0 0))..... 09:56 (join) mheld 10:08 Samy: Pls help :D 10:19 Samy: I need lists like this '((1 0 0) (1 0 0) (1 0 0)) or '((0 1 0) (1 0 0) (1 0 0)) or '((0 0 1) (0 1 0) (1 0 0))..... generate all posible variations 10:19 Samy: can some one tell me how i can do that ? 10:21 (join) MayDaniel 10:23 unkanon-work: you probably need a permutations function 10:25 unkanon-work: http://www.dreamincode.net/forums/topic/19935-recursive-permutations-in-scheme/ 10:25 rudybot: http://tinyurl.com/38hlh9k 10:29 Samy: yea thx i did it i think 10:29 (quit) mheld: Quit: mheld 10:44 (join) lucian 11:09 (quit) lucian: Remote host closed the connection 11:18 (quit) stamourv`: Quit: ERC Version 5.2 (IRC client for Emacs) 11:25 (join) anRch 11:25 (quit) jeapostrophe: Quit: jeapostrophe 11:28 (join) mheld 11:35 (join) stamourv 11:44 (join) jonrafkind 11:50 (quit) MayDaniel: 12:03 bremner: anyone know why "define-type" in #lang plai is so expensive? It takes like 10 seconds to compile a single form in DrRacket, with tons of garbage collection on a 3GHz Core II Duo. 12:03 samth: bremner, you could look at the expansion 12:05 (quit) Samy: Quit: Page closed 12:07 (join) carleastlund 12:08 bremner: do you mean look at the plai source, or something fancier? 12:09 samth: i mean hit the 'macro stepper' button and see what your short program expands to 12:09 bremner: yeah, I thought you might mean that, but the button is greyed out :( 12:09 samth: hmm 12:09 samth: what language is drracket set to? 12:10 bremner: plai (declared in source) 12:11 samth: when i do that, the macro stepper button is available 12:14 bremner: oh wait, I was looking at the wrong thing, sorry. 12:14 (quit) anRch: Quit: anRch 12:21 (join) anRch 12:21 (quit) mheld: Quit: mheld 12:22 Yann1: Hi, how can I include a file that isn't a module? I just want to split up a big file into logical sections. 12:24 samth: Yann1, I recommend splitting the file up into multiple modules 12:24 samth: is there a reason you can't do that? 12:24 Yann1: samth: but modules have another scope then 12:25 samth: why is that a problem? 12:25 carleastlund: Yann1, you can always put "(provide (all-defined-out))" in the modules, so that everything in them is available to their clients. 12:25 Yann1: samth: I would like to access 'global' variables 12:25 Yann1: carleastlund: yeah but not in the other direction 12:25 samth: put those 'global' variables in their own module, then all of them can be accessed from any module 12:26 carleastlund: Yann1, perhaps you want units? They allow recursive linking. Or what samth said. 12:27 bremner: samth: the expansion is about 340 lines. http://paste.debian.net/103896/ Is that as fast as can be expected then? 12:28 Yann1: carleastlund: but can't I just tell the compiler to include the code of a file without all this stuff? 12:29 carleastlund: Yann1, only in really hackish ways. Modules are the feature designed for splitting up code into logical units. Reinventing the wheel will almost certainly not work as nicely. 12:30 carleastlund: Look up "include", though. I don't recommend it in general, but it sounds like what you want. 12:30 samth: bremner, what was the original code? 12:31 samth: most of that is the expansion of contracts, and is unsurprising 12:31 samth: nothing there should take 10 seconds 12:31 carleastlund: The problem with "include" is that if you include one file from multiple different places, they might each compile the code to something completely different. Whereas a module is guaranteed to produce the same code for all clients. 12:32 Yann1: carleastlund: include testcase: file1: http://pastebin.com/aHsHwAxk file2: http://pastebin.com/NNj98NCg I always get this error: http://pastebin.com/G9YMrkg8 12:33 carleastlund: Yann1, that's "load", not "include". And by putting in "#lang scheme", you made both files into modules. 12:34 Yann1: carleastlund: sorry wrong testcase, but removing #lang worked! thanks!! 12:34 (quit) anRch: Read error: Connection reset by peer 12:35 carleastlund: Yann1, I'm not sure that "load" is going to work how you expect -- any "global variables" you import will be bound in the namespace used by "eval", but not in the actual module that imports them. 12:35 Yann1: carleastlund: im using include and now it works 12:36 carleastlund: Yann1, Okay, just giving you a heads up on a potential bug, so if you run into it down the road you'll know what's up. But more power to you if you avoid it! 12:36 (join) anRch_ 12:38 Yann1: carleastlund: okay. thanks 12:38 (quit) anRch_: Read error: Connection reset by peer 12:40 (join) anRch 12:44 (quit) anRch: Client Quit 12:46 (join) MayDaniel 13:16 bremner: samth: the original code is http://paste.debian.net/103901/ 13:28 samth: bremner, that's basically instant for me 13:29 bremner: samth: what version of racket? 13:29 samth: 5.0.99.6 13:29 stamourv: bremner: are all your collects compiled? 13:29 samth: ie git from yesterday 13:31 bremner: stamourv: hmm. maybe not. should the compiled stuff live in the same hierarchy under collects? 13:31 samth: yes 13:31 samth: bremner, try running 'raco setup plai' 13:32 bremner: yeah, there is no collects/plai/compiled directory. OK, so this is must likely the problem. 13:37 bremner: OK, I tried it on a different install with compiled collects and that is much faster. So I have just to figure out my install problem. 13:37 bremner: thanks for hints. 13:44 stamourv: make install should compile all the collects 13:44 stamourv: did you interrupt it? 13:46 bremner: stamourv: I'm just investigating. I'm alpha-testing debian packages, so it is likely a packaging error. 13:51 stamourv: ok 13:51 (join) anRch 14:02 bremner: hmm. In my build log, I see no "raco setup: made plai" but rather "raco setup: made: /plai" 14:03 (quit) MayDaniel: Read error: Connection reset by peer 14:03 (nick) unkanon-work -> rien 14:12 askhader: 5 14:32 bremner: hmm. It looks like I need to convince raco setup to ignore $(HOME)/.racket/$version/collects. Is there a flag for that? 14:43 samth: raco setup --no-user 14:44 bremner: perfect, thanks 14:45 bremner: I'm afraid I didn't completely understand the output of "racko help setup" 14:45 (join) mheld 15:21 (quit) mheld: Quit: mheld 15:40 (quit) anRch: Quit: anRch 15:51 (join) coldhead 15:51 (join) Yann3 15:51 (quit) Yann1: Ping timeout: 240 seconds 15:54 (join) mheld 16:06 (join) mwolfe 16:26 (join) MayDaniel 16:29 (quit) MayDaniel: Client Quit 16:41 (join) MayDaniel 17:03 (quit) tv|z: Ping timeout: 240 seconds 17:05 (join) tv|z 17:16 samth: eli, ping 17:29 (quit) MayDaniel: Read error: Connection reset by peer 17:49 (quit) Yann3: Ping timeout: 240 seconds 17:49 (join) Yann1 17:59 (nick) samth -> samth_away 18:10 _p4bl0: hi all 18:11 (quit) mheld: Quit: mheld 18:11 (nick) rien -> rien_home 18:12 _p4bl0: is there a way when drawing in a canvas to have a temp buffer (in order to draw in the buffer and then paste the whole buffer on the actual canvas, so I can avoid blinking when redrawing everything) ? 18:20 (join) jeapostrophe 18:51 (quit) parcs: Ping timeout: 240 seconds 18:52 (join) parcs 18:54 (nick) unkanon -> rien 19:28 (join) vivitron 19:32 (quit) masm: Quit: Leaving. 19:42 (quit) tv|z: Quit: leaving 19:46 (quit) mceier: Quit: leaving 20:20 (quit) mwolfe: Remote host closed the connection 20:29 (join) mheld 20:32 bremner: oops. If I pass --no-user to raco setup it still seems to pick up plai package in my home dir during testing. http://paste.debian.net/103949 20:33 (quit) jonrafkind: Ping timeout: 264 seconds 20:35 rien: _p4bl0: I can't help but just so you know, that's called "double buffering", it may help you google for an anser 20:35 rien: answer* 20:39 rien: _p4bl0: http://lists.racket-lang.org/users/archive/2009-April/032035.html 20:49 (quit) carleastlund: Quit: carleastlund 20:57 (join) Yann3 20:58 (quit) Yann1: Ping timeout: 240 seconds 21:49 (join) tv|z 21:53 (nick) cky -> Zba2Y7Pr3 21:56 (quit) tv|z: Remote host closed the connection 22:00 (join) tv|z 22:27 (join) rmitt 22:29 (quit) rmitt: Client Quit 22:30 (join) rmitt 22:30 rmitt: Why the "m" series for mutable pairs? Why not stick to the Scheme standard on this one? 22:39 rmitt: Hello, I just asked a brilliant question. Isn't everyone going to drop what they're doing and admire my brilliant question, offer to feed me and massage me, and then answer it? 22:39 Lajla: rmitt, because they it in reverse. 22:39 Lajla: THey want all the old code which used cons to use immutable pairs. 22:40 Lajla: And basically say that if you used pairs mutably you sucked anyway and your code deserves to be broken. 22:40 (quit) corruptmemory: Ping timeout: 240 seconds 22:40 Lajla: What I would rather have though is a list-cons. 22:40 Lajla: And a designated list type. 22:40 Lajla: Basically list cons demands its second argument to be of the list type. 22:40 Lajla: And only has a mutable car field. 22:40 rmitt: yes yes, a proper list 22:40 Zba2Y7Pr3: This is getting into Typed Racket territory. 22:40 Lajla: Yeah, it makes list? also run in constant time. 22:40 Lajla: Not at all. 22:41 rmitt: I don't see why it's a sin to use set-car! etc. How else would you implement, say, a mutable stack or queue? 22:41 Lajla: Just a list-cons, which is like cons, except that what ever it produces has a type list, and it requires its second argument to be a type list. 22:41 Lajla: rmitt, it's not a sin. 22:42 Lajla: IT's perhaps just historically a bit uncomfortable that lisp never had a proper list type and ad hoced it. 22:42 Lajla: So that set-cdr! could make an object that once was a list not a list any more. 22:43 Zba2Y7Pr3: rmitt: What's the use case for a mutable stack? 22:43 rmitt: dunno 22:44 Lajla: rmitt, you can actually also use a vector for that. 22:44 (quit) tv|z: Quit: leaving 22:44 Lajla: A vector of two elements. 22:45 Zba2Y7Pr3: rmitt: If there is no use case for a mutable stack, why would you even mention it? O_o 22:45 Lajla: Freedom of speech, baby. 22:45 Zba2Y7Pr3: Heh. 22:46 rmitt: Forget I mentioned it. I'm just in a tizzy because the standard has been abandoned. 22:46 (join) tv|z 22:47 Lajla: rmitt, #lang racket != scheme 22:47 Lajla: That is why they renamed it racket from PLT scheme. 22:47 Lajla: If you use #lang r5rs you get your old stuff back 22:47 rmitt: since proper lists are not a type in Scheme/Lisp, one could argue that set-car! & set-cdr! sit in the language more naturally than do set-mcar! & set-mcdr! 22:47 rmitt: Lajla: yes, I'm aware of that. 22:48 rmitt: Well the problem is that I want r6rs. 22:48 rmitt: ...which keeps set-car! etc..right? 22:48 Lajla: rmitt, yap. 22:48 Lajla: but it banishes them to their own library. 22:48 Lajla: rmitt, in Clojure, lists are actually a proper type. 22:48 Lajla: And there are no cons cells. 22:48 Lajla: I'd rather have both. 22:49 Lajla: Lists as a proper type AND cons cells. 22:49 Lajla: What I do really like about clojure though is the fact that nil, false, and the empty list are destinct values. 22:49 Zba2Y7Pr3: Supporting cons cells on the JVM sounds very icky. I guess that's why Clojure ditched it. 22:53 Lajla: supporting sanity on the JVM is very icky. 22:53 rmitt: r6rs is icky 22:53 Lajla: He had to make a lot of compromises in what he wanted to get it to run on the JVM. 22:53 Lajla: Most prominently no TCO, which he likes. 22:53 Lajla: rmitt, why? 22:53 rmitt: can't do anything unless you import, import, import 22:54 Lajla: Is that bad 22:54 Lajla: ? 22:54 Zba2Y7Pr3: rmitt: That's usually seen to be a feature, not a bug. 22:54 rmitt: fine 22:54 rmitt: more work for a programmer 22:54 Lajla: Well, it's also a feature that C can do whatever it wants if you access out of bounds 22:54 Lajla: still not desirable. 22:54 Lajla: rmitt, you come pretty far with (import (rnrs (6))) though 22:54 Zba2Y7Pr3: Lajla: Nasal demons are a feature? :-O 22:57 rmitt: these diverging standards are a mess 22:58 rmitt: ok, good night 22:58 (quit) rmitt: Quit: Page closed 23:16 (quit) tv|z: Quit: leaving 23:19 (join) tv|z 23:44 (quit) coldhead: Quit: Lukkedoerendunandurraskewdylooshoofermoyportertooryzooysphalnabortansporthaokansakroidverjkapakkapuk 23:54 (nick) Zba2Y7Pr3 -> cky