Activity for Razetime
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #287530 | Initial revision | — | 4 months ago |
Answer | — |
A: Encode with ROT13.5 Stax, 15 bytes ⌐♪aù¢φσX▀┼╜°«↕j Run and debug it (more) |
— | 4 months ago |
Edit | Post #287310 | Initial revision | — | 5 months ago |
Answer | — |
A: Knight safe squares APL(Dyalog Unicode), 64 bytes SBCS ``` {64-≢∪x,u/⍨∧/¨(>∘0∧<∘9)u←⊃,/(a/⍨2|+/¨|a←,∘.,⍨1 2,-1 2)∘+∘⊂¨x←⍸⍵} ``` Try it on APLgolf! A dfn which takes a boolean grid. (more) |
— | 5 months ago |
Edit | Post #287208 |
Post edited: |
— | 6 months ago |
Edit | Post #287208 |
Post edited: |
— | 6 months ago |
Edit | Post #287208 | Initial revision | — | 6 months ago |
Answer | — |
A: Lowercase, but not just the letters APL (Dyalog APL), 42 bytes ```apl {⎕UCS⊢2⊥1@2⊢(7⍴2)⊤⎕UCS⍵} ```` Attempt This Online! In APL, base encoding(`⊤`) returns a matrix, so setting the lowercase bit is very easy with `1@2`, setting the entire second row to 1. (more) |
— | 6 months ago |
Edit | Post #287206 | Initial revision | — | 6 months ago |
Answer | — |
A: Mediocre pop count APL (Dyalog APL), 61 bytes ``` {⍵/⍨(⊢∊⌊/,⌈/)+⌿0 1↓2⊥⍣¯1⊢0,⎕UCS⍵} ```` Attempt This Online! APL's style of filter works very well here, since we can check for the max and min elements here: ``` (⊢∊⌊/,⌈/) ``` and filter using the boolean mask later: ``` ⍵/⍨ ``` (more) |
— | 6 months ago |
Edit | Post #287148 |
Post edited: |
— | 6 months ago |
Edit | Post #287148 | Initial revision | — | 6 months ago |
Answer | — |
A: The holeyest base Ruby, 77 bytes ->x{(2..16).maxby{x.tos(1).chars.sum{|y|"".bytes[y.hex]}}} Attempt This Online! (more) |
— | 6 months ago |
Edit | Post #287120 |
Post edited: correct link to bytes |
— | 6 months ago |
Suggested Edit | Post #287120 |
Suggested edit: correct link to bytes (more) |
helpful | 6 months ago |
Comment | Post #287033 |
Older ideas were to allow the challenge creator to move their challenges over to the Q&A section. I don't think codidact has this functionality yet, so deleting is a good option. We can ask for the mods to help with this cleanup, and start delete votes on any finalized sandbox posts. (more) |
— | 6 months ago |
Comment | Post #286989 |
oh, sorry for the confusion. I've added the extra possible output. (more) |
— | 6 months ago |
Edit | Post #286989 |
Post edited: add to overlapping |
— | 6 months ago |
Edit | Post #286989 |
Post edited: |
— | 6 months ago |
Comment | Post #286989 |
ok, added to the question. (more) |
— | 7 months ago |
Edit | Post #286989 |
Post edited: |
— | 7 months ago |
Comment | Post #286989 |
sure, i'll make one but i'll have to label it as only one of the potential solutions.
(more) |
— | 7 months ago |
Edit | Post #286989 | Initial revision | — | 7 months ago |
Question | — |
Mark my beacons Given a grid of numbers, mark the concentric areas around nonzero elements (beacons) decreasing from the value of the beacon till 1. For example, here are some grids with a single beacon: Size 1: ``` 0 0 0 0 0 0 0 1 0 -> 0 1 0 0 0 0 0 0 0 ``` Size 2: ``` 0 0 0 1 1 1 0 2 0 -> 1... (more) |
— | 7 months ago |
Edit | Post #286967 | Initial revision | — | 7 months ago |
Article | — |
Mark my beacons Given a grid of numbers, mark the concentric areas around nonzero elements (beacons) decreasing from the value of the beacon till 1. For example, here are some grids with a single beacon: Size 1: ``` 0 0 0 0 0 0 0 1 0 -> 0 1 0 0 0 0 0 0 0 ``` Size 2: ``` 0 0 0 1 1 1 0 2 0 -> 1... (more) |
— | 7 months ago |
Comment | Post #286855 |
From the [wikipedia article](https://en.wikipedia.org/wiki/Harshad_number) it seems to have come the name of a mathematician who was discussing number theory. (more) |
— | 8 months ago |
Comment | Post #286855 |
nah, first n. Having it that flexible is weird imo, so I draw the line at index origin. (more) |
— | 8 months ago |
Edit | Post #286855 |
Post edited: |
— | 8 months ago |
Edit | Post #286855 | Initial revision | — | 8 months ago |
Question | — |
Find n Niven Numbers Challenge A Niven number is a positive integer which is divisible by the sum of its digits. For example, `81 -> 8+1=9 -> 81%9=0`. Your task is to find the first `n` Niven numbers, given `n`. Tests Reference implementation(takes input) first 16 values: ``` 0 => 1 1 => 2 2 => 3 3 =... (more) |
— | 8 months ago |
Comment | Post #286603 |
1. Yes, the challenge is feasible in both ordinary languages and esolangs. A challenge like this will inevitably alienate a few languages and that is ok.
2. No, it is fine. Testing the limits of a language under uniqueness is the goal of this problem, and it's fine. If you allow a few important char... (more) |
— | 9 months ago |
Comment | Post #286637 |
`set(x)` → `{*x}` (more) |
— | 9 months ago |
Edit | Post #286630 | Initial revision | — | 9 months ago |
Question | — |
Make a frequency table (histogram) Challenge Given an array in any suitable format, create a frequency table for it. i.e: Pair each unique element with the number of times it appears in the array. You can return the frequency table as a list of pairs, hashmap/dictionary, output the pairs directly, etc. Tests ``` { 1 1 2... (more) |
— | 9 months ago |
Edit | Post #286629 | Initial revision | — | 9 months ago |
Article | — |
Make a frequency table (histogram) Challenge Given an array in any suitable format, create a frequency table for it. i.e: Pair each unique element with the number of times it appears in the array. You can return the frequency table as a list of pairs, hashmap/dictionary, output the pairs directly, etc. Tests ``` { 1 1 2... (more) |
— | 9 months ago |
Edit | Post #285924 |
Post edited: |
— | 11 months ago |
Edit | Post #286413 | Initial revision | — | 11 months ago |
Answer | — |
A: Does Looping Counter qualify as kolmogorov-complexity? No Your logic is correct. kolmogorov-complexity requires for the same constant fixed output across all solutions. This is not a static pattern, since it runs forever, so it doesn't fall under that umbrella. Allowing for a flexible character wouldn't really disqualify a question from kolmogorov co... (more) |
— | 11 months ago |
Comment | Post #286363 |
BQN has an [SBCS](https://github.com/mlochbaum/BQN/blob/master/commentary/sbcs.bqn), so yes (more) |
— | 11 months ago |
Edit | Post #286367 | Initial revision | — | 11 months ago |
Answer | — |
A: Rules for function submissions General requirements You need to have all the code that is necessary to create the function within your submission. For most languages, this may include the syntax for defining the name and argument list of the function, and delimiters for the function body. Some languages have first class fun... (more) |
— | 11 months ago |
Edit | Post #286366 | Initial revision | — | 11 months ago |
Question | — |
Rules for function submissions What are our rules for function submission? What constitutes a function, and what makes a submission valid? Language agnostic answers are allowed. (more) |
— | 11 months ago |
Comment | Post #286363 |
5 bytes: `⋈⥊↕∘×` (more) |
— | 11 months ago |
Comment | Post #286359 |
Oh, I see. I'll add this in a Meta post later, but the main rules for function submissions are as follows: You need to have all the code that is necessary to create the function within your submission. Some languages have first class functions, so they can just put the value in a submission and ask m... (more) |
— | 11 months ago |
Comment | Post #286359 |
Where are `m` and `n` coming from here? (more) |
— | 11 months ago |
Comment | Post #286360 |
You will need to change the answer to take `m` and `n` only. `m*n` is not an allowed argument. (more) |
— | 11 months ago |
Edit | Post #286354 | Initial revision | — | 11 months ago |
Question | — |
Create a range grid This challenge is based on the `i.` verb from J. A range grid is basically a range of `m × n` numbers fit into a rectangular grid with `m` rows and `n` columns. A `2×3` range grid would be: ``` 0 1 2 3 4 5 ``` Challenge Generate a range grid, given `m` and `n`. You can display it, ... (more) |
— | 11 months ago |
Edit | Post #286325 | Initial revision | — | 11 months ago |
Article | — |
Create a range grid A range grid is basically a range of `m × n` numbers fit into a rectangular grid with `m` rows and `n` columns. A `2×3` range grid would be: ``` 0 1 2 3 4 5 ``` Challenge Generate a range grid, given `m` and `n`. You can display it, or return an array. This is `code-golf`. Shortest ... (more) |
— | 11 months ago |
Edit | Post #286295 |
Post edited: |
— | 11 months ago |
Edit | Post #286295 |
Post edited: |
— | 11 months ago |
Comment | Post #286295 |
Good idea! I've used a similar idea in my edit. (more) |
— | 11 months ago |
Edit | Post #286295 | Initial revision | — | 11 months ago |
Answer | — |
A: Looping counter Haskell, 35 bytes main=mapM putStrLn$iterate('':)"" Attempt This Online! 55 -> 39, with orthoplex's idea. 39 -> 35 from orthoplex. (more) |
— | 11 months ago |
Edit | Post #286015 |
Post edited: |
— | about 1 year ago |
Edit | Post #286015 | Initial revision | — | about 1 year ago |
Answer | — |
A: Keyword golfing BQN, 107 bytes ``` A↩C←A⇐¯π{𝕣:@;/⊏𝕩.y?𝕗‿∊𝕊⟨𝕤,⍷⟩𝕏𝕎𝔽𝕨𝔾𝕘}∞˙⌜˘¨´˝`(•Js⎉⊔⎊⌽⌾⍉⚇«∘»·∧○∨⍋⍒↑↓≍∾˜⥊⋈↕⊢⍟⊣¬!|≡≢/≥⟜≠=⊸≥⊐⊘⊒◶⊑><⌊⌈√⁼⋆+-×÷)⋄# ``` BQN doesn't have keywords but primitive symbols are reserved. It's quite funny how this manages to compile. (more) |
— | about 1 year ago |
Suggested Edit | Post #285924 |
Suggested edit: (more) |
helpful | about 1 year ago |
Edit | Post #285888 |
Post edited: |
— | about 1 year ago |
Suggested Edit | Post #285888 |
Suggested edit: (more) |
helpful | about 1 year ago |
Comment | Post #285893 |
First time i've seen ESCR on a code golf site. Nice answer and explanation! (more) |
— | about 1 year ago |
Edit | Post #285880 | Initial revision | — | about 1 year ago |
Question | — |
Can you give me half? Challenge idea taken from: Eliseo D'Annunzio Task Provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, double, etc), not as a string. The catch, the characters 0 through to 9 cannot be used. One examp... (more) |
— | about 1 year ago |
Comment | Post #285743 |
This answer is not correct. You need to get 15625 as an output given your testcase. (more) |
— | about 1 year ago |
Edit | Post #285675 | Initial revision | — | about 1 year ago |
Article | — |
Compute T-shirt size WIP. You will be given an ascii-art T shirt. ``` / \/ \ |/| |\| || ``` this is the basic structure. the challenge will be about getting the size as a string (XS, S, M, L, XL, XXL) (more) |
— | about 1 year ago |
Edit | Post #285510 | Initial revision | — | about 1 year ago |
Answer | — |
A: Determine whether an integer is square-free BQN, 13 bytesSBCS ```none ∧´0≠⊢|˜·×˜2+↕ ``` Run online! A train submission. It's 2 bytes shorter than the lambda version `{∧´0≠𝕩|˜×˜2+↕𝕩}`, due to omitting curly braces. The idea is similar to ruby: - range 2..n+1 - square it, then modulo n - are all remainders ≠ 0? (more) |
— | about 1 year ago |
Comment | Post #285477 |
[relevant oeis](http://oeis.org/A005117) (more) |
— | about 1 year ago |
Edit | Post #285471 | Initial revision | — | about 1 year ago |
Answer | — |
A: How can we grow this community? Questions The most important thing to gain traffic in a code golf site is having good questions. SE code golf has 12,718 questions(and counting), and many people are still actively posting questions in there, so it gets a sizeable amount of traffic for answers. Good questions get more votes since co... (more) |
— | about 1 year ago |
Comment | Post #285064 |
Recently there have been newer endeavours to allow online code execution like https://ato.pxeger.com/, so even though it is tempting to use TIO now, it will likely fall out of favour due to lack of updation. (more) |
— | about 1 year ago |
Comment | Post #285404 |
even shorter is `puts"p #{gets}+gets.to_i"` since `p` doesn't make a difference for numbers (more) |
— | about 1 year ago |
Edit | Post #285139 | Initial revision | — | over 1 year ago |
Question | — |
Find the IP address class Task Given an IP address as a string, find its IP address class. For reference, here is a table: Class Leadingbits Numberof networks Addressesper network Total addressesin class Start address End address Class A 0 128 (27) 16,777,216 (224) 2,147,483,648 (231) 0.0.0.0 ... (more) |
— | over 1 year ago |
Edit | Post #284777 |
Post edited: |
— | over 1 year ago |
Comment | Post #284777 |
the string will always be a valid ip address, so there will be no whitespace. (more) |
— | over 1 year ago |
Comment | Post #284777 |
I've edited the question to clarify these (more) |
— | over 1 year ago |
Edit | Post #284777 |
Post edited: |
— | over 1 year ago |
Comment | Post #284777 |
yup this is ipv4 (more) |
— | over 1 year ago |
Edit | Post #284777 |
Post edited: |
— | over 1 year ago |
Edit | Post #284777 |
Post edited: |
— | over 1 year ago |
Edit | Post #284777 | Initial revision | — | over 1 year ago |
Article | — |
Find the IP address class [FINALIZED] Task Given an IP address as a string, find its IP address class. For reference, here is a table: Class Leadingbits Numberof networks Addressesper network Total addressesin class Start address End address Class A 0 128 (27) 16,777,216 (224) 2,147,483,648 (231) 0.0.0.0 ... (more) |
— | over 1 year ago |
Comment | Post #284268 |
[Wheat Wizard on SE Chat:](https://chat.stackexchange.com/transcript/message/59203474#59203474) It could use `mod` instead of `cycle` to save 2 bytes. (more) |
— | over 1 year ago |
Edit | Post #284267 | Initial revision | — | over 1 year ago |
Question | — |
The Ludic Numbers The Ludic Numbers are a sequence that pops up when you apply the sieve of eratosthenes to the natural numbers, completely removing the numbers every iteration. Here is how they are generated: The Ludic numbers start with the lists: ``` l = [1] n = [2,3,4,5,6,7,8,9,10....] ``` Every itera... (more) |
— | over 1 year ago |
Edit | Post #284221 |
Post edited: |
— | over 1 year ago |
Edit | Post #284221 | Initial revision | — | over 1 year ago |
Article | — |
The Ludic Numbers[FINALIZED] The Ludic Numbers are a sequence that pops up when you apply the sieve of eratosthenes to the natural numbers, completely removing the numbers every iteration. Here is how they are generated: The Ludic numbers start with the lists: ``` l = [1] n = [2,3,4,5,6,7,8,9,10....] ``` Every itera... (more) |
— | over 1 year ago |
Edit | Post #284198 | Initial revision | — | over 1 year ago |
Answer | — |
A: Collatz conjecture; Count the tries to reach $1$ [BQN], 31 28 bytes {1+(1≠𝕩)◶¯1‿𝕊2(|⊑÷˜∾1+3×⊢)𝕩} Try it online! An anonymous function which takes a number. the `¯1` branch is a bit tacky but saves a byte over `(1+𝕊)`. (more) |
— | over 1 year ago |
Comment | Post #279434 |
errors are ok as long as the correct output is on STDOUT. (more) |
— | over 1 year ago |
Comment | Post #284102 |
18 bytes: [Try it online!](https://tio.run/##yyr8/z9aQ69YX0lJMzpWSy8vtiYxJeX//2ouBQWlYiUrJY/UnJx8hfD8opwUJR2QYJ6SlRFXLQA "jq – Try It Online") (more) |
— | over 1 year ago |
Comment | Post #283989 |
No, all the outputs should be in the same format. (more) |
— | over 1 year ago |
Comment | Post #284102 |
you can use `add` in place of join. (more) |
— | over 1 year ago |
Edit | Post #284071 | Initial revision | — | over 1 year ago |
Answer | — |
A: Digit Sum Integer Sequence (working title) [jq], 38 bytes while(1;.+("\(.)"|explode|max+min-96)) Try it online! prints the infinite sequence starting with \$n\$. (more) |
— | over 1 year ago |
Edit | Post #284067 | Initial revision | — | over 1 year ago |
Answer | — |
A: Stairs? Stairs! Stairs. Stax, 8 bytes Ç▐GcΦ≡◘¶ Run and debug it Uses spaces as the staircase fill. (more) |
— | over 1 year ago |
Edit | Post #283858 |
Post edited: |
— | over 1 year ago |
Suggested Edit | Post #283858 |
Suggested edit: (more) |
helpful | over 1 year ago |
Edit | Post #284007 | Initial revision | — | over 1 year ago |
Answer | — |
A: My house is destroyed! Can you make me one? [Charcoal], 7 bytes GH↑→↓N# Try it online! Link is to verbose version of code. `PolygonHollow` exactly fits this challenge. > Prints a polygon with sides in x, all with length y, and the z used for the sides, repeating from the origin. Polygon is not autoclosed or filled. (more) |
— | over 1 year ago |
Comment | Post #283790 |
7 bytes: `#*⌐⤢n↔n` (more) |
— | over 1 year ago |
Comment | Post #283751 |
just a JSON array of quoted strings, or quoted strings on multiple lines (more) |
— | over 1 year ago |
Comment | Post #283790 |
8 bytes: `#*#╴»×+│`
(more) |
— | over 1 year ago |
Comment | Post #283751 |
Is a list of lines allowed as output?
(more) |
— | over 1 year ago |
Comment | Post #283989 |
leading zeroes are not allowed in the output. (more) |
— | over 1 year ago |
Edit | Post #283989 | Initial revision | — | over 1 year ago |
Question | — |
When The Ternary Is Balance Inspired by this Rosetta Code article. Introduction Balanced Ternary is a method of representing integers using -1, 0 and 1 in base 3. Decimal 11 = (1 32) + (1 31) + (−1 30) = [1,1,-1] or "++-" Decimal 6 = (1 32) + (−1 31) + (0 30) = [1,-1,0] or "+-0" Task Given any integer, y... (more) |
— | over 1 year ago |
Edit | Post #283874 |
Post edited: |
— | over 1 year ago |
Edit | Post #283977 | Initial revision | — | over 1 year ago |
Answer | — |
A: "Hello, {name}!" [jq], 14 bytes "Hello, \(.)!" Try it online! jq has expression interpolation, pretty epic! (more) |
— | over 1 year ago |
Comment | Post #283973 |
-1 changing to `n*=i` (more) |
— | over 1 year ago |
Edit | Post #283874 |
Post edited: |
— | over 1 year ago |
Edit | Post #283874 |
Post edited: |
— | over 1 year ago |
Edit | Post #283953 |
Post edited: |
— | over 1 year ago |
Edit | Post #283953 | Initial revision | — | over 1 year ago |
Answer | — |
A: Make my value binary [jq], 48 bytes [while(.>0;./2|floor)]|map(.%2)|reverse|join("") Try it online! jq is the Language of the month for September! if the output is not required as per the question, `join` can be omitted. (more) |
— | over 1 year ago |
Comment | Post #283874 |
Sure, will add some. (more) |
— | over 1 year ago |
Edit | Post #283874 | Initial revision | — | over 1 year ago |
Article | — |
Balance my ternary[FINALIZED] Inspired by this Rosetta Code article. Introduction Balanced Ternary is a method of representing integers using -1, 0 and 1 in base 3. Decimal 11 = (1 32) + (1 31) + (−1 30) = [1,1,-1] or "++-" Decimal 6 = (1 32) + (−1 31) + (0 30) = [1,-1,0] or "+-0" Task Given any integer, y... (more) |
— | over 1 year ago |
Edit | Post #283784 | Initial revision | — | over 1 year ago |
Answer | — |
A: Make $2 + 2 = 5$ [Husk], 7 bytes +±Λ=2¹Σ Try it online! Input as a list. (more) |
— | over 1 year ago |
Comment | Post #283305 |
just create a comment thread on the question named Trivial Builtins and post your answer under there. (more) |
— | over 1 year ago |
Comment | Post #283305 |
hm, I guess you can post trivial answers in a separate thread. (more) |
— | over 1 year ago |
Edit | Post #283343 | Initial revision | — | over 1 year ago |
Answer | — |
A: Getting perfect squares, differently [Husk], 3 bytes ∫İ1 Try it online! Scan from left over all odd numbers with addition. Uses this formula: $$ n^2 = \sum{k=1}^n(2k-1) $$ (more) |
— | over 1 year ago |
Edit | Post #283108 |
Post edited: |
— | over 1 year ago |
Comment | Post #283312 |
they're correct by the definition of truthy and falsy values in husk. (more) |
— | over 1 year ago |
Comment | Post #283312 |
You don't need signum (more) |
— | over 1 year ago |
Edit | Post #283305 | Initial revision | — | over 1 year ago |
Question | — |
Are All Elements Equal? Challenge Given a list of integers >= 0 , check if all of them are equal. Tests ``` [1,1,1,1,1] -> true [0,1,1,6,7] -> false [1] -> true [] -> undefined(you do not need to handle this) ``` You may take the integers in any form(strings, list, codepoints, etc.) Yo... (more) |
— | over 1 year ago |
Edit | Post #283303 |
Post edited: |
— | over 1 year ago |
Edit | Post #283303 |
Post edited: |
— | over 1 year ago |
Edit | Post #283303 | Initial revision | — | over 1 year ago |
Answer | — |
A: Reduce over the range [1..n] BQN, 8 bytes ``` {𝔽´1+↕𝕩} ``` Try it! basic fold builtin version. Use as a dyadic 1-modifier. Longer than APL since evaluated output is shorter than using first class functions. A more fun recursive implementation without fold: ``` {1𝔽{(𝕨𝔽⊑𝕩)(1A previous(wrong) version of this expo... (more) |
— | over 1 year ago |
Comment | Post #283179 |
Fixed that thing as well (more) |
— | over 1 year ago |
Edit | Post #283179 |
Post edited: |
— | over 1 year ago |
Comment | Post #283179 |
Just fixed it, prepended a 0 (more) |
— | over 1 year ago |
Edit | Post #283179 |
Post edited: |
— | over 1 year ago |
Edit | Post #283180 | Initial revision | — | over 1 year ago |
Answer | — |
A: Should [code-golf-tips] be replaced with [tips] + [code-golf]? Yes tips is a sort of prefix tag, and code-golf-tips is a superfluous tag. I think it it worth keeping them separate because tips is already very flexible. (more) |
— | over 1 year ago |
Edit | Post #283179 | Initial revision | — | over 1 year ago |
Answer | — |
A: It's Hip to be Square [Husk], 5 bytes ±£Θİ□ Try it online! similar to haskell, checks if the number is in the infinite list of squares. (more) |
— | over 1 year ago |
Comment | Post #283166 |
It is generally a good idea to have different questions from what is already on the SE site, since unique content helps boost codidact on search engines. That being said, having more questions isn't necessarily a bad thing. (more) |
— | over 1 year ago |
Comment | Post #283107 |
Haker's crack is still correct, so no (more) |
— | over 1 year ago |
Edit | Post #283157 | Initial revision | — | over 1 year ago |
Answer | — |
A: Guess the language! (Robbers' Thread) Cracks Lundin's answer: [C++ (gcc)] %: %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) )) %: main() Try it online! (more) |
— | over 1 year ago |
Edit | Post #283156 | Initial revision | — | over 1 year ago |
Answer | — |
A: Guess the language! (Robbers' Thread) Cracks Shaggy's answer: Japt ((Cops)&(Robbers))`¬ps d bÞ`¸ËhDÎmEgviuø Test it (more) |
— | over 1 year ago |
Comment | Post #283138 |
Cracked: [C++](https://tio.run/##Hc7dasMwDAXg@z6FaNGI6dl2L0J2sTfoGzj@ad06jhs77PEzJwgOkhDoMzl/3o3ZLiGZuFpH/Rhq@S7Vmuv16zFsLCcWss6H5MjMuXQaIwwsHDzueCDgiRciJiTMyHhjQUFVFHyX5kpex@JIJ0svFha/h90jdh90XNRldYr6tgosT5Z2F890ZpmOTCwzS2Z5sywshaXKQEr1zEPDnSYdUtemQ/fXRBq1CdZm@cHvYSpo/3Fr/djK7ULFw7b9Aw "C++ (gcc) – ... (more) |
— | over 1 year ago |
Comment | Post #283107 |
the actual language is [Rockstar](https://codewithrockstar.com/online) (more) |
— | over 1 year ago |
Edit | Post #283108 |
Post edited: |
— | over 1 year ago |
Comment | Post #283108 |
thanks, I'll change it (more) |
— | over 1 year ago |
Edit | Post #283108 | Initial revision | — | over 1 year ago |
Article | — |
Are All Elements Equal?[FINALIZED] Challenge Given a list of integers >= 0 , check if all of them are equal. Tests ``` [1,1,1,1,1] -> true [0,1,1,6,7] -> false [1] -> true [] -> undefined(you do not need to handle this) ``` You may take the integers in any form(strings, list, codepoints, etc.) Yo... (more) |
— | over 1 year ago |
Comment | Post #283103 |
[this is the default loophole.](https://codegolf.meta.stackexchange.com/a/1071/80214) (more) |
— | over 1 year ago |
Edit | Post #283103 |
Post edited: |
— | over 1 year ago |
Edit | Post #283103 | Initial revision | — | over 1 year ago |
Answer | — |
A: Answering challenges with languages newer than the challenge Languages made specifically for a challenge after it was published This is the general problem with allowing languages newer than the challenge. This is already considered a standard loophole, and the `might be downvoted anyway...` point will apply. Some questions heavily benefit from this(cops... (more) |
— | over 1 year ago |
Comment | Post #283074 |
"I suspect that them being different lengths is integral to the challenge." correct, that is part of the challenge. (more) |
— | over 1 year ago |
Comment | Post #282821 |
I think it is better to say "the area where the source code is stored should adhere to the question requirements" (more) |
— | over 1 year ago |
Comment | Post #283012 |
65 bytes : https://tio.run/##ZZDBSgMxEIbveYoxB5PIbnKXbg@FhV6kIHsQjKZRt1JZ22Wzxarx2deMzfTiHMI/Xz5mYIbD0@e0qaZyHgr/fR/0c7sb20F2ldfvvpeX12H71aqUj6q48gVfrJpmdQNNfdfws6wefiY/jFDBbFaKZX1bCx36bjtKbndcMcjl/pIuSwERo3HOPUKETDWJ6sQMPjbD1CRo1qdOZBc9kcaRTbqllXk6RJpjyc2KsZHWJmJEmWqNf4ZwjJEEC2dZSqIY/7sY2dtrwEnGyQwx... (more) |
— | over 1 year ago |
Edit | Post #282972 |
Post edited: |
— | over 1 year ago |
Edit | Post #283011 | Initial revision | — | over 1 year ago |
Question | — |
Gamer Meme Creator Challenge You will be given a string and an ascii art as input. - The string must be placed above the ascii art, and centered based on its longest line. - The text `BOTTOM TEXT` must be placed below the art and centered based on the ascii art's longest line. The centering can be biased toward... (more) |
— | over 1 year ago |
Comment | Post #282982 |
[Japt](https://tio.run/##AT0Awv9qYXB0//8oKENvcHMpJihSb2JiZXJzKSlgwqxwcyDChGQgwp5iw54EYMK4w4toRMOObUVndml1w4PCuP// "Japt – Try It Online") lmao (more) |
— | over 1 year ago |
Comment | Post #282972 |
hm, no. Part of the challenge is finding the longest length line of the ascii art. (more) |
— | over 1 year ago |
Comment | Post #282971 |
Imagine writing a simple bot and then you see someone else is literally writing linear regression (more) |
— | over 1 year ago |
Edit | Post #282972 | Initial revision | — | over 1 year ago |
Article | — |
Gamer Meme Creator[FINALIZED] Challenge You will be given a string and an ascii art as input. - The string must be placed above the ascii art, and centered based on its longest line. - The text `BOTTOM TEXT` must be placed below the art and centered based on the ascii art's longest line. The centering can be biased toward... (more) |
— | over 1 year ago |
Edit | Post #282907 | Initial revision | — | over 1 year ago |
Answer | — |
A: Caesar shift cipher [Ruby], 56 bytes ->s,i{a=[?a..?z].rotate(i)"";s.tr "A-Za-z",a.upcase+a} Try it online! `tr` is wildly useful here. Builds the tr string manually and replaces only the alphabets. (more) |
— | over 1 year ago |
Comment | Post #282844 |
Ruby has `-r<lib>` to require a library outside the code and it also gets affected by this. I think it should be counted the same way since it's a full flag. There's some programming happening outside the program but it's already established that it effectively converts the answer to a different lang... (more) |
— | over 1 year ago |
Edit | Post #282906 | Initial revision | — | over 1 year ago |
Answer | — |
A: How free is "free" for cops and robbers? Free as in usable on a free platform "free" meaning there must be a downloadable interpreter available for the language which can run the program with the required features, on an online/offline service with no software limitations(time, number of executions, etc). (more) |
— | over 1 year ago |
Edit | Post #282679 | Initial revision | — | over 1 year ago |
Answer | — |
A: Multiply complex numbers. [Ruby], 35 bytes ->a{a.split.map{eval 1}.reduce :} Try it online! Right tool for the job, I suppose. uses ruby 2.7+ features, so tio link will look different. (more) |
— | over 1 year ago |
Comment | Post #282630 |
maybe choose the first `<code>` block if there's no `<pre>` block in the answer? (more) |
— | over 1 year ago |
Comment | Post #282630 |
I found it on [the pell numbers](https://codegolf.codidact.com/posts/280828) (more) |
— | over 1 year ago |
Edit | Post #282630 | Initial revision | — | over 1 year ago |
Question | — |
Leaderboard bug: recognizing inline code blocks There's a small problem with the leaderboard: Shaggy n It seems to be recognizing the first `` block in the answer rather than the first `` block in the answer. The byte count is correct since it's taken from the title. (more) |
— | over 1 year ago |
Edit | Post #282617 |
Post edited: |
— | over 1 year ago |
Edit | Post #282617 |
Post edited: |
— | over 1 year ago |
Comment | Post #282241 |
i don't think you need the tags for the text to display. (more) |
— | over 1 year ago |
Edit | Post #282617 | Initial revision | — | over 1 year ago |
Answer | — |
A: Add two negabinary integers [Ruby], 75 bytes ->t,u{g=->a{a.reduce{-21+2}};('%b'%(g[t]+g[u]+(y=43690)^y)).toi.digits} Try it online! Uses latest ruby features, so tio link will look different. Takes two digit arrays, and returns an array which represents the negabinary integer. Borrows from a conversion... (more) |
— | over 1 year ago |
Comment | Post #280753 |
it's here: https://codegolf.codidact.com/posts/280828 (more) |
— | over 1 year ago |
Comment | Post #282511 |
I want to bounty this so bad (more) |
— | over 1 year ago |
Comment | Post #282491 |
since the leaderboard notices the `+` as a flag addition, it may be better to have a naming convention replacing such a thing with `-` or `:` (more) |
— | over 1 year ago |
Edit | Post #282503 | Initial revision | — | over 1 year ago |
Answer | — |
A: Shuffle a subset of a list APL(Dyalog Unicode), 13 bytes SBCS ``` {⍵[?⍨≢⍵]}@⎕⊢⎕ ``` Try it on APLgolf! A tradfn submission which takes both lists on STDIN, second input is 1-indexed. (more) |
— | over 1 year ago |
Comment | Post #282483 |
Adding extra library counts acts similar to a flag, and many challenges which require specialized output(graphical ones especially) require libraries because the language wouldn't be able to compete without it, so it is definitely encouraged to do so. (more) |
— | over 1 year ago |
Edit | Post #282462 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Leaderboards are live Few QoL improvements can be made: Some trivial challenges(i.e. "Hello World!") get many, many answers, so the leaderboard should show a scrollbar beyond some point(after the first 10 submissions, maybe?). Another thing I'd like to see is the ability to hide the leaderboard, preferably by click... (more) |
— | almost 2 years ago |
Edit | Post #282461 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Evens or Odds - you know this one [MAWP], 8 bytes ``` @!2P2WA: ``` Try it! 1 for odd and zero for even. mawp doesn't have modulus, so it floor divides by 2, multiplies by 2 and subtracts from the input. (more) |
— | almost 2 years ago |
Comment | Post #282345 |
This is a kind of interesting source-layout challenge, but i think you need more restrictions(i.e. line length must be divisible by 5 or 3) and you need to be more stringent with the restrictions(aka, line numbers are always enforced from beginning of file) (more) |
— | almost 2 years ago |
Comment | Post #282334 |
this is *extremely* trivial in most languages and is oftentimes a very basic elementary operation in challenges. (more) |
— | almost 2 years ago |
Comment | Post #281572 |
no, fractions are mandatory. (more) |
— | almost 2 years ago |
Comment | Post #282301 |
(the same applies to the chars in between as well) (more) |
— | almost 2 years ago |
Comment | Post #282301 |
The last line should be `HelloolleH`, not `HellolleH` (more) |
— | almost 2 years ago |
Edit | Post #282280 |
Post edited: fix last test case minus |
— | almost 2 years ago |
Edit | Post #282285 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Word Count Tool [Ruby], 55 bytes ->a{[a.split,a.tr($/,''),a.gsub(/[ ]/,'')].map &:size} Try it online! `split` removes all whitespace, but `lines` doesn't for some reason. Would've been useful in place of the `tr`. (more) |
— | almost 2 years ago |
Suggested Edit | Post #282280 |
Suggested edit: fix last test case minus (more) |
helpful | almost 2 years ago |
Comment | Post #282260 |
`Π` (product) may help with your `u⌐` method to save some instructions. (more) |
— | almost 2 years ago |
Edit | Post #282247 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Are they abundant, deficient or perfect? [Husk], 10 bytes kSo±-ȯΣhḊḣ Try it online! `keyon` is very nice here, but it's still a bit too long, sadly. (more) |
— | almost 2 years ago |
Comment | Post #281962 |
[twins](https://codegolf.stackexchange.com/a/169388/80214)
(more) |
— | almost 2 years ago |
Edit | Post #282153 | Initial revision | — | almost 2 years ago |
Question | — |
Diagonalized alphabet Task Print the following: ``` ABDFHJLNPRTVXZ CABDFHJLNPRTVX ECABDFHJLNPRTV GECABDFHJLNPRT IGECABDFHJLNPR KIGECABDFHJLNP MKIGECABDFHJLN OMKIGECABDFHJL QOMKIGECABDFHJ SQOMKIGECABDFH USQOMKIGECABDF WUSQOMKIGECABD YWUSQOMKIGECAB ``` and nothing else. You may return a multiline string o... (more) |
— | almost 2 years ago |
Edit | Post #282130 |
Post edited: |
— | almost 2 years ago |
Edit | Post #282130 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Evaluation order of an APL n-train [Husk], 8 bytes ηÖ↔mo⌈½ŀ Try it online! Same idea as xash's answer from CGCC. (more) |
— | almost 2 years ago |
Edit | Post #281980 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Backspace an array [Husk], 6 bytes Fo+hx0 Try it online! there's got to be a smarter way to do this with grouping. (more) |
— | almost 2 years ago |
Edit | Post #281603 |
Post edited: |
— | almost 2 years ago |
Comment | Post #281608 |
`1/2.0` can be `.5`
(more) |
— | almost 2 years ago |
Edit | Post #281603 |
Post edited: |
— | almost 2 years ago |
Edit | Post #281603 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Juggler sequences [Husk], 11 10 bytes U¡λ⌊^+.%2¹ Try it online! This can probably be trivially ported to Jelly. Explanation ``` U¡o⌊Ṡ^o+.%2 ¡ iterate over the input infinitely, creating a list o with the following two functions: Ṡ^ take the previous result ... (more) |
— | almost 2 years ago |
Edit | Post #281572 |
Post edited: |
— | almost 2 years ago |
Comment | Post #281595 |
I'll change the first test case to your output in `⎕FR←1287⋄⎕PP←34`
(more) |
— | almost 2 years ago |
Comment | Post #281595 |
finding tests for this is a bit of a pain.. everything's in some weird modulo or prime factorization format aaaaa
(more) |
— | almost 2 years ago |
Edit | Post #281572 |
Post edited: |
— | almost 2 years ago |
Comment | Post #281572 |
yeah, I wrote that wrong. It's an infinite loop which cycles through 2^n, where n is prime. (more) |
— | almost 2 years ago |
Edit | Post #281572 |
Post edited: |
— | almost 2 years ago |
Edit | Post #281572 | Initial revision | — | almost 2 years ago |
Question | — |
Golf a FRACTRAN interpreter Description From the Esolangs wiki, In Fractran, - a program consists of a finite list of positive, rational numbers. - The input to a program is a positive integer n. - The list is then searched in order, for a rational number \$p/q\$ such that \$n×p/q\$ is an integer. - Then n is replaced ... (more) |
— | almost 2 years ago |
Edit | Post #281545 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Merge two strings APL(Dyalog Unicode), 26 bytes SBCS ``` {⊃x/⍨⊃¨⍺∘⍷¨x←,∘⍵¨(⊂⍬),,\⍺} ``` Try it on APLgolf! A dfn submission which takes the inputs as left and right argument. I took way too long to come up with this. Fun challenge. (more) |
— | almost 2 years ago |
Edit | Post #281529 |
Post edited: |
— | almost 2 years ago |
Edit | Post #281529 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Make my number a set [JavaScript (V8)], 32 bytes f=n=>[...Array(n).keys()].map(f) Try it online! Somehow it doesn't recurse forever at n=0. Pretty nice. (more) |
— | almost 2 years ago |
Comment | Post #281501 |
doesn't Jelly smash print, removing the need for `F`? (more) |
— | almost 2 years ago |
Edit | Post #281467 |
Post edited: |
— | almost 2 years ago |
Comment | Post #281467 |
whoops sorry bout that (more) |
— | almost 2 years ago |
Edit | Post #281467 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Really Cool Numbers [Husk], 9 bytes ΛöS=⌊AhḊḊ Try it online! or Verify all testcases returns number of divisors + 1 for true and 0 for false. (more) |
— | almost 2 years ago |
Comment | Post #281460 |
[-1](https://tio.run/##SyzI0U2pTMzJT///qG@qp/@jtgkG/9OAZPWjjuX6Gga2hjXa@oe3P@pcpHloheGjtsmHVqQfWqGRDlTxqGPVo65FjzpWPOrdrPmod2vt//9pQDUKRgqmCmYKlgpGpgpGBuZcQDFjAyDLDIgtAA "APL (Dyalog Unicode) – Try It Online") simplifying the inner function. You can also get -2 by converting to a tradfn, since ⍵ is u... (more) |
— | almost 2 years ago |
Comment | Post #281389 |
Using Jelly idea: [29 bytes](https://razetime.github.io/APLgolf/?h=AwA&c=qzayK37UNuFRT4fR4e2Pelc86lz0qHerFRA/6m7RedTb@aht4qOO9kMrijWALKDA0kddTY/aJmsCVdQCAA&f=S1NQdw6JDPIPUOdKU1B39Y90DvHzCwjyBHODQv1d/dyCXR3dfINcPELUAQ&i=S1NQdw6JDPIPUOdKU1B39Y90DvHzCwjyBHODQv1d/dyCXR3dfINcPELUAQ&r=tryAPL&l=apl-dyalog-e... (more) |
— | almost 2 years ago |
Edit | Post #281406 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Beaver Code Decryption APL(Dyalog Extended), 32 bytes SBCS ``` {1=≢⍵:⍵⋄0⍨,⍉↑∇¨↓2 ¯1⍴⍵,0/⍨2|≢⍵} ``` Try it on APLgolf! A dfn submission which takes a string as input. I thought this would be much shorter, but it's only a small improvement over unicode. (more) |
— | almost 2 years ago |
Edit | Post #281405 |
Post edited: |
— | almost 2 years ago |
Edit | Post #281405 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Beaver Code Decryption [Husk], 8 bytes ΣTm?I₀ε½ Try it online! It's jelly but reversed. 1 byte lesser due to a single byte halve. (more) |
— | almost 2 years ago |
Comment | Post #281401 |
The chat says it assumes input length is under some limit?
(more) |
— | almost 2 years ago |
Edit | Post #281382 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Cumulative Counts [Husk], 4 bytes Sz#ḣ Try it online! Explanation ``` Sz#ḣ Sz zip the input ḣ with its prefixes # using the count function (more) |
— | almost 2 years ago |
Comment | Post #281372 |
`1⊥¨⊢=,\` here you go (more) |
— | almost 2 years ago |
Comment | Post #281371 |
and you can preserve the same length by changing `1 1∘⍉` → ` 1 1⍉` (more) |
— | almost 2 years ago |
Comment | Post #279770 |
I think this looks good. Could diagonal lines be a thing? (more) |
— | almost 2 years ago |
Comment | Post #279883 |
welp, feel free to do it this year then. (more) |
— | almost 2 years ago |
Edit | Post #281028 | Initial revision | — | about 2 years ago |
Question | — |
Allow linking account with Code Golf Stack Exchange In my user preferences in "Edit Profile", under the "Link Stack Exchange Account" heading, this shows up: You can't link a Stack Exchange account to your account on this site because there is no associated Stack Exchange site from which to transfer your content. An association with Code Golf Sta... (more) |
— | about 2 years ago |
Edit | Post #280754 |
Post edited: |
— | about 2 years ago |
Edit | Post #280882 |
Post edited: |
— | about 2 years ago |
Edit | Post #280882 | Initial revision | — | about 2 years ago |
Question | — |
Word Set Square Challenge Given a string, e.g. `Hello`, do the following: Mirror it: ``` Hello -> HelloolleH ``` and create a right triangle using it as the sides: ``` H ee l l l l o o o o l l l l e e HelloolleH ``` Which ... (more) |
— | about 2 years ago |
Edit | Post #280863 |
Post edited: |
— | about 2 years ago |
Edit | Post #280863 | Initial revision | — | about 2 years ago |
Answer | — |
A: Ratio limits of fibonacci-like series Stax, 5 bytes òP^↓Φ Run and debug it Same idea as Quintec's answer. Input as a floating point number. Explanation ``` 1gpun+ 1 start with 1 gp apply the following till a fixpoint: u reciprocal n+ add the input (more) |
— | about 2 years ago |
Comment | Post #280839 |
Not sure why short circuiting isn't working here: [Try it online!](https://tio.run/##K6gsycjPM/7/P802JzE3KSVRocJKo8LGKDEvRaFCM79IwUgrTaNC11BTG0QZaf4vKMrMK9FI0zDR1PwPAA "Python 3 – Try It Online") (more) |
— | about 2 years ago |
Comment | Post #280840 |
remove the brackets for -2 (more) |
— | about 2 years ago |
Comment | Post #280840 |
ah ok makes sense (more) |
— | about 2 years ago |
Comment | Post #280840 |
I got [19 bytes](https://razetime.github.io/APLgolf/?h=AwA&c=e9S1SF9HW@/w9Ee9ix/1TX3Uu8JIF0g86pihpw2ie/Y@6t1sBAA&f=AwA&i=S@My4ErjMgRiUwA&r=tio&l=apl-dyalog&m=tradfn&n=f): `⊢/,+.×⍣⎕⍨2-⍨∘.+⍨⌽⍳2` from it (more) |
— | about 2 years ago |
Comment | Post #280840 |
I think your link is wrong, and the program doesn't seem to work correctly (more) |
— | about 2 years ago |
Comment | Post #280840 |
[-1 byte](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@/@lHvVhsjKyD5qLtFW/9RR/uhFUCOrqHOo97NRrX/0x61TXjU2/eoq/lR75pHvVsOrTd@1DbxUd/U4CBnIBni4Rn8Pw2kZbOhAQA "APL (Dyalog Classic) – Try It Online") (more) |
— | about 2 years ago |
Comment | Post #280840 |
[fun matrix multiplication(20)](https://razetime.github.io/APLgolf/?h=AwA&c=M3nU1ayjrXd4@qPexY/6pj7qXWGkYPSod4uRgiEQGgAA&f=AwA&i=S@My4ErjMgRiUwA&r=tio&l=apl-dyalog&m=tradfn&n=f): `4⊃,+.×⍣⎕⍨2 2⍴2 1 1 0` (more) |
— | about 2 years ago |
Comment | Post #280832 |
@Hakerh400 should work correctly now (more) |
— | about 2 years ago |
Edit | Post #280832 |
Post edited: |
— | about 2 years ago |
Edit | Post #280832 | Initial revision | — | about 2 years ago |
Answer | — |
A: Is it a near-anagram? Stax, 12 bytes ä╫◙=♥:≡ƒélΣæ Run and debug it +3 after correcting it(thanks, HakerH) Explanation ``` b%s%>{s}M|-%1= b copy the two inputs %s%> is the first's length < second? {s}M if so, swap the two |- multiset difference % ... (more) |
— | about 2 years ago |
Edit | Post #280753 |
Post edited: finalized |
— | about 2 years ago |
Edit | Post #280828 | Initial revision | — | about 2 years ago |
Question | — |
The Pell Numbers Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: \$Pn=\begin{cases}0&\mbox{if }n=0;\\\\1&\mbox{if }n=1;\\\\2P{n-1}+P{n-2}&\mbox{otherwise.}\end{cases}\$ They also have a closed form: \$Pn=\frac{\left(1+\sqrt2\right)^n-\l... (more) |
— | about 2 years ago |
Comment | Post #280729 |
yep, 6 bytes is possible :P (more) |
— | about 2 years ago |
Edit | Post #280729 |
Post edited: |
— | about 2 years ago |
Comment | Post #280729 |
wow whut, is that documented anywhere?
(more) |
— | about 2 years ago |
Edit | Post #280729 |
Post edited: |
— | about 2 years ago |
Comment | Post #280754 |
Because they are hollow in the middle (more) |
— | about 2 years ago |
Edit | Post #280754 | Initial revision | — | about 2 years ago |
Article | — |
Word Set Square[FINALIZED] Challenge Given a string, e.g. `Hello`, do the following: Mirror it: ``` Hello -> HelloolleH ``` and create a right triangle using it as the sides: ``` H ee l l l l o o o o l l l l e e HelloolleH ``` Which ... (more) |
— | about 2 years ago |
Edit | Post #280753 |
Post edited: |
— | about 2 years ago |
Edit | Post #280753 | Initial revision | — | about 2 years ago |
Article | — |
The Pell Numbers[FINALIZED] Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: \$Pn=\begin{cases}0&\mbox{if }n=0;\\\\1&\mbox{if }n=1;\\\\2P{n-1}+P{n-2}&\mbox{otherwise.}\end{cases}\$ They also have a closed form: \$Pn=\frac{\left(1+\sqrt2\right)^n-\l... (more) |
— | about 2 years ago |
Edit | Post #280751 | Initial revision | — | about 2 years ago |
Answer | — |
A: Solve Goldbach's Conjecture [Husk], 9 bytes ḟo=⁰Σπ2İp Try it online! Explanation ``` ḟo=⁰Σπ2İp İp take the infinite list of primes π2 cartesian power 2 (all possible pairs) ḟo first pair which satisfies: Σ sum = equals ⁰ input? (more) |
— | about 2 years ago |
Edit | Post #280730 | Initial revision | — | about 2 years ago |
Answer | — |
A: Create an Alphabet Diamond Stax, 12 bytes ç ∩<▬%▌ê▓jFo Run and debug it Same method as the Canvas answer. (more) |
— | about 2 years ago |
Edit | Post #280729 | Initial revision | — | about 2 years ago |
Answer | — |
A: Create an Alphabet Diamond Canvas, 10 7 6 bytes Z[]/┼┼ Try it here! Creates the top portion, centers it, and mirrors it. -3 bytes from dzaima's hint. -1, found the 6 byter! Explanation ``` Z[]/++ Z push the alphabet [] get all prefixes / diagonalize by padding each line with ... (more) |
— | about 2 years ago |
Comment | Post #280673 |
[Obligatory Canvas answer](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjNCJXUyNTAyJXVGRjNEJXVGRjUyJXUyNTAwJTVFJXUyMjE5ViV1MjU0Qg__,v=8) (more) |
— | about 2 years ago |
Comment | Post #280646 |
You may want to add some testcases with broken lines i.e. `5 5 ⍴ 1 0 1 1 0 0` (more) |
— | about 2 years ago |
Edit | Post #280612 |
Post edited: added new testcases |
— | about 2 years ago |
Edit | Post #280612 |
Post edited: |
— | about 2 years ago |
Edit | Post #280551 |
Post edited: |
— | about 2 years ago |
Edit | Post #280612 | Initial revision | — | about 2 years ago |
Question | — |
Write a Deadfish Interpreter A rewrite of this SE question with a simpler input format and guidelines. Challenge Deadfish uses a single accumulator, on which all commands are to be performed. It has the following commands: |Command|Description |-|- |`i`|increment the accumulator |`d`|decrement the accumulator |`s... (more) |
— | about 2 years ago |
Comment | Post #280597 |
I was waiting for this one.. (more) |
— | about 2 years ago |
Edit | Post #279253 |
Post edited: |
— | about 2 years ago |
Edit | Post #280551 | Initial revision | — | about 2 years ago |
Article | — |
Write a Deadfish Interpreter[FINALIZED] A rewrite of this question with a simpler input format and guidelines. Challenge Deadfish uses a single accumulator, on which all commands are to be performed. It has the following commands: |Command|Description |-|- |i|increment the accumulator |d|decrement the accumulator |s|square ... (more) |
— | about 2 years ago |
Comment | Post #280408 |
Also, if this is code-golf, there's no need for an alternative scoring tag. (more) |
— | about 2 years ago |
Comment | Post #280408 |
I mean, do unicode alphabets count as alphabetical characters or non alphabet chars? (more) |
— | about 2 years ago |
Comment | Post #280408 |
Where do unicode alphabet characters(`ṙ,ṡ,ṫ`) fit in this? (more) |
— | about 2 years ago |
Comment | Post #280372 |
Ok, I've changed it to take 2D arrays only. (more) |
— | about 2 years ago |
Edit | Post #280372 |
Post edited: |
— | about 2 years ago |
Comment | Post #280372 |
@Quintec I allowed dimensions as a separate input if needed for that reason. Would it make more sense to have 2D arrays only? (more) |
— | about 2 years ago |
Edit | Post #280372 | Initial revision | — | about 2 years ago |
Question | — |
Truthify an array Jelly has an atom called untruth, which when given indices, creates an array with 1s at those places: `[2,4] → [0,1,0,1]`. You are required to perform the inverse of this. Given a 2D boolean array, find the indices of the true values in it. Challenge You will be given a single 2D boolean arr... (more) |
— | about 2 years ago |
Comment | Post #280242 |
@Lundin For more trivial tasks, yes. (more) |
— | about 2 years ago |
Edit | Post #280083 |
Post edited: |
— | about 2 years ago |
Edit | Post #280242 | Initial revision | — | about 2 years ago |
Question | — |
Posting guidelines modifications Currently, the posting guidelines for Code Golf are the defaults on Codidact. Posting Tips: ¶ Your title should be a one sentence summary of your question. ¶ Break different topics up into paragraphs. Multiple paragraphs are easier to read than a wall of text. ¶ Use clear, simple language. Be spec... (more) |
— | about 2 years ago |
Comment | Post #280226 |
@Corsaka You must specify the input format. The testcases are formatted that way for readability. (more) |
— | about 2 years ago |
Edit | Post #280226 | Initial revision | — | about 2 years ago |
Question | — |
Calculate a person's age Challenge Given a date with day, month and year, calculate how old a person born on that day would be today. Input can be in any reasonable format(params, array, date object). Input will never be invalid. Output must consist of years, months and days in any order you specify. Date and Ti... (more) |
— | about 2 years ago |
Comment | Post #280096 |
Very clean answer. I love it! (more) |
— | over 2 years ago |
Edit | Post #280092 | Initial revision | — | over 2 years ago |
Question | — |
Golf me a polygonal loader CGCC Sandbox, Codidact Sandbox Given three positive integers as input, animate an ascii-art polygonal loading symbol on the screen. Intro Using the first input \$n\$, Take one the following regular polygons: ``` ... (more) |
— | over 2 years ago |
Edit | Post #280083 | Initial revision | — | over 2 years ago |
Answer | — |
A: The Camelot Wheel [APL (Dyalog Unicode)], 110 67 bytes {(⍕((f⊖⍪'AEBFCGDAEBFD'),r⌽12↑¯6↑5⍴'-')⍳2↑⍵),⎕a⌷⍨1+0≠f←¯3+r←3×'i'∊⍵} -43 bytes from dzaima. Requires input exactly as shown in the diagram. A bit fiddly with the compression, but works correctly. In both circles, the notes come in the form `A... (more) |
— | over 2 years ago |
Comment | Post #279883 |
Is the final output supposed to look like a christmas tree or not?
(more) |
— | over 2 years ago |
Comment | Post #279854 |
The problem with adding things in to be figured out is that once one person figures it out, everyone else just copies them. Hence, it's generally encouraged to have a full description of what you expect the programmer to do. (more) |
— | over 2 years ago |
Comment | Post #279854 |
There must be some sort of recursive definition for this.. (more) |
— | over 2 years ago |
Comment | Post #279855 |
The example in your tio link is majestic. Nice answer. (more) |
— | over 2 years ago |
Comment | Post #279852 |
This is suprisingly hard to compress well. (more) |
— | over 2 years ago |
Comment | Post #279778 |
Yes, correct. I've also modified the question from the suggestions on SE. (more) |
— | over 2 years ago |
Edit | Post #279778 |
Post edited: |
— | over 2 years ago |
Comment | Post #279791 |
Basically, it is the most boring(and oftentimes most efficient) kolmogorov complexity language.
(more) |
— | over 2 years ago |
Comment | Post #279791 |
@celtschk Bubblegum is used to provide constant output, generally from SHA-256, LZMA or TAR compressed files. This answer is probably a valid SHA256 hash. Read [here](https://esolangs.org/wiki/Bubblegum) (more) |
— | over 2 years ago |
Edit | Post #279778 |
Post edited: |
— | over 2 years ago |
Comment | Post #279778 |
They're in the units place. all of them adhere to the left side. (more) |
— | over 2 years ago |
Comment | Post #279778 |
yes, 8 and 9 get butchered ⍨. not sure how to remedy that. I've specified the mirroring guideline (more) |
— | over 2 years ago |
Edit | Post #279778 |
Post edited: |
— | over 2 years ago |
Comment | Post #279778 |
[this](https://dzaima.github.io/paste#0i@FSiOFSAOL4@HgA#APL) (more) |
— | over 2 years ago |
Edit | Post #279779 |
Post edited: |
— | over 2 years ago |
Comment | Post #279779 |
thanks, changed it. (more) |
— | over 2 years ago |
Edit | Post #279779 |
Post edited: |
— | over 2 years ago |
Edit | Post #279779 |
Post edited: |
— | over 2 years ago |
Edit | Post #279779 |
Post edited: |
— | over 2 years ago |
Edit | Post #279779 | Initial revision | — | over 2 years ago |
Answer | — |
A: Output 256 in many different ways [Husk], 9 solutions 1. Classic ``` 256 ``` Try it online! 2. Squaring ``` □□4 ``` Try it online! 3. Incrementing ``` →→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→... (more) |
— | over 2 years ago |
Edit | Post #279223 |
Post edited: |
— | over 2 years ago |
Edit | Post #279778 | Initial revision | — | over 2 years ago |
Question | — |
Towering Cistercian Representation SE Sandbox Link, Codidact Sandbox Link Inspired by this video. Given a positive integer, draw its Cistercian representation as ascii art. ![enter image description here][1] The Challenge Cistercian numerals are a decimal-based number representation system which use simple line based dr... (more) |
— | over 2 years ago |
Edit | Post #279223 |
Post edited: |
— | over 2 years ago |
Comment | Post #279253 |
ok, added it in. (more) |
— | over 2 years ago |
Edit | Post #279253 |
Post edited: |
— | over 2 years ago |
Comment | Post #279253 |
@celtschk sequence ends when tn is ≤ 0, so it should be 0. (more) |
— | over 2 years ago |
Edit | Post #279685 | Initial revision | — | over 2 years ago |
Answer | — |
A: 1, 2, Fizz, 4, Buzz! [RoadLang], 340 bytes ``` wagwan my slime x is 0 rip dat bong till x bigger den 99 n dat x is x n 1 ayy bossman (x leftova 15) be 0 init bruv man say"FizzBuzz" yeah init bruv ayy bossman (x leftova 5) be 0 init bruv man say"Buzz" yeah init bruv ayy bossman (x leftova 3) be 0 init b... (more) |
— | over 2 years ago |
Edit | Post #279644 | Initial revision | — | over 2 years ago |
Answer | — |
A: Reverse an ASCII string [Ruby], 14 bytes ->s{s.reverse} Try it online! a straightforward builtin. (more) |
— | over 2 years ago |
Edit | Post #279621 |
Post edited: |
— | over 2 years ago |
Comment | Post #279621 |
gotcha, will change it. (more) |
— | over 2 years ago |
Edit | Post #279621 | Initial revision | — | over 2 years ago |
Answer | — |
A: Longest Increasing Subsequence [Husk], 10 bytes L►LfΛo<0-Ṗ Try it online! Explanation ``` L►LfΛo<0-Ṗ Ṗ power set of input f get elements which match the following: Λo - all pairwise differences <0 are negative ►L max by length L length of that (more) |
— | over 2 years ago |
Answer | — |
A: "Hello, World!" [RoadLang], 59 bytes wagwan my slime man say"Hello, World!" chat wit u later fam My first RoadLang answer! And probably the first one on this site! Removing any of the words says "Aight the lad's lost the plot", so I think this is the most minimal answer I can get here.... (more) |
— | over 2 years ago |
Edit | Post #279456 | Post edited | — | over 2 years ago |
Comment | Post #279434 |
@Shaggy yes, you can (more) |
— | over 2 years ago |
Suggested Edit | Post #279456 |
Suggested edit: highlighting correction..? (more) |
helpful | over 2 years ago |
Comment | Post #279444 |
Do we get bonus points for not using `⍴` here? (more) |
— | over 2 years ago |
Edit | Post #279434 |
Post edited: |
— | over 2 years ago |
Edit | Post #279434 |
Post edited: |
— | over 2 years ago |
Edit | Post #279246 |
Post edited: |
— | over 2 years ago |
Edit | Post #279434 | Initial revision | — | over 2 years ago |
Question | — |
Weave Strings Together Given a list of strings(and optionally, their length) as input, weave the strings together. Intro Your goal is to mimic the `WV` operator in Pip. Take a list of strings and alternate between their characters like so: ``` hello, world, → hwc,eoo,lrd,lle,od → hwceoolrdlleod code ``` Effec... (more) |
— | over 2 years ago |
Comment | Post #279374 |
[-1 byte from Shaggy's new answer](https://codegolf.stackexchange.com/a/215419/80214) (more) |
— | over 2 years ago |
Comment | Post #279212 |
More importantly, polyglot with [Text](https://esolangs.org/wiki/Text) (more) |
— | over 2 years ago |
Comment | Post #279318 |
they were elected by the pre-existing community on stack exchange. [Look here.](https://codegolf.meta.stackexchange.com/questions/19380/2020-community-moderator-election-results)
(more) |
— | over 2 years ago |
Edit | Post #279245 |
Post edited: |
— | over 2 years ago |
Comment | Post #279319 |
isn't alert() shorter?
(more) |
— | over 2 years ago |
Edit | Post #279326 |
Post edited: |
— | over 2 years ago |
Edit | Post #279326 | Initial revision | — | over 2 years ago |
Answer | — |
A: Tile pyramids on top of each other! Canvas, 9 7 bytes H/×║∔}r Try it here! Explanation ``` H/×║+}r H } push empty art and start a loop from 1..n /× repeat '/' i times ║ palindromize horizontally(no overlap) + join with previous iteration r center the whole thing (more) |
— | over 2 years ago |
Edit | Post #279318 | Initial revision | — | over 2 years ago |
Answer | — |
A: Who should the temporary moderators be? I nominate Jo King, as they were already voted as moderator by the community earlier. They have proven to be an active and trustworthy moderator, who is also a consistent contributor to the code golf community. (more) |
— | over 2 years ago |
Comment | Post #279239 |
+1 for FatRat (the link is broken) (more) |
— | over 2 years ago |
Comment | Post #279174 |
Multiple well-golfed JavaScript answers on all the questions. I wonder who this is.. (more) |
— | over 2 years ago |
Edit | Post #279253 | Initial revision | — | over 2 years ago |
Question | — |
Length of a Sumac Sequence Heavily based on this closed challenge from SE. Description A Sumac sequence starts with two non-zero integers \$t1\$ and \$t2.\$ The next term, \$t3 = t1 - t2\$ More generally, \$tn = t{n-2} - t{n-1}\$ The sequence ends when \$tn ≤ 0\$. All values in the sequence must be positive. ... (more) |
— | over 2 years ago |
Edit | Post #279185 |
Post edited: finalized |
— | over 2 years ago |
Comment | Post #279185 |
@Quintec That makes a lot more sense. Edited. (more) |
— | over 2 years ago |
Edit | Post #279185 |
Post edited: |
— | over 2 years ago |
Comment | Post #279245 |
@dzaima I think keeping a delay between the frames is a bit restrictive on some languages with no time support. (more) |
— | over 2 years ago |
Comment | Post #279245 |
@dzaima okay, removed that. (more) |
— | over 2 years ago |
Edit | Post #279245 |
Post edited: |
— | over 2 years ago |
Edit | Post #279246 | Initial revision | — | over 2 years ago |
Article | — |
Weave strings together[FINALIZED] Given a list of strings(and optionally, their length) as input, weave the strings together. Intro Your goal is to mimic the `WV` operator in Pip. Take a list of strings and alternate between their characters like so: ``` hello, world, → hwc,eoo,lrd,lle,od → hwceoolrdlleod code ``` Effec... (more) |
— | over 2 years ago |
Edit | Post #279245 | Initial revision | — | over 2 years ago |
Article | — |
Golf me a polygonal loader Given three positive integers as input, animate an ascii-art polygonal loading symbol on the screen. Intro Using the first input \$n\$, Take one the following regular polygons: ``` ... (more) |
— | over 2 years ago |
Edit | Post #279241 | Initial revision | — | over 2 years ago |
Answer | — |
A: Partial Sums of Harmonic Series Stax, 9 bytes Ç≈f♠É↔X+ö Run and debug it Explanation(Unpacked): ``` wii{um|+;< w iterate until a falsy result is reached: ii push iteration number i twice {um map range [1..i] to their reciprocals |+ sum that list ;< compare to the input(get... (more) |
— | over 2 years ago |
Edit | Post #279183 |
Post edited: -2 bytes |
— | over 2 years ago |
Edit | Post #279223 | Initial revision | — | over 2 years ago |
Article | — |
Towering Cistercian representation [FINALIZED] Inspired by this video. Given a positive integer, draw its Cistercian representation as ascii art. ![enter image description here][1] The Challenge Cistercian numerals are a decimal-based number representation system which use simple line based drawings to represent 4-digit numerals. ... (more) |
— | over 2 years ago |
Edit | Post #279221 |
Post edited: |
— | over 2 years ago |
Edit | Post #279221 | Initial revision | — | over 2 years ago |
Answer | — |
A: Prime Difference [Husk], 8 bytes Ψḟo≥⁰≠İp Try it online! or Verify first 8 values It is always a good day when you get to use `Ψ` in your program. Explanation ``` Ψḟo≥⁰≠İp İp to the infinite list of prime numbers, Ψ apply this higher order function on overlapping pairs ḟo f... (more) |
— | over 2 years ago |
Edit | Post #279220 | Initial revision | — | over 2 years ago |
Answer | — |
A: Do you want any special tag styling or requirements? For reference, this is the list of tags we have from SE which is 9 pages long, so I'll take the liberty of listing out which ones are "required" tags, as they are used to signify a scoring criterion: - code-golf - code-challenge - popularity-contest - tips - fastest-code - cops-and-robbers -... (more) |
— | over 2 years ago |
Edit | Post #279183 |
Post edited: |
— | over 2 years ago |
Comment | Post #279147 |
@mbomb007, mostly a matter of tradition more than anything. Hello world is more of a catalog type question than a serious competitive one. (more) |
— | over 2 years ago |
Edit | Post #279183 |
Post edited: -8 bytes |
— | over 2 years ago |
Comment | Post #279185 |
What do you mean by "it"? (more) |
— | over 2 years ago |
Edit | Post #279183 |
Post edited: |
— | over 2 years ago |
Comment | Post #279189 |
Might wanna change the name to something better, just sayin' (more) |
— | over 2 years ago |
Comment | Post #279193 |
Is Canvas longer? (more) |
— | over 2 years ago |
Edit | Post #279191 | Initial revision | — | over 2 years ago |
Answer | — |
A: Obligatory Quine Challenge [Husk], 8 bytes S+s"S+s" Try it online! Basically Leo's original quine. It concatenates the string evaluated version of `S+s` to itself. So: `"S+s" + "\"S+s\""` gives the original code. (more) |
— | over 2 years ago |
Comment | Post #279155 |
Do host your answers on [Try it online!](https://tio.run/##K0gtyjH7DwQA "Perl 6 – Try It Online")
(more) |
— | over 2 years ago |
Edit | Post #279186 | Initial revision | — | over 2 years ago |
Article | — |
Catch the fruit Implement a osu!catch style game. Introduction osu!catch is a rhythm game where the player moves a "basket" to catch "fruits" falling from the top of the screen to the beat of a song. Think pong, but with timing. It is highly recommended to watch this video before reading the question. Here... (more) |
— | over 2 years ago |
Edit | Post #279185 | Initial revision | — | over 2 years ago |
Article | — |
Length of a Sumac Sequence[FINALIZED] Heavily based on this closed challenge from SE. A Sumac sequence starts with two non-zero integers \$t1\$ and \$t2.\$ The next term, \$t3 = t1 - t2\$ More generally, \$tn = t{n-2} - t{n-1}\$ The sequence ends when \$tn ≤ 0\$ (exclusive). No negative integers should be present in the se... (more) |
— | over 2 years ago |
Edit | Post #279184 | Initial revision | — | over 2 years ago |
Answer | — |
A: "Hello, World!" HQ9+, 1 byte H Obligatory HQ9+ answer. (more) |
— | over 2 years ago |
Edit | Post #279183 | Initial revision | — | over 2 years ago |
Answer | — |
A: Evaluate a single variable polynomial equation [APL (Dyalog Unicode)], 11 3 1 byte ⊥ Try it online! Anyone who can golf this further gets a cookie! Function submission which takes reversed coefficients as right argument and \$x\$ as left argument. -8 bytes from dzaima and rak1507(APL Orchard). -2 bytes from Adám. ... (more) |
— | over 2 years ago |