« first day (1211 days earlier)      last day (1444 days later) » 

12:00 AM
@Bubbler right, f is off-center anyways
 
@Bubbler I don't like that shape either. The horizontal alignment doesn't match though. Should I move X and Y closer or move f more to the left and stretch the curved arrow from g? Something else?
 
@Adám move X, leave the f→g arrow equal to all others. possibly then move everything left/right to taste
 
^ sounds good
 
Ugh, half-spaces…
 
Oh, didn't notice that
How does stretching f←g arrow look like?
 
12:08 AM
Here's with X and Y moved closer:
I think that looks too skinny.
 
@Adám it does. maybe the curved arrow was better. i had suspected this arrow would be a problem
 
@dzaima I had a version where the bend was aligned with the braces.
Stretched edition looks way out of balance. I could move it right:
Yeah, that's better:
I think I can go to sleep soon.
 
@Adám i think that's still better regardless of how weird that arrow is (really most of these are good, but we continued. almost 4 hours of a chat "mini" question..)
 
@dzaima OK, back to that, but with my aligned arrow:
I think I agree that this looks better.
 
Yeah, indeed it is.
 
12:25 AM
been looking at the two for a couple minutes. i think we're reaching the point of changes of almost no effect
or maybe i need to go sleep
 
I guess we can settle with the last one.
 
Alternative symbols for Atop:𝈛 Beside:𝈥 Reverse-compose:𝈑 Over:⑃
Thank you all for your extreme assistance here.
 
 
6 hours later…
RGS
6:34 AM
@Adám this was what you settled with?
 
6:45 AM
@RGS Yes. What do you think?
 
RGS
7:10 AM
@Adám it is a shame the curvy upward arrow from the X on beside isn't straight; other than that it has my stamp of approval.
Good job guys
 
@RGS Right, but we tried moving X and Y closer to each other which looks too skinny and stretching the g→f which looks lopsided. Any ideas?
 
RGS
7:26 AM
@Adám I don't want to cost you another 3 hours of dragging things around, really. I just gave my honest feedback regarding a very minor detail. If dragging all g slightly down doesn't fix the second diagram you sent me there, then I don't know what could be done :)
 
7:46 AM
@RGS I think it'd be very odd to not align all the gs vertically.
 
RGS
@Adám that is why I mentioned dragging all of them, so they stay aligned
Btw is it good practice to add and subtract some IOs here and there to make your code IO-independent, or should one just define IO at the top of his dfn?
 
Wait, isn't this identical to a phase 1 problem (modulo digit extraction)?
(Not that it is a problem since it predates the competition; just wondering if it's a pure coincidence...)
@RGS My choice is to use local ⎕IO at the top. Doing ⎕IO-adjustment will get ugly quickly if you need to do that multiple times.
 
RGS
8:08 AM
@Bubbler pretty much... except, as you notice, mine was posted earlier! Maybe I should sue Dyalog for stealing my ideas for challenges ⍥
 
@RGS Yeah, once at the the top, unless some utillity fn that may be pulled out of its context.
 
RGS
@Adám sounds reasonable, thanks
 
@RGS It seems you and Brian came up with it at about the same time.
 
RGS
@Adám :-) I'm not actually accusing you of anything
 
I know. It is just a funny coincidence.
@RGS I think that'd make ⍤ very cramped, as the curvatures of ⍤'s X→g←Y and ⍥'s g→f←g are currently identical.
 
RGS
8:16 AM
@Adám what about pushing the fs upwards?
 
@RGS You mean to just stretch the whole diagram vertically?
 
RGS
@Adám kind of; the horizontal line where all the X, Y lay and the horizontal line where all the g lay should stay the same. Only drag a bit the horizontal line by which the f are aligned
(probably dragging the R by the same distance, otherwise the f and the R become too close)
 
Currently, the R, f, g, and XY lines have equal spacing, but maybe that doesn't matter?
 
