@BlockCoder1392 I have a challenge idea based on this: check if a number is representable by one digit and nothing else, eg. 872496299507712 = 2^2 * 22^2^2 * 2^22 * 222 where ^'s and *'s can be omitted
A packed string is basically the string converted from the smallest possible base to base 256, with two extra bytes to mark the min & max characters of the string
@mbomb007, @NinjaBearMonkey, @randomra, @Sp3000, @TheNumberOne, @Dennis, @DigitalTrauma: Retina needs a way to group stages without creating a loop (specifically, because I want to add the by-line option, Sp suggested a while ago, but I think it would be useful in general). I think the best syntax for that would actually be (), in analogy with regex. Loops could then be {} instead. Of course that breaks backwards-compatibility. So I wanted to ask if anyone would object to that change?
also, with a general grouping syntax, it will be easier to add different kinds of control flow structures like other loop types without running out of characters. {} would then probably just be shorthand for a group with the + option set.
So I decided to try out smaz as a string compressor for pl
'Hello, World!' compressed by 0%
...
ok
@Pietu1998 Is that generally better than just a straight up base 96 to base 256 conversion? I'd imagine the two extra bytes would make it bigger for small strings, but I don't know what it's like for medium/large strings
It's actually three bytes overhead since you need a . before the string. The output base is not strictly set, you just set a minimum & maximum character and then it figures out the base itself. (There's a converter in the docs.)
Background
The greatest common divisor (gcd for short) is a convenient mathematical function, since it has many useful properties.
One of them is Bézout's identity: if d = gcd(a, b), then there exist integers x and y such that d = x*a + y*b.
In this challenge, your task is to visualize this prop...
Yes I did but I forgot to respond! I didn't hear the melody in question in the Journey song but it was a good song nonetheless. And of course I know Dream Theater. :P
@Zgarb is it possible for the first common divisor difference in the string not to be the gcd? if so, that should be a test case (and I need to fix my code)
so, my mom happened to give me this weird combination microphone/speaker thingy for Christmas/birthday (and didn't give it to me until now for some reason)
I shall try to use it the next time we make face noises at each other maybe
@Zgarb I would be opposed to allowing any char for unary input, it's a bit like allowing any type of list input and ending up with the actual code as separator