[Jprogramming] evoke other applicaions

Joey K Tuttle jkt at qued.com
Sun Sep 2 06:03:55 HKT 2007


At 08:01  -0700 2007/05/24, Joey K Tuttle wrote:
>At 09:46  -0400 2007/05/24, Raul Miller wrote:
>>On 5/23/07, Joey K Tuttle <jkt at qued.com> wrote:
>>>In Unix/Linux/Darwin I find the following 2!: cover convenient/essential
>>>   host =: [: 2!:0 '(' , ' || true)' ,~ ]
>>
>>Does this do anything better than
>>   host0=: 2!:0 ::0:
>>?
>>
>Well, not that I can think of (Martin?) - just a way to get a
>result back from the j verb when the requested host expression
>failed. Yours is shorter and very nice - even a useful result
>if one checks for numeric result (impossible as a result of
>remote execution - I think) indicating an error. Maybe not as
>handy if building a result in jspace by catenating successive
>calls, but I don't remember ever doing that.
>
>Since the standard error comes back in addition to the
>ADverse result, I would be inclined to make the failure
>result 2: (or something other than 0 which usually indicates
>all ok -- but that it a minor matter of taste.)


After spending a few hours finding a bug in a production
application. I changed my mind about the numeric failure
code from a verb that normally returns a string (and had
previously returned an empty on remote failure). So even
though the more concise definition looks "nicer" I have
reverted to using my older/longer definition. As it turns
out, the standard error stream was useless too since the
error occurred in a CGI script...

- joey


More information about the Programming mailing list