<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    On 03/19/2012 09:22 AM, fawce wrote:
    <blockquote
      cite="mid:B752083B-3248-4B29-B661-BDE36C27B2F7@quantopian.com"
      type="cite">holy mackerel that's awesome!
      <div><br>
      </div>
      <div>Can you elaborate on the callback issue? Wondering why you
        can't pass in a callback that just makes a ws call internally.<br>
      </div>
    </blockquote>
    <br>
    just that I serialize function names and the args they are called
    with via JSON<br>
    <br>
    so for d3, the normal way you would position points in a scatter
    plot is something like this<br>
    <br>
    d3.selectAll('circle').attr('cx', function(d){return axis(d['x'])});<br>
    <br>
    I have no good way to pass function(d){return xaxis(d['x'])}<br>
    <br>
    I could pass it as a string, but then I would need some way to
    determine whether strings I pass should be eval-ed to retrieve
    callbacks or not <br>
    also - you would have to write javascript callbacks in string form,
    which is ugly anyways.  furthermore, in d3, it is common to define
    scaling axes objects, and use those in your callbacks - I don't have
    a good place to do that either.<br>
    <br>
    <br>
    <blockquote
      cite="mid:B752083B-3248-4B29-B661-BDE36C27B2F7@quantopian.com"
      type="cite">
      <div>
        <div>
          <div>On Mar 19, 2012, at 8:13 AM, hugo wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <meta http-equiv="content-type" content="text/html;
              charset=ISO-8859-1">
            <div bgcolor="#FFFFFF" text="#000000"> <br>
              <meta http-equiv="content-type" content="text/html;
                charset=ISO-8859-1">
              Thought you might be interested in something I've
              experimented with over the past few days.<br>
              <br>
              <a moz-do-not-send="true"
                href="https://github.com/hhuuggoo/pushd3/blob/master/demopush.ogv">https://github.com/hhuuggoo/pushd3/blob/master/demopush.ogv</a><br>
              <br>
              I wanted to see how well this concept would work, I set up
              remote execution of code in the browser by creating an RPC
              interface around zeromq messages which get forwarded into
              websockets, and then I forwarded d3 and jquery operations
              to the browser.  It works fine if your arguments are all
              json serializable, however d3 is heavily reliant on
              passing callbacks, and I don't have a good way to do that.<br>
              <br>
              Anyways, here it is.  This is separate from the ipython
              notebook, I have a separate gevent based zeromq web socket
              forwarder that I've also been playing around with which I
              am using here.<br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
            </div>
            _______________________________________________<br>
            IPython-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
            <a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
IPython-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a>
<a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>