« first day (11 days earlier)      last day (2358 days later) » 

11:16 AM
@HyperNeutrino Ready for another exercise? (ping when ready)
 
 
2 hours later…
user165474
1:05 PM
@EriktheOutgolfer Ready :)
 
OK, your first exercise is a square with side length N.
You can use any filler char.
 
user165474
Okay. Can I take it as an argument, or do I have to hardcode it?
 
You can't hardcode it ofc ;)
 
user165474
lol Okay so I take the side length as and argument and the filler as an argument?
 
Not that this makes it less trivial.
@HyperNeutrino No you don't take the filler as an argument, I thought you were talking about N.
 
user165474
1:09 PM
Oh. Whoops, I didn't word that question well. lol
 
user165474
Okay, so N is an argument and the filler is hardcoded?
 
OK. Get to work!
 
user165474
:P
 
Also, the square must not be an array of lines, it must be the string, like this for a 5x5:
#####
#####
#####
#####
#####
(using # here)
 
user165474
G	Attempt to format z as a grid.
 
user165474
1:10 PM
:)
 
Wrong one, since that technically de-squarifies it.
 
user165474
Oh.
 
user165474
:(
 
user165474
Darn, I wanted to use ³ to get 100, but I need it for the argument :(((
 
There is almost always a 2-byte way to do 100 rather than writing it verbatim.
 
user165474
1:13 PM
⁵²
 
user165474
Though I can use anything from [33, 99] for the same bytecount.
 
No, that wouldn't always work as expected (you may need ⁵²¤). Also, you can't hardcode N.
 
user165474
Yeah, I know.
 
user165474
And oh, whoops. Then maybe I'll just write a number verbatim.
 
No, there is a way that you'll not need ¤.
Just think a bit harder.
 
user165474
1:14 PM
Ah. Okay..
 
I have made a 7-byte version.
 
user165474
Ah. Okay.
 
And I feel like that's too much already.
Have you finished yet?
 
user165474
Nope.
 
Get to work and ping me when you're done.
 
user165474
1:18 PM
Alright. I will.
 
I have reduced to 6 bytes.
 
user165474
I feel like there's an atom or a quick that I haven't seen yet.
 
Think of how we calculate the area of a square.
 
user165474
Uh, using the square (x**2)?
 
No not that.
But something based on that.
 
user165474
1:25 PM
Does it have to do with multiplication? (x*x)
 
user165474
Ah.
 
Want a hint?
 
user165474
Sure.
 
It's multiplication, but not numeric multiplication.
 
user165474
1:27 PM
Oh hm.
 
user165474
Matrix multiplication...?
 
user165474
Okay.
 
user165474
Hold on, I'll be right back.
 
user165474
Is it the repeat list atom?
 
1:35 PM
Yep.
Now you should be able to do the rest.
 
user165474
I have 0xxœs right now which gives me a matrix of 0s, but I can't format it in one byte.
 
x isn't the repeat list atom, is.
 
user165474
Oh. Hm.
 
user165474
0ẋẋœs does the same thing, so I feel like my approach isn't correct.
 
user165474
0ẋWẋ
 
1:39 PM
Yep, that's the first four bytes!
Hint: you don't need œs.
 
user165474
Ok.
 
user165474
@EriktheOutgolfer 0ẋWẋµY
 
Congrats!
 
user165474
:D
 
user165474
Thanks!
 
1:41 PM
Mine was 8ẋWẋ⁸Y
 
user165474
Ah. Interesting.
 
8 looks fuller to my eyes than 0.
 
user165474
I see.
 
It reminds me of a building block. I'd have used #, but it costs a byte.
 
user165474
Interesting.
 
user165474
1:44 PM
1 looks nice too.
 
And 2 looks like noodles to me. Weird.
Ready for next exercise?
 
user165474
Yup!
 
user165474
2 looks like lasagna lol i'm weird
 
Right-pointed isosceles right triangle with perpendicular side length N.
 
user165474
Example?
 
1:47 PM
For N=3:
#
##
###
##
#
 
user165474
Ah. I see.
 
Another example to clarify, for N=5:
#
##
###
####
#####
####
###
##
#
I chose right-pointed, isosceles and right-angled since it's easier to do.
 
user165474
Ah. Alright.
 
Of course it doesn't appear as such when using rectangular fonts.
 
user165474
What do you mean by rectangular fonts?
 
1:52 PM
Except for full-width chars (Asian languages mostly) a char isn't square-shaped, so squares appear as rectangles.
 
user165474
Ah. Yes.
 
I have made a 5-byte version, can you do it? (Note: it's a bit tricky)
 
user165474
I'm trying to go off of RŒB.
 
By slightly changing something, you can remove something else here.
 
user165474
RŒḄ?
 
user165474
1:55 PM
Wait ŒḄ works.
 
That's what I meant, yeah.
 
user165474
Alright.
 
user165474
@EriktheOutgolfer ŒḄ8ẋY
 
Exactly my solution!
 
user165474
:D
 
1:57 PM
You can use 0 if you want.
 
user165474
Yes. I changed it to 8 because that way the code would match the TIO link :P
 
Next challenge: A right-angled rectangle with side lengths N×M.
Take your square solution, and change one byte. That's all. Can't give more hints.
 
user165474
Ah. Alright.
 
Found the byte?
Remember: your square solution is 0ẋWẋµY.
 
user165474
@EriktheOutgolfer 0xWẋµY
 
2:05 PM
Congrats, although that wasn't the intended change. Mine was 8ẋWẋ⁹Y.
 
user165474
Ah, I see.
 
Oh wait, there was no change needed at all. :/
 
user165474
Interesting.
 
user165474
Wait what
 
user165474
lol
 
user165474
2:05 PM
haha lol
 
user165474
yeah it technically needs two arguments but if we only have one it just repeats it
 
It's just that I used instead of µ...
 
user165474
Ah. I see.
 
I have another exercise in mind.
 
user165474
Alright, do you have any more tasks?
 
user165474
2:08 PM
(ninja'd)
 
user165474
hehe i ninja'd your ninja'd
 
user165474
ninjaception
 
ninja'd again... true ninjaception
Anyways, here is it:
Square checkerboard with black top-left with side length N*2. Use any non-whitespace char for black, space for white.
N=4:
# # # #
 # # # #
# # # #
 # # # #
# # # #
 # # # #
# # # #
 # # # #
 
user165474
Ah, alright.
 
2:11 PM
I said N*2 'cause N doesn't make any sense.
 
user165474
i see. Alright.
 
@HyperNeutrino Also, trailing spaces not required, if that's of any help.
 
user165474
Oh alright. Thanks.
 
And trailing newline allowed.
 
user165474
Alright. K might be useful.
 
2:21 PM
Leading spaces required.
 
user165474
Yep. Otherwise it's not a checkerboard right :P
 
user165474
So 8xK gives me 8 8 8 8 for 4, now my idea is to figure out how to offset every other one.
 
I dunno if K is of much help here though.
I've made a 10-byte version, looking forward to reduce.
 
user165474
Ah. Alright.
 
Mine doesn't look very golfable...
 
user165474
2:29 PM
I have 8⁶Ḃị but I'm not sure how useful this link will be
 
Isn't for checking the parity of an integer?
No I don't think it's useful at all.
 
user165474
Yes. And no I don't think it's useful.
 
user165474
Welp I have class starting now, so I'll try to finish it today if I have time. Bye!
 
2:45 PM
room topic changed to Jelly Hypertraining: Practice your Jelly :) To be a student, request access. Rules & Resources: gist.github.com/GolfingSuccess/2343b1996b4ea8384e41482a0f145b71 [class] [code-golf] [jelly] [practice]
The Resources list, along with some rules, has been moved to the room's description.
This way they will never vanish automatically.
 
3:06 PM
@EriktheOutgolfer =þ⁸ỊY
 
Well, that's too non-trivial for the sake of my exercise though.
 
it took me quite a few minutes
 
Yeah, and you are a "professional" Jelly golfer, so you know what that means :)
 
@EriktheOutgolfer how long is your solution?
 
10
Now Hyper is in class though.
 
3:17 PM
mine is also 10
nah it's 9 now
@EriktheOutgolfer I'm guessing you forgot
 
No it's 10 with the .
 
hmm...
you can still post a spoiler here
 
According to the rules I made, yeah.
 
our solutions are completely different
 
Yours is 10 bytes with the , right?
 
3:27 PM
no mine is 9 bytes
 
Spoiler please?
 
it's 8 bytes now: spoiler
 
Your 8-byte one is invalid, since, unlike normal checkerboards, this has a black top-left.
 
@EriktheOutgolfer you can always reverse the string
 
Let's just keep things simple...
 
3:35 PM
Let's keep things short
@EriktheOutgolfer do you have another challenge?
 
I'm currently thinking of one.
I thought of one: average(average(x),median(x)).
 
hmm...
testcase?
 
Wait a sec.
[1, 3, 4, 6, 7] -> 4.1
 
should be unsorted
 
The average is 4.2, the median is 4, the average of those two is 4.1.
@LeakyNun Sorting isn't implied, it just happened to be sorted.
Adding another testcase:
[7, 4, 1, 1, 2] -> 2.5
The average is 3, the median is 2, the average of them is 2.5.
 
3:42 PM
I don't know why, but 5H gives me a cache hit
I feel creepy
this is crappy
I apologize for my bad pun
 
Maybe someone has ran 5H in the past, and it's been stored in TIO cache.
 
will your list have odd length?
 
No not necessarily. I was thinking of a good testcase with even length and floats.
 
my solution atm is 15 bytes
which is 16 bytes too long
 
[15.1,20,11,100,33,1.78] -> 23.848333333333333
 
3:47 PM
13 bytes now
how long is your solution?
 
I haven't made one yet, I was making the testcases.
It seems that I made the exact same solution as you.
I got a cache hit...
 
wonderful
Now let's hash our solution using passwordsgenerator.net/sha512-hash-generator
6465A103D515415585833DF6B608EDD7000BE2138C1EAAC64AD8EA9CF69787B529797513EAD1AFBB‌​86CD528936ED7234C16FBFF7AE79C3969D106B2B6B8871E1
 
6465A103D515415585833DF6B608EDD7000BE2138C1EAAC64AD8EA9CF69787B529797513EAD1AFBB‌​86CD528936ED7234C16FBFF7AE79C3969D106B2B6B8871E1
Lol exact same hash.
 
wonderful
 
@HyperNeutrino Here is your challenge: Find the average and median of an unsorted list containing rational numbers, and then find their average.
Me and Leaky have done it in 13.
 
3:56 PM
hmm... smirks at rational number
 
Rational = int or float. Just enough for a good exercise.
 
let's come up with another square challenge like the three challenges above
Given e.g. n=4, display:
#
 #
  #
   #
(trailing space and newline optional)
my solution is 7 bytes and is very non-trivial
 
My solution is 7 bytes and is very trivial.
 
heh
 
OK, let's add this up to the exercise queue.
 
4:01 PM
we can pin those
 
Good idea.
Also, @-pings will be used when a challenge is directed towards specific students.
 
how do you even do it trivially in 7 bytes...
 
oh... I used #
 
Trivial broad-audience challenge: Draw a line from top-left to bottom-right using a non-whitespace char. (credit @LeakyNun)
OK I pinned both.
 
4:06 PM
I can see that
 
I say it because I've often experience blindness over the starboard.
@LeakyNun Ew that's too much!
 
kek
wait
if we can use custom characters...
 
"a non-whitespace char" pretty much implies that the padding should be whitespace ;)
Otherwise there wouldn't be any such requirement.
 
but hey, that's a good way to create the identity matrix
@EriktheOutgolfer 6 bytes
 
4:11 PM
:o
let's draw the diagonals
the input will be odd
@EriktheOutgolfer
 
@LeakyNun What does that add over your existing challenge I pinned?
 
oh what did i say
 
What diagonals?
 
the two diagonals
 
Oh, like an X?
 
4:15 PM
#   #
 # #
  #
 # #
#   #
for n=5
My solution is 12 bytes
 
I think we pressed "run" together.
No seriously.
 
lol
 
waaaaat
I thought you won't use my trick
well, too bad for you, my solution is 8-byte now @EriktheOutgolfer
 
So that's what that 5th byte is useful for!
 
4:27 PM
yes, that.
I believe we should post this on main
 
I believe it would be a dupe or something.
 
47
Q: Do X without Y​

Conor O'BrienUsually, it is said that "Doing X without Y" can be a trap to beginners writing challenges (source). However, I am cocky and think that I can definitely make an X without any Ys. Randomly. Oh yes, this will be good. Challenge: Given an odd integer n greater than or equal to 1, output an ex of si...

 
@LeakyNun Oh, you mean the answer, you can post it yourself. Oh wait, I dunno if it'll be competing at all though.
 
nah, I meant the challenge, so it would be a dupe
 
4:29 PM
@EriktheOutgolfer nice.
 
Oh wait, it's invalid.
 

« first day (11 days earlier)      last day (2358 days later) »