« first day (1377 days earlier)      last day (3763 days later) » 

00:00
I've seen some really bad kerning before.
So have I, but scrubbing burned oil is worse.
The pain in your wrist only lasted for days. The ability to recognise bad kerning lasts for a lifetime.
3
It sure hurt more than a lifetime of bad kerning.
Sorry to go, but supper is going on.
"When you gaze long into bad kerning, the kerning also gazes into you"
What is that quote from?
00:04
@PeterTaylor You know JS, right? That 10-byte one is puzzling me.
It supposedly originated from Friedrich Nietzsche.
I just noticed, in the long one, I can make flush from the remaining characters... but that doesn't seem to be a thing in JS
Which program are you trying to unscramble?
00:27
I'm surprised how active the challenge is.
It seems to be a lot essier for the robbers than anticipated.
grc
grc
@MartinBüttner the 10-byte one looks to me like it relies heavily on its environment (which we don't know)
@PhiNotPi there haven't really been any submissions relying on factorising large semiprimes
@grc probably... I'm currently trying that PHP one
by bwoebi
49 bytes
I'm pretty close actually
10! = 3628800. I think bruteforcing could be possible. Like you said, however, we don't know the environment.
my 12-char python one was brute-forced, though there were many equivalent solutions
for the PHP one I've got print@substr(new exception,); and I need to put some permutation of $++$++$++$+=$~main$2 after the comma to evaluate to -6
00:45
ohhh
or maybe not...
hm that's odd
I thought about doing something with variable variables
since all of $m, $a, $i, $n are NULL, the variables $$m and $$a are the same.
(and I've tested that)
but $$a+$$m=2 yields 2 and not 4
as does $$m+$$m=2 ... whereas $m+$m=2 does yield 4...
01:10
Did you know that $$m+$$m=2 gives an error in Java?
~
It occurs nearly 1000‰ of the time.
grc
grc
01:23
print@substr($m=new exception,); gives you a variable which becomes 1 if it helps
@hosch250 how is that python answer coming along? ;)
Almost done.
@grc hmmm, let me think
Actually, just finishing killing the final unwanted features.
Done!
Now to golf it.
@grc the closest I get with this is print@substr($$m=new exception,~(++$$a+$$i+$$n+2)), which has two parentheses too many and two +s missing. (but does give the correct output)
okay, I can just add the +s before 2
but how do I get rid of the parentheses?
actually, it also has two extraneous $
01:34
hey guys working on unscrambling this answer:
0
A: Unscramble the Source Code

GentlePurpleRainPerl, 39 Code //shredding($c_)=\\t_;$_=($r/~$p*2014); Output H Tested here

$$2=__g
$_=0;
$_= ~$_;
s/(\d\d)/print(chr$1*4)/e;
im sorta close
feel free to steal my work and get a head start, I don't think I'll figure it out
I don't really know perl
Martin no worries maybe @grc can get it!
also to throw out my thoughts about this one:
0
A: Unscramble the Source Code

MorotPerl 5, size 27 print(rar(pizza))=~--'tanz' Output: ohm Works under use strict.

I think he might be using tr/// with z as a delimiter
grc
grc
@chilemagic how did you end up going with this one?
Up, one more bug.
@grc I had one other idea about it being a for(;;) loop
01:39
bugCount+=1
where you set $_=r or something and then do ++$_ to cycle through it
think of this type of thing:
for($_=r;$o<500;++$_){
print if /pe/ or /rl/;
$o+=1;
}
so yeah that or for(fi..ro)
could get you pe and rl
okay, I've almost got it now
bugsRemoved+=1
@grc @PhiNotPi
0
A: Unscramble the Source Code [robber thread for cracking attempts]

Martin BüttnerPHP, size 49, by bwoebi print@substr(new exception,+~$$a+=++$$m+$$i+2+n); That was absolutely mental.

grc
grc
nice!
02:01
yay, another Mma answer! :)
Man, codegolf.stackexchange.com/a/41098/21487 makes me feel like I'm solving a Kolmogorov
oh, you were looking at my scrambled source here in chat :-D
Posted, @MartinBüttner.
first thing for golfing python: first indent is one space, second indent is a tab
40
A: Tips for golfing in Python

JPvdMerweSometimes your Python code requires you to have 2 levels of indentation. The obvious thing to do is use one and two spaces for each indentation level. However, Python considers the tab and space characters to be different indenting levels. This means the first indentation level can be one space...

@MartinBüttner anyway, well done :-)
02:16
@bwoebi thanks :)
Py 2 though :/
grc
grc
@chilemagic I've cracked the Perl 39 one. Do you want to post it since you were so close?
print "\n".join(chr( if (x+2)%3 else )+"#4"[(x+2)%3] for x in range(7))

