Activity for Wezl
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: My house is destroyed! Can you make me one? [Ruby], 33 bytes ``` ->n{?#n+(' #'+' '(n-2)+?#)-n} ``` Try it online! Basically the same as moshi's python (developed parallelly). (more) |
— | over 2 years ago |
Answer | — |
A: Word Set Square Ruby, 74 bytes Full program: ``` s=gets+$.reverse puts [s[0]]+s[1..-2].chars.zip(0..).map{1+' '2+1}n{n+=n.reverse;([n[0]]+n[1..-2].chars.zip(0..).map{1+' '2+1}<<n)' '} ``` (more) |
— | over 2 years ago |
Answer | — |
A: Reduce over the range [1..n] Ruby, 17 bytes ``` ->{2.reduce(1)} ``` Takes function (Proc) followed by Array. 32 bytes without `inject` or `reduce` ``` ->f,(a,r){r.map{|n|a=f[a,n]};a} ``` (more) |
— | over 2 years ago |
Answer | — |
A: Should challenges be worth 10 reputation? Yes Challenges are what we need to survive Some of our users answer almost every new challenge, but that's not enough to keep codidact alive if there are no new challenges now and then. Challenges should get some incentive Personally I've posted questions on codegolf.stackexchange because... (more) |
— | almost 3 years ago |
Answer | — |
A: Evaluation order of an APL n-train posix SH + [GNU sed], 43 bytes ``` seq $1|tac|sed -zE 's/(\n.+)(\n.+)/\2\1/mg' ``` ```bash seq $1 # 1..the argument (inclusive) |tac| # reverse sed # replace -z # null terminated. basically this means that \n is ... (more) |
— | almost 3 years ago |
Answer | — |
A: Merge two strings Sed -`E`, 25 bytes Takes second input, `,` comma, first input (inputs cannot contain `,` commas). ``` s/^(.)(.),(.)\1$/\3\2/ ``` (more) |
— | about 3 years ago |
Answer | — |
A: Make my number a set Jq, 19 bytes ```python def s:[range(.)|s]; ``` (more) |
— | about 3 years ago |
Question | — |
Make my number a set Natural to set (set meaning an unordered collection with no duplicates, though answers may use and output lists instead) Recently I was brainstorming what a language with only (arbitrarily nested) sets would be like. A number is represented with a set of that many elements. The elements need ... (more) |
— | about 3 years ago |
Answer | — |
A: Obligatory Quine Challenge Jq, -rn 18 bytes ``` "|@json+."|@json+. ``` ``` "|@json+." # the string | # through the filter @json # json encoded + # concatenated with . # itself ``` -rn flags are only to output normally and get no input ... (more) |
— | about 3 years ago |
Answer | — |
A: Befunge Golfing Tips Exploiting layout Make it thin Newlines and indentation are expensive, so remove them when possible. Some examples: ``` &v factorial v >:1-:| v $>\:| >$.@ ``` Can be golfed significantly by removing `|`, which requires at least 3 lines ``` &>:1-:#v$>\:#v$.@ ^ < ^ <... (more) |
— | about 3 years ago |
Answer | — |
A: Reverse an ASCII string jq, 16 bytes, preferably `-rR` ```js ./""|reverse|add ``` Annoyingly, jq has convenient things like implicit I/O, and annoying things like adding strings, but you can't `reverse` a string >:|. `./""`&`add` are slightly shorter than the more obvious `split("")`&`join("")`. The division op... (more) |
— | about 3 years ago |