« first day (1732 days earlier)      last day (3099 days later) » 

8:00 AM
@aditsu D:
I'm currently writing a large-ish project that adds a system for scheduled events to MediaWiki. I definitely have a life.
5 hours ago, by TheDoctor
this is like the most active chatroom on all of SE
Meh, it's morning in Europe and midnight in the US, it's bound to be quiet at the moment
luckily :)
@El'endiaStarman If you want to get feedback in the sandbox, leave your question there long enough for people to see it!
8:11 AM
@PeterTaylor It was there for a day! People only gave feedback on the Mirror Maze one after the third time I asked in here.
You could try adding obviously stupid aspects to the description while it is in the Sandbox.
tbh, I only look at the sandbox when I'm checking on my own post
Me too :P
Did you try asking people in chat while it was in the sandbox?
That's what I do to gather interest
I asked if the concept I had was a duplicate of the existing question.
yesterday, by El'endia Starman
Okay, so, there's a really old question on Huffman encoding, which asks for a Huffman tree. What I had in mind was that programs would compute the Huffman coding and then output each character along with its binary representation, sorted from shortest/most frequent to longest/least frequent. Are these different enough that they wouldn't be duplicates?
On a happier note, the disapproval face program in Minkolang works now!
8:20 AM
heh, localhost:8000
Can we all come along to your house to see it in action? :D
I know I know.
I realized my mistake after I posted that.
I have to fix something else then I can push the changes to the public server.
@El'endiaStarman Apologies. I saw Mirror Maze twice actually but had no idea what to say...
Okay for real this time.
@aditsu, @BetaDecay ^
@xnor Good point, I'll put some loose time limit on it.
8:34 AM
@El'endiaStarman Hm cool. How does it work?
@El'endiaStarman Outputs 1 more _ than expected. -1 :P
"_ಠ" pushes the two characters on the stack, but in reverse (so it's [ಠ,_]). nD takes an integer from input and duplicates the top of stack that many times ([ಠ,_,...,_]). 0c copies the first element of stack ([ಠ,_,...,_,ಠ]). (O). outputs it all.
@Sp3000 Happy? :P
Now it's too long :P
8:38 AM
@MartinBüttner I think I get it... mostly from your first description :p
@El'endiaStarman You need a byte counter
@aditsu This would also allow storing several values in a single variable: {}:3X
@BetaDecay That's the next thing I'm adding.
(which would be yet another reason to reassign one of the "" variables to {})
I guess I might as well go ahead and do that now.
8:40 AM
@Dennis Damn it, sorry for downvoting your answer, I must've pressed the wrong button :P
@MartinBüttner I think I also wanted to use some kind of closure occasionally... usually ended up using variables or refactoring
I'll consider your suggestion :)
if you do implement this, I think this should pop the block and the variables. it wouldn't be consistent with :variable, but I think it would likely be the more common use case.
oh, you mean {}:3X should not leave X on the stack?
I mean it should pop the block and the next 3 values
(so "yes", I guess)
because if you actually use it as a closure, it seems unlikely that you want to use it right away
and ;;; or ;;;; is expensive
^^ was about to say, ;;; alternative sounds good
8:45 AM
it should definitely pop the values, but should it leave the closure on the stack?
also, I'm not sure we agree on the term "next"
we should write some examples
I guess there are a few options. 1 2 3 {}:3X could leave the stack in any of the following the states:
1 2 3
1 2 3 {}
{1 2 3}
It should probably be the first or the last.
are you working on a newer version ?
btw, :1 would be the same as + if I implemented it with blocks, right?
@Optimizer I don't think so, I just suggested a feature yesterday.
and :2 would be ++, etc
8:49 AM
I meant for aditsu, in general
@Optimizer yeah, but not very actively
@aditsu Then you'd have to special-case blocks, I think. otherwise {abc} {def}:1F would yield {{abc}def}, right?
isn't that what you want for :1 ? ^
it is, but + (with blocks) should give {abcdef}, I think
right, that would make it different indeed
I guess arrays would behave differently too
I should implement both features :p
@aditsu you should
@MartinBüttner so anyway, I'm thinking the last option would be the most consistent and expected; the first one might be a little golfier?
if you want to run it immediately, ~ vs X is the same; if not, you save a semicolon
I'm not sure you'd ever want to leave it on the stack
@aditsu That's what I think very often when storing things in variables :P
I'd be okay with the last option though.
@MartinBüttner oh, I often want to leave them in general, not sure what's the more common case and how much more common
8:59 AM
@BetaDecay It has been added!
@aditsu for functions, I do, because why would I define them before I need them. but for other values, I often don't... it's true though, both cases happen.
we really need a way to get proper usage statistics of our golfing languages :D
@El'endiaStarman Yay! claps
@MartinBüttner ain't nobody got time fo' dat!
@MartinBüttner me too, I think
did I ever open a ticket for the block variable?
ah I did
9:20 AM
I just made a change that will break just about every Minkolang program I wrote before this.
Oooh what did you do?
() now works just like ($). Meaning that it pops the top of stack and checks to see if it's falsy. If so, it breaks the while loop.
Most answers before now have interpreted () as "repeat until the stack is empty" and (...$) as what I just described.
What did it do before? No pop?
Hmm. Actually, answers using (...$) will continue working normally because now $ doesn't modify ).
I made this change because it seemed a bit silly to have to use (...$) in most useful situations, with (...) being useful primarily for outputting the whole stack.
Hence, I now also have $O, $N, $o, and $n as output stack as characters, output stack as numbers, read in all input as characters, and read in all input as numbers, respectively.
Incidentally, "Hello world!" is shorter in Minkolang now. :P
"Hello world!"$O.
It's only a byte shorter either way with pop/no pop :P
9:25 AM
Yeah, but the longer way is the more frequent one. I just thought that was kinda silly.
Hmm I've had use cases for both pretty equally so I dunno
If I really need to worry about it, (...I) will now function like (...) once did.
Maybe I could take $) to mean "stop when there's one element".
Probably more useful to just check the length of the stack for that
But that would be (...I1-).
Two extra bytes.
$) could be useful in fold-type functions.
Well, your choice? :P
9:29 AM
haha, yeah
Nah, I'll go with the longer way.
Normally, $ toggles functionality to something that's related.
Personally, I feel like it's better to have builtins for things you can't do easily, unless you do it really often
Regarding math functions, I think I'm going to do something like where 4M is mean and 4$M is standard deviation. This lets me build in a bunch of math functions without using up all the rest of the un-assigned characters.
And I'll do the same with T for trig. 1T is sine, 1$T is arcsine, 4T is atan2, and so on.
Why not 5T is arcsin?
'cause that's a little harder to remember.
I like grouping similar or "I wish it worked this way" functionality with $.
Like, ~ is negate, but $~ is absolute value.
Dilemma: can't decide whether to make it absolutely shortest or natural and easy to remember. Solution: make it both non-short and difficult to remember.
9:37 AM
What's the opposite of negate? Positivize?
@El'endiaStarman opposite in what sense?
Negate is the opposite of negate.
Yeah, but I'm talking functionality.
What's the opposite of being a negative person?
What's the functionality of a person?
This is just in the context of deciding what $ does, if anything.
@feersum The point is that positive is the opposite of negative.
Negate adds a - or takes it away if there is one. The exact opposite would do nothing whatsoever.
9:40 AM
Unless someone can spot any more problems with this, I'll post it after lunch: meta.codegolf.stackexchange.com/a/2268/8478
So I went for a sorta-opposite: make it positive.
What if I multiplied it by 3?
That's just as opposite of negate as the identity function.
But there's no good conceptual link there.
And that's well-served by 3* anyway.
If I didn't have x$~ as abs(x), then I would have to do x2;x: for absolute value, and that would fail if x=0.
Q: Shortest possible FizzBuzz in Swift 2

