Re: [racket-users] Equivalent of exec

2021-08-05 Thread Norman Gray
Kieron, hello. On 4 Aug 2021, at 22:04, Kieron Hardy wrote: I’m surprised no one has mentioned Rash so I will ... perhaps Rash will be a useful tool for you ... https://docs.racket-lang.org/rash/ “2 Rash Guide ... Rash is a shell language embedded in Racket. “ Thanks for pointing this

Re: [racket-users] Equivalent of exec

2021-08-04 Thread Kieron Hardy
> started as a quick experiment with scsh a number of years ago, I’m surprised no one has mentioned Rash so I will ... perhaps Rash will be a useful tool for you ... https://docs.racket-lang.org/rash/ “2 Rash Guide ... Rash is a shell language embedded in Racket. “ https://rash-lang.org/

Re: [racket-users] Equivalent of exec

2021-08-04 Thread D. Ben Knoble
Hi Norman, > It's slightly unfortunate that Racket's > start-up time make it slightly suboptimal as a command-line tool, but > raco make helps with that. With 8.0+/CS, even without make I've had a good experience. As you say, setup or make makes things even faster, though. If you weren't

Re: [racket-users] Equivalent of exec

2021-08-04 Thread Norman Gray
Ben, hello. On 4 Aug 2021, at 16:45, D. Ben Knoble wrote: On a slightly unrelated note, if this for consumption by anyone other than just you, I would use (getenv "EDITOR") (or VISUAL, if you prefer) rather than hard-code the path to vi. An excellent point. In fact this is indeed a

Re: [racket-users] Equivalent of exec

2021-08-04 Thread D. Ben Knoble
> (exit (system*/exit-code "/usr/bin/vi" "filename")) On a slightly unrelated note, if this for consumption by anyone other than just you, I would use (getenv "EDITOR") (or VISUAL, if you prefer) rather than hard-code the path to vi. Best, D. Ben Knoble -- You received this message because

Re: [racket-users] Equivalent of exec

2021-08-04 Thread Norman Gray
Many thanks for your thoughts, George and Shu-Hung. Rather embarassingly, I've found my answer in what's almost the simplest subprocess procedure: (exit (system*/exit-code "/usr/bin/vi" "filename")) exhibits the behaviour I want. That does all the required plumbing flawlessly. I'm

Re: [racket-users] Equivalent of exec

2021-08-03 Thread Shu-Hung You
On Tue, Aug 3, 2021 at 1:13 PM George Neuner wrote: > > > On 8/3/2021 1:03 PM, Norman Gray wrote: > > On 3 Aug 2021, at 17:38, George Neuner wrote: > > > >> Racket is multi-platform and tries to present a common API for > >> dealing with underlying operating systems. Windows is an important > >>

Re: [racket-users] Equivalent of exec

2021-08-03 Thread George Neuner
On 8/3/2021 1:03 PM, Norman Gray wrote: On 3 Aug 2021, at 17:38, George Neuner wrote: Racket is multi-platform and tries to present a common API for dealing with underlying operating systems.  Windows is an important platform, but Windows does not have the concept of fork/exec ... so

Re: [racket-users] Equivalent of exec

2021-08-03 Thread Norman Gray
George, hello. On 3 Aug 2021, at 17:38, George Neuner wrote: Racket is multi-platform and tries to present a common API for dealing with underlying operating systems.  Windows is an important platform, but Windows does not have the concept of fork/exec ... so Racket doesn't offer it

Re: [racket-users] Equivalent of exec

2021-08-03 Thread George Neuner
On 8/3/2021 12:14 PM, Norman Gray wrote: Greetings. I can't find a way of doing something equivalent to exec in Racket.  Is this Hard, or am I just missing it? By 'exec', I mean the equivalent of replacing the process with a new image, as distinct from `system` (and friends) or `process`

[racket-users] Equivalent of exec

2021-08-03 Thread Norman Gray
Greetings. I can't find a way of doing something equivalent to exec in Racket. Is this Hard, or am I just missing it? By 'exec', I mean the equivalent of replacing the process with a new image, as distinct from `system` (and friends) or `process` (and friends), which are concerned with