@Fatalize Quick question, what's the preferred name for Brachylog v2? I see "Brachylog v2", "Brachylog (v2)", and "Brachylog (2)", all with roughly equal amounts of usage
can't say i'm familiar with "Brachylog (2)" but yeah i think "Brachylog v2" is preferred over "Brachylog (v2)" ...come to think of it how many of the "Brachylog (v2)"s are me because i may have done that a few times on challenges with an existing v1 answer
looks like i've historically gone with "Brachylog v2", ais has historically gone with "Brachylog (v2)" (but has also used "Brachylog v2"), and the two times fatalize had to make the distinction in a post he went with either "Brachylog v2" or... "Brachylog (V2)"
Brachylog, 21 bytes
:[1]cyt
,1|,.$ph:?^<=
Try it online!
This answer is one-indexed.
Explanation
Input: [N:K]
:[1]cy Retrieve the first K valid outputs of the predicate below with N as input
t Output is the last one
,1 Output = 1
| ...
also got an absolutely awful idea looking at the leading ,0↔,0 and yeah turns out that if you ever need to put quotes around a string you can do it with ~sᶠ⁴t
i think that might actually beat using formatted write in a vacuum
I could keep the like...60 explicitly v2 answers as a variant, to show that it is golfier, but v2 answers would still dilute v1 ones, so they'd appear about equally as golfy I'd imagine
I'll add it to the feature list, but the ranking program is like 20m away from working so I really want to get something usable from it before starting on another round of features :p
Okay frick. Turns out I need to do the whole dedupe step again because I forgot to do something during the parsing stage that's required for the calculations lol
No, I'm going to make it keep track of what choices you make, and save those to a file. Then, you can just load them from that file and only make any decisions you didn't have to make the first time around (if, e.g., a new language was added)
Honestly installing docker then doing docker pull haskell and docker --rm -ti haskell every time you want to run it is probably way easier than doing what I had to do to install it lol
there was some ai thing i was going to try running locally on my macbook that was only supposed to be able to run on linux but came with a dockersomething for running it in some kind of vm on docker but i never actually managed to get that to work so when i moved to windows i tried again without docker and since it obviously needed access to my gpu that's why i'm trapped on an insider build (even though i never actually got the thing to work anyways)
There was a line in the middle of a loop making it like O(n^3) that I could've trivially optimized away and I just didn't see it
It was going through the whole list of 120k items twice in every iteration, which I could have done once, at the start of the first iteration, and stored in a list
If there are different probable variants of the same languages that are all below 10 answers but sum to above 10, like "XyzLang" and "xyzlang 1.1", it'll allow both through
It's supposed to merge them all into a single language afterward but I forgot to do that
Not built-in, as it's meant to be able to precisely compare the expected byte counts of two languages, but I'm planning on releasing an answer-count-adjusted score alongside each one
@taRadvylfsriksushilani you better make the adjusted list the primary list then. Otherwise someone could game the system by only posting 10 answers that beat the top language on trivial challenges
The thing is, it only approximates the correct ranking. After every round, it gets more accurate, and I've only run two rounds in my test. So I don't want to release the top 10 because it's not going to be correct yet.
For example, Canvas is ranked really high because it's only used for ASCII art. Jstx is ranked really high because it has 15 3-4byte answers and five larger ones.
@taRadvylfsriksushilani you better make the adjusted list the primary list then. Otherwise someone could game the system by only posting 10 answers that beat the top language on trivial challenges
Not built-in, as it's meant to be able to precisely compare the expected byte counts of two languages, but I'm planning on releasing an answer-count-adjusted score alongside each one
A ragged matrix, is a matrix that has a different number of elements in each row. Your challenge is to write a program in any favorable language to find the indices of all occurrences of target in the ragged matrix.
Input:
A list of ragged lists (can be empty) of positive integers and a target ra...
A left-truncatable prime is a prime number and when the first digit is removed continuously, the result is always prime.
A right-truncatable prime is a prime number and when the last digit is removed continuously, the result is always prime.
If the integer is only a left-truncatable prime, return...
@taRadvylfsriksushilani Brachylog v2 is just Brachylog. You use "Brachylog v1" if you want to talk about the first version but I don't see why you would, it's inferior in every way. So just use Brachylog