« first day (1842 days earlier)      last day (805 days later) » 

2:10 AM
@Adám ⌊○ maybe?
maybe push the circle a but further down
 
3:05 AM
but does it really need a favicon?
 
 
3 hours later…
5:39 AM
@hyper-neutrino Can you get chat.stackexchange.com/users/539866/user18167503 access?
 
6:26 AM
@Adám done
 
Thanks. Now go sleep!
@user17912305 Hi shatha alzoubi. If you want to participate here, please email access@apl.chat
@user18167503 Hi Erik Friis, and welcome to the APL Orchard. Since you're new to Stack Exchange chat, I highly recommend having a look at apl.wiki/APL_Orchard#Features — also, feel free to introduce yourself.
 
 
4 hours later…
10:50 AM
@Adám 7s here
 
17s here :P
      Cmpr.Time '{⍵}⍣1e9⊢1'

17247.40533
 
do you need an APL licence for posting videos about it? it is theoretically for comercial use
 
11:16 AM
@BrianBED Do you charge money for viewing the videos? (Ad income doesn't count.)
 
12:13 PM
@Adám ah ok no you don't. i'm only thinking of ad revenue. ok so that's nice very good to know
 
I think Dyalog will be very happy if your APL videos become popular enough to earn more than €5000 in ad revenue per year…
 
1:14 PM
lol good to know. Definetly won't happen tho, i'm just considering it
i've made videos before but none that are actually useful
 
 
2 hours later…
3:06 PM
@Adám could you clarify this: chat.stackexchange.com/transcript/52405?m=53777679#53777679 ? I can't get those two expressions to give equivalent answers; what am I missing?
      +/(×\⌽1 0 1 1 1)×1 0 1 1 1

2

      ⊥⍨1 0 1 1 1

3
 
@xpqz It should be +/(⌽×\⌽1↓1 0 1 1 1,1)×1 0 1 1 1
(or any variation thereof)
 
Thank you
 
3:50 PM
you can
 
4:01 PM
Latest BAA webinar link

https://zoom.us/j/858532665
password: ×/1920 17 12
 
4:29 PM
Why is
((+/⊣≥⊢)÷∘≢⊢)
giving different results compared to
((+/⊣≥⊢)÷∘≢)
 
Are you using this function monadically or dyadically?
 
Dyadic
 
Also ⊣≥⊢can be ≥
 
sorry. small typo in the first one.
Yes thanks, that'w why I tried to skip the last ⊢
:60394159 Yes, but why can I not ommit the last ⊢
 
This function is hard to grep, I think (+/⊣≥⊢) has confused me. Is actually (+/⊢≥⊢) here.
@Richard Because then the train becomes an atop and not a fork - give me a moment to explain
 
4:36 PM
Why do we often need an additional level of enclosing of the arguments of ⌷ when using it to index things? I usually mess it up and then just throw in an enclose and it works, but that's not a satisfying approach so I'd like to understand it better.
I'm talking about expressions such as:
(⊂0 2 3)⌷'ABCDEF'
 
((+/⊣≥⊢)÷∘≢⊢) ≡ (+/ X ≥ Y) (÷∘≢) (X ⊢Y)
{((+/⊣≥⊢)÷∘≢) ≡ (+/⊢≥⊢) (X ÷∘≢ Y)
It takes a second to grok, but the main difference is ⊢ making the expression a 3-train which is interpreted as you intended
 
@FawnLocke I think I understand
 
What you want is (+/⍤≥÷≢⍤⊢) I'm fairly sure
 
@FawnLocke yes!
 
@taronish Y[X1;X2;…;Xn] ≡ X1 X2 … Xn⌷Y. Each element of X selects on the corresponding axis of Y. When you usually want to index on a single axis
 
4:44 PM
@FawnLocke Ahhh ... that helps a lot. Thank you.
 
Also @Richard your lamp box suggestion won 3rd place in the contest
 
Thats nice :)
 
5:26 PM
@taronish The reason you got from @FawnLocke is correct. That said, more often than not, {(⊂⍺)⌷⍵} is actually what people want, which is why I'm lobbying for that (actually, something a bit more capable than that, but equivalent in that case) to become a separate primitive:
 
5:42 PM
(please report any bugs)
 
5:55 PM
The following code was taken from
https://www.sharpplot.com/Languages.htm. It produces a nice unadorned
pie chart.
----
'InitCauseway'⎕CY'sharpplot'
InitCauseway''

sp←⎕NEW Causeway.SharpPlot
data←33 18 12 10
exp←0 0 0 20
key←'UK' 'France' 'Italy' 'Ireland'
sp.DrawPieChart(data exp)
svg←sp.RenderSvg Causeway.SvgMode.FixedAspect
3500⌶svg
----

But, the same code wrapped in a function fails:
----

fake_chart←{
sp←⎕NEW Causeway.SharpPlot
data←33 18 12 10
exp←0 0 0 20
key←'UK' 'France' 'Italy' 'Ireland'
 
you need to assign sp.DrawPieChart(data exp) to a temporary name, e.g. _←sp.DrawPieChart(data exp)
this is because dfns return after the first non-assignment expression
 
Sounds plausible, but:
InitCauseway''
svg←fake_chart⍬
VALUE ERROR: No result was provided when the context expected one
fake_chart[11] _←sp.DrawPieChart(data exp)
 
hm. that's kind of annoying.
you can't use the left tack trick here either
 
@KamilaSzewczyk Implying I know the left tack trick :).
 
5⊣anything will evaluate anything but in the end it will return 5.
useful for things like ⋄5⊣⎕←'hello'
 
6:04 PM
@KamilaSzewczyk
NOT PERMITTED: Illegal token
      5⊣⎕←'hello'
     ^
 
of course tryapl won't demonstrate it
honestly i have no idea how you should mitigate this other than using a tradfn
 
@bwanab The trick for this for dfn diehards is {6:: 0 ⋄ NoResultFooHere ⍵}
 
or well, handling an exception is one way to go about it
if the function throws this particular error it'll be silenced though
 
@PaulMansour That does work. Pretty ugly, though. I'll have to look into exception handling. Thanks to both of you.
 
Well the dfn wrapper is handling the error, so there is not much else you can do about it ( I think), except go to trad function, where, as noted, there will be no error, so nothing to handle.
I imagine the APL version of Causeway has a lot of functions that don't return results. If you want to stick to dfns, a little operator is quite handy and hides the ugly part.
 
6:23 PM
@PaulMansour An operator sounds like a good plan.
 
7:02 PM
@bwanab I thought Nic had fixed that. The same bug came up in the Cultivation. You can )copy dfns do and then use _←sp.DrawPieChart do data exp
 
