Search
Description APL trains are a series of functions, that get applied to an argument in this way: (f g) x = f g x (f g h) x = (f x) g (h x) (a b c d e f) x = (a (b c (d e f))) x = a (b x) c (d x) ...
In Google Docs, the word count tool looks like this: Pages would not make sense, but your goal is to implement every other count. Definitions Words are strings of text separated by any amount ...
status-completed I've just converted posts in the Challenges category over to a new Challenge post type that awards more reputation per upvote, starting now. Retroactive reputation changes are bei...
Get ready for a comparatively dry question - this is intended to be one of the "the"s of the code-golfing dictionary. Create a program which inputs a base 10 non-negative whole number (without lea...
This sounds like a great idea to me. To summarize how we can move forward on this: For the Codidact Team Create a new meta tag (defaults? name pending) that is one of the options for the requir...
BQN, 18 bytesSBCS 'A'-¬⊸⌊2×13-˜⌜○↕14 Run online! This solution computes a table of c-r, where r is the row number and c is the column number, so that the first row is 0 1 2… and the first colu...
Vyxal, 20 23 24 solutions Thanks to @Razetime for suggesting using Π, allowing for +1 solution. Try them Online! The programs are meant to be run individually, so the ,Ṡ_ is just there to output...
Japt, 27 Solutions This started out as a collaboration with Quintec but quickly got very out of hand! Posted with their permission. More solutions to follow. Hopefully! 256 Try it Just the b...
Python 3, 10 bytes 1 .__and__ Try it online! Returns 1 for odd numbers and 0 for even numbers. Two bytes shorter than the trivial lambda x:x%2 and one byte shorter than the equivalent magic...
Regex, 8 bytes [02468]$ Matches strings ending in one of 0, 2, 4, 6, 8. [13579]$ is equivalent but with opposite outputs. Try it on Regex101!
You might have noticed that challenges now show a leaderboard in addition to the table of contents. This is something this community has wanted for a while, and now, thanks to user contributions a...
Using your languages of choice, golf a quine - a non-empty program taking no input and only outputting its source. Here, the win condition is your quine working in the most languages. It should be...
Yes tips is a sort of prefix tag, and code-golf-tips is a superfluous tag. I think it it worth keeping them separate because tips is already very flexible.
Zsh, 8 bytes >$@ <^$1 Attempt This Online! Outputs via exit code: 0 for not all the same; 1 for all the same >$@: create a file named for each element in the input effectively de...
Since there have been some discussions about the use of GCC extensions, I decided to make a default-rules post about it. How should we deal with compiler extensions to languages?
As we start on building a new community here together, we're bound to find some sticking points. Those might be bugs, new features you need, things you need support with... whatever they are, the C...
PHP, 13 bytes Hello, World! PHP by default prints all source to output until it encounters <? or <?php.
Over on codegolf.stackexchange.com, we have numerous meta posts outlining loopholes answers can't break, validity of output/input methods and other rule-type posts. Some examples: https://cod...
Japt, 11 10 bytes >0©ÒßUÉ/°T Try it >0©ÒßUÉ/°T :Implicit input of integer U >0 :Greater than 0? © :Logical AND with Ò :Negate the bitwise ...
C (gcc), 113 Bytes i;main(){while(i++<100){char*h[]={"%d "," "},**p=h;i%3||(*p++="Fizz%2$s");i%5||(*p="Buzz ");printf(*h,i,h[1]);}} This compiles with several warnings, but no errors. Here'...
The profile link is only relevant for claiming imported content at the moment. When we import content from SE, linking profiles allows us to give users the option of claiming their posts - thus lic...
Given a non-ragged array (an array where all sub-arrays at a particular level have the same length) of non-negative integers, answer its shape, that is, the length along every dimension. You may as...
JavaScript, 25 24 bytes -1 byte thanks to @Arnauld f=([a,...b])=>a?f(b)+a:b Try it online!
Brain-Flak, 250 bytes ((((()()()){}){}){}()){(({})[()])}{}(<>)<>{({}<>)<>}<>{(({})[()])}([]){{}([(({}))](((()()()){}){}){}()){({}[()])<>((((()()()()){}){}){})&l...
Two words are anagrams of each other if the letters of one can be reordered to spell the other; e.g. ADOBE and ABODE are anagrams. An alternate way of describing it is that both words contain the s...