Or
<@,."1]2 comb 6
Thanks,
--
Raul
On Sun, Nov 26, 2017 at 10:56 PM, Joey K Tuttle wrote:
> Or -
>
>,.&.> <"1 ] 2 comb 6
>
>
>> On 2017Nov 26, at 19:30, Brian Schott wrote:
>>
>> 2 <@:|:@:,:"1@:comb 6
>>
>> On Sun, Nov 26, 2017 at 10:21 PM, 'Skip Cave' via Programming <
>> programm...
hostcmd_j_ solves it by putting the argument in parenthesis before
handing it off to the shell interpreter.
Those parenthesis mean that their contents are handled in another
process. So the redirects that J engine adds to the command line
happen in the parent process and the redirects introduced b
In j805 2!:0 always failed for this both on linux and mac, On j806,
change had been made on the linux branch but not on mac. The code
starts from line 42 of
the file xh.c
https://github.com/jsoftware/jsource/blob/master/jsrc/xh.c
note the command passed to 2!:0 is appended with redirection for a t
It took me a while, but here is an explicit version of your solution:
sper=:>@(#~(-: ~.)@>)@,@{@($ <@i.)
sper2=: 13 :'>((-: ~.)@>,{x$mailto:programming-boun...@forums.jsoftware.com] On Behalf
Of robert therriault
Sent: Monday, November 20, 2017 3:23 AM
To: programm...@jsoftware.com
Subject: Re
Many thanks. The expression
hostcmd_j_ =: [: 2!:0 '(' , ,&' || true)'
solves the problem I had with just 2!:0. But is there an explination
why an exprssion of the form 2!:0 'foo.exe outfile' should
work on some machines and fail on others, when both are running the
same version of J? I'm afr
Or -
,.&.> <"1 ] 2 comb 6
> On 2017Nov 26, at 19:30, Brian Schott wrote:
>
> 2 <@:|:@:,:"1@:comb 6
>
> On Sun, Nov 26, 2017 at 10:21 PM, 'Skip Cave' via Programming <
> programm...@jsoftware.com> wrote:
>
>> Combination of 6 items taken 2 at a time:
>>
>> comb=: ((= +/"1) |.@:I.@# ]) #:@
2 <@:|:@:,:"1@:comb 6
On Sun, Nov 26, 2017 at 10:21 PM, 'Skip Cave' via Programming <
programm...@jsoftware.com> wrote:
> Combination of 6 items taken 2 at a time:
>
> comb=: ((= +/"1) |.@:I.@# ]) #:@i.@(2&^)
>
> |: 2 comb 6
>
> 0 0 0 0 0 1 1 1 1 2 2 2 3 3 4
>
> 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5
>
Combination of 6 items taken 2 at a time:
comb=: ((= +/"1) |.@:I.@# ]) #:@i.@(2&^)
|: 2 comb 6
0 0 0 0 0 1 1 1 1 2 2 2 3 3 4
1 2 3 4 5 2 3 4 5 3 4 5 4 5 5
How can I box each column with the vertical pair of numbers in each box?
Skip
You don't really mean that. ;)
A function is a relationship between argument and result where there's
each argument has exactly one result. So a function of no arguments
would have no result. Or, if we are being generous, we could declare
that it has a constant argument (and, thus, a constant resu
Nope, functions must have an argument. The normal idiom when calling a
niladic function is to use '' (empty string) as the argument, since it's
easy to type and doesn't require surrounding spaces.
Henry Rich
On 11/26/2017 12:42 PM, Andrew Dabrowski wrote:
Is it possible to define a nullary fu
Is it possible to define a nullary function in J? In other languages
they're sometimes convenient, for example a function that returns a
random element. It's a bit awkward to have to use a dummy argument, like
randdie =: 1 + ? @: 6:
which must be called like
randdie 0
and when used in a ta
When using jqt, there is no standard screen output on J session term. But
should be there if running under jconsole.
On Nov 26, 2017 4:06 AM, "J. Patrick Harrington" wrote:
> Sorry, I meant "returning with no screen output'
> I am now running the full program with hostcmd_j_ for 2!:0.
> It's ch
12 matches
Mail list logo