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

Python 2, 20 bytes print"Hello, World!" Try it online!

posted 3y ago by xnor‭

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

Vyxal, 6, 5, 4 bytes Źe*∑ Try it Online! Takes input in the format coeffs, x Explained Źe*∑ Ź # Generate range [0, len(coeffs)) e # Calculate x ** [0, len(coeffs) (vectorising) ...

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

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

JavaScript (Node.js), 40 bytes f=(a,b,c=1)=>a.reduce((d,e)=>d+e*(c*=b)) Try it online!

posted 3y ago by Hakerh400‭

Answer
75%
+4 −0
Challenges Obligatory Quine Challenge

Husk, 8 bytes S+s"S+s" Try it online! Basically Leo's original quine. It concatenates the string evaluated version of S+s to itself. So: "S+s" + "\"S+s\"" gives the original code.

posted 3y ago by Razetime‭

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

Japt, 12 bytes ÊÆgX *VpXÃr+ Loops through the range of integers 0 to n-1, calculates each term, and sums. Try it

posted 3y ago by Quintec‭

Answer
75%
+4 −0
Challenges "Hello, World!"

Perl 5 -E, 18 bytes say"Hello, World!"

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

Answer
75%
+4 −0
Meta Do you want any special tag styling or requirements?

Codidact allows you to define three special types of tags: topic tags: these are treated as ordinary tags in all respects except that they're styled differently so they stand out. You can see...

1 answer  ·  posted 3y ago by Monica Cellio‭  ·  last activity 3y ago by Razetime‭

Question discussion
75%
+4 −0
Meta Sandbox-specific Tags

Another approach, suggested by ArtOfCode in chat, is to create a close reason for "graduated" sandbox posts. When defining a close reason you can require a URL (this is what's used for duplicates)...

posted 3y ago by Monica Cellio‭

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

Raku, 19 bytes (*Z*(*X**0..*)).sum Try it online! Is it concerning that my solution is over 30% asterisks? Explanation ( ).sum # Get the sum of *Z*( ) # The inp...

posted 3y ago by Jo King‭  ·  edited 3y ago by Jo King‭

Answer
75%
+4 −0
Challenges Partial Sums of Harmonic Series

Stax, 9 bytes Ç≈f♠É↔X+ö Run and debug it Explanation(Unpacked): wii{um|+;< w iterate until a falsy result is reached: ii push iteration number i twice {um map r...

posted 3y ago by Razetime‭

Answer
75%
+4 −0
Challenges Length of a Sumac Sequence

Python 3, 49 47 44 35 bytes a=lambda x,y:+(x>=0)and(1+a(y,x-y)) Try it online! -3 bytes thanks to @Hakerh400‭ -9 bytes thanks to @Jo King‭ Python 2, 50 bytes x,y=input() a=0 while...

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

Answer
75%
+4 −0
Challenges Length of a Sumac Sequence

Raku, 19 bytes {(|@_,*-*...0>*)-1} Try it online! { } # Anonymous code block ... # Create a sequence |@_ # Starting with the input ...

posted 3y ago by Jo King‭

Answer
75%
+7 −1
Meta Who should the temporary moderators be?

I nominate Jo King, as they were already voted as moderator by the community earlier. They have proven to be an active and trustworthy moderator, who is also a consistent contributor to the code g...

posted 3y ago by Razetime‭

Answer
75%
+4 −0
Challenges Tile pyramids on top of each other!

The task Given a positive integer as input, output tiled pyramids of this height. How? Let's say the inputted integer was n. From there, we output n lines of output, each having: A decreasing...

9 answers  ·  posted 3y ago by Dion‭  ·  last activity 2y ago by A username‭

Question code-golf ascii-art
75%
+4 −0
Challenges 1, 2, Fizz, 4, Buzz!

JavaScript (Node.js), 64 bytes for(n=0;101>++n;)console.log([['Fizz'][n%3]]+[['Buzz'][n%5]]||n) Try it online!

posted 3y ago by Hakerh400‭

Answer
75%
+4 −0
Meta What are the rules of programming language compliance?

Regarding because the vast majority of all programs that were posted & highly up-voted there won't even compile on the most basic, compliant compiler for that language. Code Golf allows f...

posted 3y ago by Quintec‭

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

goruby, 1 byte f Okay, so that's a bit unfair. 😂 The definition of f from golf_prelude.rb (which is what goruby embeds) is quite golfy in itself: def f(m = 100) 1.upto(m){|n|puts'FizzBuzz ...

posted 3y ago by Chris Jester-Young‭  ·  edited 3y ago by Chris Jester-Young‭

Answer
75%
+4 −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 3y ago by Corsaka‭  ·  last activity 3y ago by Quintec‭

Question discussion
75%
+4 −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 3y ago by Mithical‭

Answer
75%
+4 −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 3y ago by Quintec‭

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
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
75%
+4 −0
Challenges Just the vowels please

Given a sequence of letters, output only the vowels. Input A sequence of letters This may be a string or any ordered data structure of characters (provided it is consistent between inputs) Th...

9 answers  ·  posted 1y ago by trichoplax‭  ·  last activity 1y ago by taoh‭

Question code-golf alphabet
75%
+4 −0
Challenges Calculate the Z-array

Task Given a list of numbers $X$ produce a second list of numbers $Y$ such that $Y_i$ is the length of the longest common prefix of $X$ and $X$ with the first $i$ elements removed. For example if...

1 answer  ·  posted 11mo ago by WheatWizard‭  ·  last activity 10mo ago by TheCodidacter, or rather ACodidacter‭

Question code-golf list array
75%
+4 −0
Challenges Probability of rolling all 6 dice faces

The probability of rolling every number from 1 to 6 with $N$ six-sided dice. Input A positive integer $N$. Your code must work for inputs up to and including 10, but may crash, error, or give ...

4 answers  ·  posted 10mo ago by trichoplax‭  ·  last activity 10mo ago by RubenVerg‭

Question code-golf math dice