« first day (1216 days earlier)      last day (1428 days later) » 

4:41 AM
An idea for APLcart entry: cumulative function power; {⍺} (⍺⍺ f ⍵⍵) ⍵ returning a vector of results of {⍺} (⍺⍺ ⍣ ww) ⍵ where ww takes each value of ⍳⍵⍵ (possibly depending on ⎕IO).
 
 
2 hours later…
6:14 AM
Now I have a good reason to include older challenges in the SEDE query.
 
RGS
6:30 AM
@Bubbler the fact that the input is described as being a Jm makes me think we didn't really assume the input was a Boolean matrix... But that was one of the things I wanted Adám to clarify, the fact that we are replicating edges with their weights
@Bubbler what is that 3 standing there, alone?
 
Actually the "task" could be better if it gives you some test cases along with the description...
@RGS That one uses the adjacency list from dfns, where the i-th element denotes outbound edges from node i, listing only destinations.
 
6:47 AM
@Bubbler I see you've only made the change to the unrestricted version. My point with TIO-linking the restricted superset version was that by moving the pre- and post-processing out of the unrestricted code, you clearly show that it is indeed just extra pre-and post-processing:
'no' 'yes'⊃⍨  {…}  ↑{⍞}¨⍳8
 
Oh yeah, makes sense
 
(Now you just need to update the explanation.)
 
(Well, I'm too lazy...)
Explanation updated.
 
RGS
7:33 AM
@Bubbler ah ok, I didn't pay attention to the other numbers, just noticed an element alone and got thrown off by that; thanks for the explanation
 
8:17 AM
Paying it forward:
1
A: List of bounties with no deadline

Bubbler100+ rep for APL answers/outgolfs to Bubbler's challenges/answers To celebrate me (Bubbler) reaching 25k rep (with over 100 answers in APL, 50 challenges written, and several thousands of rep gained from Adám's APL bounties), I will share some of my rep for even more APL answers! Specifically, ...

3
 
8:53 AM
Announcement:* New (golfier) list format for my bounties.
 
9:13 AM
@RGS @Bubbler It isn't so much what "I" do as much as what I copied from the FinnAPL idiom list. I'd be more than happy to leave the creation of a good PR in the capable hands of the two of you…
 
RGS
@Bubbler Are you interested in working on this ^ ? Should one of us do it? I have made some PRs to aplcart and don't mind doing another but also don't want to prevent you from having some fun; we could also coop if the size of the possible changes allows it
 
RGS
10:04 AM
@Adám is this going to happen tomorrow?
 
Do you think it would be interesting?
 
RGS
@Adám I do
 
Oh, right. I mean, sure, we can try it.
 
RGS
@Adám np; also, I'm just asking. I'm interested but I'd say there's no point in organizing it "just for me". do you understand what I mean?
 
Right. I'll make an announcement (with meeting ID and password) here before opening the room, and then we'll see how popular it turns out to be. I'd probably have to be after 16:00 our time, though.
 
RGS
10:13 AM
@Adám as far as I am concerned, the later the better (usually)
 
10:29 AM
Now I'm writing code to generate password generators. I'm thinking
(⍕1+?6),('!×*∧∨⌈⌊'[?6]),'(⍳9)-⎕IO'
 
RGS
@Adám I love all-things-meta
@Adám Pasting this on my interpreter I get (random outputs like) 4×(⍳9)-⎕IO
But then the output code is deterministic code
 
@RGS Yeah, the idea is that I'll post one of the 36 possible outputs before the meeting and the password will be the output from that.
 
RGS
@Adám so your password generators are just short expressions that produce deterministic output?
 
Yes.
These are simple enough that anyone with any APL interpreter can evaluate them and type them into Zoom.
 
RGS
@Adám true
 
10:37 AM
I'd prefer though to generate expressions that can be evaluated by hand.
 
RGS
@Adám Like simple mathematical expressions?
 
@RGS I'd like to participate, though the progress will heavily depend on my free time.
 
@RGS Simple APL expressions that are not identical to TMN.
 
RGS
@Adám aren't these simple enough?
 
They are too hard to do without an interpreter ready.
Heh, much better: (⍕?95),'+⍳4'
 
RGS
10:42 AM
@Bubbler alright but what are you thinking we should do? This doesn't have to be a big thing
@Adám That is not ⎕IO independent :O
 
@RGS Ah, right. Have to correct that.
 
RGS
@Adám how do I include a ⍝ inside a string in APL?
 
@RGS The only non-literal in APL strings is ' which has to be doubled.
 
@RGS I'll think about it later. Gotta leave for now
 
