« first day (1402 days earlier)      last day (3737 days later) » 
08:00 - 23:0023:00 - 00:00

08:24
Can I get some useless and obsolete comments removed from some answer please ?
grc
grc
@Doorknob ^
 
4 hours later…
12:44
@Optimizer You see that little "flag" link below your answer? It's there for a reason ;)
13:00
@Doorknob That is for answers, no ?
BTW notifications for chat pings come in at least 15 minutes late :/
@Optimizer comments have them to
@Optimizer Yes, you can flag the answer as "other" and explain in the textbox.
@Optimizer and yes, it would be really annoying if you got a notification on the main site for every ping in chat while you're currently active in chat
@Sp3000 have you seen the new clues for the star wars word search cryptogram?
@MartinBüttner but I was not active., at least the tab was closed.
Nope not yet, still going on with that?
13:03
I actually looked into all those things at the beginning, but I figured a) there weren't enough words and b) his "the order doesn't matter" comment was totally misleading.
@Optimizer hm, I wonder if it would be possible to fix that if people aren't currently in the chatroom. although I'm pretty sure someone has complained about it on MSE already
Yeah, chat ping notifications always seem to come ~15 minutes late. (whether you've been in the chatroom recently or not)
@MartinBüttner Looking at the clues I'm not sure how I feel... either the solution is really nice or the puzzle seems messily constructed, and I can't quite tell which right now...
@Doorknob Thanks for cleaning up that mess.
 
1 hour later…
14:35
added a stack snippet to generate leaderboards, and will probably post in an hour or so:
2
A: Sandbox for Proposed Challenges

Martin BüttnerShortest Minmod Function code-golfmath The minmod function is a variant of the familiar min, which appears in slope-limiting high-resolution schemes for partial differential equations. The function takes an arbitrary (nonzero) number of parameters. Then minmod(x1, x2, ..., xn) is defined as: ...

(the leaderboard for the test question is a bit of a mess... to read out the language from answer answer, I'll have to require a slightly stricter heading format than the answers on the test question used)
should I make the inputs integers? I doubt it will affect any solutions, but it might be more inclusive for some esoteric languages
Well if you want esoteric languages then I guess it'd be better :P
Marbelous would still be impossible though ^^
although I guess one could interpret the bytes in two's complement
Why would Marbelous still be impossible again? Just because of the int size restriction, or...?
no, Marbelous doesn't technically have negative numbers
in fact, the guys wrote boards to do 32-bit integer arithmetic ;)
oh, test cases would be nice
Ahaha, right. I feel that some languages would require a little reinterpretation of the rules, e.g. FRACTRAN can't take arrays as input, so the input would have to be encoded in some way. Piet sounds doable though [/running through languages in my head]
Actually what am I thinking, FRACTRAN doesn't have negative numbers either. Can't use that at all :P
14:46
Marbelous doesn't do arrays of variadic function either, but you can just get a byte stream from STDIN.
changed the rules a bit and added test cases
15:31
0
Q: Shortest Minmod Function

Martin BüttnerThe minmod function is a variant of the familiar min, which appears in slope-limiting high-resolution schemes for partial differential equations. It picks out the number with the smallest absolute value. The function takes an arbitrary (nonzero) number of parameters. Then minmod(x1, x2, ..., xn) ...

the title could be catchier. suggestion welcome ;)
15:44
Ughh, I just posted this answer and rep capped :(
Should we not upvote it til tomorrow then? ;D
@Optimizer I'll wait until tomorrow to upvote ;)
You guys are so sweet :)
@Optimizer I could have, but as I said I only ever added the limit in the first place to deal with sorting, which is a pretty stupid way to handle it.
well, for that, yeah
15:50
also yeah, the bugs with : and f are so annoying
what bug do f has ?
the same things, I believe
although I don't know if any binary operators are affected
oh, you mean to do fz instead of f{z} ?
well fz doesn't really make sense, right?
yeah, then what bugs are you talking about ?
15:52
I feel like I've had the same problem with f before... let me check
yeah, e.g. you can't do fmd
well, I think that its syntactically incorrect
f requires {}
well it doesn't for other binary operators though
really ? never ever tried
I can do f% and f/, so I should be able to do fmd as well
oh right, f+ is also possible
/me back to golfing
16:13
Are strings in CJam not arrays of integers?
in some manner
what do you want to do ?
you can probably only add or subtract from those , not do any other operations
Bitwise operations, division
not sure, but I think you can't
@FryAmTheEggman Why is this incorrect ? Lb;y[-2 -3 -4 -5) ?
@Optimizer In pyth, - is binary minus, _ is unary negative :P
ugh
So will that be considered as a valid input ?
[_2 _3 _4 _5) ?
16:19
Uh, should be.
APL does that too, and I've never seen it banned...?
@PeterTaylor no I don't think so. base conversion is one of the few things that coerces to ints automatically
characters are an actual type in CJam
you can add or subtract ints from chars
sure, but they remain characters
and you can't add characters
well adding them is concatenation
okay, you can subtract them
16:35
But it makes the translation of my RNA GS code slightly harder than I expected
The other big problem is that CJam doesn't seem to have or
bitwise or logical?
Logical
yeah, that's e|
Ah, yes, that works
16:36
how many bytes ?
96
No, 97, forgot to add in the q
what did i say :P
what did i say :P
You said at most 5 bytes. I've found 6 :P
@FryAmTheEggman Any hint on doing signum in Pyth in least number of bytes ?
16:53
@Optimizer how long is x?x/abs(x):0?
or wait
there is no abs in Pyth
then what about (x>0)-(x<0) or just using Python 2's cmp(x,0)?
Hmm, was looking for somethign shorter than 7 bytes
@Optimizer I tried using the JS ternary idea and got 28 bytes
u??G?>GH<G0<GHH|>*GH0!G0tQhQ
I am sure I can get 27 bytes with a direct translation of my CJAM code
17:06
^_1>x0 was the shortest I could get for +/- 1 in pyth, sorry :(
I'm giving up.
Ok, I just realized I'm dumb
The ternary way gives 25 bytes if you don't check that a number is 0 when you already checked its > 0 >:|
17:28
@MartinBüttner Will putting a link to pyth in the first line break the code snippet?
@FryAmTheEggman yeah, it will include the link in the leaderboard
(as plaintext)
Ok, I'll leave my awkward link then :P
17:59
@FryAmTheEggman After you are done, I will shamelessly translate your Pyth solution to CJam, with same bytes.
well, maybe not same bytes ... :(
Bool multiplication got you?
no, variable assignment
Shouldn't have told me about t, I would've never thought of that :P
18:05
1 byte would have done nothing
i am at 24
any mathematical operation is exactly the same bytes
Yeah the implicit lambdas in pyth are pretty nice
 
1 hour later…
19:35
hey, I'm looking for somebody with experience with jquery
for some odd reason, jquery is loaded, but $(document).ready() is not a function
19:52
@MartinBüttner weird thing happening
when running cjam from command line, this is the stack trace : `Stack: ["aardvark
" 9 9]`
which is basically _,9 in a filter
the line breaks are \r\n
I had the same issue
oh!
so its consistent across platforms ?
the string is coming from internet via a url.
it's probably in the file
what file ?
the file you're downloading
19:58
ok cool
20:10
@Optimizer what's that URL? o.O
Heh, yeah
well, file readers have to only use 5 bytes for the file name , so its fair enough that I use 12 ;)
I hope you don't mind if I use the same URL then :P
:D
urs' will be shorter then na ?
20:15
X-|
:P
:|
....
20:27
@MartinBüttner that is 48 bytes.
not 47
you're right, looked at the wrong number
47 now
20:41
@MartinBüttner I have also been working on the code and we have almost converged to same code. What should I do ?
@Optimizer I don't know?
and now that you are using my trick of Dc, its tooo same ;)
@Optimizer I can revert that, it doesn't save any characters :P
I wish it was \n\r :(
No need, I will continue to find a shorter.
@MartinBüttner Oh also, even I forgot. the last character of the url is extended ASCII only
so 1 byte only.
ah, sweet :)
20:50
"ri.ms/§"gDc-N/{,ea~~=},_Wf%&{_W%>},N* works too.
38 bytes
@MartinBüttner Maybe it's weird because you're the question-asker, but I'd like to get your help in writing a mathematica answer
hehe, no problem
-Quine ?
@MartinBüttner is there a place to test mathematica code for free?
20:57
@Optimizer minmod
@xnor not that I'm aware of... there are these CDF player files, and there are a few open-source implementations of Mathematica, but those aren't complete
ok, darn
meta.codegolf.stackexchange.com/a/1445/8478 but I don't know if you can write a CDF file by hand
that looks hard
I just looked at such a file, it seems pretty tough
how about i just give you pseudocode and you convert it to mathematica and golf it and we make it a CW answer?
21:01
mathematica does not have a demo version ?
@xnor I can port it and you can post it ;)
@Optimizer I don't know
anyone else in chat golf mathematica?
ok time to sleep. another day, another rep cap.
it will feel like a more legit collaboration without the question asker :-)
@xnor PhiNotPi does, I think
@xnor it's not like I have an advantage from asking the question
21:03
ok, here's what I want to do
take the input as a vector
make an equal-length zero-vector, presumably by multiplying the vector by 0
concatenate that zero vector to the end
concatenate the result to itself
remove the last entry (which is 0)
and take the median
the concatenation might get expensive... I'll give it a try
I think it'll be shorter with a variadic function
(the doubling and removal is to force the list to an odd length to avoid the awkward averaging behavior of median for even-length inputs)
what's a variadic function?
takes a variable number of inputs
oh, i see
if concatenating is costly, here's an alternative
but no it doesn't... multiplying by zero doesn't work in that case
21:06
take the input, and concatenate one fewer 0 than its length
then take the median
sorry, my old description was prematurely optimized to the python pseudocode i was imagining :-)
31 bytes: Median@Most[Join@@{#,0#,#,0#}]&
:-o
i know what that does and i still don't know what that does
# is input array
so {#,0#,#,0#} is basically what you said earlier
ok, i see
Join@@ flattens that array
Most@ removes the last element
21:10
that's not what i'd expect Most to do :-)
@xnor isn't that the same as before, apart from "concatenate the result to itself"?
yes, you're right, Median@Most[Join@@{#,0#}]& should suffice
in that case is there an easier way to do l+[0]*(len(l)-1)?
maybe
#~Riffle~0
21:11
oooh
the power of built-ins
19 bytes: Median[#~Riffle~0]&
beating Pyth
hell yeah :D
nice
how does the syntax around Riffle work?
it's infix notation for binary functions
so a~f~b is just syntactic sugar for f[a,b]
ah, gotcha
this could also be linear-time by the way if Mathematica does medians with a smart algorithm
I'm sure it does
21:14
are you convinced that this works?
if your algorithm works, this implementation works :P
what is the proof that median is what we need ?
let me make sure you're convinced the algorithm works
@xnor I think I see why it does.
and Riffle, just to check, doesn't put 0's at the start or end, right?
21:15
@xnor yes exactly
perfect
it's similar to .join(0)
got it
@Optimizer there's 3 cases
@Optimizer if all inputs are positive, the median will be the smallest of those. if all inputs are negative, the media will be the largest of those.
in all other cases, the median will fall into the zeroes.
exactly
21:16
this is damn clever
I'm afraid someone will steal this for a Pyth submission though :D
oh wait, there's no Median in python
:D
yes
@MartinBüttner ok, i'll post it, but CW -- you did all the coding!
no, please don't CW it
doesn't median internally use sorting ?
21:17
you definitely deserve the rep for coming up with that
@Optimizer Mathematica isn't open source :P
but it doesn't have to
@Optimizer there's a linear-time median algorithm that's faster than sorting
presumably mathematica uses that
any proof ?
I could run a benchmark, I guess?
Martin Büttner changed the spec to ban sorting and allow any runtime, so it doesn't actually matter
but i'm curious
increasing array size ?
21:19
it's hard to tell n from n log n though
it could get disguised by caching and memory issues as the size gets larger
so banning sorting and using a method that internally uses sorting is equivalent to banning calculating pimes and using a method that calculated prime factors ;)
both are implicitly banned , imo
@Optimizer I don't see why a median should be banned, if there's no necessity to use sorting to implement it.
If it is not implemented using sorting, then its fine
that is why I asked for a proof :)
21:21
@Optimizer you should phone up Stephen Wolfram and ask him ;)
you have his number ? ;)
the other way round, you can't prove that it does use sorting... even if it scales like n log n, it might use a non-sorting n log n algorithm
so basically we are not clear, right . what to do in these cases ?
i think that "you must not use any built-in sorting functions" doesn't ban things that use sorting as a subroutine
(which i doubt median does, but i think that's moot here)
Well, as the person being beaten, I don't mind :P
As long as the function could work without sorting I think it should be fine.
21:28
Well since its an ambiguous case, lets call it @MartinBüttner's call
my call is that built-in medians are fine :P
@xnor posting ?
yup, doing it now
@xnor Now with 100% additional xors: lambda l:reduce(lambda a,b:[a,b][a*a>b*b]^(a*b<0),l,l[0]) :P
thanks to you, my CJam entry got reduced to 20 bytes :)
@FryAmTheEggman any scope in your Pyth entry using that algo ?
21:34
I tried but it appears to be the same length
cool :P
Oh wait.
exclusive or to the rescue?
@xnor please use a comma in your headline ;)
hmm ?
otherwise, the leaderboard script doesn't know where to cut off the language
21:36
@MartinBüttner dude, your regex fails on comma, what is it ? 1990 ?
2
@MartinBüttner oh, i've probably been messing up leaderboards for a while then...
@Optimizer it's the only reasonable letter of which I was sure wouldn't appear in the language name
@xnor I fixed your python answer earlier
well, i should tell you about my new esoteric language then...
@MartinBüttner the script we created was able to detect such things, right ?
@Optimizer I don't think it tried to figure out the language at all
21:38
ah, true
finding the score is not a problem in most formats... finding the language is
is the score found by the header or the code snippet?
@xnor header
you might want to mention that your submission is an unnamed pure function, which takes a single list of integers as input
Wow, someone downvoted codegolf.stackexchange.com/questions/42017/… . I wonder why ...
and can be used by appending [{-2, -3, -2, -4}] or by assigning it to a name (say, f) and doing f[{-2, -3, -2, -4}]
21:40
@MartinBüttner i regret to inform you that in my esoteric language, ,,,, , chars ,, bytes,, i wrote a solution of 15844 chars, which i will write comma-separated
@Optimizer maybe someone doesn't like golfing languages?
that question is full of that.
yeah, I don't know... some people have issues...
@xnor lol
I'm glad you didn't invent it before I posted the question then :P
like you wont use the script anymore
also, if :z worked, CJam would also be 19 bytes ..
oh, no, it is simply version 1,0,0,1 that is new
my previous version 1,0,0,0 Jan, 26, 2014 was made on that date
21:42
still invalid
if python 3.1 launches now, you cannot use it for any already existing questions too
@xnor "lowest negative number" is kind of misleading. IMO -20000 is "lower" than -1
in absolute value
ok, edited
u edited editted
i did, huh
21:48
I really wanna try minmod in Marbelous
21:59
r u trying ?
@Optimizer later
btw, my semordnilaps answer got downvoted, too
This is weird, I have at least 5 votes whose rep did not count due to repcap, but now that someone downvoted me, I am stuck at 198
shouldn't it fill up ?
@Optimizer Jeff Atwood too lazy back in the day -> no one ever changed it :P
and the downvote got removed again o.O
When does SE count days?
I'll upvote 11:59 UTC repcap guaranteed :P
22:02
@FryAmTheEggman UTC
@MartinBüttner That was me testing my reps :P
isn't this a bug ?
I think its on meta somewhere
Basically nobody cared enough IIRC
22:03
@Optimizer happened to me before... I think I got 202 once, because someone retracted a downvote after I repcapped
@MartinBüttner Exploit discovered
dunno I would...
there are so many exploits like these.
you cannot be removed off of rep greater than certain amount in a single day
@FryAmTheEggman I think that might have been temporary though...
22:27
0
A: Sandbox for Proposed Challenges

