Re: [racket] Full command line arguments

2013-01-17 Thread Laurent
On Thu, Jan 17, 2013 at 8:30 AM, Eli Barzilay wrote: > A sandbox can be relatively expensive, but it should definitely be > much cheaper than a new process. > In terms of time, I guess so, but in terms of memory, since the old process dies, the only real cost is restarting time (which should be

Re: [racket] Full command line arguments

2013-01-16 Thread Eli Barzilay
11 hours ago, Laurent wrote: > > About sandboxes and custodians, this is also a nice and pure Racket > solution, but I'm a bit worried about the memory (and other?) > overhead that this might incur. Is this doubt justified? A sandbox can be relatively expensive, but it should definitely be much

Re: [racket] Full command line arguments

2013-01-16 Thread Laurent
Thank you all for all your answers! Nikolaus' seem to be simple enough (Linux world for now): (string-split (file->string "/proc/self/cmdline") "\u") gives me what I want. (FYI, the result of this in DrRacket is: '("/usr/bin/gracket" "-N" "/usr/bin/drracket" "-J" "DrRacket" "-l-" "drracket/dr

Re: [racket] Full command line arguments

2013-01-16 Thread Nikolaus Klepp
Am Mittwoch, 16. Januar 2013 schrieb Tony Garnock-Jones: > On 01/15/2013 05:40 AM, Laurent wrote: > > The purpose is to be able to relaunch the process. > > Another approach might be to create an outer wrapper which builds a > nested namespace, custodian etc, within which your program is > dynamic-

Re: [racket] Full command line arguments

2013-01-16 Thread Eli Barzilay
Two hours ago, Tony Garnock-Jones wrote: > On 01/15/2013 05:40 AM, Laurent wrote: > > The purpose is to be able to relaunch the process. > > Another approach might be to create an outer wrapper which builds a > nested namespace, custodian etc, within which your program is > dynamic-required. Sa

Re: [racket] Full command line arguments

2013-01-16 Thread Ray Racine
In the same vein, a Nanny which creates/destroys a local Place(s). Still not a full process restart however. On Wed, Jan 16, 2013 at 12:10 PM, Tony Garnock-Jones wrote: > On 01/16/2013 11:49 AM, Tony Garnock-Jones wrote: > >> Another approach might be to create an outer wrapper which builds a >

Re: [racket] Full command line arguments

2013-01-16 Thread Tony Garnock-Jones
On 01/16/2013 11:49 AM, Tony Garnock-Jones wrote: Another approach might be to create an outer wrapper which builds a nested namespace, custodian etc, within which your program is dynamic-required. Here's a simple example showing the basics: https://gist.github.com/4548874 Regards, Tony

Re: [racket] Full command line arguments

2013-01-16 Thread Tony Garnock-Jones
On 01/15/2013 05:40 AM, Laurent wrote: The purpose is to be able to relaunch the process. Another approach might be to create an outer wrapper which builds a nested namespace, custodian etc, within which your program is dynamic-required. That way, you can signal to the wrapper to destroy th

Re: [racket] Full command line arguments

2013-01-16 Thread Matthew Flatt
There's not currently a way to get the original command-line arguments. We could probably add something, but I'm not sure of the implications when, say, you're running a program within DrRacket. For a particular platform, there may be some way to get the original command-line arguments that you c