00:16 samth: you don't need `define-syntax' for that 00:16 ttuttle: Yeah, I figured that out. 00:16 ttuttle: Or, rather, a friend told me. 00:21 (join) jonrafkind 00:34 (quit) hanDerPeder: Quit: hanDerPeder 00:40 (join) writer 02:16 (quit) jonrafkind: Ping timeout: 240 seconds 02:55 (join) PascalHunger 02:55 PascalHunger: where is the docs on web development in scheme? 03:04 (quit) Lajla: Ping timeout: 252 seconds 03:10 (join) kingless 03:20 (quit) kingless: Ping timeout: 240 seconds 03:23 (join) kingless 03:28 (join) neilv 03:28 (join) Lajla 03:29 Lajla: ttuttle, define-syntax is amazing, but not as amazing as + 03:29 Lajla: The ability to add numbers is surely even more remarkable and indispensable, thank you David Hilbert 03:37 (quit) neilv: Ping timeout: 245 seconds 03:41 (join) neilv 03:41 (quit) neilv: Changing host 03:41 (join) neilv 04:57 (join) masm 04:59 (quit) rbarraud: Ping timeout: 240 seconds 05:00 (join) rbarraud 05:07 (quit) kingless: Quit: Colloquy for iPad - http://colloquy.mobi 06:33 (join) hanDerPeder 06:48 (join) MayDaniel 07:47 (quit) neilv: Quit: Leaving 08:23 (join) orukum 08:36 (quit) orukum: Quit: Page closed 08:48 (quit) rbarraud: Read error: Connection reset by peer 08:48 drdo: I was enjoying racket, but then i saw the object system, i'm disappointed :( 08:56 (join) danbrown 09:11 (join) mceier 09:14 (join) Nanakhiel 09:18 (quit) Lajla: Ping timeout: 259 seconds 09:27 (nick) Nanakhiel -> lajla 09:57 lajla: drdo, why? 10:06 drdo: I prefer CLOS 10:09 bremner: What is better about clos 10:10 bremner: ? 10:14 (join) b-man_ 10:23 (part) drdo: "ERC Version 5.3 (IRC client for Emacs)" 10:27 lajla: I don't really like CLOS either 10:36 (quit) MayDaniel: Read error: Connection reset by peer 10:46 (join) anRch 10:50 (quit) mceier: Quit: leaving 11:03 (join) MayDaniel 11:06 (quit) hanDerPeder: Quit: hanDerPeder 11:10 (join) hanDerPeder 11:38 (quit) anRch: Quit: anRch 11:41 (join) spidermario 11:59 (quit) MayDaniel: Ping timeout: 245 seconds 12:08 (join) chris____ 12:08 (quit) chris____: Client Quit 12:21 (quit) b-man_: Remote host closed the connection 12:51 (join) MayDaniel 12:56 (quit) emma: Ping timeout: 276 seconds 12:57 (join) emma 13:26 (join) X-Lorrien 13:27 X-Lorrien: Hi people, please, can somebody give me a little help about "if" in SCHEME? 13:31 X-Lorrien: I am doing homework and i must to do little function Signum, returns -1 if the input is negative, 0 if the input is 0 and 1 when the input is positive. I wrote this little piece of code, but it isn't work well... 13:31 X-Lorrien: (define signum 13:31 X-Lorrien: (lambda (w) 13:31 X-Lorrien: (if (< w 0) -1) 13:31 X-Lorrien: (if (> w 0) 1 0))) 13:32 X-Lorrien: can you help me? 13:33 X-Lorrien: I am newbie,yesterday i firslty hear about Scheme 13:46 ttuttle: X-Lorrien: Can you describe how your function is supposed to work? 13:46 ttuttle: X-Lorrien: (Like, just explain the logic you used?) 13:50 lajla: X-Lorrien, basically, scheme has no return primitive 13:50 lajla: it always returns the last expression 13:50 lajla: Which in this case is (if (> w 0) 1 0) 13:50 lajla: All other expressions' values are discarted, they are only used as side effect. 13:51 lajla: So what you want is (if (< w 0) -1 (if (> w 0) 1 0)) 13:51 lajla: It first checks if it's below zero, if so, it's done, else it does the second. 13:51 lajla: Luckily, to avoid countless nested if statements scheme offers cond. 13:52 lajla: So you can use (cond ((< w 0) -1) ((> w 0) 1) (else 0)) 13:52 ttuttle: lajla: Does anyone else use square brackets instead of parens sometime? 13:52 ttuttle: lajla: I use them for the cases in cond, case, and such. 13:52 lajla: Or more idiomatically: (cond ((positive? w) 1) ((negative? w) -1) (else 0)) 13:52 lajla: I basically don't use them, ttuttle. 13:52 ttuttle: Okay. 13:52 lajla: I find them more destracting than readable to the honest. 13:53 lajla: Clojure even mandates them 13:53 ttuttle: Wow. 13:53 lajla: Like (let (x 1 y 2) (+ x y)) is grammatically invalid 13:53 lajla: ttuttle, well, ( and [ are different things in clojure 13:53 lajla: ( ... ) is a list, [ ... ] is a vector 13:53 ttuttle: Ah. 13:53 lajla: So in the case of let, you simply supply the bindings in a vector. 13:54 lajla: Of course, this is done to let the brackets stand out 13:54 lajla: (let [x 1 y 2] (+ x y)) is the form there 13:54 ttuttle: Is (let (x 1 y 2) (+ x y)) valid in Racket? (I don't think so?) 13:54 lajla: Nope 13:54 ttuttle: That's sorta cool. 13:54 lajla: Clojure doesn't use inner lists 13:54 lajla: It just uses (let [name1 value name2 value name3 value] ...) in let 13:55 ttuttle: Weird. 13:55 ttuttle: Argh. I have an ethics essay to write, and a really cool Racket program I'm working on >.< 13:56 lajla: My own lisp uses {local (name value) (name2 value2) ...} 13:56 lajla: Where { .. } is also significant 13:56 lajla: ethics essay? 13:56 ttuttle: Yeah. I'm taking an intro ethics course, and we have an essay due Thursday. 13:56 ttuttle: It is far less exciting than the program I am writing. 13:57 lajla: What is an ethics course? 13:57 lajla: THey teach you to be a polite good girl? =) 13:58 ttuttle: It's more about discussing different perspectives on what is good and bad ethically. 13:58 ttuttle: lajla: Things like this: http://en.wikipedia.org/wiki/Trolley_problem 13:59 lajla: Ahh, that. 13:59 lajla: Well, what if you are the mad philosopher? 13:59 lajla: From your utility, obviously the more people that die the better. 14:00 ttuttle: *shrugs* I'm just going to stay away from trolley switchyards from now on. 14:00 lajla: Which is not that uncommon in the human psyche. School shooting isn't rare or something. 14:01 lajla: THis is why samth considers me weird I guess. =( I once told him that I would sooner give money to a man who has a hard time coming by but has killed my sister than money to a man who has enough money to live, but did not do so. 14:01 (quit) MayDaniel: Read error: Connection reset by peer 14:01 ttuttle: That is certainly an odd set of priorities, by my standards. 14:02 lajla: Well, I it would be kind of arrogant to consider one unworthy of money simply because they kill people who are important to _me_ right? 14:02 ttuttle: Unworthy of _your_ money, I think, would be fair? 14:03 ttuttle: Although, yeah, from a purely utilitarian standpoint, as long as they're not using the money to kill /more/ of your relatives, it's fair. 14:03 lajla: That person has compromised my utility because I value to the company of my sister. But I don't see the relevance to how high on the prorities that person is to receive money. 14:03 lajla: ttuttle, well, it was about buying food I guess. 14:03 ttuttle: lajla: Okay, that's fair, if you don't hold grudges. 14:03 lajla: But I don't really see the relevance of whence the money comes. 14:03 lajla: Well, I would most likely do to a person who killed my sister. 14:03 lajla: As in, I would have a hard time spending time with that person because it reminds me of it. 14:03 X-Lorrien: Lajla "It first checks if it's below zero, if so, it's done, else it does the second. 10/09/2010 07:51:24 PM" Thanks a lot, now I understand :-) Very easy logic is used here :-) 14:04 lajla: But I would have no desire to make that person eat less. 14:04 lajla: X-Lorrien, yeah, I would use cond in stead of nested if's though 14:04 ttuttle: X-Lorrien: Do you see why your original version was wrong? 14:04 X-Lorrien: Yes, I see it... 14:04 ttuttle: Okay. 14:04 ttuttle: (Good.) 14:04 X-Lorrien: Thank you 14:05 X-Lorrien: Lajla: what about your Czech? :-D 14:09 lajla: X-Lorrien, ahh, you. 14:09 X-Lorrien: Yes :-) 14:09 (join) mceier 14:09 lajla: X-Lorrien, http://codepad.org/EC9wI6Nj 14:09 lajla: This is perhaps giving you some insight 14:30 (part) X-Lorrien 14:33 (join) rmitt 14:44 (quit) rmitt: Quit: Page closed 14:50 lajla: ttuttle, by he way, in clojure. the comma counts as whitespace. 14:50 ttuttle: :O 14:50 ttuttle: That's really strange. 14:50 lajla: So you can actually do (let [x 3, y 4] (+ x y)) if you want 14:51 lajla: unquote is ~ there 14:51 lajla: But you can't put commata in identifiers that easily as a consequent. 14:51 lajla: You can do like (defn [x, y, z] ...) if you want 14:51 lajla: (defn f [x, y, z] ...)* of course 14:52 ttuttle: what's the * after the ) for? 14:52 lajla: Also, vectors are not self-evaluating, they evaluate to a vector that contains all the evaluations of the elements 14:52 lajla: ttuttle, to signify that I correct myself. =) 14:52 lajla: Not part of clojure syntax itself. 14:52 ttuttle: oh, okay 14:52 lajla: Like, the vector [(+ 1 2) (+ 2 3)] in clojure, which is a vector of lists, evaluates to the vector [3 5] 14:52 ttuttle: That looked like an odd bit of syntax. 14:53 ttuttle: lajla: Ooh, that is useful. 14:53 lajla: Yeah, you basically use [ ... ] notation instead of (vector ...) there 14:53 lajla: it sort of comes down to that. 14:53 lajla: But you can also quote vectors to stop evaluation of course. 14:54 lajla: '[(+ 1 2) (+ 2 3)] in clojure evaluates to a vector, whereas '(vector (+ 1 2) (+ 2 3)) in scheme is a list starting with the symbol vector. 14:56 (quit) writer: Quit: writer 14:57 lajla: But clojure doesn't have TCO so I will hate it forever. 14:57 lajla: ALso, it doesn't have cons pairs. 14:57 ttuttle: TCO? 14:58 lajla: Hikey thought that was best kept away from the user. 14:58 lajla: ttuttle, tail call optimization 14:58 ttuttle: Ah. 14:58 lajla: Hash tables also evaluate in the same way as vectors do, as do sets. 14:58 ttuttle: Um, don't most languages just do TCO if the last thing you in a function is a function call? 14:59 lajla: So you can write down a set like ^{(+ 1 2) "a set" of "random" :elements} and it will look up what 'of' is bound to. 14:59 lajla: ttuttle, that is the idea of tco yeah. 14:59 (join) writer 14:59 ttuttle: Why would they avoid that? 14:59 lajla: But Clojure doesn't. 14:59 lajla: Well, clojure runs on the JVM 14:59 lajla: And it uses a standard java calling model. 14:59 lajla: And the JVM has no TCO, basically. 15:00 lajla: At least, that is how Hikey explains it. 15:00 lajla: I'm not sure, because Kawa does have TCO, and also runs on the JVM. 15:00 lajla: But I guess Kawa uses a trampoline or something, and Clojure uses standard java method calls. 15:03 bremner: lajla: I thought Kawa didn't have TCO. I could be wrong of course. 15:04 lajla: bremner, if it doesn't have TCO it's not a scheme now is it? 15:04 lajla: But maybe it's not a scheme and they just lie, who knows. =) 15:04 bremner: right. Not sure why I think that it doesn't. 15:05 lajla: bremner, the guys on #clojure told me I think that kawa uses CPS, and though it does offer advantages with tail calls, overal it's faster to just use normal method calls. 15:05 bremner: ah, it does, if you use --full-tail-calls 15:05 lajla: Clojure, unlike scheme is more geared towards practicality over elegance. 15:05 lajla: bremner, at what penalty? 15:06 bremner: not calling "normal" code 15:06 bremner: i.e. java stuff 15:06 bremner: also, supposedly it is slower 15:06 (join) anRch 15:06 bremner: http://www.gnu.org/software/kawa/Restrictions.html 15:07 lajla: Seems to me that a lot of the scheme codebase won't work in it, espeically the things people often cite as examples of scheme. 15:08 lajla: But I guess you get that with the JVM. 15:08 lajla: What would be interesting though is some sort of CPS like bytecode running on a virtual machine. 15:08 lajla: Like some 'cps assembly' or stuff. 15:09 lajla: Some really primitive assembly that only understands some thing that corresponds to some cps 15:15 lajla: bremner, let's talk about our love. 15:15 lajla: I hurd it is pretty damn huge. 15:20 bremner categorically denies everything 15:33 lajla: bremner, admit, you love me. 15:33 lajla: For my cute eyes and my poor knowledge of scheme 16:07 (quit) writer: Quit: writer 16:27 (quit) anRch: Quit: anRch 16:51 (join) b-man_ 17:01 (quit) b-man_: Ping timeout: 252 seconds 17:22 (join) MayDaniel 17:51 (join) bleakgadfly 18:04 (quit) spidermario: Remote host closed the connection 18:09 (join) rbarraud 18:17 (quit) MayDaniel: 19:12 PascalHunger: I like scheme better then the jvm based langs that are similar 19:33 (quit) bremner: Remote host closed the connection 19:34 (join) bremner 19:35 (quit) bremner: Read error: Connection reset by peer 19:37 (join) bremner 19:38 (quit) bremner: Remote host closed the connection 19:38 (join) kodiak 19:39 kodiak: hi 19:39 (join) bremner 19:39 (join) tommc 19:40 (quit) bremner: Read error: Connection reset by peer 19:40 (quit) kodiak: Client Quit 19:42 (join) bremner 20:12 (quit) danbrown: Quit: danbrown 20:15 (quit) bremner: Remote host closed the connection 20:17 (join) bremner 20:19 (quit) mceier: Quit: leaving 20:30 (quit) masm: Quit: Leaving. 20:41 (join) jonrafkind 20:49 (quit) tommc: Ping timeout: 265 seconds 22:01 MarcWeber: Does someone know whether I can compile current Vim with racket support? Or should I still try to package plt scheme for that reason? 22:54 bleakgadfly: Let me know if you find an answer to that question :) 23:25 (quit) hanDerPeder: Quit: hanDerPeder 23:56 (join) writer