COTOWriting the Hydra Function restricted-source optimization Preamble Sometime in the early 21st century, computer scientists would discover the Hydra function (also known as the Lächerlich function), f, whose signature is given by R = f( A, B, L, x, y, z ) where A, B, L, and R are finite in...

Well, "Writing the Hydra Function" is one heck of a spec to work through, but I'd appreciate some feedback on it. I'll be AFK for a few hours, but rest assured I'll be back to check on it. :)
@COTO You can't just implement the ternary operator as a function.
Function arguments are usually evaluated before the function is called, which is not true for the operands of the ternary operator.
the modulo implementation doesn't seem right to me, was x / k supposed to be x % k?
@COTO It sounds quite fun, but I think you'd better off in this case to restrict this to a single language and provide an online tester and test harness for that language (e.g. C and ideone, and write some boilerplate code for the function definition and all the operators that need custom implementations)... it would probably shorten the spec a lot in the parts where you talk about equivalent statements.
no one can use language-specific features anyway if they're playing by the rules
(also haha, you've got minmod in there)
should 28 and 29 be left-shifts?
and if those integers are mathematical concepts, how are we supposed to return the correct R for stuff like pow if we don't use BigInts?
08:00 - 23:0023:00 - 00:00

« first day (1402 days earlier)      last day (3737 days later) »