« first day (2445 days earlier)      last day (204 days later) » 

4:09 AM
@Lapwing482 For small examples an adjacency matrix works fine. If you really have a tree, then depth and content (and other metadata) vectors is a nice way to go, a la co-dfns and the video linked by Adám above. If you have a DAG, then you can unfold it into a tree and keep a a node ID vector to keep track of mergers.
If you need fully general and potentially large graphs, then you'll want to exploit some of your problem structure to get something better. Will a spanning tree and some metadata work? Maybe a sparse matrix rep. of the adjacency matrix gives you decent handles on the features you want to talk about? Maybe you just need to do some rabbit-hare alg. to detect a specific loop?
Adjacency lists can also be nice.
 
 
1 hour later…
5:37 AM
Lol I found there is about 0.000554017 probability for +/ . * and +/ @: * to produce significantly different result for float number vectors.
They difference is about 1e_17
 
 
6 hours later…
11:31 AM
Hi!
I'm currently learning APL using the Neural Networks with APL youtube series, does anyone have any other tips on learning resources apart from the ones linked on Dyalog?
 
12:30 PM
Note: APL Quest in half an hour. Note the earlier time!
 
12:59 PM
Welcome to APL Quest 2021-8! Today's quest is Time to Make a Difference:
> Write a function that:
> • has a arguments that are numeric scalars or vectors of length up to 3, representing a number of [[[days] hours] minutes] — the arguments do not necessarily the same length.
> • returns a single number representing the magnitude of the difference in minutes between the arguments.
 
|⍤-⍥(1 24 60⊥¯3↑⊢)
 
Yup, that's what I had, except I didn't include
Actually, I had ¯3∘↑ too.
|⍤-⍥(0 24 60⊥3∘↑) is quite a nice example of function composition, as it has both Agh train, Atop, Over, and argument binding.
 
@Adám that doesn't work, does it?
 
Why not? f⍤g ←→ f g
 
I was trying to think of ways to us ⎕DT couldn't get the correct format to work out.
 
1:06 PM
Right, let's try that then.
 
2 30 |-⍥(1 24 60⊥¯3↑⊢) 5 15
results in
(1 15)
instead of
165
 
@Adám with the brackets to stop ∘ having ⍥ as part of left argument?
 
@Richard Right, it is a 2-train, so you have to isolate it by naming or parenthesis.
@Silas Not exactly. Without parens, it would parse as (|⍤-⍥0 24 60)⊥3∘↑
@mitchelljohnstone ¯30 looks promising.
 
@Adám ok - from short right scope? Was trying to work out why couldn't tacitify to |-⍥1 24 60∘⊥¯3∘↑
 
Yes.
Hm, using ⎕DT isn't as simple as I thought. Anyone else working on it?
 
1:13 PM
¯30 is promising but fails at 1+ today's international day number, yes?
i don't think it'll work for arbitrary number of days. ⎕DT will reject invalid dates
 
@Razetime I don't understand why, though.
 
i was mistaken
 
Note that the ⎕DT docs are wrong for ¯30
I don't follow why ⊂¯4↑⍵,0 is invalid.
E.g. for 5 15 we get 0 5 15 0 which should be 1899-12-31 05:15:00.
 
it requires 7 elements
that the docs get right
 
Oh, stupid me 🤦‍♂️ I was just using ⎕DT wrong.
No, it requires up to 4.
 
1:20 PM
APL.
Affero's Planning Language.
 
(I've wanted to relase APL code under the APL license, but it really isn't a good fit.)
 
`DOMAIN ERROR: Date-times which have year, month and day components or are formatted must be between 1 January 0001 and 28
February 4000 in the proleptic Gregorian calendar
(¯30 ⎕DT∘⊂⊢,0)5 15`
 
I will use APL
 
@mitchelljohnstone You need ¯4↑
 
I will not use APL.
@Adam Can APL calucate "I will not use APL" to be in the confines of what is set by "I will use APL"?
 
1:23 PM
I don't know what you're even asking.
 
¯30 ⎕DT⊂2004 1 1 10 does something
although i don't understand what it's giving me
maybe 30 1⎕DT
 
It should be ¯30 X ⎕DT
Where X is the destination format, e.g. 20.
 
@Adám What I mean is can APL calucate the text "I will not use APL" to not be against the text "I will use APL"?
 
However, this approach fails because we have to handle negative numbers.
 
why is that so? we can hard code the logic to always feed positives to ⎕DT
 
1:25 PM
@The_AH Not without writing or using some NLP library and implementing some logic rules, but since APL is a general purpose programming language, it is certainly possible to do so.
 
I was worried about having to handle negative dates ⍨
 