RGS
@Adám it matters for sure, it just boils down to what weighs more aesthetically; that equal spacing, the curved arrow from X to f on beside or maybe pushing the f slightly up and leaving the R where they are (to make more room for the arrows on beside, while maybe there's no need for such a long arrow from all f to the R)
 
> the curvatures of ⍤'s X→g←Y and ⍥'s g→f←g are currently identical.
@Adám This was false.
I think I can make a nicer curve for ∘'s X→f
 
RGS
8:26 AM
@Adám +← 1
 
RGS
8:40 AM
If I want to do a series of heterogeneous indexings will I have to do it for each ¨ set of indices I have..? I was trying to do it in an array oriented way but failed to do so
 
@RGS Better?
user image
3
 
@RGS You mean like choose? array[(i j k)(a b c)(d e f)]? or you might get some mileage with ⌷⍤ squad with rank
 
RGS
@Adám +← 1
@RichardPark the array[(...)(...)(...)] doesn't work because what I have is a vector into which I want to index several times to extract several portions of it
Will have to have a look at ⌷⍤, thanks :) I know you hosted a webinar on these sorts of things :P maybe I'll rewatch it
 
9:00 AM
If the portions all have the same dimensions, you can ⌷⍤ to get a result with rank +1 and then split it, I don't know if you're trying to assign each portion to a different variable or if you want one variable which consists of the total selection of all the portions together
 
RGS
@RichardPark the "heterogeneous" in my description was precisely because the portions do not have the same size ⍥
something weird like ({(⊃⍵)[⊃⍺]}⍤0 0) works, if the indices are on the left and the vector (enclosed) on the right
 
@RGS That's essentially an ¨. Could you give us some sample data?
 
RGS
dummy e.g. (0) (0 1) (0 1 2) f (⍳5) should give (0) (0 1) (0 1 2) (assuming ⎕IO←0)
 
OK, that's not very good test data: f←⊣ ;-)
 
RGS
maybe this can't be done without ¨; I haven't honed my senses enough to know when a ¨ is really due or when I'm just missing smth
@Adám (0) (0 1) (0 1 2) f ⎕A gives 'A' 'AB' 'ABC'
 
9:11 AM
@RGS f←(⊂⌷)⍤0 1
 
RGS
@RGS (0) (0 1) (0 1 2) f ⌽⎕A gives 'Z' 'ZY' 'ZYX'
@Adám +← 1
what is going on with the ⊂⌷ ?
 
@RGS Normally, will mix the results, but you want enclosures.
 
RGS
Ah so ⊂⌷ is working as an atop?
 
@RGS It is an atop, but I assume you don't have f⍤g available. Otherwise you could indeed write ⊂⍤⌷⍤0 1
 
RGS
alright, thanks!
I have another question but this one is related to Windows and your keyboard
 
9:22 AM
Go ahead.
 
RGS
For a couple of days I managed to only have your keyboard layout active. but all of a sudden, yesterday I think, a standard US layout and a portuguese layout became active, in that I can use Windows key+spacebar to cycle through those as well... but when I go to my keyboard settings, they aren't active there and so I can't really deactivate them ¯\(⍨)/¯
 
@RGS I know. With one of the recent updates to Windows 10, it has begun to occasionally (maybe when updating) installing unsolicited keyboard layouts that it thinks you want. Lots of people with mismatched language settings/physical keyboards/active layouts complain about this. The only solution I've found is to manually add the keyboards it stealthily added, then remove them. You might need to log out and back in before/between/after these steps.
 
RGS
ok thanks... I understand why Windows thinks I want those layouts, by inspecting some of my other settings... but pls, I'm a grown up, I know what I'm doing :-P
 
Windows 10: Windows 7 for dummies
They are trying to take our control panel away, they disabled the ability to stop updates, they "allow" file writes to system folders but secretly redirect them to cover folders, etc. etc.
 
RGS
9:39 AM
@Adám does that mean I should be worried..?
 
10:11 AM
@ab5tract Thanks, gotta have easter eggs for my true fans ;)
 
 
3 hours later…
12:57 PM
@Adám - That redirect thing is particularly nasty, in that if you have a redirected write followed by a read, it will read the actual protected folder, not the redirect.
 
@JeffZeitlin Yes, we've been bitten by that.
 
