« first day (1237 days earlier)      last day (1420 days later) » 

 
10 hours later…
ngn
10:35 AM
@Bubbler nice. this and that combined make 25: ⌽(⊢,⍨⊃-≢ׯ1*⊢∊⍨0⌈⊃-≢)⍣⎕⊢0
 
10:57 AM
random pointless idea: in BQN modifier names start with ¯ to indicate they're superscripty
 
@dzaima Instead of _, you mean?
 
@Adám yeah
 
Then compositions (dyadic operators) should almost have an #x1F907 prefix :-)
Btw, there's nothing that prevents using ¯ like a digit in names. APL2, APLX, and GNU APL allow this.
 
11:38 AM
Anyone here familiar with EBNF and railroad diagrams?
 
11:53 AM
read the hopl paper last night, extremely informative.
 
Cool. Feel free to tell the authors.
 
maybe! i need to reread a few sections. it did a lot to clear up implementation and parsing details.
 
One of my favorite aspects of (learning) APL is the extensive documentation of its history
Both technical and cultural
 
RGS
12:12 PM
@Adám maybe a teeny weeny
can I help?
 
@RGS I'm trying to specify the new array notation, and I'm almost there:
value     ::= expression | list | block | space
list      ::= "(" separator? value (separator value)* separator? ")"
block     ::= "[" separator? value (separator value)* separator? "]"
space     ::= "(" separator? (name ":" value (separator name ":" value)*)? separator? ")"
separator ::= ("⋄" | #xA | #xD | #x85 )+
 
RGS
@Adám ok, and what seems to be the problem? are there phrases that the grammar doesn't capture yet?
 
@RGS The only issue is that for list and block, there must be at least one separator, whereas the above grammar allows having none:
 
RGS
(btw I'd probably call the last rule separatorS instead of separator)
 
@Adám i don't think there's a way around it other than having multiple |ed expressions, each requiring at least one separator in at least one place
 
RGS
12:17 PM
@Adám in what position(s) must/can that separator pop up?
 
@dzaima Hm, then maybe it is easier to simply state that a list or block without a separator is simply a strand or indexing/axis.
 
@dzaima (that may or may not depend on exactly what syntax that's using, as from the wikipedia page it doesn't seem like EBNF)
 
@RGS Any of the show. (separator value) or (value separator) or (value separator value) but (value) isn't valid.
 
@Adám Just put ()? around value (separator value)* separator? for those rules, right?
Wait, that's the wrong way around. Never mind.
 
in ANTLRish syntax a way would be to have a "(" expression ")" alternative beforehand to catch no-separators before it gets to touch them, but i'm not sure there's any formal specification of that
 
12:24 PM
@dzaima Yeah, I thought about that. That's basically the trick I often use with ⎕R/⎕S.
 
RGS
@Adám I can't come up with something pretty that allows AB, BA and ABA without allowing B; maybe @dzaima is right and you have to go with |ing several options
 
@RGS Same issue as with regexes, I guess.
 
@RGS there definitely (probably) isn't any way if that example contains all the allowed syntax
 
Yeah, you pretty much need `"(" (s v? | v s | s? v (s v)+ s?) ")" with BNF.
But I don't think there's anything wrong with saying it has to contain at least one separator in the text.
 
@Marshall I don't think I need three choices. ABA?|BA should do, no?
list     ::= '(' ( ( value separator )+ value? | ( separator value )+ ) ')'
 
12:30 PM
@Adám how about BAB (aka the basic (1 ⋄ 2))?
 
@dzaima Ah, you're right.
 
@Adám That's missing plain separator.
 
OK, but this should do:
list     ::= '(' ( ( value separator )+ value? | ( separator value )+ separator? ) ')'
@RGS Why? Multiple collapse to one.
 
RGS
@Adám oh just because the rule had the +, so it was more of a plural because of the way the rule looks and not because of how the syntax really works
I though multiple separators had some meaning; I don't know the new array notation yet
 
@RGS (1 ⋄⋄⋄ 2) ≡ (1 ⋄ 2)
@Adám seems correct
 
12:35 PM
Yeah, not too ugly either:
Thanks, guys!
 
@Adám Is a lone separator for an empty list not allowed?
 
@Marshall No, since it doesn't specify type, and anyway, () is an empty space.
space    ::= '(' separator? ( name ':' value ( separator name ':' value )* )? separator? ')'
I guess that can't be simplified.
 
 
3 hours later…
3:25 PM
CMP: What would you think of multi line/statement trains? +\(-⌿'{}'∘.=⊢) could be written as ('{}'∘.=⊢ ⋄ -⌿ ⋄ +\) or
(
    '{}'∘.=⊢
    -⌿
    +\
)
 
Certainly be easier to parse for neophytes
 
They could enhance clarity, but ... it sorta makes them a third function definition syntax...
(MLTs, dfns, and tradfns)
 
@JeffZeitlin Where are the current trains in that list?
 
@Adám i think the reverse might be clearer (there was a time when i thought this was the behavior of dzaima/APL, but it wasn't)
 
perl's /x modifier for regexes allowed them to be broken up like so, so that you can add a comment to the right of each significant component.
 
3:27 PM
@xpqz Right, the ability to comment the parts of a train would be nice.
 
RGS
@Adám +← 1
 
@dzaima though for multiline the proposed makes more sense, hmm
 
@dzaima The reverse is already obtainable with ()⍤() e.g. (+\)⍤(-⌿)⍤('{}'∘.=⊢)
 
@Adám that's a lot of characters though. i guess i'm looking at it more like a monadic function fix than different programming style
 
RGS
Can someone help me understand what the problem with this code is, for this codegolf challenge?
 
3:41 PM
@RGS f⍨⍣gf⍣g⍨ (there might be better alternatives but this is the simple one)
 
RGS
oh
so what was I doing, then..? was I "resetting" the variable in some way?
 
@RGS Lots of golfing opportunities :-)
 
@RGS you were creating an outer product 2*(|l)+n-1 times, but you don't want the 2*
 
RGS
@dzaima oh I see
 
@dzaima (that "better alternative" turned out of the same length - ,⊃∘.,/((|l)+n)⍴⊂⍳k; i've often wanted a built-in for something like ⊃∘.f/N⍴⊂X)
 
RGS
3:45 PM
@Adám I am sure there are :P I was just trying to get it to work correctly first D:
 
3:57 PM
@dzaima (and the need for 1/ later comes from these alternatives actually being wrong & bad)
@dzaima and those are wrong and bad because 1,2 should really error but people have decided to special-case it
 
@dzaima It'd be really awkward to construct vectors from scalars then, no? Or would stranding always suffice?
 
@Adám 1) we have strands (and soon array notation); 2) have you ever actually had a case where you can't strand (or no other array creation alternative is better) but are absolutely guaranteed ≥2 items?
(using , to build arrays is only "correct" when either you have simple scalars and 2+ items, or you have a starting /''/⍮X)
 
@dzaima 1) Yeah, allowing scalar,scalar might well be a hold-over from before (generalised) stranding. 2) Yeah, trains.
 
@Adám 2) do you mean cases like this ;)
 
@dzaima No, like lexicographical "" for scalar characters: 't' (</∘⍋,) 's'
 
4:04 PM
@Adám :)
 
@dzaima I was just about to say that that's the general form, but without that primitive, not allowing the concatenation of scalars would be very problematic. You couldn't even define ⍮←,⍥⊂ then, but would have to resort to a dfn {⍺⍵}.
 
@Adám yeah, i accept there are historical reasons for it. Question is, is there absolutely any reason to keep it around in modern APL
 
@dzaima Modern∊dzaima Extended?
 
@Adám - Good point; arguably, I should have said fourth - trains/tacits, dfns, tradfns, and MLT/MSTs.
 
@Adám Extended needs backwards compatibility. Also, BQN
 
4:07 PM
@JeffZeitlin I would counter: trains/tacits, dfns, MLD/MSDs, tradfns, MLT/MSTs.
@dzaima dzaima and BQN, right, not necessary. (Dunno what to do about Extended, as it only extends 17.1, not 18.0…)
 
@Adám unfortunate TIO doesn't have versioning. otherwise i'd definitely just change to match 18.0 and move on with that
 
@dzaima But my monadic is just so useful, whereas I've probably never needed my monadic
 
@Adám - Point taken; I didn't view dfns and MSDs as different because they both existed when I first became aware of them. But the proliferation of function definition syntaces is the issue.
 
One might argue that unparenthesised trains shouldn't have been allowed in the first place. I think NARS2000 prohibits them. And then the extension to multi-statement wouldn't be so controversial, I think.
 
@Adám Interesting distinction between powerful and useful/convenient there. Nub Sieve is powerful since it's otherwise difficult to do correctly and impossible to do efficiently, but 0≠ comes up so much more often.
 
4:15 PM
@Adám - Perhaps not; I'm not entirely convinced that tacits are really a good thing to start with.
Their decomposition is counterintuitive, their syntax seems somewhat not-APLish.
 
@Marshall Sure, and when Extended does have nub sieve…
 
Along those lines I've been thinking of adding monadic ⍳∘≢ and even ≢∘⍴ (APL spellings) to BQN.
 
Yeah, those two are all over the place.
 
there have been ±5 separate times i've considered adding ⍳∘≢ to dzaima/APL; a couple ended with no symbol found, a couple with worries about ⍳∘⍴, and a couple with falling asleep
 
Hope it's +5 and not -5.
 
4:20 PM
@Marshall initially i wrote "probably more than 5", then "~5" and then ended up with ±5. :p
 
@RGS Sorry for the lack of a response, I was getting some work done early Saturday morning before the grandkids arrived.
 
@dzaima i do have ϼ free now though, since ⎕VI is mostly stable
 
@Marshall Symbol suggestions for BQN: and (indices / overlaid on count and shape )
 
@dzaima Somewhat related to ⍳∘≢ versus ⍳∘⍴, another problem I've been having is trying to figure out what kind of return value Indices should have. BQN2NGN keeps the inconsistent Dyalog behavior.
 
@Marshall i think the logical thing is to have ⍳,1 be ,⊂,0, and 0 1≡(builtin-of-⍳∘≢)2 3⍴0 might not be that bad
 
4:24 PM
@Marshall Yeah, distinguish between scalar (number‽) and vector arguments.
 
I mean Indices, APL or BQN /.
There you don't have the option as the argument shape is always a vector.
 
Oh.
 
@Marshall i don't think distinguishing on rank is that bad of a crime. (personally i always code with consistent, known rank everywhere so i've had no issues)
 
If you want Replicate (/) to be /⊸⊏ then it has to only allow a vector argument.
 
my ⎕VI←1 has a much bigger problem though (gtg for bit)
 
4:29 PM
@dzaima It's a way to use the same symbol for two different functions. Eventually, you will want one of the functions in a context where you can't use it.
There are some reasons to force vector indices everywhere. would be able to do scatter-cell indexing easily: if the argument is a numeric array, its rank must be at least 1 and its rows are cell indices. If it's a vector of numeric arrays, then you take the cartesian product of rows from all index arrays.
 
@Marshall if i want specifically a vector of 1-item vectors of simple scalars, 1) i'm probably doing something stupid; 2) is not that hard to use (similar logic for me special-casing f/vec)
(can't comment on /, i've never had any reason to use it beyond the simple case of a vector left arg)
 
@dzaima That goes the other way too. If you have scalar indices, just use ⥊⎉0⊸⊏. Is the power of vector indices worth making scalar indices inconvenient?
 
@Marshall in my case, yes, i believe i've used on vectors much more than any other case
unrelated, might be a good char for ({⍺⍵}/{,⊂⍵} duo)
 
4:46 PM
@dzaima Pretty good, but I'm sticking with ≍○< for now.
 
@Marshall Not ∾○< ?
 
@Adám ≍○< works with both valences since monadic is Join/Raze.
 
RGS
5:44 PM
@MortenKromberg don't worry, I had nothing clever to say; was just curious about what could've brought you to the APL Orchard!
 
@RGS He tries to be here when he can and remembers. (I just have the tab pinned.)
 
RGS
@Adám thanks to a conversation between you and dzaima I found out about the wonders of pinned tabs... now I keep a couple of tabs pinned for good measure; this one included
 
Mine are Gmail (used for both work and private), TAO, TNB, APLcart, TA.
 
RGS
TA..?
 
TopAnswers.xyz
 
RGS
5:49 PM
I should keep gmail pinned as well... currently I have google calendar&tasks, this chatroom, whatsapp web & cookie clicker :P
is TopAnswers taking off?
 
Some communities are, Code Golf not really. We have a closed beta APL one in the works with some amazing custom features.
 
RGS
@Adám an APL community in TA? cool!
(btw I'm guessing one does not simply ask for access for that closed beta?)
 
@RGS I guess you could, but there's not much going on there in terms of content yet. However, I can tell you the cool features:
 
RGS
6:05 PM
@Adám what is the point of having cool features if there's no one to explore and use them? ⍥
 
∘ Built-in language bar
∘ Selectable font (APL385, Iosevka, DejaVu Sans Mono, SAX2)
∘ TIO integration in chat and posts
∘ Real APL syntax colouring
∘ APL Wiki integration (when APL Wiki upgrades to the newest MediaWiki)
@RGS Well, before we open it up, we have to decide on the scope.
∘ Dyalog only
∘ APL only
∘ APL-like (including e.g. BQN and J)
∘ All array languages (Mathematica, MATLAB, NumPy,…)
 
RGS
@Adám of course; just let me know if you need any proofreading ;)
@Adám these sound really nice! What do you mean by "real" APL syntax colouring?
 
@RGS TA uses the same code as RIDE.
 
RGS
unlike some other low-quality syntax colouring systems..?
 
Yeah, like SE's.
 
RGS
6:16 PM
@Adám ok I get it. The windows interpreter doesn't have much colour either, so I am used to coding in APL being a pretty monochromatic experience
 
@RGS Did you customise your colours?
Mine looks like this:
Or like this, when I'm feeling light:
 
RGS
6:31 PM
@Adám uh oh, no I did not!
an adventure awaits me, I see
I have been meaning to ask this for a long time now; when I press CTRL+BACKSPACE the interpreter inserts this: 
Ok I cannot get the chat to display the character
why doesn't CTRL+BACKSPACE erase a whole word, like in any other text editor?
 
@RGS That's U+FF, I think.
 
RGS
yeah, when I hit CTRL+BACKSPACE to delete a whole variable name or a whole sequence of consecutive chars and I see that character instead, I do go "uff"
so I guess it adds up
 
@RGS Because it isn't a text editor. If you want an interface that behaves like a proper text editor, just use RIDE.
 
RGS
@Adám not even the "text editor" window that opens up when I type )ed someName?
 
There are lots of oddities that show that the IDE isn't a text editor: Pressing delete at the end of the line doesn't bring the next line up, you can position the cursor beyond the end of a line, etc. etc.
 
RGS
6:38 PM
@Adám yup I did notice those...
 
@RGS That's a function editor, not a text editor.
 
RGS
ah ok, thanks for the clarification!
 
Doesn't mean I agree it should be like this. I'd want a more text-editor-like IDE too.
 
7:32 PM
This is where readline comes in handy: "As a cross-platform library, readline allows applications on various systems to exhibit identical line-editing behavior." That's also what I like about my current lisp implementation.
 
@Wezl Yeah, unfortunately for Dyalog, not changing existing behaviour has the side effect of scaring off newcomers.
 
... but readline doesn't seem to have control backspace itself :/
 
I never knew about Ctrl+BS. I always use Ctrl+Shift+Left,Del.
 
@Wezl Nevermind, the nice features readline might offer would probably conflict with typing special characters (CTRL+E for end of line would mess with typing epsilon, for example)
 
RGS
@Adám what is this for?
 
7:44 PM
@Wezl Eh, I never use Ctrl for APL characters (I use AltGr/RightAlt), so I have Ctrl+A for select all, Ctrl+S for save, etc.
@RGS Delete word left.
 
RGS
@Adám ah ok, seems so elaborate when you could just do ctrl+bs
 
@RGS I don't really think about it, and it is consistent with deleting a word to the right.
 
RGS
@Adám sure, consistency is nice
 
ngn
8:03 PM
@Wezl it uses emacs bindings by default (as you probably know), but is configurable
"\b":unix-word-rubout in .inputrc
 

« first day (1237 days earlier)      last day (1420 days later) »