Richard G. NielsenI know that a good answer to the FizzBuzz test would NOT be to make the shortest possible piece of code, but just for fun, I tried to do just that anyway. In playground in Swift 2, I have the following working code: for n in 1...100{print(n%3*n%5>0 ?n:(n%3>0 ?"":"Fizz")+(n%5>0 ?"":"Buzz"))} 75...

It also wouldn't work very well for complex numbers, I think.
Yeah, division fails.
Well, if I do float division, it works, but gives the wrong answer.
9:57 AM
How are you getting real/imag parts with complex?
I don't have that functionality yet!
I think I'll use z for it.
Or bundle it into M.
...I wonder if modulo works with complex...
Nope. Error.
@SuperJedi224 I just stumbled across this. Just in case you're not aware our policy for golfing others' posts via edits is "Don't!".
10:13 AM
Haha replacing someone's post with a completely different program. Niiiiice.
lol wut:
10:39 AM
lol wut :D
such pride
did anyone of you know that javascript has goto-like labels to be used in continue and break?
I disagree with your note: it's the same question which for the existing answers requires a simple transformation of output format, and moreover any answer to this question is automatically an answer to the previous question. — Peter Taylor 4 hours ago
@PeterTaylor Maybe this would be a good time to close an old question as a duplicate?
There are only five answers on the old question, and after a quick glance the new challenge's spec seems a lot better.
^ History is about to be made
Q: Using distinct in a Linq query

