Activity for Moshi
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #283407 |
@#53588 Done. I also added a bit about the usages of the determinant. (more) |
— | over 3 years ago |
Edit | Post #283407 |
Post edited: |
— | over 3 years ago |
Comment | Post #283442 |
See [this post](https://codegolf.codidact.com/posts/282799/282800#answer-282800). Given it is currently the leading answer, I think that right now it is the expected behavior. (more) |
— | over 3 years ago |
Edit | Post #283432 | Initial revision | — | over 3 years ago |
Answer | — |
A: Default Rules: Extensions Implementation defines the language, so if you use extensions to a language, you should add ` + ... extensions` to the header. E.g. for a C post using gcc extensions, the header begin with ```markdown C (gcc) + gcc extensions ``` (more) |
— | over 3 years ago |
Edit | Post #283431 | Initial revision | — | over 3 years ago |
Question | — |
Default Rules: Extensions Since there have been some discussions about the use of GCC extensions, I decided to make a default-rules post about it. How should we deal with compiler extensions to languages? (more) |
— | over 3 years ago |
Edit | Post #283428 | Initial revision | — | over 3 years ago |
Answer | — |
A: Coat of Many Colours [C (gcc)], 301 bytes Function taking in an array of null-terminated strings and the array's length. ```c #include #include chars="edellowreenrowncarletlackchreachubyliveioletawnilacoldhocolateauvereamrimsonilverosezuremonussetreyurplehiteinkrangelue";int g(const voida,const voidb){return s... (more) |
— | over 3 years ago |
Edit | Post #283407 | Initial revision | — | over 3 years ago |
Article | — |
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) |
— | over 3 years ago |
Comment | Post #283380 |
@#54114 [imports/include statements should be included in the byte count](https://codegolf.codidact.com/posts/282802/282803#answer-282803) (more) |
— | over 3 years ago |
Comment | Post #283380 |
(402 bytes) https://godbolt.org/z/7vq33Mob1
You can use the string
```
"red yellow green brown scarlet black ochre peach ruby olive violet fawn lilac gold chocolate mauve cream crimson silver rose azure lemon russet grey purple white pink orange blue"
```
instead of an array, and use `strstr` ... (more) |
— | over 3 years ago |
Edit | Post #283383 | Initial revision | — | over 3 years ago |
Answer | — |
A: Coat of Many Colours [JavaScript (Node.js)], 153 147 bytes -6 bytes thanks to Shaggy! ``` a=>a.sort((x,y)=>g(x)-g(y),g=x=>"y gree br sc bla oc pe rub ol v f li go ch m cre c s ro a l ru g pu w p o b".split` `.findIndex(t=>!x.indexOf(t))) ``` Try it online! Inspired by user's solution, I found the minimum nu... (more) |
— | over 3 years ago |
Edit | Post #283338 | Initial revision | — | over 3 years ago |
Answer | — |
A: A chunk of symbols is a calculation [JavaScript (Node.js)], 148 bytes ```javascript s=>s?eval(s.replace(/([^()])\1/g,(m,g)=>(g=='!'?'+':g)+m.length).replace(/\(/g,'(').replace(/-(\d|\(.+?\))\^(\d+)/g,(m,g,h)=>'-('+g+''+h+')')):0 ``` Abuses regex replacements and evals. Is it pretty? Nope. Is it optimized? Nope. Does it work? Ma... (more) |
— | over 3 years ago |
Comment | Post #283231 |
@#54114 So basically, an exclamation mark does the exact same thing as `+`, and only serves to separate two additions? (more) |
— | over 3 years ago |
Comment | Post #283231 |
Does that mean that the answerer can use whatever character they want instead of `!`? That is,
1. Does `aaaa+++` equal `4+3`?
2. Does `aaaa!!!+++` equal `4+3+3`? (more) |
— | over 3 years ago |
Comment | Post #283231 |
Are function entries allowed? That is, writing a function that takes the string and returns the output. (more) |
— | over 3 years ago |
Comment | Post #283231 |
You say
> The string can only contain +, -, *, /, ^, (, and ).
But in your test case, you have
`!!!+++++(----***)//` = `3 + 4(-4 * 3) / 2)`
Does n repetitions of `!` mean the positive number n? (more) |
— | over 3 years ago |
Comment | Post #283140 |
@#53588 I don't think it does. (more) |
— | over 3 years ago |
Comment | Post #283140 |
@#53588 Afaik there isn't an online runner for this language. If you want, the reference intepreter lives at https://github.com/Timwi/EsotericIDE (more) |
— | over 3 years ago |
Comment | Post #283146 |
@#53579 Thanks! I never knew that you could remove the parentheses (more) |
— | over 3 years ago |
Edit | Post #283146 |
Post edited: |
— | over 3 years ago |
Edit | Post #283146 | Initial revision | — | over 3 years ago |
Answer | — |
A: 99 Shortened Bottles of Beer [JavaScript (Node.js)], 228 224 bytes -4 bytes thanks to Hakerh400 ```javascript (b=n=>`${n} bottle${n-1?'s':''} of beer`,w=' on the wall')=>[...Array(99)].map((,i)=>`${b(i=99-i)}${w}, ${b(i)}. `+(--i?`Take one down and pass it around, `:(i=99,`Go to the store and buy some more, `))+b(i)+w+'.... (more) |
— | over 3 years ago |
Comment | Post #283141 |
By snippet, I mean an expression that evaluates to the requested text. (more) |
— | over 3 years ago |
Edit | Post #283144 | Initial revision | — | over 3 years ago |
Answer | — |
A: 99 Shortened Bottles of Beer Sclipting, (UTF-16) 238 bytes ``` 눰 감下❶貶下標⓶긆깯덇끬뉗꼠닶눠눦녥댠❷감侔是검摧終併終❷긆뭮긇끨뉒걷눖롬 껂밀⓹껠뙔눖띥긆뭮뉒걤닷덮긆굮뉂거눗꽳긆땴긆굲닷녮뉂렠⓺❺껠똊終棄棄껠뙇닲건닲건늆넠댷끯댦넠눖멤긆깵뎒걳닶륥긆륯댦넬긃딹긆깯덇끬뉗꼠닶눠눦녥댢걯닢건늆넠덶구닂밎 ``` Explanation ``` 눰 감下 For n from 99 down to 1 ❶貶下 For k from n to n - 1 標⓶긆깯덇끬뉗꼠닶눠눦녥댠 Push " bottles of... (more) |
— | over 3 years ago |
Edit | Post #283140 | Post undeleted | — | over 3 years ago |
Edit | Post #283140 | Post deleted | — | over 3 years ago |
Edit | Post #283140 | Initial revision | — | over 3 years ago |
Answer | — |
A: It's Hip to be Square Sclipting, (UTF-16) 8 bytes ``` 根❶圜同 ``` Takes the square root, pushes a copy, rounds the copy, and compares. Basically, checks that the square root is an integer. (more) |
— | over 3 years ago |
Edit | Post #283108 |
Post edited: |
— | over 3 years ago |
Suggested Edit | Post #283108 |
Suggested edit: (more) |
helpful | over 3 years ago |
Edit | Post #283047 | Initial revision | — | over 3 years ago |
Answer | — |
A: Getting started with making (and/or solving) KOTH challenges About King of the Hill King of the Hill (KoTH) is a relatively straightforward concept: Entrants create bots; bots compete against each other. Making a KoTH challenge The exact details of the competition can be pretty much anything you want, as long as there is a clear win condition. The mos... (more) |
— | over 3 years ago |
Edit | Post #283034 |
Post edited: Fixed link to cops |
— | over 3 years ago |
Suggested Edit | Post #283034 |
Suggested edit: Fixed link to cops (more) |
helpful | over 3 years ago |
Comment | Post #283007 |
[Try it online!](https://tio.run/##lZHBbsIwDIbveYqIJ2BXQBETUKnSUCXa7TLt4KYGrJWkShwET99VCmvXHpCWW5zv/@38vqIrrSe@t21qdB0qXKWG8YROid/CHhmSYDSTNX4oZ4GbwMM9Z0fmpIR4GCy2eCSDH@AIyrr3zQwu5YsSUT6F8mKbvRdHqjtorkT0nEJRGt@WcraxjZdgKnmwZYnOz7oZHsIDVs@kPXWxV9ycwYHmziBx9pIzOJ7gww@U@l@HAr4xIed5aPLMuw@HfFPD/dUXeONRNn... (more) |
— | over 3 years ago |
Comment | Post #282630 |
@#8046 I already fixed it; and it seems it's ben deployed. Feel free to close. (more) |
— | over 3 years ago |
Comment | Post #282971 |
@#53310 It's quadratic regression, actually (degree 2) (more) |
— | over 3 years ago |
Edit | Post #282971 | Initial revision | — | over 3 years ago |
Answer | — |
A: Three Number Monte MoshiBot ```python from numpy.polynomial import Polynomial def MoshiBot(data, history): if len(history) = 10: cutoff = len(history) - 10 snapshot = history[cutoff:] minvalues = list(map(min, snapshot)) midvalues = list(map(lambda vals: sorted(vals)[1], snapshot)) xpoints = r... (more) |
— | over 3 years ago |
Comment | Post #282932 |
@#54151 You can update it if you want (more) |
— | over 3 years ago |
Edit | Post #282932 | Initial revision | — | over 3 years ago |
Answer | — |
A: Is it good practice to change the names of variables in challenges? Yes Unless the challenge tells you what to name your function, you're free to use anything. This means that single character names are usually the best option. Note that anonymous function submissions / lambdas are allowed For that challenge, you don't actually need to submit anything other ... (more) |
— | over 3 years ago |
Edit | Post #282881 |
Post edited: Tagged |
— | over 3 years ago |
Suggested Edit | Post #282881 |
Suggested edit: Tagged (more) |
helpful | over 3 years ago |