This is hard with no 0 or 9 :/
@MartinBüttner Are you sure? I just did this, and my two programs gave different solutions.
Is it because I have more than one level of indent?
Oh, I am using Python 3 - see the comment.
That is the problem.
grc
grc
@hosch250 a single tab is considered 8 spaces in Python 2/3
02:25
@grc OK, either way, tabs are less than spaces byte-wise and char-wise.
grc
grc
it means you could have indentation levels 1 space, 2 spaces, 3 spaces, etc. or 1 space, 1 tab, 2 tabs, 3 tabs, etc.
but you can't go back to spaces after a tab
if that makes any sense at all
I did only use space for the first level of indentation, it didn't work.
Also, did you see this comment on the post?
This fails in python3: you can no more mix spaces and tabs(a bad thing for codegolf, but a good thing in all other cases).
It has 18 upvotes, so it must be correct.
@grc couldn't you do s, t, st, tt?
grc
grc
@MartinBüttner I think t == st
(I did an assignment trying to parse Python indentation)
(it was painful)
grc
grc
02:29
ts -> 9 spaces so it would work
yeah that's what I meant, I guess
anyway, I'm off to bed... leave me something to crack for tomorrow, but feel free to get rid of all that are shorter than 20 bytes :P
grc
grc
gn
ideone.com/h80URb Here's Py3 at least
ideone.com/jcMkdA And Py2 seems to work
grc
grc
@Sp3000 guess it would only work in Python 2 then
Well, I will try it again.
02:32
Now I need to invent a new one for @MartinBüttner to crack… hrmpf! (PHP is btw. a very nice language with its tiny quirks :-D)
grc
grc
tbh I usually just use spaces because tabs are annoying
even when it costs a few chars
@bwoebi ugh, please don't :D
I think my IDLE autoconverts tabs to spaces
@MartinBüttner not before tomorrow… I go to bed now too. Good night
I spent way too much time on this, and I should focus on the SAS and APL ones, because those can beat me ^^
02:33
Golfscript :P
oh and that
GL with that one :P
lol
I'm sure you'll have it before I wake up ;)
good night
(I don't think so but night :P)
@MartinBüttner Such languages usually look less like gibberish to me when scrambled than unscrambled
02:37
OK, everyone. I just replaced all my tabs with a single space, and it is the same bytewise.
No luck there, and I won't bother editing my post.
Is this for rivers?
Yup.
grc
grc
@hosch250 if you look into list comprehensions, you could save a lot of characters
02:38
Rather than "a is b" you can do "a==b" to lose the two spaces
OK, thanks.
Need to go do chores soon, but will remember this.
I wonder if you can do something like sum(j<len(l[k])and' '==l[k][j]and j<len(l[k+1])and' '==l[k+1][j]) for the big nested ifs chunk
Cos that's a lot of indents
grc
grc
02:57
or even o=[sum(j<len(l[k])and' '==l[k][j]and j<len(l[k+1])and' '==l[k+1][j]for k in range(len(l)-1))for j in range(i)]
@Sp3000 Just found that on my own :)
Also q+=[max(o)]?
I think you're finding the max, right?
@hosch250 Ahaha nice
Yup, just solve that too: q.append(max(o))
Would q+= be the same thing?
Yeah :P just adds two lists and is usually shorter than append
OK.
Thanks.
02:59
i.e. you can do a+b if a,b are lists rather than a.extend(b)
I had to use .append.
The compiler wouldn't accept +=
Did you put [] around the variable?
Oh, OK.
Yeah, need to turn it into a list :P
OK, worked.
What about .split?
Can that be shortened?
grc
grc
03:02
t=input().split()
unless you need input() again
OK, thanks.
But otherwise in general I don't think .split can be shortened, not that I know of
437 bytes.
I'm look at the last line - is there anything shorter than print(*l,sep="\n")? It's only one char shorter
@grc go ahead and post it! mention that I helped though :)
03:06
What about getting the length of a string?
.len()
That would be longer.
I am using len()
You can redefine x=len and then reuse x() if you use len a lot
OH it isn't a member function. Ignore me
Yeah, I use len a lot.
Redefined range to x too
417 bytes
03:12
That's pretty good so far :P
Is there a function for index of?
I could use that.
.index()?
That gives the first occurence
If you want the last I think there's .rindex()
Either is fine.
I had been using the last to avoid a break.
30 bytes :)
Shaved off more: print(*p(i+70),sep='\n')
03:16
find() is usually shorted than index()
Nice :P
List has no attribute find.
Ah, I should have looked further back, use find() on strings
my bad :S
I keep forgetting find exists :P
Can I shorten this? for i in b(70,91):
I have a few of these still.
for i in b(i):
03:18
Do you want to post your code so far so we can see where you're up too?
Sure.
Might be able to list comprehension as grc said, depending
384!! :)
:D yay
(I'm always impressed by Python golfs, just because it usually never wins and I like Python)
Let get it to 99 :)
Or lower.
03:20
XD
Still the longest solution, but not by nearly as much.
Does Python have the & or && operator for and?
I like the def p(i)
Hmm & is bitwise
I did that because I used that twice.
What you can do though is swap l[k][j]is' ' around
To ' '==l[k][j]
So that you can lose the spaces on either side
I don't see any spaces.
if j<x(l[k])and j<x(l[k+1])and l[k][j]is' 'and l[k+1][j]is' ':r+=1
03:23
Oh on the left side, sorry
and l[k][j]is' 'and -> and' '==l[k][j]and
But yeah as grc pointed out you can list comp that into o=[sum(... for k in b(x(l)-1))for j in b(i)] where the ... is the long if condition
That covers everything from the line o=[] to o+=[r]
j<x(l[k])and j<x(l[k+1]) could be x(l[k+1])>j<x(l[k])
Thanks, @FryAmTheEggman
Ahaha comparison chaining, gotta love Python for that :P
I do.
:)
Also could all 3 of those ever be false?
You might be able to use == instead of and
03:28
You have so many you could almost use all(), but I think that'd end up longer after the comparison chains
Ah, l[k][j]is' 'and' '==l[k+1][j] becomes l[k][j]is' '==l[k+1][j]
Yeah just be careful with ==, you have to be sure that both won't be false at the same time
But otherwise its great! It even short circuits
Why would them both being false at the same time be a problem?
False==False gives true
Whereas False and false is false
>>> a = 1
>>> b = 2
>>> c = 3
>>> a == b == c
False
Hm...
03:31
Yeah :)
I don't get it :/
I thought chaining just made (a == b == c) -> (a == b and b == c)
If you have bool1 and bool2, you could write it as bool1==bool2
Which is true iff all three are equal?
But only if bool1 and bool2 are never both false
Try 0==1==asdfafsafasfa
This is what I have: l[k][j]is' '==l[k+1][j]
Maybe the is will prevent that?
03:32
>>> 0==1==asdfafsafasfa
False
That looks okay to me
Yes, that's what it should do
339 bytes.
But False==False==False is True
Well isn't that what you'd expect though? They're all the same
We're checking if three things are the same, right?
Yeah, but False and False and False is False
03:34
(also about is on strings: stackoverflow.com/a/2987975/2771429)
That would be like 0==0==0.
Basically the golf I suggested is not 100% safe
But we aren't really using and except to chain statements, I had essentially x==0 and y==0.
I think I'm bad at explaining this :S
I'm just a little confused at how it applies here, sorry :(
03:36
So x==0==y should be the same thing.
^^ that was what I was thinking
It isn't quite like a and b and c.
OK I just wanted to make sure you thought it through
I have no idea what it is actually doing
:D
Ahaha k XD
grc
grc
(False==False==False is True) is False :P
03:37
btw @hosch250 you can move i from the second last line into the last line if you haven't done so already
338 bytes.
I have i=q.index(min(q));print(*p(i+70),sep='\n')
I mean print(*p(q.index(min(q))+70),sep='\n')
>>> False==False
True
?
Oh
3 more chars: print(*p(q.index(min(q))+70),sep='\n')
grc
grc
>>> False==False==False is True
False
03:38
@FryAmTheEggman You are doing equality, not and
We're comparing if things are the same :P i.e we're not doing (a==b)==(c==d), just a==b==c==d
>>> False==False==False
True
>>> (False==False==False)is True
True
I think precedence might screw it up?
Yeah, probably.
grc
grc
the 'is' operator chains
I'm just being annoying, ignore me
03:39
Ah :P
You know, I wonder if the middle chunk can all go into a massive nested ugly list comp
Yes that is correct
334 bytes.
Posting
Forgot to update byte count ;p
Done.
OK.
Still the longest :(
99 bytes to go to tie up.
03:44
q=[max(sum(x(p(i)[k+1])>j<x(p(i)[k])and p(i)[k][j]is' '==p(i)[k+1][j]for k in b(x(p(i))-1))for j in b(i))for i in b(70,91)] saves a few chars but runtime goes massively downhill so I'm not sure if that's a good idea :P
The final for loop can be one-linered with semicolons
... that's probably a better idea :D
grc
grc
for i in b(70,91):l=p(i);q+=[max(sum(x(l[k+1])>j<x(l[k])and l[k][j]is' '==l[k+1][j]for k in b(x(l)-1))for j in b(i))]
this should work too: l+=[z]*(z!=l[x(l)-1]);return l
Woo almost 300 and getting unreadable, now this feels like golfing :P
grc
grc
03:46
or return l+[z]*(z!=l[x(l)-1])
you could define l and z as named arguments in p
p(i,z='',l=[])
Errr be careful with l
grc
grc
I think that would only work for z
Mutables
03:49
I don't even know where you guys are anymore :(
grc
grc
last two lines of function p can be changed to: return l+[z]*(z!=l[x(l)-1])
... And that's why you never use what you learn here for production code :D
Yeah.
grc
grc
and you don't need the semicolon at the end of the first line
Yeah, I had deleted something else.
I think.
Gotcha now.
315 chars.
:)
03:51
Gogogo beat bash :P
Fat chance, I think.
I'd like to.
Is there anyway I can combine these lines?
t=input().split();q=[]
for i in b(70,91):l=p(i);q+=[max(sum(x(l[k+1])>j<x(l[k])and l[k][j]is' '==l[k+1][j]for k in b(x(l)-1))for j in b(i))]
print(*p(q.index(min(q))+70),sep='\n')
grc
grc
the slower method mentioned before by @Sp3000
OK. Hold on.
This is probably terrible, but maybe l,z=[[l,z+n+' '],[l+[z],n+' ']][x(z)+x(n)<=i] after for n in t: ?
@hosch250 I noticed your answer contains if x(z)+x(n)<=i:z+=n+' '
03:55
OK.
in general if b:s+=t can be replaced by s+=t*b
Hold on, I just cut 2 chars from p:
 for n in t:
  z+=n+' 'if x(z)+x(n)<=i else l+=[z];z=n+' '
