<div class="gmail_quote">On Sat, May 1, 2010 at 2:21 PM, Tim E. Real <span dir="ltr"><<a href="mailto:termtech@rogers.com" target="_blank">termtech@rogers.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I've always wondered why they don't make a fixed-point co-processor...</blockquote><div><br></div><div>That's what the three other 3.4G cores are for...  or should be, in a more ideal world.</div><div><br></div>
<div>It's too bad people don't write programs that can automatically decompose into a parallel-execution (e.g. multithread) solution. Today's talk on using continuation-passing style in scheme was a step in the right direction  ( <a href="http://lac.linuxaudio.org/2010/download/kjetil.pdf">http://lac.linuxaudio.org/2010/download/kjetil.pdf</a> ) -- "Implementing a Polyphonic MIDI Software Synthesizer using Coroutines, Realtime Garbage Collection, Closures, Auto-Allocated Variables, Dynamic Scoping, and Continuation Passing Style Programming" Kjetil Matheussen. [[plug: <a href="http://mitpress.mit.edu/sicm/book.html">http://mitpress.mit.edu/sicm/book.html</a> -- Structure and Interpretation of Classical Mechanics ]]</div>
<div><br></div><div>Speaking of java, all these concepts should be "cloudified" -- figure out a way to get google app engine to make a "cloudsynth" (of course, it should integrate qmidinet so as to setup midi routing appropriately). Maybe using clojure -- since it's basically lisp in java, with attention paid to parallel programing. And since underlying clojure is java, you get the standardized and widely-used/debugged java.math libs such as arbitrary precision arithmetic, so you can mix and remix to your hearts' content without bit-loss... of course, if a mix itself was a closure, then there'd be no bit-loss, or copying, since everything would just be a computation upon an original, prior, sound source. (You'll be able to 'unmix' any sound -- kind of like an infinite "mix" undo -- and like self-describing data, a "self describing mix")....</div>
<div><br></div><div>For more info on clojure and functional programming:</div><div><br></div><div>See <a href="http://www2.computer.org/cms/Computer.org/ComputingNow/homepage/2009/0609/rW_CS_FunctionalProgramming.pdf">http://www2.computer.org/cms/Computer.org/ComputingNow/homepage/2009/0609/rW_CS_FunctionalProgramming.pdf</a> as good intro.</div>
<div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
The Promises of Functional Programming</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
By Konrad Hinsen</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Adopting a functional programming style could make your programs more robust, more compact, and more</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
easily parallelizable. However, mastering it requires some effort.</blockquote><div><br></div><div style="font-family: arial, sans-serif; font-size: 16px; border-collapse: collapse; color: rgb(51, 51, 51); "><font size="3"><span style="font-size: 13px; ">Wondering whether Google App Engine would be able to host such an application, I check</span></font></div>
<div style="font-family: arial, sans-serif; font-size: 16px; border-collapse: collapse; color: rgb(51, 51, 51); "><font size="3"><span style="font-size: 13px; "><a href="http://elhumidor.blogspot.com/2009/04/clojure-on-google-appengine.html" target="_blank" style="color: rgb(28, 81, 168); ">http://elhumidor.blogspot.com/2009/04/<span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); background-position: initial initial; background-repeat: initial initial; ">clojure</span>-on-google-appengine.html</a> which says:</span></font></div>
<div style="font-family: arial, sans-serif; font-size: 16px; border-collapse: collapse; color: rgb(51, 51, 51); "><font size="3"><span style="font-size: 13px; "><br></span></font></div><div style="font-family: arial, sans-serif; font-size: 16px; border-collapse: collapse; color: rgb(51, 51, 51); ">
<font size="3"><span style="font-size: 13px; "><span style="border-collapse: separate; font-family: Georgia; "><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
THE BIG CAVEAT</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Two unusual aspects of the Google AppEngine environment create pretty major constraints on your ability to write idiomatic <span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); background-position: initial initial; background-repeat: initial initial; ">Clojure</span>.</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
First, an AppEngine application runs in a security context that doesn't permit spawning threads, so you won't be able to use Agents, the <span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); background-position: initial initial; background-repeat: initial initial; ">clojure</span>.parallel library, or Futures.</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Second, one of the most exciting features of AppEngine is that your application will be deployed on Google's huge infrastructure, dynamically changing its footprint depending on demand. That means you'll potentially be running on many JVMs at once. Unfortunately this is a strange fit for <span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); background-position: initial initial; background-repeat: initial initial; ">Clojure</span>'s concurrency features, which are most useful when you have precise control over what lives on what JVM (and simplest when everything runs on one JVM). Since shared references (Vars, Refs, and Atoms) are shared only within a single JVM, they are not suitable for many of their typical uses when running on AppEngine. You should still use <span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); background-position: initial initial; background-repeat: initial initial; ">Clojure</span>'s atomic references (and their associated means of modification) for any state that it makes sense to keep global per-JVM, since there may be multiple threads serving requests in one JVM. But remember JVMs will come and go during the lifetime of your application, so anything truly global should go in the Datastore or Memcache.</blockquote>
</span></span></font></div><div> </div></div><div>-- Niels.</div><div><a href="http://nielsmayer.com">http://nielsmayer.com</a></div>
</div>