Activity for Moshi
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #283978 |
Since `i` is always non-negative, you can shave off 2 bytes by replacing `bool(i)` with `(i>0)` (more) |
— | about 3 years ago |
Comment | Post #283969 |
You can easily remove a few bytes by just using `print("Hello, "..io.read().."!")` (more) |
— | about 3 years ago |
Edit | Post #283970 | Initial revision | — | about 3 years ago |
Answer | — |
A: "Hello, {name}!" [Sclipting], (UTF-16) 14 bytes ``` 낆녬닆묬글⑴긐 ``` (more) |
— | about 3 years ago |
Edit | Post #283966 |
Post edited: Some English clarifications |
— | about 3 years ago |
Suggested Edit | Post #283966 |
Suggested edit: Some English clarifications (more) |
helpful | about 3 years ago |
Edit | Post #283874 |
Post edited: Spelling |
— | about 3 years ago |
Comment | Post #283908 |
I've updated the question. Is there anything else that's confusing? (more) |
— | about 3 years ago |
Edit | Post #283908 |
Post edited: |
— | about 3 years ago |
Edit | Post #283788 |
Post edited: |
— | about 3 years ago |
Edit | Post #283908 | Initial revision | — | about 3 years ago |
Question | — |
Generalized Sort Challenge We all know and love the generic sort function, right? However, it only sorts based off one criterion - what if we want more? That's where you come in. Your task is to sort an array based off an arbitrary number of comparison functions `c1`, `c2`, `c3`, etc.; first sort by comparing u... (more) |
— | about 3 years ago |
Edit | Post #283882 |
Post edited: |
— | about 3 years ago |
Edit | Post #283882 |
Post edited: |
— | about 3 years ago |
Suggested Edit | Post #283874 |
Suggested edit: Spelling (more) |
helpful | about 3 years ago |
Edit | Post #283882 | Initial revision | — | about 3 years ago |
Article | — |
Expand a polynomial [FINALIZED] Challenge Given the roots of a polynomial (that is, the $x$ values where the polynomial evaluates to zero), as an array of real numbers, return the polynomial's coefficients. That is, given real roots $r1, r2, \cdots , rn$, find the coefficients of the expansion of $(x-r1)(x-r2)\cdots(x-rn)$, o... (more) |
— | about 3 years ago |
Edit | Post #283880 | Initial revision | — | about 3 years ago |
Answer | — |
A: Posting guidelines modifications Since no one has posited anything yet... I think everything but the last three bullets can be kept. Other than that, we could add in the tips about challenge specifications. Challenges > ### Posting Tips > > - Your title should be a one sentence summary of your question. > - Break differe... (more) |
— | about 3 years ago |
Comment | Post #283428 |
@#53837 The main problem is keeping it null terminated. I cannot insert a null terminator since I can't edit the input string array, and other methods like creating a new string seem more hassle than it would save. (more) |
— | about 3 years ago |
Comment | Post #283383 |
@#53588 Thanks! (more) |
— | about 3 years ago |
Edit | Post #283383 |
Post edited: |
— | about 3 years ago |
Edit | Post #283853 | Initial revision | — | about 3 years ago |
Answer | — |
A: Make my value binary [Sclipting], (UTF-16) 14 bytes ``` 要감啃終丟併反 ``` Explanation: ```text Push input 要 While the top number is non-zero 감啃 Shift the top number by 1 bit and push both the bit and shifted result 終 End loop 丟併反 Drop leading zero, concatenate, and reverse ``` (more) |
— | about 3 years ago |
Edit | Post #283383 |
Post edited: |
— | about 3 years ago |
Edit | Post #283833 | Initial revision | — | about 3 years ago |
Answer | — |
A: "Hello, World!" [Sclipting], (UTF-16) 18 bytes ``` 낆녬닆묬긅덯댦롤긐 ``` Since it hasn't been added yet. (more) |
— | about 3 years ago |
Edit | Post #283799 |
Post edited: Grammatical fixes |
— | about 3 years ago |
Suggested Edit | Post #283799 |
Suggested edit: Grammatical fixes (more) |
helpful | about 3 years ago |
Edit | Post #283753 |
Post edited: |
— | about 3 years ago |
Comment | Post #283799 |
What should be done with numbers in the input? (more) |
— | about 3 years ago |
Comment | Post #283799 |
> If the inputted string is a paragraph (2+ sentences), the abbreviation will be split...
You don't specify what character to use to split the sentence, so can we use any character? (more) |
— | about 3 years ago |
Comment | Post #283791 |
[Your TIO link](https://tio.run/##K6gsycjPM/7/PzO3IL@oRCGvNLegkgtM6uVk5iXmpOulpJb8T1OwVUBwubgKijLzSjTSNKKjDfVMdYxidaJ1jXVM9ExjYzU1/wMA) gives
```
Traceback (most recent call last):
File ".code.tio", line 3, in <module>
f = linalg.det
NameError: name 'linalg' is not defined
``` (more) |
— | about 3 years ago |
Edit | Post #283798 | Initial revision | — | about 3 years ago |
Answer | — |
A: Compute the determinant C, 147 bytes ```c float d(floatm,int r){if(r=i)]+1;return s;} ``` Try it online! Basically a C version of my example code. Takes an array of pointers and the size. Prettified and commented version: ```c float d(float m, int r) { if(r = i)] + 1; // (j >= i) term skips over ... (more) |
— | about 3 years ago |
Edit | Post #283789 | Initial revision | — | about 3 years ago |
Question | — |
Compute the determinant Challenge A simple challenge: Given a two-dimensional matrix (an array of arrays) of real numbers, compute the determinant. The determinant of a matrix is a mathematical construct used in many applications, such as solving polynomial equations, identifying the invertibility of the matrix, and f... (more) |
— | about 3 years ago |
Edit | Post #283788 | Initial revision | — | about 3 years ago |
Article | — |
Generalized Sort Challenge We all know and love the generic sort function, right? However, it only sorts based off one criterion - what if we want more? That's where you come in. Your task is to sort an array based off an arbitrary number of comparison functions `c1`, `c2`, `c3`, etc.; first sort by comparing u... (more) |
— | about 3 years ago |
Edit | Post #283753 |
Post edited: |
— | about 3 years ago |
Edit | Post #283753 | Initial revision | — | about 3 years ago |
Answer | — |
A: My house is destroyed! Can you make me one? [Python 3], 47 42 40 bytes -2 bytes thanks to bastolski ```python lambda n:'#'n+('\n#'+' '(n-2)+'#')-n ``` Try it online! Python's string multiplication is really useful. (more) |
— | about 3 years ago |
Edit | Post #283730 |
Post edited: when you realize you forgot to put scoring lol |
— | about 3 years ago |
Edit | Post #283730 | Initial revision | — | about 3 years ago |
Question | — |
Roll n fair dice Challenge This is a simple randomness challenge: Given a non-negative integer $n$, and positive integer $m$, simulate rolling and summing the results of $n$ fair dice, each of which have $m$ sides numbered $1$ through $m$. Here is a basic ungolfed example in Python: ```python from random im... (more) |
— | about 3 years ago |
Edit | Post #283708 | Initial revision | — | about 3 years ago |
Answer | — |
A: In The Jailhouse Now [Sclipting], (UTF-16) 80 bytes ``` 갰減먩놔 먩놦①復먩놗겮꺕똀 먩놬①復①增疊먩놣겮꺕똀會먩놣겮꺕떠 먩놩⑴復먩놝 ``` Explanation ``` Input n pushed on stack 갰減 Subtract 3 먩놔 "╔" 먩놦 "╦" ①復 String of above repeated n-3 times 먩놗겮꺕똀 "╗\n╠" 먩놬 "╬" ①復 String of above repeated ... (more) |
— | about 3 years ago |
Edit | Post #283407 |
Post edited: |
— | about 3 years ago |
Edit | Post #283407 |
Post edited: |
— | about 3 years ago |
Comment | Post #283620 |
How should a house be generated given an n? Is there a specification or example program?
Also, I don't think this is kolmogorov complexity since it takes input. (more) |
— | over 3 years ago |