Activity for General Sebast1anâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #284000 |
Post edited: |
— | about 3 years ago |
Edit | Post #284002 | Initial revision | — | about 3 years ago |
Answer | — |
A: Tips in golfing using Lua Remove `print`'s parentheses when it's a single string `print` strangely works without parentheses, however, it only applies to single strings. In other words, it can't do the same for other variables or string concatenation inside the function. For example: ```lua print("Hello, World!") ```... (more) |
— | about 3 years ago |
Edit | Post #284001 |
Post edited: |
— | about 3 years ago |
Edit | Post #284001 | Initial revision | — | about 3 years ago |
Answer | — |
A: Coat of Many Colours [Python 3], 349 261 160 bytes a="re y gree br sc bla oc pe rub ol v f li go ch m cre cri si ro a le rus grey pu w pi or blu".split() def f(b):return[j for i in a for j in b if j[:len(i)]==i] Try it online! Golfed 88 bytes thanks to @user's advice. Golfed 81 bytes thanks to @celt... (more) |
— | about 3 years ago |
Edit | Post #284000 | Initial revision | — | about 3 years ago |
Answer | — |
A: My house is destroyed! Can you make me one? [C (clang)], 116 102 bytes j,k;f(i){for(j=i;j--;printf("#"));for(j=i-1;j--;printf("#"))for(k=i-2,printf("\n#");k--;printf(" "));} Try it online! Sometimes, it's better to use functions when you're not restricted from using it. Golfed 14 bytes thanks to @Moshi's advice. (more) |
— | about 3 years ago |
Edit | Post #283948 |
Post edited: |
— | about 3 years ago |
Edit | Post #283995 |
Post edited: |
— | about 3 years ago |
Edit | Post #283983 |
Post edited: |
— | about 3 years ago |
Suggested Edit | Post #279408 |
Suggested edit: (more) |
helpful | about 3 years ago |
Edit | Post #283995 | Initial revision | — | about 3 years ago |
Article | — |
Output 1 to 1000 without built-in loops [cancelled] Challenge Create a program that outputs $1$ to $1000$, but, you can't use `for`, `while` and loops of the like. Shortest program wins! (more) |
— | about 3 years ago |
Suggested Edit | Post #283983 |
Suggested edit: (more) |
helpful | about 3 years ago |
Edit | Post #283982 |
Post edited: |
— | about 3 years ago |
Edit | Post #283751 |
Post edited: |
— | about 3 years ago |
Edit | Post #282241 |
Post edited: |
— | about 3 years ago |
Comment | Post #283917 |
@#8176 Are you proposing to use the Wayback Machine for this kind of idea? (more) |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283987 |
Post edited: |
— | about 3 years ago |
Edit | Post #283987 | Initial revision | — | about 3 years ago |
Answer | — |
A: 1, 2, Fizz, 4, Buzz! [Lua], 126 118 bytes p=print for i=1,100 do if i%15==0 then p"FizzBuzz"elseif i%3==0 then p"Fizz"elseif i%5==0 then p"Buzz"else p(i)end end Try it online! (more) |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Suggested Edit | Post #283982 |
Suggested edit: (more) |
helpful | about 3 years ago |
Comment | Post #283982 |
I don't understand why a semicolon is there. It's unnecessary if you placed the next code in a newline or no code succeeds it. (more) |
— | about 3 years ago |
Edit | Post #283176 |
Post edited: |
— | about 3 years ago |
Comment | Post #283978 |
@#8056 In your TIO links, you always placed a newline after the semicolon. I don't want you to keep on doing that if it will make me edit over and over, okay? :) (more) |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 | Post undeleted | — | about 3 years ago |
Edit | Post #283978 |
Post edited: |
— | about 3 years ago |
Edit | Post #283978 | Post deleted | — | about 3 years ago |
Edit | Post #283978 | Initial revision | — | about 3 years ago |
Answer | — |
A: Word Set Square [Python 3], 196 195 145 102 91 89 87 79 bytes x=input();x+=x[::-1];i=-1 for c in x[:-1]:print(c(i>-1)+" "i+c);i+=1 print(x) Try it online! Golfed 50 bytes thanks to @celtschk's advice. Golfed another 43 bytes thanks to @celtschk's advice. Golfed another 11 bytes thanks to @... (more) |
— | about 3 years ago |
Edit | Post #282987 |
Post edited: |
— | about 3 years ago |
Edit | Post #283972 |
Post edited: |
— | about 3 years ago |
Edit | Post #283966 |
Post edited: |
— | about 3 years ago |
Comment | Post #283966 |
@#53607 Pretty much. (more) |
— | about 3 years ago |
Comment | Post #283966 |
@#53503 Okay, sorry about that. Sure, I'll stop. Maybe self-answer only once for now. (more) |
— | about 3 years ago |
Edit | Post #283972 |
Post edited: |
— | about 3 years ago |
Edit | Post #283972 |
Post edited: |
— | about 3 years ago |
Edit | Post #283972 | Initial revision | — | about 3 years ago |
Answer | — |
A: "Hello, {name}!" [Ruby], 24 21 18 bytes p"Hello, #{gets}!" Try it online! Golfed down 3 bytes thanks to @snail's advice. Golfed down 3 bytes thanks to @south's advice. (more) |
— | about 3 years ago |
Edit | Post #283969 |
Post edited: |
— | about 3 years ago |