RifkiHi I'm having trouble retrieving distinct dates from a database. In this database I have several events on any particular day and results show a list of events with the same date / 'StartDate' field. How could I retrieve just the distinct days. I've tried: ICollection result; result= client...

@El'endiaStarman Gonna try the jquery question in ><>. How well do you think I'll go? :)
@El'endiaStarman Including the period?
10:53 AM
@Optimizer I know java has that
^ random answer
^ odd response
^ java is not related to javascript
^ it's vaguely related, and an interesting observation (or so I thought)
^ every language is related to every other vaguely
10:57 AM
^ java and javascript more so than most others
^ NO
Whoever wants to copy Java's name might want to copy its syntax also.
@feersum they actually copied some of the syntax
@Optimizer sure. both imperative, both C-family syntax, both with an almost identical set of control structures... certainly makes them similar enough to warrant a comparison when talking about goto/continue/break.
@MartinBüttner asking a question about language X and getting a response for Y gives me enough reason to call the answer random
fine, you win the right to call it that ^
12:50 PM
Anyone else feel like this is taken from a contest?
Q: Coloring the switchboard red

ghosts_in_the_codeQuestion If you are currently on a cell with a value x, you can move to any cell in the same row or column, provided it has a value y such that x > y. This move is called a switch. The input consists of: two integers 0 < m,n < 50 an m by n grid filled with integers in the range -128 ...

Taking works too...
sort of...
in a different meaning
12:52 PM
@Geobits it wasn't the word I thought when I was typing though :D
Q: Coloring the switchboard red

ghosts_in_the_codeQuestion If you are currently on a cell with a value x, you can move to any cell in the same row or column, provided it has a value y such that x > y. This move is called a switch. The input consists of: two integers 0 < m,n < 50 an m by n grid filled with integers in the range -128 ...

