00:00 DiagonalArg: This is Ubuntu 12.04. DrRacket v.5.1.3 00:02 DiagonalArg: I don't see anything else in the menus that has any indication that it would relate to fonts/colors. 00:03 (join) mithos28 00:13 jonrafkind: oh yea edit->prefs 00:13 jonrafkind: dont you see a color tab 00:13 jonrafkind: font is the first tab 00:26 (quit) ambrosebs: Remote host closed the connection 00:45 (join) kvda 00:50 (quit) mithos28: Quit: mithos28 00:51 (join) mithos28 00:53 (quit) cdidd: Remote host closed the connection 01:10 (join) gridaphobe 01:11 (join) anonymous97890 01:12 (quit) mithos28: Quit: mithos28 01:13 (join) cdidd 01:19 (join) mithos28 01:20 (join) ambrosebs 01:23 (quit) mithos28: Client Quit 01:35 (join) mithos28 01:37 anonymous97890: Hello everyone :( 01:37 anonymous97890: mithos28: are you here> 01:37 anonymous97890: ? 01:37 mithos28: anonymous97890: I'm about to go to bed 01:39 (quit) sirdancealot: Ping timeout: 272 seconds 01:39 anonymous97890: mithos28: don't think I am going to blame you, but bugreport about the examples were closed. chmod +x was closed too: I was sleeping and didn't see they're going to do it. It is definitely a bug. I've written them about it now. Is it improbably for them to see it? 01:40 anonymous97890: I asked them to try Try chmod 000 && chmod +x 01:40 mithos28: why are you chmoding it 000 first? 01:40 anonymous97890: (> test && cat test 01:43 anonymous97890: (what system do you use?) 01:43 anonymous97890: the* 01:43 mithos28: anonymous97890: Yes you can configure it so that it doesn't work 01:44 mithos28: The only way that would happen is if you tried to explicitly do that 01:44 anonymous97890: Advanced Bash Scripting suggests (chmod u+rx scriptname) 01:44 (join) sirdancealot7 01:44 anonymous97890: why don't you want to make the guide a bit more bulletproof? 01:45 anonymous97890: ( http://tldp.org/LDP/abs/html/why-shell.html ) 01:45 mithos28: Because I don't think that is an actual issue 01:47 anonymous97890: uff.. ok. At least they've accepted the "extra parentheses". I haven't sent them only one bug: about unicode. I had to sleep. 01:48 anonymous97890: Ok, thank you. 01:49 (join) Kaylin1 01:49 DiagonalArg: Looking for help on -rv or -fg/-bg switches to Dr.Racket - I'm trying it but it doesn't work. No "color" prefs in Edit>>Prefs. Any ideas? (This things' burning my eyes, & I've got a homework assignment to do!) 01:50 DiagonalArg: This is Ubuntu 12.04. DrRacket v.5.1.3 01:50 mithos28: DiagonalArg: I'm on osx but I have a color menu in the preferences 01:50 mithos28: between font and editing 01:50 DiagonalArg: Nope, not here in Ubuntu. 01:50 mithos28: I'm also on 5.3.whatever 01:51 DiagonalArg: That could be it. Maybe I should try a more recent version (Ubuntu is always behind ...) 01:51 anonymous97890: 5.3.3 has 01:51 DiagonalArg: Don't suppose there's a ppa with a more recent version ... 01:51 anonymous97890: DiagonalArg: maybe you should try apt-get update && apt-get upgrade? 01:52 DiagonalArg: No, Ubuntu is always behind. I'm updated. 01:52 mithos28: https://launchpad.net/~plt/+archive/racket 01:52 anonymous97890: It seems ubuntu has newest version(I have an ubuntu notebook, and I installed from repositories, but right now I am on mine - debian stable) 01:52 DiagonalArg: (Have to do the same with Firefox, if you want a new one.) 01:52 mithos28: that has 5.3.3 for lots of ubuntus 01:53 DiagonalArg: hm. U on 12.04 or 12.10? 01:53 DiagonalArg: (Precise or Quantal?) 01:53 (quit) mithos28: Quit: mithos28 01:54 anonymous97890: 12.10 01:54 jonrafkind: DiagonalArg, did you not see the color tab in preferences? 01:54 jonrafkind: im 99% sure the color tab has been there since forever 01:55 anonymous97890: DrRacket 5.2.1 01:55 DiagonalArg: I've got a laptop with 12.10. I'm about to check it. (Absolutely no color tab! I'm tellin' ya!) 01:56 jonrafkind: what tabs do you have 01:58 anonymous97890: I have color setting on 5.2.1 01:58 DiagonalArg: Ok, 5.2.1 on my laptop (quantal) has multiple tabs! But 5.1.3 on my desktop (Precise) has no tabs - just the single for fonts. 01:59 DiagonalArg: Whew! I'll move over there ... 01:59 DiagonalArg: (:-/ frustrating ...) 02:00 jonrafkind: did you set up the ppa to get the latest racket 02:01 anonymous97890: Is the Fluxus engine just a toy? Can I use it to make big games(if speed doesn't matter)? 02:01 DiagonalArg: I'm just using the ubuntu repo. 02:01 DiagonalArg: If there's a ppa with a newer one, I'll install it. 02:01 jonrafkind: yes, its the one mithos linked to already 02:01 DiagonalArg: anyone know? 02:01 jonrafkind: https://launchpad.net/~plt/+archive/racket 02:02 anonymous97890: Or, maybe, anyone can recommend other great engine(if speed doesn't matter)? 02:03 DiagonalArg: Ah, missed that ... Going to do now! Thanks for all yr help jonrafkind ... (and mythos, but I think he left) 02:04 jonrafkind: if you want the absolute latest (built every night) you can use this ppa: https://launchpad.net/~plt/+archive/racket-nightly 02:05 jonrafkind: oops, except last night because i rebooted the machine accidentally 02:05 jonrafkind: oh well ill fix it tomorrow 02:07 anonymous97890: does anyone know about game engines in Racket? 02:07 jonrafkind: ozzloy, might 02:21 (quit) ambrosebs: Remote host closed the connection 02:27 (quit) jonrafkind: Ping timeout: 264 seconds 02:38 (quit) rmathews: Quit: ... 02:40 (quit) jackhammer2022: Quit: Computer has gone to sleep. 02:42 (quit) bremner: Ping timeout: 260 seconds 02:43 (join) bremner 02:43 (quit) bremner: Changing host 02:43 (join) bremner 02:45 (part) DiagonalArg 03:08 (join) bjz 03:08 (quit) bjz: Read error: Connection reset by peer 03:08 (join) bjz_ 03:09 (quit) shadgregory: Quit: ERC Version 5.3 (IRC client for Emacs) 03:10 (join) shadgregory 03:16 (quit) BeLucid: Ping timeout: 260 seconds 03:17 (join) paddymahoney1 03:17 (nick) paddymahoney1 -> paddymahoney 03:22 (join) jao 03:22 (join) soegaard 03:22 (quit) jao: Changing host 03:22 (join) jao 03:29 (quit) gridaphobe: Remote host closed the connection 03:35 (quit) Nisstyre-laptop: Quit: Leaving 03:36 (quit) anonymous97890: Ping timeout: 255 seconds 03:39 (quit) jao: Ping timeout: 245 seconds 03:39 (quit) adu: Quit: adu 03:46 (quit) tcsc: Quit: computer sleeping 03:59 (join) anonymous97890 04:01 (quit) anonymous97890: Client Quit 04:09 (join) leo2007 04:11 leo2007: any possibility of you racket fellows to offer an advanced course on programming languages on coursera? 04:16 (join) rmathews 04:27 (join) mowe 04:28 mowe: hey, could it be that ,enter does not reload modules? at least it does not work for me... 04:28 mowe: in xrepl 04:36 mowe: strangely enough, (enter! ...) seems to reload the module-- is this a bug or am i doing something wrong? 04:38 soegaard: It seem the xrepl users aren't here now. There were a discussion on xrepl on the mailing list, not too long ago. 04:39 mowe: soegaard: mh, okay thx. i'll look it up. 04:39 (quit) rmathews: Quit: ... 04:41 (quit) kvda: Quit: -___- 04:49 (join) vipjun 04:51 mowe: jepp, same problem was posted on the mailing list. seems to be a bug. 05:01 soegaard: I know they worked on it, but I can't remember if it was fully solved. 05:03 mowe: soegaard: i was not able to find a solution, so I guess they're still working on it... 05:03 mowe: i use enter! for now 05:06 (quit) Kaylin: Read error: Connection reset by peer 05:12 (quit) racycle: Ping timeout: 256 seconds 05:14 (join) racycle 05:16 (join) rich1 05:17 rich1: if i have 2 functinos, f, and f-walker, f is just (apply max (f-walker ...)), and f-walker is a for/list 05:18 rich1: will racket "know" that building the list isn't strictly needed and it only needs to reduce to the max or use a stream insted? 05:19 rich1: or should i make f-walker accumulate the max itself ? 05:20 iXeno: how can I check if a throable is an instance of error? 05:24 (join) anonymous97890 05:26 soegaard: rich1: Consider using for/max 05:27 (join) rmathews 05:28 soegaard: iXeno: exn:fail? 05:28 iXeno: ok 05:29 rich1: soegaard: i did have a search for for/max as a guess when i seen other for/xxx variants - but i couldn't find it 05:31 soegaard: Hmm. It is missing. See the example for a definition: http://docs.racket-lang.org/reference/for.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._for%2Ffold%2Fderived%29%29 05:31 rudybot: http://tinyurl.com/aw8zzs9 05:33 soegaard: Maybe argmax is better? http://docs.racket-lang.org/reference/pairs.html?q=argmax#%28def._%28%28lib._racket%2Flist..rkt%29._argmax%29%29 05:33 rudybot: http://tinyurl.com/bytlkgp 05:36 rich1: for my usage i think f would become (argmax identity (f-walker ...)) - as f-walker takes a list and outputs another of the same length 05:36 soegaard: ok 05:37 rich1: (apply max ...) looks more readable, but if argmax is quicker it might be worth it 05:38 rich1: also is there a convention to use cond even for 2 conditions like htdp, or should i use if 05:38 soegaard: (apply max …) is probably faster than argmax (but there is no way to know without measuring) 05:39 soegaard: About cond/if. Here is the style guide: http://www.ccs.neu.edu/home/matthias/Style/style/Choosing_the_Right_Construct.html#(part._.Conditionals) 05:39 rudybot: http://tinyurl.com/cfoef3d 05:40 soegaard: If there are only two clauses, I'd use if. 05:41 rich1: so use if like the ? ternary operator, otherwise use cond? 05:43 soegaard: yes 05:45 rich1: regarding for/max - is it a technical or performance reason it's define-syntax instead of define (i haven't got to macros/syntax in the guide yet) 05:46 rich1: also, can for/max be in the standard library 05:48 soegaard: The for variants can't be defined as functions. All functions evaluate their arguments from left to right, but the for variants need to evaluate in a different order. 05:48 soegaard: I don't know why for/max and for/min was left out. 05:55 (quit) rmathews: Quit: ... 06:00 (join) gridaphobe 06:01 (quit) anonymous97890: Ping timeout: 255 seconds 06:01 iXeno: hi, for with-syntax, how do I chain multiple variants? (with-syntax [match1 expr1 match2 expr2]) (with-syntax [match1 expr1] [match2 expr2]) or some other variant? 06:02 soegaard: (with-syntax ([pattern1 expr1] [pattern2 expr2] ...) 06:02 soegaard: (with-syntax ([pattern1 expr1] [pattern2 expr2] ...) body ...) 06:02 iXeno: what is the body? 06:03 soegaard: The expressions in which the variables from the patterns can be used. 06:04 iXeno: I actually meant (with-syntax (variables [pattern1 body1] [pattern2 body2])) 06:05 iXeno: more specifically, I'm defining a macro "should" where (should raise-error when-given ...) produces different code than (should return-value value when-given ...) 06:06 iXeno: those two variants are my two patterns 06:07 soegaard: I might be misunderstanding something, but I think you need syntax-case or syntax-parse, not with-syntax. 06:08 iXeno: ok 06:09 (quit) gridaphobe: Ping timeout: 260 seconds 06:14 (join) cnonim 06:18 (join) anonymous97890 06:19 anonymous97890: rudybot: (member null '(null)) 06:19 rudybot: anonymous97890: your sandbox is ready 06:19 rudybot: anonymous97890: ; Value: #f 06:19 anonymous97890: hm... 06:20 soegaard: rudybot: null 06:20 rudybot: soegaard: (defun group-by-two (list) (if (null list) '() (cons (list (first list) (second list)) (group-hy-two (cddr list))))) 06:20 soegaard: ? 06:20 soegaard: rudybot: null 06:20 rudybot: soegaard: eval (eq? null ()) 06:20 soegaard: rudybot: eval null 06:20 rudybot: soegaard: your sandbox is ready 06:20 rudybot: soegaard: ; Value: () 06:21 soegaard: rudybot: eval '(null) 06:21 rudybot: soegaard: ; Value: (null) 06:23 anonymous97890: Tell me, please, can I see functions like structures: transparent? 06:23 anonymous97890: for example: 06:24 anonymous97890: rudybot: (define (x) (print "x")) 06:24 rudybot: anonymous97890: Done. 06:24 anonymous97890: rudybot: x 06:24 rudybot: anonymous97890: ; Value: # 06:24 anonymous97890: I want to see instead of # something like (define (x) (print "x")) 06:24 anonymous97890: Is it possible? 06:24 soegaard: No. 06:25 anonymous97890: rudybot: null 06:25 rudybot: anonymous97890: ; Value: () 06:26 anonymous97890 is too newbie 06:51 anonymous97890: rudybot: (eq? (andmap display (list "a" "b" "c")) (void)) 06:51 rudybot: anonymous97890: ; Value: #t 06:51 rudybot: anonymous97890: ; stdout: "abc" 06:51 anonymous97890: hm... 06:54 anonymous97890 (got it, if someone interested) 07:01 (quit) leo2007: Quit: rcirc on GNU Emacs 24.2.93.1 07:02 (join) ambrosebs 07:06 (join) rohni 07:10 (quit) Kaylin1: Read error: Connection reset by peer 07:12 (quit) cnonim: Quit: WeeChat 0.4.0 07:21 (join) shadgreg` 07:24 (quit) anonymous97890: Ping timeout: 260 seconds 07:24 (quit) shadgregory: Remote host closed the connection 07:25 (quit) shadgreg`: Remote host closed the connection 07:37 (join) anonymous97890 07:42 (join) rmathews 08:01 (quit) ambrosebs: Remote host closed the connection 08:02 (join) ambrosebs 08:11 anonymous97890: I am reading chapter 2.3.3 08:11 anonymous97890: How can I see effects of tail-call optimization with my own eyes? 08:12 anonymous97890: How much memory does it take 08:12 anonymous97890 is a newbie 08:12 (quit) rohni: Quit: Leaving. 08:12 soegaard: anonymous97890: Try http://docs.racket-lang.org/reference/debugging.html?q=trace#%28mod-path._racket%2Ftrace%29 08:12 rudybot: http://tinyurl.com/bcueto3 08:13 soegaard: The number of > shows the recursion depth. 08:13 soegaard: For a tail recursive function the depth stays the same. 08:13 bremner: I think you need to use the debugger 08:14 bremner: really? oh, I didn't know that. 08:14 anonymous97890: bremner: the? 08:14 anonymous97890: bremner: what the '_the_ debugger" do you mean? 08:15 bremner: in DrRacket 08:15 anonymous97890: soegaard, bremner: thanks! 08:15 bremner: you know a different racket debugger? 08:15 (join) rohni 08:17 anonymous97890: bremner: i don't know any 08:18 bremner: soegaard: the trace here shows increasing depth: http://paste.debian.net/237764/ 08:19 (quit) troydm: Read error: Operation timed out 08:19 soegaard: bremner: You forgot else in the last clause. 08:22 bremner: soegaard: blush. So your right, that's a nice way to see tail recursion. 08:23 soegaard: Oh! Also one can look at the arrows. 08:23 bremner: I'd been stepping though in the debugger to convince people, but that is overkill, and easy to get distracted. 08:23 (quit) anonymous97890: Quit: Lost terminal 08:23 soegaard: http://stackoverflow.com/a/12933639/23567 08:24 soegaard: To be honest I haven't tried the debugger. 08:24 bremner: nifty. 08:33 (join) dzhus 08:35 (quit) didi: Ping timeout: 264 seconds 08:40 (join) vkz 08:41 (join) Fare 08:45 (join) antithesis 08:48 (join) newblue 08:51 (quit) antithesis: Remote host closed the connection 08:52 (quit) dzhus: Remote host closed the connection 08:59 (join) antithesis 09:05 (join) soegaard_ 09:05 (quit) soegaard: Read error: Connection reset by peer 09:05 (nick) soegaard_ -> soegaard 09:06 (join) ijp 09:06 (join) netrino 09:07 (quit) ijp: Client Quit 09:07 (join) ijp 09:09 (quit) antithesis: Remote host closed the connection 09:13 (join) jeapostrophe 09:13 (quit) jeapostrophe: Changing host 09:13 (join) jeapostrophe 09:15 (join) antithesis 09:20 (quit) antithesis: Remote host closed the connection 09:21 (quit) bremner: Ping timeout: 244 seconds 09:21 (join) bremner 09:21 (quit) bremner: Changing host 09:21 (join) bremner 09:30 (join) soegaard 09:31 (quit) chandler: Ping timeout: 240 seconds 09:31 (join) anonymous97890 09:32 (join) chandler 09:32 (nick) chandler -> Guest27757 09:41 (quit) netrino: Ping timeout: 276 seconds 09:41 (join) anRch 09:51 (quit) iXeno: Remote host closed the connection 09:53 (quit) rmathews: Quit: ... 09:53 (join) dnolen 09:57 (quit) newblue: Ping timeout: 260 seconds 10:01 (quit) ambrosebs: Ping timeout: 255 seconds 10:03 (join) ambrosebs 10:05 (join) RacketCommitBot 10:05 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/Lq4gsA 10:05 RacketCommitBot: racket/master b3e803c Robby Findler: add context information into the error messages for option contracts... 10:05 (part) RacketCommitBot 10:08 (quit) ambrosebs: Remote host closed the connection 10:11 (join) mizu_no_oto 10:14 (join) ambrosebs 10:19 (quit) rohni: Quit: Leaving. 10:23 asumu: Sites with both CAPTCHAs and login attempt limits are annoying. 10:23 (join) karswell 10:24 (quit) rich1: Quit: Leaving. 10:27 asumu was trying to do some Rosetta Code editing for Racket 10:31 (quit) cdidd: Remote host closed the connection 10:42 (quit) ambrosebs: Remote host closed the connection 10:56 (quit) bremner: Ping timeout: 260 seconds 10:58 (quit) anonymous97890: Remote host closed the connection 10:58 (join) anonymous97890 10:59 (join) bremner 10:59 (quit) bremner: Changing host 10:59 (join) bremner 11:00 (quit) cored: Ping timeout: 256 seconds 11:01 (quit) vipjun: Ping timeout: 264 seconds 11:02 (join) cored 11:08 (quit) anRch: Quit: anRch 11:17 (join) rich1 11:24 soegaard: asumu: Couldn't help myself: http://rosettacode.org/wiki/Jensen%27s_Device#Racket 11:26 (join) mithos28 11:29 asumu: soegaard: Hahah, very nice. 11:29 asumu: I just finished a fairly thorough entry on bytestrings: http://rosettacode.org/wiki/Binary_strings#Racket 11:31 (quit) Fare: Ping timeout: 252 seconds 11:32 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 11:33 (join) Fare 11:33 asumu: I wonder how many languages have comments starting "comment" other than Algol. Clojure does, for one. 11:34 soegaard: That's pretty old school. 11:34 soegaard: Do you know comments in Fortran? 11:34 asumu does not 11:35 asumu: Oh wait, it's to do with columns right? 11:36 (quit) rich1: Quit: Leaving. 11:36 (join) jonrafkind 11:37 soegaard: Yes. Lines beginning with c is a comment. The puch cards had some columns at the left, and you could mark lines as comments why makeing a hole in the left column. 11:37 (join) mizu_no_oto 11:37 soegaard: http://en.wikipedia.org/wiki/File:FortranCardPROJ039.agr.jpg 11:39 Fare: the horror! the horror! 11:42 (join) netrino 12:18 (quit) dnolen: Ping timeout: 260 seconds 12:19 bremner: anyway, didn't the column thing go away with Fortran77? 12:19 bremner: not to drag everyone into the century of the Fruit Bat, or anything. 12:25 soegaard: bremner: I think, you are right, but a c in the first column still marks a comment (I think) . For example: http://www.maths.uq.edu.au/expokit/fortran/lapack.f 12:27 bremner: ah, maybe there is some backwards compatibility thing. 12:28 soegaard: yes 12:30 soegaard: When I wrote the matrix library, I briefly toyed with the thought of writing an Fortran->Racket compiler (LAPACK is implemented in Fortran). I got very scared when I saw the grammar of Fortran. 12:30 bremner: there are some wacky union things as well. ahh, Common Blocks 12:31 (quit) anonymous97890: Ping timeout: 252 seconds 12:32 soegaard: For global variables? 12:32 bremner: and casting between types semi-randomly 12:35 offby1: How hard could it be? Surely those compiler-writers from the 1950s were dumber than we are! 12:35 offby1 glances around nervously. 12:35 bremner: maybe the error checking got better over time, but originally I think it was basically like de-referencing global void * pointer to a locally declared struct 12:35 bremner: pardon my C ;) 12:36 (quit) jeapostrophe: Ping timeout: 252 seconds 12:38 offby1: C is the Lingua Franca. 12:38 mithos28: rudybot: doc string-split 12:38 rudybot: mithos28: your sandbox is ready 12:38 rudybot: mithos28: http://docs.racket-lang.org/reference/strings.html#(def._((lib._racket%2Fstring..rkt)._string-split)) 12:38 mithos28: offby1: that link is bad 12:39 mithos28: it should be http://docs.racket-lang.org/reference/strings.html#(def._((lib._racket/string..rkt)._string-split)) 12:39 mithos28: rudybot is url escaping it 12:39 offby1: ugh 12:40 offby1: They both work for me 12:40 mithos28: and go to the right anchor? 12:40 offby1: I think so 12:41 mithos28: rudybot's just goes to the top of the page for me 12:41 offby1: weird 12:41 offby1: might depend on the browser; I'm using Chrome 12:41 mithos28: actually so does the other 12:41 offby1: also I don't think I am deliberately URL-escaping those. 12:42 offby1: I think I'm just spewing out whatever the "doc" command emits. 12:42 mithos28: Ok, I think it is now that my irc client and chrome don't like eachother 12:43 mithos28: Going to both of those links directly in chrome work, where neither of them do from IRC 12:45 bremner: some double escaping by the irc client? 12:45 mithos28: bremner: No, same url. 12:45 offby1: The Great Escape 12:45 mithos28: actually figured it out 12:46 mithos28: it doesn't add the parens to the end of the URL 12:46 (part) mowe: "WeeChat 0.4.0" 12:46 bremner: that's always tricky to figure out. 12:47 offby1: lotta regexps that aim to recognize URLs get that wrong. 12:48 mithos28: well its impossible 12:48 offby1: In fact I think Rudybot will bungle those very URLs when it's time to send them to tinyurl.com 12:48 mithos28: (http://www.google.com) 12:48 offby1: hey rudybot, check this out: http://docs.racket-lang.org/reference/strings.html#(def._((lib._racket/string..rkt)._string-split)) 12:48 mithos28: hes ignoring you 12:48 offby1 twiddles thumbs 12:48 offby1: maybe he didn't even recognize it as a URL. 12:49 offby1: probably stopped at the first ( 12:49 mithos28: rudybot: how do I get here, http://docs.racket-lang.org/reference/strings.html#(def._((lib._racket/string..rkt)._string-split 12:49 rudybot: mithos28: hey rudybot, check this out: http://docs.racket-lang.org/reference/strings.html#(def._((lib._racket/string..rkt)._string-split)) 12:49 offby1: *snicker* 12:49 mithos28: rudybot: you are very helpful 12:49 rudybot: mithos28: not helpful 12:50 mithos28: rudybot: and clever 12:50 rudybot: mithos28: Fucking ubuntu are too clever for their own good 12:50 offby1: http://ix.io/4wg <-- the regexp 12:55 (join) rmathews 13:02 (join) rich1 13:03 asumu: Not many language can include unit tests in their examples so concisely. :) http://rosettacode.org/wiki/Anonymous_recursion#Racket 13:03 asumu: s/language/languages/ 13:04 bremner: that should have a minimum version 13:05 (join) anonymous97890 13:05 bremner: I know all software authors want people to be running the latest stable release, but sadly... 13:08 (quit) netrino: Ping timeout: 260 seconds 13:08 mithos28: ugh, mutation is evil 13:08 asumu: I can just add a comment about the module+ compatibility 13:09 mithos28: (let ((b b)) ) is not the same as 13:09 asumu: Module-level/top-level variable vs. local? 13:10 mithos28: asumu: Just that it is a fresh location, so that set!s internally change only the binding introduced by let 13:11 asumu: Yeah, makes sense. *would probably prefer boxes over mutable vars in a new language* 13:14 offby1: asumu: my dream is to convert rudybot to use submodules for tests 13:14 offby1: *hint* *hint* 13:17 asumu: offby1: hint taken. :p 13:18 offby1: actually, rudybot's test are a horrible mess. I should be ashamed to have that code visible to the public, what with my calling myself a professional programmer. 13:18 offby1: *shrug* 13:21 anonymous97890: rudybot: (quote ((1 2 3) 5 ("a" "b" "c"))) 13:21 rudybot: anonymous97890: ; Value: ((1 2 3) 5 ("a" "b" "c")) 13:22 anonymous97890: rudybot: (list (list 1 2 3) 5 (list "a" "b" "c")) 13:22 rudybot: anonymous97890: ; Value: ((1 2 3) 5 ("a" "b" "c")) 13:22 anonymous97890: rudybot: (eq? (quote ((1 2 3) 5 ("a" "b" "c"))) (list (list 1 2 3) 5 (list "a" "b" "c"))) 13:22 rudybot: anonymous97890: ; Value: #f 13:22 anonymous97890: hm... 13:23 (join) Guest27757 13:23 (nick) Guest27757 -> chandler 13:23 (quit) bremner: Ping timeout: 260 seconds 13:27 (join) bremner 13:27 (quit) bremner: Changing host 13:27 (join) bremner 13:27 soegaard: no for/string? 13:27 soegaard: rudybot: eval for/string? 13:27 rudybot: soegaard: error: for/string?: undefined; cannot reference an identifier before its definition in module: 'program 13:27 (join) hash_table 13:28 asumu: Yeah, I wanted that the other day too. 13:31 (quit) yacks: Remote host closed the connection 13:32 (quit) mithos28: Quit: mithos28 13:37 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 13:40 (join) rohni 13:47 rich1: rudybot: (equal? (quote ((1 2 3) 5 ("a" "b" "c"))) (list (list 1 2 3) 5 (list "a" "b" "c"))) 13:47 rudybot: rich1: your sandbox is ready 13:47 rudybot: rich1: ; Value: #t 13:47 rich1: anonymous97890: ^ 13:50 (join) Kaylin 13:52 offby1: I'd have thought "for" would work fine with a string 13:52 (join) netrino 13:52 (quit) merijn: Ping timeout: 252 seconds 13:52 offby1: rudybot: (for ([ch "hey you"]) (printf "A character: ~a~%" ch)) 13:52 rudybot: *offby1: ; stdout: "A character: h\nA character: e\nA character: y\nA character: \nA character: y\nA character: o\nA character: u\n" 13:55 soegaard: rudybot: eval (for/string ([i 256]) (integer->char i)) 13:55 rudybot: soegaard: error: for/string: undefined; cannot reference an identifier before its definition in module: 'program 13:57 (quit) jonrafkind: Quit: Ex-Chat 13:57 (join) jonrafkind 13:58 offby1: ah, that'd be something like for/fold/string 13:58 anonymous97890: rich1: thanks 14:02 rich1: i guess that would be similar to the for/max - defined with define-syntax and for/fold ? 14:03 anonymous97890 is a newbie so he didn't test it too much. He expected a bit different meaning of eq, but didn't check since he didn't meant to know it on this level 14:04 rich1: rudybot: (eq? #f #f) 14:04 rudybot: rich1: ; Value: #t 14:04 rich1: anonymous97890: i'm a beginner too, and i use equal? for everything except numbers and boolean - while i'm learning 14:05 rich1: rudybot: (= #f #f) 14:05 rudybot: rich1: error: =: contract violation expected: number? given: #f argument position: 1st other arguments...: #f 14:05 rich1: rudybot: (= 5 5) 14:05 rudybot: rich1: ; Value: #t 14:05 rich1: see? 14:06 anonymous97890: yes, i do. Thx :) 14:07 (join) merijn 14:17 (quit) anonymous97890: Ping timeout: 252 seconds 14:18 (quit) rich1: Quit: Leaving. 14:25 (join) m4b 14:28 (join) tcsc 14:29 m4b: hello; i'm trying to get some exception handling for rackunit working; ideally, i'd like to check whether a function fails the check, whether it exists, and whether there is an arity mismatch, and subtract points for each of those failures (think of a grade); here is the code: I'm working with right now http://hpaste.org/82978 14:30 m4b: right now exn:test:check? isn't being caught; the rackunit documentation says however that check failures raise exceptions of that kind 14:39 (join) didi 14:39 (quit) vkz: Quit: vkz 14:44 (join) rich1 14:44 (quit) Kaylin: Quit: Leaving. 14:50 (quit) rich1: Quit: Leaving. 14:58 (join) mizu_no_oto 14:59 m4b: ok; well could someone at least explain why (exn:test:check? (check-equal? 1 1)) returns #f; what exn:* do I need in order to simply check whether it passed or not? 14:59 offby1: m4b: just guessing -- maybe you need to do (exn:test:check? (thunk (check-equal? 1 1))) 14:59 (join) mithos28 15:00 offby1: or worse, catch the exception yourself, and then pass it to exn:test:check? 15:00 offby1: with "with-handlers" 15:01 m4b: offby1: thank you for answering; i currently am trying that, but nothing is working, here is my current version of with-handlers: http://hpaste.org/82980 15:02 m4b: offby1: (exn:test:check? ((lambda () (check-equal? 2 1)))) , and (exn:test:check? ((lambda () (check-equal? 1 1)))) both return #f 15:06 didi: m4b: Are you sure `check-equal?' raises an exception? 15:06 m4b: from documenation: "Checks are the basic building block of RackUnit. A check checks some condition. If the condition holds the check evaluates to (void). If the condition doesn’t hold the check raises an instance of exn:test:check " 15:11 didi: m4b: Interesting. I'm apparently unable to catch it myself in the REPL. Sorry. 15:11 asumu: m4b: I think you need to parameterize `current-check-handler` and/or similar parameteres. 15:11 m4b: didi: yea this s a total bummer; asumu, not sure i understand your suggestion 15:12 asumu: RackUnit by default catches all the test exceptions and then prints the failures, so the outside world does not see the exceptions. 15:12 asumu: `current-check-handler` is the function that determines what to do with the exception. 15:13 m4b: asumu: ok, that explains the behavior, I guess 15:13 asumu: e.g., https://gist.github.com/takikawa/5025401 overrides this 15:14 m4b: asumu: so if I wanted to simultaneously stil print the failure, but also perform another operation, like do an arithmetic operation, how could i factor this in? 15:14 (join) RacketCommitBot 15:14 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/CVDgrg 15:14 RacketCommitBot: racket/master 3818954 Matthias Felleisen: properly named 15:14 (part) RacketCommitBot 15:14 asumu: m4b: you can override `current-check-handler` to do whatever you want, then re-raise the exception. 15:15 m4b: asumu: oh ithink I se what you're saying; the code you provided will perform whatever I put inside the thunk after current-check-handler? 15:15 asumu: Yes. (although I'm not sure re-raising the exception will quite do what you want.. hmm) 15:16 (join) RacketCommitBot 15:16 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/dYyqwg 15:16 RacketCommitBot: racket/master 7d2aa88 Eli Barzilay: Improve label generation code. 15:16 RacketCommitBot: racket/master cae6b53 Eli Barzilay: Make `cat%' into a macro so `~a' etc get a proper name. 15:16 RacketCommitBot: racket/master c7173cd Eli Barzilay: Improve `file' tests.... 15:16 (part) RacketCommitBot 15:16 m4b: asumu: basically all the other exceptions work great in the with-handlers section of my code; all i need now is to simply check whether it passed the check, if not, subtract 2 from the points parameter 15:17 asumu: Well, you can definitely do that by putting the code to subtract points in the function. 15:18 asumu: I'm not sure how to get it to still print the usual failure text though. 15:19 m4b: asumu: so would the parameterize function be put inside of my wrapper for the points? 15:20 asumu: I updated the gist with a way to keep the usual failure message. 15:21 asumu: Sure, if you call the check-* functions in that wrapper. 15:27 m4b: asumu: I think this might work, thank you 15:32 (join) vipjun 15:35 (join) gridaphobe 15:37 (join) jao 15:37 (quit) jao: Changing host 15:37 (join) jao 15:44 (quit) hash_table: Ping timeout: 252 seconds 15:45 m4b: asumu: now I've having problems turning the with-handlers into a function, for example: (define w (lambda (f) (with-handlers ([exn:fail:syntax? (lambda (e) (displayln "got a syntax error"))]) f))) evaluates its argument 15:51 Fare: in a *very* roundabout way, a Linux distribution is "live". 15:51 Fare: but you're not in control... unless it's NixOS. 16:05 m4b: if I want to mutate a variable in a function, say (define dummy 5) then (f dummy), and have the mutation persist, I use set!? 16:06 Fare: do you want pass-by-reference? 16:06 Fare: or do you want to pass an object? 16:06 Fare: or do you want a modify-macro? 16:07 m4b: object I think; given, (define f (lambda (x) (set! x (add1 x)))), and passing in dummy, which is defined before with 5, checking dummy's value later will return 6 16:09 Fare: either you want to pass an object, or to make f a macro 16:09 Fare: otherwise, the state of the binding will not survive the binding itself 16:09 bremner: well, "object" could be a box 16:10 m4b: Fare: oh, I thought define and set! were mutations 16:10 Fare: they mutate a binding 16:10 Fare: not an object 16:11 m4b: Fare: ok; can I easily mutate an object then? 16:11 Fare: lambda (x) <--- each invocation of the lambda introduces a NEW binding. 16:11 didi: One can use Parameters. 16:11 Fare: m4b: yes, there are many ways of mutating an object. Parameters are one kind of mutable objects. 16:12 didi: Unfortunately my Internet connection is too crappy to retrieve the appropriate URL from the online manual. 16:12 m4b: didi: ok... 16:12 Fare: uh... are parameters mutable? 16:12 didi: Fare: You can use them as dynamic bindings. 16:17 ijp: Fare: srfi/39 parameters are supposed to be mutable 16:17 m4b: Fare,didi: so I just need the mutation to survive one function call (for example, f o, is called inside of g, o is mutated, then f o2 is called, etc., to f o_n, then the last line of g sums o .. o_n, and returns the result 16:17 ijp: rudybot: (require srfi/39) 16:17 rudybot: ijp: your sandbox is ready 16:17 rudybot: ijp: Done. 16:17 ijp: rudybot: (define foo (make-parameter 'original)) 16:17 rudybot: ijp: Done. 16:17 ijp: rudybot: (foo) 16:17 rudybot: ijp: ; Value: original 16:17 ijp: rudybot: (foo 'new-value) 16:17 rudybot: ijp: Done. 16:17 ijp: rudybot: (foo) 16:17 rudybot: ijp: ; Value: new-value 16:18 ijp: I believe this is true of the ones in base too 16:20 didi: m4b: The trick is all about bindings and introducing new bindings. As I said, you can use Parameters. You can also use a "global" biding. Or maybe mutate something inside a bigger structure that you passed. I personally suggest that `f' return a new, "mutated", `o'. 16:21 m4b: didi: yea, I just realized i'm being a dumbass; f will just return the value, bind it with a let, then sum all of the results in acc for g maybe, then return acc; sorry stupid question, brain got sidetracked on mutation 16:21 ijp: as a rule though, I'd suggest not mutating parameters outside of a main function 16:21 didi: m4b: No question is "stupid"! 16:22 didi: rudybot: Right? 16:22 rudybot: didi: right, it could be either 16:23 offby1: rudybot: who's the best pilot you ever saw? 16:23 (quit) merijn: Ping timeout: 260 seconds 16:23 rudybot: *offby1: emacs usually detects autosave-files and offers to recover them for you if you try to open the file after a crash 16:23 offby1 stares blankly 16:25 (join) merijn 16:28 m4b: so I'm still having with the bad check-equal? being called twice; first against the other handlers (which it passes), then the against the parmeterized check-handler asumu provided; how can I avoid it being evaluated twice; essentially i want sequential behavior 16:36 (quit) Nisstyre: Quit: Leaving 16:40 m4b: how can I imbed (parameterize ([current-check-handler] (..stuff..))) into with-handlers? 16:45 (join) dnolen 16:50 (quit) netrino: Remote host closed the connection 16:54 (join) anRch 16:55 (join) Kaylin 16:58 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 16:59 (quit) soegaard: Quit: soegaard 16:59 (quit) jao: Remote host closed the connection 17:03 offby1: *shrug* 17:03 offby1: can't you just do it? 17:04 (join) rich1 17:05 offby1: like this --> http://ix.io/4wm <-- ? 17:06 (quit) rohni: Quit: Leaving. 17:06 m4b: offby1: thanks for feedback, I ended up doing this: http://hpaste.org/82984 17:07 m4b: it returns the correct points, but doesn't reduplicate the equal-check? messages which I was having a problem with before 17:07 offby1: that's odd 17:07 (quit) rudybot: Remote host closed the connection 17:07 (join) Nisstyre 17:08 m4b: offby1: my solution? 17:08 (join) rudybot 17:08 offby1: yeah, you're not using "parameterize", which seems strange. 17:09 offby1: I assume your solution will _work_ just fine; it's really just a style issue 17:09 offby1: rudybot: uptime 17:09 rudybot: offby1: I've been up for fifty-one seconds; this tcp/ip connection has been up for forty-eight seconds 17:09 offby1: rudybot: tell asumu that his patch has been incorporated 17:09 rudybot: offby1: well, I don't know, since eieio.texi isn't incorporated either; but that is one anti-CL argument actually presented 17:09 offby1 nods gravely 17:09 m4b: offby1: dunno, seems to work, and coudln't get paramterize working right; also I don't understand what parameterize does, so i think its bad form to include it in my code 17:09 offby1: can't argue with that:) 17:10 offby1: "parameterize" just means "change this variable for the duration of this code, then restore its original value" 17:10 offby1: in your case, you don't particularly need to restore it, so it's OK 17:10 Nisstyre: offby1: that's a really good explanation. Please put that in the guide somewhere. 17:10 m4b: offby1: ah ok; if this were a module in a larger program, i'd probably want to restore it in case i want the default behavior later, yes? 17:11 offby1: Nisstyre: you're kidding, yes? 17:11 m4b: and agreed, very good explanation 17:11 Nisstyre: offby1: sort of :P 17:11 Nisstyre: I like short/elegant explanations though 17:11 offby1: I'd be appalled if the guide didn't already have something at least as good as that. 17:11 offby1: but then I appall easily, so ... 17:11 Nisstyre: well actually the documentation on parameterize is sort of confusing 17:12 (join) RacketCommitBot 17:12 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/nT4iEQ 17:12 RacketCommitBot: racket/master 9b1247b Eli Barzilay: Revert "Adding link to prior versions of the docs."... 17:12 RacketCommitBot: racket/master 250880d Eli Barzilay: Add links to old documentations.... 17:12 (part) RacketCommitBot 17:13 offby1: Nisstyre: you're right. My explanation is almost certainly wrong in some minor technical aspect, but for the guide, it's probably a good topic sentence. I think I'll spend a few minutes trying to wedge it in there :) 17:13 offby1: now where did I put that git repository of all of racket? ... ♩♬ ♫♪ 17:21 (quit) merijn: Ping timeout: 252 seconds 17:27 offby1: done -- https://github.com/plt/racket/pull/258 17:28 offby1: now it sounds a bit like the Emacs documentation, which I've long thought was excellent. 17:28 offby1: Those FSF guys know how to answer the most important question: ``what problem does this solve'' 17:29 m4b: offby1: I love emacs documentation too :) 17:29 offby1: it gets a teeeny bit pedantic here and there but I forgive it. 17:31 m4b: offby1: I've been super into unicode lately (working on an apl x11 keyboard and interpreter), and my favorite new emacs command is C-u C-x + 17:33 didi: rudybot: dk C-u C-x + 17:33 rudybot: didi: ,dk C-x C-0 17:33 didi *sigh* 17:33 m4b: heh 17:33 didi: m4b: Isn't C-x 8 RET? 17:34 rich1: i used (set!) and feel guilty :( 17:34 didi: rich1: Don't. 17:34 didi: It has its place. 17:34 (join) merijn 17:34 offby1: "balance windows"? 17:34 m4b: didi: C-u C-x + will give info on a character the cursor is on; don't know C-x 8 RET 17:34 offby1: I think you mean C-x = 17:34 didi: m4b: ^ 17:35 offby1 invites m4b to #emacs 17:35 offby1: also, the ",dk" think works with fsbot, not rudybot 17:35 m4b: \me disappears 17:35 offby1: (I know, I know; they look alike) 17:35 m4b: ;) 17:37 (join) jao 17:37 (quit) jao: Changing host 17:37 (join) jao 17:38 (join) RacketCommitBot 17:38 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/xXbNmQ 17:38 RacketCommitBot: racket/master a0059f7 Robby Findler: more 2d lexer repairs 17:38 RacketCommitBot: racket/master 18a5dcb Robby Findler: add port-count-lines? to the lexer contract 17:38 (part) RacketCommitBot 17:40 (join) RacketCommitBot 17:40 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/cmR73Q 17:40 RacketCommitBot: racket/master 8c0291e Robby Findler: traditional chinese string constants update, also from Chongkai Zhu 17:40 (part) RacketCommitBot 17:41 (quit) Fare: Ping timeout: 256 seconds 17:45 rich1: at the moment bignums "can't work" in a future - is this something that could be solved in the near/far future ? 17:47 rich1: or technically not feasible at all? 17:51 offby1 laughs heartily at the two different meanings of the word "future" 17:52 rich1: :) oh yeh 17:58 offby1: I've never used a future! 18:04 (quit) anRch: Read error: Connection reset by peer 18:04 (quit) rich1: Quit: Leaving. 18:04 (join) anRch 18:07 (join) BeLucid 18:08 (quit) jonrafkind: Read error: Operation timed out 18:10 m4b: my god, it's beautiful! http://dpaste.com/989998/ thanks for everyone's help! 18:11 offby1: OH MY GOD IT'S FULL OF BUGS 18:11 offby1: m4b: that feeling of triumph is very very rare, but it keeps us coming back. 18:12 m4b: offby1: :D 18:19 bremner: DrRacket's half-emacs keys make me want to scream sometimes. 18:23 (quit) anRch: Quit: anRch 18:29 dented42: rudybot: (regexp-replace #rx"[\\]]" "[]" "*") 18:29 rudybot: dented42: your sandbox is ready 18:29 rudybot: dented42: ; Value: "[]" 18:29 dented42: shouldn't that return "[*" ? 18:32 (quit) Kaylin: Quit: Leaving. 18:34 m4b: looks like i have one last problem; i need to pass into the check-handler the points so it _only_ subtracts them when a check fails (this is why I wanted a boolean in the first place), put giving it an extra parameter seems to set off the arity mismatch handler, and check output isn't done 18:49 (quit) sirdancealot7: Ping timeout: 255 seconds 18:52 (join) sirdancealot7 18:56 mceier: dented42: no, regexp matches ']' only when ']' is first character inside '[]': '[]]'. Escapes doesn't work inside '[]'. Here's regexp syntax: http://docs.racket-lang.org/reference/regexp.html#(part._regexp-syntax) 18:56 mceier: rudybot: (regexp-replace #rx"[\\]]" "\\]" "*") 18:56 rudybot: mceier: ; Value: "*" 18:57 (quit) m4b: Remote host closed the connection 19:05 mceier: rudybot: (regexp-replace #px"[\\]]" "[]" "*") 19:05 rudybot: mceier: ; Value: "[*" 19:06 (join) neilv 19:08 (quit) sirdancealot7: Ping timeout: 246 seconds 19:08 (join) ambrosebs 19:08 (quit) didi: Ping timeout: 244 seconds 19:26 (join) sirdancealot 19:28 (quit) jao: Ping timeout: 260 seconds 19:30 (quit) sirdancealot: Excess Flood 19:43 (quit) neilv: Quit: Leaving 19:50 (join) sirdancealot 19:51 bremner: I dunno who was talking about http://rosettacode.org/wiki/Anonymous_recursion#Racket , but is seems to me the racket example doesn't really answer the question. Of course the question is a bit silly. 19:55 (quit) sirdancealot: Excess Flood 19:59 (join) Kaylin 20:05 (join) sirdancealot 20:19 (quit) sirdancealot: Ping timeout: 246 seconds 20:24 (join) jonrafkind 20:27 (quit) Kaylin: Quit: Leaving. 20:31 (join) ynniv 20:32 (quit) ynniv: Client Quit 20:32 (join) ynniv 20:33 (join) sirdancealot 20:34 (join) Kaylin 20:35 (quit) mithos28: Quit: mithos28 20:35 (join) mithos28 20:51 (quit) mithos28: Quit: mithos28 20:58 (quit) gridaphobe: Remote host closed the connection 21:04 (quit) dnolen: Ping timeout: 260 seconds 21:28 (join) mithos28 21:31 (join) juanfra 21:32 juanfra: Quick question. What is the platform used for generate the content of http://docs.racket-lang.org? 21:32 (quit) Nisstyre: Ping timeout: 244 seconds 21:33 juanfra: linux, OSX, amd64, i386? 21:36 (join) cdidd 21:37 (quit) ambrosebs: Remote host closed the connection 21:37 (join) jao 21:37 (quit) jao: Changing host 21:37 (join) jao 21:38 (quit) bitonic: Remote host closed the connection 21:46 (join) Nisstyre 21:52 (quit) mithos28: Quit: mithos28 22:00 (join) mizu_no_oto 22:03 (join) mithos28 22:16 (quit) cdidd: Remote host closed the connection 22:21 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 22:23 (join) jackhammer2022 22:26 (join) ambrosebs 22:26 (quit) cored: Ping timeout: 255 seconds 22:28 (join) cored 22:28 (quit) cored: Changing host 22:28 (join) cored 22:36 asumu: bremner: that was me and I agree. Feel free to add examples or change the existing one if you have any ideas. 22:37 asumu: (other languages similarly cop out though; see Dylan) 22:40 (quit) ynniv: Quit: ynniv 22:40 (quit) ambrosebs: Remote host closed the connection 22:40 (join) jeapostrophe 22:40 (quit) jeapostrophe: Changing host 22:40 (join) jeapostrophe 22:42 (quit) Kaylin: Read error: Connection reset by peer 22:43 asumu: Cute: https://twitter.com/mattmight/status/305774619699339265 22:44 (join) Kaylin 22:45 (join) ambrosebs 22:49 (quit) jeapostrophe: Ping timeout: 260 seconds 22:54 (join) juanfra__ 23:00 (join) mizu_no_oto 23:00 (quit) juanfra: Quit: juanfra 23:07 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 23:19 (join) mizu_no_oto 23:22 (quit) Kaylin: Quit: Leaving. 23:22 offby1: That reminds me of some ancient Chinese math text I'd heard about -- a bunch of problems that all posed the same question (something like "How far is the well from the bridge") and had the same answer (612 li or whatever). What varied was the setup 23:24 (quit) rmathews: Quit: ... 23:31 (quit) jao: Ping timeout: 246 seconds 23:35 (quit) ambrosebs: Remote host closed the connection 23:42 (join) ambrosebs 23:45 (quit) jackhammer2022: Ping timeout: 260 seconds 23:56 (quit) bremner: Ping timeout: 260 seconds 23:59 (join) bremner 23:59 (quit) bremner: Changing host 23:59 (join) bremner