<br><div class="gmail_quote">On Fri, Aug 20, 2010 at 1:52 AM, Frederick Ross <span dir="ltr">&lt;<a href="mailto:madhadron@gmail.com">madhadron@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Unfortunately, I can&#39;t figure out how to dump images from Racket.  Is<br>
it possible?  Or am I having brain creep from Common Lisp?  Or if<br>
anyone can think of a cleaner way to do this, I would really love to<br>
hear it.<br clear="all"></blockquote></div><br>It seems like all you need is a batch architecture in racket, is that correct?  I am assuming the following: <br><ol><li>your macro generates function calls with new arguments, instead of new functions </li>
<li>your functions are queued only because you need to wait, not because of other constraints such as lack of memory to keep them all in memory at once </li><li>you are waiting for either the LSF to signal you being ready, or just for a particular time on the day (or particular to sequentially execute one by one) <br>
</li></ol>So to solve the dump/load issue - you can, instead of dumping the image, just dumb the arguments to the function call into a file. And then when you load the file, execute the function call with the arguments from the file. <br>
<br>You can do the above either keeping a persistent racket image, or continue to restart a new racket instance. <br><br>If you want to restart racket, you can even dump a shell script with the function call with the arguments embedded, then just run the script. <br>
<br>If you are actually generating a new function, then it&#39;s simpler to use the shell script approach. <br><br>You can leverage cron for a batch architecture if your jobs are executed at particular time intervals.  If instead what you need is to execute everything sequentially as fast as they come, you can write a main loop that look for job files in your temp directory, and then execute them by loading them via the above approach.  This approach works with both arguments file and script file approach, but you might find the arguments file approach works better in the sense that it does not have to create a sub process. <br>
<br>Hope this helps.  If my assumptions are incorrect - please feel free to clarify.  <br><br>-- <br>Cheers,<br>yc<br><br>Taming the software dragon - <a href="http://dragonmaestro.com">http://dragonmaestro.com</a><br><br>