RGS
@Adám (⍕?95),'+(⍳4)-⎕IO ⍝ ⎕IO delenda est' :-D
@Bubbler sure thing, will wait for you to get back to me
 
10:45 AM
(⍕(10×?9)+¯1+?6),'+(⍳4)-⎕IO' to make computation in the head easier
 
RGS
@Adám and yes, I was tripping over an extra ' that was doing some funky business
 
@RGS How about (⍕?95),'+(⍳4)-⎕IO⊣''delenda est''' ?
 
RGS
@Adám is it possible that ? takes ⎕IO as implicit argument? Because I'm still getting additions of the form X9; or is that intentional?
 
@RGS Of course it does. It chooses from ⍳⍵
 
RGS
@Adám what about (⍕(10×?9)+(?6)-⎕IO),'+(⍳4)-⎕IO'⊣'delenda est' ?
 
10:50 AM
I don't need the generator to be ⎕IO agnostic.
 
RGS
@Adám I thought you did, that is why I'm bothering you with these fixes.
 
No, I know what ⎕IO I'm in, but the participant who has to generate the password might not.
⍎⎕←⊃{⍺,'⊣⊢'[?2],⍵}/⍕¨?⍨5 would be nice too if wasn't that APLs vary when it comes to the left and right tacks.
 
RGS
@Adám yes, which is why I thought you wanted the generator to be ⎕IO agnostic...
 
Oh, confusion of terms, as I'm writing a generator for password generators.
 
RGS
@Adám this one looks really nice :D bonus point if it generated parenthesized expressions
 
10:54 AM
@RGS Yeah, but it is no good in APL2.
 
RGS
@Adám oh right, sorry for that; now I get it
 
Ooh, I found a nice one: '⌈⌊+'[?3],'/',⍕?4⍴4
Though a 1-letter password might be to short.
'⌈⌊+'[?3],'\',⍕?4⍴4 then.
 
RGS
what about '⌈⌊+×-'[?5],'/',⍕?4⍴4
 
Too hard. '+\',⍕?4⍴4 is actually plenty, with the added benefit of working in J and K too.
 
RGS
@Adám Zoom allows to set 1 letter passwords
 
 
1 hour later…
RGS
12:21 PM
@Adám do you think I annoyed Morten or he is swamped with the 18.0 release? :O
 
@RGS I'm not sure exactly you're referring to but he literally right now wrote me that he's been working around the clock for the last 3 days.
 
RGS
@Adám don't worry, that settles it
 
 
3 hours later…
RGS
3:42 PM
@Adám Tomorrow I'm travelling to the north of the country for a funeral so I think it would be really interesting but I will have to skip this one :/ I hope you guys have fun, though
Last minute thing so when we talked some hours earlier I couldn't know
 
 
3 hours later…
RGS
6:17 PM
Is (≢(/⍨⍨)⍪) worth adding to APL Cart as create matrix with columns as vector or something like that?
 
@RGS So it takes a length-N vector V and creates an N-by-N matrix with V in every column?
 
RGS
@Adám Yup; or instead change the entry to Ns (/∘⍪) Mm taking the amount of columns on the left and the vector on the right
But I have been doing the task achieved by (≢(/⍨⍨)⍪) a lot. It just annoys me that I have to spend 5 bytes ensuring / behaves as a function and not as an op. Maybe this can be rewritten in some clever way?
 
@RGS ∘.⊣⍨
 
RGS
@Adám neat! and ∘.⊢⍨ does the transpose, i.e. lays the vector as rows; really cool
 
6:34 PM
@RGS Go ahead and add ∘.⊣⍨Yv and ∘.⊢⍨Yv, but the description needs some thought. Maybe "Matrix with one column/row of Yv for each element of Yv" or maybe "≢Yv-column/row matrix with Yv in columns/rows" ?
 
RGS
what about "Expand(replicate?) Yv to a square matrix row by row" or "Lay out Yv as the rows(cols) of a (square) matrix"
 
@RGS "Yv as the rows/columns of a square matrix" is good.
 
RGS
@Adám alright, consider this added to my (TODO) list
 
CMC: Given a Boolean vector Bv and a numeric scalar Ns produce Ns×Bv without using any arithmetic functions.
 
RGS
@Adám which functions count as arithmetic?
 
6:41 PM
@RGS +-×÷|⌊⌈*⍟!
 
RGS
Ns @⊢ Bv
 
@RGS Nice. Can you make it shorter?
 
RGS
so there's a 1 byte solution?? let me think :)
 
There is indeed, and it'll even be a proper function you can give a name, as opposed to @⊢ which would have to be ⊣@⊢ to be a proper function.
 
