00:11 (quit) dnolen: Quit: dnolen 00:12 (join) collin 01:01 (quit) francisl: Quit: francisl 02:07 (quit) jonrafkind: Ping timeout: 255 seconds 03:17 (quit) Lajla: Read error: Connection reset by peer 03:17 (join) Lajla 03:34 (join) Blkt 03:58 Blkt: good morning everyone 04:05 (quit) mithos28: Quit: mithos28 04:30 (join) tim-brown 04:50 (join) mithos28 04:58 (quit) mithos28: Quit: mithos28 05:18 (join) ahinki 05:43 (join) chezduck 05:44 (quit) samth: Ping timeout: 258 seconds 06:11 (join) haruki_zaemon 06:12 haruki_zaemon: howdy, I don't suppose there's a nice IRC client for racket? I want to re-write a bot using racket. 06:16 bremner: haruki_zaemon: rudybot is written in racket 06:18 haruki_zaemon searches for rudybot 06:20 haruki_zaemon: bremner: https://github.com/offby1/rudybot ? 06:21 bremner: sounds right 06:21 haruki_zaemon: thanks for the heads up 06:33 (quit) jamessan: *.net *.split 06:33 (quit) tewk: *.net *.split 06:33 (quit) jrslepak: *.net *.split 06:33 (quit) SHODAN: *.net *.split 06:33 (quit) shachaf: *.net *.split 06:33 (quit) asumu: *.net *.split 06:33 (quit) s_chng: *.net *.split 06:33 (quit) adzuci: *.net *.split 06:33 (quit) abbe: *.net *.split 06:35 (join) abbe 06:35 (join) SHODAN 06:37 (join) s_chng 06:37 (join) adzuci 06:37 (join) tewk 06:40 (join) jamessan 06:40 (quit) jamessan: Changing host 06:40 (join) jamessan 06:42 (join) shachaf 06:46 (join) asumu 06:49 (join) jrslepak 07:09 (quit) jamessan: Ping timeout: 240 seconds 07:14 (join) jamessan 07:14 (quit) jamessan: Changing host 07:14 (join) jamessan 07:40 (join) masm 08:42 (quit) shader: Read error: Connection reset by peer 08:42 (join) shader 08:43 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/HQ4TDw 08:43 RacketCommitBot: [racket/master] added test cases for phase issues in the module language repl - Robby Findler 08:43 RacketCommitBot: [racket/master] Change the drracket repl so that it doesn't show the stacktrace button - Robby Findler 08:43 RacketCommitBot: [racket/master] Fixed some bugs in the double-stacktrace window; adjusted the repl to - Robby Findler 09:06 (join) samth 09:12 (join) shader` 09:12 (quit) jamessan: *.net *.split 09:12 (quit) asumu: *.net *.split 09:12 (quit) SHODAN: *.net *.split 09:12 (quit) abbe: *.net *.split 09:12 (quit) ohwow: *.net *.split 09:12 (quit) mario-goulart: *.net *.split 09:12 (quit) tonyg: *.net *.split 09:12 (quit) eMBee: Read error: Operation timed out 09:12 (quit) shachaf: Read error: Connection reset by peer 09:13 (quit) shader: Ping timeout: 240 seconds 09:13 (quit) jrslepak: Ping timeout: 240 seconds 09:13 (quit) wtetzner: Ping timeout: 240 seconds 09:13 (join) shachaf_ 09:14 (quit) rgrinberg: Ping timeout: 260 seconds 09:14 (quit) Em: Ping timeout: 276 seconds 09:16 (quit) collin: Ping timeout: 260 seconds 09:16 (join) collin 09:16 (join) mario-goulart 09:16 (join) jrslepak 09:17 (join) wtetzner 09:17 (join) jamessan 09:17 (join) asumu 09:17 (join) SHODAN 09:17 (join) abbe 09:17 (join) tonyg 09:17 (join) ohwow 09:17 (join) 13WAALU39 09:17 (join) Shviller 09:18 (quit) 13WAALU39: Ping timeout: 240 seconds 09:18 Shviller: Hi, all. Is there an OpenID library for Racket? 09:18 (join) eMBee 09:21 samth: Shviller, i think there's someone who worked on that that's up on github 10:07 (topic) -: Racket -- http://racket-lang.org -- logs @ http://racket-lang.org/irc-logs 10:07 (names) -: gabot samth_away asumu Em eMBee Shviller ohwow tonyg abbe SHODAN jamessan wtetzner jrslepak mario-goulart collin shachaf_ shader` masm tewk adzuci s_chng haruki_zaemon chezduck tim-brown Blkt Lajla karswell offby1 _p4bl0 gmcabrita si14 acarrico Demosthenes cipher tomku rudybot rotty jschuster stamourv mattmight brainproxy sethalves tauntaun eli ernestas bremner snorble sepisultrum hyko petey gf3 zerokarmaleft danking zakwilson sir_lewk ozzloy GeneralMaximus 10:07 (names) -: rapacity cky @ChanServ 10:10 (join) ahinki 10:46 (quit) chezduck: 11:01 (quit) ahinki: Quit: ChatZilla 0.9.87 [Firefox 8.0/20111102223350] 11:01 (join) MayDaniel 11:13 (quit) Blkt: Quit: gogogo 11:18 (join) anRch 11:19 (join) djcb 11:23 (join) dnolen 11:25 (join) realitygrill 11:26 (quit) realitygrill: Client Quit 11:48 (quit) djcb: Ping timeout: 276 seconds 12:05 (join) realitygrill 12:07 (quit) MayDaniel: Read error: Connection reset by peer 12:15 (quit) anRch: Quit: anRch 12:18 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/3LnK5w 12:18 RacketCommitBot: [racket/master] Allow internal definitions in a `for/vector' with a #:length. - Eli Barzilay 12:19 (join) mithos28 12:21 Demosthenes: any other recommendations for "simple" parser examples? =] 12:24 mithos28: Demosthenes: I have a project where I used it, but it looks like I never put it on github. I'll give you a link in a sec 12:27 (nick) shachaf_ -> shachaf 12:27 mithos28: demosthenses: https://github.com/shekari/tiger 12:28 mithos28: It was a project to compile the tiger language from Appel's book, the whole thing might not compile without my llvm library but the parser part should 12:29 (join) jonrafkind 12:32 Demosthenes: i'm learnign the whole idea of lexing and parsing... i basically got lex down, and parse i'd default to match, but i'm trying to udnerstand the native parse lib 12:33 mithos28: My project uses that if I remember correctly 12:33 Demosthenes: k 12:34 Demosthenes: my use case doesn't help, i'm not parsing a language per-se, i'm trying to validate text records 12:34 mithos28: check the tiger-parser.rkt file: https://github.com/shekari/tiger/blob/master/tiger-parser.rkt 12:34 mithos28: It should be similar in that each record is like a statement in a language 12:35 (join) anRch 12:38 Demosthenes: its the parse/grammer i don't get. the docs are very shallow. 12:50 (join) MayDaniel 12:51 (quit) realitygrill: Quit: realitygrill 13:09 (quit) anRch: Quit: anRch 13:25 (join) mithos28_ 13:28 (join) tyson1 13:47 (join) realitygrill 13:56 (join) samth 13:57 (join) Altryx 14:07 (join) jrslepak_ 14:14 (quit) karswell: Remote host closed the connection 14:24 (quit) samth: Ping timeout: 258 seconds 14:28 (join) shadgregory 14:29 ozzloy: if i do (printf "string with an actual newline, not just tilde n") will that be converted to system specific newline across mac, linux, and ms windows? 14:32 mithos28_: ozzloy: I don't think so, i think it will be what is literally in the string. And also what do you mean by actual newline? I don't think you mean that, because no one actually uses the newline character. 14:32 ozzloy: you're right, i mean linefeed and not an actual newline 14:34 mithos28_: I don't think anything is special is done, because that would be confusing. 14:34 ozzloy: thanks 14:35 ozzloy: although now that i think about it, it would be a cool feature if actual newlines in strings were converted to system specific newlines at runtime 14:39 jonrafkind: you want \n to turn into CRLF on windows? 14:40 ozzloy: not desperately, but it would be neat if it worked that way 14:40 ozzloy: wait, "\n" does, doesn't it? 14:41 mithos28_: ozzloy: nope 14:41 mithos28_: http://docs.racket-lang.org/reference/reader.html?q=reader&q=string#(part._parse-string) 14:43 ozzloy: oh 14:44 ozzloy: is "~n" the same thing as "\n" and is there an escape sequence that gets converted to system specific newlines? 14:47 (quit) MayDaniel: Read error: Connection reset by peer 14:47 mithos28_: ozzloy: not that I know of, and couldn't find one 14:48 ozzloy: that's surprising 14:48 rapacity: doesn't ~% work ? 14:49 rapacity: rudybot: (printf "~%") 14:49 rudybot: rapacity: your sandbox is ready 14:49 rudybot: rapacity: ; stdout: "\n" 14:50 mithos28_: rapacity: thats a linefeed, not a system specific newline 14:50 ozzloy: http://docs.racket-lang.org/search/index.html?q=~%25&q=rackunit doesn't work. where did you find it? 14:50 rapacity: ah 14:50 ozzloy: rapacity, where did you find ~% 14:52 rapacity: http://docs.racket-lang.org/reference/Writing.html?q=printf though according to that it's the same as ~n 14:52 ozzloy: so "~%" == "\n" == "~n" 14:53 ozzloy: oh, maybe not. "which is equivalent to \n in a literal format string" makes me think there are situations where they're not equivalent 15:08 (quit) dnolen: Ping timeout: 265 seconds 15:10 (join) samth 15:10 (quit) jrslepak_: Ping timeout: 256 seconds 15:11 (join) jrslepak_ 15:17 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/Ehc3zA 15:17 RacketCommitBot: [racket/master] fix errortrace for phase N outside of module - Matthew Flatt 15:19 (quit) jrslepak_: Quit: Leaving 15:26 (join) anRch 15:27 (quit) haruki_zaemon: Quit: Zzzzz 15:29 (join) rgrinberg 15:30 (quit) realitygrill: Quit: realitygrill 15:36 (join) realitygrill 15:46 (join) Shvillr 15:47 (quit) Shviller: Disconnected by services 15:47 (nick) Shvillr -> Shviller 15:51 (quit) tyson1: Quit: Leaving. 15:54 (quit) samth: Ping timeout: 248 seconds 15:56 (join) bluezenix 16:01 (quit) mithos28_: Quit: mithos28_ 16:02 (quit) Altryx: Ping timeout: 265 seconds 16:25 (quit) realitygrill: Quit: realitygrill 16:34 (quit) anRch: Quit: anRch 16:58 (join) mithos28_ 17:04 (quit) mithos28_: Quit: mithos28_ 17:06 (join) mithos28_ 17:12 (quit) mario-goulart: Remote host closed the connection 17:13 (join) mario-goulart 17:15 (quit) gf3: Read error: Operation timed out 17:17 (join) gf3 17:19 (join) karswell 17:23 (join) realitygrill 17:29 (join) shofetim 17:38 (part) shofetim: "ERC Version 5.3 (IRC client for Emacs)" 18:36 (join) jeapostrophe 18:49 (quit) jeapostrophe: Ping timeout: 255 seconds 19:13 (join) jeapostrophe 19:15 (quit) masm: Quit: Leaving. 19:22 (quit) rotty: Remote host closed the connection 19:31 (quit) bluezenix: Ping timeout: 240 seconds 19:32 (join) dnolen 20:10 (quit) dnolen: Quit: dnolen 20:26 (quit) wtetzner: Ping timeout: 240 seconds 20:35 (join) dnolen 20:35 (quit) dnolen: Client Quit 20:42 (join) jrslepak_ 20:42 (join) wtetzner 20:59 (nick) collin -> rekahsoft 21:02 (quit) rekahsoft: Read error: No route to host 21:11 (join) ghs 21:11 ghs: hi 21:11 ghs: I need help 21:12 bremner: what is the nature of your racket emergency? 21:12 jonrafkind: for bank loans press 1, for poison related inquiries press 8 21:12 ghs: (define (listofstring los) (cond [(empty? los) empty] [else (string-append "accio" (first los) (listofstring (rest los)))])) 21:12 ghs: I can't get this to work 21:12 ghs: I am trying to 21:12 ghs: incoroporate a string append type program 21:12 ghs: into a list 21:13 ghs: er not program 21:13 ghs: function I mean 21:14 (join) failing 21:19 failing: hello, could someone help me? 21:20 failing: im trying to write a function that adds the string "accio " to each term on a list of strings 21:22 (quit) jonrafkind: Ping timeout: 245 seconds 21:31 (quit) mithos28_: Quit: mithos28_ 21:36 jrslepak_: failing: what part of this task has you stuck? 21:37 acarrico: ghs, failing: Harry Potter is always copying Hermione's homework, so what the heck: (map (lambda (x) (string-append "accio" x)) '("broomstick" "house-elf" "homework")) 21:51 failing: one sec, let me see if i can solve it with acarricos post 21:52 asumu: failing: If you don't understand map like the back of your hand, you may want to try writing this as a simple recursive function on lists. 21:53 asumu: (see Design Recipe) 21:54 failing: how would i do that, i tried the recursive function, but i dont know where i went wrong 21:56 jrslepak_: you are ghs? 21:56 failing: umm, no 21:56 jrslepak_: ghs asked a remarkably similar question 21:57 jrslepak_: including posting an attempt to solve it by structural recursion 21:57 asumu: failing: I suggest reading this chapter http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-13.html#node_chap_9 21:57 failing: its a question for a midterm practice, he might be in my class i guess 21:57 failing: ty asumu 22:00 asumu: Actually, the 2htdp chapter on this is pretty complete so you may want to look there: http://www.ccs.neu.edu/home/matthias/HtDP2e/htdp2e-part2.html 22:00 asumu: As jrslepak_ suggested, this is a straightforward application of the recipe in section 4.2. 22:01 asumu: Also try writing examples to see why your function fails right now. 22:04 failing: all righty, will get back to you guys when i solve this, ty for the help 22:07 jrslepak_ probably shouldn't stay up too much longer 22:13 asumu: jrslepak_: Oh right, you're in VA eh? 22:13 jrslepak_: aye 22:14 failing: ok, so i wrote a function that i thought would work, but now Im getting a error: cond: expected a clause with a question and an answer, but found a clause with 3 parts 22:14 jrslepak_: syntax error 22:14 jrslepak_: look at your indiviual cond clauses 22:15 failing: should i post it so you guys can see? 22:15 jrslepak_: not yet 22:15 jrslepak_: you need to look at the cond clauses you wrote 22:16 failing: ok, so what i did was put in a cond, so if the list is empty, it returns empty, and then i added an (else (string-append "accio" 22:17 failing: but i cant find the syntax error 22:17 failing: dosent the "empty?" count as the question? 22:17 jrslepak_: how many parts does your first cond clause have? (count them) 22:20 failing: ummm 1... i think, its (cond [(empty? los) empty] 22:20 jrslepak_: that's not a cond clause 22:20 (join) samth 22:20 jrslepak_: the first cond clause you wrote is [(empty? los) empty] 22:21 failing: ok, so thats 1 right? 22:21 jrslepak_: that's 1 what? 22:21 jrslepak_: 1 clause, yes 22:21 failing: one clause, two parts 22:21 failing: ? 22:21 jrslepak_: yes 22:21 failing: ok 22:22 jrslepak_: you understand what the two parts are? 22:22 failing: yea [(empty? los) and empty] right? 22:22 jrslepak_: just (empty? los) and empty 22:22 jrslepak_: the brackets aren't part of the parts 22:23 (quit) jeapostrophe: Ping timeout: 240 seconds 22:23 failing: ok 22:23 jrslepak_: (and the (empty? los) part itself has two parts) 22:23 jrslepak_: now, count the parts in your next clause 22:25 failing: two, i think its [else (string-append "accio " (first los)) (add-accio (rest los), so the parts would be: (string-append "accio " (first los)) and (add-accio (rest los)? 22:26 jrslepak_: that wasn't the entire cond clause 22:26 jrslepak_: you have no matching ']' 22:26 failing: oh, sorry, its : [else (string-append "accio " (first los)) (add-accio (rest los))])) 22:26 jrslepak_: ok, now count the parts 22:27 failing: wouldnt i be 2? 22:27 jrslepak_: I count 3 22:27 failing: or is the else another part? 22:27 jrslepak_: it is 22:27 failing: i see 22:27 jrslepak_: the first part of a cond clause just says under what conditions that clause gets used 22:28 failing: ok 22:28 jrslepak_: your (string-append ...) and (add-accio ...) are two separate things 22:28 jrslepak_: you need to make them into one thing 22:29 failing: how? 22:29 failing: helper function? 22:29 jrslepak_: what kind of thing are you trying to make them into? 22:30 failing: what do you mean "thing"? 22:31 jrslepak_: alternatively, "what kind of data are you trying to produce?" 22:31 jrslepak_: (e.g. "accio " is a string) 22:31 failing: so a list of strings? 22:31 jrslepak_: ok 22:31 jrslepak_: what kind of data is your (string-append ...)? 22:33 failing: i dont understand 22:33 jrslepak_: when you call the string-append function, you get some data back, right? 22:33 (join) jeapostrophe 22:33 failing: ohhh 22:33 failing: yea 22:34 failing: a string 22:34 failing: just with accio added to it 22:34 jrslepak_: and what kind of data is your (add-accio ...)? 22:34 failing: its a list of strings 22:34 rudybot: ACTION yawns, stretches, and sharpens his claws on the carpet 22:35 jrslepak_: so you have a string and a list of strings 22:35 failing: so what youre saying is i need to turn that string from string-append, into a list of strings somehow? 22:35 jrslepak_: no 22:35 failing: :( 22:35 jrslepak_: you have to turn that string from string-append and that list of strings from add-accio into a list of strings 22:35 failing: oh ok 22:36 failing: i dont know how i could do that though 22:36 jrslepak_: so what do you use to make a list of X from an X and another list of X? 22:37 offby1: a stapler 22:37 failing: no idea, a "cons"? 22:37 jrslepak_: yes, that's exactly what cons is for 22:39 failing: so i would need to add cons to my second cond clause? 22:39 failing: somewhere in there 22:39 jrslepak_: mmhmm 22:39 jrslepak_: not just "somewhere in there" 22:39 jrslepak_: you should know enough to see where 22:40 jrslepak_: (if you understand how to use cons in general; if not, you've really skipped over something important on your way to writing code for processing lists) 22:40 asumu: (hint: try some examples of using cons to build lists) 22:41 failing: oh god, im thinking lol 22:41 jrslepak_: thinking? something important has been missed 22:41 (quit) samth: Ping timeout: 255 seconds 22:42 ghs: sorry. I have a quick question, when do you use cons versus list abreviations? 22:42 failing: well, i know how cons works, its regression im having trouble with 22:43 failing: i mean recursion... 22:43 jrslepak_: failing: you have a string and a list of strings that you want to put together -- if you know how cons works, there is no more thinking needed 22:43 (quit) jeapostrophe: Ping timeout: 258 seconds 22:44 failing: omg, i got it 22:44 failing: YAY 22:44 jrslepak_: tested it? 22:45 failing: yea 22:45 jrslepak_: good 22:45 failing: thanks alot 22:45 failing: seriously 22:45 jrslepak_: bedtime for me, then 22:45 failing: g night sir 22:45 (quit) jrslepak_: Quit: Leaving 22:49 (join) jeapostrophe 22:55 asumu: ghs: cons is more general than list abbreviations. 22:56 asumu: For example, you can't attach a number to a list of numbers with "list" alone. 23:04 (quit) ghs: Ping timeout: 265 seconds 23:14 (quit) jeapostrophe: Ping timeout: 255 seconds 23:19 failing: asumu you still there? need some more help if youre up for it ;) 23:23 asumu: I am still here. 23:24 failing: sweet, ty ok, heres the problem 23:24 failing: i need to desing a function that gets a list of rectangles, and adds all of the areas, returns a number 23:25 asumu: Okay, what part do you need help with? 23:25 failing: i think i have a pretty god function right now, i designed a helper function that does the calculation of areas, while the main function uses recursion to add them up 23:26 failing: the question is, if rectangle is sometihng like: (rectangle 10 20 "solid" "red") 23:26 failing: how do i tell the helper function to grab the first two parameters (the numbers) to multiply them together 23:27 failing: when the multiplication tries to run an error pops up: *: expects a number as 1st argument, given an image 23:28 asumu: Yes, the error is saying you gave it an image instead of a number. You want something that takes an image and produces a number. 23:28 asumu: Are you using 2htdp/image or the image teachpack? 23:29 failing: (require 2htdp/image) 23:29 asumu: You may find the function you want here: http://pre.racket-lang.org/docs/html/teachpack/2htdpimage.html 23:30 asumu: Oh, sorry you want this link: http://doc.racket-lang.org/teachpack/2htdpimage.html 23:30 asumu: Note that you can't directly extract the parameters from a rectangle, because "rectangle" produces an image. 23:31 asumu: Not something like a structure that has accessors. 23:32 failing: i see, so would i need to create a structure for rectangle? 23:33 asumu: No, probably not. If that last thing I said was confusing, ignore it. 23:33 asumu: (rectangle 10 20 "solid" "red") produces an image. 23:33 asumu: So assuming that the list you have is a list of images, you want to find some way to calculate image width and height. 23:34 asumu: You ought to be able to find such functions in the teachpack documentation I linked. 23:35 failing: ok, thnx alot dude, it will have to wait till tomorrow cuz im gonna go to bed 23:35 failing: so again, a thousand thanks and gnight 23:36 (quit) failing: Quit: Page closed 23:36 (join) jeapostrophe 23:42 (quit) jeapostrophe: Ping timeout: 255 seconds 23:43 (join) dingfeng 23:46 (join) jonrafkind 23:51 (join) samth