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
 
77%
+5 −0
Challenges "Hello, World!"

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

posted 4y ago by Hakerh400‭  ·  edited 4y 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 4y 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 4y ago by Hakerh400‭  ·  edited 4y ago by Hakerh400‭

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

HQ9+, 1 byte H Obligatory HQ9+ answer.

posted 4y 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 4y ago by lyxal‭  ·  edited 4y 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 4y ago by Quintec‭  ·  last activity 3y 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 4y ago by Quintec‭  ·  edited 4y 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 4y ago by dzaima‭  ·  edited 4y 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 4y ago by Jo King‭  ·  edited 4y 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 4y ago by Shaggy‭  ·  edited 4y 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 4y 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 4y ago by xnor‭  ·  edited 4y 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 4y ago by Lundin‭  ·  last activity 4y 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 4y ago by Sisyphus‭  ·  edited 4y ago by Sisyphus‭

Answer
77%
+5 −0
Challenges Weave Strings Together

APL (Dyalog Unicode), 10 bytes Full program. Prompts for list of strings from stdin. 0~⍨,⍉↑0,¨⎕ Try it online! ⎕ prompt for list of strings 0,¨ prepend a zero to each ↑ convert to orthogona...

posted 4y ago by Adám‭  ·  edited 4y ago by Adám‭

Answer
77%
+5 −0
Meta What is the Q&A category for?

We seem to ask a lot of questions in Meta, which sort of defeats the purpose of the Q&A category. Is it intended for subjective quesitons (of which this site gets few), or requests for tips, or...

3 answers  ·  posted 4y ago by Corsaka‭  ·  last activity 4y ago by Quintec‭

Question discussion
77%
+5 −0
Meta What is the Q&A category for?

It's for questions about golfing and challenges. From the comments underneath the original proposal: @Moshi from the discussion in 19th Byte it sounded like the community could have questions a...

posted 4y ago by Mithical‭

Answer
77%
+5 −0
Meta What is the Q&A category for?

It's for non-challenge questions. These might be general tips questions, questions about how to golf specific pieces of code, common golf paradigms, etc. Here are some examples from SE that might ...

posted 4y ago by Quintec‭

Answer
77%
+5 −0
Challenges Given the preorder and the inorder of a tree, output the postorder

Definitions A binary tree is either a null (leaf), or an object (node). A node contains a value (non-negative integer) and two pointers (left and right) to two separate binary trees. A binary tre...

2 answers  ·  posted 4y ago by Hakerh400‭  ·  last activity 3y ago by radarek‭

Question code-golf
77%
+5 −0
Q&A Befunge Golfing Tips

Post tips for Befunge code golf here! This is based on a type of question I used to see on CGCC, where people would post tips for golfing in various languages. They happened to be quite helpful, s...

3 answers  ·  posted 4y ago by moony‭  ·  edited 3y ago by user‭

Question code-golf tips
77%
+5 −0
Challenges Coat of Many Colours

Scala, 119 bytes Saved 26 bytes after porting Moshi's solution! _ sortBy("y gree br sc bla oc pe rub ol v f li go ch m cre c s ro a l ru g pu w p o b"split " "indexWhere _.startsWith) Original...

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

Answer
77%
+5 −0
Challenges Truthify an array

APL (Dyalog Extended), 1 byte ⍸ ¯\(ツ)/¯ Try it online!

posted 4y ago by rak1507‭

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

Husk, 9 solutions 1. Classic 256 Try it online! 2. Squaring □□4 Try it online! 3. Incrementing →→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→...

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

Answer
77%
+5 −0
Challenges Generate Lewis Caroll's Jabberwocky

Japt, 625 615 bytes `'T°s ߍ¦g, „d e sҐy ‘vƒ Did gyœ „d g‹½e ˆ e °¼; A¥ Úßy ØÀ e ޒgovƒ, A˜ e Ú  ÎÈs ŒtgŸ¼. ` +i` "BeØ e {=`Jab¼rwock`}, my s! T” jaws È ßÒ, e claws È ¯t®! BeØ e...

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

Answer
77%
+5 −0
Challenges Truthify an array

Jelly, 2 bytes ŒṪ Try it online! 1-indexed, but the footer converts to 0-indexed. Less built-in: Jelly, 3 bytes œẹ1 Try it online! œẹ All multidimensional indices of 1 one. ...

posted 4y ago by Unrelated String‭

Answer