« first day (3839 days earlier)      last day (997 days later) » 

11:00 PM
First time I see 1 2 2⍉ I think.
 
1 2 2⍉
wow
 
I would have done 1 1⍉⍤2 for clarity.
 
@UnrelatedString For your Jelly tip: Specifically, if the links grouped together are an LCC without the leading constant (aka, if they are monads, dyad-nilad pairs or nilad-dyad pairs) then it'll ignore the right argument passed to it when making it dyadic (so if the chain looks like 2,¹,(1|2,0|0,2)$ƊƲ it can become 2,(1|2,0|0,2)¥ɗʋ)
 
@Adám so that's what it does
 
See‽
 
11:00 PM
fair play to whoever that is for doing something extremely cool
 
@Bubbler Fair enough. Thanks from m&, answer. I didn't realize b. _1 return dynamic answers like that...
 
does the code work? I cba testing
 
@Jonah I know close to nothing about bash, but I think that just looping over each line and applying an if is likely to be the shortest, barring some crazy clever trick
 
@rak1507 Yes. And not the only 3D one.
{1=≢∪,+/↑((⊢⍪1 1∘⍉)¨(⊂,⊂∘⌽∘⍉))⍵} too.
 
@cairdcoinheringaahing Possibly. It feels like you should be able to do with sed or awk succinctly, but I'm not seeing a great way.
 
11:03 PM
If you know yes will never be in the lines, you can replace foo with yes, then replace everything that isn't yes with no
 
(Why is there white powder all over my laptop‽)
 
@cairdcoinheringaahing That's not bad. Thanks.
 
@Adám I don't know if this is a cocaine joke or not
 
cleaning it up a bit, ∧/2=/1⊥⊢,⍉,2 1 1⍉⊢↑⍤,⍥⊆⌽
 
@Jonah It's not much, but happy to help :)
 
11:05 PM
@cairdcoinheringaahing good point
 
that last bit is pretty horrible I feel like there might be something better
 
@cairdcoinheringaahing No. As far as I know, I don't possess any. But then again, if I did, I might not be aware of it…
 
I need to try more elaborate dyadic transposes in future...
 
@Adám Clearly your children keep spilling their stash on your keyboard :P
 
@rak1507 Dyadic transpose and the rank operator are the keys to the array kingdom.
 
11:06 PM
I think I've just about figured out rank, apart from 3 argument rank
dyadic transpose still eludes me though
 
@cairdcoinheringaahing Darn, they start early, these days, don't they‽ (They are 7 and 9.)
 
apart from very simple things like 2 1 3⍉
 
@rak1507 You mean ⍤p q r?
 
yea
don't think I've ever used that
 
It is only useful for ambivalent functions.
p is used if called monadically.
q r is used if called dyadically.
 
11:08 PM
ah right, yeah, not particularly useful (to me anyway)
 
You won't need it for problem solving purposes
 
@rak1507 Have you mastered multiple rank?
 
@Adám as in f⍤...⍤...? maybe not 'mastered' but I've used it once or twice
 
Yes.
 
in The APL Orchard, Jan 20 at 14:40, by rak1507
@xpqz I used double rank once and I felt like a god
still true
I think I had double rank in a phase 2 solution but replaced it with something nicer
 
11:11 PM
CMC: Given a list of length n and a 3D array with n rows in each layer, append each element from the list to the corresponding row in each layer.
 
Can you provide an example?
 
Example list [10,20,30,40] and array:
[[[1,2],
  [3,4],
  [5,6],
  [7,8]],
 [[9,10],
  [11,12],
  [13,14],
  [15,16]]]
Result:
[[[1,2,10],
  [3,4,20],
  [5,6,30],
  [7,8,40]],
 [[9,10,10],
  [11,12,20],
  [13,14,30],
  [15,16,40]]]
 
,⍤1 0⍤2 1
 
@rak1507 You can strip away the final 1
 
11:13 PM
oh, true
 
@cairdcoinheringaahing For once, a Jelly answer I can type without copy-paste :P
 
,⍤¯1⍤2
 
