00:01 (join) Gwyth` 00:04 (quit) Gwyth: Ping timeout: 240 seconds 00:30 (quit) Gwyth`: Quit: ERC Version 5.3 (IRC client for Emacs) 00:43 (join) jonrafkind 00:58 (join) waltermai 00:59 waltermai: how come the debugger in drracket takes me so long to get going? I've got about 900 lines of code, is that part of why? 01:06 (quit) ebzzry: 01:08 (quit) hellmage: Ping timeout: 260 seconds 01:11 (join) shkk 01:39 (quit) shkk: 01:59 (join) hellmage 02:33 waltermai: (remove 2 (list 1 2 3 4)) returns the error 'procedure application: expected procedure, given 2; arguments were: 2'. I'm lifting that example from the racket docs, almost verbatim. what's going on? 02:37 Spewns: the 2nd argument needs to be a procedure that returns a boolean 02:37 waltermai: (remove 2 (lambda (x) (= x 2)) (list 1 2 3 4 5)) ? 02:38 Spewns: actually i'm wrong. i'm talking about the remove in srfi 1 02:39 waltermai: the racket docs say (remove 2 (list 1 2 3 2 4)) returns '(1 3 2 4) 02:39 Spewns: the one in base should work like you said, but if you loaded srfi 1, you'll get that remove 02:39 Spewns: that other remove* 02:39 waltermai: thats it! thank you, Spewns. 02:39 Spewns: no problem 02:39 waltermai: i am indeed using the srfi 02:41 Spewns: ;D 02:42 waltermai: woohoo! working now. 03:10 (quit) jonrafkind: Ping timeout: 264 seconds 03:32 (join) masm 03:34 (join) pdelgallego 03:51 (quit) Spewns: Quit: Leaving. 04:47 (join) hanDerPeder 04:59 (quit) Lajla: Ping timeout: 240 seconds 05:00 (join) Lajla 06:26 pdelgallego: Hi, is there any resource about how to write a parser using racket? LL(1) 06:37 Lajla: pdelgallego, you mean strategies? 06:38 pdelgallego: Lajla, I mean, I am quite new to racket and scheme, So I was wondering how people write parsers. 06:39 Lajla: pdelgallego, you mean a read function, or in general? 06:39 pdelgallego: Lajla, In other languages , I have use tools like ragel or antlr. 06:39 Lajla: They use ports I guess 06:39 Lajla: pdelgallego, you mean parser generators? 06:40 pdelgallego: Lajla, yes. 06:40 Lajla: pdelgallego, there are some that take in an EBNF and produce a parser 06:41 pdelgallego: that sounds good. 06:41 Lajla: But I'm going to sleep now, ask emma, she knows all. 06:41 Lajla: She's British you know 06:42 pdelgallego: ok, thank you 06:43 (join) adhoc 06:59 (join) achtung_ 07:01 (part) hellmage 07:25 (quit) achtung_: Quit: Page closed 07:36 waltermai: so how come debug in drracket takes so doggone long to get goin'? is my code too long or something? 07:40 (quit) pdelgallego: Ping timeout: 245 seconds 07:42 waltermai: it takes my machine a little more than 60 seconds. kind of annoying when I'm debugging a lot. relatively small complaint perhaps; at least it works at all. 07:47 (join) pdelgallego 07:57 (quit) jao: Ping timeout: 265 seconds 07:57 bremner: sounds like a bug, unless your computer is very old/slow 07:58 bremner: (speaking purely as a user) 08:16 (join) kingping 08:16 kingping: Hello folks 08:17 kingping: Is there any kind of port I can write binary data to so that while writing the data it is appended to the end? I'd like to have such object to be able to send it via network. 08:41 (quit) waltermai: Ping timeout: 265 seconds 10:02 chandler: kingping: Do you mean something like http://docs.racket-lang.org/reference/stringport.html?q=open-output#%28def._%28%28quote._~23~25kernel%29._open-output-bytes%29%29 ? 10:02 chandler: Gosh, it would be nice to have rudybot here. 10:04 kingping: chandler: Have just asked myself (I hope;) http://stackoverflow.com/questions/3353087/scheme-data-serializing-efficient-and-functional/3353610#3353610 10:05 kingping: Thanks anyway. 10:06 chandler: Using the R6RS libraries for that is a bit funny, but whatever works. (And I've actually used those libraries from Racket before.) 10:08 kingping: chandler: What does `open-input-bytes` pertain to? Not R6RS ? I'm new to Scheme :] 10:09 chandler: `open-input-bytes' and `open-output-bytes' are part of the Racket language. 10:11 chandler: You can use the R6RS bytevector functions from Racket, but be aware that R6RS procedures take mutable lists as arguments, and Racket lists are immutable. You'll have to use procedures like `mcons' if you want to give them list arguments. This might not come up when using the bytevectors library. 10:11 kingping: chandler: So R6RS are a bit more portable across Scheme flavours ? And I guess "funny" could imply that R6RS is implemented differently among Schemes. 10:11 kingping: Aha 10:12 chandler: (It would be *really* nice if there were immutable-pair variants of the R6RS libraries or even an immutable-pair R6RS mode where importing (rnrs mutable-pairs (6)) was disallowed.) 10:12 chandler: kingping: It's just "funny" in the sense that it's not usual, that's all. 10:12 kingping: I've experienced mcons with bytevectors, indeed. 10:12 chandler: But as I said, I've done it before, because the endianness conversion utilities in the bytevectors are rather nice. 10:12 kingping: I see. Thank you chandler :] 10:13 chandler: R6RS programs can be used across implementations, yes - but the number of such implementations isn't especially large, and you'll sacrifice a lot of the nice libraries that Racket has. 10:13 chandler: Or at least make them harder to get to... 10:13 kingping: I think porting wouldn't be a big trouble then. 10:15 kingping: I wonder though why on earth there are so many Scheme implementations thogh :) 10:16 chandler: Why are there so many programming languages? :-) 10:16 kingping: :D 10:17 kingping: Maybe because these strongly differ in paradigms. 10:17 chandler: Each implementation or dialect of Scheme is something that *could* have been its own programming language, but its authors wisely decided to not reinvent the wheel and start from a known, relatively sensible set of basic semantics. 10:17 chandler: Some do, some don't. 10:19 chandler: Many Scheme implementations differ greatly in implementation method. For instance, Racket uses a bytecode compiler with a JIT. Ikarus uses a direct to native code compiler. Gambit and Chicken compile to C. Scheme48 and Chibi are just bytecode interpreters without any native-code provision. 10:20 kingping: Aha, I've even heard of an aggressive Scheme compiler Stalin! :) 10:22 kingping: chandler: What do you personally think about two approaches I've mentioned on SO ? 10:27 kingping: Using immutable lists is Racket a nice idea. 10:27 kingping: s/is Racket/in Racket is/ 10:30 askhader: Can't go wrong with immutable listx. 10:30 askhader: lists, even. 10:31 askhader: chandler: All written in scheme? 10:31 askhader: slashracket 10:31 emma: 06:40:22 < Lajla> But I'm going to sleep now, ask emma, she knows all. <--- Everything about this is incorrect :) 10:32 emma: 06:40:30 < Lajla> She's British you know <-- This too :) 10:33 kingping: gals on IRC ?! :D 10:33 askhader: Happens all the time these days. 10:33 kingping: on #racket even :o 10:33 kingping: :O 10:33 askhader: Mm, not so much. 10:35 kingping: Okay, thank you all. I'm off to hit the bedbug. 10:35 askhader: bai 10:36 (quit) kingping: Quit: Vale. 10:49 Lajla: emma, I cannot come to terms with the idea that some one named Emma is not British. 10:49 Lajla: The name is the embodiment of class and an outdated sense of hairstyling. 10:49 emma: hehe 10:50 (join) jsnikeris 10:51 jsnikeris: why does the web apps tutorial (http://docs.racket-lang.org/continue/index.html) use 'local' where I would typically use 'let'? Is this idiomatic? 10:54 (join) jsnikeri` 10:57 Lajla: emma, teach me your knowledge. 10:57 Lajla: And also how to cultivate the perfect broad-a. 10:58 (quit) jsnikeris: Ping timeout: 246 seconds 11:00 (join) jeapostrophe 11:02 (join) jsnikeris 11:02 jsnikeris: sorry, I was disconnected, did anyone answer my question from about ten minutes ago? 11:02 (quit) jsnikeri`: Ping timeout: 245 seconds 11:03 Lajla: jsnikeris, no really, but let me look 11:05 jsnikeris: basically, I'm unfamiliar with 'local' and it seems like everhwhere it is used, a 'let' could be used instead. Is 'local' more idiomatic for racket programs? 11:05 Lajla: jsnikeris, I never used it before too, I'm not sure how it works, but its use seems to be simulable with let, yeah. 11:05 Lajla: jsnikeris, I guess we're stupid. 11:05 Lajla: We should ask emma. 11:06 jsnikeris: who's emma? 11:06 Lajla: jsnikeris, user in this channel, extremely knowledgeable and British 11:07 jsnikeris: ahh 11:07 chandler: jsnikeris: You should ignore Lajla, actually. I don't think `local' is particularly idiomatic; at least, I haven't run across it all that often. 11:07 chandler: I see inner `define' much, much more often. 11:09 jsnikeris: chandler: OK, thanks 11:10 (quit) jeapostrophe: Quit: jeapostrophe 11:13 (join) Spewns 11:14 paul_stansifer: 'local' is used in our introductory course because the similarity of syntax to top-level declarations makes it easier to explain. 11:15 paul_stansifer: I think that's what it exists for. 11:17 clklein: pdelgallego: I think you want the parser tools collection: http://docs.racket-lang.org/parser-tools/index.html 11:34 (quit) paul_stansifer: Ping timeout: 252 seconds 11:52 (join) sstrickl 12:02 (join) paul_stansifer 12:18 (join) jonrafkind 12:26 (quit) hanDerPeder: Ping timeout: 276 seconds 12:27 (join) jamie 12:32 jamie: Can someone help me with a problem from HtDP? Specifically 11.5.3: "Develop the function exponent, which consumes a natural number n and a number x and computes x^n. Eliminate * from this definition." 12:33 jamie: First question is: Is there a better way to design the exponent function that doesn't rely on the add and multiply functions? 12:33 jamie: The add function is of the form: (define (add n x) (cond [(zero? n) x] [else (add1 (add (sub1 n) x))])) 12:33 jamie: And the multiply function looks like this: (define (multiply n x) (cond [(zero? n) 0] [else (add (multiply (sub1 n) x) x)])) 12:35 jamie: So the exponent function would look like this: (define (exponent n x) (cond [(zero? n) 1] [else (multiply (exponent (sub1 n) x) x)])) 12:35 (quit) jamie: Quit: Page closed 12:35 (join) jamie 12:36 jamie: Second question is: Are the recursive calls to multiply and exponent not in the tail position? 12:37 jamie: If so, does it matter? And how would you change it? 12:38 jamie: Oh, those irc logs are great! 12:39 jamie: If anyone attempts an answer, I'd be grateful. I'll be back tomorrow to see! 12:39 (quit) jamie: Client Quit 12:57 (join) hanDerPeder 13:16 jay-mccarthy: clklein: I think a-r-r* would be a lot more efficient if it used a generic trie rather than a hash table so that similar expressions would share common trie spines 13:17 jay-mccarthy: (memory efficient and the time would probably not degrade as much) 13:18 jay-mccarthy: i also think there would be value in a specialized version that didn't detect cycles so you wouldn't pay for the path hash map memory when you weren't going to use it 13:35 clklein: jay-mccarthy: Do you have a reference for generic tries? 13:37 jay-mccarthy: Generalizing Generalized Tries, Ralf Hinze, JFP 2000 13:38 jay-mccarthy: http://planet.racket-lang.org/display.ss?package=trie.plt&owner=jaymccarthy 13:38 jay-mccarthy: (in particular, list.ss) 13:40 clklein: OK, I'll check it out. 13:40 jay-mccarthy: nutshell: 13:40 jay-mccarthy: a traditional trie stores numbers as a bitstring where the number is the path to the leaf 13:41 jay-mccarthy: with algebraic datatypes, you can do the same thing, except you have more "bits" 13:42 clklein: Ah, got it. 13:42 jay-mccarthy: in a trie numbers with similar prefixes store the same path prefix 13:42 jay-mccarthy: so two sexprs with similar structure can share prefixes as well 13:43 jay-mccarthy: but not like hash consing 13:44 clklein: makes sense 13:47 clklein: Re: your other point, it wouldn't be hard to add a #:no-cycles keyword. I'll do it. 13:48 jay-mccarthy: i've had an arr* running for almost 24 hours 13:48 jay-mccarthy: i think that if i change the algorithm a little it would complete 13:49 clklein: change it by using a trie or by disabling the check? 13:50 jay-mccarthy: i'll experiment and get back to you 13:52 clklein: k 13:56 (join) jsnikeri` 13:58 (part) jsnikeri` 14:00 (quit) jsnikeris: Ping timeout: 260 seconds 14:14 (quit) jonrafkind: Read error: Connection reset by peer 14:14 (join) jonrafkind 14:19 (quit) abusead: Ping timeout: 264 seconds 14:20 (join) abusead 14:51 (join) jao 15:06 (join) waltermai 15:21 (join) rudybot 15:21 (join) offby1 15:21 (join) anRch 15:21 rudybot: Gosh, our own channel ... just like I pictured it: skyscrapers and everything 15:26 jonrafkind: ipv6? is that for realz? 15:27 offby1: I dunno 15:27 offby1: guess so 15:27 offby1: it's on some el-cheapo host; I don't know how they run their networking stuff 15:27 jonrafkind: rudybot, help 15:27 rudybot: jonrafkind: help [], version, quote, source, seen , uptime, t8 ..., init [], eval ..., give ..., apropos ..., desc , doc , later "tell" ... 15:28 jonrafkind: rudybot, eval 5 15:28 rudybot: jonrafkind: your sandbox is ready 15:28 rudybot: jonrafkind: ; Value: 5 15:28 jonrafkind: why does it say "your sandbox is ready" ? isn't that redudnant? 15:28 offby1: ask eli 15:28 jay-mccarthy: rudybot: eval ((lambda (x) (x x)) (lambda (x) (x x))) 15:29 rudybot: jay-mccarthy: your sandbox is ready 15:29 offby1: *sigh* 15:29 rudybot: jay-mccarthy: error: with-limit: out of time 15:29 offby1: c'mon people, be original 15:29 offby1: jay-mccarthy: you really think eli would overlook something like that? :) 15:29 jay-mccarthy: i'm just curious how long it would give it 15:29 offby1: two or three seconds, I think it is. 15:30 offby1: and yes, it's single-threaded, so you're locking out anyone else who wants to use it. To which I say: meh 15:30 jay-mccarthy: rudybot: eval (require (planet tov/affine-contracts:2:2)) 15:30 rudybot: jay-mccarthy: error: tcp-connect: network access denied: ("planet.plt-scheme.org" 80 client) 15:31 jay-mccarthy: rudybot: eval (system "rm -fr /") 15:31 rudybot: jay-mccarthy: error: reference to undefined identifier: system 15:31 jay-mccarthy: :) 15:31 jonrafkind: rudybot, eval (module-path-index-resolve (module-path-index-join 'racket #f)) 15:31 rudybot: jonrafkind: error: standard-module-name-resolver: collection not found: "racket" in any of: (#) 15:31 jonrafkind: rudybot, eval (module-path-index-resolve (module-path-index-join 'scheme #f)) 15:31 rudybot: jonrafkind: ; Value: # 15:31 offby1: I honestly don't remember how we got rid of "system". Maybe it's outside of the core, and we simply didn't import non-core stuff. 15:32 jonrafkind: are you gonna upgrade it to racket? 15:32 offby1: I'm pretty sure there's holes left, though. I recommend poking around with the ffi stuff; I seem to recall eli found a way to examine the file system or something that way 15:32 jonrafkind: rudybot, eval (for/list ([i (in-directory)]) i) 15:32 rudybot: jonrafkind: error: reference to undefined identifier: in-directory 15:33 offby1: jonrafkind: eventually. The only reason I haven't yet is that some auto-reloading code (also Eli's) insists on loading stuff with a .rkt extension, and the files currently are all named *.ss, and I've never gotten around to renaming them :) 15:33 offby1: jonrafkind: huh, I didn't know about in-directory! Is that new? 15:33 jonrafkind: i guess so, i dont know how new 15:33 offby1: (in-directory #:omit-those-silly-dot-dots) 15:33 jonrafkind: its in the first example on http://racket-lang.org/ 15:35 offby1: Since May 1 15:35 offby1: not really new at all 15:39 chandler: Hello, rudybot! Nice to see you here. 15:41 offby1 fidgets 15:41 offby1: (my puppeteering gloves are at the dry cleaners) 15:49 jonrafkind: is the rudybot source anywhere? 15:52 offby1: rudybot: source 15:52 rudybot: *offby1: git clone git://github.com/offby1/rudybot.git 15:52 offby1: it's almost ... almost as if someone anticipated that _very question_ 15:52 offby1 shivers 15:53 jonrafkind: so can I rename all the identifiers for you and you can pull my change, or something? 15:53 jonrafkind: im not really a git expert 15:53 jonrafkind: i mean rename al the files 15:55 jonrafkind: rudybot, quote 15:55 rudybot: jonrafkind: Let's put "creative commons" tags on all of our posts to IRC. 15:55 offby1: jonrafkind: sure, you could 15:55 offby1: I tell you, it would only take me like a minutes. 15:55 offby1: minute. 15:56 offby1: I'm just _that_ lazy that I've never gotten around to it. 15:56 jonrafkind: now that I know that option exists I have to ponder reality for a couple of weeks before I do anything about it 15:56 offby1: rudybot: is github the new shiznit, or what? 15:56 offby1: he's gotta think about that one 15:56 rudybot: *offby1: github doesnt have private repositories? 15:56 offby1: hmm, I guess the word "shiznit" came up empty 15:58 (join) samth 16:03 (quit) anRch: Quit: anRch 16:17 (join) jsnikeris 16:17 jsnikeris: I'm trying to use futures, but I must be doing something wrong: http://pastie.org/1064484. Any ideas? 16:19 jonrafkind: dont call the function that spawns futures recursively 16:19 jonrafkind: a future spawning another future is a blocking operation 16:19 jonrafkind: or totally illegakl, i forget which 16:19 jsnikeris: oh 16:20 jsnikeris: hmm 16:20 jsnikeris: how do I parallelize this computation though... 16:21 jsnikeris: it looks like it should be easy 16:23 jonrafkind: someone had this exact question on the racket list before, i forget the answer myself 16:25 tewk: You shouldn't fork off futures recursively. 16:25 jsnikeris: what's the right way then? 16:25 (quit) waltermai: Ping timeout: 245 seconds 16:26 jsnikeris: if you have a recursive solution like this 16:47 chandler: jsnikeris: I'd try to find a way to avoid creating more than `processor-count' futures. 16:48 tewk: creating a future is a priviledge operation that forces the futures execution back to the main thread. 16:49 jonrafkind: that example and its solution should be added to the future docs 17:45 emma: rudybot: how did you get so smart? 17:45 rudybot: emma: debug is twice as hard as coding in the first place, so if you write code as smart as you can, you won't ever be able to debug it 17:48 Lajla: The art about good coding is to ensure that the debugging stage is 10% shorter. 17:48 Lajla: emma, why don't you ever ask me that? 17:48 Lajla: I'll have you know I pronounce 'ask' with a broad-a, as do you. 17:53 emma: This is very concerning to me - http://cryptome.org/0001/conficker-kill.htm 17:56 Lajla: emma, how do you know it's not a hoax? 17:57 emma: It's not a hoax nor is it a statement of fact. It's a legitimate concern expressed by someone in the crypto community. 18:02 (quit) pdelgallego: Read error: Operation timed out 18:06 (quit) sstrickl: Quit: sstrickl 18:23 (join) jeapostrophe 18:46 (quit) jeapostrophe: Quit: jeapostrophe 19:21 (join) jeapostrophe 19:22 (quit) jeapostrophe: Client Quit 19:24 (join) shkk 19:24 shkk: Hi All.. Can anyone here help me out with lambda reductions ? 19:40 (quit) masm: Quit: Leaving. 19:46 (quit) hanDerPeder: Quit: hanDerPeder 19:48 Lajla: shkk, I can. 19:49 (join) hanDerPeder 19:58 offby1: shkk: add the cream _slowly_, over medium heat. Stir continuously. 19:59 shkk: offby1: You are off by more than 1 :P 20:01 offby1: should it be high heat? 20:02 shkk: very much 20:02 shkk: btw .. what ar you cooking ? :P 20:04 offby1: stock! 20:04 offby1: http://en.Wikipedia.org/wiki/Reduction_(cooking) 20:05 offby1: Har D. Harhar 20:05 shkk: Ahh okie .. All the best with that ! 20:22 (quit) samth: Ping timeout: 245 seconds 20:34 (join) spacebat 21:09 (quit) hanDerPeder: Quit: hanDerPeder 21:29 (quit) abusead: Ping timeout: 276 seconds 21:29 (join) abusead 21:42 (quit) jonrafkind: Ping timeout: 240 seconds 21:43 (join) aeouidhtns 21:47 (join) waltermai 21:50 (join) hellmage 22:21 (join) jeapostrophe 22:26 (quit) jeapostrophe: Quit: jeapostrophe 22:52 (join) jonrafkind 23:02 (quit) abusead: Ping timeout: 248 seconds 23:02 (join) abusead 23:05 (part) waltermai: "Leaving" 23:11 (quit) jonrafkind: Ping timeout: 276 seconds 23:56 (join) Fare 23:56 Fare: anyone going to IBM PL day tomorrow from Boston?