« first day (2547 days earlier)      last day (1178 days later) » 
00:00 - 19:0019:00 - 23:00

12:29 AM
0
Q: The Eyes are Following You

ElPedroThis is inspired by the excellent Visualize Visual Eyes challenge. It is posted with permission from and credit to @Jordan We are going to create an ASCII art approximation of the Xeyes challenge but without worrying about the actual mouse movements. Just the positions. Overview In all cases t...

 
1:11 AM
is a challenge author allowed to accept an answer that's not the shortest on a
 
@totallyhuman No, but theoretically there's nothing stopping them
 
Often times the accepted answer isn’t the objective winner due to answers after the OP has given up on the challenge
 
1:45 AM
hi everyone
 
@Mego self-nominations allowed?
 
Anonymous
@MDXF Last sentence of the second paragraph on the post
 
@Mego Aha thanks, sorry about that
Does anyone have a handy SEDE query to find the top, say, 50, highest voted answers on the site?
 
2:07 AM
...oh
CMC (I will award a +50 bounty to the top post of whoever solves this first): Read a Cubically cube-dump (e.g. the one in the debug section here) as input and print the same cube in the input format of this challenge.
 
@MDXF CMC can't be awarded...
 
@user202729 I'm saying that if someone manages to solve this, I'll give them rep on the main site
 
2:26 AM
is there a bounty on Quine in Seed
 
I don't think so, but if you succeed then it's likely that someone will give you a bounty.
 
@Unihedron If you make one I'm sure several people would put a bounty on it. I definitely would lol
 
@Unihedron Do you have one??
 
Basically the only way to write a quine is to write the seed decoder from befunge program in befunge.
 
comrade salute
@MDXF I'm trying
 
2:27 AM
Ah. Are you anywhere close?
 
I made a plane, but our destination is the moon
 
... which will not work because I can't even write the seed decoder in any language.
 
and I didn't know Befunge.
 
Do you know how 2d languages work?
 
2:29 AM
I know befunge and I've been making progress with the decoder, but I need a system to reduce the time it takes to try decoding
it's not like ><> where you have 0-9a-f, it's just 0-9
 
@Unihedron I've got a fast cloud server I could run some code on for you if that would help
Assuming that's what you meant by system
 
comrade thank
I actually meant an algorithm, so far the hard part has been crunching the right maths and getting the stars the maths to line up with the seed
 
Anonymous
@Unihedron Decoding? I might be able to help you in a little bit
 
Does Befunge have big integer?
 
Anonymous
Don't think so
 
Anonymous
2:33 AM
Well, it depends on the implementation
 
@Unihedron Ah. In that case I'm less useful :P good luck though!
 
looks for a permutation that support big integer
learn Befunge first
 
Anonymous
PyFunge might
 
Anonymous
Since Python does
 
Anonymous
And Seed on TIO uses PyFunge
 
2:34 AM
@MDXF Suggest @NewInfiniteBounty.
 
You mean the meta thread for bounties with no deadline?
 
why does wikipedia let you pick comicneue as a font? -.-
 
So the bot's name is [New Bounties With No Deadlines]...
Yes.
 
 
@user202729 How would that work though? It's not a challenge, just a CMC
 
2:36 AM
... then ... how are you going to award the bounty in the first place?
Bounty are supposed to be put on answers, not users.
 
Putting a bounty on a user sounds a touch mercantile for PPCG.
 
Reading (some of) the past challenges is painful.
(when our rules were different, there were no such things as non-observable behavior)
 
@user202729 I'd just give it to their best answer. I asked Dennis once if I could give him a bounty on his top answer because of something he did in chat, he said it was fine as long as it was an answer I found worthy of a bounty
 
... that feels cheating. I suggest having a main challenge for the CMC.
 
It's such a localized challenge though, it will only be useful to me in the development of Cubically and a cube solver
 
2:40 AM
For example, my most upvoted answer is a 5-byte Jelly, which is both FGITW and is a method that many people used (and thus linked to).
 
I think prioritizing a bounty on certain users is fine as long as it's not the decisive factor. "This answer is made by a user who did something impressive" is just not the same as "This answer is impressive"
 
@user202729 It wasn't his most upvoted answer. It was his favorite one.
 
@MDXF Most challenges aren't even useful, so you've already beaten them there.
3
 
