« first day (2382 days earlier)      last day (265 days later) » 

3:13 AM
@doug Thanks for this, but that's a different section (3.7; page 108 is in 3.6)
 
3:33 AM
How many page 108’s are there?
 
3:53 AM
Oh, you’re asking why the picture on 108 doesn’t line up with the picture on 117? It’s just a different AST as noted.
Ha! I only just noticed that the trees in the correction are just completely different than those in his thesis. I only pointed out that the after doesn’t match the before.
 
@doug No, the apparent mismatch is between the "Before" tree on page 108 and the "before" vectors on page 109. Sorry I didn't make that clearer.
 
4:22 AM
Between the drawing and the data? I would have hoped the correction would address something like this but it’s not something I checked. I only noticed the trees in the thesis reflect the action described. Maybe drop him a note..
 
Well, between the "After" tree and "after" vectors as well, actually. I'm guessing it's just an error.
@doug Yes
 
The after tree is just wrong. That was the point of the correction.
I obviously meant “don’t reflect”…
 
The correction is to a different part (page 117, in section 3.7) than the one I'm struggling with (page 108-109, in section 3.6)
 
4:40 AM
Yeah. It’s a little tough to follow since the correction looks like neither of these diagrams.
 
4:56 AM
Just from the parent vector alone I get a tree of this shape:
a  e
│  ├─────┬──┐
b  f     l  o
│  ├──┐  │  │
c  g  h  m  p
│     │  │  ├──┬──┐
d     i  n  q  s  t
      │     │
      j     r
      │
      k
So I’d guess there are errors.
 
5:14 AM
What did you use to make that diagram?
Yeah, that's the same as the "After" tree on page 108, except every A─V is replaced with just V (judging from the type vector)
 
5:29 AM
I did it in K. Note that the parent vector as given is no longer in DFS preorder.
I have a translation in APL but only of the plotting itself not with the other tools.
It might be a bit cryptic but it’s pretty constructive compared to the recursive version Aaron has.
FWIW, a various code sketches here.
 
@doug Nice, I'll try to read this
 
Oops! There might be a bug in the APL version. I fixed one a while back in K but don’t know if it made it to the APL. I’ll check a bit later.
It shouldn’t be awful, but still.
 
6:19 AM
Maybe it’s fine. I think I’m remembering a different bug.
 
 
4 hours later…
10:05 AM
In case it's useful, I mindlessly copied all the data about trees from the thesis and [rendered them here](https://tinyurl.com/3zjuhyvu). I've noted the parent vector actually used for rendering but output some other arrays like a depth vector before processing or a raw parent vector before resorting into DFS preorder.

A few look funny which may well be my bugs. I'll have a closer look at some point.

In any event, take it for what it's worth.
 
 
3 hours later…
1:07 PM
@Adám Another post to my blog, this time reacting to @PaulMansour: blog.wilsonb.com/posts/….
 
@B.Wilson Is there a reason you do ↑(∊(⍪,' '⍨)Y)(⍕⍋Y) instead of ↑Y(⍋Y)?
Similarly ↑Y(⍋⍋Y)(⍋⍒Y)(⍒⍋Y)(⍒⍒Y)
Anyway, added to the news.
 
1:31 PM
@Adám Because I always forget to do the simple thing and leverage the interpreter's display logic like that :)
 
Do you also forget ⎕A exists? ⎕UCS 97+?10⍴26 can be ⎕A[?10⍴26] or ⎕C⎕A[?10⍴26] if you really want lowercase.
 
@Adám Updated! Much better :)
@Adám Ah, yes I didn't think about that approach. Probably better than a magic 97. My head's been deeeeep in x86 opcodes and ascii bytes recently, which is probably showing through.
@Adám Oh sweet. I exist now! Muchas gracias.
 
1:48 PM
@B.Wilson oh no! i feel compelled to reply!
what's ${\mathbb Z}_N$?
is that a weird way to write Z/NZ?
 
@doug Thanks! This might come in handy
 
@RubenVerg Z/nZ, Z/n, Zₙ. You see all of those in practice.
We'll end up dominating the apl.news together! :P
 
2:05 PM
@B.Wilson right, I'd only ever seen the former, maybe it's some regional thing which is always annoying.
i suppose it's easy to understand what you mean because it's immediately followed by a N - x -> -x transformation
@B.Wilson i sadly have nothing to add to this nice article you just published
though i think i'll release either today or tomorrow the first tinyapl article
 
2:19 PM
Jot Dot Times is such a great name
 
We need a wiki article about it — it is reviving an ancient one (with a slightly updated logotype): Jot∘Dot∙Times
 
And I know ∘. is a syntactic anomaly, but it just looks so nice. There's something about those differently sized, vertically imbalanced hollow and solid circles that's so aesthetically pleasing
 
It is less anomalous than you might think.
 
How so?
 
