« first day (1854 days earlier)      last day (1097 days later) » 

00:07
if I get a binary pattern 0 0 1 1 0 1 1 and 1 2 3 4 5 6 7 how can I get (1 2)(3 4)(5)(6 7)?
@LdBeth So you want to group by runs of identical elements, i.e. cut on pair-wise inequality?
⋄ 0 0 1 1 0 1 1 {⍵⊂⍨1,2≠/⍺} 1 2 3 4 5 6 7
@Adám
┌───┬───┬─┬───┐
│1 2│3 4│5│6 7│
└───┴───┴─┴───┘
@Adám I thought about 2≠/ but forget the , thanks!
 
3 hours later…
03:05
Would it make sense to think of 1 1⍉m as extracting the diagonal of the matrix because if you "average out" the vertical and horizontal axes, you get a diagonal "axis"?
As in, the vertical and horizontal axes intersect at a 90° angle, and half of that is 45°?
03:48
CMP (Chat Mini Poll): What do you find inconsistent / weird / irritating / want to change the language...with Dyalog APL?
04:24
@PyGamer0 I want do transformation on coordinate like image[x,y]←image[cos x, sin y] but figure it not easy to be done generically in APL
And I hope and can match J's behavior by operating on the first rank by default. but that's a minor one.
04:57
How do you print large values without them turning into scientific notation?
@Perigord by modify ⎕pp
05:47
@Perigord Dyadic will do that.
@LdBeth That would make them inconsistent with +.×
 
2 hours later…
08:12
@PyGamer0 i wish you could do "⎕WC -?" to get a list of examples, similar to what you see in aplcart. you can do this with ] but not ⎕ which is pretty annoying imo. i dont think you can do it with ) either
@PyGamer0 k-style dicts would be a neat addition
what do yall think about not being able to use / in trains without doing something like ⊢⍤/
08:46
@PyGamer0 ^ are all additions. I'd like the . operator split up into . for namespaces, a dyadic operator (maybe ˙) for inner product, and a monadic operator (not sure what glyph) for outer product.
i'd love to see alternant natively in Dyalog.
-.× mat to compute the determinant, how cool is that?
That's a consistent extension (as in NARS2000 and SHARP APL).
@PyGamer0 I think I'd like APL2's inner product, though, and make reductions apply to major cells.
09:10
@Adám yeah i have seen that and i wanted to ask about the depth operator
what does the depth operator do? is it similar to BQN's depth modifier?
Identical.
hm ok
ill need to learn the rank operator and depth operator then
so depth operator is a generalized each
09:31
@PyGamer0 rank is a force multiplier for your apl xpqz.github.io/learnapl/rank.html
> So given a complex vector that contains a variety of scalars and higher-rank arrays, you can’t use the Rank operator to selectively apply a function to, say, just the vectors.
^ can the depth operator do that?
yes
so does rank pairs arguments uptill a specified rank?
like 1 2 3+⍤0 99⊢4 5 6 is (1 + 4 5 6)(2 + 4 5 6)(3 + 4 5 6)?
Almost
     1 2 3+⍤0 99⊢4 5 6
5 6 7
6 7 8
7 8 9
@xpqz what else does it do?
09:39
You got the pairing correct, but not the rank of the result.
oh
the result has the rank 2
How about this:
      1 2 3+⍤¯1 1⊢3 3⍴⍳9
 2  3  4
 6  7  8
10 11 12
Negative rank is relative: it means "subtract from rank of argument"
i think ↑(1+1 2 3)(2+4 5 6)(3+7 8 9)
@PyGamer0 Here's what the Dyalog docs say: "The sub-arrays of R are the results of the individual applications of f. If these results differ in rank or shape, they are extended to a common rank and shape in the manner of Mix. See Mix."
You can test drive this: xpqz.github.io/cultivations/Rank.html
@PyGamer0 Correct
@xpqz i got the the first rank drill right yay
although how will the rank's result's rank is decided?
09:55
It's basically like you suspected
10:41
there seems to be a glitch with the ride editor. it seems to be adding and deleting spaces before the line when pasting stuff in
it's been a thing for years now i think
i fixed it in my own fork
oo link?
i didn't publish the patch
ah alright. i think ill just live with it then
@KamilaSzewczyk Did you log the bug? Maybe make a PR?
10:45
i didn't
it's related to indentation width
notice how enter after brace gives you a bigger indent than what a paste results in
and when you paste on successive lines, the formatting doesn't occur
indentation in RIDE is in general broken beyond recognition.
e.g.
 f←{
     ⍝ ok
when I press enter after typing this comment, it doesn't indent the following line for me on stock RIDE.
11:37
@KamilaSzewczyk 4.4?
IDE:
  Version: 4.4.3
  Platform: Linux x86_64
  Date: 2021-07-03 16:13:46 +0200
  Git commit: acb4b1d280380834a8021f04aec965fb4e486f68
  Preferences:{
    "colourScheme":"Dracula",
    "kbdLocale":"en_US",
    "lbarOrder":"← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤⍥@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬ ⍭√⍛⍢⍍…⍙⍗⍐φ⍦⍁⍮Φ⍡⌂ ",
    "otherExe":"/usr/bin/dyalog",
    "wse":"1"
  }

Interpreter:
  Version: 18.0.40684
  Platform: Linux-64
  Edition: Unicode/64
  Date: Jun 19 2021 at 00:08:29
11:53
      ⎕io
0
      1 1 2 2 2 3 3 3[1≡2]
1
can someone explain to me whats happening?
oh no wait
AHHHHhhhhhhh
ah nevermind i get it now
 
1 hour later…
13:10
      {↑(∪⍵)(+/¨(1+⍳⌈/⍵)=⊆⍵)}1 1 2 2 2 3 3 3
1 2 3
2 3 3
there has to be a better way to get count of unique elements right?
my way is really inelegent :/
(this is with ⎕io←0)
⎕←⍉ ,∘≢⌸ 1 1 2 2 2 3 3 3 ⊣ ⎕IO←0
@dzaima
1 2 3
2 3 3
wow thats awesome. thanks :O
A naive question: How could one merge two in parallel developed versions of a workspace (besides the new Link+git approach)?
 
1 hour later…
14:40
Any reason for not using LINK?
14:57
@ZtA0 Maybe have a look at ]ws.compare?
 
