anyone have any ideas how to be mapping numbers from 0 to n!-1 to unique permutation of 1...n specifically for desmos, i know there is factoradic thingy but thats hard if not impossible to do in desmos cuz u removing stuff one at a time from a list to get permutation. maybe theres some purely mathematical formula of sorts that exists
"this requires maintaining a list of available elements, from which each chosen element is removed" thats pretty much the conversion i was saying earlier
(from wikipedia btw)
not sure if its exactly what i was thinking but it seem pretty close
if so it doesnt seem feasible to do in desmos
cuz u need to keep track of previous state of the list and keep grabbing based on the factoradic digits, that require some recursion stuff i think
sad, ok i think im gonna stick with my cursed base-n conversion hack for now, not really that golfy but at least i got it working lol
@AidenChow with this graph i basically take in l and to find permutations of 1...l, loop through 0 to l^l convert to base l and check if its a permutation with unique length = l, if done correctly it should return l! cuz there are l! permutations of 1...l
very inefficient but at least it show my method would work
man i can already see it, this code will only run for like the first test case and nothing else
hey guys so i just realized that some of the answers including link bubbler-4.github.io/piet have broken links, there are only 20 links to edit it seem like but i just want to say that cuz itll flood the homepage if i edit all at once now
wait i just realized i never finished this lol
im gonna do the rest of the edits now hopefully thats ok with yall
According to this XKCD comic, there is a formula to determine whether or not the age gap in a relationship is "creepy". This formula is defined as:
(Age/2) + 7
being the minimum age of people you can date.
Therefore a relationship is creepy if either of the people in said relationship are you...
'Cause I kinda wanna set a natural-language challenge that asks to phonetically reverse the input, and title it "Turn me on, dead man". It's a reference to The Beatles – Revolution 9.
@DLosc this was based on an incorrect assumption about how type statements worked
I thought you could abuse them to write functions like type f[x]=x+2 and then call it with f[3] == 5 but in fact f[x] just gives f[x] (a types.GenericAlias)
@mousetail japanese written in all kana would afaik only need special handling for は, へ, and いう... but it would also be nontrivial to actually determine if it's seeing those if it's written in all kana, though i guess it would at least be simpler (but not foolproof) if you add spaces for word boundaries old video game style
@Joao-3 you can hate gravatar but there's no need to hold something against people who like those patterns or don't want to set their avatar to something different
> Sometimes, there isn't anybody talking in chat. That's perfectly fine. Don't send messages just because the room is quiet.
CMC: Write a StopLoop compiler. In StopLoop, the empty programme immediately halts (while printing nothing) and any other programme never halts (again, while printing nothing).
For some reason I keep adding that space every time, it's like the 10th time someone has suggested that specific code on one of my answers, I really should know better by now
@Joao-3 PSEUDOCODE: split list into sqrt(length(list)) parts. Apply bogsort on each until they are all sorted. concatenate the lists together. bogsort this list.
i almost wonder if there's some way to do it with a grade up as the final step but the 2,2,2 case wrapping around seems to more strongly require actually building it iteratively/with a scan