Anyway, ghosts is a regular over at Puzzling, and I haven't noticed him pasting copied content before. It's possible, but I'd give him the benefit of the doubt unless you can google it.
ghosts is singular?
oh username
@Geobits Fair enough.
don't google google
12:54 PM
don't google "don't google google" either.
Maybe he competes in contests and learned from there a style of writing specifications.
I don't really understand what "red" means here. Anyone else?
@Geobits It's only explained at the very end in the "condition". Red cells are potential starting points for paths. You're supposed to find the minimum number of such starting points such that any cell can be reached in no more than k steps ("switches")
Oh, that makes sense. For some reason I was thinking that the switching had something to do with turning cells red or something. Thanks.
yeah, I think the spec could be a lot clearer
it's a very nice challenge though
I wonder if it can be solved greedily. the maximum cell(s) of the grid obviously have to be red. now flood fill k steps. if there are cells left, again turn the maximum remaining cell(s) red and flood fill again. etc.
hm, probably not
the first step is valid, but the second one not... it might require fewer red cells to add a red in the flood-filled part, which can reach the maxima of the remaining cells.
yeah, counter example:
5 4 1
1 3 2
1 2 1
k = 2
greedily, you'd turn the 5 red. flood fill reaches everything except the 2s. and the bottom-right 1. greedily you'd now use the 2s giving a score of 3 reds. but turning the 3 red instead, you can reach all of the remaining cells as well.
1:11 PM
The bottom 2 should be flooded, right? 5->4->2?
oh, true
anyway, you can easily construct it such that you've got two 2s that are reachable from 3 but not from 5
5 4 1 1
1 3 2 2
Right. So non-greedy it is :)
It'd make a nice [code-challenge] if there's no easy way to optimize it. Give a 1000x1000 grid with k=6 or something ;)
Well, I suppose you can always solve it as a set cover problem, but that being NP-complete, I'm not sure it would finish in a reasonable amount of time for 2500 sets.
1:22 PM
And if it does, just make it bigger >_>
well I meant for this challenge in particular, because 50x50 has to run in 60 seconds
Wow, jQuery showdown got five answers overnight
RIP the chances of my answer getting noticed
And it's all because of this damn regex
Why doesn't a simple character class work for this
This only matches the first char
I tried putting a + after it and it didn't seem to make a difference
1:42 PM
@quartata what language? some context for the regex?
Q: The jQuery showdown

Cᴏɴᴏʀ O'BʀɪᴇɴSome time after this incident… There are some of us who are against this defiling order of jQuery. It is an unholy presence, of which must be exterminated. I therefore call on you, the loyal to The New Kingdom of Reformation, to create a program that will eliminate such resistance. All code must...

And it's Java
which should be no different from most other flavors of regex I thought
@BetaDecay I've edited the post, in case you want to undo it.
Side note that doesn't solve your problem, but the backslash should be unnecessary
Does a g flag help the regex?
(don't see how it'd change anything, but doesn't hurt to ask I guess)
@Sp3000 I don't think we actually have those over here in Java land.
@quartata by context for the regex I meant your code ;)
1:54 PM
It's actually Groovy code. But here
(System.console().readLine()==~"[jJqQuUeErRyY\$x0]"?{print"This programmer is guilty of Heresy. He must be burnt."}():{print"Program validated. Clearance level 2 given."}())
I'm thinking it has something to do with Groovy's ==~
"Finally, the ==~ operator is a quick way to test whether a regex can match a string entirely. myString ==~ /regex/ is equivalent to myString.matches(/regex/). To find partial matches, you need to use the Matcher."
shortest fix is "[^jJqQuUeErRyY$x0]+" and switching the roles of true and false
A completely ignored genius
@Rainbolt flag it?
Did you flag it?
You realize that it's going to be rejected, right? This is Board and Card Games we're talking about
The mods there refuse flags unless the message is actively harmful
2:02 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Your reference implementation declares 1.$ not defiling. Is that intentional? The spec seems to say something else...
really? I found it's one of the nicest and most consistent punctuation rules I've seen in a while.
2:17 PM
only splitting on spaces: ' '.join(x[0]+''.join(2*x[1:i]for i in range(1,len(x)+1)) for x in raw_input().split())
84 chars
A: Sandbox for Proposed Challenges

trichoplaxGambda: an important useless operator Input A list of 1 to 255 positive integers, each in the range 1 to 231. Output A single integer. The output can be calculated however you wish but much match the result of the following calculation: Each input integer is converted to a 32 digit binary ...