@Adám Are they any existing NPL libraries?
 
@Razetime A DateTime like 2023-10-06 12:¯34:56 makes little sense.
 
hmm ok
 
@The_AH Nothing modern that I can think of.
However, the problem statement simple has us add up to three weighted values, without needing to consider them an actual time stamp.
 
1:28 PM
That's just going back to the ⊥ route though
 
Right, is just a fancy +.×
 
How I will form APL.
string A +
string P +
string L
So basically a quine.
 
|-⍥(1440 60 1+.ׯ3↑⊢) works fine.
 
How do put that in APL code?
 
'A','P','L'
 
1:30 PM
@The_AH you'd be missing the catenation characters
 
@Silas Simple.
'A,','P,','L'
 
But that doesn't give itself either.
The shortest known non-cheating/trivial APL quine is 1⌽,⍨9⍴'''1⌽,⍨9⍴'''
See apl.wiki/Quine for more.
 
What about "''"?
 
that doesn't give itself either
 
What about "\"\""
That will return "".
 
1:35 PM
Which is not a quine either. Also, APL character literals don't have escapes.
 
Okay...
 
And most APLs don't even allow you to use double quotes.
 
WAIT WHAT.
Why has this world come to this.
 
@The_AH How much APL do you know, if I may ask?
 
Why must programming design embrace this?
@Adám 0
 
1:36 PM
Then I suggest you go learn some :-)
 
Corrected to stop syntax errors.
@Adám I am not going to learn a language that destroys good programming design.
 
Destroys? How so?
 
Quest finished? Thanks!. I am not sure if I can attend next week.
 
Not allowing double quotes. PERIOD.
The destruction that causes is more then repairable.
Impossible.
 
Yes, I suppose we're done with the APL Quest. Thanks, all. See you next week for 2021-9: In the Long Run.
 
1:38 PM
It will destroy programming as we know it.
@Adám Isn't that from 2021? Why are we doing it in 2023?
 
@The_AH That makes no sense. How can the absence of a feature in a single language, affect programming as we know it?
@The_AH Yes, we're going through a collection of old problems.
 
@The_AH More they're not needed to differentiate between a single character and a string. So why have both single and double quotes when single quotes work?
 
@Adám This will spread and effect programming for the worse.
@Silas Double quotes are more beautiful, natural. Single quotes however are the DEVIL.
Please step out of this decision, embrace programming.
Embrace OOP.
Embrace the already known.
Embrace what works.
 
@The_AH APL has been around for well over half a century. I think we can conclude that its practive when it comes to character literals isn't spreading much.
 
@Adám But you are still supporting it!
 
1:42 PM
I didn't say that. I only informed you that your approach to an APL quine couldn't work.
 
Oh.
 
@The_AH Um, APL worked fine well before OOP and escaped strings were invented.
 
@Adám I mean it metaphorically.
I mean embrace what we should embrace, embrace what every language uses now.
apl.should_embrace("oop!")
 
The APL I use has full OO support.
 
(Dyalog) apl has OOP, it's just not the main paradigm
 
1:44 PM
It's OOP first of all.
Second of all I don't see OOP much in APL code?
 
How much APL code have you looked at?
 
Well a bit...
If I cannot find OOP in a bit then usually the language doesn't have OOP support.
 
You could read this section or have a look at code like this.
 
Well languages usually have OOP in their hello world examples! (Java, C, C++, C#, etc)
 
APL doesn't need OO for that.
 
1:49 PM
Is that a bad or good thing...
I cannot put my finger on it.
 
@The_AH You can do this in Dyalog APL:
      ⎕USING←'' ⋄ ⎕NEW System.String(⊂'hello world')
hello world
But why would you when just 'hello world' has exactly the same effect?
 
Actually that's a good thing.
 
@Adám I am trying to put the result of three functions underneath of each other (one matrice). All three results are vectors of the same length
(...)(...)(...)
⍪ or ,[0.5] doesnt work and also ↑ only works if there are 3 vectors

For example (2+/⊢)(2-/⊢)(2=/⊢)
 
(2+/⊢)⍪(2-/⊢),[0.5](2=/⊢) should work.
 
thanks!
 
2:50 PM
Event in 9 minutes!
 
 
3 hours later…
5:51 PM
@Adám interesting, that's shorter than the traditional approach of something like f←{'⋄f⍬',⍨,⎕CR'f'}⋄f⍬
(or do you count that as a "cheating quine"?)
 
 
4 hours later…
9:49 PM
Reading the article, quite like Jay's one. Seems similar in spirit to typical scheme quine
 

« first day (2445 days earlier)      last day (204 days later) »