Chris was talking about a function

12 views
Skip to first unread message

Phil Last

unread,
Jun 1, 2019, 5:01:24 PM6/1/19
to BAA London
R←A REP W;B;X;⎕IO
⎕IO←0
R←(X/W)[+\(⍳+/B)∊+\B←(X←×A)/A]
⍝ REPLICATE ASSUMING ONLY BOOLEAN COMPRESSION
⍝ W - VECTOR
⍝ A - CONFORMING INTEGER VECTOR
⍝ R - W REPLICATED ACCORDING W
⍝ PHIL 2019-06-01 20.38

This is probably more or less the function Chris was talking about yesterday. Caps an' all.

crishog

unread,
Jun 2, 2019, 12:41:49 PM6/2/19
to BAA London
Yup, that looks like the beastie - now I shall have to remember what Phil Chastney & I both wrote instead

crishog

unread,
Jun 2, 2019, 12:52:49 PM6/2/19
to BAA London
Probably
RB REP V;M
R←(,B∘.≥⍳M)/,⍉((M←⌈/B),⍴B)⍴V

(following Phil, I've put it in caps, as it would have been in VS/APL)

Phil Last

unread,
Jun 3, 2019, 3:20:50 AM6/3/19
to BAA London
∇CH∇
∇ R←B CH V;M;⎕IO
[1] ⎕IO←1
[2] R←(,B∘.≥⍳M)/,⍉((M←⌈/B),⍴B)⍴V

∇PL∇
∇ R←A PL W;B;X;⎕IO
[1] ⎕IO←0
[2] R←(X/W)[+\(⍳+/B)∊+\B←(X←×A)/A]

b←?100⍴10
cmpx 'b CH ⍳100' 'b PL ⍳100'
b CH ⍳100 → 3.8E¯6 | 0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
b PL ⍳100 → 4.8E¯6 | +25% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕


Perhaps you should've hired someone else?
Reply all
Reply to author
Forward
0 new messages