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 »

Activity for Shaggy‭

Type On... Excerpt Status Date
Edit Post #287124 Post edited:
about 2 years ago
Edit Post #287125 Post edited:
about 2 years ago
Edit Post #287125 Post edited:
about 2 years ago
Edit Post #287125 Initial revision about 2 years ago
Answer A: 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] ñ :Sort by @ :Passing each X through the following functio...
(more)
about 2 years ago
Edit Post #287124 Post edited:
about 2 years ago
Edit Post #287124 Post edited:
about 2 years ago
Edit Post #287124 Initial revision about 2 years ago
Answer A: 8 coexisting queens
Japt `-R`, 16 15 bytes Uses spaces for `#`s and `"`s for `Q`s. ##Ë64ì £QùXÄÃy Test it (footer reformats the output to use the characters from the spec) This one uses `1`s for `#`s. ##Ë64ì £#ÿ¤hXQ Test it (footer as above) ##Ë64ì £QùXÄÃy ##Ë64 ...
(more)
about 2 years ago
Comment Post #287090 Seeing as there are only 12 possible layouts before without rotation/reflection, it'd probably be best to include them as examples.
(more)
about 2 years ago
Comment Post #282836 Instead of creating a new object, you're assigning the callback function of the `map` to variable `d` and using that as your object.
(more)
about 2 years ago
Edit Post #286986 Post edited:
about 2 years ago
Edit Post #287081 Post edited:
about 2 years ago
Edit Post #287081 Initial revision about 2 years ago
Answer A: 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++>n||n%d2g(d))(1) Try it online!
(more)
about 2 years ago
Comment Post #282836 [26 bytes](https://tio.run/##JYxBCoMwFETX5hR/V4Nfwaa1FIkXCVkETUqLNWJCNqW9ehojw8zADLyXCsqN23P19WInHQ2Pig@qeau1nHjgwySC5PVvLxpHuzgPXjvvgIMghWixxXNWm8WQSUw7wxte8YL39LDkDjtJZE@IsRuUsz4oYM1Bo/AhxU63s25m@yjzW8EJ6iFFBSYvlPbkG/8)
(more)
about 2 years ago
Edit Post #287054 Post edited:
about 2 years ago
Comment Post #287054 It's an anonymous function, @#56533, just like we have in [JavaScript](https://codegolf.codidact.com/posts/287035/287045#answer-287045) .The `f=` would only need to be included if the function were recursive.
(more)
about 2 years ago
Comment Post #287054 I see where I went wrong! Fixed. Thanks, @#8056.
(more)
about 2 years ago
Edit Post #287054 Post edited:
about 2 years ago
Edit Post #287054 Initial revision about 2 years ago
Answer A: 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),16)+1)or len(n) Try it online!
(more)
about 2 years ago
Comment Post #287050 Actually, screw it, I'm quite proud of that, seeing as I'm not a Python guy so I'm having it for meself! 😆 Sorry!
(more)
about 2 years ago
Comment Post #287050 [45 bytes](https://tio.run/##K6gsycjPM7YoKPqfZhvzPycxNyklUSHPKjOvRCNPB0TmJlZoKBkpaedp6hiaaWobauYXKeSk5mnkaf4vKAIpSNNQMjE1VtLU/J8GAA), for starters.
(more)
about 2 years ago
Comment Post #287050 I'm not a Python guy but would a lambda not be shorter?
(more)
about 2 years ago
Edit Post #286972 Post edited:
about 2 years ago
Edit Post #287044 Post edited:
about 2 years ago
Edit Post #287045 Post edited:
about 2 years ago
Edit Post #287045 Post edited:
about 2 years ago
Edit Post #287045 Post edited:
about 2 years ago
Edit Post #287044 Post undeleted about 2 years ago
Edit Post #287044 Post edited:
about 2 years ago
Edit Post #287045 Post edited:
about 2 years ago
Edit Post #287045 Post undeleted about 2 years ago
Edit Post #287045 Post edited:
about 2 years ago
Edit Post #287045 Post deleted about 2 years ago
Edit Post #287044 Post deleted about 2 years ago
Edit Post #287045 Initial revision about 2 years ago
Answer A: 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! s=>parseInt(s,`0x`+[...s].sort().pop()-0)||s.length Try it online! (Includes all test ...
(more)
about 2 years ago
Edit Post #287044 Post edited:
about 2 years ago
Edit Post #287044 Initial revision about 2 years ago
Answer A: 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 base G : 16 \n :Reassign to U ...
(more)
about 2 years ago
Edit Post #286972 Post edited:
about 2 years ago
Comment Post #285511 [6 bytes](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=ayDkpiBl&input=MjA)
(more)
about 2 years ago
Edit Post #286986 Initial revision about 2 years ago
Answer A: 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
(more)
about 2 years ago
Edit Post #286973 Initial revision about 2 years ago
Answer A: Determine whether an integer is square-free
Japt, 5 bytes k eUâ Try it
(more)
about 2 years ago
Edit Post #286972 Initial revision about 2 years ago
Answer A: 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 as it's pretty much the same as Moshi's. for(s=``;;)print(s+=8) Try it online!
(more)
about 2 years ago