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
 
71%
+3 −0
Challenges Reverse an ASCII string

Perl 5 -p, 10 bytes $_=reverse Try it online!

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

Answer
66%
+2 −0
Q&A Befunge Golfing Tips

Bitwise operations (WIP) Befunge, rather pointedly, lacks bitwise ops. No shifts, no and, no or, no xor. Shifts Shifts can be implemented as multiplication and division by powers of two. Shifts...

posted 3y ago by moony‭

Answer
87%
+12 −0
Meta Do we require codegolf challenges include example code?

Don't require example code In general, I believe the decision should be on the challenge creator. Requiring it would be useless for certain types of challenges (kolmogorov-complexity or similar), ...

posted 3y ago by dzaima‭

Answer
71%
+3 −0
Challenges 1, 2, Fizz, 4, Buzz!

Shakespeare Programming Language, 11232 bytes My last attempt was nearing the 20000 byte zone, because it didn't use the stack at all. a.Ajax,.Puck,.Ford,.Act I:.Scene I:.[Enter Ajax and Puck]Aja...

posted 3y ago by Corsaka‭

Answer
75%
+4 −0
Challenges 1, 2, Fizz, 4, Buzz!

RoadLang, 340 bytes wagwan my slime x is 0 rip dat bong till x bigger den 99 n dat x is x n 1 ayy bossman (x leftova 15) be 0 init bruv man say"FizzBuzz" yeah init bruv ayy bossman (x lef...

posted 3y ago by Razetime‭

Answer
71%
+3 −0
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 3y ago by Moshi‭  ·  edited 3y ago by Moshi‭

Answer
71%
+3 −0
71%
+3 −0
Q&A Befunge Golfing Tips

Golfing numbers Numbers above 15 and below zero take more than one byte to create. Here's a table of numbers up to 100 (Not including negatives yet) Table for '98 NOTE: For numbers that are al...

posted 3y ago by moony‭  ·  edited 3y ago by Moshi‭

Answer
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 3y ago by moony‭  ·  edited 3y ago by user‭

Question code-golf tips
50%
+0 −0
Sandbox Largest finite output

posted 3y ago by moony‭

75%
+4 −0
Challenges Reverse an ASCII string

C (gcc), 62 bytes main(){char b[99],*p=strchr(gets(b),0);for(;p-->b;)putch(*p);} This relies on the usual gcc extension abuse. It assumes that max user input is 98 characters + null term, si...

posted 3y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
81%
+7 −0
Challenges Reverse an ASCII string

Ahead, 3 bytes SW@ S Slurp entire input to stack W Write entire stack @ End Try it online!

posted 3y ago by snail_‭

Answer
71%
+3 −0
Challenges Reverse an ASCII string

Ruby, 14 bytes ->s{s.reverse} Try it online! a straightforward builtin.

posted 3y ago by Razetime‭

Answer
71%
+3 −0
Challenges Reverse an ASCII string

Laser, 9 bytes c⌜ps \U# My own language's showcase time! This is a 2D language with an instruction pointer initially pointing to the right. It takes implicit input as an array of characters. ...

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

Answer
80%
+6 −0
Challenges Reverse an ASCII string

JavaScript, 25 24 bytes -1 byte thanks to @Arnauld‭ f=([a,...b])=>a?f(b)+a:b Try it online!

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

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

Japt, 1 byte w Uh... yeah. Probably similar solutions for many other golf langs. Try it

posted 3y ago by Quintec‭

Answer
66%
+2 −0
Challenges Reverse an ASCII string

Befunge-98, 45 39 37 33 29 21 bytes v:~< >a-| >v$< ,: ^_@ Try it online! This answer probably sucks :P

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

Answer
86%
+11 −0
Challenges Reverse an ASCII string

Your goal is to reverse an ascii string. Given a (optionally newline or null terminated) input, output your input in reverse order, optionally followed by a newline. Terminate afterward. Function...

32 answers  ·  posted 3y ago by moony‭  ·  last activity 10mo ago by qwr‭

Question code-golf
84%
+9 −0
Meta Do we require codegolf challenges include example code?

I feel it'd be a good idea to require, or at least heavily encourage, that challenges include an example, ungolfed, readable solution in a non-golf language like Javascript, C, Rust, or Python. Th...

1 answer  ·  posted 3y ago by moony‭  ·  last activity 3y ago by dzaima‭

Question discussion
66%
+2 −0
Challenges Given the preorder and the inorder of a tree, output the postorder

C (gcc), 114 bytes f(int n,int*p,int*i,int**o){if(n){int*m=i,k;for(;*m!=*p;++m);k=m-i;f(k,p+1,i,o);f(n-k-1,p+k+1,m+1,o);*(*o)++=*p;}} Try it online! Arguments: n is the length of the arra...

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

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 3y ago by Hakerh400‭  ·  last activity 2y ago by radarek‭

Question code-golf
66%
+2 −0
Challenges Longest Increasing Subsequence

Haskell, 37 bytes f(h:t)=max(1+f[x|x<-t,x>h])$f t f _=0 Try it online!

posted 3y ago by xnor‭

Answer
60%
+1 −0
Challenges Longest Increasing Subsequence

Husk, 10 bytes L►LfΛo<0-Ṗ Try it online! Explanation L►LfΛo<0-Ṗ Ṗ power set of input f get elements which match the following: Λo - all pairwise difference...

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

Answer
83%
+8 −0
Meta Who should the temporary moderators be?

Please welcome your new moderators: Quintec, Chris Jester-Young, and Jo King. All three have community support and I said "at least two", so we're happy to appoint all three as temporary moderator...

posted 3y ago by Monica Cellio‭  ·  edited 3y ago by deleted user

Answer