« first day (55 days earlier)      last day (2314 days later) » 

12:41 PM
@LeakyNun Could you help me out with conditionals? I feel like I'm misunderstanding something fundamental about them
Well, more like I just don't know how they work at all
 
@Christian fire away
 
See my 3 messages above
From yesterday
 
@Christian can you tell me what =S$ is intended to do?
 
@LeakyNun =S (or S= - I tried both) is meant to sum the numbers in the list and check if it's equal to the input
The Ðf (I thought) looks at the link directly to its left, so I put the $ in to get it to look at both and not just the S
 
so the lists are the left arguments right
let λ be the left argument
can you write it in pseudocode using prefix notation?
 
12:47 PM
which part?
 
2 mins ago, by Leaky Nun
@Christian can you tell me what =S$ is intended to do?
you do realize that =S$ is a monad right
so it takes in a list as the left argument λ
 
so itλ = S(λ)
*so it's checking λ = S(λ)?
 
yes
and since λ is a list, and = is vectorizing, you would end up with an array
and the only falsey array is the empty array
 
All right, I changed it to S=¥ and it works now
So when you use $ or ¥, it causes the parser to view all three characters as a single link?
It looks ahead?
 
yes
 
12:54 PM
I see
And do conditionals modify their arguments? I have to imagine they don't
 
@Christian depends on the conditional
there are only 2 atoms that modify their arguments
 
@LeakyNun How can that be?
 
@Christian well, have you looked through the list of atoms?
 
Sure
I'm assuming you're defining "modifying" differently from "taking an argument and returning something else"
And rightfully so
 
what...
> Ḣ Head; pop and return the first element of z. Modifies z.
 
1:01 PM
Right, I see now
But when I asked if conditionals modify their arguments, what I really meant was do they modify the current value of the chain
That's my bad
 
depends on the conditional.
And I don't really like calling the filter the conditional.
And please ping me every time you reply.
 
@LeakyNun All right, I will, thought that would be annoying but it's your call
Why isn't the filter a conditional?
 
I view the ? as the only conditional.
 
@LeakyNun Does the ? use the same logic to parse its conditional as the filter?
 
@Christian if by "the same logic" you are referring to "looking ahead", then yes.
 
1:11 PM
@LeakyNun I see, and do they not vectorize?
 
@Christian who? there is only one conditional.
and the conditional vectorizes not.
 
@LeakyNun All right, that's what I thought
 
indeed.
oh, and the R in the beginning of the two programs you linked to is extra.
 
@LeakyNun Right, because makes its argument iterable if it isn't already
 
@Christian yes
 
1:18 PM
@LeakyNun I think something else is extra too...
but not immediately apparent
 
sure, %2$ can be replaced with an atom.
 
> not immediately apparent
 
@LeakyNun I remembered that after I sent it :P
@EriktheOutgolfer Not sure what you're talking about, though..
 
well, what is your code for now?
 
There's no Collatz atom, is there?
 
1:21 PM
@Christian of course not
 
@LeakyNun I don't think it's a ridiculous notion
But probably less useful than most other atoms
@EriktheOutgolfer I'm not sure what you're getting at
 
Leaky has suggested a couple of optimizations, so after applying those what would your new code be?
and there's a third one although not that easy
 
After the optimizations? This?
 
yeah that's what I meant
 
@EriktheOutgolfer I don't see how to golf it down from there
 
1:29 PM
as I said before, not that easy...how do we nest chains?
 
øµðɓ?
 
yep how could you use them?
 
Well, I tried ×3‘µHḂ?€ and it works. But I honestly have no idea why
 
you tried that before? because that's the optimization
 
No, just now
 
1:34 PM
and that's how you return the first N collatz conjecture numbers in just 8 bytes
starting from 1 (which is 4)
 
So I see
 
well, that is an example demonstrating ternary conditionals
 
I don't understand why, when the condition is true (the number is odd), the µ causes the ? to go back to the beginning of the chain and execute the entire ×3‘ chain
 
@Christian μ is a chain separator, and the chain to the right is monadic as defined by µ, while the left chain is provided as a link to ? which accepts 3 links...it's kind of complicated but it can help you save lots of bytes
 
@EriktheOutgolfer Yeah, that part where the left chain is provided as a single link is what I don't understand, but that's okay, it does seem pretty complicated, I can just play around with it if I need the functionality
If the ×3‘ were a longer chain instead (without any chain separators), would the entire thing still get passed to ?? or is there a limit?
 
