Actually, what I've ended up doing is this:
1) There's a globally accessible jumptable hash that any function is
free to register with. The hash maps a string key to a procedure.
2) Tasks get stored to the 'tasks' table in the DB as a JSONB blob of
the form (e.g.): { "function":
If you want to go this way (and I suspect that there may be a better way),
rather than using eval, I would look at serial-lambda from
web-server/lang/serial-lambda, which lets you create closures (like the
values produced by lambda) that could be put into a TEXT field using
serialize and write.
On 10/28/2016 08:21 PM, David Storrs wrote:
> Is it possible to take (e.g.) a procedure object and decompose it back
> into its original source code?
I don't believe this is possible without murky unsafe programming, but...
> One (bad) idea that came to mind was to simply shove some Racket code
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
4 matches
Mail list logo