The problem isn't that it's not specific, the problem is that whether a calling convention counts as taking several arguments individually or not, is for many languages a property of a description of the language, or of internal details of how it is implemented, not of the visible behavior of the language itself. — Ørjan Johansen7 hours ago
For Lua, there is even an issue that varargs is just pack (in f(g()), if g returns a pack 1,2, f is called as-if it was called as f(1,2))
if it expands the pack then yeah that's multiple arguments. same deal with cpp parameter packs
as for calling conventions i'm uncertain from inexperience
my opinion is that if you have to manually specify the argument count then it should be invalid; if the language / calling convention specifies the count for you then that it should be valid
do people think shortest code that can play chess without making any invalid move and beat an example bot in a game might actually be a decent code golf challenge?
(the example bot being really basic, to the point where the only nontrivial part of beating it is actually trying to move your pieces properly to get the checkmate)
Try implementing it yourself completely ungolfed, and make the limit 10×your program length.
Besides...
I am voting to close this challenge as "unclear what you're asking", the issue is pointed out by JDL above, and so far there has been an exploit attempt. — user2027296 mins ago
every once in a while a fly breaks a link in the spiders web, the spiders knows the expected value of links that flys will break over some time interval
so he knows in order to ensure his web doesnt fall apart it must be n connected
where n is the expected value
nvm i dont think spiders can comprehend anything of this
@ASCII-only iirc it just packs 2 ASCII chars into one UTF-8, but the decompression algorithm is short enough that it becomes more efficient after 144. I'll see if I can find it
Based on a story about Hansel and Gretel, I need to write a program to help map out the trail.
The program should first read in the size of the grid and then read in directions: left, right, up or down. You always start at the top left of your map. After every step, you should print out the trai...
Not sure if this is the correct community to post this is. But as I see this problem as an interesting puzzle to solve, I'd thought to give it a shot...
Problem Statement:
Let`s say we have:
N collections of parts: A, B,C,D,...etc
Each collection consists of n parts: 1,2,3,4,5 ...
All these p...
@cairdcoinheringaahing yeah but you didn't add that to your links. also 0/10 +11 bytes (space + option) is too ungolfy (although flags no longer count towards bytecount iirc)
@ASCII-only Lambda names are supposed to be long (I regret adding them, but removing them would break too many Add++ answers). I'm rewriting the whole way code in parsed and executed in Add++, but until then, if it works, why fix it?
@ASCII-only As in removing removing them would break too many answers. I could make them shorter, but I don't like lambdas, as they were added to make Add++ shorter
If it provided a complete, working program that actually exploited the problems in the challenge, it might be ok. But it doesn't. It doesn't have any working code, so is therefore Not An Answer
@cairdcoinheringaahing ... no hope that they will fix their answer. So, leave a comment to make it clear the reason why it is invalid (doesn't contain the actual code), and then delete it.
@EriktheOutgolfer Preposterous! Having a unicode diamond next to your username on a website on the internet should give you super powers, and if SE doesn't live up to that, I'll have to move to PPCG v2! :P
@EriktheOutgolfer thanks! i'm not feeling like optimizing a compression challenge, especially because the site allows UTF-8 characters as one byte which allows ridiculous packing
@EriktheOutgolfer I submitted a bottles of beer answer, but I still expect using compression would blow it out of the water, and I don't feel like golfing compression
Input:
A list of integers (which will never contain a zero)
Output:
A list of the same size with counts based on the following:
If the current item is negative: Look at all items before this item, and count how many times the digits occurred in those other numbers
If the current item is posi...
You work in an office, as the Team Leader, with 3 other staff members. One of them is retiring. The remaining team (including you) wants to contribute to buy a gift for the leaving team member. You requested your remaining team members to contribute any amount they want for the gift, provided it ...
Trabb Pardo–Knuth algorithm
code-golf
The TPK algorithm is an algorithm created by Luis Trabb Pardo and Donald Knuth in 1977 to show the evolution of programming languages. In the book The Early Development of Programming Languages they implemented this algorithm in various languages and showed...
"They're not being disrespectful by not reading thru help, faq, and top meta posts, they're being practical" They're asking people to spend time helping them, but they're not willing to spend any time making sure that they can be helped. That sounds disrespectful to me. If they're not willing to read anything that's written to make them write better questions, why should we believe they'll read comments and take action on them? Just how much effort do we have to put in before they put any in? Downvoting bad questions so that the site maintains good quality? That sounds practical. — Jon SkeetMay 2 '14 at 7:15
Ok, your point being? We should downvote, close and delete off topic posts, which we do. What we shouldn't do is blame them, be rude and abrupt. That's not what SE is about. Its core principle, Be Nice, applies to off topic posts as well.
@cairdcoinheringaahing If the entirety of the post is a copy-paste of their homework problem, they're not trying to get help. They're just asking send-me-teh-codez
Formulating the challenge as something and then including a twist that completely changes the task
Don't hide information from the reader. Don't enounce the challenge as something that later on it will turn out not to be.
To ellaborate, consider the following formulation:
Do < task A, usual...
Challenge
Predict the distance between the Sun and the nth planet when using any formula that gives the same result as the Titius–Bode law: d=(3*2^n+4)/10.
BUT WAIT... there is one restriction:
Your source code can not include any of the Titius–Bode law's digits
So, your program can not cont...
@cairdcoinheringaahing They don't read the help center? Most likely yes. The behavior is problematic? Yes. Then how is my message "hostile"?
Anonymous
The phrasing is a bit hostile, but the core point is accurate. It's frustrating when users don't bother to read the help center before writing questions, because those questions are often low-quality. However, we must Be Nice even to frustrating new users. Downvoting, close voting, and delete voting aren't rude - no more than a janitor mopping a floor is rude.
Anonymous
The line is crossed when people leave comments that attack or belittle the user for not reading before posting.
Write a program who calculate your age and output: I'm [age] years old.
The Rules
No hardcoded like: print (I'm 18 years old.)
Your age should be true (or over 10 at least if you wanna keep your age private.)
Only years are counted, neither the months nor the days need to be taken into account...
Write a program who return your age and output: I'm [age] years old.
The Rules
No hardcoded like: print (I'm 18 years old.)
Your age should be true (or over 10 at least if you wanna keep your age private.)
Only years are counted, neither the months nor the days need to be taken into account
Th...
Really skirting bit of sandboxing here (I haven't taken the time to develop the question):
I'd like to do a 2-d variant of this one.
Two lasers between two mirrors
The input would be an ascii maze, with a marker for the laser starting point, e.g.:
+---+------+
|* | |
| | |
| | ...
@feersum I don't think people believe that when it's stated so explicitly. But I've definitely noticed a mentality of "Crappy programmers" and "super programmers" without anything in the middle
o_O I almost never use SO and I've gotten +105 since yesterday.