4:48 AM
@FawnLocke interesting reply, plus got accepted, congrats :D

3 hours later…
7:50 AM
I'm proud of myself. Just created a point free expression that compares the arithmetic with the geometric mean, for any given array of numbers:
+/⊣÷≢⊣≥⍥×/⊢*1÷≢⊢
gm
@xpqz 's book helped me understand how the omicron with the diairesis works :)
actually what it does: am >= gm array

8:08 AM
@milia Check out apl.wiki/APL_logo and come to the next BAA webinar on Thursday at 16:00 UTC.

@Adám thanks, will do and will do

@FawnLocke interesting—I didn’t know you could do that.

Question is if you should.

8:24 AM
Fair - although I found it interesting more as an illustration of the capabilities of namespaces than as a way to more functional programming.
Might make a note of it in the book.

@xpqz Did you see my comment?
The real way to create an array of functions is to arrayify them using `⎕OR`.

@Adám can you show an example?

8:44 AM
0

Arrays of functions can be obtained using ⎕OR (Object Representation) and the fact that such objects become reconstituted into functions used as operands. It is easiest to define some helper operators first: _Arrayify←{f←⍺⍺ ⋄ ⎕OR'f'} _Apply←{2=⎕NC'⍺':⍺ ⍺⍺ ⍵ ⋄ ⍺⍺ ⍵} Now, let's define ...

@milia `+/÷≢` works instead of `+/⊢÷≢`

This seems like a fairly legitimate way to create arrays of functions to me. Any reason it isn't more advertised?

@FawnLocke Yeah, I'm planning on putting dfns.dws on GitHub so we can start enhancing it. I don't know why it isn't advertised more. People hate `⎕OR` and the whole system is a bit awkward.

Gotcha

Maybe I should add my helper operators to APLcart?

8:59 AM
That sounds like a good idea

