00:27 (join) dnolen 00:27 (quit) dnolen: Client Quit 00:38 (quit) leo2007: Quit: rcirc on GNU Emacs 23.3.50.1 02:00 (quit) jonrafkind: Read error: Operation timed out 03:18 (quit) Isak_: Ping timeout: 246 seconds 05:08 (join) dzhus 05:22 (quit) DT``: Read error: Connection reset by peer 05:28 (join) leo2007 05:36 (join) DT`` 06:27 (join) lucian 07:28 (join) lithpr 07:28 lithpr: yeay! i can be lithpr again! 07:29 (part) lithpr 08:10 (join) lithpr 08:41 (join) anRch 09:13 (quit) leo2007: Quit: leaves the cafe 09:25 (join) SeanTAllen 09:27 (join) mceier 09:56 (quit) dzhus: Remote host closed the connection 09:59 (join) dzhus 10:01 (quit) anRch: Quit: anRch 10:08 (join) tauntaun 10:31 (join) JuanDaugherty 10:59 (join) masm 11:05 (quit) dzhus: Quit: -_- 11:06 (join) dzhus 11:15 (join) leo2007 11:15 (join) dzhus89 11:16 (quit) dzhus89: Read error: Connection reset by peer 11:17 (join) dzhus89 11:17 (quit) dzhus: Ping timeout: 246 seconds 11:22 (quit) dzhus89: Quit: Yow! Legally-imposed CULTURE-reduction is CABBAGE-BRAINED! 11:25 (join) dzhus 11:25 (join) AtnNn 11:26 (join) dnolen 11:30 (quit) dzhus: Quit: Yow! Legally-imposed CULTURE-reduction is CABBAGE-BRAINED! 11:31 (join) dzhus 11:43 (nick) dzhus -> dzhus[afk] 11:43 (nick) dzhus[afk] -> dzhus 11:54 (quit) evhan: Ping timeout: 260 seconds 11:54 (nick) dzhus -> dzhus[afk] 11:55 (join) evhan 12:17 (join) jonrafkind 12:33 (quit) dnolen: Quit: dnolen 12:36 (join) PLT_Notify 12:36 PLT_Notify: racket: master Matthew Flatt * cd9eb5a (1 files in 1 dirs): simply dependencies 12:36 PLT_Notify: racket: master Matthew Flatt * b0115ee (8 files in 6 dirs): add 'wheel-left and 'wheel-right events 12:36 PLT_Notify: racket: master commits 4c5c46d...b0115ee - http://bit.ly/f5onx1 12:36 (part) PLT_Notify 12:42 (quit) jonrafkind: Ping timeout: 240 seconds 12:51 (nick) dzhus[afk] -> dzhus 12:52 (quit) SeanTAllen: Quit: SeanTAllen 12:57 (join) mwolfe 12:57 (join) dnolen 13:01 tauntaun: Can't read/write to/from tcp ports, even after changing the file-stream-buffer-mode. Any idea why? 13:01 (nick) dzhus -> dzhus[afk] 13:02 (join) anRch 13:03 JuanDaugherty: permissions? 13:04 tauntaun: JuanDaugherty: permissions on what exactly? 13:04 (quit) dnolen: Quit: dnolen 13:05 tauntaun: I'm using a permitted port number. 13:08 JuanDaugherty: some environments block port access to non-privileged users, no idea what env you're in 13:08 tauntaun: client and server are both running on my laptop. 13:09 tauntaun: Btw, what is an 'env'? 13:09 tauntaun: (i.e., 'environment') 13:13 (nick) dzhus[afk] -> dzhus 13:17 (quit) mwolfe: Remote host closed the connection 13:25 JuanDaugherty: tauntaun, I meant the OS user account and its environment 13:31 (quit) anRch: Quit: anRch 13:48 (quit) tauntaun: Quit: Ex-Chat 14:09 (quit) leo2007: Read error: Operation timed out 14:12 (join) MayDaniel 14:16 (quit) MayDaniel: Read error: Connection reset by peer 14:19 (quit) evhan: Read error: Connection reset by peer 14:36 (quit) masm: Quit: Leaving. 15:08 (quit) JuanDaugherty: Quit: Exeunt IRC 15:52 (quit) lucian: Remote host closed the connection 16:35 (join) jonrafkind 16:42 (join) seus 16:46 seus: question: in this code: http://codepad.org/WvBE7A4R on line 3, why is it when i do the first thing l5-compile '(pop x) it doesn't evaluate the x for the number when it does the recursion? is there some simple operator that I'm missing to do that? i can't seem to figure out what I'm doing wrong 16:48 qha: Yes, "'" quotes the entire list. 16:48 seus: hmm 16:48 seus: ok thats true 16:49 qha: If you want the x to be evaluated you can either add another level of quasiquote or do ,(list 'pop x). 16:49 qha: (and I suppose you'll want to do the same for '(pop y)...) 16:49 seus: yeah 16:50 seus: i was figuring it had to be something like that...didn't understand it until you typed it there thanks! 16:50 qha: you're welcome. 16:54 (join) tauntaun 16:56 (quit) jproctor_: Read error: Connection reset by peer 16:56 (join) MayDaniel 17:03 (quit) dzhus: Quit: -_- 17:08 (join) SeanTAllen 17:15 (quit) tauntaun: Ping timeout: 264 seconds 17:25 (join) tauntaun 17:25 (join) mye 17:26 (quit) mye: Read error: Connection reset by peer 17:26 (join) evhan 17:29 (join) ari_ 17:29 ari_: hi 17:30 ari_: who here is familiar with lists 17:30 AtnNn: cons lists? 17:31 ari_: yea 17:32 AtnNn: I think most here are familiar with those 17:35 eli: (Not much to be familiar with.) 17:35 jonrafkind: not everyone knows what you know 17:36 eli: `cons', `car', `cdr'. 17:36 jonrafkind: `list', `append', `tail', `drop' 17:36 ari_: i am doing a game called paratrooper. Here i have to shoot cannonballs from a tank. The catch is, the cannonballs have to be diifferent colors.In order to do that i need a helper function which randomly picks a color of a cannonball. i do not understand how to do that 17:37 eli: jonrafkind: That's not "lists", that's "library functions related to lists". 17:37 eli: ari_: You want to get a random element from a list? 17:37 (quit) MayDaniel: Read error: Connection reset by peer 17:38 (join) lucian 17:38 ari_: so eli 17:38 ari_: can u help 17:38 ari_: nvm 17:38 ari_: yes i do 17:38 eli: ari_: Do you know about `random'? 17:39 ari_: kinda but not with colors and not sure how i can assign it to stuff 17:39 eli: You don't need to assign stuff to it. 17:39 eli: (random N) for some integer N gives you a random integer between zero and N-1. 17:39 eli: rudybot: (random 10) 17:39 rudybot: eli: your sandbox is ready 17:39 rudybot: eli: ; Value: 0 17:39 eli: rudybot: (random 10) 17:39 rudybot: eli: ; Value: 2 17:39 eli: So you just need to combine it with length: 17:40 eli: rudybot: (define (random-elt l) (list-ref l (random (length l)))) 17:40 rudybot: eli: Done. 17:40 eli: rudybot: (random-elt '("red" "green" "blue")) 17:40 rudybot: eli: ; Value: "blue" 17:40 eli: rudybot: (random-elt '("red" "green" "blue")) 17:40 rudybot: eli: ; Value: "green" 17:40 eli: rudybot: (random-elt '("red" "green" "blue")) 17:40 rudybot: eli: ; Value: "blue" 17:40 eli: But if this is some homework, you should make sure that you're allowed to use all of these. 17:45 (quit) ari_: Ping timeout: 252 seconds 17:48 tauntaun: Any ideas about my earlier question about tcp ports? 17:52 eli: What's the question? 17:54 qha: I think more specifically JuanDaugherty was asking if you're running some Unix like operating system as a user other than root and trying to bind to a port below 1024. 17:57 (quit) SeanTAllen: Read error: Connection reset by peer 17:58 tauntaun: eli: I set up a listener with tcp-listen, client ports with tcp-connect, and listener ports with tcp-accept. But read, write, print, and display don't work on those ports. 17:59 eli: That's way to vague for dealing with network issues... 17:59 eli: How did you try it -- did you connect using a racket program? 17:59 eli: Which port did you use? 17:59 tauntaun: Yes, of course. 17:59 eli: Which OS? 17:59 eli: Is it the same program that was running the server and the client? 17:59 tauntaun: Ubuntu; all port numbers above 50000 18:00 eli: If so, did you properly run them in threads? 18:00 tauntaun: No, different racket shells. 18:00 eli: OK, did you flush the output after writing to it? 18:00 tauntaun: No they were running in the shell's main thread. 18:00 tauntaun: I did flush-output several times. 18:00 tauntaun: I did change the file buffer mode in various ways. 18:00 eli: Did you try a lower level utility like netcat? 18:00 eli: (Flushing would generally be more reliable.) 18:01 tauntaun: Didn't try netcat. 18:01 eli: You could start with both the client and the server being in netcat -- to make sure that the os allows you to connect, 18:01 eli: then replace each side by the racket code. 18:02 eli: It might be something very weird -- for example, recently I ran into a configuration where "localhost" didn't mean the same thing as "this machine". 18:02 eli: (So in general "127.0.0.1" is more reliable.) 18:02 tauntaun: FWIW, the "hello world" server example on this page did work: file:///home/awest/racket/doc/more/index.html#%28part.__.Hello_.World__.Server%29 18:02 eli: (But these problems would happen with netcat too.) 18:02 tauntaun: FWIW, tcp-accept did work. 18:03 tauntaun: ie, I checked that a pending tcp-connect stopped the server's tcp-accept from blocking. 18:03 eli: If that example worked, then you might have some problem with your code. 18:04 (join) Lycurgus 18:04 eli: If you can paste them somewhere I can have a look. 18:04 tauntaun: It's easy enough to do it here. 18:04 eli: (But I might be gone shortly for several hours.) 18:04 tauntaun: (define listener (tcp-listen 50000 5 #t)) 18:05 tauntaun: (define-values (in out) (tcp-accept listener)) 18:05 tauntaun: on the client end: 18:05 tauntaun: (define-values (in out) (tcp-connect "localhost" 50000)) 18:05 tauntaun: (server's tcp-accept returns from block) 18:05 eli: ok, then what? 18:06 tauntaun: Then client says: (write 'hi out)....but (read in) at the server just blocks. 18:06 eli: Ha... 18:06 tauntaun cringes in anticipation of learning his silly mistake. 18:07 eli: Here's a hint -- what happens if you immediately do -- on the client -- (write 'x out)? 18:07 tauntaun: Just a sec, let me type these in. 18:07 eli: Nah, I'll save you the trouble. 18:07 eli: (BTW, that's missing a flush too...) 18:08 eli: You're printing *just* "hi" -- the reader can't tell if this is a `hi' symbol, or `hix' etc 18:08 eli: IOW, the reader needs some separator to return the symbol. 18:08 eli: So (newline out) should work. 18:08 tauntaun: What's IOW? 18:08 Lycurgus: http://docs.racket-lang.org/drracket/debugger.html 18:08 eli: Or better: (fprintf out "~s\n" 'hi) 18:08 Lycurgus: I'm new to racket. Is the Tip on that page a joke? 18:09 eli: IOW: in other words 18:09 tauntaun: eli: It didn't work. 18:09 tauntaun: (read in) at the server just blocks. 18:09 eli: Did you flush? 18:09 tauntaun: no, just a sec. 18:09 eli: Lycurgus: Why would it be a joke? 18:09 tauntaun: Success! 18:10 tauntaun: OK, thanks. So I need newline. 18:10 eli: tauntaun: Right... Like I said, flushing is more robust -- you don't get nasty surprises... 18:10 tauntaun: Right, but the new thing for me here is the newline. 18:10 eli: Yeah, a new line is the easiest thing if you plan to read/write arbitrary sexprs. 18:10 Lycurgus: eli, because it's not the sort of thing that would normally need to be a tip 18:11 Lycurgus: is there some aspect of racket that calls for renaming files while in use? 18:11 seus: what's the correct syntax in match, so that I can match '* ? 18:11 seus: ? '* doesn't work 18:11 eli: Lycurgus: Usually, drracket doesn't depend on the file name or on the existence of a file -- since this is an exception, it's mentioned explicitly. 18:12 eli: tauntaun: BTW, it's a common mistake to do when you start to play with tcp lines, and you get the impression that it's as easy as something like channels. 18:12 Lycurgus: eli, OK I guess I'll understand that shortly. BTW is there a way to set breakpoints in that debugger? 18:12 eli: rudybot: (define (foo x) (match x ['x "ex"] [_ "something else"])) 18:12 rudybot: eli: Done. 18:12 eli: rudybot: (foo 'x) 18:12 rudybot: eli: ; Value: "ex" 18:12 eli: rudybot: (foo 'xx) 18:12 rudybot: eli: ; Value: "something else" 18:12 (join) PLT_Notify 18:12 PLT_Notify: racket: master Matthew Flatt * 342964b (1 files in 1 dirs): win32: ignore inapplicable WM_HSCROLL and WM_VSCROLL events 18:12 PLT_Notify: racket: master Matthew Flatt * 37f9363 (2 files in 1 dirs): win32: another try for horizontal wheel events 18:12 PLT_Notify: racket: master commits b0115ee...37f9363 - http://bit.ly/i5jdsa 18:12 (part) PLT_Notify 18:12 eli: seus: There. 18:13 tauntaun: eli: You mean thread channels? 18:13 tauntaun: I plan on using only thread mailboxes. 18:13 eli: Lycurgus: I think so -- something like right-clicking on a paren after you start debugging the program. But I'm not 100% sure, I almost never use it. 18:13 Lycurgus: got it 18:13 eli: tauntaun: Yeah, channels are easy since you're transferring *values*. Thread mailboxes are similar too. 18:14 eli: tauntaun: But when you start with a tcp thing, you're dealing with a line that holds serialized values. 18:14 tauntaun: OK 18:14 tauntaun: I have no choice but to use tcp lines, though, because I need to distribute my application on a network. 18:15 Lycurgus: yeah, right click and then select pause at this point. Works in any lang btw 18:15 eli: tauntaun: Yeah, obviously -- just be aware that it's text that you're dealing with. 18:15 eli: tauntaun: BTW -- http://pl.barzilay.org/lec18.txt 18:16 eli: Look for the two bits of sample code near the end. 18:16 eli: They implement a prime number sieve using channels and using generators -- it might be a fun example for your thing. 18:17 eli: The version that uses channels is a near literal translation of an example that Rob Pike shows in his talk about newsqueak (the link just above the example). 18:20 tauntaun: I'll try to get around to it at some point (...listening to Pike's talk right now). 18:33 (quit) tauntaun: Quit: Ex-Chat 18:41 seus: can you guys tell me, does match allow optional arguments, and if not there, it still will match, meaning.... 18:41 seus: if i have a list '(1 2 3 4) and 4 is an optional part of it 18:47 (quit) seus: Quit: seus 18:51 (join) jproctor_ 19:00 (quit) jproctor_: Ping timeout: 240 seconds 19:04 (quit) mceier: Quit: leaving 19:06 (join) SeanTAllen 19:22 Lycurgus: is it pronounced "doktor racket"? 19:23 bremner: Ja 19:24 Lycurgus: 's nice 19:29 jonrafkind: dawktaw is the correct pronunciation 19:33 (join) zakwilson_ 19:33 (join) friscosa1 19:35 (join) jackhill_ 19:35 (quit) jonrafkind: *.net *.split 19:35 (quit) zakwilson: *.net *.split 19:35 (quit) friscosam: *.net *.split 19:35 (quit) jackhill: *.net *.split 19:37 bremner: is that a boston thing? 19:47 (join) jonrafkind 19:48 (quit) martinhex: Read error: Connection reset by peer 19:51 (quit) em: Ping timeout: 252 seconds 19:51 (join) dnolen 19:52 (join) martin_hex 19:52 (join) em_ 19:59 (quit) em_: Quit: As a wild ass in the desert go I forth to my work 20:03 (join) emma 20:03 (quit) tildedave: Ping timeout: 252 seconds 20:04 (join) tildedave 20:06 (quit) tewk: Ping timeout: 252 seconds 20:06 (join) tewk 20:19 (join) tauntaun 20:20 (nick) emma -> em 20:32 (quit) lucian: Remote host closed the connection 20:36 (join) hyko- 20:38 (quit) hyko: Read error: Connection reset by peer 20:38 (quit) dnolen: Ping timeout: 240 seconds 20:39 (quit) SeanTAllen: Quit: SeanTAllen 20:40 (quit) evhan: Ping timeout: 276 seconds 20:41 (join) evhan 20:57 (quit) stamourv: Ping timeout: 252 seconds 21:01 (join) offby1` 21:03 (quit) evhan: Read error: Connection reset by peer 21:09 (join) evhan 21:35 (join) SeanTAllen 22:05 (join) JuanDaugherty 22:15 (quit) offby1`: Changing host 22:15 (join) offby1` 22:15 (nick) offby1` -> offby1 22:23 (join) offby1` 22:24 (join) dnolen 22:25 (quit) offby1`: Changing host 22:25 (join) offby1` 22:26 (quit) SeanTAllen: Quit: SeanTAllen 22:27 (quit) offby1: Ping timeout: 240 seconds 22:28 (nick) offby1` -> offby1 22:46 (join) neilv 22:46 (quit) neilv: Changing host 22:46 (join) neilv 22:55 (quit) evhan: *.net *.split 22:55 (quit) jproctor: *.net *.split 22:55 (quit) petey-away: *.net *.split 22:55 (quit) ohwow: *.net *.split 22:55 (quit) rudybot: *.net *.split 22:55 (quit) blomqvist: *.net *.split