I've been bitten by that more than once...
It's actually one of the reasons I made the suggestion about the Start In for the Dyalog shortcut on Windows...
 
1:39 PM
@Adám I was thinking of possible future APL cultivation session subjects. Something interesting is using APL to implement well known data structures or algorithms. Like a B+ tree or hash & hash map. Probably could focus on a single "fundamental" topic.
Like I did a savitzky golay filter in APL and it turned out to be very simple to implement.
 
@cannadayr Nice. Now if only I knew of those things… Would you be interested in planning a lesson together?
 
hah I could be. It might take me some time to work out an implementation w/ the amount of free time I have.
 
RGS
1:52 PM
Yesterday @xpqz taught me that I can hit ctrl+shift+backspace to cycle back on the things I typed in my dyalog interpreter
is there a way to cycle forward? the sensible variations I came up with didn't work
 
Ctrl+Shift+Enter.
 
RGS
Thanks!
 
Also, you can choose different combos for these in the settings.
 
RGS
@Adám I think the combos are decent; it was just a matter of knowing there were combos for these actions
 
Another really useful one is if you've entered something but want to start over with a blank line, or you've modified a line in the session but want to restore it: Shift+Esc.
 
1:56 PM
@Adám anything similar for the terminal version?
 
RGS
These shortcuts are gold
 
RGS
2:16 PM
@Adám I restarted my laptop because I was going to install and uninstall the unwanted layouts... now the unwanted layouts aren't here
 
@RGS Also: control-enter opens the debugger on your expression.
 
RGS
@xpqz when where? inside my interpreter hitting ctrl+enter evaluates the line I'm at
 
In RIDE I evaluate a line by just hitting Enter: 1+1 <enter>
 
RGS
@xpqz same here; what I mean is that ctrl+enter still only evaluates the line I'm at
 
If you hover over the keyboard symbol in the upper-right, what does it say for "trace"?
I also bound command-s to "fix" for my own sanity.
Not figured out yet if it's possible to also make a double-click behave like normal, rather than opening a new edit window.
 
2:25 PM
@RGS You can only trace into multi-line functions.
Another neat one: Shift+Enter to edit the name that the caret is on.
 
Ah, nice!
 
And if you ever use tradfns where you have to localise names, Ctrl+Up is a lifesaver.
 
What does that do, automatically add a ";varname" to the top?
 
RGS
@Adám But I don't understand how i'm supposed to trigger this behaviour
 
@RGS E.g. )copy dfns cal<Enter>cal 2020 5<Ctrl>+<Enter>
@xpqz Yes, or removes it if already there.
 
RGS
2:41 PM
@Adám func ← {a ← ⍵+1 ⋄ b ← a+1 ⋄ b} <Enter> func 5 <Ctrl>+<Enter> doesn't trigger that behaviour why? because I actually defined func inline..?
 
Single line
Make it span three and it works.
(remove diamonds)
 
RGS
@Adám btw it doesn't work xD it gives an error, VALUE ERROR: Undefined name: days
 
@RGS It doesn't trace into the function? (I know it won't run because you didn't copy its dependency.)
 
RGS
@Adám oh ok; it traced into the function alright, what didn't work was the function
 
3:37 PM
As far as I know, there's no way to do this. But just thought I'd double check as it'd make my code much neater were it possible: Can one do an outer product such that each element was paired up with another only once? It wouldn't make much sense as an array, because it'd stop on the diagonal. But something like this:
1 1 1 1 1 0
1 1 1 1 0 0
1 1 1 0 0 0
1 1 0 0 0 0
1 0 0 0 0 0
0 0 0 0 0 0

or:

1 1 1 1 1 1
1 1 1 1 1 0
1 1 1 1 0 0
1 1 1 0 0 0
1 1 0 0 0 0
1 0 0 0 0 0
 
RGS
Can you define better what "each element was paired up with another only once"?
 
If not, is there an easier way to mask an array than to un & re ravel? (Found nothing on APLCart)
@RGS Yeah, sorry. I knew it was a terribly shoddy explanation; didn't really even try for it to make sense!
I'd hoped the pictures would do the explaining!
 