9:48 AM
@rak1507 I guess you meant "+/⊣÷≢⊣" instead of " +/⊢÷≢", and that it'd work without the left identity operator..I'll check it, thx
Indeed, thanks ! +/÷≢≥⍥×/*1÷≢ 1 2 3 4 works just fine

no, I mean the average can be `+/÷≢`

right ty

@milia that 'works' for the wrong reasons

ah
:/

that is `(+/(÷(≢(≥⍥×)/(*(1÷(≢1 2 3 4))))))`

2 hours later…
11:55 AM
@milia `1⍨`
🤣

12:22 PM
:|

1 hour later…
1:39 PM
@milia Heh, you see `○` as an omicron. It is actually a circle.

@Adám hehe, right... I guess it's all greek to me xD

@Adám it's the same circle that gives the trig functions and the pi, right ?

I just see the Swedish letter Ö.

I also see the cookie monster :P
but yeah, I don't speak swedish, but I could see it as the o with the umlaut, like in GÖdel
yep, I guess it seems so:
○1 ×/⍳10
3.141592654 6.283185307 9.424777961 12.56637061 15.70796327 18.84955592 21.99114858 25.13274123 28.27433388 31.41592654

1:46 PM
@xpqz Super easy for you to remember `⍥` as Över…

Yeah, it sticks.

do you spell 'over' with an umlaut in swedish @xpqz?

Yeah.

yteah

Yes, exactly like @Adám (who incidentally also speaks Swedish) wrote it.

1:47 PM
very convenient
I think it's time to pick up some swedish then :P
this is easy to remember too: ⍨

I call it: the weird smiley face
and this: ⍣, the kiss

The umlauty ones all look fun: `⍣⍤⍥`

and, of course, `⍨`

yeah, this is my fav
hehehe

Mine too.

1:50 PM
:)
it's a funny looking face
or maybe

It shows how you face will look if you use too many of them.

the face of someone that sees some APL code for the first time

Right is left, left is right…

did a post on r/math, regarding my last am >= gm code snippet. I know it's not big deal, but hey, maybe another mathematician will appreciate the beauty of it; especially those specialized in algebra, I believe will be intrigued :)

@Adám Is the ⎕OR kluge really superior to the namespace kluge for an array of functions?
With an array of spaces, we don't need any functions or operators to execute an array of functions, we can just do a.v
a.f
where a is an array.

2:02 PM
@PaulMansour They are not even comparable. The namespace kludge is like the lamb in The Little Prince: The array of functions is there, but you can't access it!
In order to manipulate your namesspace-kludge "array of functions", you can't actually have an array of functions, but have to leave it as an array of namespaces, and then you need an "operator" (can be a function or `.f`) to apply with.

Yes, indeed.
It just seems to me that it is as or less awkward than the ⎕OR method.
⎕OR is also not a an array of functions.

But it truly allows you to deal with functions as first-class objects; you can compare them too. `ns1≡ns2` gives 0 even if they only contain identical `f`s.

Yes, true. You can also take them out and move them around. There is that.
But for actual practical day to day use, the array of namespaces might be better. In fact we do it all the time with objects and methods, and no eaches necessary.

4 hours later…
6:33 PM
English is an ambiguous language. APL is not. The rule for the age difference between husband and wife is "half his age plus seven years". Is that `7+h÷2`, or is it `2÷⍨h+7`

2 hours later…
8:19 PM
@JeffZeitlin While quite true, I'm curious if anything in particular prompted you to state this.
Also, what is `'ab' 'cd'[1]`?
How about `a←1 1 ⋄ (a←1 2)[a]` and `a←1 1 ⋄ a[a←1 2]`?

the interpreter knows!
english has no formally specified rules.

OK, that's true.
Traditional mathematics is like English, then, when it comes to things like like 10/2(2+3)

there is no such thing as traditional mathematical notation per se
it's just an agreement between mathematicians, it's extremely context sensitive, and it's interpreted in varying ways.
it's nowhere near being as formal and strict as APL
perhaps a comparison to Mathematica or a theorem proving system like Coq would be more adequate, but these of course don't have this issue

There's no such thing as English per se
It's just an agreement between English-speakers, it's extremely context sensitive, and it's interpreter in varying ways.

of course! a language is defined by it's speakers.
there were attempts to formalise it like various dictionaries with grammar parts, but that's just syntax, not semantics.

8:29 PM
Yeah, right!

8:43 PM

Hello.

can you fix this

"that"?

what is there to fix
that looks working as expected

8:45 PM
prints 1.2676506E30, not exactly 2 ^ 100

@Fmbalbuena Try it online!

Dyalog doesn't have native bigints

what it does
Are you french? because FR?

`⎕PP←34 ⋄ ⎕FR←1287` will get you to integers with 34 digits, but past that they're still floats

`⎕PP←34` asks for the maximum (34) number of significant digits in outputs.
`⎕FR←1287` asks to do floating-point operations using 128-bit decimal representation.

8:47 PM
so `2*200` will still only be an approximate value

`line(2,0) : error AC0008: error (DOMAIN ERROR) executing line "FR128888" `

@Fmbalbuena How did you get that?

changing to `⎕FR←128888`

There are only two valid values for `⎕FR`, namely 645 and 1287 for 64-bit binary floats and 128-bit decimal floats.
You can do `2*200` like this.

@Adám so what are the rules of APL Arachnid?

8:51 PM
Spider is a type of patience game, and is one of the more popular two-deck solitaire games. The game originates in 1949, and its name comes from a spider's eight legs, referencing the eight foundation piles that must be filled to win the game. == Rules == The main purpose of the game is to remove all cards from the table, assembling them in the tableau before removing them. Initially, 54 cards are dealt to the tableau in ten piles, face down except for the top cards. The tableau piles build down by rank, and in-suit sequences can be moved together. The 50 remaining cards can be dealt to ...

Oh i played spider

Arachnid is another word for spider.

ok so why i can't drag. i only i can click.

Just a different interface. The dragging is unnecessary if there's only one place to drag to.

what ruins my game.

8:54 PM
Then change it! The source is all there.

change difficulty to easy
`{unprintable}<-'Hello, World!'`

Not as far as I can see, but by all means, change anything you like.
@Fmbalbuena Do you mean ⎕←'Hello, World!'? Do you need help with typing APL in this chat?

@Adám Did you forget a closing backtick (``⎕←code``)? You can edit your message and I will edit my reply.

@TryAPL No, I actually didn't want you to execute anything this time. Sorry!

8:58 PM
OK, just checking. `⎕` is called "quad" btw.

??? unprintable
ok so let's call unprintable

Well, it happens to be similar to how some systems show symbols that cannot be rendered right, although Unicode says they should should show �.

`�<-'Hello, World!'`

OK, that's just silly.

or better
`�→"hELLO. wORLD?"`
I have to gtg

9:06 PM
○/

9:29 PM

@rak1507 OK, fair enough, and with `⎕IO←1`?

yeah, just joking
I used that evaluation order recently with `{(⍋⍋u)[⍵⍳⍨u←∪⍵]}` to rank things with ties
should just be ⍋∘⍋⍢∪ :(

@rak1507 Ooh, that's nice, but probably unobtainable, even with BQN.
It'd have to know what it means to merge and redistribute indices.

@Adám couldn't `f⍢∪` be special cased to mean `(f∪⍵)[(∪⍵)⍳⍵]`

Sure, but that's the point; it'd have to be special-cased.

9:35 PM
ah right yeah fair enough

Everything is possible if special-cased, even `/` and `∘.`

oh, just realised that was {⍵[⍋⍵]}⍳⊢

@rak1507 Hm, so we'd want `∧⍳⊢`

yeah

10:14 PM

Because `○/` is valid APL.

wait what?

`⋄ ○/¯1 1 ⋄ 2×○/¯1 1`

```@Adám
1.570796327
3.141592654```

is equivalent to pi?

10:19 PM
Dyadic `○` takes a "circular" (trigonometric/Pythagorean/complex) function selector number as left argument, and the main argument as right argument. Listing.

and... APL Logo?

I don't follow.

wdym
APL logo?
why you don't

I don't understand what you're asking. Some kind of connection between `○` and adopting an APL logo?