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
1.5k posts
 
77%
+5 −0
Challenges Compute the determinant

CJam, 45 bytes {:A_,{1$_,,.=:+\)/:CAff*A@zf{\f.*::+}..-}/;C} This implementation is an anonymous block (~function). Online test suite. Dissection This implements the Faddeev-LeVerrier algor...

posted 2y ago by Peter Taylor‭  ·  edited 2y ago by Peter Taylor‭

Answer
77%
+5 −0
Meta Reactions on Code Golf Codidact

Reactions were just released! See the main meta post here for the details. Currently, the default reactions look like this: Now, I would argue that none of these fit for Code Golf - so what rea...

4 answers  ·  posted 2y ago by Quintec‭  ·  last activity 2y ago by Lundin‭

Question discussion
75%
+4 −0
Meta Default Rules: Code Golf I/O

Command-line arguments may be used as input instead of stdin Languages/systems that support reading input from command-line arguments may use those as input instead of reading from stdin.

posted 2y ago by Lundin‭

Answer
75%
+4 −0
Sandbox Decode periodic decimal fractions [FINALIZED]

posted 2y ago by celtschk‭  ·  edited 10mo ago by trichoplax‭

75%
+4 −0
Challenges Collatz conjecture; Count the tries to reach $1$

JavaScript, 28 bytes f=n=>n-1&&-~f(n%2?n*3+1:n/2) Try it online!

posted 2y ago by Shaggy‭

Answer
75%
+4 −0
Challenges The Ludic Numbers

The Ludic Numbers are a sequence that pops up when you apply the sieve of eratosthenes to the natural numbers, completely removing the numbers every iteration. Here is how they are generated: The...

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

Question code-golf sequence
75%
+4 −0
Challenges Make $2 + 2 = 5$

Haskell, 13 bytes 2!2=5 x!y=x+y Try it online!

posted 2y ago by carmysilna‭

Answer
75%
+4 −0
Meta Reactions on Code Golf Codidact

I think "Dangerous" could perhaps stay on. "Outdated" would probably be better off replaced with "Invalid" or something of that sort. I don't think we need "Works for me" or an analog of it at all:...

posted 2y ago by user‭

Answer
75%
+4 −0
Challenges Create an Alphabet Diamond

JavaScript (Node.js), 78 bytes (m=(a,b=26,c=a(--b))=>b?[c,...m(a,b),c]:[c])=>m(a=>m(b=>(c=25-a-b)<0?32:c+65)) Try it online!

posted 3y ago by Hakerh400‭

Answer
75%
+4 −0
Challenges Create an Alphabet Diamond

Japt -R, 14 13 bytes ;Bãê kb'A û ê Test it Takes all substrings of the alphabet, palindromizes them, and then takes only the ones starting with A and centers and mirrors that too. -1 byte tha...

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

Answer
75%
+4 −0
Challenges Create an Alphabet Diamond

Canvas, 10 7 6 bytes Z[]/┼┼ Try it here! Creates the top portion, centers it, and mirrors it. -3 bytes from dzaima's hint. -1, found the 6 byter! Explanation Z[]/++ Z push the al...

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

Answer
75%
+4 −0
Challenges Create an Alphabet Diamond

Stax, 12 bytes ç ∩<▬%▌ê▓jFo Run and debug it Same method as the Canvas answer.

posted 3y ago by Razetime‭

Answer
75%
+4 −0
Challenges Win a War (or at least a few battles)

You have an army of size $n$ that you need to split up to fight $k$ battles simultaneously against an opposing army $A$. In each battle, the army with the most troops present wins - no one wins a t...

2 answers  ·  posted 3y ago by Quintec‭  ·  edited 2y ago by General Sebast1an‭

75%
+4 −0
Challenges "Hello, World!"

C# 9, 38 bytes System.Console.Write("Hello, World!"); C# Version 9 introduced Top level statements.

posted 3y ago by strom‭

Answer
75%
+4 −0
Challenges "Hello, World!"

QBASIC, 17, 16 bytes ?"Hello, World!" This should work on almost any BASIC interpreter. Thanks to manassehkatz, for the space.

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

Answer
75%
+4 −0
Challenges The Pell Numbers

Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: $P_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\2P_{n-1}+P_{n-2...

9 answers  ·  posted 3y ago by Razetime‭  ·  last activity 2y ago by torres‭

75%
+4 −0
Challenges Is it a near-anagram?

JavaScript (Node.js), 150 71 bytes f=(a,b)=>a[b.length]?f(b,a):b.filter(x=>a[y=a.indexOf(x)]=!~y).length-1 Try it online!

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

Answer
75%
+4 −0
Challenges Ratio limits of fibonacci-like series

APL (Dyalog Classic), 7 bytes ⎕+∘÷⍣=1 Well, rak is probably not going to answer this, so I might as well ;p Try it online!

posted 3y ago by Quintec‭

Answer
75%
+4 −0
Challenges Is it a near-anagram?

Brachylog, 8 bytes pᵐ≠{b|}ᵛ Try it online! Since it takes $5!*5! = 14400$ tries to determine that the first test case gives false, I've added some shorter ones... pᵐ Permute each ele...

posted 3y ago by Unrelated String‭

Answer
75%
+4 −0
Challenges Partial Sums of Harmonic Series

Scala, 55 bytes (Stream from 1 map 1.0./scanLeft.0)(_+_)indexWhere _.<= Try it online! Written in a more sane manner: n => Stream.from(1).map(1.0/_).scanLeft(0.0)(_+_).indexWhere(_ &g...

posted 3y ago by user‭

Answer
75%
+4 −0
Challenges Reverse an ASCII string

Python 3, 20 bytes print(input()[::-1]) Try it online!

posted 3y ago by Wasif‭

Answer
75%
+4 −0
Challenges Output 256 in many different ways

Scala (-language:postfixOps), 4 solutions 1. Just 256: 256 2. Casting a character: +'Ā' The character Ā is 256 in decimal, and the unary + turns it into an Int. 3. Hashcode of a string: ...

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

Answer
75%
+4 −0
Challenges Output 256 in many different ways

PowerShell, 4 solutions 99+99+9+9+9+9+9+9+4 355-33-33-33 16*16 [int][char]'Ā' Try it online!

posted 3y ago by Wasif‭  ·  edited 2y ago by dzaima‭

Answer
75%
+4 −0
Challenges Obligatory Quine Challenge

BQN, 20 bytesSBCS ∾2/0‿8⊏↓"∾2/0‿8⊏↓""" Run online! BQN's strings escape double quotes by doubling them, so that the string used to start with only contains a single quote, although the output ...

posted 3y ago by Marshall Lochbaum‭

Answer
75%
+4 −0
Challenges Make my number a set

Python 3, 34 bytes f=lambda x:[f(y)for y in range(x)] Try it online! -9 bytes thanks to Moshi Unfortunately, I cannot use Python sets, because sets are unhashable and thus cannot be put int...

posted 3y ago by hyper-neutrino‭  ·  edited 2y ago by hyper-neutrino‭

Answer