@Calvin'sHobbies I've got an idea for a source-layout challenge and I thought I'd ask for some advice from the master of source layout. ;) The core idea is cyclic code: write code, such that as many cyclic permutations of the code as possible are also valid submissions (in fact, the scoring would be to minimise the number of cyclic permutations which are not valid, because otherwise you could probably pad your code to infinity). My problem is deciding what the code should actually do.
I think the problem doesn't need to be hard, because the challenge should be quite tough in most challenges. But I'm not sure if something number- or string-based would be more suitable. And whether different permutations should do different things (because I think otherwise Befunge or something would just win by default).
@MartinBüttner If so then something simple could be "maximize the number of consecutive integers output in all the possible rotations of your code (possibly starting at 0)". Like if ABCD outputs 3,DABC outputs 3, CDAB outputs 4, and the others erroe, then the score is 2 for [3, 4].
@Sp3000 Well ideally it would include everything from C to Java to GolfScript. That would make it easy to write multi-language koth's that everyone could easily test. Just write the base in js and use the interpreters for other languages.I realize that that's not about to happen.
Still, theres a ton of languages on esolangs.org/wiki/Main_Page that would be easy enough to interpret, even if they aren't very useful.
@Calvin'sHobbies Now that you put it that way, you could probably make up your own language (based off something else) to use it in a KOTH... But I guess if C/Java were to happen, it'd have to be a multi-person collab for it to work, cos it'd 1) take too long and 2) probably end up being very buggy if the coder doesn't know C/Java well enough
Can you? I think the problem with the polynomials question is probably not enough people have the mathematical background to get started (myself included)
:P Well actually I had it bookmarked from ages back for "do after I finish my assignments" ... I'm not quite done with my assignments, but it makes for good procrastination
I did pretty well for the ~1 month where I had way too much of a workload to actually participate on this site, other than answer a trivial question and check my reputation. But then I learned to manage my time well and I actually got less time to do assignments because now I'm back to being constantly on SE. Oh and my assignments are mostly boring, except for my math.
@Sp3000 That would be too lazy ;-). It's really not that much harder. Maybe 5 chars with a golfing language, 50 with java, 15 with python. (note: these numbers are from thin air, I hope they are reasonable...)
It should be feasible even with the worst possible brute force method I can think of.
Because I don't have a degree 6 polynomial over F5.
I tested the irreducibility of such a polynomial with a little python program I wrote. Then, when I realized it would take a long time, I did the math and found that it should take ~2 days to finish, even though it only took 20 minutes for a degree 4 polynomial.
Worst possible brute force I can think of: generate all smaller polynomials. Multiply together all possibilities. Check to see if our polynomial is one of those.
one way: only iterate through one polynomial, and iterate through the polynomials of degree such that multiplying would be the right degree.
Another way: go through each polynomial and attempt polynomial division.
(this question was actually inspired by one of my homework questions, which was to prove that there is an algorithm for factoring polynomials over finite fields)
(That was a fun problem. I came up with the first method that I described here, except I had the condition that we could stop if we found the polynomial already)
You are doing a poor job of convincing me to sleep. It's 2AM now. And I need to get up for a 9AM class...
That's faster than the method I was thinking of. I was thinking of generating all possible smaller polynomials and then multiplying them all together and then checking. And yeah....
@Calvin'sHobbies Ah, I was really surprised that no one came up with this yet. Now I'll need to figure out if this isn't even a duplicate of that quine challenge. ^^
@Calvin'sHobbies Ah that's actually a good idea. I had thought of outputting cyclic numbers, but that would just lead to GolfScript answers like 12345.
Also regarding your new challenge. It's quite a fun idea, but I don't think it's going to work well on PPCG in the long run. As soon as it gets a bit more busy this will just cause confusion and frustration, especially if you want to set a harder task in the future that people actually need to put time into.
@Calvin'sHobbies The problem with supporting these languages is that the interpreter will make up a large part of the 30k character limit, so that they might not be suitable to KotHs where submissions aren't exactly golfed either.
@Quincunx When I first become active on SO it was to finally learn regex properly... went pretty well. :D
@MartinBüttner I know, that char limit is annoying. The python answer did alright with outsourcing though, it doesn't require too much scripting. Course it does need a place to outsource it...
@Sp3000 @COTO @user23013 @Unihedron Just to let you know, if anyone wants to submit another regex for the cops and robbers challenge, there is now a deadline for submissions at the end of the week.
@Calvin'sHobbies I thought a bit more about the cyclic thing. Consecutive numbers can still be generalised to infinity
@MartinBüttner Shucks, darn cjam... You could make it consecutive primes or consecutive triangular number or something, but those may have similar issues.
I been working nearly to a year, to build the grates king of the hill, challenge ever.
When I finally done, I submitted it to sandbox, where it been for a week.
It feels like people didn't even got threw all of it. After I published, it raised a lot of questions and misunderstandings, that got i...
Choose Your Own Program
code-challenge source-layout printable-ascii
Let's take a grid of 16x16 printable ASCII characters (code points 0x20 to 0x7E). There are 32-choose-16 paths from the top left to the bottom right corner, making only orthogonal moves, like the following example:
##...........
@MartinBüttner A similar-ish concept was proposed before, and I made the point then that the requirement for a linear sequence of answers is much better suited to a chatroom than to a question on main.
I think that his post is so absolutely massive (even without that detail) that nobody wants to help him comprehensively. I know I don't want to read all of that.
The meta question, I'm not so sure. It's probably attracting downvotes because it's not actually a question. It's more of a complaint with an unstated but understandable question.
@Rainbolt Did you see the original? It's almost as long, but with less detail.
It doesn't help that when asked a question, he seems indirect about answering.
I totally understand the meta question. I'm trying to figure out the main question. Just close and make a suggestion or don't. No need to bombard it with downvotes if you didn't read the entire thing.
Maybe a -7 feels harsh, but there's something to be said about casting votes independently of what votes are there. If a post is bad (IMO), I'll DV it whether it's at +20 or -5.
(Mine was the second on that particular post, though)
Anyway, despite the discouragement, it looks like he is fixing it. Maybe it just needed to be posted on main in order to get the amount of feedback this massive challenge requires.
Besides just being AS3, he also makes it sound like the only/easiest way to test it is on Android or through Facebook. That's a non-starter for me, even as an Android dev. I haven't looked through his source to see if that's true, but it's the impression that I got from the post.
And I still have no clue how the User input is supposed to work with the tournament. If I run it twice with different user input, I'd expect there to be different winners (it would at least be possible, right?).
@Geobits I think the subtext "Not suited for this site" should have been clear enough in my comments in the sandbox. No point detailing minor problems if the core concept is flawed.
@MartinBüttner No, I mean also adding a constraint that if you get the same program on two paths it only counts once. I think that at the very least it won't make it less interesting.
The base-62 parsing: convert the ASCII code to base 32, then switch on the most significant digit to get a value to add to the least significant digit.
Java : 360 area
Bounty: 250
Reconstructing these things is hard! That's probably why there aren't too many robbers participating in this challenge. However, I want to see mine cracked. So, instead of giving the solution after 72 hours, I'm putting up 250 rep to the first successful crack...
This question was closed as unclear:
How to minimize the python code, than make dict for non emty lists
The question has a well-defined input and output, and the question title made the goal clear: shorten it as much as possible. It was closed as unclear. That user may come back and attempt...
@MartinBüttner I just realised that you probably want to consider all comments equivalent for the purpose of counting, so that I can't do the task in 10 chars and claim something like \binom{20}{10} points for what's really one program.
Goal
Your goal is to multiply two numbers using only a very limited set of arithmetic operations and variable assignment.
Addition x,y -> x+y
Reciprocal x -> 1/x (not division x,y -> x/y)
Negation x -> -x (not subtraction x,y -> x-y, though you can do it as two operations x + (-y))
The const...
I've thought of a computational problem that I want to solve, which I think PCCG folks are rather uniquely suited to approaching, and it would form a not-horrible popularity contest question... but I don't think there would be enough different approaches to make it a very good question, in the meta sense
Specifically: I want to dither an image, given a specific palette, and (this is the unique/tricky part) a specific (and different) maximum number of pixels of each palette color.
this would be similar to the "make one image with another image's pixels/palette" challenge, except I'd allow the palette image to be bigger than the target image
Rearrange pixels from one image to form another, with different pixel counts
This would be very similar to American Gothic in the palette of Mona Lisa: Rearrange the pixels except that the images would not necessarily have the same area. If the palette image is larger, then the pixels can be cho...
Hmm. If you made the palette right, maybe you could make it into optimization instead of pop-con. Maybe try to minimize the sum of each pixel's colorspace distance between input and output.
I don't know if that would be too easy to get optimally, though.
No suggestions for the actual task, but you might consider allowing a program or function (or even function body). As is, any languages with basically any overhead are out.
The task could really be anything, I don't think it matters (much) to the challenge.
To be clear, I didn't say "CJam will probably win" was bad in itself. If it was, we'd have to rethink any code-golf posted. By straight byte count, it's usually one of only a few languages that takes the green checkmark.
A common problem for rosetta-stone and polyglot challenges (and some code-challenges) is to decide when two different languages/dialects are different enough to be counted separately. Common borderline cases are C/C++, ECMAScript 5/6, Python 2/3. Very often it's possible to get one of those for f...
That sounds like a fun code-golf actually: Given a Python script, can you tell if it's 2/3? (With specific rules in mind, not convering all changes of course)
Maybe languages that have the similar names, and are governed/managed by the same people/groups?
well... I don't know... to be honest, I'd usually count C/C++ separately, as well as Python 2/3, and even ES5/6. The only thing that I'd like to catch is people not saying "This works in Perl 1,2,3,4,5,6"
probably, but I don't know Perl :P... counting languages is haaard. maybe we should err on the side of ruling out more pairs after all... I mean it's not like there's a shortage of languages out there, so that you run out of ideas if you can't do both pythons or both C and C++
Okay, I think I'll stick with fixed-text output for the challenge, but Maze is just a bit too short I think. Something like 10ish characters would be nice... like Jabberwocky
Maybe what we need is an official list of language classes, and the score is how many of these classes you cover?
Languages used around here don't pop that quickly that this couldn't be maintained.
Let's take a grid of 16x16 printable ASCII characters (code points 0x20 to 0x7E). There are 30-choose-15 paths from the top left to the bottom right corner, making only orthogonal moves, like the following example:
##..............
.#..............
.######.........
......##........
.......##.......