Wow! brilliant solutions! It will take me a couple of days to parse through
these diverse approaches to solving the Digits problem. One of the aspects
of J that I appreciate the most is the wide range of creative approaches
that seem to materialize when multiple people use J to solve the same
probl
Variant on the cheat:
zz=.,10#.>{4#<>:i.6
4{.zz
1112 1113 1114
On Tue, Oct 3, 2017 at 11:24 PM, Roger Hui
wrote:
> V. nice.
>
> As they say, if you're not cheating you are not trying hard enough. :-)
>
>
> On Tue, Oct 3, 2017 at 8:21 PM, Cliff Reiter
> wrote:
>
> > A cheat (?) that
V. nice.
As they say, if you're not cheating you are not trying hard enough. :-)
On Tue, Oct 3, 2017 at 8:21 PM, Cliff Reiter wrote:
> A cheat (?) that builds instead of "removing"
>
>z=.,".>{4#<'123456'
>$z
> 1296
>10{.z
> 1112 1113 1114 1115 1116 1121 1122 1123 1124
>
>
> On
A cheat (?) that builds instead of "removing"
z=.,".>{4#<'123456'
$z
1296
10{.z
1112 1113 1114 1115 1116 1121 1122 1123 1124
On 10/3/2017 4:16 PM, Skip Cave wrote:
Another interesting Quora problem:
Given the integers from 1000 to , remove all integers that contain a 7,
8, 9
Let's take out the memory constraint factor first, say qrun with sentence
1e3. I am not sure running in different jqt instances is a good idea since
the range of 100 ports used by jcs is hardcoded and are the same for each
jqt.
On Oct 4, 2017 10:41 AM, "'Pascal Jasmin' via Programming" <
programm.
in a 4th jqt session, yes it hung on first run, though pretty far in.
I started getting memory errors (without hanging), at 80 80, and 22 22. I have
4 hung jqt sessions now, but any new one lets the others progress. Task
manager reports very low memory use.
99 11 finishes just fine. It seems
Did qrun 99 99 hang in the first run?
On Oct 4, 2017 9:16 AM, "'Pascal Jasmin' via Programming" <
programm...@jsoftware.com> wrote:
> qrun still hangs for me. Never on the first run though. In 5 of 6 tries,
> it hangs on the 3rd run. On other it hanged on 2nd run. 3rd parameter
> always 6.
>
>
qrun still hangs for me. Never on the first run though. In 5 of 6 tries, it
hangs on the 3rd run. On other it hanged on 2nd run. 3rd parameter always 6.
I don't think I ever breeched memory/swap issues in these or previous tests.
I found a way to unhang it though.
start 2nd jqt session, and
Carelessness on my part.
Thanks,
--
Raul
On Tue, Oct 3, 2017 at 4:54 PM, Roger Hui wrote:
> Why 1000+i.8999? 1000+i.6000 or 1000+i.9000 would make more sense.
>
>
> On Tue, Oct 3, 2017 at 1:48 PM, Raul Miller wrote:
>
>> Something like this?
>>
>>(#~ 1- +./@e.&'7890'@":"0) 1000+i.8999
>
10#.>:6 6 6 6#:i.6^4
On Tue, Oct 3, 2017 at 3:00 PM, Jimmy Gauvin wrote:
>ff=: 3 : '(0=+/"(1)7 8 9 0 e.~10 10 10 10 #: y)#y'
>
>$ff 1000+i.9000
>
> 1296
>
>$ff 1000+i.5667
>
> 1296
>
> On Tue, Oct 3, 2017 at 4:54 PM, Roger Hui
> wrote:
>
> > Why 1000+i.8999? 1000+i.6000 or 1000+
A few cosmetic changes and perhaps fixes for qrun and related task problems.
Note: qrun now defined in jcs/qrun.ijs
The main problem was that a task ending could have a delayed close of the
associated socket port and this could, depending on timing, prevent the
proper start of the next task tryin
I doubt you'll find a much faster J solution than:
,(+/~10&*)/ 4#,:>:i.6
or the uglier but slightly quicker
,+// (10<.@^i._4)*/>:i.6
Marshall
On Tue, Oct 03, 2017 at 03:16:41PM -0500, Skip Cave wrote:
> Another interesting Quora problem:
>
> Given the integers from 1000 to , remove all in
ff=: 3 : '(0=+/"(1)7 8 9 0 e.~10 10 10 10 #: y)#y'
$ff 1000+i.9000
1296
$ff 1000+i.5667
1296
On Tue, Oct 3, 2017 at 4:54 PM, Roger Hui wrote:
> Why 1000+i.8999? 1000+i.6000 or 1000+i.9000 would make more sense.
>
>
> On Tue, Oct 3, 2017 at 1:48 PM, Raul Miller wrote:
>
> > Somethi
Why 1000+i.8999? 1000+i.6000 or 1000+i.9000 would make more sense.
On Tue, Oct 3, 2017 at 1:48 PM, Raul Miller wrote:
> Something like this?
>
>(#~ 1- +./@e.&'7890'@":"0) 1000+i.8999
>
> Thanks,
>
> --
> Raul
>
>
> On Tue, Oct 3, 2017 at 4:16 PM, Skip Cave wrote:
> > Another interesting Q
Something like this?
(#~ 1- +./@e.&'7890'@":"0) 1000+i.8999
Thanks,
--
Raul
On Tue, Oct 3, 2017 at 4:16 PM, Skip Cave wrote:
> Another interesting Quora problem:
>
> Given the integers from 1000 to , remove all integers that contain a 7,
> 8, 9, or zero, and list the remaining integer
Another interesting Quora problem:
Given the integers from 1000 to , remove all integers that contain a 7,
8, 9, or zero, and list the remaining integers.
Skip
--
For information about J forums see http://www.jsoftware.com/fo
Here is another approach using __&q: to generate only unique factors due to
their unique prime factorisations:
factors=: (*/ . ^ [: |:@:>@,@{ <@i.@>:)/@(__&q:)
Cheers,
Louis
> On 3 Oct 2017, at 12:23, Erling Hellenäs wrote:
>
> Hi all!
>
> a=: 2 5 7
> f=: 1 :'/:~ (#: }. i.2^#y) u@# y
Fine approach. I've before taken this route:
factors =: [: */&> [: { [: <@powers"1 [: |: 2&p:
powers =: {. ^ i.@:>:@:{:
2 p: 360 NB. prime ,: count
2 3 5
3 2 1
(powers L:_1) 2 3 ; 3 2 ; 5 1 [ boxdraw_j_ 1
+---+-+---+
|1 2 4 8|1 3 9|1 5|
+---+-+---+
factor
Hi all!
a=: 2 5 7
f=: 1 :'/:~ (#: }. i.2^#y) u@# y'
+/f a
2 5 7 7 9 12 14
*/f a
2 5 7 10 14 35 70
Hi all !
a=: 2 5 7
f=: 1 : '/:~(#: }. i. 2 ^ # y) ([: u/ #) /"1 y'
+ f a
2 5 7 7 9 12 14
* f a
2 5 7 10 14 35 70
Cheers,
Erling
On 2017-10-02 19:45, Erling Hellenäs w
19 matches
Mail list logo