« first day (1891 days earlier)      last day (771 days later) » 

1:53 AM
How do you map the direction of a complex number to degree?
I guess it is 12∘○
 
2:21 AM
@Adám It is/was fixed in 18.0. Just implement the ⊢/ special code in reduce, and turn the idiom into a wrapper that calls that code.
 
2:57 AM
⋄ ((180÷○∘÷)12∘○)⍣¯1⊢90
 
@LdBeth 6.123233996E¯17J1
 
3:46 AM
8 hours ago, by Adám
I don't see how the replacement could be done, but I guess we could just add equivalent internal optimisations so future code would use that instead. However, the only benefit would be to make (silly?) things like dex/ faster.
 
4:14 AM
 res←l solve (t r);a;b;c;d;m
 ⍝ let l be a point on the line
 ⍝ t be the direction of the line
 ⍝ r be the radius from 0,0
 ⍝ solve the intersection
 ⍝ normalize t so 0=|t
 a b←9 11○¯11○×t
 c←+/(a b×9 11∘○)⍤1 0⊢l
 m←r>|c
 res←cׯ11○×t
 d←(r-⍥(×⍨)c)*÷2
 res+←m×d××t
Writing this thing is as hard as writing as math proof
⋄ -+12j¯2
 
@LdBeth ¯12J¯2
 
⋄ -12j¯2
 
@LdBeth ¯12J2
 
@Adám I remember I asked Is(⊃>⍥|⌽,)Js, but what could I do if I want something like that for Xm{?}Ym?
 
@LdBeth If performance doesn't matter, you could ⍤0 that.
⊣/>⍥|⌽,⍤0 should have better performance.
 
4:25 AM
thanks
 
@LdBeth {(⍵∘×+⍺×~)⍺>⍥|⍵} will probably have best performance.
 
4:40 AM
 j←l-res+d××t
 k←l-res+d×-×t
 res+←m×d×(¯1+2×j<⍥|k)××t
That makes me change the last line to this to pickup the point furthest from l
 
5:00 AM
@LdBeth I'd maybe do:
 s←×t
 e←d×s
 n←l-res
 j←n-e
 k←n+e
 res+←m×d×sׯ1+2×j<⍥|k
 
 
4 hours later…
8:54 AM
When using link, is there a way to tell RIDE to not display the full path in editor tabs and debugger windows?
I can't recall seeing it doing that before.
 
Yeah, that was just added as a feature missing in RIDE, present in the Windows IDE. I do think it can be turned off, though.
@xpqz "Include filename in editor title" in the preferences.
 
Hmm, I must be blind -- I can't see that option anywhere in preferences... under which heading is it?
 
9:10 AM
General>Other the very last option:
 
Not in mine.. must be a version issue.
 
The option to disable it was added recently. You should update to the latest 4.4 release.
 
9:28 AM
Right.
 
10:26 AM
@Adám is the last-but-one example on contest.dyalog.com/?goto=P22 correct? The one with the names. In my reading, the high minus is on the wrong axis to produce the output given.
 
@xpqz You mean this one?
      ¯3 ¯2.5 reshape2 'brian' 'adam' 'morten' 'michael'
┌───────┬──────┐
│       │      │
├───────┼──────┤
│michael│morten│
├───────┼──────┤
│adam   │brian │
└───────┴──────┘
Ah, no, this one:
      2 ¯2 reshape'Adam' 'Brian' 'Michael' 'Morten'
  ┌──────┬───────┐
  │Brian │Adam   │
  ├──────┼───────┤
  │Morten│Michael│
  └──────┴───────┘
 
No, it's my mistake; ignore me.
 
Yeah, it looks correct to me too :-)
 
 
3 hours later…
1:28 PM
I wish the actual ⍴ behaved like reshape2
 
 
3 hours later…
4:57 PM
is it possible to throw a spesific error message when using a function? for example instead of an arrow under the function, instead giving error to the spesific argument intputed? just as an example. i'd probably do some fun with it
unless... i could just detect the error and output a certain text...
 
@BrianBED I'm not sure I understand the question, but with error trapping (using ⎕TRAP or :Trap in tradfns or error guards in dfns) and ⎕SIGNAL, you can tailor the behavior in response to an error
 
5:13 PM
oh cool thanks
 
 
4 hours later…
9:12 PM
 
 
1 hour later…
10:30 PM
Well I'd say a good lesson APL has taught me is to understand the problem before writing any line of codes. These days too many people just started writing programs without knowing what they are doing.
 

« first day (1891 days earlier)      last day (771 days later) »