RGS
from your boolean matrix, if I were to do, say, ∘.,⍨ ⍳6 then you can see that the first row is where the first element in ⍳6 is combined with all elements
 
Everywhere that there are 1s, the two elements should be matched up. Everywhere that there are 0s, they shouldn't
 
RGS
@AviF.S. then you probably mean these masks:
1 1 1 1
0 1 1 1
0 0 1 1
0 0 0 1

or

0 1 1 1
0 0 1 1
0 0 0 1
0 0 0 0
 
RGS
@RichardPark yup but notice how your mask is not the same as Avi's
 
@RGS Do I? That's very possible! I didn't think very carefully about which way to orient the diagonals
But for instance (⍳6) ∘.f ⍳6, the 1 should match up with the 2 only one time. Regardless of the order
 
RGS
@AviF.S. check "extract upper" on APL Cart
I added those entries myself a couple of days ago
 
So if I have a commutative function f, every value should compute only once
@RGS Really? Thanks a bunch! Will do :)
 
RGS
@AviF.S. yup, so you had it the wrong way :) you essentially want a triangular matrix, either upper or lower
 
3:43 PM
Yeah, you're right! That's exactly what I want!
I was going to say that, but then I got afraid I was making up the word!
Linear algebra was 2 years ago, which feels like forever, haha!
 
RGS
But notice the entries I linked extract the values after they have been computed
 
Yes! That was my follow-up
So there's no way to do an outer product type thing where each pair of values is paired up only once/
 
RGS
If you really want to prevent computation, something different has to be done... e.g. you could pair up all the arguments, mask to only get the ones worth computing, and then only feeding those into your func
 
I'm translating some J to APL and came up with ↑ 1 2 3 + ⊂1 2 3 4 5 as a replacement for J's behavior in the expression 1 2 3 /+ 1 2 3 4 5. I'm sure there are nicer ways to express this but I'm having trouble coming up with any. I'm not much of a math person so I wasn't quite sure what to search for on APL Cart. Any suggestions?
 
To start, you can use an atop to isolate functionality!
 
3:46 PM
@AviF.S. Something like ,{⍺ ⍺⍺¨¨,\⍵}⍨⍳6?
 
↑ 1 2 3 + ⊂1 2 3 4 5 = 1 2 3 (↑+) ⊂1 2 3 4 5
 
@ab5tract Uh, 1 2 3 /+ 1 2 3 4 5 is an error for me in J901. Do you mean 1 2 3 +/ 1 2 3 4 5?
 
@RGS Thanks! Good idea!
 
Interesting. This is an example from Keith Smillie's book: webdocs.cs.ualberta.ca/~smillie/RevisedTopics/TopicsRev.html
 
@Adám Trying to figure out what that means...
 
3:48 PM
Sorry, I got that wrong
+/ of course
 
That's simply ∘.+ in APL.
 
/ becomes table when used dyadically
 
Re outer: That's funny! That's just what we're talking about
 
(this is from chapter 0)
 
Yes, and ∘.f is f-table.
@AviF.S. What do you want the shape of the result to be?
 
3:51 PM
A matrix would be really nice! Just with the other elements not calculated set to some arbitrary value!
Probably 0
 
@AviF.S. +{↑⍺ ⍺⍺¨,\⍵}⍨⍳6
 
I'll try it out, thanks!
 
@ab5tract If you don't like the ∘.f syntax, you can also use f⍤0 1 which is exactly the same as J's f"0 1
 
Ah yes, I see!
 
@Adám I wasn't quite sure how to get jot to work for me so an example would be much appreciated.
 
3:54 PM
@Adám My freaking goodness!!! That's absolutely brilliant!! How does anyone come up with that!! Thanks a million; wow :)
 
RGS
why does ⍴⊂1 2 3 return ⍬ ..?
 
@RGS Because monadic makes anything into a scalar. Scalars have no axes.
 
RGS
@Adám right... sometimes that's upsetting
 
@ab5tract Here.
@RGS What is upsetting?
 