@MartinBüttner Thanks! That's an early sandbox answer even for you...
@trichoplax and I even resisted writing one when I first saw it ;)
@Dennis @Optimizer CJam mini challenge. array of numbers on the stack, turn it into an array containing only the minimum and maximum of the array (in any order. feel free to keep duplicates)
cc @Sp3000 @aditsu I guess ;)
@trichoplax what's with the name "gambda"?
@MartinBüttner $(\W>+
that was my first attempt as well (just using ) and 1<). do it in 5 :P
(or less if you can ^^)
(that gives them in order and works for size 1 too)
3:03 PM
ah, yeah, should have mentioned size >= 2
@MartinBüttner My first attempt at a meaningless but vaguely mathsy sounding name. Any improvements welcome... :)
Hmmm, turns out it's a real name - I'll have to think of something different
@trichoplax Call it the WRONG operator
Is it OK to use the term "operator" when it takes an arbitrary number of arguments?
@trichoplax hmmm... something something bit planes something
bit plane extrema?
3:06 PM
@trichoplax It operates on a list. One argument.
Ah I see
Rubber ducks I need your help!
I have a string about 50k characters
I'm doing a regex substitution that's supposed to make it shorter
But then it's 300 million characters.
Do it backwards
@feersum What's the regex and the substitution? (Bonus question: what's the string. ;))
<Rubber Duck> Not enough information. Quack.
3:13 PM
It replaces strings of word characters with the item found by looking up the match in a dict, or same as the original if it's not in the dict.
does your dict have longer values than keys by any chance? :P
No... I printed out the whole thing and nothing long in it.
@trichoplax biplex is nice :)
I think I found the problem.
@feersum then it's hard to tell without seeing the regex and the substitution code. quack.
3:16 PM
@MartinBüttner $_,(%
@Dennis yeah that. I thought that's really neat :)
The function I called on the match object gives the string the match was found inside of, not the matched portion.
I've used that trick a few times, I think.
if we had a -2 variable, there would also be a 5-byte solution that works with a single element
anyway, I'm glad we could help :D
-2 would be useful sometimes, yes.
More useful than three different variables for zero, I think.
3:19 PM
@aditsu hint
or 5 different values for "" ;)
I can see the value of having two of them. maybe even three... but 5...
@Dennis nice
Thanks. The alphabet (upper and lowercase) would also be really useful from time to time.
alternatively, the printable ASCII characters (although I think that's disproportionately more useful on PPCG than in general)
3:26 PM
With uppercase alphabet, lowercase alphabet, digits and printable ASCII, there would still be room for two empty strings and two zeroes. Just sayin'.
@MartinBüttner Thanks - and thanks for the inspiration :)
@Dennis I think A,s is fine for digits
I'd rather have the empty block in a variable
especially if aditsu actually adds closures
Oh, empty block would be neat too.
also I remember your ticket for 2-character variables
I think all of those strings could be 2-char variables and still save a lot
Well, looks like my 200-point bounty on Calvin's challenge won't go unclaimed.
A: Cramming The Gramming - Twelve Task Tweet

WeregooseTI-BASIC, 10 tasks in 677 bytes Download all as a TI Group file (.8xg) (Spoiler tags added per request.) Task 1 - Can Three Numbers Form A Triangle? - 7 bytes Task 2 - Closest To One Million - 114 bytes Task 3 - Simple Keyboard Simulator - 131 bytes Task 4 - FILTHE Letters - 34 bytes ...

3:28 PM
Q: The Combinatorics of Transistor

Martin BüttnerThe video game Transistor features a very interesting ability system. You collect 16 "Functions" which you can use in 16 different slots. What's interesting is that there are 3 types of slots and every Function behaves differently according to which slot you use it in: There are 4 Passive Slots...

