Is it possible to take (e.g.) a procedure object and decompose it back into its original source code?
Background: I need a very simple pure-Racket task manager for the app I'm working on. This is an application-internal TM, not a for-users TM -- the sort of tasks it will be handling are "in 5 minutes, release this block of disk space that we just reserved". The app will eventually be installed on end-user machines, so using something like ZeroMQ is unappealing because it would mean installing additional software. One (bad) idea that came to mind was to simply shove some Racket code into a TEXT field in the database, then eval it when the time comes. Now, this is horrible for a lot of reasons (security and error handling being two of them), but it got me thinking: how would I do this? I could build a Racket list that happens to be code, then eval that but suppose I already had a function that did what I needed and I wanted to use that -- how could I store that? Some googling and documentation-searching has not shown me a way to decompose a procedure. I played around with some syntax-related calls but made no headway. Another (saner) solution would be to serialize a continuation to disk, the way the web server does, then put some sort of activation trigger (e.g. a URL) in the database. I'm not going that route because I don't understand the process very well and based on the reading I've done it's got some pitfalls. So, with the caveat that I'm not actually going to put Racket in the DB and this is mostly just intellectual curiosity, how would I do this? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.