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
 
50%
+0 −0
Challenges My house is destroyed! Can you make me one?

C (clang), 116 102 bytes j,k;f(i){for(j=i;j--;printf("#"));for(j=i-1;j--;printf("#"))for(k=i-2,printf("\n#");k--;printf(" "));} Try it online! Sometimes, it's better to use functions when yo...

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

Answer
50%
+0 −0
Q&A Tips in golfing using Lua

Remove print's parentheses when it's a single string print strangely works without parentheses, however, it only applies to single strings. In other words, it can't do the same for other variables...

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

Answer
50%
+0 −0
Challenges "Hello, World!"

Emoji, 24 bytes 💬Hello, World!💬➡ Try it online!

posted 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges "Hello, World!"

SQLite, 21 bytes select'Hello, World!' Try it online!

posted 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges "Hello, World!"

jq --null-input --raw-output, 15 bytes "Hello, World!" Try it online! They kept saying that jq is the language of September 2021. Still surprised no one even made a Hello, World! on it.

posted 3y ago by General Sebast1an‭

Answer
50%
+0 −0
50%
+0 −0
Meta Suggestions for the new header banner/background

I'm bored. Let's do something. lmao While I was Somewhere Else, I went to make suggestions for designs on their sites, and no impact really occured. However, since I'm now a Codidactian (not a Cod...

1 answer  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by General Sebast1an‭

Question discussion design
50%
+0 −0
Challenges Diagonalized alphabet

C (clang), 206 bytes main(i){char*s="YWUSQOMKIGECABDFHJLNPRTVXZ";for(i=13;i>0;printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",s[-1+i],s[0+i],s[1+i],s[2+i],s[3+i],s[4+i],s[5+i],s[6+i],s[7+i],s[8+i],s[...

posted 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Q&A Tips in golfing using Lua

Convenient whitespace removal Here are instances where you can remove whitespace: Strings If you assigned or printed a string, then the next supposed line of code can lean on the right double-qu...

posted 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges A number adder, not a death adder

Lua, 51 bytes P1: print("print(tonumber(io.read())+"..io.read()..")") Try it online! P2 (given I inputted 10, 29 bytes): print(tonumber(io.read())+10) Try it online!

posted 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges Getting perfect squares, differently

Lua, 41 40 bytes x=0 y=1while""do print(x)x=x+y y=y+2 end Try it online!

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

Answer
50%
+0 −0
Challenges Getting perfect squares, differently

Python 3, 34 bytes x=0;y=1 while 1:x+=y;print(x);y+=2 Try it online! 1 is the int equivalent to True, which helps save bytes.

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

Answer
50%
+0 −0
Q&A Tips for golfing in C

Abuse (as few) libraries (as possible) We don't want to use too much libraries when playing challenges. Sometimes, libraries aren't used at all in some answers in C. What if we want to shorten so...

posted 3y ago by General Sebast1an‭

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

Python 3, 167 127 118 117 94 63 bytes def f(a,b): y=0 for z in range(len(a)):y+=a[z]*b**z print(y) Try it online! Close gap to @user's lambda answer! Golfed 40 bytes thanks to @user's...

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

Answer
50%
+0 −0
Meta Add detailed wikis and usage info on these tags

graphical-output Usage info: Graphical output challenges involve outputting images or illustrations using graphics. Detailed wiki: (uses text from CGCC's) Graphical output challenges invol...

posted 3y ago by General Sebast1an‭

Answer
50%
+1 −1
Meta Default Rules: Extensions

The C (gcc) implies extensions - it will only work with that specific compiler under it's default setting GNU17 (equivalent to -std=gnu17), which is mostly a superset of standard C. This also inclu...

posted 3y ago by Lundin‭

Answer
50%
+1 −1
Meta Default Rules: Extensions

Implementation defines the language, so if you use extensions to a language, you should add + ... extensions to the header. E.g. for a C post using gcc extensions, the header begin with # C (gcc...

posted 3y ago by Moshi‭

Answer
50%
+0 −0
Challenges Getting perfect squares, differently

C (clang), 47 45 43 bytes i,j;main(){for(;printf("%i ",i-=~j);j+=2);} Try it online! Golfed 2 bytes from inspiration of @Shaggy's answer. Golfed 2 bytes by @m90.

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

Answer
50%
+0 −0
Meta Allow linking account with Code Golf Stack Exchange [duplicate]

In my user preferences in "Edit Profile", under the "Link Stack Exchange Account" heading, this shows up: An association with Code Golf Stack Exchange needs to be added for this site.

1 answer  ·  posted 4y ago by Razetime‭  ·  closed as duplicate 4y ago by Mithical‭

Question support discussion
50%
+0 −0
Challenges Bytes to Segfault

Swift 5.4, 17 bytes func f(){f()};f() Pretty simple. It just calls itself until it stack overflows. You need to compile and run it, not just do it in the REPL, because the REPL just drops you b...

posted 4y ago by forestbeasts‭

Answer
50%
+0 −0
Challenges Shape of an array

JavaScript (Node.js), 51 bytes n=[];f=(a)=>a&&a.map?(n.push(a.length),f(a[0]),n):n Run f on your input, e.g. f([[],[]]). Explanation: n=[]; // make a global array to hold the res...

posted 4y ago by forestbeasts‭

Answer
50%
+0 −0
Challenges Prime Difference

JavaScript (Node.js), 81 bytes d=(p,i=2)=>i<p?!(p%i)||d(p,i+1):0 f=(n,a=2,p=a+1)=>d(p)?f(n,a,p+1):p-a<n?f(n,p):a Try it online! Explanation: d is a helper function that returns t...

posted 4y ago by Moshi‭

Answer
50%
+0 −0
Challenges Prime Difference

C (gcc), 126 129 bytes N=9999;f(n){int p[N],i,j,P;memset(p,1,N);for(i=P=2;i*i<N;i++)if(p[i]){for(j=i*i;j<N;j+=i)p[j]=0;i-P>=n?j=N:(P=i);}e:return P;} Try it online! This is an integer...

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

Answer
50%
+0 −0
Challenges Backspace an array

Husk, 6 bytes Fo+hx0 Try it online! there's got to be a smarter way to do this with grouping.

posted 4y ago by Razetime‭

Answer