Posts by south
J, 4 3 distinct, 6 bytes -:_-:_ Half of _ -: _ which is asks if infinity matches infinity. Thanks to @xash in the APL farm discord for saving the 3 unique bytes and orthoplex for catching my bl...
J, 15 bytes 7 u:32 OR 3 u:] Port of Shaggy's answers. Evaluates as 3 forks 7 u: (32 OR (3 u:])) Attempt This Online! 7 u:32 OR 3 u:] ] : right argument 3 u: : 3&a...
Fig, 3 bytes Actual score is: $3\log_{256}(96)\approx$ 2.469 bytes. Filters consonants from the input string using implicit input. Fcb Try it online! Fcb F : Filter with two string args fi...
Ruby 3.1.0, 274 259 249 bytes -10 bytes thanks to Paradox in the Ruby discord BEGIN{END{alias module class begin rescue retry ensure end if self elsif defined? for$.in true do super while f...
MATL, 16 bytes 1`1yh1$lZctDwQt] Try it online! The TIO output fetch will likely fail, so make sure to click the run button to stop the execution. 1`1yh1$lZctDwQt] 1` ] - Push 1 o...
Ruby, 33 bytes ->n,m{[*(0...n*m).each_slice(m)]} Try it online!
J, 28 bytes [:}.@{.m&(+/ .*)&m=.2 1,:1 0 Try it online! Tacit matmul solve. x&u&y applies x to y n times.
Raku, 18 bytes {m:g:i/<[aeiou]>/} Implicitly matches the topic variable with the regex Try it online! {m:g:i/<[aeiou]>/} { } : anonymous code block m ...
J, 20 bytes '01'{~#:2^2842 A.i.8 Attempt This Online! Non-tacit program that outputs implicitly in a REPL. Shoutout to Raul (Miller)#5220 in the APL farm discord for thinking of this cool idea...
Fig, 2 unique, 2 total H! Try it online! Halves the negation of the empty string when no input is given.
Fig, 5 bytes The actual score is $5\log_{256}(96)\approx$ 4.116 bytes. The leaderboard only likes ints in the header. (J,Q0 -1 char thanks to Seggan Try it online! Fractional byte lang creat...
Sidef, 25 bytes {eval .split.join(" * ")} {eval .split.join(" * ")} { } # Create anonymous code block .split.join(" * ") # splits on whitespace and joins with "...
Ruby, 56 bytes p *(1..).lazy.filter{_1%_1.digits.sum<1}.take(gets.to_i) Attempt This Online!
Myby, 12 5 bytes primf=primfd primf : prime factors = : equals primfd : unique prime factors Evaluated as a monadic fork in J (f y) g (h y). The test cases (retest...
J, 8 bytes ~.,:#/.~ Tacit function, this is the de facto method for this problem in J. Attempt it online!
Python 3, 38 36 33 bytes lambda x:{n:x.count(n)for n in x} -2 bytes thanks to @Razetime Another -3 bytes thanks to @orthoplex Attempt it online!
J, 5 bytes -/ .* Try it online! For the determinant conjunction, the space before u is necessary, so there is no shaving a byte here. If you want to read more about this conjunction, check out...
MATL, 6 bytes YftuX= Try it online! Same method as Moshi. YftuX= Yf - factor with implicit input t - duplicate u - unique X= - isequal
MATL, 3 distinct, 3 total lH/ Try it online! Computes 1/2. Reserved labels for constants can be found here
J, 3 bytes ,|. Try it online! This hook y f (g y) appends y with its reverse.
J, 17 bytes {{*./y|~*:2+i.y}} Try it online! A direct definition closest to Razetime's infuriatingly good train solution. Outputs a non-zero number for true and 0 for false.
J, 10 7 bytes +/>:?#/ Try it online! +/>:?#/ #/ : Inserts dyadic # into an array n m Creates n copies of m ? : Roll from 0..y >: : Increment +/ : S...
J, 7 9 bytes ++2&=@+.~ Try it online! Dyadic fork that executes with the form (x + y) + (2 = x +. y). Thanks to torres for pointing out the obvious flaw.