@ngn i'm trapping domain errors, because the streams are "infinite", which means they're going to halt eventually
and they'll halt because of a domain error in the iterator or mapping function
i don't want it to be handled by something else / displayed
@Adám hmm, right, i was thinking if i can somehow avoid using tradfns, but this feels really weird for me. there is no way to mutate a vector a few stack frames above in a dfn?
> We have made important fixes to 18.0 in the time since then, so please visit our website and download our latest available Dyalog for Linux from our Download Zone.
@Bubbler right, but pure performance isn't the goal of the APL problem solving competition. You can disagree with that it isn't, but within the limits that it is, there's not really much choice on how to do scoring
@rak1507 While you really should understand the problem and solution well to write the code and comment it such that we can understand your understanding, there is really no way for the judges to prove that you figured out the solution without talking to people / googling (I'm also not sure that's a criterion, but obviously copying the dfns library verbatim isn't gonna be considered great). This is not official advice.
to me talking to people and googling are two very different issues, googling is researching yourself, and talking to people is basically cheating to me
@rak1507 It is not a test under exam conditions, people have months
The crux of the "good" to me really is the (fundamentally subjective) aspect of good programming - expressing ideas to other humans in the form of executable code
For which you almost always have to make trade-offs in the real world between time spent coding, execution speed, memory usage, readability and maintainability etc.
@Bubbler Well partially all it takes is for people to post their specific questions as a thread there and post a link here, but this place seems to have evolved quite naturally over the years so I'm not gonna be the one dickhead going "please, please guys... hey guys can you post your Qs over there please". Really I should be doing that for both TA but also getting people to repost certain questions on stack overflow as well.
even with @ngn's 'deep where' it can sometimes be awkward to target parts of a nested structure, but i guess the point in k is that keeping things flat often keeps it simple
i haven't had a chance yet but i'm looking forward to digging into aaron/johnE/arthur's work on trees
@RikedyP Having completed the beta test of the comp, that was a concern I raised -- it wasn't quite clear to me if this is a problem-solving competition, or a "beauty contest". If a set problem can be solved trivially, or significantly easier by using a routine found in the 'dfns' workspace -- arguably the closest thing Dyalog has to a standard library -- to me, that's a great, practical, production-oriented path to take.
If you don't agree (the competition management committee) - then don't set problems where this is the case.
@KamilaSzewczyk We were just discussing this annoyance today. For now, you can hack it away by editing ide.js where there's only one mention of StatusOutput. I assume that making that function be a no-op solves the problem.
@RikedyP as to plagiarism/research -- that's a grey area, right? Half a century's worth of the best APL code snippets are to be found in APLCart. It's part of my workflow now to first try to articulate what I want to achieve and enter that into APLCart. Is that acceptable?
for some reason i end up iterating on individual characters, sometimes i end up joining them, sometimes i end up splitting the string and catenating each letter in boxes
the nest operator seems to be a godsend in most cases
here are a few reasons why i picked this over dfns:
1) the code feels more readable than keeping the state in a single boxed array 2) no scoping problem, no dyalog bugs to work around 3) tradfn's don't return after a single non-assignment statement
for comparison, the small dfn you've seen took me around a day to write, and the thing you've seen a second ago took me 10 minutes to write, debug and test