« first day (1454 days earlier)      last day (1203 days later) » 
10:00 - 23:0023:00 - 00:00

10:57 AM
@xpqz Fixed.
 
Excellent.
Thanks.
 
in The Nineteenth Byte, 27 secs ago, by Adám
CMC: Given a Boolean list and a count, return the index (0 or 1-based) of the first occurrence of a run of the given count of falses. If no run of that length is found, return a recognisable value e.g. -1 or the list length or for 1-based indexing: 0 or 1+length, or null etc.
(falses=zeros)
 
11:23 AM
@Adám {(|{$[y;1+;0*]@x}\|~x)?y} ? gives 'zero' for empty list...
 
@chrispsn What if list begins with enough 0s?
 
would '3' count in 0 1 0 0 0 0; 3?
 
Depends on the result of 0 1 0 0 0; 3
 
(ie can a 'run' ignore prior values)
 {(|{$[y;1+;0*]@x}\|~x)?y}[0 1 0 0 0;3]
2
 
{⊃¯1,⍨⍸⍵⍷⍨⍺⍴0}
 
11:26 AM
@rak1507 Why the ¯1,⍨?
 
so that it returns ¯1 if it's not found
 
@chrispsn If so, then it must give 2 also when more (irrelevant) elements are at the end.
@rak1507 And if you leave it out?
 
0
 
… which is fine!
 
is it? then you can't tell between 'the run starts at index 0' and 'the run isn't found'
ah I can use ⎕IO←1
 
11:27 AM
⎕IO←1 FTW!
 
 {(|{$[y;1+;~]@x}\|~x)?y}[0 1 0 0 0 1 0 1 0 0 0;3]
2
 
lol
 
@Adám damn horrible prototypes promoting ⎕IO←1
 
{⊃⍸⍵⍷⍨⍺⍴0} then
 
Yup, that's what I had too.
 
11:28 AM
cool
 
Huh, I can save 2 (1 is easy, 2 requires either Extended or a bit of a hack) by going tacit.
 
⊃∘⍸⊢⍷⍨⊣⍴0
no
 
@rak1507 Nope, that's not a function.
 
yeah
oops!
that would be the same length...
 
You mean it'd be the same length if you add ? Yeah, but you just need to replace that 0 to fix it!
 
11:35 AM
can't think if anything shorter than 0⍨
 
How about a function that returns 0?
 
that's what I'm trying to think of
oh, ≡
 
Yup.
To save 2, you need ⎕ML←0's ⊃⍤⍸⍴∘∊⍷⊢ or Extended's ⊃⍤⍸⍴∘>⍷⊢
 
11:51 AM
{*&~+/'y':x} appears to work in oK
 
I don't even…
 
y':x is acting as 'window'
 
Ah, so it finds the first length-N window with the sum=0.
 
yep
(empty list if no matches, which may not count as a 'value')
 
Clever. That's ⊃⍤⍸0=∨/ or ⊃⍤⍸⍤~∨/ in APL.
@chrispsn Why? Does *0#0 really give an empty list?
 
11:58 AM
@Adám in oK it does - not in k9 (0), k7 (Ø), etc
k7+ has list prototypes
 
@chrispsn Ah, then your solution is certainly acceptable in K7.
 
@Adám, I am looking for this Vector article by Dan Baronet "Introduction to tree-searching in APL: Using the TicTacToe game in 3D, Dan Baronet, 17:1, p.55". I wrote to the Vector archivist email one week ago and have not yet received a reply. Do you know any one who could provide this article ? Thanks.
 
@brgal I think we have it at the office. I'll ask someone to scan it.
 
@Adám Many thanks !!!
 
There are so many ks to choose from, it seems.
 
ngn
12:14 PM
all you need is ngn/k :P download now for the amazing price of €0,00!
 
@ngn Do you take £ though?
Also, what does ngn/k do for *0#0?
 
ngn
@Adám post-brexit, i'm not sure :)
@Adám tio
 
OK, so like K7.
 
ngn
like all ks, i think, except k9 - the black sheep of the family
 
is there a k1?
 
ngn
12:19 PM
@ngn oh, and oK - it does something strange with empties
@rak1507 idk
or even k0? :) this makes me wonder, was there ever an X10? or a 6501 cpu?
 
@ngn X1: June 1984, X10: November 1985.
 
ngn
@Adám lol :)
there was a henry VII too, now i learn :)
 
@ngn In researching K0 I found out what "K" stands for. Anyone knows?
It appears K"0" was just called "K".
 