Ok that's completely true
 
2:41 AM
What... now there is .
 
Yep, we have some challenges exclusively for the language
 
I don't have any favorite answer TBH.
 
I do, I think it's my most impressive/interesting/hacky answer
 
wonder if I can knock out two birds with one stone
 
Ok so putting this challenge in the sandbox... what would I even title it?
 
2:44 AM
.... now with all requirements must be observable rule, we don't get that many good answers...
 
"Of Dumps and Cubes, and Structured Nonsense"
 
Wow. Remind me to ping you when I need help naming my useless languages
 
Sure.
 
... not if it's downvoted and closed.
 
I find that unlikely-ish... it's not trivial, it'll have a clear spec and it'll be on-topic
 
2:48 AM
And isn't that what the sandbox is for anyway?
 
Yep
 
I intend to have a language with program structure looks like this...
https://tio.run/##7ZZBDsMgDATv@wp@4Cf13jf47zRqkQpJ1grykkNVpIjLgFGYFX7WWvh4tFHCMUeBI@bjrKF4QSs@zCKKFrT2n6xEW81TtOC23jfo/fGt5qmgoDXWSrTVJAVmnFuPqigwlfyDuoXCTVIIbGPRylDgsrFo5ShQ2Wi0chSYbDxaOQrMtkO0RBSYb/toiSgw43bRElFgKo3RElEIbOuiJaPAZeujpaNAZRsOqKPAZBtPqKP@AfzVAOoehVsegtCq7/IUhcikbnmGwi1d1vLOalWHv6yTX9axr@rMw1s/VfkKheimz@W9QKHWFw
 
Fun fact: My three least voted challenges were the only ones that weren't in the sandbox.
 
I'm pretty sure my only challenge was before we even had the sandbox.
 
Wow idk how I'd (how do you strikeout text in chat) ever write challenges without the sandbox
 
3:13 AM
abc
With ---abc---.
 
0
A: Sandbox for Proposed Challenges

MD XFOf Dumps and Cubes, and Structured Nonsense code-golf cubically rubiks-cube Your challenge is to translate a Cubically cube-dump to the format specified in this challenge. Input The input, which you may take via any standard means, will represent a Rubik's Cube, formatted how Cubically prints ...

 
@Οurous @user202729 it's in the sandbox
 
@Οurous Definitely not, your PPCG account is newer than the old sandbox
First iteration of the sandbox is as old as 2011 if I'm not mistaken
 
Hey, Cubically now have function!
 
@user202729 I pretty much added those so it could do this, they're really useful though
 
3:29 AM
I failed to be the first to answer that...
Why don't you just find a cube that's easy to solve?
 
What do you mean?
 
43 e 18... that's about 43 e 9 seconds, assuming computer can perform 1e9 moves per second.
So that's about a century. A month is impossible.
I mean, the program will immediately exit after the cube is solved, right?
 
Yeah
 
So find a cube that is solvable in a small amount of moves. That's easy.
 
@user202729 Well the way Cubically's interpreter rotates the faces is extremely inefficient (and I completely forgot how it works), were I to optimize that I'm sure it could get a much better moves-per-second time
@user202729 You mean get the inputted cube to a different cube that's easy to solve?
 
3:32 AM
The lower bound is a century, trust me.
Yes.
 
How is that any easier than just getting it to the solved cube?
 
Why is 0x20 newline?
(it should be a space, and 0x0A a newline)
 
0x20 is device control 4
 
Because I think I accidentally filled 0x0A in the codepage, and the new parser automatically strips out all spaces anyway
@Unihedron not in Cubically's SBCS
 
I think you didn't.
 
3:34 AM
soz didnt know
 
