| that was kind of a rhetoric question. i was already pretty sure it would work. so the real question is what is actually needed. i found the call documentation. that's a good start, but that is pretty much what every other language also provides. what is still needed is a wrapper that allows me to write somestr: some command --with arguments
and have that string be populated with the "some" command output. but then we also need to capture stderr and the exit value, so we actually need to capture three return values. next, support for pipes in some form would also be needed.i have worked with lisp and smalltalk and also TCL so i am aware of course. with so many other interesting languages, it's hard to justify investing more time into learning Red in particular i actually find red in particular one of the more interesting languages. alongside lisp and smalltalk. haskell, erlang and ocaml are also interesting, but for shell use i am specifically looking at languages that use whitespace as an argument and value separator and which allow complex expressions to be written on one line, since that happens often in shell commands. that reduces the list of interesting languages quite a lot. if you know any others that you think are worth learning, please share. btw, your website seems to be down. |
I haven't used Red, but assuming this part works like Rebol, this works with different refinements. Create empty strings (which are mutable) and pass them in as extra args to populate them:
That command string is passed to a shell so pipes/etc work within it. Don't remember how it picks the shell so no idea what would happen if Red/Rebol was set as your shell.