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

Type On... Excerpt Status Date
Edit Post #282864 Initial revision over 3 years ago
Answer A: 1, 2, Fizz, 4, Buzz!
Sclipting, (UTF-16) 62 bytes ``` 감 뉀上標❷갰剩虛끦땺뎠嗎❸걐剩虛뀧녺뎠嗎併梴是⓶終丟終并겠會 ```
(more)
over 3 years ago
Edit Post #282797 Post edited:
Added a link to what counts as free
over 3 years ago
Suggested Edit Post #282797 Suggested edit:
Added a link to what counts as free
(more)
helpful over 3 years ago
Edit Post #282842 Initial revision over 3 years ago
Answer A: Default Rules: Code Golf I/O
Unless explicitly asking for exactly two values, you may use any truthy/falsey values in decision problems For instance, considering the hypothetical challenge "Determine if a number is non-divisible by 3", `n=>n%3` would be a valid solution, as it outputs a truthy (non-zero) value when it is non...
(more)
over 3 years ago
Edit Post #282836 Initial revision over 3 years ago
Answer A: Cumulative Counts
[JavaScript (Node.js)], 34 29 26 bytes -5 bytes thanks to Shaggy's suggestion on a similar challenge -3 bytes again thanks to Shaggy! ```javascript a=>a.map(d=v=>d[v]=-d[v]) ``` Try it online!
(more)
over 3 years ago
Edit Post #282803 Initial revision over 3 years ago
Answer A: Default Rules: Libraries
Language + libraries count as a separate language In the header of your entry, you should have something like this: > ### C (clang) + \, \ You do not need to include the library source in the byte count. However, you must include any import statements in the byte count, as it is considered s...
(more)
over 3 years ago
Edit Post #282802 Initial revision over 3 years ago
Question Default Rules: Libraries
How should we deal with golfing libraries when scoring entries? Continuation of Is my extension-like library allowed to be used in answers?, the answer to that question seems to be a "yes", now we need to figure out how to score it.
(more)
over 3 years ago
Edit Post #282800 Initial revision over 3 years ago
Answer A: Default Rules: Flags and Other Compile-Time Options
I say we follow the established rules on SE: > Rather than dealing with inconsistent schemes for adding flags, let's just consider each separate invocation of a compiler/interpreter/whatever a separate implementation (and thus a separate language by our rules). E.g. Scala `-language:postfixOps`...
(more)
over 3 years ago
Edit Post #282799 Initial revision over 3 years ago
Question Default Rules: Flags and Other Compile-Time Options
How should we deal with flags / command line options when scoring entries?
(more)
over 3 years ago
Comment Post #282630 @#53310 What should be done with [these answers](https://codegolf.codidact.com/posts/279209#answer-279209)?
(more)
over 3 years ago
Comment Post #282630 Which posts does it happen on?
(more)
over 3 years ago
Edit Post #282431 Post edited:
over 3 years ago
Edit Post #282587 Initial revision over 3 years ago
Question Add two negabinary integers
About Negabinary Negabinary means base negative two (-2). That is, the $n$th place value is determined by $(-2)^n$. Negabinary numbers can be evaluated just like any other base system. For example, we can parse the numbers 101, 110, and 1010 as follows: | -8 | 4 | -2 | 1 | value | |:--:|:-:...
(more)
over 3 years ago
Comment Post #281523 You can remove the check for when `x=0`, since `[f(y)for y in range(0)]` will be an empty list https://tio.run/##K6gsycjPM/7/P802JzE3KSVRocIqOk2jUjMtv0ihUiEzT6EoMS89VaNCM/Y/SCgTIWRooGnFxVlQlJlXopGmkamp@R8A
(more)
over 3 years ago
Edit Post #279743 Post edited:
Added highest-score tag
over 3 years ago
Suggested Edit Post #279743 Suggested edit:
Added highest-score tag
(more)
helpful over 3 years ago
Edit Post #282481 Post edited:
over 3 years ago
Edit Post #282458 Post edited:
over 3 years ago
Comment Post #282499 @#53579 Thanks! (Never said we needed to return the result so can shave off a bit more)
(more)
over 3 years ago
Edit Post #282499 Post edited:
-7 bytes
over 3 years ago
Comment Post #282421 I noticed that there seems to be a pretty wide variety of answers right now. Some of them are functions taking in a number and returning a number. Some of them take from standard input and print to standard output. Some of them are functions that print to standard output. Could you clarify which o...
(more)
over 3 years ago
Edit Post #282499 Post edited:
Fixed my TIO testing code
over 3 years ago
Edit Post #282499 Initial revision over 3 years ago
Answer A: Shuffle a subset of a list
[JavaScript (Node.js)], 75 68 bytes -7 bytes thanks to Hakerh400 ```javascript (a,b)=>b.map(i=>[a[i],a[j]]=[a[j=b[Math.random()b.length|0]],a[i]]) ``` Try it online! Basic random swap algorithm. Unfortunately, JavaScript doesn't have a built in shuffle function.
(more)
over 3 years ago
Edit Post #282481 Initial revision over 3 years ago
Question Code Golf leaderboard: Scoring tags?
Currently, the leaderboard is useless on alternative-scoring challenges. In order to make the leaderboard more flexible, I propose the creation of two new tags: "lowest-score" and "highest-score". When one of the tags is used; the leaderboard would rank each entry accordingly. What do you all t...
(more)
over 3 years ago
Edit Post #282431 Post edited:
Added a short explanation of negabinary
over 3 years ago
Comment Post #282431 @#53837 Will do! The example code is just an implementation of the algorithm on the linked Wikipedia section.
(more)
over 3 years ago
Edit Post #282431 Post edited:
over 3 years ago
Edit Post #282431 Post edited:
Updated output specification
over 3 years ago
Edit Post #282458 Post edited:
-3 bytes
over 3 years ago
Edit Post #282458 Initial revision over 3 years ago
Answer A: Multiply complex numbers.
[JavaScript (Node.js)], 99 96 69 bytes ```javascript s=>([a,b,c,d]=s.match(/-?\d+/g),ac-bd+(a=ad+bc,a<0?'':'+')+a+'i') ``` Try it online! This regex is probably the best way to get the numbers. Also, for some reason, JavaScript math works with strings of numbers, so that's convenient. ...
(more)
over 3 years ago
Comment Post #282455 $(3+4i)\cdot(4-5i)=32+i$ not $8-31i$ https://www.wolframalpha.com/input/?i=%283%2B4i%29*%284-5i%29
(more)
over 3 years ago
Comment Post #282449 I'm not actually sorting the languages, so [the order isn't guaranteed](https://stackoverflow.com/questions/280713/elements-order-in-a-for-in-loop). If I were to sort it, should I sort it alphabetically by language name, byte count (of the language winner), or something else?
(more)
over 3 years ago
Edit Post #282430 Post edited:
Comment pointed out I don't need to count the `f=`
over 3 years ago
Edit Post #282442 Post edited:
Index != value (also, challenge has been updated to explicitly allow 0-8)
over 3 years ago
Suggested Edit Post #282442 Suggested edit:
Index != value (also, challenge has been updated to explicitly allow 0-8)
(more)
helpful over 3 years ago
Edit Post #282443 Post edited:
Capitalization
over 3 years ago
Suggested Edit Post #282443 Suggested edit:
Capitalization
(more)
helpful over 3 years ago
Comment Post #282439 @#53503 Do you mean returning zero-indexed arrays, or using 0-8 as the values in the array?
(more)
over 3 years ago
Comment Post #282439 I tried using your script on this board 123456789 678912345 234567891 789123456 345678912 891234567 456789123 912345678 567891234 and it returned a [1] even though it is invalid
(more)
over 3 years ago