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

Java (JDK), 51 50 23 21 bytes x->y->x==y&y==2?5:x+y Try it online! Golfed 27 bytes thanks to @Moshi's advice. Golfed 2 bytes thanks to @user's advice on Discord.

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

Answer
50%
+0 −0
Challenges Reverse an ASCII string

Java (JDK), 88 83 bytes static void f(String s){for(int i=s.length();i>0;System.out.print(s.charAt(--i)));} Try it online!

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

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

BQN, 13 bytes {+´(𝕨⋆↕≠𝕩)×𝕩} { } # fn +´ # sum reduce (𝕨⋆↕≠𝕩) # x^i for each term ×𝕩 # times each coefficient Try it

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

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

Ruby, 29 bytes ->l,x{a,*b=l;a ?a+x*f[b,x]:0} Try it online

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

Answer
50%
+0 −0
Challenges Golf golf challenge

Python 3, 108 bytes lambda p,s:s<2and"Hole in one"or"Par:Bogey:Double bogey:Triple bogey:Albatross:Eagle:Birdie".split(':')[s-p] Try it online! Very similar to my other solution, but hand...

posted 2y ago by dino‭

Answer
50%
+0 −0
Challenges Determine whether an integer is square-free

Japt, 6 bytes -1 byte thanks to Shaggy! k ä¦ e Try it First time doing Japt so this is probably pretty bad. Just factorizes and checks that there are no duplicate factors.

posted 2y ago by Moshi‭  ·  edited 1y ago by Moshi‭

Answer
50%
+0 −0
Challenges Generalized Sort

Ruby, 25 bytes Credits goes to @Shaggy and his JavaScript solution. ->a,l{l.map{a.sort! &_1}} Try this online! The other solution which not mutate original array

posted 2y ago by radarek‭

Answer
50%
+0 −0
Challenges Bytes to Segfault

Ruby, 14 bytes `kill -11 #$$` Try this online!

posted 2y ago by radarek‭

Answer
50%
+0 −0
Challenges Cumulative Counts

Ruby, 31 bytes ->a{a.map{$*[_1]=1.+$*[_1]||0}} Try this online! $* is a global variable, so calling this lambda multiple times (in a single process) would give wrong result. A 32 bytes vers...

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

Answer
50%
+0 −0
Challenges Digit Sum Integer Sequence (working title)

Ruby, 36 bytes Infinite version: n=1;0while n+=p(n).digits.minmax.sum Try this online! (program is interrupted after it reaches the 128KiB limit of output)

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

Answer
50%
+0 −0
Challenges Word Count Tool

Ruby, 48 bytes ->a{[a.split,b=a.chars-[$/],b-[' ']].map &:size} Try this online!

posted 2y ago by radarek‭

Answer
50%
+0 −0
Challenges Write a Deadfish Interpreter

Ruby, 70 67 66 bytes ->c{a=0;c.bytes{|b|a,=[b<106?a+b/3-34:b<112?p(a):a*a,0]-[-1,256]}} Test this online!

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

Answer
50%
+0 −0
Challenges Repeat the characters

Ruby, 23 bytes ->{_1.gsub /./,'\0'*_2} Try this online!

posted 2y ago by radarek‭

Answer
50%
+0 −0
Challenges Coat of Many Colours

Ruby, 101 79 76 72 bytes This challenge was one of the funniest I have ever solved! 72 bytes solution (I show the solution as a Ruby string - because binary data is filtered out) "->l{l.sort_...

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

Answer
50%
+0 −0
Challenges Make my number a set

Ruby, 23 bytes ->n,*x{eval'x<<x*1;'*n} Try this online! There is also 22 bytes version, but it uses special $* global variables (so it can be run only once in single process): ->n...

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

Answer
50%
+0 −0
Challenges Evens or Odds - you know this one

Ruby, 13 bytes According to the rules, programs should read from STDIN and output to the STDOUT. This is my solution: p gets.to_i&1 Try this online!

posted 2y ago by radarek‭

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

Ruby, 25 bytes puts"p #{gets}+gets.to_i" P1 - Try this online! P2 - Try this online!

posted 2y ago by radarek‭

Answer
50%
+0 −0
Challenges Repeat the characters

J, 1 byte # Try it online! The copy verb. It works the exact same as APL and Jelly's replicate.

posted 2y ago by south‭

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

J, 15 bytes 'Hello, World!' Or if you prefer to beat around the bush...76 bytes. {:a.{~-:^:_1@:|.~&2 S:0<@:<\50 16.5 36 50.5 54 54 55.5 22 16 43.5 55.5 57 54 Try it online!

posted 2y ago by south‭

Answer
50%
+0 −0
Challenges Merge two strings

Ruby, 40 bytes f=->a,b{b.index(a)==0?b:a[/./m]+f[$',b]} Attempt This Online! If we could assume that string contains only letters and numbers (or to be more specific, no characters like \t\...

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

Answer
50%
+0 −0
Challenges Prime Difference

Ruby, 56 bytes ->n{require'prime';Prime.each_cons(2).find{_2-_1>=n}[0]} Attempt This Online!

posted 2y ago by radarek‭

Answer
50%
+0 −0
Sandbox Compute T-shirt size

posted 2y ago by Razetime‭

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

J, 2 bytes p. Try it online! J likes inflections so it won't beat APL, but J is still a contender :).

posted 2y ago by south‭

Answer
50%
+0 −0
Challenges It's Hip to be Square

J, 6 bytes 0=1|%: Try it online!

posted 2y ago by south‭

Answer
50%
+0 −0
Challenges Golf a FRACTRAN interpreter

Ruby, 44 bytes ->p,n{n*=I while I=p.find{_1*n%1==0};n.to_i} Attempt This Online!

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

Answer