RGS
@Adám if there is a 1 byte solution I guess it already is a function as it is probably a built-in
 
6:46 PM
@RGS correct
 
RGS
ns ∧ bv
 
@RGS Ah, ok, that's cheating. I should have banned the logical ones too.
 
RGS
Makes a lot of sense; I just never use ∨∧ with non-boolean arguments and forget how they work
@Adám oh wait so there's more..? searching!
 
@RGS Yup, an entirely non-computational function.
 
RGS
@Adám I don't understand what that means :D
 
6:50 PM
@RGS Some functions do mathematical stuff with the actual scalar values. This won't, just like your initial solution. In fact, it is pretty much a primitive equivalent of that.
 
RGS
bv \ ns
 
Well done!
 
RGS
@Adám Thank you, thank you! I will be here all week (the autograph session is Wednesday)
 
 
2 hours later…
RGS
8:53 PM
@Adám are error guards adequate mechanisms to provide some default behaviour in a dfn?
By adequate I mean "making sense in the context of well-written APL code"
 
@RGS I guess you could use them as such, but I much prefer proper testing and a guard to quit early with the default, before the error happens.
 
RGS
@Adám the point being that proper testing appears to be much more expensive than just having a go at it
 
Did you compare performance? Collecting the diagnostic information can also be expensive (which is why Dyalog tries to be lazy about it).
Sometimes you have no choice though. E.g. you may know that Dyalog APL objects can be scripted or unscripted. However, to test if an object is scripted, your current only option is to try to ask for the script and trap the error if there is none.
 
RGS
@Adám I didn't compare performance, can most certainly do it. If there is an error and it is caught by the error guard Dyalog will still "collect the diagnostic information"?
 
@RGS Yes, as the code can continue and then analyse what went wrong.
 
RGS
9:37 PM
@Adám from within the error guard? is there some "magical variable" (perhaps accessible through some ⎕XXX) that becomes available?
e.g. like in Python we can do smth with
try:
    code that errors out
except Exception as e:
    print(e, " was the error")
 
@RGS Yes, ⎕DMX returns a namespace with details about the last error in this thread.
⎕JSON⍠'Compact'0⊢⎕DMX is an easy way to get a full error report.
 
RGS
@Adám Interesting snippet, thanks!
It makes sense now, thanks :)
 
@RGS Sure thing. Another reason to avoid relying on errors is that it complicates things if we extend the language. E.g. we had a customer that relied on roots of negative numbers erroring, rather than explicitly checking if the numbers were positive. Then we added complex number support…
 
RGS
@Adám Ok, that is a really strong argument...
One thing I have been really enjoying about APL is that when solutions click, they just click... and writing them down once you know what you want to do is really easy
2
 
10:00 PM
@RGS Yes, it is (and was always intended as) a language for humans.
 
RGS
10:38 PM
@Adám I can tell... This has happened a dozen times now: me on the interpreter playing around with some data to solve a problem, incrementally defining intermediate variables with intermediate calculations and steps, and then arriving at the final solution...
And then I just close everything because I have to go, and I don't even have to worry about saving the workspace because of what I just said; the solution already clicked, and because it is APL it will be really easy to rebuild it from scratch...
(of course it helps that I haven't been solving super duper complex problems :p )
 
@RGS Also, if you enter )off then your session log is saved, so you can simply scroll up when you're ready to continue.
 
RGS
@Adám that is helpful but goes against the point I was trying to make :) is the log easy to find?
 
@RGS I know. Just saying. What do you mean about the log being easy to find? It is loaded on start by default. The file?
@RGS Another trick instead of coming up with a nice workspace name, is simply entering )continue, and then when ready to resume, enter )load continue
 
RGS
@Adám ah ok, I thought I had to load it manually.
@Adám another really nice tip... Wouldn't you like to have these at, say, abrudz.github.io/tips ?
 
@RGS We need a proper tutorial on how to use the IDE…
 
RGS
10:47 PM
@Adám what would be a nice format for that? Worst case scenario, this could be internship material (TODO)
(just realized that if I tag possible tasks of mine with a consistent value then it'll be really easy to search for them in the chatroom!)
 
@RGS Probably some video intros.
 
RGS
@Adám screencasts?
 
Yes. Like Dan "APLtrainer" Baronet used to do.
 
There should also be good "print-only" documentation/tutorials; some people (/me raises his hand) do better with good textual explanations than with video presentations.
 
RGS
@JeffZeitlin I am also a big fan of "readable" material
Have to go for now; bye @all
 

« first day (1216 days earlier)      last day (1428 days later) »