01:31 (join) zenspider 01:32 zenspider: anyone awake? 01:40 jonrafkind: sup 01:44 zenspider: hiya... I'm new(ish) to racket and working through some stuff where it'd be really nice to use the tracer... but I'm having a bitch of a time figgering it out. essentially, I don't understand import and the online doco is about useless at my level 01:44 zenspider: I figured out I could declare #lang r6rs and then import tracer, but when I do that I'm missing stuff from r5rs 01:45 zenspider: and the imports I've tried to get r5rs compatibility working bitch about duplicate definitions 01:45 zenspider: and and and... frustrating. racket's error messages aren't terribly friendly. 01:47 jonrafkind: do you really want to use r6rs? 01:48 jonrafkind: '#lang racket' might be better for you 01:48 zenspider: I'd rather use r5rs honestly as it is a lot simpler and targets what I'm doing better (I'm working through sicp) 01:48 zenspider: I can't say I know how much of a diff there is between racket and r5rs tho 01:48 zenspider: r6rs seems like a pure PITA, but it was the only incarnation that got the tracer running 01:48 jonrafkind: i think the only important difference is mutable pairs 01:49 jonrafkind: but you might need those for SICP, im not sure 01:49 zenspider: specifically: (import (rnrs) (racket trace)) ... (trace f) (f) 01:49 zenspider: not yet at least 01:51 jonrafkind: i dont work with r5rs much but i doubt you can get the trace library working with it 01:51 zenspider: any language close enough that has tracer support and defines the basic mathy stuff I'm looking for would work for now 01:51 zenspider: I can't get the tracer to work with #lang racket 01:51 zenspider: that's unfortunate 01:51 jonrafkind: should just be (require trace) 01:51 jonrafkind: or possiby (require scheme/trace) 01:51 jonrafkind: or even (require racket/trace) 01:52 zenspider: hey! that did it! (require scheme/trace) 01:52 jonrafkind: whereas (require trace) did not work? 01:52 zenspider: thank you very much. that would have driven me nuts. 01:52 zenspider: ... that is... for hours 01:52 zenspider: nope 01:53 jonrafkind: ok i guess those are different libraries 01:53 jonrafkind: i forget what `trace' is for, i think only drracket uses it for something 01:53 jonrafkind: but you should use either scheme/trace or racket/trace 01:54 zenspider: and to be clear... this is only for cmdline trace output, right? 01:55 zenspider: I have yet to find ANYTHING that'll make the "View -> Show Tracing" sidebar work 01:55 zenspider: tho I'm usually working out of emacs and an inferior scheme 01:55 zenspider: it'd be nice to be able to use the racket debugger and tracer in the gui from time to time 01:56 jonrafkind: the stepper should work 01:56 jonrafkind: normally i just read the cmdline output from drracket when using trace 01:58 zenspider: yeah. I will too most of the time.... well, all of the time. I don't think the gui trace function actually works 01:59 zenspider: so, just to make sure I'm tracking... collects/racket/trace.rkt is what I just imported, yes? 01:59 zenspider: (collects/scheme/track.rkt seems to just load the above) 02:09 jonrafkind: yea 02:15 zenspider: kk. thanks. much appreciated 02:17 offby1: what's the tersest, most elegant Racket equivalent of Python's "x[i] += 10"? 02:17 offby1: sure, I can do it with vector-ref and vector-set!, but it's pretty verbose 02:17 jonrafkind: use a macro 02:18 offby1: one that I write myself? Bah. 02:18 offby1: (I'm having a deja vu -- I swear I've had this discussion before) 02:18 offby1: I was hoping for something built-in ... 02:18 offby1: that reminds me: maybe there's something like that in Swindle. I'll look. 02:19 jonrafkind: (setf (vref x i) (+ 10)) 02:19 jonrafkind: just kidding 02:19 offby1: I was just about to say -- I think I want "defset" 03:02 (join) Bob_ 03:02 Bob_: hello everyone 03:03 Bob_: is there some sort of function for returning the nth item in a list? 03:03 Bob_: for example: 03:03 Bob_: (n-th-item 4 (list 1 2 3 53)) would return 53 03:06 (quit) jonrafkind: Ping timeout: 240 seconds 03:09 offby1: rudybot: doc list-ref 03:09 rudybot: *offby1: your scheme sandbox is ready 03:09 rudybot: *offby1: http://docs.plt-scheme.org/reference/pairs.html#(def._((quote._~23~25kernel)._list-ref)) 03:09 offby1: Bob_: ^^ check it out ^^ 03:10 Bob_: wow 03:10 Bob_: ok, thank you so much 03:11 rudybot: Don't thank him; thank me! 03:12 Bob_: oh, haha 03:12 Bob_: sorry man 03:12 Bob_: did see your name in front of the link 03:12 Bob_: didn't* 03:13 offby1: rudybot: don't be rude 03:13 rudybot: *offby1: Incidentally, http://www.emacswiki.org/emacs/EmacsChannelHarassment is a good writeup; "Ops have special responsibility, but everyone should participate in challenging rude behavior." 03:13 offby1: rudybot: I challenge you! 03:13 rudybot: *offby1: i accept your challenge 03:13 offby1: rudybot: shall we say pistols at dawn? 03:13 rudybot: *offby1: "The Sex Pistols' Never Mind the Bollocks (1977) is closer to the second world war than it is to the present. " 03:14 offby1: rudybot: that's horrifying. 03:14 rudybot: *offby1: That is *still* making `+' dependant on a mutated global flag. And that is still something that sounds to me pretty horrifying. 03:14 offby1: rudybot: No more so than Keith Richards getting his blood changed. 03:14 rudybot: *offby1: it chooses wrong fonts (THANKS KEITH PACKARD!) then misaligns text 03:14 Bob_: ..wha? What are you guys talking about? 03:14 offby1: rudybot: can you explain? 03:14 rudybot: *offby1: i will not navigate to it, click, read the text hoping it will explain, launch a gui browser, and wait for it to start just to find out what it does. that is what it gets you. 03:15 offby1: Bob_: he's a little testy. 03:15 Bob_: lol don't worry about it 03:15 offby1: rudybot: how's your therapy been going? 03:15 rudybot: *offby1: the amount of money I'm putting into therapy and drugs is just sad 03:15 Bob_: I was a bit confused by the randomness 03:15 Bob_: sex pistols 03:15 Bob_: keith packard 03:15 Bob_: ...wtf? 03:15 offby1: rudybot: he called you "random"! 03:15 rudybot: *offby1: The supernodes are just random users with fast connections and the ability to receive incoming connections. 03:15 offby1: Bob_: it's a bot. 03:15 offby1: as suggested by the nick "rudybot". 03:16 Bob_: wait 03:16 offby1 waits 03:16 Bob_: rudybot is a bot? 03:16 offby1: shocking, but true 03:16 Bob_: wait...wha? 03:16 rudybot: It's true, I'm a bot, ayup. 03:16 Bob_: that can't be true 03:16 rudybot: AH SWEARS TO GOD 03:16 Bob_: you would be like the most intelligent bot in the world 03:16 rudybot blushes 03:17 offby1: of course I also "drive" him directly on occasion ... 03:17 offby1 glances around nervously. 03:17 offby1: the random stuff was true botness. The last three replies were just me putting words into "his" mouth. 03:17 rudybot: Like this. 03:20 Bob_: so if rudybot is a bot 03:20 Bob_: what kinda of stuff can it do? 03:20 Bob_: count really fast? 03:21 offby1: not a whole lot, really 03:21 offby1: the one genuinely useful feature is: 03:21 offby1: rudybot: (+ 1 2 3) 03:21 rudybot: *offby1: ; Value: 6 03:21 offby1: i.e., it can evaluate racket code 03:21 offby1: (so "count really fast" is actually pretty close to the truth) 03:22 offby1: oh, and the looking-up-documentation thing. 03:22 offby1: basically whatever I could think of that seemed either useful or amusing, and wasn't too hard to write 03:31 Bob_: so are you like a developer or something? 03:31 Bob_: I mean, you must somehow have access to this site if you can integrate a bot into the chat 03:39 offby1: Anyone can run a bot on IRC. 03:39 offby1: It's no different from running your IRC client; they're both just programs. 03:43 Bob_: so can rudybot evaluate ANY racket code? 03:43 Bob_: rudybot: (+ 1 2 3) 03:43 rudybot: Bob_: your sandbox is ready 03:43 rudybot: Bob_: ; Value: 6 03:43 Bob_: oh snap 03:43 Bob_: sandox? 03:43 Bob_: rudybot: (filter even? (list 1 2 3 4)) 03:43 rudybot: Bob_: ; Value: (2 4) 03:44 Bob_: (first empty) 03:44 Bob_: rudybot: (first empty) 03:44 rudybot: Bob_: error: first: expected argument of type ; given () 03:47 Bob_: rudybot: answer to life 03:47 rudybot: Bob_: error: reference to undefined identifier: answer 03:47 Bob_: :( 03:48 Bob_: rudybot: (define answer-to-life 42) 03:48 rudybot: Bob_: Done. 03:48 Bob_: rudybot: (+ answer-to-life 1) 03:48 rudybot: Bob_: ; Value: 43 03:48 Bob_: siiiccckk 03:51 offby1: rudybot: (define x 123) 03:52 rudybot: *offby1: Done. 03:52 offby1: rudybot: give Bob_ x 03:52 rudybot: Bob_: offby1 has given you a value, say "rudybot: eval (GRAB)" to get it (case sensitive) 03:52 Bob_: rudybot: eval (GRAB) 03:52 rudybot: Bob_: ; Value: 123 03:52 Bob_: woah 03:52 Bob_: what if someone else typed the grab command? 03:52 offby1: don't think it'd have worked 03:53 offby1: rudybot: eval (GRAB) 03:53 rudybot: *offby1: Done. 03:53 offby1: rudybot: eval (GRAB) 03:53 rudybot: *offby1: Done. 03:53 Bob_: lol 03:54 Bob_: rudybot: (/ x 0) 03:54 rudybot: Bob_: error: reference to undefined identifier: x 03:54 Bob_: I guess it doesn't keep the definition for me? 03:55 (part) zenspider: "ERC Version 5.3 (IRC client for Emacs)" 03:56 offby1: nope -- I gave you a _value_, not a _binding_. 03:56 Bob_: aaahhh 03:56 Bob_: ok 03:56 Bob_: I got it 03:56 offby1: rudybot: source 03:56 rudybot: *offby1: git clone git://github.com/offby1/rudybot.git 03:56 Bob_: so if you said give Bob_ (define x .....) 03:57 offby1: I think you'd get , or something 03:57 offby1: Try It And See™. 03:57 Bob_: lol 03:57 Bob_: what 03:57 Bob_: trademark? 03:57 offby1: yes© 03:57 offby1: ® 03:57 Bob_: give offby1 (define x 123) 03:58 Bob_: oh wait 03:58 Bob_: lol 03:58 Bob_: fail 03:58 Bob_: rudybot: give offby1 (define x 123) 03:58 rudybot: offby1: Bob_ has given you a value, say "rudybot: eval (GRAB)" to get it (case sensitive) 03:58 offby1: rudybot: (GRAB) 03:58 rudybot: *offby1: Done. 03:59 Stanislave: rudybot, eval "I worship your shadow" 03:59 offby1: yeah I think it's the "void" value, which is weird; it doesn't print 03:59 rudybot: Stanislave: your sandbox is ready 03:59 rudybot: Stanislave: ; Value: "I worship your shadow" 03:59 Stanislave: In CL, (if #f x) evaluats to nil, right? 04:00 offby1: sounds right. 04:00 offby1: Haven't played with CL in ages. 04:00 Bob_: CL? 04:00 Stanislave: I choose to read that remark sexually. 04:00 Bob_: lol wtf it's a game? 04:00 offby1: except that #f doesn't mean anything in CL 04:00 Bob_: oh 04:00 offby1: Bob_: CL is "Common Lisp" 04:00 Stanislave: Well 04:00 Stanislave: (if nil x) 04:00 Stanislave: pardon 04:00 Bob_: haven't played WITH CL 04:00 offby1: yeah 04:00 Bob_: I read 04:00 Bob_: haven't played with CL 04:00 Stanislave: Basically, lisp for bad people 04:00 Bob_: or rather 04:00 Stanislave: who don't like to work 04:00 Bob_: haven't played CL 04:00 Stanislave: And who don't like TCO 04:01 Stanislave: CL FUNDS TERRORSISM 04:01 Bob_: lol I don't even know wtf these languages are 04:01 offby1: rudybot: Why do you have freedom? 04:01 rudybot: *offby1: i fail to see how that is relevant, you're using american technology, not much freedom their either. 04:01 Bob_: good old java and visual basic 04:01 Stanislave: VB is pro. 04:01 offby1: Bob_: Common Lisp is like Racket's third cousin. 04:01 Stanislave: if x then goto y 04:01 Bob_: I miss 04:01 Bob_: ifs 04:01 Bob_: and for loops 04:01 Bob_: and whiles 04:01 Bob_: and thens 04:01 offby1: sure you do. 04:02 Bob_: and 1 + 2 04:02 Bob_: not (+ 1 2) 04:02 Stanislave: I miss fame, fortune, fast cars, and beautiful women 04:02 Stanislave: Blasphemy 04:03 Bob_: I'm sure I'd like racket more 04:03 Stanislave: I think (1 + 2) is pretty cool though 04:03 Stanislave: Where 1 is the function 04:03 Bob_: if I wasn't restricted in the language level 04:03 Bob_: so 1 is a function that consumes a function and a number? 04:04 Stanislave: Yeah 04:04 Stanislave: Cool eh? 04:04 Stanislave: Why not? 04:04 Bob_: lol I guess so 04:04 Stanislave: I mean, in true lambda calculu style, numbers should be also functions 04:04 Stanislave: And like, to spice it up. 04:04 Stanislave: I was like 04:04 Stanislave: (/ 2 5) evaluates to 1/10 04:04 Stanislave: And (2 / 4) to 1/2 04:05 Stanislave: And (/ 2 4) to 1/8 04:05 Stanislave: Because I never liked that part 04:05 Stanislave: Where (/ 2) is the reciptorial 04:05 Bob_: you lost me 04:05 Stanislave: But (/ 2 4) is the division 04:05 Stanislave: (/ x y ... z) is 1 / x / y ... / z 04:05 Stanislave: Basically 04:06 Stanislave: Just as (+ x y ... z) is 0 + x + y ... + z 04:06 Bob_: oook 04:06 Stanislave: So that (/ 2) being 1/2 makes sense 04:06 Bob_: rudybot: (build-list 1000000 add1) 04:06 Bob_: lol 04:07 Bob_: not happenin' I guess 04:07 rudybot: Bob_: error: with-limit: out of memory 04:07 Bob_: ahahah 04:07 offby1: trying to rack up charges on my server host, are you?! 04:07 offby1: rudybot: kill him! 04:07 rudybot: *offby1: How the hell is gcc (well, cc1plus) surviving kill -9? 04:07 Bob_: LOL 04:07 offby1: rudybot: clearly it's a zombie. 04:07 rudybot: *offby1: Hi again. I'm in trouble. I've tried using synctex and auctex, and for some reason emacs launched synctex as a subprocess , which became a zombie. So emacs is blocked. Now, i had written some stuff in *scratch* which i'd really want not to loose. How can I retrieve the contents of my *scratch* ? 04:08 offby1: rudybot: first, go to a federally-insured bank ... 04:08 rudybot: *offby1: back in the 70s teams of men in ridiculous moustaches and brown letaher jackets would tunnel into bank vaults. 04:08 Bob_: LMFAO 04:09 Bob_: sorry about the server thing though 04:09 Bob_: lol 04:09 offby1: Bob_: the whole reason it said "out of memory" is so that you cannot rack up charges on my server :) 04:10 Bob_: oh, haha 04:10 offby1: rudybot: eval (let loop () (loop)) 04:10 Bob_: did you limit the memory or something? 04:10 offby1: sure 04:10 rudybot: *offby1: error: with-limit: out of time 04:10 offby1: time too 04:10 offby1: also filesystem access 04:10 Bob_: what is time limited to? 04:10 Bob_: like 3 seconds lol? 04:10 offby1: two seconds, I think 04:10 Bob_: ahaha 04:10 offby1: plenty for most stuff 04:11 Bob_: except (build-list 1000000 add1) 04:12 offby1: sure 04:17 Bob_: anyways, I'm off to bed 04:17 Bob_: night guys 04:17 Bob_: rudybot: goodnight rudybot 04:17 rudybot: Bob_: error: reference to undefined identifier: goodnight 04:17 Bob_: :( 04:22 (quit) Bob_: Ping timeout: 265 seconds 04:57 (quit) offby2: Ping timeout: 240 seconds 21:13 (topic) -: Racket -- http://racket-lang.org/ (logs at http://racket-lang.org/irc-logs/ ) 21:13 (names) -: gabot jonrafkind Samy_ gwyth tv|z orlandu63 Lajla Ogion masm bremner Eren eli em fmu godless_ alexsuraci rotty Pepe_ mattmight certainty spacebat Guest1821 tonyg writer bill_h sid3k offby1 jao franki^ rudybot askhader stamourv rapacity mario-goulart chandler seth clklein tewk @ChanServ 21:19 Samy_: YOUJ ARE THE BEST 21:19 Samy_: Thx 21:22 offby1: heh 21:23 offby1: make sure you understand what that's doing; don't just blindly copy and paste. 22:32 (quit) writer: Quit: writer 22:40 (join) Bob__ 22:40 Bob__: Hello everyone 22:40 Bob__: is there some sort of function to time how long a calculation takes? 22:40 Bob__: I'm pretty sure I've seen it somewhere 22:42 (join) cataska 22:44 Bob__: rudybot: (time (+ 1 2)) 22:44 rudybot: Bob__: your sandbox is ready 22:44 rudybot: Bob__: ; Value: 3 22:44 Bob__: hmm... 22:44 Bob__: 3 what? 22:44 Bob__: (time (+ 1 2 3 4 5 6 7 8)) 22:44 Bob__: rudybot: (time (+ 1 2 3 4 5 6 7 8)) 22:44 rudybot: Bob__: ; Value: 36 22:45 Bob__: yeah, ok. I got it 22:45 gwyth: Bob__: http://docs.racket-lang.org/search/index.html?q=time 22:45 Bob__: that code works in the actual racket 22:55 (quit) Samy_: Quit: Page closed