News for hackers. Stuff that matters.
Re:Some thoughts on asynchronous Python API design in a post... by dismantlethesun on Sunday November 06, 2016 @10:32PM (#12888612)
Welcome, the wonderful world of writing anything in Javascript.

Imagine the same thing using Promises:

   def proxy(dest_host, dest_port, main_task, source_sock, addr):
      main_task.cancel()\
          .then(lamdba _: curio.open_connection(dest_host, dest_port))\
          .then(lambda dest_sock: copy_all(source_sock, dest_sock)
Re:Some thoughts on asynchronous Python API design in a post... by noobiemcfoob on Monday November 07, 2016 @09:52AM (#12891420)
It's statements like this that have kept me from ever learning _anything_ in Javascript...