Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for Wezl‭

Type On... Excerpt Status Date
Edit Post #283754 Post edited:
single-character literals
about 3 years ago
Edit Post #283754 Post edited:
about 3 years ago
Edit Post #283754 Initial revision about 3 years ago
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)
about 3 years ago
Edit Post #283356 Initial revision over 3 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 3 years ago
Comment Post #281542 Can I take input in reverse order?
(more)
over 3 years ago
Edit Post #283278 Initial revision over 3 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 3 years ago
Comment Post #282736 21 bytes: `o=->n{(0...n).map &o}`
(more)
over 3 years ago
Comment Post #282736 alternative 27 bytes: `o=->n{(0...n).map{|x|o[x]}}`
(more)
over 3 years ago
Edit Post #282197 Initial revision over 3 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)
over 3 years ago
Edit Post #282077 Post edited:
golf 7 bytes
over 3 years ago
Edit Post #282077 Post edited:
explain
over 3 years ago
Edit Post #282077 Post edited:
golf -1
over 3 years ago
Edit Post #282077 Post edited:
golf 1 byte
over 3 years ago
Edit Post #282077 Initial revision over 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)
over 3 years ago
Comment Post #281956 Can I take it as a string?
(more)
over 3 years ago
Edit Post #281574 Initial revision over 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)
over 3 years ago
Comment Post #281529 It doesn't recurse forever because `Array(0)` = `[]`, and `.keys()` and `.map(f)` don't do anything for empty lists
(more)
over 3 years ago
Edit Post #281524 Initial revision over 3 years ago
Answer A: Make my number a set
Jq, 19 bytes ```python def s:[range(.)|s]; ```
(more)
over 3 years ago
Edit Post #281522 Initial revision over 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)
over 3 years ago
Edit Post #281375 Initial revision over 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)
over 3 years ago
Edit Post #281374 Post edited:
remove things I used for testing
over 3 years ago
Edit Post #281374 Initial revision over 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)
over 3 years ago
Comment Post #280372 Personally I prefer only requiring it to work for 1D arrays, which is simpler for most languages.
(more)
over 3 years ago
Edit Post #281024 Post edited:
a shorter way to split
over 3 years ago
Edit Post #281024 Initial revision over 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)
over 3 years ago