Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
 
60%
+1 −0
Challenges Small integer swapping

APL (Dyalog Extended), 3 bytes ⊢⍮⌽ Try it online! ⊢ the argument ⍮ paired up with ⌽ its reverse

posted 3y ago by Adám‭

Answer
60%
+1 −0
Challenges Small integer swapping

Japt, 3 bytes I/O as an array. cUé Try it cUé :Implicit input of array U c :Concatenate Ué : U rotated right once

posted 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Small integer swapping

Python 3.8 (pre-release), 39 bytes print(x:=input(),y:=input()) print(y,x) Try it online!

posted 3y ago by user‭

Answer
60%
+1 −0
Sandbox Make my value binary [released]

posted 3y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Challenges Generate Lewis Caroll's Jabberwocky

Python 3, 874 bytes a="'Twas brillig, and the slithy toves\nDid gyre and gimble in the wabe;\nAll mimsy were the borogoves,\nAnd the mome raths outgrabe.";b="he Jabberwock";c="Beware t";d="One, ...

posted 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Reduce over the range [1..n]

BQN, 8 bytes {𝔽´1+↕𝕩} Try it! basic fold builtin version. Use as a dyadic 1-modifier. Longer than APL since evaluated output is shorter than using first class functions. A more fun recursive...

posted 3y ago by Razetime‭  ·  edited 3y ago by Razetime‭

Answer
60%
+1 −0
Challenges Guess the language! (Robbers' Thread)

Cracks Shaggy's answer: Jelly “¿×⁶ṆḶN{N=ȷṾ» Try it online!

posted 3y ago by m90‭

Answer
60%
+1 −0
Challenges "Hello, World!"

Scala, 42 bytes object>extends App{print("Hello, World!")} Attempt This Online!

posted 3y ago by user‭

Answer
60%
+1 −0
Q&A Tips for golfing in C

For the sake of code golf, you first need to decide if you wish to compete in strictly conforming ("real") C, in which case you can't rely on non-standard extensions, poorly-defined behavior or obs...

posted 3y ago by Lundin‭

Answer
60%
+1 −0
60%
+1 −0
Challenges Reduce over the range [1..n]

C (clang), 59 bytes c;f(int a,(*b)(int,int)){for(c=a;a>1;)c=b(--a,c);return c;} Try it online! This program written by @Hakerh400 in the comments is basically how the other answers before...

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Merge two strings

Python 3, 82 81 bytes lambda a,b:[a[:i]+b for i in range(len(a)+2)if i>len(a)or b[:len(a)-i]==a[i:]][0] Try it online!

posted 3y ago by bastolski‭  ·  edited 3y ago by bastolski‭

Answer
60%
+1 −0
Challenges Merge two strings

Vyxal, 1 byte ⋎ Try it Online! Builtin be like

posted 3y ago by emanresu A‭

Answer
60%
+1 −0
Challenges Are All Elements Equal?

Trivial answers Husk, 1 byte E Try it online!

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
60%
+1 −0
Challenges Are All Elements Equal?

Jelly, 1 byte E Try it online! Boring builtin answer Non builtin, the shortest I can get is 3 bytes: ḷ\⁼ Try it online! Here, we replace each element with the first element, then check i...

posted 3y ago by caird coinheringaahing‭

Answer
60%
+1 −0
Challenges A chunk of symbols is a calculation

Challenge Create a program that takes input of a string and outputs an integer using the following calculation system: The string can only contain +, -, *, /, ^, ! (or a different character; ! ...

1 answer  ·  posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Question code-golf math sequence decryption array-manipulation
60%
+1 −0
Challenges Getting perfect squares, differently

Create a program that gets all perfect squares starting from 0 or 1 without using any methods of multiplication (repetitive addition) and exponentiation (repetitive multiplication). Output them for...

7 answers  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by General Sebast1an‭

Question code-golf math number restricted-source
60%
+1 −0
Challenges A chunk of symbols is a calculation

JavaScript (Node.js), 148 bytes s=>s?eval(s.replace(/([^()])\1*/g,(m,g)=>(g=='!'?'+':g)+m.length).replace(/\(/g,'*(').replace(/-(\d|\(.+?\))\^(\d+)/g,(m,g,h)=>'-('+g+'**'+h+')')):0 Abu...

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges Getting perfect squares, differently

JavaScript (V8), 28 bytes for(x=y=0;;++y)print(x+=++y) Try it online!

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Getting perfect squares, differently

Japt, 9 bytes No infinite lists in Japt so we'll have to go with a recursive solution. ßOpTµJJµ2 Test it ßOpTµJJµ2 ß :Recursive call with (irrelevant) argument Op : ...

posted 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Getting perfect squares, differently

Husk, 3 bytes ∫İ1 Try it online! Scan from left over all odd numbers with addition. Uses this formula: $$ n^2 = \sum_{k=1}^n(2k-1) $$

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Challenges Shuffle a subset of a list

APL(Dyalog Unicode), 13 bytes SBCS {⍵[?⍨≢⍵]}@⎕⊢⎕ Try it on APLgolf! A tradfn submission which takes both lists on STDIN, second input is 1-indexed.

posted 4y ago by Razetime‭

Answer
60%
+1 −0
Challenges Shuffle a subset of a list

Japt, 17 bytes ô@VøYÃíUgV öx)c f Try it Japt, 17 bytes ô@VøYÃíUgV öx)c f Try it ô@VøYÃíUgV öx)c f :Implicit input of arrays U=integers & V=indices ô :Split U ...

posted 4y ago by Shaggy‭  ·  edited 4y ago by Shaggy‭

Answer
60%
+1 −0
Challenges A number adder, not a death adder

Python 3, 58 39 bytes P1: print(f"print(int(input())+{input()})") Try it online! P2 (given I inputted 10, 30 22 bytes): print(int(input())+10) Try it online!

posted 4y ago by General Sebast1an‭  ·  edited 4y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges "Hello, World!"

Forth (gforth), 16 bytes ." Hello, World! Try it online!

posted 4y ago by nizish‭

Answer