4:16 AM
@Adám {⊃'+-|+'↓⍨2⊥5 4 2⊃¨⊂⌊∘⌽⍨' '=,⍵}⌺3 3

2 hours later…
6:07 AM
@ngn OK, that has nothing to do with my answer. Will you post?

@Adám once I've golfed it and shown it to APL-ers, posting seems pointless...

@ngn OK, I'll attribute you then.

4 hours later…
10:07 AM
@ngn how long is your apl solution to the finnish cinema challenge? mine is 55

3 hours later…
1:16 PM
The CXO, @mkromberg, talks about running Isolates on #AWS. #APLGermany2018-1

@Cowsquack I only have a proof-of-concept solution, about as long as yours: 51 bytes. I'll try to golf it better and I'll tell you my best byte count later today.
@Cowsquack hint: my current solution makes use of such primitives as ⍸ @ ⍣

2 hours later…
3:01 PM
@Cowsquack I can do it in 42 bytes

@ngn as does mine :)
I got it to 53

@ngn Phew, wasn't easy to explain.

@Adám what's the ⍱ for? easier to explain?

10

APL (Dyalog Unicode), 57 35 bytesSBCS –22 thanks to a novel solution by ngn. Anonymous tacit function taking a character matrix as argument. {⊃'+-|+'↓⍨2⊥5 4 2⊃¨⊂⍱∘⌽⍨' '≠,⍵}⌺3 3 Try it online! {…}⌺3 3 on each 3-by-3 neighbourhood, apply the following function:  ,⍵ ravel (flatten)  ' '≠ B...

3:15 PM
@ngn Thank you!

@ngn Yeah, I found inverting it so that the initial Boolean indicates being populated more natural. Btw. is using `⌊` instead of `∧` a K'ism?

@Adám yeah, sort of, I got that habit from k, but of course it's also just maths

@ngn If I was to start again, I don't even think I'd include `∧`, but in favour of `×`, not `⌊`.

4 hours later…
6:49 PM
Hey @Adám, is this a postable solution or just a snippet? `''≡'(\w).*\1'⎕S'&'⊢<arg>`

@J.Sallé That's a snippet, but remove `⊢<arg>` and you have a proper tacit function.

@Adám yeah I thought so, I'll just assign it to a variable
I'll need to add a bunch of bytes for case conversion though

`⍞←'(\w).*\1'⎕S'\u&'⊢'abab'`

`@Adám  ABA`

@J.Sallé Does ^ help?

6:58 PM
@Adám yeah I was looking that up in Lesson 24 actually :p
Kinda confused by the challenge though

@J.Sallé Isograms?

@Adám yeah, but I sorted it out

@J.Sallé How? The question is very unclear.

that case folding doesn't help because I need to case-fold the argument, not the match itself
@Adám I interpreted the "case insensitivity" thing wrong the first time I read
@Adám `''≡'(\w).*\1'⎕S'&'(819⌶⊢)<arg>` works, but I can't assign that as a function, right?
Nvm `''≡'(\w).*\1'⎕S'&'∘(819⌶)` also works

@J.Sallé Yeah, that's fine.
@J.Sallé But that looks for a XYX pattern.

7:07 PM
Would Variant help here?

@Adám works for all the test cases though
Didn't test any more than that

@J.Sallé Those test cases are bogus.

Yeah, it doesn't seem to work for `'ss'`
I'll post it as is and then I'll try to fix it.

@J.Sallé Yeah, I think `⍠1` would do the trick, as @H.PWiz said.

@Adám where exactly would I put that?

7:12 PM
@J.Sallé `'(\w).*\1'⎕S'&'⍠1`

`⎕←''≡'(\w).*\1'⎕S'&'⍠1⊢'ss'`

```@J.Sallé
0```

Doesn't seem to work
Oh no nevermind
It should return 0, not 1 >.>

7:37 PM
12 people in the room! The TNB-link effect is indeed very strong.

The reddit TNB hug of death

@all Hello everyone. Do you want a quick intro to APL?

@FélixGagnon-Grenier Do you know J already?

@J.Sallé in my case, I came here looking for a place where I could discuss J
@Adám No. A colleague linked a article about someone computing fractals in J. Fractals being a passion of mine, I couldn't help but try and learn J right away
going through the basics on jsoftware, I was looking for a place to exterioze all my surprises as I discover the paradigm

