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
 
60%
+1 −0
Challenges Make $2 + 2 = 5$

x86-32 assembly, 14 bytes Straightforward solution with custom calling convention: inputs in eax and ebx, output in eax. cmp opcode could be smaller if limited to 8-bit integers? 00000000 <add...

posted 10mo ago by qwr‭

Answer
60%
+1 −0
Challenges Reverse an ASCII string

Python, 16 bytes lambda s:s[::-1] Attempt This Online!

posted 10mo ago by qwr‭

Answer
60%
+1 −0
Challenges Reverse the bits in a Byte

Python, 55 Bytes lambda x:chr(int(bin(ord(x))[2:].rjust(8,"0")[::-1],2)) Takes input as the actual byte, and outputs the actual byte. Try it online!

posted 9mo ago by PlaceReporter99‭  ·  edited 9mo ago by PlaceReporter99‭

Answer
60%
+1 −0
Challenges Reverse the bits in a Byte

C (gcc), 47 bytes r,c;f(i){return c++<8&&(r=r<<1|i&1,f(i>>1)),r;} Try it online! I didn't manage to come up with anything better than the most obvious recursive im...

posted 9mo ago by Lundin‭  ·  edited 9mo ago by Lundin‭

Answer
60%
+1 −0
Challenges Reverse the bits in a Byte

C (gcc), 42 bytes c;f(i){c++<8&&(printf("%d",i&1),f(i>>1));} Try it online! Binary output version.

posted 9mo ago by Lundin‭

Answer
60%
+1 −0
Challenges Word suggesting

Suggest a word from a word list, given a string. Motivation Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At first the suggested word is simp...

1 answer  ·  posted 9mo ago by trichoplax‭  ·  edited 2mo ago by trichoplax‭

Question code-golf string list
57%
+2 −1
Challenges Give the fool's fibonacci sequence

Recently I asked for tips on improving some code-golf of mine. The code was supposed to output every third value of the Fibonacci sequence starting with 2: 2,8,34,144,610,2584,10946,46368,196418,...

0 answers  ·  posted 9mo ago by WheatWizard‭  ·  edited 9mo ago by WheatWizard‭

57%
+2 −1
Challenges Make $2 + 2 = 5$

C (gcc), 41 bytes f(x,y){int r=x*y;return r&&r==x+y?5:x+y;} Attempt This Online!

posted 2y ago by Zakk‭  ·  edited 5mo ago by Zakk‭

Answer
57%
+2 −1
Meta Default Rules: Code Golf I/O

Functions may return bools via the presence/absence of an error Crashing to mean false and not crashing to return true. Another branch of the exit code answer.

posted 3y ago by AndrewTheCodegolfer‭

Answer
57%
+2 −1
Meta Default Rules: Code Golf I/O

Programs/functions may use the presence/absence of output as a bool

posted 3y ago by AndrewTheCodegolfer‭

Answer
57%
+2 −1
Meta Answering challenges with languages newer than the challenge

Languages made specifically for a challenge after it was published This is the general problem with allowing languages newer than the challenge. This is already considered a standard loophole, and...

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

Answer
57%
+2 −1
Challenges Fibonacci without consecutive digits

Output the Nth number in the list of Fibonacci numbers that have no consecutive digits. Input A non-negative integer. Output The Nth number in the list of Fibonacci numbers whose base 10 ...

2 answers  ·  posted 3mo ago by trichoplax‭  ·  last activity 3mo ago by ok12d‭

55%
+3 −2
Challenges "Hello, {name}!"

Background While we do have a "Hello, World!" challenge, we still don't have one regarding input. So let's do one! Challenge Create a program that takes an input (not as a function argument) the...

16 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 1y ago by south‭

Question code-golf string
50%
+0 −0
Challenges In The Jailhouse Now

C (clang), 210 198 183 bytes i,j,k,l;s(v,w,x,y,z){printf("%s",v);for(;w<x;w++){printf("%s",y);}puts(z);}main(){scanf("%i",&i);l=i-3;s("╔",j,l,"╦","╗");for(j=0;j<i-2;j++){s("╠",k,l,"╬",...

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

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

Lua's not really used much in golfing, so it'd be pretty cool to learn some golfing tricks when making answers using it. What golfing tips are there for Lua?

2 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by General Sebast1an‭

Question code-golf tips
50%
+1 −1
Challenges Compute the determinant

Python 3, 29 bytes import numpy numpy.linalg.det Yeah, this is really boring, but I'm curious if this can be beat in Python. Try it online!

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

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

Sclipting, (UTF-16) 18 bytes 낆녬닆묬긅덯댦롤긐 Since it hasn't been added yet.

posted 2y ago by Moshi‭

Answer
50%
+0 −0
Challenges "Hello, {name}!"

Java (JDK), 134 123 118 bytes interface M{static void main(String[]a){System.out.print("Hello, "+new java.util.Scanner(System.in).nextLine()+"!");}} Try it online! Golfed 5 bytes thanks to @...

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

Answer
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 2y ago by General Sebast1an‭  ·  edited 2y 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 2y ago by General Sebast1an‭  ·  edited 2y ago by General Sebast1an‭

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

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

posted 2y ago by General Sebast1an‭

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

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

posted 2y 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 2y ago by General Sebast1an‭

Answer
50%
+0 −0