« first day (260 days earlier)      last day (2109 days later) » 

1:36 PM
+" with the arguments [x, y] and [a, b] results in [x+a, y+b] (zipwith in Haskell)
 
Can jhtbot be here?
 
Not yet
 
H{ with the arguments 10 and 20 produces 5 (only runs on the left argument)
@user202729 No, SE changed the chat login so it doesn't work
H} with the arguments 10 and 20 produces 10 (only runs on the right argument)
U' is the same is . It makes a command not vectorise
 
Really? facepalm
I should have known about '
But it's quite useless right?
 
It's quite buggy though, so doesn't always work as expected
@Mr.Xcoder Yeah, more or less
 
1:39 PM
I use þ` a lot
Regarding your CMP
 
How can it even work? (')
 
We should look up the source code
 
Each atom has ldepth and rdepth attributes
@Mr.Xcoder Already have :P
 
That makes both 0 IIRC
	"'": lambda link, none = None: attrdict(
		arity = link.arity,
		call = lambda x = None, y = None: variadic_link(link, (x, y), flat = True, lflat = True, rflat = True)
	)
 
What about for dyads? "spawn"?
 
1:41 PM
The default is lflat=False, rflat=False, and the code gets the depth of an atom by doing lflat or ldepth, meaning that the ' quick forces it to only act on the lowest depth
@user202729 No clue. I asked Dennis:
in Jelly, Oct 24 '17 at 12:32, by Dennis
@cairdcoinheringaahing It's buggy for dyads and mostly useless for monads. It's not a no-op in 1,2a'3, but one could just use 1,2ȧ3 instead.
 
So we shouldn't worry about it
I should try ƭ, didn't really use it much
 
ƙ is the only quick where I don;t understand what it does
 
Key?
map monad over group of equal elements.
 
Ok ƙ is the easiest IMO. It maps a function over the groups of equal items in a list.
 
only if you try it. Documentation is hard to understand.
 
1:45 PM
I though it was something like Œg<monad>€, but I was wrong
 
[1,2,3,1,2,1,1,2]Lƙ gives [4,3,1] I think (the length of the 1-group, of the 2-group, of the 3-group)
@cairdcoinheringaahing It's just that but they don't have to be adjacent
Anyway gtg]
 
With sort too.
(and then sort groups by first occurences)
 
So <link>ƙ is equivalent to ṢŒg<link>$€?
 
The latter too. Then sort groups by first occurence.
 
2:07 PM
@cairdcoinheringaahing You can get a better hang of it using identity:
(I'm back, had a small house issue)
 
That actually makes it a lot clearer, thanks!
 
@cairdcoinheringaahing You're welcome!
 
I'm confused now. Should I explain tie, or are you good?
 
I'm good
Wait I am still confused. It doesn't work as I expected: I tried [1,2,3,4,5,6,7,8,9]’‘H3ƭ
Does it only work for dyads?
 
def tie(links, outmost_links, index):
	ret = [attrdict(arity=2 if max(link.arity for link in links) == 2 else 1)]
	n = 2 if links[-1].arity else links[-1].call()
	def _make_tie():
		i = 0
		while True:
			yield links[i]
			i = (i + 1) % n
	cycle = _make_tie()
	ret[0].call = lambda x = None, y = None: variadic_link(next(cycle), (x, y))
	return ret
That's the source code
 
2:19 PM
So it should for both monads and dyads.
Where is the parameter outmost_links used?
 
It's not. That just refers to the other links in the program, all quicks have that parameter
 
Ah ok
I should have a closer look at Jelly's source
Still, can you explain it once more?
 
It should take a list a, a nilad n and the previous n links and cycle those links over a. I don't get why it's not working though
 
Oh so I chose my code so perfectly that I discovered a bug :S
 
This is a good example of how it works with dyads
 
2:25 PM
I already analysed that, I am aware of it
n = 2 if links[-1].arity else links[-1].call()
I am just going to ask in the Jelly room I think
 
It doesn't seem to like monads, and that line seems to be why
 
in Jelly, 1 min ago, by Mr. Xcoder
@Dennis Does the "tie" quick (ƭ) work correctly for monads? I am very confused with the following code: ’‘H3ƭ. If I understand it correctly, it should return [0, 3, 1.5, 3, 6, 3, 6, 9, 4.5] for an input of [1, 2, 3, 4, 5, 6, 7, 8, 9], but it returns [0, 1, 2, 3, 4, 5, 6, 7, 8] instead. – Try it online! If this is, in fact, the expected behaviour, can you please explain how it works?
in Jelly, 43 secs ago, by Dennis
That said, I think you need ’‘H3ƭ€.
@cairdcoinheringaahing
 
ƭ must not vectorise then
 
Which seems highly non-sensical to me
How would it even work for non-iterables?
 
It rangifies integers
 
2:39 PM
@cairdcoinheringaahing ಠ_ಠ
 
ಠ_ಠ I used the version
 
Strange...
 
It only applies the first link then ಠ_ಠ
 
ಠ______ಠ
The Jelly Effect: 4 disapprovals in the last 5 messages
 
3:18 PM
ಠ_ಠ I've been looking at the source code, and I have no idea how to make tie vectorise
 
4:07 PM
Opened a PR to make tie vectorise :P
 
5:04 PM
caird coinheringaahing™: I have no idea how to make tie vectorise – One hour later: Opened a PR to make tie vectorise
 
5:44 PM
@Mr.Xcoder I just wrapped the call in tie with the code for in monads :P
 
6:00 PM
ಠ_ಠ
Closed by Dennis :P
 
 
2 hours later…
8:25 PM
CMC: Given a list L of integer and another integer I that occurs at least twice in L, return the maximum difference between two indexes of I in L.
[1,2,1,2,2,2,1,3,2,3,4,1], 1 -> 5
@Mr.Xcoder Ugh forgot I implemented... You know what... 3 bytes
 
Mainly just showcasing a new atom
Should get something less trivial
 
err should't the answer be 11?
rather than 5
 
Forgot to mention "Adjacent Occurrences"...
 
8:32 PM
CMC: Given a list L and two elements a and b, replace all occurrences of a in L with b (always wondered how that would be done in a golfy manner)
 
[1,2,2,2,2,4,4,4,3,2,4], 2, 4 -> [1,4,4,4,4,4,4,4,3,4,4]
What?
 
err 1 byte
it's a built in
 
Wait are there tryads in Jelly? :O
 
dyad list
 
8:33 PM
Oh... Crap y right?
 
take the a and b as [a,b]
 
Ugh Forgot about it
Dang...
In that case...
 
harder is to replace all a with b AND all existing b with c (I think)
 
Yeah that's a good CMC
 
8:35 PM
maybe?
 
have not done it
 
Actually the built-in does that for us, tweaking it a bit
 
yeah it does, you need to reformat the abc though...
 
yes
 
8:37 PM
question is how to do it golfily, maybe y/ would come into play too?
 
takes input as left argument [a, b, b, c] and right argument L: y (and yes why would this be valid)
why use y/ o_o that's an abomination from hell
 
takes [[a,b],[b,c]]
well how many bytes is the only question :D
 
you're looking too much into it, of course why should it be valid
but it's actually 3 bytes, yeah
 
I didn't say it was :/
 
Something like ,Ṛy should do it I think?
 
8:41 PM
3 bytes spoiler (yes, you need to click on it)
 
I have a 3, wonder if it's the same...
oh it's different
 
@EriktheOutgolfer ಠ_ಠ why do you take a list with 3 elements as input?
 
unicode MD5: 0E6D2FB0A186CA806DF12CA4FF9A4E51
oh too late it seems
 
^ is that a two byte one???
 
8:44 PM
oh that's your three
:)
 
I said "unicode" because that's what you should be entering on the MD5 page to check
not JELLY-encoded
 
never used one
 
(btw Leaky introduced me to it :p)
 
MD5 e79f9de8a4de9ae9d0e32c9a1d00b5c8
 
Ok you can reveal them if you want :P
 
8:47 PM
in a spoiler link though :P
"trying to find another person's approach" is sometimes done that's why
 
Ok I reaaaaly wanna move on from this y madness
 
similar really
 
;-; I had ,2\y
 
I gave a challenge to my colleagues over xmas, but it's easy for Jelly (it was only for Python 2)
 
8:49 PM
Forgot "Neighbours" exists
 
but may as well
CMC: given a list L of three lists of non-empty "strings" (lists of characters) return a "string" (again Jelly - so list of characters) with the TLA of TLAs
I have 3 bytes.
 
@Mr.Xcoder it's a new quick, you'll get used to it ;)
@JonathanAllan "TLA"?
 
But... I have used it a lot already (even on Main) Dunno how I missed it
 
three letter acronmn
 
Test case?
 
8:53 PM
one sec...
 
@JonathanAllan me too (I think)
 
i.e. [["This","Is","Golf"],["I","Like","Golf"],["This","Was","Dumb"]] -> "TIT"
it's just the 'T's of the two "This"'s with the 'I' of the "I" inbetween.
should be easy in Jelly to get the optimal score
 
3 bytes
 
but in Python 2 with 5 non-golfers the best I saw was 37 bytes (I got 30)
 
MD5: 953059D3D9DF82A0659C2037D297F6A7 and spoiler.
Now I am tempted to solve it in Python 2 too
 
8:56 PM
hmm why is the MD5 different :/
same as mine
I see f3b25d0c942f8959666ff54106084aef
 
Eh...
 
Oct 17 '17 at 18:56, by Erik the Outgolfer
http://passwordsgenerator.net/md5-hash-generator/
Are lists of characters allowed in Python 2?
 
my MD5 is the same as Mr. Xcoder's
lists of characters? no, they're lists of 1-char strings
 
8:58 PM
So that one is just wrong?!
 
¯\_(ツ)_/¯
@JonathanAllan lambda k:[i[0][0]for i in k]? This is 28... Am I missing something?
 
who host a site doing incorrect MD5?!
 
I don't know which is wrong, but if we all use the same tool we all get the same results as appropriate
 
onlinemd5.com agrees with the one I posted
 
Perhaps ours is wrong... But who cares, as long as we use the same service?
 
9:01 PM
@Mr.Xcoder yeah it was a requirement for output to be a string (or printed version thereof) in my Python 2 question
 
Oh... Ouch
That will cost me many bytes
 
@JonathanAllan actually miraclesalad agrees with passwordsgenerator and onlinemd5
 
well I have a 30 :)
 
I think your code is different
 
9:02 PM
(that is, for MY md5)
 
Or did you just add 1 more space or something?
 
and also a fourth service, md5.cz
 
when I paste my code into password generator I also get the same again - err so it's how I copy from TIO to the generator.
(cos I know the code is the same from the fact that Mr. Xcoder posted a spoiler link :))
 
perhaps you copied encoded code and not UTF-8?
@JonathanAllan was the 37-byter lambda(a,b,c):a[0][0]+b[0][0]+c[0][0]?
 
nope but it's cool
If I knew how to MD5 properly I'd give the one for my 30 :p
 
9:06 PM
Just spoil it :P
 
need to rewrite from memory first...
 
Also there is this: lambda c:zip(*c)[0]. Now getting the heads ain't short
 
I won't look at it immediately, and that was a joke BTW...
 
:p
I feel it's optimal but if I posted on main xnor would post a 22 byter or something :p
 
9:09 PM
It might be possible in under ~ 28 using recursion, perhaps
 
I got 35 using recursion myself
I had loads of 35 byte solutions actually
first submission from the non-golfers was 50 bytes :p
 
@JonathanAllan that looks like 35 bytes to me...
 
@JonathanAllan That's longer than just typing [0][0][0]+... ...
 
yep
looks like 30 to me :/
 
9:11 PM
This is clearly 35 Jonathan
 
yeah I think that's one I had :)
 
@JonathanAllan w...what? even purposefully ungolfing, this is 48 bytes, maybe excessive spaces and variable name lengths?
 
That's what you linked, and it's not 30
 
first solution used join and indexing and a for loop in a lambda was 50.
 
@EriktheOutgolfer perhaps no lambdas
 
9:13 PM
but 48 bytes is the full program
 
how does it look like 35?
 
ಠ_ಠ
 
but...it's 35 bytes
 
prob had redundant [] in the join
 
9:14 PM
no join in the 48-byte version...
a=input()
print a[0][0][0]+a[1][0][0]+a[2][0][0]
maybe they spaced the =
 
that is not the normal solution though
 
for a non-golfer
 
@JonathanAllan 38 bytes then?
 
no it was way more, pretty sure it was 50
 
9:17 PM
actually 37 bytes
lambda l:''.join([i[0][0]for i in l])
 
prob two for loops in the list comprehension
 
My ungolfed-yet attempt with recursion: Try it online!
 
think like a non-golfer
someone who writes clear code
 
41 bytes:
lambda l:''.join(map(lambda x:x[0][0],l))
 
@Mr.Xcoder LOL what? That is not ungolfed
 
9:19 PM
40 bytes is ungolfed
 
do you guys write real-world code ever?
 
[0][0][0]...
 
designed to be read easily
 
Yeah, but not Python
 
well, an 74-byte version:
lambda l : l [ 0 ] [ 0 ] [ 0 ] + l [ 1 ] [ 0 ] [ 0 ] + l [ 2 ] [ 0 ] [ 0 ]
 
9:20 PM
Pfff
 
we are not code-bowling
 
7 mins ago, by Jonathan Allan
first solution used join and indexing and a for loop in a lambda was 50.
@Mr.Xcoder I didn't see this
 
@JonathanAllan that would be banned in code-bowling
 
hmm I got 48, maybe there were a couple of redundant spaces too!
 
How about f=
Perhaps they had it?
 
9:22 PM
I think not as I explicitly mentioned that f= was only necessary for a recursive lambda
 
Why are we discussing Python in JHT :S
 
@EriktheOutgolfer Can you please move the messages about Python to:
 
I think there were two redundant spaces...
 

 Python Byte Shavers

A room dedicated to Python golfing founded by FlipTack and Mr....
 
And perhaps we shall move there
 
we are ungolfing though :p
 
Yeah ^^^ makes sense
 
@JonathanAllan oh we can't assume excessive spacing, that's something arbitrary
 
But when they saw ... they all said "what is that???"
 
9:24 PM
@Mr.Xcoder that'd be offensive there :P
 
^back ticks :p
 
@EriktheOutgolfer No it wouldn't, I'm a RO :P
 
` ... `
ugh formatting
 
Got it...
CMC: Compute the Nth non-square number (the 1st / 0th is 2).
2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, …
 
naive solution in 7
oh make that 6
 
9:31 PM
I think I have 6 too
Make that 5 bytes. Returning as a float.
 
So RE the MD5 thing, yes it was due to copying from TIO it seems
as a float - is it guaranteed to work for any valid input?
(I guess not)
 
Yes. Guaranteed.
It just returns .0
The second approach doesn't return as a float, but works with floats
 
even with a very large n it will find the right answer?
 
I guess yes. OEIS seems to agree :P
 
OEIS probably does not go very high
I meant if n is huge
 
9:41 PM
I am not sure
(BTW the links open a blank tio window)
To view the code, just hover over them
Anyway, I have to go get some sleep now. It's been a pleasure golfing with you. Mind if I see your solution now @JonathanAllan?
 
moved away from it um... I think I have another 6, one sec.
oops now I have another 7... one sec I'll recreate my six
 
No rush :)
 
hover over what?
 
Yeah, that's what thought you had
 
Oh I see
 
9:46 PM
12 mins ago, by Mr. Xcoder
 
they prob both fail for large n
but not usually a problem I think
I never quite know
 
I don't think it's a prob
 
sleep well!
 
Thanks! You too (soon) I guess (if you're in the UK)!
 
in a while :p
 
9:49 PM
Yeah of course who's sleeping at 10 PM :P
 
It's Saturday, no-one sleeps before 1AM here :P
 
Yeah, I'm just tired so I won't go after 12
Actually might be back later from mobile
 
Never mind, I googled it
 
Out of curiosity, what did you google? :p
 
Time in Romania
 
9:55 PM
Offset of 2 from the GMT
Or +3 during summer, I think
 
I know that now :P
 
I wondered if I am right actually :p
 
So, Erik and Xcoder are on the same times, and me and Jonathan are on the same time. Then Hyper's just by himself on Canadian time :P
 
Tfw you accidentally drop a recently-bought phone and you’re afraid to pick it up and look at its screen...
 
aggggh
 
9:59 PM
Hmm, the discussion about KOTHs in TNB reminds me of my idea for a Jelly KOTH :P
 
ooo yeah I’d really like one of these
But I am not sure how non-Jellyers would receive it
 
The problem is creating a suitable problem to do
@Mr.Xcoder Same way non-JS users took the recent JS KOTH: ignore it
 
Yeah should be something a bit difficult
 
ಠ_ಠ TFW a music compilation calls a song from 2015 "Early 2010s"
Corrected
 
Best part is, I can now do Jelly on mobile :P
 
10:04 PM
yeah but writing explanations is still hard on mobile, right?
 
Have you finished the replacements app?
 
Yeah, but the problem is that I can’t install it on my device. I have finished the Smart Keyboard, though
 
Have you added escapes?
 
@JonathanAllan yeah, but I was talking about CMCs
@cairdcoinheringaahing Not yet, but I finished the design part and the basic functionality
I should
make it more mobile-friendly
 
you mean "if only..."?
CMC: given n output the product of the divisors of the nth composite number.
 
10:10 PM
@JonathanAllan ... If only SE used monospace fonts
 
yep
@JonathanAllan starting with n=1 that would be [8, 36, 64, 27, 100, 1728, 196, 225, 1024, 5832, 8000...]
 
Can we start with 0 and 1 as composites?
 
0 and 1 are not composite
 
I know, just asking :P
 
composite is not defined as "not prime" :)
 
10:13 PM
Just a try :P
 
part of what makes it worth a CMC I think
 
@JonathanAllan First try, dumb approach: Try it online! (10 bytes)
Again, 10 bytes
 
10 bytes here
 
Try it online! (10 bytes, AGAIN)
@JonathanAllan What’s your current byte count?
 
um I had 10 but am cooking :)
 
10:24 PM
 
10:37 PM
It's probably do-able in under 10, though.
 
11:00 PM
TFW u think you got 9
 

« first day (260 days earlier)      last day (2109 days later) »