<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Sure thing, done. I’ve moved everything into racket/async-channel, added the missing functions, and added some tests. I squashed my commits into one, and the result is here:</div><div class=""><a href="https://github.com/lexi-lambda/racket/commit/0074ba13b712a87c9d05948ae075bcd74c7651e7" class="">https://github.com/lexi-lambda/racket/commit/0074ba13b712a87c9d05948ae075bcd74c7651e7</a></div><div class=""><br class=""></div><div class="">Two simple points remain:</div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">Where should the documentation go? Should it be under contracts or async-channels? I’d prefer the latter, but I’m not sure.</li><li class="">Since there is no <font face="Courier" class="">impersonate-evt</font> function, I don’t think my <font face="Courier" class="">impersonate-async-channel</font> function will actually work. Is that an accurate concern? How could I fix it?</li></ul><div class=""><br class=""></div></div><div class="">Otherwise, I think this works fine and is probably ready to go.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 15, 2015, at 15:09, Robby Findler <<a href="mailto:robby@eecs.northwestern.edu" class="">robby@eecs.northwestern.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">I think they should probably all be exported from racket/async-channel.<br class=""><br class="">Unless there is some reason to modify the internals of racket/contract<br class="">to support them?<br class=""><br class="">Robby<br class=""><br class="">On Thu, Jan 15, 2015 at 4:50 PM, Alexis King <<a href="mailto:lexi.lambda@gmail.com" class="">lexi.lambda@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">Sorry, I wasn’t clear. The chaperone/impersonate-async-channel functions are exported from racket/async-channel. The async-channel contracts, however, are exported from racket/contract.<br class=""><br class=""><blockquote type="cite" class="">On Jan 15, 2015, at 14:41, Robby Findler <<a href="mailto:robby@eecs.northwestern.edu" class="">robby@eecs.northwestern.edu</a>> wrote:<br class=""><br class="">Just a small nit: why export that function from racket/contract and<br class="">not an async-channel library?<br class=""><br class="">Robby<br class=""><br class=""><br class="">On Thu, Jan 15, 2015 at 3:33 PM, Alexis King <<a href="mailto:lexi.lambda@gmail.com" class="">lexi.lambda@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">As an update, I’ve made a bit more progress on this. I’ve implemented an<br class="">impersonate-async-channel function, and I’ve actually included this in the<br class="">exports from racket/contract. I also realized the blame information is<br class="">correct, it works fine. Most of the other issues remain, as well as a few<br class="">new questions:<br class=""><br class="">There is no impersonate-evt function, so I’m not sure that my implementation<br class="">will work. What should I do about this?<br class="">I’d assume this needs to be documented/tested as well. Where should those<br class="">things be located?<br class=""><br class=""><br class="">On Jan 14, 2015, at 23:44, Alexis King <<a href="mailto:lexi.lambda@gmail.com" class="">lexi.lambda@gmail.com</a>> wrote:<br class=""><br class="">Currently, async channels do not have contracts to check their contents.<br class="">This is a problem for Typed Racket, and it prevents typed code from<br class="">interacting with code that produces async channels.<br class=""><br class="">I started looking into how to add contracts to the language, and it seems to<br class="">use the chaperones/impersonator system, as I suspected. However, async<br class="">channels obviously cannot be impersonated, so I needed to implement that as<br class="">well.<br class=""><br class="">I modified the async-channel struct to use generics to allow it to be<br class="">impersonated or chaperoned, which I have exposed by implementing<br class="">chaperone-async-channel. I then tried implementing async-channel/c. The<br class="">internals of the contract system are a little beyond me, but I got a working<br class="">solution by following the example of the box contracts.<br class=""><br class="">My work thus far can be found here:<br class=""><a href="https://github.com/lexi-lambda/racket/commit/84b9f3604891f3f2061fb28ed4800af8afa4751b" class="">https://github.com/lexi-lambda/racket/commit/84b9f3604891f3f2061fb28ed4800af8afa4751b</a><br class=""><br class="">First of all, is this a correct approach? Have I done anything wrong, or<br class="">should I have done anything differently? I didn’t find much documentation on<br class="">the internals of either of these systems, so I mostly went about things as I<br class="">found them.<br class=""><br class="">Second, obviously, not everything is implemented here. Among the additional<br class="">necessary changes are:<br class=""><br class="">I need to implement support for impersonators and impersonator contracts<br class="">(right now I’ve only bothered to do chaperones).<br class="">I need to implement async-channel/c-first-order and<br class="">async-channel/c-stronger. I can probably figure out the latter, but I’m not<br class="">even sure what the former is supposed to do.<br class="">I need to implement a wrap-async-channel/c macro for the export. I’m not<br class="">sure how this works, either. From looking at wrap-box/c, it seems to add<br class="">some syntax properties, but I’m not sure what they do or how they work.<br class="">Somehow, the blame information has to be correct. Is that what the wrap<br class="">function does? Or do the async-channel functions need to be updated to<br class="">assign blame?<br class=""><br class=""><br class="">I’d really like to get this working, and I think I’m close, but I’m a little<br class="">inexperienced. I’d appreciate any help, even if it’s just pointing me in the<br class="">right direction.<br class=""><br class="">Thanks!<br class=""><br class=""><br class=""><br class="">_________________________<br class=""> Racket Developers list:<br class=""> http://lists.racket-lang.org/dev<br class=""><br class=""></blockquote></blockquote><br class=""></blockquote></div></blockquote></div><br class=""></body></html>