Posts by lyxal
Vyxal, 12 bitsv2, 1.5 or 2 bytes øṘ Try it Online! or Try the entire test suite Bitstring: 000101111100 Very simply a built-in
Vyxal, 62 bitsv2, ~8 bytes ẏḋ\.vȦ\|j Try it Online! Really 7.75 bytes, but leaderboard regex is a thing. Explained ẏḋ\.vȦ\|j ẏ # Range [0, len(X)) ḋ # n-length combinations...
Over on the Code Golf StackExchange site, there is a meta consensus that answers can be scored in fractional bytes if there exists such an encoding method. So, to quote the linked consensus questi...
Vyxal, 44 bitsv2, 5.5 bytes ṗ'⁰c¬;ÞG Try it Online! Or, try a test suite This is like the second time this week I've used powerset for golf on a site that isn't SE. Explained ṗ'⁰c¬;ÞG ṗ ...
Vyxal D, 62 bytes `$f3uV4udV5β$I$:∇₍λ2|62∵Ẏ;ȯ$0<i`$f3uV4udV5β$I$:∇₍λ2|62∵Ẏ;ȯ$0<i Try it Online! Character map: 4 : -2 3 : -1 0 : 0 1 : 1 2 : 2 Nice, long and yummy quine. Explai...
Vyxal, 2 bytes ~A Try it Online! Takes input as a string, outputs a list of vowels. Explained ~A ~ # Keep only letters from the input where A # the letter is a vowel
Vyxal, 19 18 bytes 16Ḣλ»≤ṪḢ»3τ?nτİ∑;∴ Try it Online! The link goes to a program which has every test case. -1 thanks to Steffan Explained (old) 16Ḣλ?$τ»≤ṪḢ»3τ$İ∑;O 16Ḣ # Th...
Vyxal, 5 4 bytes ¤{‹… Try it Online! This is so stupid and I love it Explained ¤{‹… ¤ # Push an empty string { # Forever: ‹ # Append a "-" to the top of the stack … # ...
Vyxal, 4 bytes KƛtO Try it Online! Explained KƛtO Kƛ # For each prefix of the input tO # How many times does the tail occur in the prefix?
Vyxal, 1 byte Ċ Try it Online! Yes, there really is a built-in for this.
Vyxal, 4 bytes ‡∑Ḋȯ Try it Online! Explained ‡∑Ḋȯ ‡ ȯ # Find the first input numbers where: ∑ # The sum Ḋ # Divides that number
Vyxal o, 5 bytes ~$"," Try it Online! I'd say this counts, because $ is quite literally "swap the top two items on the stack". Explained ~$"," ~$ # Swap the top two items, but peek inste...
Vyxal, 2 bytes ∆² Try it Online! Woooooooo built-in elements ftw.
Vyxal Hj, 10 bytes ƛ₍₃₅kF½*∑∴ Try it Online! Vyxal has gotten a whole lot better since first posting this. Explained Very simply, this is: for each item in the range [1, 100], create the lis...
Over on codegolf.stackexchange.com, we have numerous meta posts outlining loopholes answers can't break, validity of output/input methods and other rule-type posts. Some examples: https://cod...
Vyxal/Keg , 8 bytes `:.,`:., Try it online! (Keg) The explanations are the same for both languages, seeing as how Vyxal is heavily based on Keg. Explained `:.,` # Push the string ":.," :., ...
Vyxal, 6, 5, 4 bytes Źe*∑ Try it Online! Takes input in the format coeffs, x Explained Źe*∑ Ź # Generate range [0, len(coeffs)) e # Calculate x ** [0, len(coeffs) (vectorising) ...
Vyxal, 2 bytes KH This pushes the string "Hello, World!" to the stack and automatically prints it. Also, this is the first answer on the site! Woo!