Yes, that too.
So ∾˘⎉2 in BQN.
 
wait, ,⍤2 works as well anyway
 
Oh, bad example.
 
11:16 PM
yeah, I was too busy thinking of double rank to see the single rank solution :P
hey, ties jelly! yay
 
Me too.
Let's come up with a different operation than concatenation.
(Or actually, I should get my webinar ready…)
 
any arbitrary function f: f⍤¯1⍤2
 
Yeah.
 
0
Q: What's my PIN number?

caird coinheringaahingMy PIN number is 1077, but that's too difficult to remember. I know from muscle memory that it's a digit, followed by a different digit, then followed by two of the same digit, which is different to the other two digits before it. As a pattern, we can say it is ABCC (where each letter represents...

 
No one steal all my money please :P
 
11:20 PM
Is it really?
 
@cairdcoinheringaahing Don't worry, I'll leave some for you.
 
Click the link on 1077 :P
 
what do you think of ⍺⍺ and ⍵⍵ to mean the right and left operand but of a 'tacit operator' if outside of an operator? so you could do (⍺⍺⍤¯1⍤2) to mean {⍺⍺⍤¯1⍤¯2⊢⍵}
 
@NewPosts hehe I have an idea of what your pin is now
 
11:20 PM
the j talk with henry rich got me thinking a bit about the forbidden conjunctions
 
@rak1507 What would happen if such a tacit operator was used in a dfn?
@rak1507 Did you read about (the other) Jx?
 
it would not work, so you'd have to do it in the global scope
 
Ugh.
 
@Adám no, I don't think so
 
@rak1507 which J talk is that?
 
11:21 PM
@Jonah latest episode of arraycast
 
@NewPosts I suppose I've limited the guesses for anyone trying to guess my pin from 1000 possible combinations to 999 :P
 
oh, 'j talk' should be 'conversation about j'
or 'podcast involving the mention of j'
 
Thanks, I'll check it out.
 
@Adám yeah, agreed, what about ⍺ underline and ⍵ underline?
 
@NewPosts So 7! equals 10P4 = 10×9×8×7
 
11:22 PM
@rak1507 Better use and for tacit, no?
 
those are good too
 
I think it would be extremely fun to make tacit operators
 
As if tacit wasn't unreadable enough.
J also allows recursive tacit functions.
Very confusing (to me, at least) how far out (of nested tacit functions) the recursion reaches.
 
@Adám hey, not going to go as far as a certain phase 1 solution :)
 
11:24 PM
@Bubbler The lengths of each: [10, 90, 90, 90, 720, 90, 90, 720, 90, 90, 720, 720, 720, 720, 5040] (same order as listed in the test cases)
 
there's certainly ways to overdo it but for simple things it could avoid a lot of operator-y boilerplate
 
@rak1507 Hm, I've not added any entry for "pornography" to APLcart…
 
@Adám have you got any for the new interns to catalogue? :P
 
11:26 PM
> Readability
(Redirected from Pornography)
..wha
 
Keep reading!
 
If there's one thing I don;t think I've ever associated porn with, it's reading :P
 
> APLers have traditionally used pornography to describe code that is hard to read
 
@cairdcoinheringaahing Didn't people read porn before videos became common?
 
11:27 PM
a←4
(a+3)×a
shouldn't this be
(a←3)×a if I'm understanding it right?
 
Huh, interesting. I've always associated calling things "porn" (in a non-sexual way) as being elegant/beautiful examples, and I wouldn't say "hard to read code" falls under that
 
@Adám I'm 19, so I have no experience with that :P
 
Oooh, juicy!
 
@rak1507 Yes, typo. Will fix.
I fixed the faulty pornography. How should I feel about that‽
 
11:30 PM
@Adám Definitely not what I was hoping for :P
 
can I put 'pornography proof reader' on my cv now?
4
 
@cairdcoinheringaahing Well, respected companies used that term with this meaning, in official documentation, so…
 
> Code golf often results in pornographic code, as does the practice of cramming a whole algorithm into a single line, forming a one-liner.
I guess we're porn stars now...
@cairdcoinheringaahing I agree. That's totally been my association.
 
