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.6k posts
 
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
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
77%
+5 −0
Meta Should sandbox posts give rep?

Update: we can do this more easily now. We can change the reputation grants per post type per category, both up and down, without creating a new post type. Sandbox posts would continue to use the...

posted 4y ago by Monica Cellio‭  ·  edited 3y ago by Monica Cellio‭

Answer
77%
+5 −0
Challenges Reverse an ASCII string

C, 66 59 bytes -7 bytes thanks to Lundin! In-place string reversal f(char*s){s[1]?f(s+1):0;for(char t=*s;s[1];*++s=t)*s=s[1];} Try it online!

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

Answer
77%
+5 −0
Challenges Integer to Roman numeral

JavaScript (Node.js), 147 bytes f=(a,b='IVXLCDM',g=Math.log10(a)<<1,c=10**(g/2),e=a/c|0,i=b[g+1],j=a=>b[g].repeat(a))=>a?(e<4?j(e):e<6?j(5-e)+i:e<9?i+j(e-5):j(1)+b[g+2])+f(a...

posted 4y ago by Hakerh400‭

Answer
77%
+5 −0
Challenges Longest parallel lines

Note: This challenge was underspecified and bad, and as such I would not encourage answering it in the future. Challenge You will be given a single 2D boolean array $M$. You may take its dimensi...

1 answer  ·  posted 4y ago by rak1507‭  ·  edited 3y ago by rak1507‭

Question code-golf boolean
77%
+5 −0
Challenges Longest parallel lines

JavaScript (Node.js), 541 540 bytes for(_='=>)==!(+==0h,.map(M,R(=1,,e,b &&Nl=[-1,))s(n,=(a a=u,v(i=g(z,u,f=(a,w,cs=Math.max,r?[...r(--a ) (a)]:[],R>&b>&a<w&b<...

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

Answer
77%
+5 −0
Challenges Diagonalized alphabet

Task Print the following: ABDFHJLNPRTVXZ CABDFHJLNPRTVX ECABDFHJLNPRTV GECABDFHJLNPRT IGECABDFHJLNPR KIGECABDFHJLNP MKIGECABDFHJLN OMKIGECABDFHJL QOMKIGECABDFHJ SQOMKIGECABDFH USQOMKIGE...

7 answers  ·  posted 3y ago by Razetime‭  ·  last activity 3y ago by radarek‭