@trichoplax Well, in order for there to be others who golf in it, it does have to have some chance at beating other golfing languages. I don't necessarily want to make the best golfing language, just a good golfing language. (so as a starting rule: strictly ascii)
In such situations I write down as many boring names as possible to get them out of my head ready to think of something interesting. Nothing arrived though
n-Primes code-golf prime
For the purpose of this problem, an n-prime is a number that has exactly n/2 divisors (duplicate divisors are counted twice). Real primes (and 1) are 1-primes, semi-primes are 2-primes, and so on.
Your Task:
Write a program or function that takes an integer p as inp...
Disclaimer: The story told within this question is entirely fictional, and invented solely for the purpose of providing an intro.
I have a friend who is an architect, and, after explaining the concept of code-golf and this site to him, he said that I should code something actually useful f...
Comparing Strings: Easy Mode
code-golf string
Given two non-empty strings containing printable ASCII, output their value if they are exactly the same, and output a non-empty third string of printable ASCII if they are different. Trailing newlines allowed. The output inherently can't always be t...
> Support a representation of natural numbers and of tuples. (We're talking about languages rather than implementations, so we will leave to one side the issue of type widths).
rather than tuples I think it would be a good idea to change that to 'variable-length data structure'
> Chuck norris. Don't use CHUCKNORRIS, CHUCK_NORRIS, CHUCK = NORRIS, or any combination of CHUCK and NORRIS in the same =. He will hunt you down and roundhouse kick your computer. The compiler will display Chuck Norris jokes every five seconds until he does so.
I'm looking at OEIS:A000236, whose definition states:
Maximum m such that there are no two adjacent elements belonging to the same n-th power residue class modulo some prime p in the sequence 1,2,...,m (equivalently, there is no n-th power residue modulo p in the sequence 1/2,2/3,...,(m-1)/m)...
Grr this makes no sense https://tio.run/##tVTBbtswDD1HX8EdhtitE8QpdvGSHXcehu5kGIEbK602WzJsecn@Y4cd@nX9kUwUpdhOsqEYsJtEUu@RjxTrH/pJybvjsW5ExVtYQ7rM2FZVtWqFJkOcMbYt87aFTzYoYZOC70C09hrIrnrgTWisE7EDuoGQQIgJNFx3jYT7puPnIT3PKexjXrbjuBXM4gv3TjWwy7daDamMHd85@wcPcHMD83fWOaHAeV7XXBY@c@sZZznhZZ/AW4@4XsOCcPrE/4Llc/0T6YgSFX3kkje55iTzl/peDcWlI3akFK0Omlw@8oCw01mcRT7dW4jDcKggCYOK2egzwSZCFvxgUBf2tn8SJYagbQUlly6FNqToAWxqozKjD@H28gyT9cGJi74dP8d0k4xecaOXB3DONcTslNWwnKuqtukioxZc8nuWfy/Qyvwfqzw5rrQqTRJD7hq2c96V53VwbqCsk/X3WUzjJflBX35Z130np716P1z5z4BZWkjMw71e4xcd9ElptyrmV5aEl82X7bIkI2Nutag9bz7zVhSdfxxBjcYIKlV0pUI…
This challenge comes from the game Pokemon GO. Do you have an elegant way to solve this using JavaScript?
You are given a list of 3-tuples. The values each tuple represent Pokemon traits:
[Attack, Defense, Stamina]
Each value in the tuple can range from 0 to 15 inclusive. An example might loo...
I prefer not doing that :P Well at least now I know the necessary and sufficient condition, now I just need to figure out how to do it without checking every prime
if (a) {
action1();
} else if (b) {
action2();
} else if (c) {
action10;
} ... many more else ifs
and by a switch of a variable I want that to become
if (e) {
action3();
} else if (f) {
action4();
} else if (c) {
action10;
} ... the same as in the previous example many more else ifs
Given a PPCG User ID, output that user's current username.
Examples
Input -> Output
61563 -> MD XF
2 -> Geoff Dalgas
12012 -> Dennis
foo ->
-3 ->
Rules
Input/output can be taken via any allowed means.
The output must be the full username with proper capitalization and spacing, no...
Brainf**k is the most famous esoteric programming language and is the inspiration for hundreds of other esoteric languages. In fact, there are quite a few languages that are so heavily based off of Brainf**k that the only difference is the characters used. Your challenge is to interpret one of th...