If some posts porn in chat and another stars it, the star is a porn star, no?
 
@Adám Clicked links are very close to black for me, I genuinely thought you'd forgotten the link to here on aplwiki.com/wiki/Code_golf until I hovered over it and saw the underline
 
11:32 PM
I've always heard it with a positive association in the context of code. Using it to describe bad code is new to me
 
Makes it very difficult to discern what is a link I've clicked and just regular text
 
@cairdcoinheringaahing Interesting. Default Wikipedia styling.
 
yeah I would think of it as being particularly beautiful apl code or something like that
 
"Hot monads in your area"
2
 
hahahaha
 
11:33 PM
Stuff like r/EarthPorn come to mind
 
@rak1507 Yeah, same. To me "porn" is synonymous with "eye-candy"
 
Can't forget about the entirely non-sexual r/HumanPorn :P
 
Anyone up for some ternary association?
 
Haha, good one
How about some dyadic linking?
 
@RedwolfPrograms if you have monads in golang would they be gonads? :P
2
 
11:34 PM
r/yourjokebutbetter
 
I think that's a Jelly thing though, assuming it makes sense even there
 
CMC: enclosed intersection of the union and the mixed-radix representation
 
'monad' can mean single arg function or a monoid in the category of endofunctors :P
 
Especially kinky Jelly coders use chains in their pornography :P
3
 
Jesus, I go away for 10 minutes and y'all are talking about porn
 
11:35 PM

what the actual hell

10 mins ago, 9 minutes total – 42 messages, 7 users, 7 stars

Bookmarked just now by lyxal

 
K coders use trains, which is a bit concerning
 
Oh hey Lynn! We're being totally normal here :P
 
@Adám What does that mean?
 
Nothing strange to see whatsoever :P
 
@Adám I see what you did there
 
11:36 PM
;-)
 
Lmao, I just got it
 
@user I was looking for the tacit equivalent of {⊂(⍺∪⍵)∩(⍺⊤⍵)}
 
Ah
 
Given the topic and that it's evening/night for a lot of people, can we legitimately call this CGCC after dark? :P
 
when is CGCC's watershed?
 
11:38 PM
@cairdcoinheringaahing We're discussing the qualities of golfed production code. Can't really be more on-topic than that.
 
@cairdcoinheringaahing No wonder things took a turn
 
@user Some things might be best left unsaid :)
 
@user fair dinkum!
 
@cairdcoinheringaahing I have unsaid it
Why is the entire starboard just monads and porn now lol
 
same thing to some haskellers
 
11:40 PM
The TNB rule: every sufficiently long conversation will eventually resort to talking about porn :P
 
Rule 35? :P
 
Dyads are all well and good, but let's have us some tryads
 
That must be rule 19 :P
5
 
Rule 69, no?
2
 
Why is nobody following rule 34? Always be nice to everyone! :P
 
11:41 PM
I have some accompanying visuals for that one... :P
 
@AviFS arthur whitney wasn't satisfied with APL's limits so went all the way up to octads
 
Also known as group… oh.
 
I don't know, that might start getting a bit uncomfortable
 
So Imm going to go ahead and just clear all the single-starred messages once this is done :P
 
@rak1507 I thought K could take any number of arguments
 
11:42 PM
Haha, I can't believe we're actually doing this
 
@user nah there's a limit of 8
 
@cairdcoinheringaahing Everybody, star the single starred-messages! :P
 
Meanwhile I'm over here learning about C++ and class stuff
 
@user We frown upon asking for stars.
 