7:31 PM
Ah, the "en passant" method is better than trapping the value error. I think I have even used the do operator somewhere and forgot about it. Clever.
 
OOoooo chess refrence
 
@Adám Thanks! Much more attractive.
 
I've written to Nic, asking him to fix this. It is trivial to do so. In fact, if I don't hear back from him, I might just do it myself. You can even do it: Just edit SharpPlot and add (shy) results to the needed functions.
 
 
2 hours later…
10:13 PM
 sigma←{
     ⍝ Sigma filter
     (rad thres)←⍺
     ⍝ ⍵ ← grayscale
     w←{,⍵}⌺(1+2×,⍨rad)⊢⍵
     m←thres≥|⍵(-⍤0 1)w
     ⌊(m×w)(÷⍥(+/))m
 }
Any styling issue in this function?
I notice I can make it one line by ⌊w(×÷⍥(+/)⊣)thres≥|⍵(-⍤0 1)w←{,⍵}⌺(1+2×2⍴rad)⊢⍵
 
10:40 PM
@LdBeth No need to parenthesise +⍥(+/)
 
⊢∘,⌺ is 1 character shorter, but not really an improvement
Almost the {,⍵}⌺(1+2×,⍨rad)⊢⍵ vs thres≥|⍵(-⍤0 1)w is inconsistent the latter could be thres≥|⍵-⍤0 1⊢w
Obviously small issues, I feel like a pedant :D
 
{,⍵}⌺ must be kept due to performance reason. though I'll take the ⊢ advice.
 
The last line could be w(⌊×÷⍥(+/)⊢)m if you're into a tacit style
 
yes. haven't wrote apl since a while, my brain get rusted
 

« first day (1842 days earlier)      last day (805 days later) »