7:45 PM
@FélixGagnon-Grenier OK, J is a dialect of APL, but APL looks more like regular mathematical notation than J.
@FélixGagnon-Grenier You're welcome to discuss them here. Most of what can be said about J applies to APL too.

:)
Would you advise to learn APL first, or going for J would be an introduction to APL at the same time?
... I must say I'm quite unsettled by a language having non ascii characters

@FélixGagnon-Grenier I'm an APLer, personally, so I'm biased. For most purposes, I think APL is the better choice, as it allows you to easily use whichever programming paradigm you want, and because the notation is easier for humans to read.

@FélixGagnon-Grenier I was too but it ends up being really useful

@FélixGagnon-Grenier Why? Many domain specific languages have their own symbols. Mathematics too.

@FélixGagnon-Grenier IIRC J is what happened trying to remove non-ASCII from APL

7:52 PM
@FélixGagnon-Grenier Think of APL like this: It is a generalisation and harmonisation of conventional mathematical notation (esp. with focus on linear algebra), which happens to also be executable.

@Adám Oh indeed, I'm sure it's totally justified, and probably useful in the long run! It's just my initial reaction :)

@dzaima True, but not only that. J does contain some further generalisations and harmonisations, and a larger vocabulary, but I often find that it takes the good intentions too far, to the point where ease of use suffers.
@FélixGagnon-Grenier Let me teach you just a handful of APL built-ins (we call them primitives), and I guarantee you that you'll never forget what they mean. OK?

@FélixGagnon-Grenier `⌹` is matrix division/inversion. `?` is random number(s). `⌈` is ceiling/max. `≤` is less-or-equal. `⍉` is transpose (axes).
@FélixGagnon-Grenier Want more?

do you alt + number the special characters?
hmmm... actually, I don't think I know enough to really know what to do with that. I'll continue reading, I'm sure I'll get questions

8:01 PM
@FélixGagnon-Grenier No, experienced APLers use a dedicated keyboard layout, but the IDEs provide multiple input methods. Also look here and here.
@FélixGagnon-Grenier Feel free to experiment. You can evaluate most APL expressions right here in the chat room by prefixing them with the two characters ⎕← as follows:
⎕← 3 1 4 ⌈ 2 7 1

```@Adám
3 7 4```

@Adám Or anyone on Linux, 'cause we already have it preinstalled and the Dyalog GUI isn't even available.

⎕← x =: *:
⎕← 2x3

```@FélixGagnon-Grenier
VALUE ERROR```

⎕←x←×
⎕←2 x 3

8:04 PM
```@Pavel
VALUE ERROR```

@FélixGagnon-Grenier That's J. This only works for single lines of APL. Also, you're trying to do 2 NOR 3 ‽

nah, I was trying to understand assignment, so my first idea was to try and break it

* is Pow, × is multiplication

to my great surprise, x =: *: did not break
moreover, 2x3 when x =: *: gives 40.1711

In APL, `var ← val` assigns `val` to `var`.
Assigning something to `⎕` prints it instead.

8:05 PM
@FélixGagnon-Grenier @Pavel If you want multiple statements for the bot, separate them with `⋄`:

I forgot how to type ⋄.

`⎕←x←× ⋄ ⎕←2 x 3`

```@Adám
×
6```

⎕← x =: *: ⋄ 2x3

```@FélixGagnon-Grenier
VALUE ERROR```

8:06 PM
@Pavel Top left button.

⎕← x =: *: ⋄ 2x3

._. I knew that but accidentally had the shift key down

```@FélixGagnon-Grenier
VALUE ERROR```

And typed a ⌺
@FélixGagnon-Grenier What are you doing

@FélixGagnon-Grenier Again, that's J, not APL.
@Pavel He's experimenting :-)

8:07 PM
> You can evaluate most APL expressions

⎕←x←×⋄⎕←2 x 3

```@Pavel
×```

@Pavel Don't forget `⎕←` before everything you want printed.
Here is a NOR table:
`⎕←∘.⍱⍨0 1`

```@Adám
1 0
0 0```

