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 snail_‭

Type On... Excerpt Status Date
Edit Post #283767 Post edited:
-4
over 2 years ago
Edit Post #286363 Post edited:
sbcs scoring
over 2 years ago
Comment Post #286363 Can you count each character as one byte?
(more)
over 2 years ago
Edit Post #286363 Initial revision over 2 years ago
Answer A: Create a range grid
BQN (CBQN), 10 bytes Anonymous function that takes `m` on the left and `n` on the right. ```bqn {𝕨‿𝕩β₯Šβ†•π•¨Γ—𝕩} ↕𝕨×𝕩 # list of range 0,mn) 𝕨‿𝕩β₯Š # reshape list to mn ``` [Try it here!
(more)
over 2 years ago
Comment Post #283012 Multiple other answers use an array of lines as the art input.
(more)
almost 3 years ago
Edit Post #285474 Post edited:
almost 3 years ago
Edit Post #285474 Initial revision almost 3 years ago
Answer A: Evaluate a single variable polynomial equation
BQN, 13 bytes ```bqn {+Β΄(𝕨⋆↕≠𝕩)×𝕩} { } # fn +Β΄ # sum reduce (𝕨⋆↕≠𝕩) # x^i for each term ×𝕩 # times each coefficient ``` Try it
(more)
almost 3 years ago
Edit Post #285404 Initial revision almost 3 years ago
Answer A: A number adder, not a death adder
Ruby, 28 bytes ```ruby puts"puts #{gets}+gets.toi" puts"puts # print P2, which prints #{gets} # P1's input value, interpolated +gets.toi" # plus P2's input value ``` For instance, if the input to P1 is 10, then P2 is ```ruby put...
(more)
almost 3 years ago
Edit Post #285331 Initial revision almost 3 years ago
Answer A: Operation "Find The Operator"
Ruby, 58 bytes Simple eval solution. Using `` for exponentiation. -&gt;a,b,c{%w[+ - / % ].select{eval(&quot;#{a}#{1}#{b}&quot;)==c}} Attempt This Online!
(more)
almost 3 years ago
Comment Post #284994 Fixed, and made the code shorter :)
(more)
almost 3 years ago
Edit Post #284994 Post edited:
-6 refactor
almost 3 years ago
Edit Post #284994 Post edited:
almost 3 years ago
Edit Post #284994 Initial revision almost 3 years ago
Answer A: Golf golf challenge
Ruby, 110 106 bytes Fixed capitalization and refactored for -4. ```ruby ->p,s{d=s-p s1?" bogey":"")} ``` Attempt This Online!
(more)
almost 3 years ago
Edit Post #281024 Post edited:
Corrected formatting, for leaderboard
about 3 years ago
Comment Post #279167 [down to 44 bytes](https://tio.run/##KypNqvz/P81W1y5bp6I6W684syrVztA@O9ogVjstOjvaUE9P1zBWpyJWq8IqOxrIrP1fUFpSrJCmpwGUM4jVUTC0MNLkQhbTUTACS5ggCRvpmcKEDfRMsajXUTAGESYQI4FK/gMA) You should just use a lambda `f=->k,x{}` since it's s way shorter. You call a Proc like `f[args]` instead of `f(args)`. Als...
(more)
about 3 years ago
Edit Post #284230 Post edited:
explanation
about 3 years ago
Suggested Edit Post #281024 Suggested edit:
Corrected formatting, for leaderboard
(more)
helpful about 3 years ago
Edit Post #284230 Initial revision about 3 years ago
Answer A: Weave Strings Together
[Ruby], 51 bytes ```ruby ->a{(0..a.map(&:size).max).map{|n|a.map{1[n]}}""} ->a{ } # lambda taking array `a` (0..a.map(&:size).max) # range of 0..length of longest string .map{|n| ...
(more)
about 3 years ago
Edit Post #284222 Initial revision about 3 years ago
Answer A: Collatz conjecture; Count the tries to reach $1$
[Ruby], 33 bytes Recursive lambda solution. ```ruby c=->n{nn{ } # c = lambda taking `n` n<2? : # if n < 2... 0 # return 0... 1+c[ ] # else return 1 + collatz count for... ...
(more)
about 3 years ago
Edit Post #283976 Post edited:
about 3 years ago
Edit Post #284102 Post edited:
golf -5
about 3 years ago
Edit Post #284102 Initial revision about 3 years ago
Answer A: Repeat the characters
[jq], 32 27 bytes -5 bytes (thank you Razetime) .n as$n|.s/""|map(.$n)|add Try it online!
(more)
about 3 years ago
Edit Post #283976 Post edited:
More info
about 3 years ago
Edit Post #284099 Post edited:
Golfed -5
about 3 years ago
Edit Post #284099 Initial revision about 3 years ago
Answer A: Repeat the characters
[Ruby], 34 29 bytes ```ruby ->s,n{s.chars.map{1n}""} ``` Try it online!
(more)
about 3 years ago
Edit Post #284058 Initial revision about 3 years ago
Answer A: Are All Elements Equal?
[Ruby], 15 bytes ```ruby ->a{a.all?a[0]} ->a{ } # lambda taking array `a` a.all? # do all items in the array match... a[0] # ...the first? ``` Try it online!
(more)
about 3 years ago
Edit Post #284037 Initial revision about 3 years ago
Answer A: A number adder, not a death adder
[Ahead], 10 bytes IO"@O+I"W@ This prints `N1I+0@`. Try it online!
(more)
about 3 years ago
Edit Post #284004 Post edited:
flags
about 3 years ago
Edit Post #284004 Post edited:
about 3 years ago
Edit Post #284004 Initial revision about 3 years ago
Answer A: My house is destroyed! Can you make me one?
[jq] `--raw-output`, 32 bytes jq is the language of the month, apparently. Here it is! Not sure if the `--raw-output` flag really matters, someone let me know. ```js "#".+(" #"+" "(.-2)+"#")(.-1) ``` Try it online!
(more)
about 3 years ago
Comment Post #282736 Feel free to submit your own answer, since this approach is different enough from my own. I only feel good about taking small golf improvements.
(more)
about 3 years ago
Edit Post #283976 Initial revision about 3 years ago
Answer A: Tips for golfing in Ruby
Omitting parens on function calls You can omit parentheses on function calls in many cases. ```ruby foo(bar,baz) foo bar,baz ``` This is even true if a function call doesn't have any parameters. (This is because all function calls and property accesses are just methods, by the way.) ```ruby p...
(more)
about 3 years ago
Edit Post #283973 Post edited:
-1
about 3 years ago
Comment Post #283972 [21 bytes](https://tio.run/##KypNqvz/v6C0pFjJIzUnJ19HQbk6PbWkuFZR6f//4rzEzBwA) Don't need to use parens on function calls if you don't provide arguments.
(more)
about 3 years ago
Comment Post #283966 The challenge doesn't specify that output has to be on standard output. Is that a requirement?
(more)
about 3 years ago
Edit Post #283973 Initial revision about 3 years ago
Answer A: Golf a FRACTRAN interpreter
[Ruby], 51 50 bytes -1 from Razetime ```ruby ->p,n{while i=p.find{(1n).tof%1==0} n=i end n} ``` Try it online!
(more)
about 3 years ago