00:01 (quit) Shambles_: Ping timeout: 245 seconds 00:03 (quit) antithesis: Quit: yes leaving 00:03 (quit) replsos: Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120423130206] 00:16 neilv: if you think you found a bug in syntax-parse, unlikely as it seems, probably you did not 00:34 (quit) kvda: Quit: Computer has gone to sleep. 00:37 (join) kvda 01:00 (join) RacketCommitBot 01:00 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/O6lZsw 01:00 RacketCommitBot: [racket/master] [Distributed Places] a few of Eli's documentation suggestions - Kevin Tew 01:00 (part) RacketCommitBot 01:19 eli: Shambles_1: if you really want to get errors for redefinitions of, say, bindings in a `#lang racket' file, then add (require racket) to your code. 01:20 eli: But like jamessan said, there is really no point in that. It's perfectly fine to use any name you want -- that's following a very long scheme tradition of not having any "holy" names, and being able to redefine any name you want. 01:21 eli: yoklov: The threads that you get with `thread' are green threads; they still have a very valid use case -- for any kind of IO, they are extremely easy to deal with (especially with events etc). 01:22 eli: For OS threads you can use either futures which is a very lightweight but limited form of OS threads (share everything, but can be dangerous, and can't do IO etc), of places which are the opposite approach and are one step before starting a separate process. 01:23 eli: bremner: The reason that rudybot allows redefinitions is that it uses a toplevel-like namespace, where such redefinitions are allowed (with the usual equivalence to a `set!') 01:24 neilv: that said, if you enumerate *all* the holy names, then the universe ends 01:25 eli: That's platform^H^H^H^H^H^H^H^Hreligion-dependent... 01:26 (quit) Fare: Ping timeout: 248 seconds 01:27 neilv: just to be safe, i'm not going to be adding test cases for that 01:30 eli: neilv: http://en.wikipedia.org/wiki/Prayer_beads#Islam 01:33 neilv: http://en.wikipedia.org/wiki/Nine_Billion_Names_of_God 01:37 (quit) gerardpaapu: Ping timeout: 252 seconds 01:38 (quit) dnolen: Quit: ERC Version 5.3 (IRC client for Emacs) 01:42 (quit) ambrosebs: Ping timeout: 252 seconds 02:00 (join) ambrosebs 02:02 (quit) yoklov: Quit: bye! 02:08 (join) mye 02:19 (join) mye_ 02:22 (join) hkBst 02:23 (quit) mye: Ping timeout: 260 seconds 02:24 (quit) mye_: Ping timeout: 245 seconds 02:32 (join) jesyspa 02:46 (quit) jonrafkind: Read error: Operation timed out 02:52 (quit) mithos28: Quit: mithos28 02:54 Shambles_1: eli: In what way are Futures dangerous? Aren't they just single assignment variables, so they dodge the need for locking? 02:54 (quit) Shambles_1: Quit: Leaving. 02:54 (join) Shambles_ 03:11 Shambles_: friscosam: Hey, that's pretty neat (the shadowing warnings thing). Thanks. 03:18 (join) bluezenix 03:47 (quit) bluezenix: Quit: Leaving. 03:48 (join) bluezenix 03:49 (quit) kvda: Quit: Computer has gone to sleep. 03:51 (quit) ambrosebs: Ping timeout: 256 seconds 04:23 neilv: my new, lighter unit test syntax is making it just a little bit easier to enumerate all the test cases i need. http://i.imgur.com/J2FQG.png 04:24 (quit) jesyspa: Quit: Lost terminal 04:26 (join) noelw 04:26 (join) jesyspa 04:56 neilv: cheerios 04:56 (quit) neilv: Quit: Leaving 04:57 (quit) jesyspa: Quit: leaving 04:59 (join) jesyspa 05:04 (quit) jyc: Read error: Connection reset by peer 05:14 (quit) nilyaK1: Ping timeout: 276 seconds 05:28 (join) surrounder 05:28 (join) nilyaK 05:46 (join) masm 06:14 (join) netrino 06:19 (join) nilyaK1 06:21 (quit) nilyaK: Ping timeout: 252 seconds 06:29 (quit) bluezenix: Read error: Connection reset by peer 06:32 (join) bluezenix 06:32 (join) bitonic 06:37 eli: Shambles_: No, futures can lead to the obvious races. 07:14 (join) antithesis 07:15 (quit) nilyaK1: Quit: Leaving. 07:23 Shambles_: eli: I'm trying to understand where the problem is, since what 'futures' means in most implementations is safe, and that seems to be what Racket means by the term too. The closest thing I can come up with is what the reference mentions about using set! ? The problem not being with futures themselves but other things that are not thread safe. 07:24 eli: Shambles_: I don't know what you mean. Specifically, I don't know about such meaning of safety. 07:24 eli: The bottom line is that if you run (set! x (+ x 1)) in 07:25 eli: 1. two threads -- you might get 2 as a result, but unlikely so because the system tends to swap threads on io or larger computations 07:25 eli: 2. two futures: you can definitely get 2 (starting from 1, btw) 07:26 (quit) bluezenix: Read error: Connection reset by peer 07:26 eli: 3. two places: that won't work since you can't mutate one place from another. 07:27 Shambles_: eli: My understanding of futures is they're implemented as single assignment variables, which avoids the need for locking, and any potential for lock contingency, but means computation forms a 'tree', where the root has to wait for the other computations to finish before it can read the final result, so it's not good for keeping a UI from 'hanging', like message passing concurrency (as in places). 07:27 (join) bluezenix 07:29 Shambles_: eli: The two threads don't have their own stack space or something? I don't see why set would necessarily cause problems across threads. It seems like it should only happen if it's done to a reference to shared state (a global variable or whatnot) 07:29 eli: That sentence doesn't make any sense to me... Futures are parallel computations that are implemented usually via OS threads; variables are something completely different. 07:30 (join) plobzik 07:31 Shambles_: eli: Generally speaking anything 'held onto' by a thread's stack can be manipulated safely *so long as* it doesn't exist in another thread's stack. If this was C and I passed a pointer to a global variable named x it would be unsafe. But if x was inside the thread's own stack frames it should be safe. 07:31 Shambles_: eli: So I'm trying to figure out how the behavior of futures is 'surprising'. 07:32 eli: Sorry, I still don't know what you're talking about. 07:32 eli: "Stack" is an implementation detail. 07:32 eli: The main point is lexical scope. 07:32 (quit) antithesis: Quit: yes leaving 07:32 (join) antithesis 07:32 Shambles_: eli: Or perhaps you think of 'variables are something completely different' in a confusing way. A future usually refers to a result that will start running when you create it, and only block when you try to read it. A future is a kind of variable, or at least that's how it's usually described. 07:33 eli: "A future is a kind of a variable" --??? 07:34 Shambles_: eli: Parallelism (and the opportunity for race conditions) is a implementation detail too. Trying to understand the 'why' of "futures are bad, umkay?" involves me trying to figure out how futures behave differently than I expect, and futures /usually/ aren't 'bad'. I assume from what you said Racket's futures aren't real futures somehow. 07:34 (quit) plobzik: Read error: Connection reset by peer 07:35 eli sighs 07:35 eli: It doesn't help to refer to things that are even less defined like "real futures". 07:35 eli: Also, I didn't say that they were bad in any way, just that the responsibility to keep out of the obvious problem is on you. 07:36 Shambles_: Theoretically a future represents the value produced by a computation. You make them, you store them, you pass them around. As soon as you try to read one, it will either return the value (if the computation is already finished), or 'hang' until the computation finishes. 07:37 eli: The last part is correct, but it explains why the first part is wrong -- futures don't represent values. 07:37 Shambles_: If you do this with single assignment variables, and you use a atomic (to the hardware) operation to update the "computation is finished, result should be safe to read now" flag, there should be no need for locking, and no surprising behavior. 07:37 (join) mye 07:37 eli: And single-assignment is a machine-code-generation thing, so I don't see how it's related here. 07:38 eli: Here's an example: 07:38 eli: (let ([x 0]) (define (inc!) (set! x (+ x 1))) (for-each touch (map future (list inc! inc!))) x) 07:38 Shambles_: eli: Forgive me if I try to understand programming in terms of what it does in the machine. That's how I view programming. It's a way to make the machine do useful or interesting things. If understanding the implementation details bothers you, then just focus on explaining why futures should be more surprising than places. 07:39 eli: What should that return? 07:40 Shambles_: It looks like x exists outside the future, so I would believe it is shared, and thus not safe to mutate within the future. That's not a shortcoming of futures. The same thing should happen with message passing concurrency, or any other kind where you pass it a reference to global data. 07:40 Shambles_: It's akin to "pass a pointer to a global variable to the thread" in C, but of course that's probably considered implementation details. 07:41 eli: OK, the danger is that you *can* do that, and with places you cannot. 07:42 (join) mceier 07:42 Shambles_: How do places keep me from ever passing a reference to global data? I thought it just provided message channels between threads? 07:43 eli: There is no shared memory since you initialize a place with its own module (and therefore namespace). 07:43 eli: And you can only pass restricted kinds of data across places. 07:43 Shambles_: You can still send data to... 07:43 eli: Specifically, no mutable data. 07:43 Shambles_: Alright, that sounds like the key. 07:43 Shambles_: Alright, that's what I needed to hear. You can only pass constants then? 07:44 eli: Roughly, IIUC. 07:44 eli: That's what I meant about the difference between them and about places being almost like two processes. 07:45 Shambles_: That's interesting. I take it it's made possible by a 'flag' set on the value in Racket that is passed around with the value? 07:45 (join) ahinki 07:47 Shambles_: What I'm getting at (yes, this is implementation details too, likely) is how does Racket 'know' whether it's a constant or not, and what happens if I try to pass something mutable? 07:50 eli: Some values are constants, and some are not, there's no flag other than the implicit type tag (if you want to talk about implementation). 07:51 eli: But note that I'm not getting into such implementation issues in the above -- for example, there is no relevance to whether `x' in the above is allocated on the stack or on the heap. 07:53 Shambles_: eli: I'm looking at the documentation and it explains what's allowed, and I have a guess as to how it's working now. One thing I can't discern from the documentation is what happens with large amounts of data. 07:53 Shambles_: eli: Say I make a immutable byte string out of a image, and I'm working on a image processing program. I aught to be able to pass this to a thread running as a place. Is it going to actually create a copy of all that, or is it going to read the reference since it's immutable? 07:53 Shambles_: eli: Because it makes a great big difference in performance. 07:54 eli: You mean with places? -- If so, then you'll need to ask on the list about such details... I just know about the highlevel. 07:55 Shambles_: eli: Okay. Maybe someone else on here will know later today. I try to stay off mailing lists. 07:57 Shambles_: eli: Thanks for clearing up the statement about futures. I aught to be able to use both safely since I would have expected the behavior you described with futures, but I can see why places would be considered safer now. 07:58 eli: I don't think that "safer" is the right term, "lightweight" seems more descriptive. 07:59 eli: As for asking, tewk is sometimes active here, but the mailing list is definitely a better place -- if you try to avoid mailing list load, you can subscribe to the list without mail delivery, and then you can see replies via a web interface (like gmane, google groups, or mail-archive.com). 08:06 Shambles_: eli: It's mostly the mailing list load, yes. It also often takes a very long time to get a reply. If we tried to have the conversation we just had on a mailing list it would probably have taken about a week due to all the back-and-forth. 08:07 Shambles_: As for safer vs lightweight. I would only use the term lightweight to describe something more efficient and/or less featureful. Safer would be what I would expect for something harder to shoot yourself in the foot with. 08:11 eli: Shambles_: tewk is the guy who implement{ed,s} places, and you're likely to get faster reply on the mailing list than trying to catch him. 08:12 Shambles_: eli: I see. Thanks. 08:13 (join) snearch 08:45 (join) kanak 08:50 (quit) kanak: Client Quit 08:51 (join) zyoung 08:59 (quit) karswell: Remote host closed the connection 09:03 (quit) bluezenix: Quit: Leaving. 09:05 (join) bluezenix 09:09 (quit) bluezenix: Client Quit 09:09 (join) karswell 09:10 (join) bluezenix 09:21 (join) Fare 09:21 (quit) bluezenix: Quit: Leaving. 09:22 (join) bluezenix 09:37 (quit) lem_e_tweakit: Ping timeout: 244 seconds 09:38 (quit) getpwnam: Ping timeout: 256 seconds 09:38 (quit) hash_table: Ping timeout: 256 seconds 09:46 (join) ynniv 09:50 (join) Skola 09:54 (join) ynniv_ 09:54 (quit) ynniv: Read error: Connection reset by peer 09:54 (nick) ynniv_ -> ynniv 10:18 (join) tyson1 10:24 (quit) Skola: Quit: leaving 10:24 (join) ynniv_ 10:27 (join) Skola 10:30 (quit) ssbr: Remote host closed the connection 10:35 (join) ssbr 10:44 (join) getpwnam 10:45 (join) lem_e_tweakit 10:45 (join) hash_table 10:45 stamourv: danking: Great, I'll have a closer look! 10:45 stamourv: danking: As for `#%kernel', that's what's provided directly by the runtime. 10:46 stamourv: The very lowest-level parts of Racket (e.g. the implementation of `racket/base') are written in `#%kernel'. 10:47 stamourv: I don't recommend using it if you can avoid it. 10:47 (quit) ahinki: Quit: ChatZilla 0.9.88.2 [Firefox 13.0/20120509070325] 10:50 (quit) ynniv_: Quit: ynniv_ 10:52 (part) tyson1 10:55 (join) tyson1 10:58 (quit) antithesis: Quit: yes leaving 11:05 (quit) Skola: Read error: Operation timed out 11:17 (part) tyson1 11:19 anonus: can racket use regexps in pattern-matching ? 11:21 samth: anonus: yes 11:21 anonus: can you gimme and example ? 11:21 samth: see the `regexp' form here: http://docs.racket-lang.org/reference/match.html?q=match#%28form._%28%28lib._racket/match..rkt%29._match%29%29 11:21 rudybot: http://tinyurl.com/cfkfojd 11:23 anonus: awesome, thanks 11:26 (join) ASau 11:28 (quit) hkBst: Quit: Konversation terminated! 11:51 (join) aalix 11:52 (quit) jrslepak: Quit: This computer has gone to sleep 11:53 (join) jonrafkind 11:53 (quit) bluezenix: Quit: Leaving. 11:55 (quit) aalix: Client Quit 11:57 (join) aalix 11:59 (quit) Shvillr: Quit: bye 11:59 (join) dnolen 11:59 (part) dnolen 11:59 (join) Shviller 12:03 friscosam: Shambles_: iirc this paper has more details on the implementation of places: http://www.eecs.northwestern.edu/~robby/pubs/papers/dls2010-tsffd.pdf 12:05 (join) kanak 12:12 Shambles_: friscosam: Thanks. 12:13 (join) nilyaK 12:17 (join) anRch 12:18 (join) jrslepak 12:19 (quit) jrslepak: Remote host closed the connection 12:28 (join) jacius 12:35 ChibaPet: A quick question... Is there anything in r6rs or r7rs dealing with starting and communicating with processes, or is that all implementation-specific? 12:36 ChibaPet: I'm searching but nothing is jumping out at me just yet. 12:48 (join) ASau` 12:49 (quit) dented42: Quit: Computer has gone to sleep. 12:52 (quit) ASau: Ping timeout: 248 seconds 13:01 (join) bluezenix 13:04 (join) sstrickl 13:04 (quit) sstrickl: Changing host 13:04 (join) sstrickl 13:16 (quit) bitonic: Quit: WeeChat 0.3.7 13:23 (quit) Nisstyre: Ping timeout: 246 seconds 13:28 (quit) nilyaK: Read error: Connection reset by peer 13:32 (quit) lem_e_tweakit: Ping timeout: 246 seconds 13:33 (quit) hash_table: Ping timeout: 246 seconds 13:33 (quit) getpwnam: Ping timeout: 246 seconds 14:09 asumu: ChibaPet: No, I really doubt there is. Why? 14:09 asumu: (that is, why do you need to use R6 or R7?) 14:10 ChibaPet: Oh, the notion of doing some conversions from Perl to Lisp came up, and I'm trying to see how different Lisps do things I want to do. In particular, Perl makes it trivial to say, for instance, open $query, "$wmctrl -l -G|", and then pull program output out of the $query filehandle. 14:11 ChibaPet: And so, I was wondering if there's anything in any Lisp-related standards that talks about that sort of thing, but it seems like everything (CL and Scheme) is all very implementation-specific. 14:12 asumu: I see. Well, in that regard Perl has it much easier since it's just one implementation essentially. 14:12 asumu: As opposed to Scheme where you may as well consider them all separate languages. 14:12 asumu: Racket has a pretty good process API. 14:13 asumu: http://pre.racket-lang.org/docs/html/reference/subprocess.html 14:13 ChibaPet: Yeah, that looks pretty flexible. 14:14 ChibaPet: Hey, does Racket support asychronous socket I/O out of the box? 14:16 ChibaPet: As in, what I'd get from select in C/Perl? 14:16 Shambles_: Is there a way to define contracts for things you don't want exported within the module, to help reduce debugging effort? 14:19 (quit) anRch: Quit: anRch 14:19 (join) antithesis 14:19 asumu: ChibaPet: As in Unix sockets? I don't think there is, because Racket's API is all cross-platform. You can do async io with things like threads and async-channels though. 14:19 (quit) antithesis: Remote host closed the connection 14:19 ChibaPet: I'll have to look at async-channels and see what that's about. I despise threading. 14:20 asumu: rudybot: (define/contract integer? "foo") 14:20 rudybot: asumu: your sandbox is ready 14:20 rudybot: asumu: error: #:1:0: define/contract: bad syntax in: (define/contract integer? "foo") 14:20 asumu: rudybot: (define/contract x integer? "foo") 14:20 rudybot: asumu: error: x: self-contract violation, expected: integer?, given: "foo" contract from: (definition x), blaming: (definition x) contract: integer? at: #:1.17 14:20 asumu: Shambles_: ^ 14:20 chandler: rudybot: doc sync 14:20 rudybot: chandler: your sandbox is ready 14:20 rudybot: chandler: http://docs.racket-lang.org/reference/sync.html#(def._((quote._~23~25kernel)._sync)) 14:20 chandler: ChibaPet: Have a look at that. 14:21 chandler: `sync' is the closest Racket equivalent to select(). 14:22 ChibaPet: Hm, was looking at http://pre.racket-lang.org/docs/html/reference/async-channel.html but it seems suspiciously like it might be threading under the hood if it's not using select - which it seems not to, since it describes async-channel-get as blocking. 14:23 bremner: if only the source were available ;) 14:23 ChibaPet: sync looks similar, except that it's explicitly blocking 14:23 ChibaPet: I know, right? 14:24 Shambles_: asumu: Thanks. I see that in the documentation now. I'm guessing it works fine for most purposes? I could use it for anything defined? 14:28 (join) lem_e_tweakit 14:28 (join) getpwnam 14:29 (join) hash_table 14:32 Shambles_: asumu: I wonder how that would look for attaching checks to a members/methods on a internal class. The documentation is sort of confusing. It seems very oriented toward only doing things at module boundaries. There's a mention of using define-struct/contract. Is that what I'd need? 14:35 asumu: Shambles_: class as in using racket/class? 14:36 asumu: rudybot: (define point% (class/c (field [x integer?])) (class object% (super-new) (init-field [x 0]))) 14:36 rudybot: asumu: error: #:1:0: define: bad syntax (multiple expressions after identifier) in: (define point% (class/c (field (x integer?))) (class object% (super-new) (init-field (x 0)))) 14:37 asumu: rudybot: (define point% (class/c (field [x integer?])) (class object% (super-new) (init-field [x 0])))) 14:37 rudybot: asumu: [racket/master] Add #:opaque keyword to class/c. - Asumu Takikawa 14:37 asumu: rudybot: (define/contract point% (class/c (field [x integer?])) (class object% (super-new) (init-field [x 0]))) 14:37 rudybot: asumu: Done. 14:38 asumu: rudybot: (new point% [x "wrong"]) 14:38 rudybot: asumu: ; Value: #(struct:object:point% "wrong") 14:38 asumu: Uhh. 14:38 asumu: Oh. 14:38 asumu: rudybot: (define/contract point% (class/c (init-field [x integer?])) (class object% (super-new) (init-field [x 0]))) 14:38 rudybot: asumu: Done. 14:38 asumu: rudybot: (new point% [x "wrong"]) 14:38 rudybot: asumu: error: point%: contract violation, expected: integer?, given: "wrong" contract from: (definition point%), blaming: program contract: (class/c (init (x integer?)) (field (x integer?))) at: #:1.17 14:38 asumu: Shambles_: ^ 14:38 Shambles_: asumu: yes, as in using racket class. 14:39 Shambles_: asumu: Thanks for all the help. 14:46 (quit) karswell: Remote host closed the connection 14:49 (quit) mye: Read error: Connection reset by peer 14:49 (join) mye 14:55 (quit) noam: Ping timeout: 252 seconds 14:55 (join) nilyaK 14:56 (join) karswell 15:02 (join) bitonic 15:03 (join) noam 15:05 (quit) lem_e_tweakit: Ping timeout: 244 seconds 15:05 (quit) getpwnam: Ping timeout: 248 seconds 15:06 (quit) hash_table: Ping timeout: 248 seconds 15:09 (join) wand 15:09 (quit) wand: Client Quit 15:13 (join) wand 15:21 (quit) bluezenix: Quit: Leaving. 15:24 (join) getpwnam 15:25 (join) hash_table 15:30 (join) jonathansizz 15:34 (join) bluezenix 15:46 (quit) acarrico: Ping timeout: 248 seconds 15:50 (join) jao 15:50 (quit) jao: Changing host 15:50 (join) jao 15:56 (quit) nilyaK: Quit: Leaving. 15:57 (join) RacketCommitBot 15:57 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/JCLXVg 15:57 RacketCommitBot: [racket/master] Add \bot as alias for \perp in DrRacket (both are supported in LaTeX). - Sam Tobin-Hochstadt 15:57 (part) RacketCommitBot 16:08 (join) stamourv` 16:09 (quit) stamourv`: Client Quit 16:18 (join) anRch 16:28 (join) yoklov 16:34 (join) RacketCommitBot 16:34 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/TEcKVA 16:34 RacketCommitBot: [racket/master] Use coerce-contract when building interfaces with contracts. - Stevie Strickland 16:34 (part) RacketCommitBot 16:34 (join) Nisstyre 16:55 (quit) anRch: Quit: anRch 16:57 (join) anRch 17:26 (quit) anRch: Quit: anRch 17:28 (join) gerardpaapu 17:32 (quit) gerardpaapu: Client Quit 17:42 (quit) sstrickl: Quit: sstrickl 17:43 (join) jrslepak 17:43 (quit) bluezenix: Quit: Leaving. 17:44 (join) bluezenix 17:45 (quit) bluezenix: Client Quit 17:49 (quit) wand: Remote host closed the connection 17:50 (join) bluezenix 17:52 (quit) kanak: Ping timeout: 240 seconds 17:53 (quit) bluezenix: Client Quit 17:57 (quit) mye: Ping timeout: 240 seconds 17:57 (join) jeapostrophe 17:57 (quit) jeapostrophe: Changing host 17:57 (join) jeapostrophe 18:06 (quit) netrino: Quit: Ave! 18:06 (quit) zyoung: Ping timeout: 248 seconds 18:09 danking: stamourv: Yeah, then I'm not sure how to create a more direct integration of multiple auto-values. The implementation of auto-values seems to depend on `make-struct-type' which, AFAICT, is `require'd from #%kernel. 18:11 danking: So, we need to hack #%kernel so that the fifth argument to make-struct-type expects a list of [Maybe Any] that corresponds to the auto-values for the fields. 18:14 (quit) jeapostrophe: Ping timeout: 256 seconds 18:15 (quit) snearch: Quit: Verlassend 18:18 (join) jyc 18:26 Shambles_: I had to go away a while. I take it racket/async-channel is what is used to do async i/o in racket? Someone was asking about TCP/IP earlier. 18:34 (join) jeapostrophe 18:34 (quit) jeapostrophe: Changing host 18:34 (join) jeapostrophe 18:39 friscosam: async-channel is for messaging between racket threads asynchronously 18:40 friscosam: async i/o is built on top of however the OS does async i/o 18:40 friscosam: so select or poll or whatnot 18:40 friscosam: iirc 18:42 Shambles_: friscosam: I think the conclusion was that there was no 'select', but 'sync' could be used to do something similar. I was trying to figure out where Racket hid away the 'good' file and networking i/o. My best guess was there. 18:45 friscosam: I'm not sure I get what you mean by 'good' 18:46 Shambles_: friscosam: By good I mean asynchronous. ;) It's nice to be able to say you want a file 'eventually', carry on with your computations, and when you run out of stuff to do, then try to read the result and if it isn't finished it blocks until it is. 18:48 friscosam: yeah you could do that with sync and channels 18:52 Shambles_: friscosam: Is there any high level documentation on this. I haven't finished the guide yet but got curious after the topic came up. 18:55 samth_away: Shambles_: you should use threads 18:55 Shambles_: samth_away: Any particular reason for that? Also, which API? 'threads' threads? 18:56 samth_away: rudybot: doc thread 18:56 rudybot: samth_away: your sandbox is ready 18:56 rudybot: samth_away: http://docs.racket-lang.org/reference/threads.html#(def._((quote._~23~25kernel)._thread)) 18:56 samth_away: that threads 18:56 samth_away: that's how you do asynchronous processing in racket 18:57 Shambles_: samth_away: So basically just use regular blocking i/o in a separate green thread? 19:06 (join) dyoo 19:07 dyoo: Shambles_: my impression was that C's select and Racket's sync or sync/timeout had equivalent behavior; where do they differ? 19:08 Shambles_: dyoo: The discussion earlier seemed to indicate they were equivalent. Now I'm rather confused about what one should do to read/write files and sockets asynchronously though, since there seems to be differing opinions. 19:09 Shambles_: (2:23:05 PM) ChibaPet: sync looks similar, except that it's explicitly blocking 19:11 dyoo: Shambles_: hmm... but doesn't select C's block as well, unless we provide it a non-NULL timeout argument? Racket's sync/timeout will also not block if given a timeout of 0. 19:13 Shambles_: dyoo: I think they only found 'sync' not 'sync/timeout', so that may be the reason for the comment. It just got me thinking about how to do async I/O for working with files and the network. 19:13 dyoo: Shambles_: yup. Let me check something.. I'm reading through http://docs.racket-lang.org/reference/port-lib.html 19:14 dyoo: which might have some content about treating ports as events 19:14 (quit) jacius: Remote host closed the connection 19:14 dyoo: ... yeah, you might find the content starting around http://docs.racket-lang.org/reference/port-lib.html#(def._((lib._racket/port..rkt)._read-bytes-evt)) relevant 19:17 dyoo: for the writing side of things: http://docs.racket-lang.org/reference/Byte_and_String_Output.html?q=write%20evt#(def._((quote._~23~25kernel)._write-bytes-avail-evt)) 19:17 rudybot: http://tinyurl.com/72978g5 19:17 dyoo: ah, thank you rudybot 19:20 (part) dyoo 19:20 Shambles_: dyoo: So synchronization events and sync are the usual way to do async i/o in Racket. 19:21 (quit) yoklov: Quit: computer sleeping 19:23 (join) yoklov 19:23 (join) dyoo 19:23 dyoo: shambles_: yup! That's why I was getting confused from reading the IRC logs. :) 19:24 Shambles_: dyoo: Okay, thanks for clearing that up. :) 19:26 (quit) mceier: Quit: leaving 19:27 (part) dyoo 19:36 (join) mye 19:36 (quit) jonrafkind: Ping timeout: 240 seconds 19:41 (join) nilyaK 19:51 (quit) jeapostrophe: Ping timeout: 265 seconds 19:57 (quit) bitonic: Quit: WeeChat 0.3.7 20:05 (join) mye_ 20:05 (join) kvda 20:07 (join) dnolen 20:08 (quit) mye: Ping timeout: 250 seconds 20:08 (join) jacius 20:23 (quit) aalix: Ping timeout: 260 seconds 20:39 (quit) masm: Quit: Leaving. 20:57 (quit) dnolen: Ping timeout: 276 seconds 21:25 (quit) Fare: Ping timeout: 245 seconds 21:27 (join) zyoung 21:38 (join) Fare 21:43 ozzloy: i just installed neil's sicp package which gave some errors during the install. i'd like to reinstall so i can file a bug report. how do i completely uninstall it? 21:51 asumu: ozzloy: which OS? 21:51 (join) mye__ 21:52 asumu: (on Unix it's in ~/.racket, on Windows "Racket" under "Application Data", and... not sure on Mac) 21:52 (join) jonrafkind 21:55 (quit) mye_: Ping timeout: 246 seconds 22:19 ozzloy: asumu, ubuntu 22:20 ozzloy: asumu, you mean i can just rm -rf ~/.racket/5.2.1/ ? 22:23 (quit) jesyspa: Quit: leaving 22:29 Fare: looking for speakers in Boston in June, July, etc. 22:31 offby1: You can probably get them at any decent stereo place 22:31 offby1 flees 22:33 eli: Fare: How about a more realistic two month schedule? 22:35 Fare: can work, too 22:35 Fare: but I don't have a speaker for july, either. 22:36 eli: I can't think of a concrete potential speaker though. 22:36 eli: My try to get some of the old-timers to talk? 22:37 eli: s/My/Maybe/ 22:40 (quit) kvda: Quit: Computer has gone to sleep. 22:44 (join) mithos28 22:51 Fare: yup - that's my current plan for june 22:54 (quit) jonathansizz: Ping timeout: 240 seconds 22:54 (quit) getpwnam: Ping timeout: 260 seconds 22:54 (quit) hash_table: Ping timeout: 244 seconds 22:56 asumu: ozzloy: You don't want to do that, just delete the planet package directory. 22:59 asumu: (and more specifically just the sicp package) 23:07 (quit) yoklov: Remote host closed the connection 23:07 (join) yoklov 23:07 (quit) yoklov: Remote host closed the connection 23:14 (quit) zyoung: Remote host closed the connection 23:17 (join) zyoung 23:34 (quit) zyoung: Remote host closed the connection 23:39 (join) kvda 23:43 (quit) flying_rhino: Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/