00:05 (quit) mheld_: Quit: mheld_ 00:24 (quit) evhan: Ping timeout: 250 seconds 01:12 (join) cky 03:16 (quit) parcs: Ping timeout: 245 seconds 03:17 (join) parcs 03:28 (quit) jonrafkind: Ping timeout: 260 seconds 05:25 (join) aLeSD 05:25 aLeSD: hi all 05:26 aLeSD: I am a c/c++ programmer and I would like to learn racket because I want to livecode with fluxus .... 05:26 aLeSD: Could u suggest me how to understand the racket language ? 05:28 aLeSD: ehm 05:28 cky: aLeSD: I think you're in the wrong timezone. 05:29 cky: Many people who are here are in North America, where the time varies between 2.30 and 5.30 in the morning. 05:29 aLeSD: I am in the center or the world 05:29 cky: i.e., you may get better responses if you wait a few hours. :-P 05:29 aLeSD: mmm 05:29 cky: Goodness knows I need to be going to sleep already. 05:29 cky: (5.30 am here.) 05:29 aLeSD: so racket people are not freak as c people 05:29 aLeSD: c people don 't sleep 05:30 cky: I guess Racket helps you become more balanced and well-adjusted. :-P 05:33 Lajla: aLeSD, I am here. 05:34 aLeSD: ih ih 05:34 Lajla: aLeSD, ehhh 05:34 aLeSD: cky racket is function oriented language ? 05:34 Lajla: You read SICP or HtdP basically like anyone does. 05:34 Lajla: aLeSD, it's a functional language at heart yeah 05:34 Lajla: But some would say 'It supporst the functional paradigm' 05:34 Lajla: Language also supports imperative programming, but I don't think it's pretty. 05:35 Lajla: You use (set! x y) intead of x = y; 05:36 aLeSD: nobody wants to chat with me 05:36 cky: aLeSD: Lajla is chatting with you. 05:36 cky: Read the last 5 lines. 05:36 cky: :-P 05:36 aLeSD: : 05:38 Lajla: Nobody wants ot chat with lajla. =( 05:38 Lajla: cky, the band/ 05:40 cky: Lajla: Nope. 05:40 cky: Lajla: It used to be my initials. 05:40 Lajla: But then you changed your sex and name? 05:40 cky: Hahaha. I changed my last name when I got married. 05:41 Lajla: Such an archaic practice. 05:41 Lajla: I think last names are silly in this modern age where you just keep track of everyone by a number anyway in the government files. 05:42 Lajla: Especially the malechauv idea of taking the last names of husbands and giving kids the last name of the dad. 05:44 cky: I agree. 05:44 cky: That's why my wife and I both use a double-barreled name. 05:49 aLeSD: sorry 05:49 aLeSD: i was in the toilette 05:50 aLeSD: Lajla, ... c is imperativve ? 05:52 aLeSD: mmm 05:52 aLeSD: helo 05:52 aLeSD: we have comunication problems ... I think 05:54 Lajla: aLeSD, yeah 05:54 Lajla: C is an imperative language. 05:55 Lajla: racket or scheme is more functionally oriented 05:55 aLeSD: what does it mean ? 05:55 aLeSD: like u five 05:55 aLeSD: u eat 05:56 aLeSD: ok 05:56 Lajla: Roughly, i means that in C you tend to change the value of variables. 05:56 Lajla: and in racket you don't. 05:56 aLeSD: maybe it is bettter another questuion 05:56 aLeSD: what will change in my way of thinking from c to scheme ? 05:56 aLeSD: Lajla, I don't understand 05:56 aLeSD: (define d 5) 05:57 aLeSD: (define d 3) 05:57 Lajla: Yeah but that doesn't cahnge the value of d. 05:57 Lajla: aLeSD, some implementations prohibit that. 05:57 aLeSD: no ? 05:57 Lajla: re-defining. 05:57 Lajla: See define more as const. 05:57 aLeSD: mmmm 05:57 aLeSD: that's mean that everything is a const ? 05:57 aLeSD: ah 05:57 Lajla: aLeSD, you know what {x ; y ; z;} means right? 05:58 Lajla: sequencg statements 05:58 Lajla: aLeSD, well, yes, basically, you can update. 05:58 aLeSD: of course 05:58 aLeSD: no 05:58 aLeSD: ah 05:58 aLeSD: yes 05:58 Lajla: But generally you won't, and some implementations restrict it heaviliy. 05:58 aLeSD: is a vector 05:58 Lajla: No, that's with , 05:58 aLeSD: or a pint in 3 dimension geometric 05:58 Lajla: With ; it's a sequencing. 05:58 aLeSD: where ? 05:58 aLeSD: in racket ? 05:59 Lajla: {y = 4; y++; return y; 05:59 Lajla: No, in C. 05:59 Lajla: In racket, that means nothing. 05:59 Lajla: But in racket, you generally don't execute multiple statements in sequence. 05:59 Lajla: You execute only one. 05:59 aLeSD: ah 05:59 aLeSD: ok 05:59 Lajla: Most functions contain only one expression. 05:59 aLeSD: a block 05:59 Lajla: Also, the 'if' in racket is actually more like the ?: operator 05:59 Lajla: it returns a value. 06:00 Lajla: (if foo bar baz) is like foo ? bar : baz 06:00 aLeSD: go more deep 06:00 aLeSD: change my thinkings 06:00 Lajla: aLeSD, well, basically, everything returns a value. 06:00 Lajla: You use the value it returns more than the side effect it causes, as a general rule. 06:01 Lajla: For instance, say you want to write a function that calcualtes the length of a list. 06:01 Lajla: You would use (define (length the-list) (if (null? the-list) 0 (length (cdr the-list)))) 06:01 aLeSD: mmm 06:01 aLeSD: everything is a value in computer world 06:01 aLeSD: ok 06:01 Lajla: null? basically outputs true if the list is empty. 06:01 aLeSD: wait 06:01 Lajla: And cdr extracts the tail of the list. 06:02 Lajla: Ehh 06:02 Lajla: (+ 1 (length (cdr the-list))), sorry 06:02 aLeSD: 0 is true ? 06:02 aLeSD: if the list null return 0 06:02 aLeSD: ? 06:03 aLeSD: if ( list ==NULL) return 0 ? 06:03 Lajla: Yeah, the length 06:03 Lajla: But actually more like return if (list == null) 0 06:03 aLeSD: so I return 0 06:03 Lajla: A function returns its last expression 06:03 aLeSD: not true 06:04 Lajla: there is no return statement 06:04 aLeSD: ok 06:04 Lajla: No, like (null? x) 06:04 aLeSD: then the else block 06:04 Lajla: outputs true if x is the empty list 06:04 Lajla: and false otherwise 06:04 aLeSD: cdr remove the last element ? 06:04 Lajla: Well, it's not a block in the list. 06:04 Lajla: aLeSD, no, the first 06:04 Lajla: If you have a list x 06:04 Lajla: (car x) gives you the first element 06:04 Lajla: and (cdr x) gives you a list which contains all elements but the first. 06:05 Lajla: It stands for contents of address part of register, and contents of decrement parts of register. 06:05 Lajla: Old name 06:05 Lajla: That has stuck simply 06:05 aLeSD: ok 06:05 aLeSD: understood 06:06 aLeSD: I had been done with a for cicle in c 06:06 Lajla: Yeah, you don't use those here. 06:06 Lajla: well,t here is a for-each, but it's a -function+ 06:06 aLeSD: mmm 06:06 aLeSD: a lot of recursion it it ? 06:06 Lajla: This is also something you will use often in racket, functions where other languages use special syntactic constructs. 06:06 aLeSD: is it 06:07 Lajla: Well, yeah. 06:07 Lajla: Racket has tail call optimization 06:07 aLeSD: do u know fluxus ? 06:07 Lajla: So you can in a lot of cases recurse without overlfowing the stack. 06:07 Lajla: No, what is it? 06:07 aLeSD: ok 06:07 aLeSD: let's try something 06:08 aLeSD: is a racket based language for livecoding graphical stuffs 06:08 aLeSD: it takes input from a player (or line in) and you create worlds 06:09 aLeSD: it is used to create stuffs like secondlife 06:09 aLeSD: however ... my goal is to create geometric stuffs that move with the music 06:09 aLeSD: so 06:10 aLeSD: mmm 06:10 aLeSD: no 06:10 aLeSD: ok 06:10 aLeSD: i am running in the wrong way 06:10 aLeSD: where i could find some exercises to learn racket ? 06:17 Lajla: THe book 'How to design programs' 06:17 Lajla: It's online 06:18 aLeSD: thanks 06:18 aLeSD: no 06:18 aLeSD: i will not read that book 06:19 aLeSD: I need something practical 06:19 aLeSD: something that follow the extreme programming statement 06:20 Lajla: What is extreme programming statement? 06:27 aLeSD: Lajla, it is the base of opensource developing 06:29 aLeSD: Lajla, http://en.wikipedia.org/wiki/Extreme_Programming 06:29 Lajla: Yeah, I'm reading that now. 06:29 Lajla: And I would first recommend that you learn how racket works. 06:29 (join) masm 06:31 aLeSD: Lajla, I'd like to learn meanwhile I am doing my programs with fluxus 06:31 aLeSD: :) 06:31 aLeSD: but I will follow your advices 06:32 Lajla: I'm not sure what fluxus is. 06:37 aLeSD: I will give you a video 06:37 aLeSD: just a sec 06:38 aLeSD: Lajla, : http://www.youtube.com/watch?v=aTt8r3LhCFM&playnext=1&list=PL383D1FF1E109D7B5&index=23 06:38 rudybot: http://tinyurl.com/38or83e 06:38 aLeSD: here u are 06:39 Lajla: That look Scheme-like, yeah 06:41 aLeSD: I have to learn it ... fast 06:42 aLeSD: ok bye 06:42 aLeSD: AND THANKS 06:46 (quit) aLeSD: Ping timeout: 276 seconds 06:47 Lajla: That was kind of weird. 07:52 (join) amacleod 08:00 Demosthenes: so, it appears that format in racket isn't quite as featureful as in CL, ie: there's no allowing something like this to process a list to CSV (format t "~{~a~^, ~}" list) 08:01 Demosthenes: or did i miss an alternative? 08:07 Lajla: Format is evil. 08:07 Lajla: At least, that is what they told me. 08:09 Demosthenes: thats a slick trick, throwing together a CSV output it one line of code 08:09 Demosthenes: it just runs through the list, it was a mini-language for output. nothing bad there. 08:09 Demosthenes: instead i find myself writing weird loops to do string appends 08:14 amacleod: Demosthenes, could you perhaps make a macro for it? 08:15 Demosthenes: oh there's way around it sure, i was just asking for confirmation that the format mini-language had been neutered. 08:16 amacleod: Ah.. dunno. You could compare Racket docs and CL docs, right? 08:19 amacleod: Yeah.. looks like Racket's format lacks ~{} 08:31 (join) MayDaniel 08:55 (quit) bremner: Ping timeout: 264 seconds 09:11 (join) evhan 09:28 (join) kingping 09:28 kingping: (moOo) 09:29 kingping: How do racketeers curry functions, with function `curry` ? 09:29 kingping: rudybot: (+ 2 3) 09:29 rudybot: kingping: your sandbox is ready 09:29 rudybot: kingping: ; Value: 5 09:30 kingping: rudybot: (define plus2 ((curry +) 2)) 09:30 rudybot: kingping: Done. 09:30 kingping: rudybot: (plus 2 5) 09:30 rudybot: kingping: error: reference to undefined identifier: plus 09:30 kingping: rudybot: (plus2 40) 09:30 rudybot: kingping: ; Value: 42 09:31 kingping: Thank thee rudybot 09:31 Demosthenes: i guess i've never "groked" the whole curry idea. 09:31 Demosthenes: like closures though 09:32 kingping: Demosthenes: It's funny ;-) But looks more natural in Haskell, especially with poinless notation. 09:33 kingping: Closures are tasty too, in Erlang ;) 09:33 kingping: *pointless 09:37 kingping: Demosthenes: Look, both definitions of call are identical here http://paste.lisp.org/+2J1T 09:40 kingping: Demosthenes: But currying saves you keytypes and allows to easily rewrite a combination. 09:40 kingping: You don't deal with arguments in the latter case. 09:43 (join) mheld 09:44 kingping: So, it's pretty easy. 09:45 kingping: This article may be useful http://www.engr.uconn.edu/~jeffm/Papers/curry.html 09:59 (quit) mheld: Quit: mheld 10:05 Demosthenes: kingping: hrm, still not grokking it ;] 10:05 Demosthenes: thats ok 10:05 Demosthenes: i'll just go take my macros and closures and play quietly in the corner. 10:05 kingping: Heheh you're going to do. 10:06 kingping: :-D 10:14 kingping: The best way to grok it is to imagine that all functions actually get just one argument. 10:41 (join) mheld 10:44 (part) mheld 10:46 (quit) kingping: Quit: return $ Just "bye." 10:57 (quit) danking: Ping timeout: 265 seconds 10:58 (join) danking 11:03 Lajla: So curry returns a curryable version of a function? 11:03 Lajla: How does that work with variable argument functions? 11:16 (join) corruptmemory 11:52 (join) aLeSD 11:52 Demosthenes: omg i'm in love.... i can compile scheme to speed up the startup time. 11:52 aLeSD: hi all 11:52 aLeSD: I am back 11:52 offby1: so you are 11:53 aLeSD: I am learning racket 11:53 aLeSD: do u have some examples to code "? 11:54 amacleod: http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-1.html 11:56 aLeSD: someone here know fluxus ? 11:57 offby1: rudybot: source 11:57 rudybot: *offby1: git clone git://github.com/offby1/rudybot.git 11:57 offby1: aLeSD: lots of code there :) 11:58 aLeSD: ok 11:59 aLeSD: someone has a simple program to make me code ? 12:00 offby1: aLeSD: http://programmingpraxis.com/ , http://projecteuler.net/ 12:00 aLeSD: I will code it for free .... 12:05 (join) mceier 12:05 aLeSD: offby1 give me 12:05 aLeSD: I am just learning the language 12:07 Lajla: aLeSD, make a program that asks for a number n. 12:07 Lajla: and prints out all numbers starting from 0 up to and including n. 12:07 Lajla: and says 'error, your number is negative' if it's negative. 12:07 Lajla: and 'error, your number is not an integer' if it's not an integer. 12:07 Lajla: Or even 'error, this is not a number' 12:08 Lajla: I would like to point to the read function for reading numbers. 12:09 aLeSD: ok 12:09 aLeSD: I leave 12:09 (quit) aLeSD: Quit: Leaving 12:11 Lajla: He wasn't lying. 12:11 Lajla: He really left. 12:11 Lajla: offby1, would you be offended if I gave you a peck on the cheek? 12:13 offby1: brush your teeth first 12:18 Lajla: My teeth are cleaner than a macbook air 12:19 rapacity: probably isn't as shiny though 12:20 Lajla: My head hurts, like, I was playing SC2 just yet against this 3k rated dude. 12:20 Lajla: THat guy had the sickest marauder micro I ever had to face. 12:20 Lajla: He dodged all my psionic storms almost. 12:20 Lajla: And he emp'ed my sentries at the same time so I couldn't lay forcefields to stop him. 12:21 Lajla: The only thing remotely keeping me in the game was my phoenix multitasking and keeping to lift his SCV's. 12:21 Lajla: I'm sure this makes complete sense to all of you. 12:42 (quit) sunnyps: Quit: Leaving 12:53 (quit) MayDaniel: 13:04 (join) jonrafkind 13:08 Lajla: (3 . johnrafkind . 2) 13:08 Lajla: Look, you are an infix operator. 13:10 jonrafkind: unbound identifier in 'johnrafkind' 13:13 (join) mheld 13:22 Lajla: jonrafkind, run (define (johnrafkind . xs) (display "Je suis une pomme de terre")) first 13:22 jonrafkind: (theres no h in the real version) 13:23 Lajla: Oh yeah 13:23 Lajla: You're right? 13:23 Lajla: so you're Jonathan? 13:23 Lajla: Instead of John? 13:28 jonrafkind: <-- 13:28 clklein: hidden in plain sight! 13:38 Lajla: jonrafkind, is your name Jonathan Rafkind? 13:38 Lajla: Or Jonraf Kind? 13:38 jonrafkind: Jo Nrafkind 13:38 Lajla: REminds me of that guy Kristiann Hrafnsson 13:39 Lajla: That name is awesome 13:39 Lajla: Ah, Kristinn 13:39 jonrafkind: ill name my child (build-list 5 (lambda () (string-ref "abcdefghijklmnopqrstuvwxyz" (random 26))) 13:40 Lajla: Don't you want to replace 5 with ((random 10) . + . 3) or something? 13:58 (join) anRch 14:20 (join) lucian 14:59 (part) lucian 15:03 (quit) anRch: Quit: anRch 15:03 (quit) offby1: Read error: Connection reset by peer 16:12 (join) offby1 16:13 (join) MayDaniel 16:51 (quit) corruptmemory: Quit: Leaving 17:01 (quit) tv|z: Ping timeout: 250 seconds 17:03 (join) tv|z 17:24 (quit) offby1: Disconnected by services 17:24 (join) offby1 17:44 (quit) mheld: Quit: mheld 18:01 (join) MindFrog 18:01 MindFrog: hey guys can anyone tell me how to load SRFI 43 in MzScheme 372 thx in advance 18:05 jonrafkind: (require (lib srfi/43))) i think? 18:06 MindFrog: hm, I'm afraid not :/ 18:06 MindFrog: > (require (lib srfi/43)) 18:06 MindFrog: require: bad module path in: (lib srfi/43) 18:06 (quit) evhan: Ping timeout: 255 seconds 18:07 cky: jonrafkind: That syntax only works with 4.0+. :-( 18:08 cky must hunt down the instructions I got from eli a while ago re how to access old version documentation. 18:08 jonrafkind: (require (lib "srfi/43")) 18:08 (quit) amacleod: Quit: Bye Bye 18:08 MindFrog: already tried that 18:08 MindFrog: yeah I don't know why they insist in using 372 anyway cky :S 18:09 cky: Yeah, that's just nuts, since Racket is now at 5.0 now (and maybe 5.1 soon). :-P 18:09 cky: So, 372 is like 2 major versions behind. :-P 18:09 jonrafkind: MindFrog, what i just wrote didnt work? i tried it in mzscheme of 5.0, admitedly and it worked there 18:10 MindFrog: > (require (lib "srfi/43")) 18:10 MindFrog: open-input-file: cannot open input file: "C:\Program Files\PLT\collects\mzlib\srfi\43" 18:11 MindFrog: ok cky maybe I'll have to write a procedure to copy a vector, which will make my program really slower :x 18:11 jonrafkind: oh ok so its pretty close, try srfi/43.ss 18:12 cky: MindFrog: Here's a cheap implementation of vector-copy: 18:12 cky: (define (vector-copy vec) (list->vector (vector->list vec))) 18:12 cky: Yes, slow, but, it will work. :-P 18:12 MindFrog: (jonrafkind): 18:12 MindFrog: > (require (lib "srfi/43.ss")) 18:12 MindFrog: open-input-file: cannot open input file: "C:\Program Files\PLT\collects\mzlib\srfi\43.ss" 18:12 jonrafkind: ok what do you have in the srfi directory 18:12 cky: MindFrog: Of course, if you can use the SRFI 43 version, then that's best. 18:13 MindFrog: oh, I didn't know about list->vector, I was thinking about something even worse, like creating a loop that copied each vector-ref to a new vector ^^ 18:14 MindFrog: well jonrafkind, now I saw that I don't really have a srfi directory, at least not in C:\Program Files\PLT\collects\mzlib 18:14 jonrafkind: oh right it shouldbe collects\srfi\43 18:15 jonrafkind: i mean mabye the (lib ...) form is the worng thing to use there 18:15 MindFrog: hah! 18:15 MindFrog: yeah, I can see it now 18:15 MindFrog: it's on C:\Program Files\PLT\collects\srfi\43 18:15 MindFrog: and in that folder I have vector-lib.ss, maybe that's what I need? 18:15 jonrafkind: yea 18:15 jonrafkind: but there is some standard way to require it 18:15 cky: Yep, now you just have to figure out how to load it. :-P 18:15 jonrafkind: without giving the whole path 18:16 cky: Indeed. 18:16 jonrafkind: ok hold on.. ill read the docs 18:16 MindFrog: ergh, sorry for giving you work 18:16 MindFrog: just tell me where the docs are I can search 18:16 MindFrog: I tried, but I didn't find it :/ 18:17 jonrafkind: well in 372 you can run plt-help I think 18:18 MindFrog: I did 18:18 MindFrog: I searched for require 18:18 MindFrog: still trying to find something useful, a lot of topics came out on my search 18:18 jonrafkind: oh ok her ei tis 18:18 jonrafkind: (require (lib "43.ss" "srfi")) 18:19 jonrafkind: without the second argument to `lib' you get the mzlib collection by default 18:19 jonrafkind: and this is why it was changed to srfi/43 18:19 jonrafkind: since its more intuiative 18:19 MindFrog: ohhh, nice!!!!!! 18:20 MindFrog: cool, thank you so much jonrafkind 18:20 jonrafkind: word 18:20 MindFrog: I owe you one ;) 18:20 MindFrog: you too cky 18:20 cky: Yay! :-) 18:20 MindFrog: thanks 18:20 cky: :-) 18:22 MindFrog: great helping system ^^ ;) 18:22 MindFrog: congratulations 18:38 (quit) Lajla: Quit: Phallic Illuminatus 18:39 (join) mheld 19:02 (join) Lajla 19:29 (quit) MayDaniel: 19:56 (quit) mceier: Quit: leaving 20:00 (quit) offby1: Quit: Page closed 20:04 (join) MayDaniel 20:16 (quit) MayDaniel: Read error: Connection reset by peer 20:27 (join) askhader_ 20:28 (join) offby1 20:29 (quit) askhader: Disconnected by services 20:32 (nick) askhader_ -> askhader 20:34 (quit) jonrafkind: Ping timeout: 272 seconds 20:47 (quit) parcs: Ping timeout: 264 seconds 20:48 (join) parcs 22:11 (quit) masm: Quit: Leaving. 23:03 (join) jonrafkind