f.g is f/ over the diagonal of ∘.g so indicates a "null function" that just doesn't do the final step of diagonal reduction.
      2 7 1+.×3 1 4
17
      +/1 1⍉2 7 1∘.×3 1 4
17
Only later was overloaded as an operator for composition, probably chosen (over Iverson's own glyph ) because of the use in TMN.
 
2:33 PM
Oh wow. I think I like it even more now.
 
@mitchelljohnstone Hi there, interested in APL?
@RubenVerg Should we add a humour tag to ∘.×?
 
3:00 PM
Welcome to APL Quest 2020-9! Today's quest is Rise and Fall:
> Write a function that, given a right argument which is an integer scalar or vector, returns a 1 if the values of the right argument conform to the following pattern (0 otherwise):
> • The elements increase or stay the same until the “apex” (highest value) is reached
• After the apex, any remaining values decrease or remain the same
 
I realy liked the problem but do not have a satisfying solution.
  {(1-⍨≢⍵)≤+/(⌊\2≤/⍵)+⌊\2≤/⌽⍵}
Does not work for a scalar.
and their must be something more smart
 
Being placed right after the previous challenge, deceives you into thinking you need "meta" info on the elements (their relative sizes, comparison), when you can actually work directly on their values.
 
@Adám that would be the biggets accomplishment in my life /s
@Adám oh no i forgot, will try solving now
 
No rush.
 
or something with {2-/⍵}
 
3:04 PM
Right, you don't even need that.
@Richard Want a hint?
 
yes...
 
I had {(¯1+≢⍵)≤+/{+/∧\2≤/⍵}¨⍵(⌽⍵)}, which is pretty similar to Richard's
Not seeing how you can work directly on the values yet...
@Adám yes please
 
OK, let's first solve a related but simpler challenge, where there's just one rule:
• The elements increase or stay the same until the last element is reached
 
⍳⍤≢≡⍋ ?
 
{∧/0>2-/⍵}
 
3:08 PM
Ok, both good, but can we make it even shorter (and simpler)?
@Richard Actually, you want but you get the idea.
Try working on the values. Which function can we apply to each element and its predecessor such that if the value on the right is the same or larger, it stays as-is, but if smaller, it gets modified?
In other words, which function F is such that x F y gives y if x≤y but something else (any other value goes!) if x>y?
 
 
Good!
 
@Adám that links to previous problem
sorry for the double ping
 
okay my sol is {(⍳∘≢≡⍒)(0∘≠⊢⍤/⊢)×+\⍣¯1⊢⍵}, quite dislike it, didn't follow what you said though
 
Darn. it happened again. Oh well. The correct link is problems.tryapl.org/psets/2020.html?goto=P9_Rise_and_Fall
@RubenVerg Right, same kind of issue here. Now look at my hints.
@Richard OK, now lets progress from left to right, keeping the first value as-is, but doing this transformation on each subsequent value. (Long way of saying something that is a single additional APL primitive!)
 
3:15 PM
{⍵≡⌈\⍵}
 
You got it! Now solve the actual full quest.
 
Oh wow
 
Let me know if y'all want another hint on how to use Richard's solution for the full program.
 
working on it. But didn't find it yet
some more time please
 
Sure thing.
 
3:22 PM
{∧/(⍵=⌈\⍵)∨⌽(⌽⍵)=⌈\⌽⍵}
not exactly the same...
 
∧.∨∘⌽⍥(⊢≥⌈\)∘⌽⍨??
 
@Richard True, but you're almost there.
@RubenVerg That's the same, as Richards, just more convoluted, right?
 
@Richard oh, this and mine are the same
@Adám I would argue less convoluted but yes
 
Let's think about the transformations that ⌈\⍵ and ⌽⌈\⌽⍵ do on respectively. Assuming is actually a valid rise-and-fall vector, how might we reconstruct from the result of these two expressions?
 
min them?
 
3:27 PM
(⊢≡∨\)∘×⌈\-⊢ ???
 
@RubenVerg Absolutely!
 
:)
 
@rabbitgrowth Not sure what that is. Oh, I get it, but that's the same as ⊢≡⌈\
 
I'm very confused right now lol
 
The changes that ⌈\ introduces is that the elements after the apex are too large.
 
3:29 PM
⊢≡⌊∘⌽⍥(⌈\)∘⌽⍨, I guess?
 
The changes that ⌽⌈\⌽ introduces is that the elements before the apex are too large.
@RubenVerg Yes, that works.
 
not sure I like it
 
You could unroll the .
 
⊢≡(⌈\⌊∘⌽(⌈\)∘⌽), which removes the somewhat ugly Self
 
So we can get back the original (if valid) with (⌈\⍵)⌊⌽⌈\⌽⍵ or ⌈\⌊∘⌽⌈\∘⌽ if you like tacit.
 
3:32 PM
oh you need way less parens than I thought
 
@RubenVerg Yes, but no need for any parens at all.
 
⊢≡⌈\⌊∘⌽⌈\∘⌽ works and I like it
also shouts under
 
