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 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
66%
+2 −0
Challenges Sort letters by height

Japt, 23 16 15 13 bytes Lexicographical sort using the custom alphabet tipbdghkflyqj. I/O as characters arrays, sorts in ascending order. n`“pbdghkf§qj Try it

posted 1y ago by Shaggy‭  ·  edited 11mo ago by Shaggy‭

Answer
50%
+0 −0
Challenges Mediocre pop count

JavaScript, 104 102 99 bytes I/O as a character array. a=>a.filter(x=>a<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...Buffer(x)[0].toString(2)].sort()).sort()) Try it online!

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

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

JavaScript, 52 51 28 bytes s=>Buffer(s).map(x=>x|32)+`` Try it online! -1 byte thanks to trichoplax‭.

posted 1y ago by Shaggy‭  ·  edited 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
66%
+2 −0
Q&A Up to date JavaScript Try-It-Online

There is a new project called Attempt This Online intended as an alternative to TIO. It's pretty nascent so doesn't yet support the same volume of languages as TIO and the only version of JavaScrip...

posted 1y ago by Shaggy‭  ·  edited 1y ago by trichoplax‭

Answer
71%
+3 −0
Challenges The holeyest base

Japt -h, 19 18 bytes Gõ ñ@ìX xg#‘5#}4s3 Try it Gõ ñ@ìX xg#‘5#}4s3 :Implicit input of integer U G :16 õ :Range [1,G] ñ :Sor...

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

Answer
66%
+2 −0
Challenges 8 coexisting queens

Japt -R, 16 15 bytes Uses spaces for #s and "s for Qs. ##Ë64ì £QùXÄÃy Test it (footer reformats the output to use the characters from the spec) This one uses 1s for #s. ##Ë64ì £#ÿ¤hXQ ...

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

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

JavaScript, 31 bytes Outputs 0 for falsey and a non-zero value for truthy. If the 2 values must be consistent then replace the last * with && to output true instead. n=>(g=d=>d++&...

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

Answer
71%
+3 −0
Challenges Presumptuous base conversion

Python, 45 bytes I am not a Python guy at all, so I'm quite proud of this. I'm sure, though, there's something simple I could be doing to save myself a few bytes! lambda n:int(n,int(max("1"+n),...

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
66%
+2 −0
Challenges Presumptuous base conversion

Japt, 13 bytes Takes input as a character array. mnG ìUrÔÄ ªUl Try it mnG\nìUrÔÄ ªUl :Implicit input of character array U m :Map n : Convert from bas...

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
50%
+0 −0
Challenges Create a range grid

Japt -m, 4 bytes VÆT° Try it

posted 1y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Make a frequency table (histogram)

Japt, 8 bytes ü ®â pZl Try it

posted 1y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Find n Niven Numbers

Japt, 10 bytes ÈvXìx}jU1ì Try it

posted 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 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