00:00 offby1: I bet it was an off-by-one error in the range of the random number 00:03 cipher: nope, though I did fix that too 00:03 cipher: it was (for ([r (in-range (sub1 s))]) (let ([x (modexp x 2 n)]) 00:04 cipher: that was binding x to the *old* binding for x 00:05 cipher: the algorithm calls for x <- x^2 mod n to repeat for each iteration of the loop 00:06 cipher: the quick fix was to not use the let and instead do a set! on x 00:09 offby1: yeah I was heading there too 00:21 (nick) elliottcable -> ec|detached 00:39 (join) Demosthenes 00:41 Demosthenes: oh how i long for racket -d ;] 00:41 Demosthenes: like perl -d ;] 00:50 (join) jeapostrophe 01:08 (nick) ec|detached -> elliottcable 01:19 (quit) mceier: Ping timeout: 240 seconds 01:26 (quit) Demosthenes: Ping timeout: 260 seconds 01:30 em: offby1: what do you like to use generators for? why do you say they are "_super_ cool" ? 01:38 cipher: they're great for not generating a huge list or taking up a lot of space all at once 01:38 cipher: their syntax is also pretty elegant 01:39 cipher: http://www.youtube.com/watch?v=Yx2xFsY7vmo 01:39 cipher: haha 01:52 ohwow: Hello. 02:19 (quit) realitygrill: Quit: realitygrill 02:20 (quit) jeapostrophe: Quit: jeapostrophe 03:28 (join) masm 03:47 (nick) elliottcable -> ec|detached 05:38 (join) MayDaniel 06:05 (quit) MayDaniel: Read error: Connection reset by peer 06:52 (join) lucian 06:55 (join) haruki_zaemon 07:27 (join) Lajla 07:28 (part) Lajla 07:43 (part) haruki_zaemon: "Textual IRC Client: http://www.textualapp.com/" 08:46 (join) jeapostrophe 09:16 (quit) dnolen: Quit: dnolen 09:23 (join) MayDaniel_ 09:48 (quit) jeapostrophe: Quit: jeapostrophe 10:00 (join) jeapostrophe 10:04 (quit) jeapostrophe: Client Quit 10:23 (join) anRch 11:06 (join) realitygrill 11:18 (quit) lucian: Remote host closed the connection 11:19 (join) lucian 11:30 (join) jeapostrophe 11:39 (quit) anRch: Quit: anRch 11:39 (quit) jeapostrophe: Quit: jeapostrophe 11:42 (join) jeapostrophe 11:43 (quit) jeapostrophe: Client Quit 12:03 (join) JoelMcCracken 12:07 (quit) JoelMcCracken: Remote host closed the connection 12:10 (join) JoelMcCracken 12:12 (quit) DT``: Ping timeout: 250 seconds 12:16 offby1: em: take a look at https://github.com/offby1/doodles/blob/master/plt-scheme/web/amazon/group.rkt 12:16 rudybot: http://tinyurl.com/3tsvy99 12:16 offby1: I think that'd be really hard to write without generators 12:24 (join) DT`` 12:50 cipher: I love racket 12:54 realitygrill: yay 12:54 rapacity: I hate noise 12:54 ohwow: hm i have homework to do, but instead i am playing with racket gui :( 13:24 (quit) MayDaniel_: Read error: Connection reset by peer 13:29 (join) dherman 13:38 (quit) JoelMcCracken: Ping timeout: 250 seconds 13:51 (quit) dherman: Quit: dherman 13:55 (join) dherman 13:58 (join) Dre 13:58 (join) dnolen 13:59 (quit) dherman: Client Quit 14:06 em: offby1: what does that do? 14:06 em: and what does (provide group) do? 14:07 (join) Dranik 14:08 ohwow: em: (provide group) provides GROUP for use into other moduels 14:08 ohwow: *modules 14:13 (quit) Dranik: Ping timeout: 240 seconds 14:19 (join) JoelMcCracken 14:21 Dre: Hello everyone, I'm a noob trying to learn racket under linux. Currently I'm using Dr.Racket and reading the htdp.org course. Am I missing any helpful information ? 14:22 JoelMcCracken: that sounds like you are off to a good start 14:22 ohwow: yea 14:23 JoelMcCracken: the second part of the equation is to be here :) 14:23 Dre: ok, thanks. I'm in section 6 and it looks like it will take a while until I code something useful on my own :D 14:24 JoelMcCracken: do you already know how to program? I found SICP to be a more interesting introduction to scheme 14:24 Dre: I'll try to be here 14:26 Dre: I've some coding skills, but only on Fortran and Matlab. But I want to go a little further. 14:26 ohwow: JoelMcCracken: some might argue that HtDP is a better start 14:26 ohwow: (then sicp) 14:27 Dre: well, so I guess that's a taste problem 14:27 Dre: i'll try to have a look at it 14:27 Dre: thanks 14:29 JoelMcCracken: ohwow: yeah, it may be. But I couldn't put SICP down, while HTDP was a little boring to me, as a senior at uni. No offense to the authors, of course! I've recommended it to a number of my friends who mentioned an interest in learning to program. 14:30 Dre: Well, I don't mind it being boring (It takes a lot to bore me) and it looked a pretty step-by-step approach to me 14:30 Dre: so I started there 14:31 JoelMcCracken: good 14:32 Dre: well, thanks a lot again for your time 14:32 Dre: time to get hands to work 14:39 (quit) JoelMcCracken: Ping timeout: 250 seconds 14:41 (join) jeapostrophe 14:43 cipher: oh cool, RacketCon is in Boston! 14:43 cipher: I'll be there! 14:58 offby1: em: the "group" function takes a sequence and a number, and more-or-less returns another sequence of the same elements, but grouped into lists of the given siez. 14:58 offby1: size. 14:58 offby1: em: the idea was: I want to send some requests to Amazon Web Services, and it's inefficient to send each request on its own; instead, I "batch" them up into groups. 14:58 offby1: so I use this thing to do that. 14:59 offby1: "provide" is more or less "export" -- it means "make this name visible outside of this module". 14:59 offby1: I'm surprised you didn't know that 15:06 (join) eduardo_ 15:08 eduardo_: hi, i was reading a article about compiling lambda calculus and there's this code http://matt.might.net/articles/compiling-up-to-lambda-calculus/code/compile.rkt 15:08 rudybot: http://tinyurl.com/3mybtjp 15:09 eduardo_: but i cant understand the need for eval to run the last test 15:14 (join) wwwd 15:17 (quit) eduardo_: Quit: Page closed 15:19 (join) aalix 15:19 (join) bmp 15:20 wwwd: I am following "How to Design Programs" and I am finding lots of Templates in the examples that do not compile. Is the template always suposed to compile? 15:21 cipher: can you link to one? 15:21 (quit) aalix: Quit: Textual IRC Client: http://www.textualapp.com/ 15:22 (join) aalix 15:23 wwwd: http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-13.html#node_sec_9.1 15:24 wwwd: or do you mean copy it to a pastbin and link? 15:25 cipher: the latter would be better 15:25 wwwd: Ok! Sorry I'm new to all this. Give me a sec. 15:26 wwwd: https://gist.github.com/5c000920ed1de56afac7 15:28 cipher: yeah that isn't expected to be run, it is representative code. the ellipsis aren't intended to be syntax 15:28 em: offby1: yeah i never used a provide. I thought when you require a module that means you automatically can use anything of its procedures. 15:30 cipher: wwwd: I think they're just trying to show how as a conceptual template the code can be molded into something more useful 15:31 wwwd: cipher: So do you generaly use templates or are they more of a learning exercise? 15:31 cipher: think it's up to your coding style 15:33 wwwd: Ok! I have some questions regarding a solution to a problem I wrote. If I post a link would you take about 5 min and give me a little feed back? 15:34 cipher: sure 15:35 (join) MayDaniel_ 15:35 wwwd: cipher: Thanks https://gist.github.com/5c000920ed1de56afac7 15:35 offby1: em: nope, when you require a module, you only get those things that the module has provided. 15:35 offby1: It's not like perl or python; it's stricter. 15:36 em: Oh i see, so a module has more stuff in it than it provides? 15:36 em: or, it might? 15:36 (quit) MayDaniel_: Read error: Connection reset by peer 15:38 wwwd: cipher: so I had been nameing the to represent the input (i.e. a-circle or a-rect) then I decided the code can recognise it so just changed to object? So the funcion name indicates what is being processed but object just lets me know something is. Is that a good idea or will it make it hard to follow later when things get bigger? 15:40 offby1: em: it certainly might. 15:41 offby1: em: keeping stuff private is crucial 15:41 wwwd: cipher: Also, is my style generaly ok and am I using helper functions correctly? 15:42 offby1: em: I can't find an really good explanation of _why_ though 15:43 cipher: I haven't coded in scheme long enough to really anwer these stylistic questions. I'd say that you've done--calling it object--is probably fine. I personally would probably call it circle when the function implies that it has to be a circle, and using object when the function uses a cond to pick the appropriate path based on the type 15:43 offby1: em: generally you try to provide a simple interface, consisting of a small number of data types and functions. As long as you don't provide any more than you need to, it means you're free to redesign stuff inside the module, without having to change any of the module's clients. This is a big deal. 15:45 wwwd: cipher: Ok. Thanks for your time. Back to the problem at hand!!! 15:46 offby1: wwwd: it all looks fine to me. 15:46 offby1: It's pretty verbose, but I'm guess that you haven't yet been taught what to do about that. 15:46 offby1: s/guess/guessing/ 15:48 wwwd: offby1: No I've taught myself a little python and now I'm working on Racket. I think How to Design Programs gets into that a little later. 15:48 wwwd: ...Also, I am hoping at some point I will "get it!!!" 15:50 wwwd: offby1: did you ping me with a caret symbol or how did you do that? 16:00 (join) mithos28 16:01 offby1: how did I do what? 16:01 offby1 never reveals his secrets 16:03 (quit) bmp: Quit: Leaving... 16:03 offby1: say, racket peeps 16:03 offby1: rudybot: eval (format "~a" (string->bytes/utf-8 "\u1234\uabcd")) 16:03 rudybot: *offby1: ; Value: "ሴ\uABCD" 16:03 offby1: that works fine as you can see 16:04 offby1: but is it documented somewhere that ~a, when given some bytes, effectively does bytes->string/utf-8 on 'em? 16:06 (join) ryandanas_ 16:07 (part) ryandanas_ 16:07 (join) ryandanas_ 16:10 ryandanas_: Would anyone have any experience with this error: compile: access from an uncertified context to unexported variable from module: "/Applications/Racket v5.1.1/collects/racket/contract/private/base.rkt" in: apply-contract ? 16:11 ryandanas_: im making a pretty basic web app. I had to switch back to an older version of the code. Now everytime I make even the most subtle of changes, I get this error. Removing the changes does not stop the error either. 16:19 (join) MayDaniel_ 16:20 (quit) aalix: Quit: Textual IRC Client: http://www.textualapp.com/ 16:20 (join) aalix 16:21 (quit) lucian: Quit: Ex-Chat 16:24 bremner_: do you maybe have compiled versions (.zo) of your code around? 16:26 (quit) MayDaniel_: Read error: Connection reset by peer 16:30 bremner_: ryandanas_: there is no need to go to private messages, maybe somebody else has better ideas. I would look for "compiled" subdirectories generated by racket and remove them if you have trouble after switching versions. 16:31 (join) lucian 16:31 (join) bmp 16:31 (quit) bmp: Client Quit 16:34 ryandanas_: that worked! thanks. 16:35 (quit) mithos28: Quit: mithos28 16:35 (nick) offby1 -> anon 16:36 (nick) anon -> offby1 16:43 (join) mithos28 16:50 (join) shofetim 17:02 (join) PLT_Notify 17:02 PLT_Notify: racket: master Kevin Tew * b6225f6 (1 files in 1 dirs): Fix mzrt_cas for GCC < 4.1 - http://bit.ly/iizIry 17:02 (part) PLT_Notify 17:06 bremner_: ryandanas_: great! 17:20 (quit) jeapostrophe: Quit: jeapostrophe 17:41 (quit) mithos28: Quit: mithos28 18:09 (join) MayDaniel 18:18 (join) jeapostrophe 18:23 (nick) ec|detached -> elliottcable 18:27 (quit) jeapostrophe: Quit: jeapostrophe 18:28 (join) jeapostrophe 18:28 (quit) aalix: Quit: Computer has gone to sleep. 18:31 (quit) masm: Ping timeout: 246 seconds 18:36 (quit) jeapostrophe: Quit: na 18:38 (join) jeapostrophe 18:39 (part) jeapostrophe 18:39 (join) jeapostrophe 18:43 (part) jeapostrophe 18:44 (join) jeapostrophe 19:01 (join) ckrailo 19:08 (quit) shofetim: Quit: ERC Version 5.3 (IRC client for Emacs) 19:16 (quit) MayDaniel: Read error: Connection reset by peer 19:27 (quit) lucian: Remote host closed the connection 19:29 (join) lucian 19:34 (quit) jeapostrophe: Remote host closed the connection 19:34 (join) jeapostrophe 19:34 (quit) jeapostrophe: Remote host closed the connection 19:34 (join) jonrafkind 19:40 (join) mikeric 19:40 (quit) mikeric: Client Quit 19:41 (quit) bremner_: Quit: ZNC - http://znc.sourceforge.net 19:42 (join) bremner_ 19:43 (quit) lucian: Quit: Ex-Chat 19:48 (quit) Dre: Quit: Leaving 20:15 (quit) realitygrill: Quit: realitygrill 20:18 (join) aalix 20:35 (quit) aalix: Quit: Textual IRC Client: http://www.textualapp.com/ 20:43 (join) jeapostrophe 20:51 (quit) rudybot: Remote host closed the connection 21:01 (quit) jonrafkind: Ping timeout: 246 seconds 21:08 (join) rudybot 21:39 (join) realitygrill 22:20 (join) jonrafkind 22:34 (join) dherman 23:04 (quit) jeapostrophe: Quit: jeapostrophe 23:25 (quit) wwwd: Quit: Page closed 23:27 (join) jeapostrophe 23:38 (join) aalix