This is a case where an under operator would be nice.
heh, GMTA.
Behind can work too: ⌽≡⌈\⌽⍛⌊⌈\∘⌽
 
yea, was about to say "also hooks"
 
Wow. that GMTA is no joke.
 
3:34 PM
oh I see you bring the reverse outside
 
This was a really nice one!
 
I have my doubts about mathematical/computational under, but structural under is nice for scans: ⊢≡⌈\⌊⌈\⍢⌽
 
mathematical under as in inverting functions?
 
Yes.
 
no difference here
 
3:36 PM
No, true.
 
@RubenVerg ROFL. I like your style.
 
One last (simple substitution) task could be to make it all leading-axis oriented.
 
s/\/⍀/
?
oh wait vertical reverse is reverse last right
 
wouldn't you need both?
 
Yes.
 
3:38 PM
i always confuse the two for some reason, like I get the mnemonic that vertical reverse is last because it swaps rows on a matrix like in the picture but it doesn't stick
 
maybe, just reminder that ⍀ has horizontal overstrike, so need ⊖ with matching horizontal line ?
 
Yes, every first-axis version where a pair of first/last exists has a horizontal bar in the middle.
⊢≡⌈⍀⌊∘⊖⌈⍀∘⊖ then.
 
@Adám you sound like "every 2-modifier has an unbroken circle" or whatever the line is
 
Yeah, although that goes on the syntactic class, whereas this is more subtle.
 
equally useless for my weird mind :)
 
3:42 PM
@RubenVerg what line? not heard that before
 
@Silas I think it's from the BQN intro page, either there or some doc page
all 2-modifiers in bqn have glyphs with an unbroken circle
except to me and look like completely different things, I can't associate that they're both circles
 
ah, that'll explain it then - not looked much at BQN
 
yeah, I don't particularly like that scheme of BQN's.
My alternative design was that 1-modifiers have one dot above (e.g. ˙ etc.) while 2-modifiers have two dots above (e.g. ¨ etc.)
 
i think that might have been better for me, but also like it's 10 modifiers or whatever, I just learned them
 
Anyhow, I think we're done with this one. Last 2020 quest next week — Stacking It Up — this is a really tough one, so you'll want to work on it in advance.
 
3:53 PM
@Adám Yeah that was just wrong, sorry. Works on 1 2 3 2 3 4 5 but fails on 1 2 3 4 3 2 3 for example.
Just for fun: {5::1 ⋄ ⍬(,¯1)∊⍨⊂{×0~⍨¯2-/⍵}⍣2,⍵}
 
@Adám omw to forget to do that
 
iirc, participants came up with longwinded fanciful solutions when there is a relatively somple one.
 
@Adám sorry, should this be a vector with newlines or a matrix?
 
> a[ny] simple character array
could be rank 3 if you wish
 
I just learned the submission thing doesn't need braces around dfn bodies
is that intentional?
 
4:01 PM
Yes, doesn't matter.
 
Aug 5, 2021 at 18:16, by Adám
@rak1507 People might think that they have to "fill in" the dfn, or that the solution has to be an expression in terms of ( and) . Instead of protesting, I simply parse the input and add braces if necessary. However, these statistics are on the raw submission. Many have unnecessary spaces too, and one even had a comment despite instructions.
 
I think I got it!
 
@Adám this is sarcasm right
 
no, not at all
 
okay then I must be missing something
 
4:11 PM
@Adám Hey @Adám! I am! I actually participated in the APL competition this year, although it's my first time on this page. When do the APL Quests happen?
 
Fridays, currently at 15:00 UTC, but will change to 13:00 from October 6.
 
@RubenVerg Now solve it without
Just a little bonus challenge
 
"little"
 
⎕FMT...
 
anyways, since i'm not really sure if I'll be available, my sol is ⍕¨⍛⍪ (or whatever is the nicer way to write it without a left hook, I just needed a flipped composition operator)
 
4:17 PM
@RubenVerg ⍪⍕¨?
 
oh wait it doesn't work I just had my internet down
{1↓∊⎕tc[2],¨⍕¨⍵} then
 
yes, thats the simple approach.
 
oh tc is deprecated?
@Adám what's the complicated approach?
oh this
 
@Adám Is there any code of conduct for this forum? I'd like to try some of the problems but unsure if I'll do as well as what's already been written
 
4:37 PM
@mitchelljohnstone don't worry about it; many show up with sub-par solutions and and come away having learned something!
the sessions are very informal. sometimes, people post (and sometimes present) their solutions, sometimes, I just explain through. One or more good solutions make it to the follow-up videos. see apl.wiki/APL_Quest
@RubenVerg Are you aware of apl.wiki/humour?
 
4:57 PM
@Adám i am, but i definitely don't deserve to be up there :)
also I don't see a "poking fun at nice articles" category
 

« first day (2382 days earlier)      last day (265 days later) »