8:08 PM
actually, I am trying to understand what happens when I run the J lines x =: *: and 2x3. it returns 40.1711 in my jconsole. I have no idea how to start thinking about it

I suddently can't type ⋄
I'm hitting the same keys
But getting ⋄
Argh
It works now

@Adám `*:` is NAND rather than NOR

⎕←x←× ⋄ ⎕←2 x 3

```@Pavel
×
6```

8:09 PM
@H.PWiz Yes, my bad, but in his case it doesn't matter.

There we go

@FélixGagnon-Grenier `2x3` alone seems to output `40.1711`

oh, indeed

`2x3` in J means 2 times e to the power of 3, which you can verify in APL:
`⍞←2×*3`

`@Adám 40.17107385`

8:12 PM
I naively assumed writing x would interpolate the value I had assigned to it

@FélixGagnon-Grenier J very often requires spaces to disambiguate. In APL, spaces are only required between identifiers.
@FélixGagnon-Grenier It does, but you must put spaces.

hmmmmmm
indeed, 2 x 3 returns the domain error given when writing 2 *: 3

@FélixGagnon-Grenier Yes, because 2 NAND 3 isn't meaningful. Same goes in APL:
`⎕←2⍲3`

```@Adám
DOMAIN ERROR```

How does one do bitwise NAND?

8:15 PM
@Pavel Convert to binary, then NAND. It would be ambiguous otherwise, regarding which representation to use.
@FélixGagnon-Grenier Although technically speaking, `A *: B` is defined as `-. A *. B`, so the domain should really be all numbers.

Dammit mobile chat

@Pavel You mean `11 ⎕DR`?

Yes

@Pavel That's one possibility, but then when you want to convert back, your datatype may overflow.

So how would you do it

8:24 PM
`⍞←2⊥⍲/2⊥⍣¯1⊢2 3`

`@Adám 1`

@Pavel If I do my job right, we'll get the Under operator in 18.0, so you can write `⍲⍢(2∘⊥⍣¯1)`. Just tested it — yup, it works with my model for `⍢`:
``` Ü←{ ⍝ Under a.k.a. Dual
⍺←{⍵ ⋄ ⍺⍺}      ⍝ no ⍺: pass through
⍵ ⍵⍵{           ⍝ pass in original ⍵
A←⍺             ⍝ modifiable array
11::A⊣((⍺⍺)A)←⍵ ⍝ structural inversion on error...
⍺≢⍺⍺⍣¯1 ⍺⍺ ⍺:!# ⍝ ... or if imperfect inverse
⍺⍺⍣¯1⊢⍵         ⍝ try computational inverse
}(⍵⍵ ⍺)⍺⍺{          ⍝ ⍺⍺, but:
⍺←⊢                 ⍝ no ⍺: pass through
2=⎕NC'⍺⍺':⍺⍺⊣¨⍵     ⍝ if array: treat as scalar fn
⍺ ⍺⍺ ⍵              ⍝ else: just apply```
`⎕←Ü←{⍺←{⍵⋄⍺⍺}⋄⍵ ⍵⍵{A←⍺⋄11::A⊣((⍺⍺)A)←⍵⋄⍺≢⍺⍺⍣¯1 ⍺⍺ ⍺:!#⋄⍺⍺⍣¯1⊢⍵}(⍵⍵ ⍺)⍺⍺{⍺←⊢⋄2=⎕NC'⍺⍺':⍺⍺⊣¨⍵⋄⍺ ⍺⍺ ⍵}⍵⍵ ⍵} ⋄ ⎕←2 ⍲Ü(2∘⊥⍣¯1) 3`

```@Adám
{⍺←{⍵ ⋄ ⍺⍺} ⋄ ⍵ ⍵⍵{A←⍺ ⋄ 11::A⊣((⍺⍺)A)←⍵ ⋄ ⍺≢⍺⍺⍣¯1 ⍺⍺ ⍺:!# ⋄ ⍺⍺⍣¯1⊢⍵}(⍵⍵ ⍺)⍺⍺{⍺←⊢ ⋄ 2=⎕NC'⍺⍺':⍺⍺⊣¨⍵ ⋄ ⍺ ⍺⍺ ⍵}⍵⍵ ⍵}
1```

@DyalogAPL Whoohoo!