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.6k posts
 
50%
+0 −0
Challenges Bytes to Segfault

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

posted 3y 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 3y 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 3y ago by radarek‭  ·  edited 3y 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 3y 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 3y ago by radarek‭  ·  edited 3y ago by radarek‭

Answer
50%
+0 −0
Challenges Repeat the characters

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

posted 3y 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 3y ago by radarek‭  ·  edited 3y 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 3y ago by radarek‭  ·  edited 3y 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 3y 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 3y 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 3y 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 3y ago by radarek‭  ·  edited 3y 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 3y ago by radarek‭

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

posted 3y 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 3y ago by south‭

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

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

posted 3y 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 3y ago by radarek‭  ·  edited 3y ago by radarek‭

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

J, 1 byte $ This is shape of. Pretty low-hanging fruit tbh.

posted 3y ago by south‭

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

dc, 9 bytes _?dvd*-^p Try it online! Comparisons are expensive in dc, so you have to get a bit creative. I came up with $0^{n-\lfloor\sqrt{n}\rfloor^2}$.

posted 3y ago by orthoplex‭

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

Embed ESCR, 28 characters [= [exp [rnd [sqrt n]] 2] n] The number to test is in N. There are 4 nested functions. From inner to outer: SQRT takes the square root of N. This produces a floating ...

posted 3y ago by Olin Lathrop‭  ·  edited 3y ago by Olin Lathrop‭

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

J, 21 bytes ,&'+".1!:1(3)'1!:1(3) Try it online! STDIN is ugly in J because you have to use foreigns.

posted 3y ago by south‭

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

ESCR, 35 bytes show "show [+ [arg 1] " [arg 1] "]" The SHOW command writes to standard output. The parameters in quotes are just fixed strings. The ARG function returns a numbered argument. In...

posted 3y ago by Olin Lathrop‭

Answer
50%
+0 −0
Challenges Solve Goldbach's Conjecture

J, 50 bytes {{({~[:y&(i.&1@:=)[:>+/&.>),{@(,&<)~p:i.p:^:_1 y}} Try it online! A nasty DD solution. {{({~[:y&(i.&1@:=)[:>+/&.>),{@(,&<)~p:i.p:...

posted 2y ago by south‭

Answer
50%
+0 −0
Challenges Solve Goldbach's Conjecture

Ruby, 69 bytes require'prime';->n{Prime.first(n).then{_1.product _1}.find{_1+_2==n}} Try it online!

posted 2y ago by south‭

Answer
50%
+0 −0
Challenges Solve Goldbach's Conjecture

Python 3.8, 112 bytes def f(x):y=[i for i in range(2,x)if not[j for j in range(2,i)if i%j<1]];return[(q,x-q)for q in y if x-q in y][0] Try it online!

posted 2y ago by dino‭

Answer