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‭

109 posts
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 2y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Efficient censorship

Japt -h, 7 bytes à ñÊkøV Try it à ñÊkøV :Implicit input of strings U=X & V=Y à :Powerset of U ñ :Sort by Ê : Length k :Remove elements that...

posted 11mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges Digit antitranspose

Japt, 2 bytes Input as a multi-line string ÕÔ Try it ÕÔ :Implicit input of string Õ :Transpose Ô :Reverse

posted 1y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Lowercase, but not just the letters

Japt, 3 bytes c|H Try it c|H :Implicit input of string c :Map charcodes | : Bitwise OR with H : 32

posted 1y ago by Shaggy‭  ·  edited 1y 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 1y ago by Shaggy‭  ·  edited 1y 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 1y ago by Shaggy‭  ·  edited 1y 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 1y 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 1y ago by Shaggy‭  ·  edited 1y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Presumptuous base conversion

JavaScript, 73 71 63 53 52 bytes Well, this ain't pretty at all! Will need to take another pass over it to try to improve upon it, maybe with recursion.Yeah, I was completely overthinking this one...

posted 1y ago by Shaggy‭  ·  edited 1y 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 1y ago by Shaggy‭  ·  edited 1y ago by Shaggy‭

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

Japt, 5 bytes k eUâ Try it

posted 1y 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 1y ago by Shaggy‭  ·  edited 1y ago by Shaggy‭

Answer
60%
+1 −0
Challenges "Hello, {name}!"

JavaScript, 28 bytes alert(`Hello, ${prompt()}!`) Try it online!

posted 2y 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 2y 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 2y 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 2y ago by Shaggy‭  ·  edited 2y 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 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

Answer
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 2y ago by Shaggy‭  ·  edited 2y 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 2y ago by Shaggy‭  ·  last activity 2y ago by Shaggy‭

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

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

posted 2y ago by Shaggy‭

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

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

posted 2y 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 2y 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 2y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Backspace an array

Japt, 9 bytes ô rÈÔÅÔcY Try it or run all test cases ô rÈÔÅÔcY :Implicit input of array ô :Split on falsey elements (i.e., 0) r :Reduce by È :Passing...

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

Answer
50%
+0 −0
Challenges Prime Difference

Japt, 15 14 bytes @§XnÈj}aX+j}a2 Try it or run all test cases @§XnÈj}aX+j}a2 :Implicit input of integer U @ :Function taking an integer X as argument § ...

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

Answer