Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> foo=lambda a:a
>>> a=7
>>> while foo(a):print a;a*=2
File "<stdin>", line 1
while foo(a):print a;a*=2
^
SyntaxError: invalid syntax
>>>
@cairdcoinheringaahing yeah, and no offense @Christopher2EZ4RTZ, but I feel like all of your taken challenges (i.e. you didn't write them) have been a bit of a rep grab
and I'm pretty dissapointed
@cairdcoinheringaahing in other news are you planning on writing a bot?
I'm trying to make a bot class thing that's extendable for main logic
Mafia (also known as Werewolf) is a party game that plays roughly like this:
The game begins on day 0. After every day n comes a night n. After every night n comes a day n+1. i.e. D0, N0, D1, N1, D2, N2...
At the dawn of day 0, a host secretly chooses players to fill certain roles:
Some num...
Write a program that completes the following:
Displays a heading in a function describing the 52 Week challenge(The 52 week challenge is a way to save money. For example, Week 1, you save $1.00. Week 2 you save $2.00, and it continues through the year, adding one more dollar to each week’s savin...
I've seen many challenges that have been closed on this site which talk about the use of a for loop, or a void function, or something to that effect. For them, they have no reason to assume anyone answering their challenge wouldn't use a language that didn't have these concepts. Why would I, as a Java or C or C++ or JavaScript programmer, who visited this site to share a "programming puzzle", ever think about languages like Brainfuck or Jelly, which do not have a for loop?
Just because someone is new doesn't give them carte blanche to ignore site conventions. The quality of the challenge and not the author of the challenge should be the basis for votes, close votes, etc.
@AdmBorkBork I never said such french should be given to new users. I'm saying there's a problem in the way our site handles and greets new people. It's very unreasonable to comment on a new person's question with "This is unclear because it has no winning criterion" when the larger problem is that they don't understand what this site is about.
Spiral Matrices
code-golf decision-problem array matrix
Inspired by this challenge.
Definition
I will define a spiral matrix as a matrix that has all entries equal to 0, except a spiral of nonzero numeric entries. You can assume the nonzero entries are all positive or all negative if that he...
@ConorO'Brien I do absolutely agree, but it's not unreasonable for us to require all challenges to be A) Very specific to one language. Which is heavily frowned upon, but IMO can be very interesting. Or on the other side of the spectrum B) Abstracted enough to the concepts of "Input-Calculation-Output" that any language that could reasonably participate can.
@ConorO'Brien Mea culpa for strawman-ing your argument. I misunderstood. I agree that we can strive to be more welcoming to new users, but that's tangential to the quality of individual challenges.
@DJMcMayhem the problem with a site like this is that we allow both extremes, so one thinks that the middle ground is ok. Sites like anagolf are strictly of the input-output mentality. I've always liked this site for its more free conceptualization of challenges. This encourages people to answer, since most types of answers are acceptable. However, challenge writing is a beast on its on right. I wish this site could have a popup before opening the question dialog that explained everything
Honestly, I wouldn't mind if we had the more anagolf format. It's kinda nice because if the input format isn't great for your given language, it totally doesn't matter at all because it affects every answer in that language equally.
However, I also greatly appreciate the flexible input format so that my languages that are horrible at parsing and handling edge cases are actually usable
same, but this also creates the mentality of "parsing is a bad thing". people on this site, from what I've seen, tend to be against parsing as part of a problem. While I am generally against, say, parsing JSON in a challenge about squaring numbers, we shouldn't always tell a user to remove input parsing/validation from their problems.
Having community-established rules, non-cumberstic I/O, a community-moderated site is great IMO. The biggest issue with PPCG being part of Stack Exchange is that it kind of lacks some really important features, while still having some which we hardly ever use.
IMO input validation is a form of chameleon challenge, where the actual meat (aka the interesting bits) of the challenge gets lost. Once you've done one input parsing challenge, what's the point of having it on every other challenge? That's one of the things I like about PPCG - input can be flexible.
@AdmBorkBork i think you need to take it on a challenge by challenge basis though. i agree with you for many challenges but sometimes it doesn't make sense to not have input validation/parsing/etc
@DJMcMayhem rofl, was it because of the kerning of chat :x
A venerated pass time of pedants is to point out that pictures of "Rubik's Cubes" (on t-shirts, posters etc.) are not actually solvable. There are a number of tests that can be done to determine this. I've put them in a spoiler tag below.
Your task is to take a pattern as input and determine...
I feel obligated to point out that the Rubik's cube in your avatar is not solvable. It only has 4 squares on the side facing us, whereas a normal Rubik's cube should have 9. Not to mention the weird symbols on top of the squares. — DJMcMayhem33 secs ago
The example code didn't worked for me and I use python3 (I changed the main.py to make it work)
so here is my fixed version for python3, I never programmed python before so maybe it is a horrible code but it is works :)
run.sh:
#!/bin/bash
./randy.py < from_server > to_server
randy.py:
#!/...
code-golfmathgeometry
Your task is to program a mathematical function s, that takes a finite set A of points in the 2D plane, and outputs an uncircularity score s(A) that satisfies following properties:
Positive Definiteness: If there is a circle or a straight line that contains all points of ...
How lit is this mountain? 🔥
A mountain is defined to be a set of line segments whose first point has coordinates (0,a) where a > 0, and whose last point has coordinates (b,0), where b > 0. All intermediate points have a y-coordinate (ordinate) strictly greater than 0. You are given the points o...
Your job is to create a program or function that will output a whole number (with no trailing decimal points) that is 1 great then the max number an integer can hold for the language; more or less this:
MAX_INT + 1
You are not allowed to use Strings in your solution. Any other type may be used...
@WheatWizard I don't think it is unclear at all. The prohibition on strings is questionable, but otherwise it is fine. It should also have a clause saying that languages without a limited integer type cannot participate.
@Adám Why is int an integer type but not long? I think that saying languages with unlimited integer precision cannot participate is pretty implicit in the challenge as there would be no way to complete the challenge
If long, unsigned and the such are also integer types how can the challenge be completed? I definitely think the author should be clearer about what they mean, especially if all the people to answer so far misunderstood the challenge
@WheatWizard Maybe the OP should require documentation and/or code showing that it is indeed a valid answer. E.g. in Dyalog APL, ⎕DR (Data Representation) of 2*32 is 645 meaning 64-bit float.