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 Ratio limits of fibonacci-like series

Definition $F_{n}\left(0\right)=0$ $F_{n}\left(1\right)=1$ $F_{n}\left(x\right)=n\cdot F_{n}\left(x-1\right)+F_{n}\left(x-2\right)$ For example: $F_{1}=\left[0,1,1,2,3,5,8,13,21,34,55,89...\ri...

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

Question code-golf sequence
77%
+5 −0
Challenges Reverse an ASCII string

jq, 16 bytes, preferably -rR ./""|reverse|add Annoyingly, jq has convenient things like implicit I/O, and annoying things like adding strings, but you can't reverse a string >:|. ./""&...

posted 3y ago by Wezl‭  ·  edited 2y ago by snail_‭

Answer
77%
+5 −0
Challenges Beaver Code Decryption

BQN, 24 bytesSBCS {g⊔⁼𝕊¨⍟(1<≠)𝕩⊔˜∧g←2|↕≠𝕩} Run online! {g⊔⁼𝕊¨⍟(1<≠)𝕩⊔˜∧g←2|↕≠𝕩} { } # Block function 𝕊 with argument 𝕩 ≠𝕩 # Length of 𝕩 ...

posted 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Create an Alphabet Diamond

BQN, 19 bytesSBCS ' '+32⊸<⊸×+⌜˜⌽⊸⌊↕59 Run online! This uses the whitespace allowance, padding by four spaces on all sides to make the arithmetic work better. It can be adjusted by replacing...

posted 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Output 256 in many different ways

BQN, 14 solutions (SBCS) Run online! This link shows the result of each expression and a table of character intersections. Each expression intersects with itself only, giving a diagonal matrix. Th...

posted 3y ago by Marshall Lochbaum‭  ·  edited 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Make my number a set

BQN, 7 6 bytesSBCS ≢↑∘⊢´↕ Run online! The less-golfed version {↑⍟𝕩⟨⟩} is more readable: it applies Prefixes (↑) the given number of times to the empty list ⟨⟩ and… that's it. (Suffixes also wo...

posted 3y ago by Marshall Lochbaum‭  ·  edited 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Make my number a set

JavaScript (V8), 32 bytes f=n=>[...Array(n).keys()].map(f) Try it online! Somehow it doesn't recurse forever at n=0. Pretty nice.

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

Answer
77%
+5 −0
Challenges Merge two strings

APL(Dyalog Unicode), 26 bytes SBCS {⊃x/⍨⊃¨⍺∘⍷¨x←,∘⍵¨(⊂⍬),,\⍺} Try it on APLgolf! A dfn submission which takes the inputs as left and right argument. I took way too long to come up with this. ...

posted 3y ago by Razetime‭

Answer
77%
+5 −0
Challenges Juggler sequences

Husk, 11 10 bytes U¡λ⌊^+.%2¹ Try it online! This can probably be trivially ported to Jelly. Explanation U¡o⌊Ṡ^o+.%2 ¡ iterate over the input infinitely, creating a list o ...

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

Answer
77%
+5 −0
Challenges Juggler sequences

Scala, 78 67 64 bytes Saved 3 bytes thanks to Razetime Stream.iterate(_)(x=>math.pow(x,x%2+.5).toInt).takeWhile(_>1):+1 Try it in Scastie! Stream.iterate(_) //Make an infinite list by r...

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

Answer
77%
+5 −0
Challenges Evaluate a single variable polynomial equation

Haskell, 20 bytes f x=foldl((+).(x*))0 Try it online! Takes input coefficients from highest degree to lowest. 21 bytes x%(h:t)=h+x*x%t x%_=0 Try it online!

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

Answer
77%
+5 −0
Challenges "Hello, World!"

Common Lisp, 26 22 bytes (princ"Hello, World!") -4 bytes thanks to @Sisyphus‭ Try it online!

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

Answer
77%
+5 −0
Challenges Evaluate a single variable polynomial equation

Ruby, 50 bytes def f(k,x)k.length>1?k[0]+f(k[1..-1],x)*x:k[-1]end Try it online! This uses the Horner's method recursively, because I think it'll be slightly shorter than using a loop or bu...

posted 3y ago by luap42‭

Answer
77%
+5 −0
Challenges Print the Great Numeric Pyramid

JavaScript (Node.js), 137 136 117 bytes with(Math)f=n=>(m=(a,b)=>a?m(--a,b)+b(a):[])(28,y=>m(55,x=>x>26-y&x<y+28&(x^y)?min(abs(abs(27-x)-y)/2,27-y):' ')+` `) Try it...

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

Answer
77%
+5 −0
Challenges "Hello, World!"

HQ9+, 1 byte H Obligatory HQ9+ answer.

posted 3y ago by Razetime‭

Answer
77%
+5 −0
Challenges Obligatory Quine Challenge

Vyxal/Keg , 8 bytes `:.,`:., Try it online! (Keg) The explanations are the same for both languages, seeing as how Vyxal is heavily based on Keg. Explained `:.,` # Push the string ":.," :., ...

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

Answer
77%
+5 −0
Challenges Prime Difference

Given an integer n, output the smallest prime such that the difference between it and the next prime is at least n. For example, if n=5, you would output 23, since the next prime is 29, and 29-23&...

8 answers  ·  posted 3y ago by Quintec‭  ·  last activity 2y ago by radarek‭

Question code-golf
77%
+5 −0
Challenges Print the Great Numeric Pyramid

Japt -R, 27 22 bytes 27òÈn28 ÇmX27-X-ZøÃÔû Test it Lots of credit goes to xnor for finding the min(i,j,27-i-j) trick. -5 bytes thanks to @Shaggy

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

Answer
77%
+5 −0
Challenges Print the Great Numeric Pyramid

Canvas, 19 bytes ‾-{{╷¹²-m‾-¹-m] *]/ Try it here! ‾-{{╷¹²-m‾-¹-m] *]/ Program, ascii-fied for monospacing ‾- push 28 { ] for 1…28 (pushing counter & s...

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

Answer
77%
+5 −0
Challenges Partial Sums of Harmonic Series

Raku, 27 bytes {+([\+](1 X/1..*)...*>=$_)} Try it online! { } # Anonymous code block [\+]( ) # Get the partial sum of 1 X/ ...

posted 3y ago by Jo King‭  ·  edited 3y ago by Jo King‭

Answer
77%
+5 −0
Challenges Evaluate a single variable polynomial equation

Japt -x, 6 5 bytes Ë*VpE Try it Ë*VpE :Implicit input of array U and float V Ë :Map each element D at 0-based index E * : Multiply D by VpE : V raised to the pow...

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

Answer
77%
+5 −0
Challenges Partial Sums of Harmonic Series

AppleScript, 178 bytes set n to text returned of (display dialog "" default answer "") as number set k to 0 set h to 0 repeat set k to k + 1 set h to h + (1 / k) if h >= n then exit repea...

posted 3y ago by DonielF‭

Answer
77%
+5 −0
Challenges Partial Sums of Harmonic Series

Python 3, 35 bytes f=lambda x,i=1:x>0and-~f(x-1/i,i+1) Try it online! Subtracts each 1/i in turn from the initial value until the result is no longer positive.

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

Answer
77%
+5 −0
Meta What are the rules of programming language compliance?

Code Golf seems like a fun idea to me, since I'm a programmer by trade and "language lawyer" nerd as a hobby. But every time I checked the code golf site on SE, I dismissed it as nonsense, because...

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

Question support discussion
77%
+5 −0
Challenges Bytes to Segfault

Python 2, 13 bytes exec'+1'*5**9 Try it online! No idea why this works. Something in the Python expression parser?

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

Answer