« first day (3085 days earlier)      last day (1607 days later) » 

12:38 AM
can one express a path from source permutation to a target permutation in terms of factorials?
2 hours later…
2:42 AM
@Rick path from source permutation to target permutation is just a permutation, and you can express that as a number <n! in factorial base [en.wikipedia.org/wiki/Factorial_number_system]
@lirtosiast consider an edge between any two permutations as a single swap between characters
I think the link is broken
oops remove the bracket at the end
@Rick the edge is just adding (xi-xj)(i!-j!) in factorial base then
@lirtosiast can you explain a little better here is an example "abcdefgacb" -> "babcdefgac". To go from "abcdefgacb" to "babcdefgac" requires a minimum of 7 swaps.
@Rick are you trying to compute this minimum?
2:53 AM
golfily, right?
I think the characters in the string not being all distinct might complicate things
d-> c, c-> a, a->g, g->f, f->e, e-> d someone told me that this cycle creates an upper bound
but they had no formal way of explaining it
> In the general case, you should simply subtract the number of cycles from the permutation length, and you get the minimum number of required swaps. This follows from the observation that in order to "fix" a cycle of N elements, N-1 swaps are enough.
Consider the permutation a b c -> b c a, which has the single 2-cycle (a->b->c); you can create this permutation in 2 swaps by swapping a <-> b and then a <-> c.
In general an N-cycle can be created with N-1 swaps, and if the permutation is a product of multiple independent cycles you just create each cycle independently.
this was the answer I was looking for. but can we frame in such a way that we the min number swaps just based on the number of characters and their repetitions?
constrained by a target string
for example
if we had a grid that was 3 by 10 and we wanted to get to some destination
can we frame that path as being some number of steps N W E
such that
the number of ways can be calculated over the total number of ways possible 10!/n! etc where n
are all the factorials of each letter which appears more than once
@lirtosiast actually sort of did that already. It's baked into your original statement. thank you !!
3:47 AM
I have a strange habit of saving every new page I visit to the WayBack Machine
2 hours later…
6:01 AM
It's apparently quite difficult to have three different colors for visited, unvisited, and hover that can both be recognized as distinct from each other and as separate from black and legible at all.... and look nice. I understand the reasoning here but I'm concerned that what we've got now may be the least bad option. Underlining isn't possible in markup, so there will never be black underlined text unless it's a link. Can we make this work as-is? Or are there suggestions of what to do instead? We have limited color choices with the theme... Thoughts? — Catija ♦ 34 secs ago
^^^ Please let me know what y'all think about this. I want to find a solution but I've been poking at it with Lisa and we're having a difficult time finding a better option that meets all of the needs without adding a completely unrepresented color to the theme... or using the blue from the medal ... which y'all already aren't super fond of, depending on who you ask.
Even the default beta visited links are nearly black... so the only real change here for y'all is that it's green nearly black rather than blue nearly black.
6:33 AM
@Catija Why do we need a separate colour for hover?
It's the standard on the network and... when we don't have it people sometimes ask? Also, the green used for hover looks too-bright when we try using it for visited.
We have the added problem that there's a network-wide default green on every site - the green used to indicate when a question is answered/accepted... so we have to avoid clashing with/repeating that color, too.
@Catija Change the standard! Hovering is increasingly becoming obsolete due to touch devices, and it serves no purpose other than bling.
7:16 AM
@Adám hm... that might have to do with accessibility issues though, especially if somebody has set the screen's contrast higher than 50% because of reduced vision, for example; I don't think it's necessary for touch devices, though, because the user directly touches the link and doesn't move another pointer to click it (unless there's a Bluetooth mouse connected to the device)
@Catija "there will never be black underlined text unless it's a link" that would be confusing, especially for new or anonymous users who may not know what is and isn't supported as post text yet (you need pretty good vision to discern between "almost black" and black), and they might think that links are disappearing after they click them
1 hour later…
8:43 AM
@Catija I don't get what the difficulty is. I would propose leave the unvisited and hover as they are now, just make the visited not so dark. What's the problem with that? (Honest question, I don't quite get it)
In codegolf.meta.stackexchange.com/questions/7987/…, for example, the dark colour for visited links is just fine. Dark, but doesn't look black
And the hover colour is just slightly lighter than the unvisited colour
So, something like that, but in green
First is hover, second is unvisited, third is visited, in Meta
@LuisMendo Especially considering that green is the color the human eye has the best sensibility for. Shouldn't be hard to find a dark green shade that's appropriate
9:09 AM
^ standard link in the middle is a bit too bright for my taste
Maybe slightly darker.
Why is orange so legible when at full brightness on white?
Because orange is the new black
9:55 AM
@Adám I don't think that goes well with the theme tbf, it's not quite a field green
10:51 AM
@Adám I like current green (unvisited). And it's probablhy best not to change it. My proposal is just to make current visited less dark:
The first two are as they are now
@Fatalize Good point, yes
@LuisMendo Yeah, that's good.
@Catija ^^^^
First and second could even be lightened a bit if more contrast with the third is needed
11:51 AM
@LuisMendo they're not discernible at actual text sizes. You can't judge by the bold, header size.
Why is it so important to know if you're already visited a link?
Having a visited color is one of the biggest requests I get on site design posts. When we redesigned the site layout last year, most of them got removed (accidentally). Almost every site that I realized had that happen asked for it back. People (including me) like the breadcrumbs of knowing what questions they already visited.
My browser never saves any history, so I never see visited links anyway
@Catija I highly doubt that the bottom one isn't discernable from the middle one at smaller sizes
It's about meeting accessibility requirements. What's visible to some isn't visible to all.
@Catija I can clearly differentiate them at 30% zoom; x-height of about 1 mm or so.
11:59 AM
@LuisMendo For example, the top two here are barely visibly different to me an I have excellent color vision. For others, they're identical.
Q: Find the hardest OEIS sequence to golf!

Leo TenenbaumThere have been a couple of OEIS-related questions recently, so here's another: Pick a sequence from the Online Encyclopedia of Integer Sequences, and write a full program or function which computes the sequence in one of the following ways: It prints every term in the sequence in order It tak...

@Catija I've just tried them with a colour-blindness simulator. All types of colour blind people should be able to distinguish them if they don't (!) use colour correction software.
Not about color blindness. People with reduced vision but who still use the site without screen readers are the people I'm talking about here.
@Catija Such people probably have hi-contrast/magnifying settings or software.
@Catija The top two are the current colours. I only changed the third
@Adám Same here
12:16 PM
@LuisMendo I didn't say the top two are the problem... the second reference is of the orange example.
Ah, sorry
But the orange example is current meta, no?
Anyway, all we are asking (and there's strong consensus, 63/0 votes) is a slightly less dark visited link... shouldn't be a problem
It's not a problem if we don't care about meeting the guidelines for accessibility, but we do.
@Catija So the guidelines state that visited/unvisited links must be discernible, but do not require other difference between links and non-links than the underlining?
12:23 PM
Btw, if a link doesn't contain text, then it isn't noticeable at all, is it?
That's kinda out of scope but probably something we should look at... are you talking about images?
@LuisMendo Colorblind guy here: first two are very similar
@Catija Yes, and I think mathjax as well.
@Veskah How about in this one:
2 hours ago, by Luis Mendo
user image
@Adám Rubbish, top two on white background are very hard to read
@Adám discernable, 2 and 3 are pretty close together
12:34 PM
But we don't have to have everything in green, right?
@flawr I was just thinking. Maybe the hover colour could be entirely different, which leaves room for both visited and non-visited to be a bit brighter.
Or maybe make the visited brown?
We'll make the hover color blue, then. ;)
@Catija Yup, that's actually good, as blue is link-colour.
I agree, blue would be nice
It doesn't matter much for the over-all "look", since you usually don't hover, and certainly not over all links at once.
@Catija Then you'll brighten both visited and unvisited?
12:37 PM
Ok. That's possibly a better choice. We were talking about making visited blue but maybe hover is better since it's not on screen constantly.
@Adám True to an extent, you still don't want clashing or garish colors, even if just on hover
@Catija Exactly.
@Adám I need to check with Lisa, but that'd be the idea, I think.
@Veskah It can't be that bad. Blue and green are not enemies, and we (imho, unfortunately) have blue in our logo.
Oh, I'm not objecting to blue, just saying in general
12:39 PM
I think blue-on-hover is a nice confirmation to the user that this is indeed a link, despite it not being "link-colour".
@Catija How would you test the approval of the style change? Meta post with a mock-up then roll-out if thumbs up?
To be honest, we'd just change it and see if people responded negatively. It's one of those things you need to see in person.
Fair enough
One could make a js/html script inside a post:)
1:42 PM
The three blue colours in Stack Overflow are not that different among themselves. They are probably more similar than my green proposal above
I'm not defending my proposal specifically, just pointing out that achieving a large difference between the three colours hasn't been that much of a "red line" in other sites
@Catija ^^
And thanks for the time you are devoting to this :-)
Testing a smaller size for fair comparison:
We weren't trying to address accessibility. It's likely that they'll change in the future, particularly if people complain. I'm not saying we won't settle for something less clear... just that we'd like to avoid it.
@Catija Make it random RGB values each time the user loads the page. That way, if they don't like the current setup, they can just refresh :^)
Random RGB for each letter in the link.
Someone tried and failed to reinvent == true in bash: if [ 0 -eq $(git merge-base --is-ancestor $COMMIT_ID HEAD) ]; then echo "true"; else echo "false"; fi
1:59 PM
@AdmBorkBork Dennis' Technicolored Dream Link
"[dcc32 Fatal Error] project.dpr(1): F2084 Internal Error: AV5005C9D7-W00000000-1" well thank you, Delphi. That was enlightening.
2:12 PM
> W00000000
At least it's a very happy and enthusiastic error message.
2:22 PM
Fun fact, it says the error is on line 1 (which it certainly is not) but it points to a blank line, 5235. The file only has 5229 lines of code.
@LuisMendo hm, I suspect that the problem is that you need to check this on non-bold letters, not just a smaller size
@DJMcMayhem It might be interesting to have a version of your CnR where p is the hidden string and s is revealed.
So basically, find the way to wrap this code in more code to make it valid
yeah, it definitely would be interesting for brain-flak
2:53 PM
@EriktheOutgolfer I have done some tests without bold:
Again, I only changed the third. The top two are the current colours.
I'm mot sure if the colour that I chose for the third is the same as in the bold case (I'm doing it with a weird procedure involding... Word)
can't really check that, too much blur in the screenshot :D
3:08 PM
CMC: This answer shows you can construct cubes with a single loop can you construct 4th powers with a single loop?
3:26 PM
@SriotchilismO'Zaic Reminds me of this
Yeah It is the sort of thing where once you have the first 4 you think the 5th will be easy but I'm not even sure if it is possible.
just like equations...
3:55 PM
@SriotchilismO'Zaic not optimised: tio.run/##SypKzMzTTctJzP7/…
yeah I was coming to a similar conclusion myself
I am now pretty confident you can calculate any polynomial in one loop
How do you take input with that?
It's a p s combo like the CnR
It can be converted to a loop
Ah, which part is the p and which is the s?
p is (((()))<>) and s is ({}({})({})({})({})({})({})({})({})({})({})({})(({})[][]())[[][]]()()())
3:59 PM
@SriotchilismO'Zaic Also, that terminology is A) really funny (the p s combo) and B) could probably fit in a ton of different challenges
Of course, there is a better way to ×12
Yes ((((({}))){}{}){}){}
CMC: Write a "p s combo" that prints an NxN square of asterisks, where "N" is the number of repetitions of s
0 repetitions of s can print either nothing or a 1x1 asterisk square, either one is acceptable.
@H.PWiz (((({})){}{}){}){} if you want to consume the input.
Score is p * s, lowest score wins
4:03 PM
Does anybody recognize primes in this:
ant.png = 144 x 56
badger.png = 40 x 146
cat.png = 151 x 154
dog.png = 154 x 143
durian.png = 300 x 470
flamingo.png = 164 x 162
fly.png = 157 x 155
fox.png = 157 x 164
hippo.png = 151 x 156
koala.png = 147 x 151
lion.png = 164 x 145
man.png = 600 x 608
mushroom.png = 157 x 170
panda.png = 56 x 143
polarbear.png = 100 x 147
wasp.png = 157 x 155
worm.png = 155 x 141
Ignore the file names
@DJMcMayhem p and s being the same as the CnR thread?
P is some fixed program, and S is a substring that is repeated a variable number of times
Actually, that just gave me an idea for an answer to the CnR thread
The shortest modification of H.P.Wiz's s is ((((({})){}{}){}[[]]){}(({})[][]())())
You must have also changed something else. Can you show it in situ?
Oh no I think you are right
4:13 PM
@DJMcMayhem Naïve Dyalog APL answer, score is 36: p is (2⍴0)⍴'*'; s is 2⍴1+ (or +2⍴1, both work).
Oh wait you are multiplying by 11
Yeah, I had in my head that I multiplied by 12, because I was doing so earlier
You can either multiply by 12 and zero out the n² -> (n+1)² or multiply by 11 and cancel out only part of n² -> (n+1)²
That should work: ({}((((((({})))))){}{}{}{}[[]]()){}{}(({})[][]())())
Ok ({}([[]](((((({})))))){}{}{}{}){}{}(({})[][]())()) takes off 2
5:15 PM
@MilkyWay90 Yeah man. I love the prime number 100
5:49 PM
@Poke 100 isn't a prime number
I think he thought you meant all the dimensions were prime
(That's a weird intro to a sentence)
6:21 PM
@Veskah is that not what he meant
"Does anybody recognize primes in this" seems to me a subset as opposed to all
6:38 PM
Some jokes don't hit
2 hours later…
8:22 PM
Q: Find X,Y,X coordinates from index

PrincePolkaIntroduction I began studying the Collatz Conjecture And noticed this pattern in the numbers that go to 1 in one odd step, like 5,10,20,21,40,42... and looke in up on OEIS and found this formula. \$floor(sqrt(4*n + 1)) - 1\$ Which can plot these numbers in their natural order like so; \$\f...

8:44 PM
Is it just me, or did the achievements drop-down change styling? Didn't it become bolder or bluer or something?
I was just about to ask the same thing. I noticed that too
Yeah, it's... a bug. Well... kinda
Looks like an... unintended feature?
There's an MSE question about it... essentially, it's only supposed to be bold when the items are unread... but it's getting fixed. The inbox works by design.
Q: Did someone break the font?

TetsujinI just refreshed a couple of different SE sites & the Achievements drop menu seems to have gone all-bold. I'm hoping that's not intentional. Before... After... [different Stack as I can't go back to the previous version] Inbox affected too, but only for Unread items... After comments -...

And it looks fixed. :D
9:00 PM
yes, it's fixed
rest assured, colleague got your back :P
9:18 PM
it still seems brasher to me though, the previous version was less glaring imho
huh? if you don't have any unreads there's no difference at all
(basically the blue background was too light and might've looked like white for people with reduced vision)
9:43 PM
A: Sandbox for Proposed Challenges

Geza KerecsenyiRecamán's sequence (A005132) is a mathematical sequence, defined as such: $$A(n) = \begin{cases}0 & \textrm{if } n = 0 \\ A(n-1) - n & \textrm{if } A(n-1) - n \textrm{ is positive and not already in the sequence} \\ % Seems more readable than %A(n-1) - n & \textrm{if } A(n-1) > n \wedge \not\exi...


« first day (3085 days earlier)      last day (1607 days later) »