Lisp programmers love sexprs
@Adám :(
 
11:43 PM
@cairdcoinheringaahing @Adám I think he just meant it jokingly to bypass caird's rule
 
@lyxal are you learning about inheritance?
 
Serious question: who at C++ thought bit-shifting a function was the best way to have output
 
I quite like the syntax, actually
 
@rak1507 no, abstract things
 
Operator overloading is amazing
 
11:45 PM
@lyxal I understand each word together, but wtf?
 
@lyxal std::cout is an object, not a function
 
cout << "shift"
 
I never really thought about std::cout << "string" as being bit shifting, 🤢
 
<< is a function
 
A method, right?
 
11:46 PM
Serious question: who at C++ thought bit-shifting a function an object was the best way to have output
 
@cairdcoinheringaahing Because it's not
@lyxal It looks nice, like you're jamming something into a stream
Same with cin
 
@user it is, it's just an operator overload
 
I guess print("foobar") is more regular, though
@lyxal Right, the operator doesn't have to mean bit shifting if it's not working on numbers
 
the question is more: who thought "hey, let's overload bit-shifting to make output happen?"
 
Well, it just happens to be a suitable-looking operator (or at least it was for language designers)
 
11:48 PM
^
 
and I'm pretty sure no one thought about bit-shifting in that context
 
in python you can redefine __irshift__ on things so you can put >>= everywhere to make things look like haskell :P
 
It is slightly reminiscent of APL's output method
 
@Bubbler more importantly though it introduces precedence issues
 
@cairdcoinheringaahing std::cout="foobar" would be more like that but I see what you mean
the idea of using something vaguely arrow like is the same
 
11:50 PM
@rak1507 That would be pretty horrifying, though
 
@dzaima Yeah but you're supposed to wrap things in parens when you're not sure about precedence
 
@user agreed
 
@Bubbler caring about precedence is not something I should need to do when outputting things
 
Honestly, I wish APL had a ⎕P to print or something
It looks weird to assign to and read it and get different values each time
 
I'm not sure what good IO would look like in an array lang, I'm not a big fan of how any of them do it
⎕readln (or something shorter) with an optional prompt left arg and ⎕print would probably be the most similar to other things
 
11:52 PM
@user BQN does that
 
@user You can just define ∆P←{⎕←⍵} as I've done.
 
Printing would be a monadic function, but idk about input
@dzaima How does it take input? Is it a single magic value, or a function with a useless parameter?
 
Input is a niladic function
 
@rak1507 I don't mind Jelly's way tbh
 
input in APL is historically different to input in other langs anyway because you can do completely cursed things like overwrite the input prompt
 
11:52 PM
@rak1507 But what would the right argument be?
 
It's implicit STDIN for ¡ and # are a bit weird but otherwise it makes sense
 
Anything, probably
 
@user currently there's nothing for taking input in the standard :P
 
Ugh.
 
@Adám oh good point in that case just have the right arg be the prompt
and then for no prompt it'd just be ⎕readln ''
(I think I did think of something but I can't remember what. oh well)
 
11:53 PM
@rak1507 That's actually a great idea
 
⍞ has the problem that you can erase the prompt too
 
fwiw, I've suggested adding ⎕PROMPT to clean up the current issues.
 
I think considering ⍞ exists it is mostly ok to use rather than an entirely new thing, just that it was designed 'interestingly' from the start. I'm not going to necessarily say wrongly because I know back then when it was designed people liked to do all sorts of crazy things :P
 
@Adám That seems like a good idea
Naively, given whatever bit I know, at least
 
Well, when it was designed, you couldn't remove characters from the prompt, since they were printed with ink.
 
11:56 PM
oh, so that's a modern choice?! in that case, it's a terrible design! what were you thinking dyalog!
 
That was a while ago, though :p
 
@rak1507 If you run as a terminal application, it doesn't let you remove the prompt either.
 
oh right that's good
 
@Adám Wait what?
 
⍞ is pretty much fine then
 
11:57 PM
@rak1507 No, because getting the value from includes the prompt.
 
@Adám you can on linux at least
 
Oh :-(
@dzaima No, not the TTY interface.
As an actual packaged runtime application.
 
prompt←{(≢⍵)↓⍞⊣⍞←⍵}
and rely on users not breaking things :P
 
APL+ had some magic incantation, ⎕ARBOUT ⍬ or something, that would "reset" the cursor position so didn't allow backspacing, and the value didn't include the prompt.
@rak1507 That's very unsafe.
 
I like to live dangerously
 

« first day (3839 days earlier)      last day (997 days later) »