1:42 PM
there's no limit
 
Find the largest list of consecutive numbers that sum to N : 11 bytes
 
@Christian can be considerably golfed...
 
@EriktheOutgolfer Could you point me in the right direction? I don't see any opportunities
 
it's actually a lot simpler than what you may think...and for the most part you've done it
 
That's no help :P
I'm looking at this µL€Mị area
that seems sloppy to me
 
1:57 PM
yeah it seems sloppy to me too...it needs some...condensing if I may say so :P
btw remove the whole area first and check the structure of the array
do you notice anything interesting?
 
Thanks for that
 
@Christian nice
 
Here's my 12-byte solution of the [min,max] version tio.run/##y0rNyan8///hrrZg20NLD09IO7T14c5VQGLHImsg4////4YGBgA
 
@Christian there's a golf too but not obvious at first
kind of undocumented behavior I'd say
 
@EriktheOutgolfer Undocumented or unintended?
 
2:09 PM
undocumented
 
gosh
 
@Christian I've documented it now :)
 
Yeah, I never would have gotten that if I didn't know that did that
 
how did you find out?
 
I checked the recent edits on the wiki, lol
 
2:17 PM
yeah, that's like trying to get a spoiler
 
@EriktheOutgolfer I don't see it that way. If it were documented before, I would have known could do that
 
you could've just refreshed the wiki pages lol
but anyways not much of a spoiler
 
I suppose, but I didn't feel like combing through looking for something I hadn't seen before
Yeah, I still had to figure out how to use it
Actually, I might be misunderstanding here, but the doc for should be updated even further
Because it's 1-indexed
But since the modulo will always give you a number between 0 and len(y), it must add 1
 
you mean subtract 1
 
No, I mean take the modulo, add 1, then return the 1-indexed element
Because 0.5 gives you the last element and the first, in that order
 
2:22 PM
that's not how Jelly works though
 
Which, yeah, it's subtracting 1 and then taking mod
Right?
 
I suppose
 
so, I missed two challenges being solved
 
@LeakyNun and a documentation addition
 
@LeakyNun Sorry, was I supposed to ping you with the solutions?
 
2:25 PM
documentation addition was needed to solve the min-max consecutive integer sum challenge...because you can't expect students to just guess undocumented behavior
 
@Christian of course not
all I did was describe what I missed
 
2:39 PM
@EriktheOutgolfer I'm back with another profile; could you add me back into the JHTSTC or just unstrike my name?
(thanks LeakyNun for adding me back)
 
did you request access?
 
To the chatroom?
 
I unstriked the name
@HyperNeutrino yes
 
No, LeakyNun just added me back. And thanks :)
 
and yes you're still level 4
 
2:42 PM
Yay. Thanks :)
 
Diagonal straight line: 10 bytes
I know that's double the size of the optimal solution
 
2:59 PM
@Christian found anything shorter yet?
 
3:12 PM
@EriktheOutgolfer Nope, I tried playing around with outer product but I couldn't get it to work
 
then try something else...;)
 
3:42 PM
I'm at a loss
so I have a number
I need a list of strings
spaces, as many as the index in the string
and then add a \ to the end of each
or I could make an identity matrix and replace all the 1s with \s and the 0s with spaces
Well, I can shave a byte since the challenge just specifies "consistent non-whitespace char" - 9 bytes
 
 
2 hours later…
5:33 PM
Okay, this really isn't making sense to me
Trying to make an N-dimensional N*N*N*... array
sounds simple
I can just repeat the list by N, N times
with wrapping to make sure the lists stay separated as they should
Okay cool, let's generalize that
@LeakyNun What am I missing here?
 
@Christian ẋW$ is a monad
remember the dyad-monad rule
 
@LeakyNun You're right, it should be a dyad, and I feel pretty stupid for making the same mistake twice in one day
 
@Christian dyads don't go well with ¡
 
Of course not
 
5:43 PM
@LeakyNun I see how that works now, but how can I get the behavior I want without hardcoding a set number of atoms?
 
you can turn it into a monad before using the repetition quick
 
I didn't really want a dyad there anyway, I always wanted to repeat it by the same amount, just passing in a different list each time
so that makes sense
thinking about problems in that way takes some getting used to but I think I'm getting there
 
good to know
 
Now, of course, this is a much better way of doing things
Maybe not better, but easier and shorter
 

« first day (55 days earlier)      last day (2314 days later) »