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 Shaggy‭

124 posts
60%
+1 −0
Challenges Generalized Sort

Japt -h, 5 bytes Takes the array to be sorted as input and assigns the array of functions, in reverse order, to variable V. V£=ñX Try the names test case I could save a byte by replacing =ñ w...

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

Answer
60%
+1 −0
Challenges Mediocre pop count

Japt, 13 bytes ÆüÈc¤ñÃé ¤¬øX Try it ÆüÈc¤ñÃé ¤¬øX :Implicit input of string U Æ :Filter each character, X by ü : Group & sort U by È ...

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

Answer
60%
+1 −0
Challenges Just the vowels please

JavaScript, 27 24 bytes Input as a string, output as a character array or empty array. s=>s.split(/[^aeiou]*/i) Try it online! Thanks to Moshi for pointing out the * I was missing that w...

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

Answer
60%
+1 −0
Challenges Just the vowels please

Japt v2.0a0, 3 bytes o\v Try it o\v :Implicit input of string o :Keep only \v :RegEx /[aeiou]/gi

posted 2y ago by Shaggy‭

Answer
60%
+1 −0
Challenges 55 fruit salad: choose your own Kolmogorov complexity

Japt, 233 bytes `ÜÊ Ò˜ Í a×G ¯¯o ÖÚb ¯ØÚ ז »Ûá ÝÁ„ Á²g fig ¤¶n ÓI„ lªo §Ö‡ ÚAo Ú-n Û u Ûo nÂ) šem ÇÓy pe‡ pi¦ Îñˆ ΰn Ѧk Ѧl sŽb Ɏ ȃp Èîp ÈlŸ ‘y °ÛG Ù i abiu alڈ app¤ ‡aza bael b„„a ¼ÚAe ÞÃ...

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

Answer
60%
+1 −0
Challenges Looping counter

Japt, 6 bytes ßOpP±Q Test it ßOpP±Q ß :Recursive call Op :Output with trailing newline P :Empty string, initially ± :Append Q :Quotation mark

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

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

Japt, 5 bytes k eUâ Try it

posted 2y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Looping counter

JavaScript, 25 bytes Could be 21 but calling the function like that feels like cheating. (f=s=>f(s+=8,print(s)))`` Try it online! 22 bytes Didn't want to post this as my main solution a...

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

Answer
60%
+1 −0
Challenges Operation "Find The Operator"

Japt, 16 bytes Takes the result as the first input and the other 2 values as an array as the second input. Uses z for floor division & p for exponentiation and outputs " if there's no match (c...

posted 3y ago by Shaggy‭

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

Rockstar, 67 bytes listen to S split S O's"" while S roll S into C let O be C+O say O Try it here (Code will need to be pasted in)

posted 3y ago by Shaggy‭

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

Rockstar, 44 bytes Outputs 1 for odd or 0 for even. listen to N let M be N/2 turn up M say M*2-N Try it here (Code will need to be pasted in)

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Stairs? Stairs! Stairs.

Japt -R, 13 bytes Uses = in place of #. Æ"_/"+Xç¥ÃoÅù Try it Æ"_/"+Xç¥ÃoÅù :Implicit input of integer U Æ :Map each X in the range [0,U) "_/" : Literal str...

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

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

Rockstar, 138 135 133 bytes F takes I&S let M be N/I turn up M if N-I*M S's"" return S N's0 while N-100 let N be+1 say F taking 3,"Fizz"+F taking 5,"Buzz" or N Try it here (Cod...

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

Answer
60%
+1 −0
Challenges Getting perfect squares, differently

Japt, 9 bytes No infinite lists in Japt so we'll have to go with a recursive solution. ßOpTµJJµ2 Test it ßOpTµJJµ2 ß :Recursive call with (irrelevant) argument Op : ...

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

Answer
60%
+1 −0
Challenges Generalized Sort

JavaScript, 25 bytes Arguments are curried, i.e. f(a)(s), where a is the array to be sorted and s is an array of functions to sort by, in reverse order. Modifies a in place, which I don't know tha...

posted 3y ago by Shaggy‭  ·  last activity 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Make my value binary

JavaScript, 16 bytes n=>n.toString(2) Try it online!

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Make my value binary

Japt, 1 byte ¤ Try it or run all test cases

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

Rockstar, 82 bytes listen to N let N be-2 X's-1 say "##"+"#"*N while N-X say "#"+" "*N+"#" let X be+1 Try it (code will need to be pasted in)

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Make 2+2=5

JavaScript, 19 bytes x=>y=>x-2|y-2?x+y:5 Try it online!

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

JavaScript, 47 bytes n=>`0`.repeat(n)+(` 0`.padEnd(n--)+0).repeat(n) Try it online! My first pass used recursion before I realised I was over thinking things! First 51 byte version inclu...

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

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

Japt -R, 11 10 bytes ÆQ+ùUÉÃvçQ Try it ÆQ+ùUÉÃvçQ :Implicit input of integer U Æ :Map the range [0,U) Q : Quotation mark + : Append another ...

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

Answer
60%
+1 −0
Challenges Roll n fair dice

Japt -mx, 3 bytes Takes n as the first input and m as the second. ÒVö Try it ÒVö :Implicit map of the range [0,first input) Ò :Negate the bitwise NOT of (i.e., increment) V ...

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

Answer
60%
+1 −0
Challenges 99 Shortened Bottles of Beer

JavaScript (V8), 185 bytes for(c=99;c;)print((f=(s=` on the wall`)=>`c||99bottle{~-c?`s`:``} of beer`+s)()+`, f.{--c?`Take one down and pass it around`:`Go to the store and buy s...

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Small integer swapping

Japt, 3 bytes I/O as an array. cUé Try it cUé :Implicit input of array U c :Concatenate Ué : U rotated right once

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

Answer
60%
+1 −0
Challenges Getting perfect squares, differently

JavaScript (V8), 28 bytes for(x=y=0;;++y)print(x+=++y) Try it online!

posted 3y ago by Shaggy‭

Answer