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 »

Posts by xrs‭

9 posts
60%
+1 −0
Challenges Make $2 + 2 = 5$

AWK, 28 26 21 bytes $0=$1~2&&$2~2?5:$1+$2 Try it online!

posted 6mo ago by xrs‭  ·  edited 20h ago by xrs‭

Answer
60%
+1 −0
Challenges Single digit Roman numeral

AWK, 80 bytes {split("I V X L C D M 1 5 10 50 100 500 1000",d);for(;d[++i]!=$1;);print d[i+7]} Try it online! A quick map function. 'split' breaks the string into array elements. Find the stri...

posted 6mo ago by xrs‭  ·  edited 6mo ago by xrs‭

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

AWK, 82 bytes {split($1,d,"");i=a=d[1];for(x in d){d[x]>a?a=d[x]:0;d[x]<i?i=d[x]:0}print a+i+$1} Try it online! Just pass your input, e.g.: echo "123" | awk '...'

posted 6mo ago by xrs‭  ·  edited 6mo ago by xrs‭

Answer
60%
+1 −0
Challenges Looping counter

K (oK), 9 bytes {x#0}'!10 Try it online! !10 / pass range your arbitrary number .' / treat those as a list, and evaluate each separately { } / main function...

posted 6mo ago by xrs‭  ·  edited 3mo ago by xrs‭

Answer
50%
+0 −0
Challenges Looping counter

AWK, 26 24 bytes END{for(;;)print x=x"*"} Try it online!

posted 6mo ago by xrs‭  ·  edited 6mo ago by trichoplax‭

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

AWK, 48 bytes ORS="";{l=split($0,d,"");for(;l>0;)print d[l--]} Try it online!

posted 6mo ago by xrs‭  ·  edited 6mo ago by xrs‭

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

AWK, 62 61 60 56 bytes {for(;i++<$1;)print i%3?i%5?i:y="Buzz":i%5?x="Fizz":x y} {for(;i++<$0;)print i%15?i%5?i%3?i:"Fizz":"Buzz":"FizzBuzz"} {for(;i++<$0;x=""){i%3||x="Fizz";i%5||x=...

posted 6mo ago by xrs‭  ·  edited 6mo ago by xrs‭

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

AWK, 2 bytes $0 Try it online! END{print "Hello, World!"}

posted 6mo ago by xrs‭

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

K (oK), 15 bytes "Hello, World!" Try it online! I'm terrible at K, but I've got that one down now.

posted 6mo ago by xrs‭

Answer