@taRadvylfsriksushilani I can see why you'd want to penalize languages that did well on 14 specific problems vs. languages that get used for everything. I wonder if it's worth penalizing a language so much for being used hundreds of times vs. thousands, though.
@AaroneousMiller Complicating the matter, there are some pure Vim answers where the header is V (vim) just because the poster used TIO and didn't change the header.
@pxeger I find the geometric mean of the answer counts, which is currently around 50. Then, I take a logarithm with that as the base of all of the languages, and take their rating to that power
So, for example, a language with 2500 answers would be squared
(The scores have a constant of 1000 multiplied afterward, so anything below that actually gets moved down)
I'm thinking the correcting isn't actually as necessary as it seemed
@taRadvylfsriksushilani Looks like we need to post more answers in GS2 and see if it's really that good. 46 answers isn't that few, and it's got a huge lead over the next closest language.
As far as Minecraft not being on the leaderboard, I'm wondering if it is getting confused by a lot of answers specifying the minecraft version, or saying "Minecraft Functions" or "Minecraft Command Blocks" and stuff like that
This is a simple 3x3 2D listsimulator, I wanted to create (more golfy) and i got this:
i=[b:=[0]*3,[0,1,0],b[:]]
u=lambda:int(input())
while 1:i[u()][u()]=u();print(i)
Try it online!
Is there anything to be shorter?
@DLosc I guess that's not "There exists an output that does not equal the input," but rather "There cannot exist an output which equals the input" (which, yeah, is clearly not going to work).
@GingerIndustries Is that to scale? Wikipedia says Jupiter orbits about 5 AU from the sun, but the radius of its orbit in your sim looks like a lot more than 5x the radius of Earth's orbit.
Introduction
There have been a few examples of the smallest possible OCI container that does "X".
Challenge
Produce the smallest possible container that correctly handles PID 1 signal responsibilities.
The container does not need to manage child processes.
The container does not need to emit anyt...
i wonder how the ratio of questions that have at least one user who has posted multiple undeleted answers to it compares between our site and other sites
@taRadvylfsriksushilani I'm guessing the Vyxal score has some form of weighted average for including the flag variants? Is it possible to see how Vyxal scores without considering the"Vyxal s" submissions?
Seeing √ å ı ¥ ® Ï Ø ¿ beat Husk reminds me of the fundamental flaw behind any system that ranks languages based on CGCC answers: people sometimes only use specific languages when they know the answer will be golfy, while other users use a language for any/all challenges
¬ cannot be used to assign a value to a variable anyway, due to how \+ works in Prolog in the first place (it backtracks through all possibilities to verify it never succeeds)
@Fatalize Is there documentation (or a rule of thumb) on which builtins create choice points and which ones create constraints? When I write Brachylog, I'm constantly guessing whether I need ≜ or not, and I frequently guess wrong.
@Fatalize I've tried reading Brachylog's code occasionally, and the main thing it taught me was that I don't understand Prolog as well as I thought I did. ^_^
So a constraint is "we're not going to assign anything to this variable yet, we're just going to note that it can't be (e.g.) greater than 5, and if/when it gets assigned in the future we'll fail on any potential assignment that violates the constraint"?
And a choice point is "here are six different values this variable could take, and we're going to try them one by one until we find something that doesn't fail"?
@DLosc If you only read predicates or metapredicate implementations it's not that hard, they all have the same structure more or less
the transpiler on the other hand...
@DLosc Yes exactly, constraints are basically delayed checks
@DLosc Yes, although this reasoning kind of breaks with constrained integers where you would think they always have a set of values they can take
choice points occur when there are at least two different ways to satisfy a predicate, through disjunctions ("or") or different unification possibilities
When you set a constraint to an integer, you don't actually try to unify it to anything, you just constrain it, and there is only one way to do that: apply the constraint, so no choices involved
tl;dr there are choice points when during execution, the interpreter needs to "choose" something, which doesn't happen when you declare a constraint on something (that's not a choice)
And does ≜ create a choice point? I was going to say it means "try all integers in increasing order of their absolute value," but that doesn't quite fit because it knows to stop if existing constraints mean there are only a finite number of possibilities...
@DLosc ≜ creates one choice point for each possible value the integer can take
Under the hood, when you write >.∧0<., the internal variable for the output has an "attribute" that says it should be in the domain 1..4
so ≜ can only choose between 4 values
clp(fd) is the Prolog library that manages all of this logic and writing that is basically years of research and developpement efforts
because it's not always so obvious how the domain of an integer shoould change depending on the constraints
but at the same time you want to reduce the domains as much as possible (with no error obviously), to get more efficient constraint solving
(The guy that helped me extend ≜ so that it worked with infinite domains (say any positive integer) is the guy that actually developped clp(fd) for SWI-Prolog)
Is OK to post a challenge for a sandbox post with 0 votes but is 1 week old?
I have a lot of sandbox posts with 0 votes that are posted to Main, But this is OK?
...my stupid chemistry class is doing vinegar and baking soda volcanoes and the instructions say to "wear gloves and ask the teacher for help if you get vinegar on your skin"
@emanresuA If it literally never outputs anything and never terminates, even on a desktop version that runs for an arbitrarily long time, then no, it's not valid. If programs with infinite runtimes were valid, I could write a valid program that solves the halting problem.
If it works in theory as long as you let it run for 9 trillion years or so, then yes, it's valid.
@taRadvylfsriksushilani You forgot to group K (oK) and K (ngn/k) into K
@taRadvylfsriksushilani Also I don't know how you got 614 answers for Vyxal - a brief search gives ~900
@taRadvylfsriksushilani And idk what's up with your rankings for taxi and mornington crescent because taxi has more answers and higher golf rating but lower score.
Caird brings up a good point, I'm an RO now, so swapping profiles with someone is probably a bad idea. It was only mildly funny the first time, and still caused a huge amount of not-that-funny chaos
@EphraimRuttenberg This looks good, and I agree with you about the uncertainty about including the letter scores. You could allow answerers to take a mapping of letter -> score (or equivalent) if they wish
Given an integer N from 1-9, you must print an NxN grid of NxN boxes that print alternating 1s and Ns, with each box having an alternating starting integer.
Examples
Input: 1
Output:
1
Input: 2
Output:
12 21
21 12
21 12
12 21
Input: 3
Output:
131 313 131
313 131 313
131 313 131
...
@SandboxPosts @Fmbalbuena this would be a better challenge if it was just "given two inputs, do the sum as follows" instead of making it about doing the sum for pairs of elements in the input
Background
In Scrabble, players take turns placing tiles on a grid so that each contiguous set of (more than one) tiles in every row and column makes a word. In one play, tiles can be placed anywhere in a single row or column as long as they are all part of the same word. A word is scored (withou...
@Fmbalbuena Currently, you're asking to implement a function f (the "sum") with that behaviour, then, given L = [a, b, c, d, ..., y, z], return [f(a, b), f(c, d), ..., f(y, z)]. Requiring the challenge to "sum" over every 2 elements instead of just 'given two inputs, "sum" the inputs' is unnecessarily overcomplicated
@GingerIndustries onion my ma is that you should allow 0-based indexing. Also, you might change the flavor text to clarify that the robot never "breaks" in the scenario imagined by our solution, but rather stops before a jump that is too large for it.
@taRadvylfsriksushilani I don't think so, although some of them might be incorrectly labeled.
For example, this answer definitely will not work as-is in Vim. That kind of Vimscript answer is a separate language (albeit a closely related one, which can be run from within Vim).
CMQ: Do you ever "autocorrect" yourself? Like, when I try to type certain words that are very similar to common ones, I end up typing the second without even thinking
I swear, having to regularly cook for myself at uni has messed up my eating habits so much. Its 10pm, and I'm eating tuna from a can and drinking a beer ebcause I can't be bothered to actually make anything :/
@DLosc This isn't even my goto food: my accommodation provided me with a couple of boxes of free food (I think cause I reported I tested positive for covid, so they assumed I was in my room instead of at home), so I'm working my way through that
Canned mac and cheese is the worst thing I've ever had