ngn
@Adám i suspect arthur makes up an answer for this every time he's asked :)
@Adám what's the explanation you found? "keys to the kingdom"? a rotated letter "A"? the easiest key to press?
 
12:35 PM
@ngn "Keys to the Kingdom" ― he wasn't asked, but said it of own accord.
 
 
4 hours later…
4:06 PM
@brgal Hi @brgal .. your timing was most fortuitous .. I was just about to pop into the office to swap the backup disk when Adam's request came through. If you send me (andys@dyalog.com) an email, I'll reply with the article attached as a pdf ..
 
@AndyS I have the email address.
 
 
3 hours later…
7:10 PM
In here github.com/codereport/jsource/blob/main/LIVESTREAM_LESSONS.md it says 'John Scholes started co-dfns', is this true?
 
@rak1507 No, he started dfns.
 
That's what I thought
 
But of course, without dfns, there'd be no co-dfns.
 
Must be a mistake (@code_report)
 
Did Iverson start K?
 
7:49 PM
@Adám Maybe not, but he and Whitney spent a while at IPSA working on a prototype APL interpreter and I think that had a strong influence on A.
 
Oh, @Marshall I wanted to ask if you think BQN is stable enough for
17
Q: Nominations for Language of the Month, 2020 edition

DLoscWe've decided to revive the Language of the Month event. We've also decided to start a new post for nominations. (You can see the old nominations post here.) So let's get to nominating! Procedure A language can be nominated for Language of the Month by posting an answer to this thread. We all vot...

 
@Adám Core BQN is probably more stable than J at this point.
 
;-)
 
8:15 PM
@rak1507 Maybe not:
> bob therriault​: John did the first work on it and I believe Aaron took it to the next level
 