I'm losing track again.
erm
i don't believe you can do assignments in a ternary
I think that does something different
311 bytes.
@Sp3000 No, I've done this a lot before.
a if cond else b
grc
grc
03:57
@Sp3000 1 char shorter, assuming I got the order right: l,z=[l,l+[z],z+n+' ',n+' '][x(z)+x(n)<=i::2]
Instead of: if cond: a else: b
No I mean, does this get parsed as z+=n+' 'if x(z)+x(n)<=i else (l+=[z];z=n+' ') group the last or (z+=n+' 'if x(z)+x(n)<=i else l+=[z];)z=n+' '
But also assignments in ternary yeah
grc
grc
I don't think Python allows assignments in expressions at all
OK, it crashed.
That hadn't worked.
RIP program, you will be remembered.
03:59
I've done that before, but it must have been somewhat different.
I have it working again.
(Is thrown to the garbage collector)
315 bytes again :(
>>> x = 1
>>> x=' ' if x==2 else x+=3
SyntaxError: invalid syntax
Yeah I don't think you can do assignments
In a case like that you can do x=' ' if x == 2 else x+3, which doesn't help our case
Is there any way to shorten z=n?
I don't think so.
grc
grc
does this work: c=x(z)+x(n)<=i;z=z*c+n+' ';l+=[z]*(1-c)
04:03
Where?
Oh my
grc
grc
for n in t:
grc's pulling out the insanity
Ooh.
grc
grc
we have to beat bash right?
04:04
name n is not defined.
grc
grc
for n in t:c=...
Nope, I don't know what it does/
eismod
minim
aliquip
reprehenderit
pariatur.
culpa
dolor
incididunt
quis
commodo
velit
occaecat
mollit
mollit anim id est laborum.
This is the output.
314 bytes :)
Oh boy, I've wasted over an hour here!
I HAVE to go NOW!
grc
grc
ikr... I have an exam tomorrow :(
I'm meant to do an assignment but... nah
I have chores to do - it is past 10PM!
04:07
:P thanks for the fun
You too!
@Sp3000 I just tried your de-optimizer, and it didn't save a byte.
Which one?
So we don't need to worry about that.
q=[max(sum(x(p(i)[k+1])>j<x(p(i)[k])and p(i)[k][j]is' '==p(i)[k+1][j]for k in b(x(p(i))-1))for j in b(i))for i in b(70,91)]
Ahaha k
Yeah I think once we moved only max in it didn't help much
:18497543
04:10
(because l got expanded to p(i))
OK. Thanks for helping!
Bye!
:) k
Well damn Martin's got cracked

« first day (1377 days earlier)      last day (3763 days later) »