Posts by south
Factor, 30 29 bytes [ readln "Hello, %s!"printf ] Try it online! Uses io and formatting.
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...
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!
Goruby, 38 bytes ->n{dw{$.+=1;$..mp{1.0/-~_1}.su<n};$.} This was not as much fun as I thought it would be, but it was fun enough to use once.
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...
Myby, 2 bytes %2 Input is taken from the command line implicitly. 0 for even, 1 for odd. Since Myby is still in its early stages, there is no online sandbox. Some test cases can be seen here.
J, 9 bytes 1#.]=&><\ This is the 7 byte APL solve but makes use of #. in place of +/"1. I came up with 1#.]=[\ first, but bubbler pointed out it breaks when non zeros are present. At...
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!
MATL, 8 bytes tp:qwPe! Try it online! tp:qwPe! t : duplicate with implicit input (function args as array) p : product [2 3]p -> 6 : : range 1..n q : decremen...
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.
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...
MATL, 6 bytes YftuX= Try it online! Same method as Moshi. YftuX= Yf - factor with implicit input t - duplicate u - unique X= - isequal
MATL, 19 bytes XH:YqtZ*!tsH=f1Z)Z) Try it online! I'm still a novice at MATL, so I am all ears to any improvements. XH:YqtZ*!tsH=f1Z)Z) XH - copy implicit input to H clipboa...
MATL, 4 bytes tPX= Try it online! tPX= t - duplicate with implicit input P - fliplr in MATLAB, reverses top of stack X= - isequal
MATL, 3 distinct, 3 total lH/ Try it online! Computes 1/2. Reserved labels for constants can be found here
Ruby, 69 bytes require'prime';->n{Prime.first(n).then{_1.product _1}.find{_1+_2==n}} Try it online!