Huh
 
 
1 hour later…
9:37 PM
What a weird paper :) sigapl.org/Archives/… ('72)
That didn't age very well
 
lol
 
ngn
haha
 
ngn
9:55 PM
to be fair, an epidemic is the spread in a particular region. maybe harvard in apl's case. but it didn't go pandemic.
 
10:09 PM
I'm guessing there is no recording / transcript / papers for sigapl.org/Archives/Conferences/APL2007/index.html ?
 
> No proceedings were published for the 2007 conference.
Hm, they planned to publish with the December issue of APL Quote Quad, but that was also the last issue ever, so maybe by then they didn't have the means…
 
ngn
as usual, guy steele nailed it: "the APL community [..] has been rather insular; it's been hard to make new ideas flow either out or in. The key to the survival of APL and its ideas may be increased interaction and involvement with the rest of the computer science and computing community." (from the abstract of his keynote)
which i interpret as: fix your broken terminology, make ⎕io always 0, abandon dynamic scoping, use plain text and standard editors, ..
 
I don't agree. K and J had already made those changes, but didn't sport increased interaction and involvement with the rest of the computer science and computing community.
 
not that I disagree, but everyone will see his statement as saying 'he agrees with my ideas'
 
RGS
10:27 PM
@Adám, are you available? I managed to convince @diogotito to show up here.
 
@diogotito Welcome to the Orchard then. How may I be of service?
 
RGS
@RGS turns out it was a bit more than a week.
 
ngn
@Adám k4 is used a lot, actually. not sure about j, and it still has weird terminology.
 
RGS
I told @diogotito how amazing APL is, and I also told him how you usually introduce people to APL so well :P
 
Thank you!
 
10:30 PM
@diogotito So, you want a quick tour of APL, or even a brief intro course?
 
Well, it's been on my mind to explore an "array-oriented" language for some time and APL seemed interesting, so yes!
 
Aha, OK, so let's start with the array orientation aspect.
An example of that is automatic mapping of mathematical operations: ⋄ 1+(2,3,4,5) (the strange ⋄ symbol is to trigger the bot…)
 
@Adám
┌→──────┐
│3 4 5 6│
└~──────┘
 
/me brings popcorn
 
RGS
@MartinJaniczek /me grabs some
 
10:33 PM
Notice that we don't actually need parentheses or commas for our lists.
 
ngn
@MartinJaniczek haven't you watched this show multiple times already? :)
 
And we can map over both arguments at once: ⋄ 10 20 30 + 2 3 4 ― no explicit loop here!
 
@Adám
┌→───────┐
│12 23 34│
└~───────┘
 
@ngn I've read a few pieces of the APL Cultivation but never saw this in flesh :)
 
That reminds me of my stolen graphical calculator :D
 
10:35 PM
Yeah, TI-Basic does this too.
 
ngn
wake me up for the moment when adam goes "tmn", it's my favourite :)
 
lol
 
@ngn Might take a while. I'm a TMN Turtle.
Included in mathematical operations is comparison: ⋄ 3 1 4 1<1 2 3 4
 
@Adám
┌→──────┐
│0 1 0 1│
└~──────┘
 
But notice that false and true are simply the numbers 0 and 1. We'll use that soon.
We can insert a mathematical symbol between the elements of a list using / (APL uses ÷ for division): ⋄ +/1 2 3 4
 
10:38 PM
@Adám 10
 
@diogotito With me so far?
 
Aaah, so here / works like reduce or fold in some languages?
Yes!
 
Yes, exactly like that. It is in fact usually called "reduce" by APLers.
 
FYI it does tail-optimized fold
 
Now we can count the number of truths with ⋄ +/3 1 4 1<1 2 3 4
 
10:41 PM
@Adám 2
 
RGS
@pitr wdym?
 
Just like the English language, "words" in APL apply to everything that come after them, so the comparison is done first, and then the summation.
 
<moon-child> @RGS foldright on a linked list (linked lists are common in functional languages) uses a bunch of stack space. foldl doesn't, and fold on arrays doesn't since they have random access. I guess that's what they're referring to
 
@diogotito Let's teach you another APL function: ― the index generator. It is spelled with a Greek Iota which you can copy from here for now.
⋄ ⍳5
 
10:45 PM
@Adám
┌→────────┐
│1 2 3 4 5│
└~────────┘
 
ah that seems very handy already!
⋄ +/⍳100
 
@diogotito 5050
 
Yess!
 
Heh, I was just about to ask "How would you compute the sum of the first 100 positive integers?"
 
Oops, sorry!
 
RGS
10:46 PM
@diogotito Btw, for this chat session you might want to use the JS bookmark available here abrudz.github.io/lb
 
@diogotito No need to apologise, you're a natural!
How would you get 11 12 13 14 15 16 17 18?
 
I think I could ask Iota to give me the numbers from 1 to 8 and add 10 to that list
 
Right, do it!
 
⋄ ⍳8 + 10
 
@diogotito
┌→───────────────────────────────────────────┐
│1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18│
└~───────────────────────────────────────────┘
 
10:50 PM
I'm still unsure about whether I should put spaces around operators or not
 
No need.
 
oh
wait xD
 
I was just very subtle about it here:
8 mins ago, by Adám
Just like the English language, "words" in APL apply to everything that come after them, so the comparison is done first, and then the summation.
Note that there's no regular precedence order like other programming languages tend to have. Every symbol takes as right argument everything on its right.
So sees 8 + 10 as its right (and only) argument.
 
Oh, now I see!
I have to generate the list from 1 to 8 first, so maybe...
⋄ 10+⍳8
 
@diogotito
┌→──────────────────────┐
│11 12 13 14 15 16 17 18│
└~──────────────────────┘
 
10:53 PM
Bravo. Btw, parentheses work to dictate order of execution like you're used to.
 
Ok, good to know
⋄ +10⍳8
 
@diogotito RANK ERROR
 
Did you install the language bar RGS recommended?
 
Just partially. I'm still copy pasting symbols right now
 
OK.
 
10:55 PM
Ah, I installed the wrong language. I got it now
 
Note that APL functions either take a single argument on their right, or in addition one on the left.
So ⋄ -10 is negation and ⋄ 10-4 is subtraction.
 
@Adám
¯10
6
 
Btw, negative numbers use a high minus, just like on that graphical calculator you used.
 
⋄ -10
 
@diogotito ¯10
 
10:56 PM
⋄¯10
 
@diogotito ¯10
 
⋄¯¯10
 
You'll see that the language bar has × too ― we use * for something else (exponentiation).
 
@diogotito SYNTAX ERROR
 
@diogotito Nice experiment. It is truly part of the number, like . is part of a non-whole number, so that won't work.
Can you explain this? ⋄ -10=-10
 
10:58 PM
@Adám 0
 
Compare with ⋄ ¯10=¯10
 
@Adám 1
 
Oh! Because now you used - the "word" not the sign!
10 is different from -10, so 0
-0 is 0
 
Yeah. We call them (primitive, i.e. built-in) functions.
And yes, that is exactly right. You're a pro already.
 
10:00 - 23:0023:00 - 00:00

« first day (1454 days earlier)      last day (1203 days later) »