Gah, long words
@ThomasKwa What's the reasoning behind wanting spoiler tags for the code blocks?
This week, I'll put up another 400 or 500 points, and I don't want any other competitors to be spoiled.
I'm slightly tempted to propose the transistor numbers for M = 4 as an OEIS entry...
3:38 PM
Go on do it. What's the worst that could happen?
It could get tagged dumb.
@Dennis I think I have about 50 different requests for variable values :p
@aditsu that's why we need 2-character variables ;)
How about v for variable? That's 95 two-character variables.
Also, is Pi/180 one of those fifty?
@Dennis I was going to suggest that earlier today (actually, I thought about two degree/radian conversion operators... your idea is much better though)
@aditsu Looking at the earlier $_,(%, I think defining 0% as 1< would probably be consistent behaviour.
3:51 PM
There are already two shorter Python 2 answers. — Thomas Kwa 1 hour ago
I'm getting tired of this. People bully you for posting an answer after another has been posted in your language
So am I.
@TheDoctor Thomas has a point regarding your response. But if the new answer has a different approach I don't see anything wrong with posting it.
@MartinBüttner I was thinking about that too
This doesn't add anything to xnor/FryAmTheEggman's shorter solution lambda x:x.translate(None,(x[0]*2).title()), or the 61-byte solution that was already posted above. I recommend deleting this. — Thomas Kwa 2 days ago
leave doge alone :p
3:53 PM
If you have a creative solution, or a shorter one, I'm fine with it
but if everyone posts their own poorly-golfed Python solutions we'll end up with pages of answers that aren't worth reading.
@ThomasKwa that's what votes are for.
There, have a downvote.
3:55 PM
I do point out duplicate answers if they are exactly the same solution (+/- a few irrelevant details) but if not, I don't see anything wrong with them.
@TheDoctor can you remove the space?
in the Python answer
oh wait
28 is 4*7
yeah that
no that doesn't work
But having 4 would make it 13 bytes
3:58 PM
you could still do print 'aaaa'*7
or print'aaa'*8 I guess?
(if it works without the space)
Any trailing newline is included in the output's byte count.
@TheDoctor Do you object to people suggesting improvements to your answer as well? :P
@Dennis oh
3:59 PM
@MartinBüttner no,
ah, yeah, that simplifies things
but that's basically the same as codegolf.stackexchange.com/a/59438/39328
oh right it's mentioned there at the bottom... with the trailing newline thing that answer doesn't seem to be valid though
4:20 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Please stop adding bonuses to your challenge. I already revised my code once to get the -90% bonus, now I'd have to edit it again to stay competitive...
Q: Why can't I post my answer after others use my language?

TheDoctorI've been getting a lot of grief lately about posting Python answers after other users have already posted a Python answer. Not only do I come up with these independently, they sometimes are shorter/different solutions. I'm getting really tired of this bullying. Sources: http://chat.stackexchan...

@NewMetaPosts 14 minutes late
@MartinBüttner May I delete the "in under 100 bytes" part? I don't see how that could possibly make the challenge worse.
it would make the challenge slightly better, but there's just so much else wrong with it, I wouldn't even bother...
eh, I'll do it; basic cat is a pretty important challenge, and it won't be going away.
See, someone bumped it anyway.
@Dennis I've got it already.
@ThomasKwa I think I've had it with that one... sandboxing a new version right now, before people waste more time answering the old one...
(indeed, it's a pretty important challenge, and that spec really doesn't do it justice)
4:51 PM
Is it allowed in tag:code-golf to post the compiled version(the .class file) of a Java file instead of the actual .java file?
@ΚριτικσιΛίθος Hm, I think it wouldn't be Java then.
Generally speaking, we count source code size, not compiled/intermediate/etc.
Anything which can be compiled or executed is good.
You could submit it as "Java Bytecode"
4:52 PM
Right. I guess that could work, just don't call it "Java" ;)
there are some meta discussions about this
Anarchy golf has a Java bytecode category.
Q: How should we score compiler/interpreter build-time options?

Digital TraumaPrompted by this comment. The scoring of optional flags passed to compilers/interpreters has already been handled here and here. However there is another case of one more level of indirection. Specifically compilers/interpreters for some languages may themselves be built with extra options t...

If there is corresponding assembly, then the assembly character count should be the score. My 'c' compiler may be able to reduce reduce y=m*x+b; into a single instruction word, but I stil get dinged for 8 characters. You should be scored on the language you write in, not your compiler's output. (Unless you really are writing in raw binary...) — AShelly Jan 31 '12 at 19:31
4:56 PM
If you don't write code manually, you're probably not going to get a very well-golfed program.
This is also the reason I'm no fan of ShadyAsFuck and similar languages. If you're actually writing in BF and using a lookup table, just post the BF.
I write my code podially
@Geobits This in turn is why we should continue promoting challenges as competitions within each language... then it no longer matters how the language is encoded.

« first day (1732 days earlier)      last day (3099 days later) »