@Adám Why are you linking to TryAPL rather than TIO? Isn't TIO the new recommended web one, or not always?
 
RGS
3:56 PM
@Adám sometimes the ⍬ ≡ ⍴ scalar throws me off my game
 
@AviF.S. Both are fine. TryAPL encourages experimenting more, I think.
@RGS How could it be anything else? Are you maybe in need of monadic ?
 
Good point, I forgot it's a REPL which certainly does do that! I was thinking more along the lines that it doesn't allow ⍎ and thus seemed inferior.
@Adám Not sure how strict the contest rules are... Am I allowed to use your suggestion for Part 2, or shall I come up with something else that's entirely mine?
 
Ah, thank you @Adám! I saw that while digging through APL Cart and just couldn't recognize that what I was looking for was the outer product.
 
@AviF.S. It now has a limited but really, what are you doing needing ?
@ab5tract You need the inverse of this.
 
Great resource that should allow some reduction in annoying questions from me here :D
 
RGS
4:00 PM
@Adám right... it didn't click that ⍴ and ≢ are really different things
 
@ab5tract If you're up for it, you could add the inverse page to APL Wiki!
 
@Adám 🤫 Nothing...
 
@AviF.S. Nah, it is fine. You asked a general enough question.
 
Definitely not up to it at this stage but translating all the examples in Keith's book will be a good start I think.
 
@Adám Alright, thanks! Will credit you in a comment though, if I use it!
 
4:03 PM
OK.
 
RGS
@AviF.S. I'm gonna credit Adám in a comment in every line of APL code I write xD
 
@RGS Hahahahaah, true, true & true!!
 
I was kind of proud about figuring out a train equivalent of J's #,+/. That is, (≢⊢),(+/⊢)
eek, that period looks more important than it should: #,+/
 
@RGS @ab5tract Are you also working on the contest?
 
@ab5tract How about a literal transcription? ≢,+/
 
RGS
4:05 PM
@AviF.S. sure am :)
 
 
@RGS Awesome! Wahoo; best of luck! Expect to see your name on the list this year :) Maybe even at the conference...
 
@ab5tract (f g) is an Atop (like J's f@g) and is J's ] so it is just extra no-ops.
 
RGS
@AviF.S. the conference this year is in my country! The probability of going regardless of the result of the competition is very high
Best of lucks to you too
 
@RGS Haha, I saw!! And a relatively small country it is! How neat
 
4:08 PM
I'm still worried that COVID-19 will affect the user meeting ⍤
 
@RGS Only bummer's if you win, then you don't have an excuse to go somewhere exotic :p
 
I get different results for the two examples. I wish TIO would provide a quick URL shortening option...
 
@Adám Probably will...
 
@Adám Random question: Wondering about doing APL Cultivations on Zoom?
 
4:10 PM
@ab5tract If you press shift-enter, SE chat will allow you to post long urls.
 
Parens change everything :)
That's awesome. I'm still proud of all that effort I put into accomplishing nothing though ;)
 
@AviF.S. BAA has a webinar on Zoom every other week, and people can come early and leave late to discuss off-topic stuff, but I don't see how the format works. The chat doesn't handle code neatly.
 
British APL Association?
I'd no idea!
 
(and thanks for the SE tip, that is definitely going to come in handy!)
 
Ah, so the issue is with the chat?
I'd be surprised if Microsoft Teams and other such similar softwares meant for that sort of thing, didn't have MD enabled in the chat...
 
