« first day (459 days earlier)      last day (2492 days later) » 

06:23
@EriktheOutgolfer APL\360 Reference Card may come in handy…
 
2 hours later…
07:57
@Adám well...
> DO NOT USE: Tag with the library you mean, [api-design], or something else appropriate instead. Questions asking us to recommend or find an API are off-topic.
:P
(OP removed the tag BTW)
@EriktheOutgolfer Yeah, I saw that, but my "job" was just fixing the typo. OP had clearly intended to use that tag despite the warning (they didn't see due to the typo).
@Adám still, if OP had intended to use that tag, you should've removed it with a comment like "the [api] shouldn't be used, regardless of the typo" and kill two birds with one stone
@Adám hm, I still haven't found documentation regarding the ⌶-beams
 
8 hours later…
ngn
ngn
16:02
Roger's "50 functions" are on top of HN right now
17:23
@ngn Link?
ngn
ngn
@Adám as Pavel posted and news.ycombinator.com
@ngn Thanks.
 
2 hours later…
ngn
ngn
19:08
hm, many of those 50 functions would make good golfing challenges
@ngn Roger is not much into code golf, but why don't you ask him if you may post them is code golfs, with proper attribution of course?
ngn
ngn
@Adám I'll never forget how I once challenged him and later I had to buy 6 bottles of beer - one for each character :)
@ngn Do you want me to ask?
ngn
ngn
@Adám The problems themselves might be a too general to claim any intellectual property rights on them. But the paper might benefit from using shorter expressions, if some are found here on PPCG.
@ngn Not because of copyright; because of common courtesy, and so that you may link to the article – for the greater glory of APL.
ngn
ngn
19:17
@Adám that - certainly
@ngn If you want, you and I can formulate/review them together for higher quality.
ngn
ngn
I read the one about Gray code, I'd suggest this expression: 2≠/0,↑,⍳N⍴2
the Towers of Hanoi looks like it could be simplified too, but it will take me some time to do it
@Adám for the Gray code there's an obvious -2 in the subtitle: 1∘,∘⊖ -> 1,⊖ but he might have made it deliberately similar to 1∘, which generates binary words in their natural order
@ngn I meant formulate/review code golf posts, not golfed versions of his expressions.
ngn
ngn
19:36
@Adám there is a challenge about Gray code already, and one about the Towers of Hanoi with a strange output format
@ngn IIRC, there is a cmp already too.
ngn
ngn
@Adám cmp="chat mini poll"?
@ngn No, compare; ×-.
ngn
ngn
@Adám sorry, I don't understand
ngn
ngn
19:40
@Adám ah...
@Adám that's signum, only one arg
@Adám and not very challenging: 0(<->)⊢
@ngn Oh, right. I've been doing too much TAO lately. Well, × then.
@ngn So which ones are good code golf challenge material?
ngn
ngn
@Adám I personally like the combinatorial ones most - combinations, permutations, gray, stirling, etc.
@Adám the 8-queens expression looks rather long at first sight, it might be worth investigating if it could be made shorter
@ngn NARS has a single operator for all that…
ngn
ngn
@Adám but first, I'd like to post my expr for gray code, and I'd like to crack hanoi
@ngn Go ahead.
ngn
ngn
19:48
@Adám is that the one with three bools as a left argument?
@Adám I remember readin a paper about it
@ngn Why? The idea is to publish good challenges. Then you can worry about answering them later.
@ngn : one-two element numeric left operand.
ngn
ngn
@Adám oh, ok
@ngn I don't like its syntax though. I'd rather have a variant for ! and ?.
ngn
ngn
@Adám variant, like ⍠?
@Adám the second element is optional
(nitpick)
19:53
@ngn Yeah. Then it would apply equally to both. ! calculates how many with such a rule-set, and ? gives you one or more random ones using that rule-set.
@EriktheOutgolfer Hence, one-two (one-to-two).
@Adám hm, I easily read that as "one two-element numeric left operand" :P
@EriktheOutgolfer you moved my dash!
ngn
ngn
@EriktheOutgolfer @Adám what are the two numbers in the left arg?
@ngn the second optional number is a boolean value that decides between counting and generating the combinations
namely the Count / Generate Flag
chat markdown sucks >_>
ngn
ngn
the paper I once read had flags controlling: repetitions allowed, order matters, and I can't remember what the third one was
19:59
@EriktheOutgolfer @ngn 2nd element isn't Boolean, but rather 0:count, 1:generate, 2:generate+sort, 3:generate+Gray.
@Adám ah so Gray is that easy in NARS2000...well, I don't think 2 and 3 are going to be used often anyway, it's NARS :P
(and why is Gray a built-in >_>)
@ngn The first element is set/indices, partition/permute, combos/multi-sets/order-sets.
ngn
ngn
@Adám it might be the same thing I was reading
@Adám do you have a link to the pdf?
ngn
ngn
@Adám that one! thanks :)
at school we learnt about these as different combinatorial structures, now this is a unifying concept
20:08
@ngn I still don't like having count and generate on the same primitive when we already have a count and generate primitives. And the sorting is not really related to the problem at all.'
ngn
ngn
@Adám are you sure that's "sorting" as in sort the result?
@Adám or is it something intrinsic to the combinatorial structure - "order matters"?
@ngn if it's really just sorting (which I think it is) then it's completely meaningless...
I mean, sorting a matrix by major cells is almost as easy as adding two numbers
@ngn Sorting. See right before TOC here.
OK, gotta go catch the bus.
@Adám good luck!
ngn
ngn
@EriktheOutgolfer right... but sorting a matrix so that every two consecutive rows differ by exactly 1 element is not so straightforward (the Gray code option)
@EriktheOutgolfer also, I'm guessing it might be more efficient to generate combinatorial structures in a certain order, not necessarily lexicographic
20:24
@ngn yeah me too, however that doesn't make the 2 option make more sense ;)
(also, the syntax is godawful, why don't the three parameters represented as the first element of the operator's left operand get represented as three separate elements instead‽)
ngn
ngn
@EriktheOutgolfer I agree
20:44
@ngn yeah, especially since APL is an array-manipulation language, but then you try to use arrays as sparingly as you can!
what kind of logic is that...
ngn
ngn
@EriktheOutgolfer I guess they got tired of typing spaces between the numbers :)
@ngn then support four modes with each mode having a different number of arguments ;)
ngn
ngn
@EriktheOutgolfer modes?
@ngn singleton -> FS = integer, CG = 1; pair -> FS = integer, CG = integer; three elements -> FS = three elements, CG = 1; four elements -> FS = three elements, CG = integer
ngn
ngn
@EriktheOutgolfer Yeah, that would have worked too. I'm not sure how other APL-ers would have accepted it.
@EriktheOutgolfer it's a similar situation to ○ (circular and hyperbolic functions)
20:55
@ngn ○'s functions are mostly trigonometry
(∆ was used for S∆F and T∆F controls back in APL\360's time)
ngn
ngn
@EriktheOutgolfer I mean, you have two-or-three flags (or ints) encoded as a single int in the left argument
@EriktheOutgolfer if you imagine a right triangle with two cathetes and a hypotenuse, ○'s left arg encodes what we know and what we are trying to find with the corresponding trig function
@ngn well, the functions have other uses too in this case, and the sign encodes whether the function itself or its inverse will be applied
even though that 0∘○ isn't really its own inverse
ngn
ngn
@EriktheOutgolfer I'm only saying it's a similar dilemma to the left arg of !! (nars's twelve-fold way function)
○'s left arg could have been a vector of flags (or ints)
@ngn the APL concept hadn't been exactly shaped completely in 1966 :P
ngn
ngn
@EriktheOutgolfer it's still evolving slowly :)
21:06
@ngn I mean, ○'s concept was already final back then
ngn
ngn
@EriktheOutgolfer I think later some APL implementation extended it from 12 to 16 values, I can't remember which
@EriktheOutgolfer I found this great answer on stackoverflow :)
@ngn thanks for the self-promotion optimistic reference :)
@EriktheOutgolfer Yeah, you can see how that eventually became ⎕STOP and ⎕TRACE.
ngn
ngn
21:30
I didn't expect the Dyalog logo here :) quantumcomputing.stackexchange.com
@EriktheOutgolfer Yeah, I really don't understand the syntax decision. Both M?N and M!N mean take/count M from N, so why didn't they let have the same sort of syntax? M(ReturnType‼LabelledBalls LabelledBoxes BallsPerBox)N, similar to the syntax of Rank . One could even make the return type optional by allowing a "diminutive" call M‼LabelledBalls LabelledBoxes BallsPerBox⊢N similar to how X@B⊢Y is the same as X⊣¨@B⊢Y.
@ngn it's kind of different, and I think that's too simple to be trademarked...
ngn
ngn
@EriktheOutgolfer and it doesn't have a white D on top
@ngn It isn't on top ;-)
yeah it's on the front, there are three dimensions being implied by the cube there
@ngn that looks trademark-able enough to me :P
ngn
ngn
21:35
if you lock a bunch of graphics designers in a room with photoshop and wait long enough, eventually one of them will come up with an orange cube...
@ngn It isn't a cube ;-)
@Adám 3D graphics - three rhombi...
@EriktheOutgolfer The D's shadow clearly gives away that the three-tone hexagon is in fact flat.
ngn
ngn
@Adám ok, an object which when viewed from a 45 deg angle from the front-top looks like an orange cube
@ngn ^^
No, wait, I forgot that that isn't even a shadow. The logo is flat and consists of a white D and two brown irregular shapes on a three-tone orange hexagonal background.

« first day (459 days earlier)      last day (2492 days later) »