2 hours later…
16:46
would the method for matching parenthesis work well on things like " that are symmetric and no nesting allowed?
@LdBeth You could use it, but with alternating weights of 1 and ¯1, however, it is simply ≠\, e.g. ⋄ s↑⍤,⍥⊂(⊢∨≠\)'"'=s←'"this" is a "word"' and ⋄ s↑⍤,⍥⊂(⊢∨≠\)'"'=s←'is "this" is a "word"?'
@Adám
" t h i s "   i s   a   " w o r d "
1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1
i s   " t h i s "   i s   a   " w o r d " ?
0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0
17:14
@Adám thanks, it looks easier than what I though
@Adám Thanks, I will take a look.
17:49
@LdBeth Some limitation on the WS I have to work with. Nothing wrong about LINK.
18:01
@Adám What if it is shell style string delimiter? i.e. echo '"' "''" gives " ''
18:16
@LdBeth Then I think you need a state machine.
18:28
Can anyone help a J newbie? I'm trying to turn this phrase into a tacit function so that the string is not hardcoded. ({:-{.)a.i.'Hello World!'
I tried ({:-{.)@:a.i. and ({:-{.)@:a.&i. but those aren't working
18:48
@chunes ({:-{.)@(a.i.])
in APL it is (⊃∘⌽-⊃)⍤(⎕av⍳⊢)
or it is ⋄ (⊃∘⌽-⊃)⍤⎕ucs ⊢'Hello World!' to get the same result
@LdBeth ¯39
Thank you! I will give this a study
it means "convert the string to ASCII number, and get the value of last one minus the first one`
19:05
yeah I was able to figure it out if I'm starting from a known value, I just haven't grokked all the composition and whatnot that is necessary to turn it into a function
@Adám Oh wow, ↑⍤,⍥⊂ is nice. I think I like it better than ,[.5]
Btw, gets highlighted in red in RIDE for me. Does anyone know why that's happening?
It is due to RIDE haven't been updated to recognize the new operators, but it seems already fixed in the latest RIDE version, not yet installed into the current Dyalog release though
I see. Thanks!
@chunes have you get this reference card? code.jsoftware.com/wiki/…
19:26
Thank you, didn't know about that
19:38
@hyper-neutrino Can you give chat.stackexchange.com/users/540959/user1150494 access?
@user18281848 Hi Victor Kurilyak, if you want to participate here, please email [email protected]
@Adám done
Quick!
i actually heard the ping this time lol
@user1150494 Welcome to the APL Orchard. Since you're new to Stack Exchange chat, I recommend familiarising yourself with apl.wiki/APL_Orchard#Features
19:59
Where can I find the solution to the contest of 2017?
that reminds me, any eta on when the next contest will start @Adám ?
Guess would be in summer
20:19
@rak1507 Middle of next month.
@MasterQuiz We don't publish official solutions.
@Adám And I suppose there aren't either unofficial ones? Cause I needed the Geometry Set
20:36
@Adám ah cool
 
1 hour later…
21:39
Trying to make the folowing dfn tacit
{⍵/⍨~⍵=⌊⍵}
first part is working
(~⊢=⌊)
but second part not
(⊢/⍨~⍤⊢=⌊)
yeah slashes do that
it wants to be ((⊢/)⍨~⍤⊢=⌊), i.e. right-tack-reduce
you have to do (/⍨) or ⊢⍤/⍨ to force it to be a function
otherwise it is treated like a dyadic function?
sorry, meant a 3-train
By default slashes are treated as a monadic operator in trains. You want it to be a function
oh, also ~⍤⊢=⌊ should be ~⍤(⊢=⌊) (at which point (~⊢=⌊) is shorter)
or (⊢(/⍨)∘~⊢=⌊)
ok. thanks for helping. Still difficult
also, ~a=b is a≠b
21:47
@dzaima that should I have figured out myself, sorry.
22:25
Have you experienced the moment that "this is the longest APL program I've written so far"?
@LdBeth I have a problem solved with 21 lines in 5 functions. If I don't consider the GUI and the site written in APL
the problem I'm working on is having now over 60 lines with 5 auxiliary functions, and it is not yet fully solved. spoiler alert this is fo**********
@LdBeth I wasn't expecting to compete
22:54
Neither do I. I just feel something goes wrong, and I need to have a rest from it.
@LdBeth For some very complex problems I think it's legit to have a lot of lines

« first day (1854 days earlier)      last day (1097 days later) »