RGS
4:14 PM
@Adám me too :(
@AviF.S. I'd love to win but I don't know if I'll be able to compete for the prize :)
 
Also, perhaps just having the Zoom for audio+video would be possible, but we'd still use this chat for the code & bot?
 
Just occurred to me as a potential way to get more people active in the meetings!
@Adám Ah thanks!
 
@AviF.S. Well, the bot died of COVID-19 too.
 
Haha, I know!!
 
4:16 PM
I'm currently experimenting with setting up an APL or Dyalog community on TopAnswers. They already have a lot of goodies ready for us.
 
Because if there were audio+video on top of the chat, it'd be 'easier' to stay engaged and pay attention; just like it's 'easier' to sit through a lecture or watch a movie than read a book
Because I noticed that people seem to come in and out of the room, even during the Cultivation, which I have been guilty of myself when I get distracted by testing the code people are writing...
So anyway, just thought the retention level might be higher, and excitement might be higher!
 
E.g. APL chat bot, syntax colouring, you can choose which APL font to use (with all the good ones available), TIO integration in posts, MathJax even in chat…
Maybe we can do something else. How about a general APL meetup on Zoom on the weeks where there's no Cultivation?
People can bring their problems, discuss stuff, etc.
 
RGS
@Adám That could be really interesting
 
Anyway, I've got to go for now. Time to prepare food for the family.
 
@Adám Oh no! You gave a presentation already and we missed it! Bummer!!!
@Adám So you do know how it works, and have tried it. Can't fault you for not trying it!
 
4:21 PM
@AviF.S. What do you mean? The Dyalog webinar?
 
May 7th 16:00 BST Meet the new APL Wiki Adám Brudzewsky – Dyalog
 
@AviF.S. Suggestion: Maybe use the chat reply functionality to make it clearer what you're replying to?
 
... It said on the BAA link you sent, so I assumed it was one of theirs...
@Adám Haha, sorry
 
@AviF.S. Ah, they'll be made available online eventually.
 
@Adám Will let you go make and enjoy dinner with the family though! Hate to keep you away from them
 
RGS
4:23 PM
@AviF.S. there's also plenty of previous webinars here and some of them were by Adám
 
@Adám Thanks a bunch for your answers!
@RGS Yes it's true, thanks! Just though it would've been fun to do it as a Zoom thing! The webinar format is a bit different
 
RGS
@AviF.S. agreed; I thought you just wanted to watch a webinar given by Adám aha and those recordings are already available. That was my point
 
@RGS Haha, no you're right! It is true; thanks!
 
5:15 PM
CMC: Given a variable v which is a vector of numbers, answer the shortest expression that computes the arithmetic mean average of v.
You may assume that v has at least one element.
 
CMC?
 
Chat Mini Challenge
 
@Adám (+/v)÷⍴v
or is there some ⊣ or ⊢ solution I don't understand
 
@Wezl Nice initial answer, but you can actually golf that with a bit of mathematical insight. And there are other possibilities too.
 
+/v÷⍴v
 
5:25 PM
Better. That's 6 characters. But it can be done shorter yet.
 
RGS
v⌹v=v
 
@RGS That's the answer.
 
RGS
@Adám what bothers me is that trying to write it tacitly makes it really long...
 
@RGS Uh, no, shorter: ⊢⌹=⍨
 
RGS
@Adám alright, I correct my previous msg to "what bothers me is that I can only find long tacit formulations of it"
 
5:31 PM
Train and you'll get shorter solutions ;-)
 
i've noticed most people seem to assume ⎕IO←0 is 'free' for golfing - is anyone aware if there's any consensus somewhere on which system functions settings are considered free? reason being i've noticed a way to set one to get a 0b solution for a challenge which seems a bit underhand...
can't see anything on meta
 
8
A: New users' guides to golfing rules in specific languages

AdámAPL (Dyalog) Based on xnor's Python answer and user62131's Jelly answer. General I/O Your submission should be a program (tradfn), a function (tradfn, dfn, or tacit function), or an operator (tradop or dop). It should prompt for character and/or evaluated input from STDIN and/or take one or t...

 
@Adám perfect, thanks again
 
RGS
5:52 PM
@Adám pun very much intended?
 
Tacitly.
 
 
4 hours later…
RGS
9:25 PM
@Adám sorry for ruining your tacit pun :(
I solved the first 4 problems of phase 2 fairly comfortably :')
I mean, they took some work and experimenting but I didn't feel I was fighting against APL
 
 
1 hour later…
RGS
10:34 PM
Does this mean that scan \ doesn't compute the results in one pass..?
 
10:49 PM
@RGS Yes, f\ calls f n(n-1)/2 times in general (if the argument is a vector).
 

« first day (1211 days earlier)      last day (1444 days later) »