(you indeed didn't)
 
Oh look at that it's empty
Meh, not a big enough concern at the moment, feel free to open an issue if it bothers you and I'll change it eventually
 
Let me try to generate a cube which will take only a little time to solve...
 
I'm still curious how getting a randomly generated cube to an easy-to-solve cube is any different than getting the same randomly generated cube to the solved cube
 
I mean, feed a easy to solve cube to your program for TIO purpose.
 
3:38 AM
Aha I see what you mean
The easiest cube to solve for that devil's algo is probably one rotated simply with F'
Actually I have no idea which turn is executed first...
 
The Cubically interpreter forgot to revert my terminal color...
 
https://tio.run/##rZNLjhMxEIb3c4rsDGLTLj@6m2XL8sorSz4AjFQS0qxALDgBe47IRUJV/R06MMooaFDSX9e7yuXk8evHT48fnp6@nc8/v/@oharrrlAfRtOHe1AX@2pCM6nB6EQ2gUQgczvITZXiLKKYo7sqT5Fno@Z6kafKM2ivulyqds1aakfbpV5aLdZqtCHiaPtcQ@YdokuhfZAFgxT2qThMoaJJpJK5RyX5FtdooyETlUaiiiJHRoCMSqOI6@/w4jqNvocPQsDW3DbI9icrIzRpsgCrruORnIssTfKLvCxNKm1WqGuUNri0lC3p8sWsa7IxC8E94L/OtFm1Wd0HKtpvqKtqcx1b2@Mge77mOZxCtmjDNbLDoULTXmLso1llTehmKTqILQbNiy1mO4aXWxaT68rLBrd9PKX20Qnsws1SOlZsy@k2Lu6hqmG0vaum/r4juxGU0001HGnviGKD7IotxM436t6WvX5MIg7zATMFDssBM0UO6wEzJY7TATNljv6AmWaOdMBMC8dgME0qRgPmmjgmELrnmEHoxHEGoQeOCwg9clxB6InTBELPnDwIfeZEIPSFUwC
Easiest cube to solve via the devil's algorithm I'm using is one scrambled with F2. It solves immediately ^
I ran the interpreter offline with the p flag which prints the cube moves as it executes them, the first move executed was F2
 
is sharing allowed/encouraged here?
 
Sharing... what?
 
@LeakyNun sharing what?
ninja'd
 
3:44 AM
knowledge, I guess
 
Yes, and hopefully someone will want to listen.
 
so we want to enquire about the natural numbers. We will use the logical operators "for all", "there exists", "and", "or", "not", "implies", as well as our operators on natural numbers +, *, <
 
... number theory again?
 
no, computability
 
Ok.
 
3:46 AM
"n is even" will translate to "exists k, k+k=n"
so we can make all kind of questions about the natural numbers, including famous conjectures such as goldbach conjecture and Collatz conjecture
(the formulation of Collatz conjecture will be harder, as you would need to encode a sequence in a single number, but it is not impossible (see this challenge for an example))
 
Yes I suppose everyone had seen that answer.
 
so "for all" and "exists" are called quantifiers
and bounded quantifiers are of the form "for all n < m", "exists n < m", where m is something defined earlier in the context
so actually we can write "n is even" entirely with bounded operators: "exists k < n, k + k = n"
note that "n" is free in the sentence, i.e. not mentioned by any quantifiers before it, bounded or unbounded
we call such sentences 1-parameter sentences
now, we will introduce a sort of hierarchy to parametrized sentences (the number of parameters doesn't really matter, again see the link above for an encoding)
if a parametrized sentence is equivalent to one entirely with bounded quantifiers, then we say that it is a Δ0-sentence
if it is equivalent to a sentence that starts with unbounded "exists" followed by a parametrized Δ0-sentence, then the sentence is in Σ1.
if it is equivalent to a sentence that starts with unbounded "for all" followed by a parametrized Δ0-sentence, then the sentence is in Π1.
so Δ0 is a subset of Σ1, as well as Π1.
We call Δ1 the intersection of Σ1 and Π1.
A parametrized sentence is in Σ2 if it starts with unbounded "exists" quantifier and is followed by a parametrized Π1 sentence, i.e. it looks like "exists n1, exists n2, ..., for all m1, for all m2, ... [a Δ0 sentence]"
and the hierarchy continues onward
theorem: for a sentence φ, there is a program that proves φ or disproves φ, if and only if φ is in Δ1.
 
Do you mean ∑1 instead of ∏1?
 
where?
 
3 mins ago, by Leaky Nun
A parametrized sentence is in Σ2 if it starts with unbounded "exists" quantifier and is followed by a parametrized Π1 sentence, i.e. it looks like "exists n1, exists n2, ..., for all m1, for all m2, ... [a Δ0 sentence]"
 
4:01 AM
no, because ∑1 would just be another bunch of "exists" quantifiers
maybe I should clarify that there can be more than one "exists" quantifiers in a row, and it doesn't affect the hierarchy
the same with "for all"
 
(because multiple integers can be represented as a integer)
 
precisely
 
Oh I see you are missing a s on the quantifier.
 
yes, sorry
 
Ok, I read that and then saw two exists (ignoring the elipse) and jumped to a conclusion.
 
4:05 AM
let φ be Δ1. So, φ is equivalent to some sentence that begins with exists, and its negation is also equivalent to some sentence that begins with exists (negation of "for all x, P(x)" is "exists x, not P(x)")
so the program is simply to try substitute the variable quantified by 0, and then do the same on the negation, and then substitute 1, and then do the same on the negation, etc until either the sentence or its negation becomes "true"
for an example, let's forget for a moment that "n is even" is actually Δ0 (Δ0 is a subset of Δ1 anyway). Then, "n is even" can be written as "exists k, k+k=n", while its negation is "exists k, k+k+1=n".
So the program simply tries k=0 on the positive, k=0 on the negation, k=1 on the positive, k=1 on the negation, etc.
The other direction is harder to prove, and the proof involves essentially tracing what the program actually does and writing a sentence based on the program
 
Curry Howard correspondence?
 
@HeebyJeebyMan that's more like "proofs and programs correspond to each other"
Post's theorem.
more terms for reference:
if the defining parametrized sentence for a set of natural numbers is ∑1, then it is recursively enumerable, i.e. there is a turing machine that halts exactly on those numbers (and runs forever otherwise)
if it is Π1, i.e. its negation is ∑1, then it is co-recursively enumerable
if it is Δ1, then it is recursive
- the four colour theorem (ignoring the fact that it is proved) is Π1.
- the fermat's last theorem (ignoring the fact that it is proved) is Π1.
- the Riemann Hypothesis is Π1.
- the twin prime conjecture is Π2.
- the Collatz conjecture is Π2.
note: some day maybe they will rank lower in the hierarchy. this is just up to our current knowledge.
here's the scary bit about arithmetical hierarchy: one can define a real number as an equivalence class of cauchy sequences of rational numbers (I will explain this later). Thus, let f and g be two cauchy sequences of rational numbers, i.e. a function from N to Q, which can also be a function from N to N. Assume that f and g are in Δ0. Then, the sentence "f and g represents the same real number" is actually Π3. It's even above most open conjectures.
conclusion: real number equality is super-undecidable
maybe I won't explain it, since it's more about the construction of real number, so it's more pure maths than CS
btw the sentence "f and g represent the same real number" is "for all rational epsilon > 0, exists natural N, for all natural n > N, |f(n) - g(n)| < epsilon"
 
4:32 AM
Well shouldn't that make sense? I mean intuitively if we are defining real numbers with a Dedkind cut we would expect that determining the equality of two real numbers to be similar (but not identical) to determining if two unaccountably large sets are equivalent.
 
I think you get Π1 when using Dedekind cut, but I'm not sure
that's assuming the two numbers in question (two sets of rational numbers in equation) are recursive, i.e. Δ1.
 
I'm not sure if that is the case, but I don't know.
 
maybe the two sets can even be Δ0 (e.g. sqrt(2)), then still Π1 for Dedekind cut
p/q < sqrt(2) iff ((p < 0 and q > 0) or (p > 0 and q < 0) or (p*p < q*q + q*q))
 
I really don't think that is the case.
 
that looks Δ0 to me
 
4:39 AM
Oh for that specific example yes
sorry I thought we were talking in general
 
3 mins ago, by Leaky Nun
that's assuming the two numbers in question (two sets of rational numbers in equation) are recursive, i.e. Δ1.
in general it doesn't work
we can only consider the real numbers that are actually in the hierarchy
 
Ok that would have been my suspicion
 
(there is only countably many Dedekind cuts that are in the hierarchy)
this is so horrifying
like we usually only use Π3 or below
 
Of course, because our statements are spanned by a finite grammar
 
but there are numbers that are not even Π100, not Π10000000000
and they are "real" numbers
 
5:03 AM
0
Q: Majority Gates for boolean functions

HoodThe majority function is a boolean function which takes three boolean inputs and returns the most common. This question concerns writing boolean functions as compositions of majority functions. An example of a 5-ary composition of majority functions is (x1,x2,x3,x4,x5) => maj(x1,x2,maj(x3,x4,x5)...

 
Anonymous
CMC (Chat Mediocre Challenge): implement a Toffoli gate in Game of Life (B2/S23). Smallest bounding box wins.
 
Anyone can find a meta for include?
0
A: Find The Rank Of A Word

DúthomhasC++, 121 bytes void R(string s){int n=1;auto p=s;sort(begin(p),end(p));do if(p==s)cout<<n;while(++n,next_permutation(begin(p),end(p)));} I am always unsure when using C and C++ what counts towards the byte total. According to Program, Function, or Snippet? the answer is still vague (as long as...

We do need a definite boilerplate list for every languages.
... I waste too much time here ...
 
Anonymous
5:22 AM
@user202729 So do we all :P
 
@Mego Interesting -- this could replace the ANT gate setup
I'm assuming that's why you're interested
 
Anonymous
@quartata That, plus it was a random thought that popped in my head :P
 
Anonymous
Toffoli gates seems more natural for the QFT computer, because we have to deal with stuff like conservation of energy :P
 
I think the QFT room is destined to die for another year until Pong, that seems to be how this works
 
Anonymous
Haha yep :P
 
5:34 AM
also we never cleaned up the repos
remind me to remind phi to remind me to remind phi
not necessarily in that order
On the bright side we do at least have a list of things to do, we're not totally directionless
 
7:01 AM
Can I compile C to GoL yet?
 
 
2 hours later…
9:00 AM
Parsing the GNU LOCATE02 database format (front-compressed sorted list), sounds like a nice challenge.
 
9:11 AM
There seems to be some problem with the leaderboard snippet of the showcase challenge. Can anyone check?
 
 
1 hour later…
10:12 AM
0
Q: alternatively shift columns and rows of a 2d array

kshishooGiven a 2D array as: a b c d e f g h i j k l m n o have your function transform the array in this manner: 1.) all elements in the first column move down one row, while those in the second move up one row and so on k g m i o a l c n e f b h d j 2.)all elements in the first row move to the...

 
@LeakyNun it would be not easier "k is even" <=> k%2==0 ?
In the place "k is even" <=> exist x in N with x+x=k
 
10:55 AM
... if only we have % defined...
 
@user202729 % is one algorithm. If one know 2 number it is possible find their mod()... Even "exist x in N with x+x=k" could be one algo, only that find that x if k is odd is one infinite Loop...
Possible is not infinite loop "exist x with x<k and x+x=k" and the loop stop if x>= k
 
11:48 AM
Possible "exist x in N with x+x=k" is not infinite loop (for k odd) in the case it is one proposition written using axioms on logic set and N and their theorems
 
Of course adding % won't change the computability of anything, but it would make axioms significantly easier to write.
What's the best (whatever it means) way to for a variable in a set in Javascript?
(for example: a = 1; code; a = 2; code; -> for (a = 1; a <= 2; ++a) {code;} for set {1, 2})
 
A variable for me it is what follows"for all"... For example for all a<4=>a<8 and a is a variable; it is a Constant when it is a number 1 2 3 ... Or "a" in the proposition " exist only one a such that 1+1=a"
 
^ why isn't that room frozen?
Javascript variable.
Oh... [1, 2].forEach(a=>{...}). Any better (more idiomatic) way?
 
2
Q: Regrowing trees

CharlieBackground Here you have another work-inspired challenge, but from my wife's work in this case. Imagine you have a service that returns the list of nodes in a tree structure (much like the files and folders in a file system), but in no particular order. For every node you get a tuple with its na...

 
@user202729 alternatively, for (let a of [1,3]) { console.log(a); }
 
12:03 PM
Nice!
Why does JS have both for-in and for-of? To cause confusion?
 
in is properties, of is values that the properties hold (both public)
 
@user202729 I'd agree to that. :p I mix them up often
 
@user202729 no, so people can iterate over items as well as keys
 
So for-in is iterate over keys and for-of is iterate over generator function or values?
Is there iterate over both? (Python enumerate)
 
@user202729 yeah
@user202729 no, because remember in js everything is an object :P
 
12:07 PM
lol in the code for Canvas I have for (let key of Object.keys(simpleFunctions)) :p
 
also because of only iterates over things you have explicitly made iterable
 
......... Too bad, Javascript.
 
@dzaima >_> how could you
 
... can you for (var {k, v} of enumerate(object)) or something like that?
 
shows dzaima way out of ppcg
 
12:09 PM
@ASCII-only I honestly have no idea. I think I started that out with a .map and converted to for :p
 
@user202729 object -> array of [k, v]?
 
Yes.
 
1:11 PM
self nominations feel dirty :/
(after i've done one)
 
2:03 PM
@user202729 you can do it in Funky!
 
2:17 PM
{k, v} isn't a valid assignable expression.
because it's technically equivalent to set((k, v)) and function calls aren't valid expressions for assignment
 
Yes, Javascript has destructuring assignment.
 
oh wait this is JS
i'm dumb
{1, 2} evaluates to 2???
 
It's code block.
 
oh right
 
JS also have object {1:2, 3:4}, but sometimes you need a pair of parentheses.
 
2:24 PM
right I kind of remember this language now
Can I get some sandbox feedback for this? I'm thinking of maybe posting it soon.
 
Probably we should have a rule of splitting long sandbox challenges into multiple parts so that people will be more likely to read them.
@HyperNeutrino "idle"? For waiting for stdin input?
 
2:43 PM
yeah, because for example input() in python blocks until there's STDIN input until a newline, so that's what I mean by "idle".
 
3:00 PM
> other bots might think you're insane
bots can't think.
 
well I'd probably program my bot to remember if any bots are producing nonsensical statements
 
But if you don't know what/how other bots are programmed it doesn't make any sense to communicate. You can't just "assume they're normal bot". (same issue with mafia challenge)
(and that was the reason why I don't understand what communication is used for)
 
the communication is mostly to communicate logic that other bots did not notice to other bots to affect how they behave (if they actually respect communicative input) in terms of voting and stuff
communication is more important when humans are playing because humans can sometimes make mistakes and reveal information accidentally while speaking, but in theory bots will never do that
 
... okay, Haskell is weird.
 
3:17 PM
2
Q: Adjacent Room Number Finder

DevelopingDeveloperAdjacent Room Number Finder I have come across an interesting problem solving technique at my job when given the wrong room number from a colleague for a meeting. Every now and then, while on the way to a meeting, a member on my team will send me the wrong room number, typically because they are...

 
3:35 PM
@NewMainPosts this gives me a giant déjà vu...
 
@totallyhuman That's why I haven't nominated either of the two things I kinda want to :/ If someone else nominates a post, it means that you're not the only one who thinks it's worth a bounty.
 
For the toroidal challenge, would the following work:
* generate all possible doubly connected edge list.
* check if V-E+F=0.
* if there exists a DCEL satisfy ^ then the graph is toroidal, else the graph is not toroidal.
(F = number of connected components of edges, under (next) and (prev))
 
Citation please
 
("Determine if a graph is toroidal" challenge of @HeebyJeebyMan (WheatWizard))
 
no need to ping here?
 
3:42 PM
... agree. But asking them is also probably useful.
(nice, LeakyNun is here)
 
I don't think that that is valid. Although I have been wrong before
 
and who hasn't :p
 
Why? (are all DCEL that "seems valid" actually valid?)
 
Maybe I'm wrong. I didn't think about it very hard
 
4:18 PM
Anyone got a query for the SEDE handy that allows you to retrieve questions that have been answered by 2 (or more) specific users?
 
4:31 PM
 
@NieDzejkob Much thanks :)
 
I'm thinking of starting a new golfing language with inspiration from existing challenges to try to solve most golf tasks more efficiently / in fewer bytes than existing golfing languages. Any suggestions for how it should work? (Prefix (Pyth) / Stack (05AB1E) / Tacit (Jelly))
probably tacit if I want to win
 
what the heck is that
 
Infix but rotated 90 degrees :P
 
Anonymous
4:38 PM
Tacit is usually the shortest method, because you can avoid a lot of element duplication (stack, prefix) and stack reordering (stack)
 
hi everyone
 
yeah that's true. probably tacit; it seems to overall be shorter
 
4:40 PM
actually @HyperNeutrino I'd say make 3 variants (possibly with the same command set) although I don't know how feasible would that be
 
hm interesting idea though I'm not sure how well that'd work
 
You could have a flag at the start of the program that tells what mode to run in, but is usually in tacit if not specified
 
some commands might differ depending on the scheme used but I don't think so
@cairdcoinheringaahing yeah that could work, though the flag is included in the bytecount and might offset any advantages of using the other system
 
@HyperNeutrino no it's not included anymore
 
:D
I might do that I guess, idk
 
4:41 PM
actually there's a new consensus that says it represents a new language
 
oh cool. that works too
 
CMC: Given a 1d array (e.g. [3, 4, 13, 9, -2]), return an array of pairs of original elements and indeces (e.g. [[3,1],[4,2],[13,3],[9,4],[-2,5]]). 0 or 1-indexing is acceptable.
 
so enumerate but backwards?
 
Jelly, 2 bytes: żJ
 
@Pavel ĖU Jelly
...
 
Anonymous
4:43 PM
@Pavel What about duplicated elements? e.g. [3, 2, 3]
 
Anonymous
Should that be [[3, 1], [2, 2], [3, 3]]?
 
Python: lambda x:[[e,i]for i,e in enumerate(x)]
 
@Pavel Canvas, 3 bytes
 
thanks
 
Anonymous
4:44 PM
@Pavel Actually, 3 bytes: ñ♂R (no deduplication)
 
anyway gtg o/
 
@Mego The way I wrote it, yes, but I think a revision to the CMC to account for duplicates might be more interesting.
 
I think where it says "original elements" it's a bit ambiguous
 
Anonymous
@Pavel Not really. Just prepend a stable uniquify.
 
Anonymous
Or grouping, if it should be [[3, [1, 3]], [2, 2]]
 
4:47 PM
@Pavel Python: lambda x:[*zip(x,range(len(x)))]
@EriktheOutgolfer I think it just means original array
 
CMC revision: When there are duplicate elements they get process like this: [3, 2, 2, 3] => [[3, 1, 4], [2,2,3]], so when there are duplicates each index of that element is listed in one group.
@Mego So like that
 
@Mego bah, jelly's Ġ makes that trivial too, although I don't know for other languages
 
Anonymous
@LeakyNun 2's zip returns a tuple, and 3's zip objects are acceptable iterables, so [*...] isn't needed
 
@Mego thanks
@Pavel :o
@Pavel Pyth, 7 bytes: {m+dxdQ
 
@Pavel Jelly, 6 bytes: Q;"ĠṢ$
 
4:51 PM
@Pavel C# + System.ValueTuple: x=>System.Linq.Select(x,(e,i)=>(e,i))
 
Hmm. So I have a solution to the "Find the Rank of a Word" challenge, but it's significantly longer than even the Java implementation. Should I still post it?
 
yes
(powershell right?)
 
Right
 
if there isn't any already, why not contribute yours? you put effort on it, didn't you?
 
True. I just feel weird about being outgolfed by Java.
 
4:59 PM
someone who does it in, say, brainf*ck will probably happen to be in the same position ;)
@LeakyNun {sMxBR why does it have to expand to {sMxBRdQ rather than {sMxBRQQ :(
 
@Pavel Posted here. CC @LeakyNun @EriktheOutgolfer.
(Title suggestions welcome)
 
1
Q: Enumerate an array, grouping duplicates

PavelThe objective of this challenge is to take an array of positive integers, and enumerate its indeces, grouping like elements. An enumeration without an duplicates is done by just outputting an array of pairs (value, index), for example, [3, 4, 13, 9, 2] => [[3,1],[4,2],[13,3],[9,4],[2,5]]. Howev...

 
6:01 PM
@NewMainPosts I keep thinking this should be easy in Retina (either 0.8.2 or 1) but I keep getting stuck :-(
 
6:56 PM
1
Q: Converting ISBN-13 to ISBN-10

BMOIntroduction In this challenge your task is to generate the ISBN-10 code for books given its ISBN-13 code, assuming that such a code exists. Such an ISBN-13 code consists of several parts: 978-G-GPPP-PTTT-C The letters G (group), P (publisher), T (title) and C (checksum) all stand for one dig...

 
00:00 - 19:0019:00 - 23:00

« first day (2547 days earlier)      last day (1178 days later) »