Write a set as a union of ranges
In this challenge, we define a range similarly to Python's range function: A list of positive integers with equal differences between them. For example, [1, 2, 3] is a range from 1 to 3 with a skip count of 1, because there is a difference of 1 between each item, ...
Yeah... brute force is probably going to be the way, although the number of ranges seems to be roughly proportional to √n on average so maybe there are more elegant approaches
@lyxal Annoying. I don't remember how long it takes before it logs you out automatically, but I've definitely had to log back in multiple times recently (across a couple different devices). Might be because I haven't been committing anything lately.
Right now I've set up a new KeePass database that can generate a TOTP (6 digit number) that I can use to log in. The main annoyance is that now every time I want to log into GitHub, I first have to open KeePass and log into that database, AND I have to make sure not to lose the KeePass password.
So I've put the KeePass password in my password manager so I don't forget it like I forgot my previous KeePass password. The same password manager that has my GitHub password. Seems less than ideal, though it's technically still 2FA because the KeePass db is on my computer so you couldn't get into my GitHub if you only had my password manager and not my computer.
But that also means I can't log into my GitHub account on any other computer unless I bring this computer with me... :P
Yet another instance of anti-people-without-smartphones discrimination
@lyxal Yeah, so then there's also the question of where to store those. On my hard drive? In my password manager? Copy to a piece of paper that I hide in a shoebox somewhere?
Is it an actual security risk, or is it more of "This might not work if you're traveling in some obscure corner of the world"? B/c there's not much chance of that for me
And there's also the point that I don't think any of my GitHub contributions are important enough to require this amount of security... but maybe there's something else nefarious someone could do with my GitHub account, IDK
New problem: Git won't push to GitHub, says authentication failed. I go into Git Bash to investigate. Apparently ssh-agent isn't running. Okay, start that up and double-check that my private key is there. It says "The agent has no identities." Rrrhgehghg!
Why must things stop working when you don't use them for a few months?? (I know, it's probably for security reasons. But it's darn annoying. My bank did something similar to me recently.)
@NewPosts I have a kinda-cool answer to this but also I don't want to post it and ruin the day of someone who's been working on theirs for the last 12 hours
I wouldn't be surprised if my Pip answer ends up winning. The scoring criterion isn't particularly fair towards later answers, as you have to not only encode the last answer but all the previous answers - and while there's some redundancy in that it's still not easy. For what it's worth the answer I'm working on compresses 223 bytes of previous answers into 133 bytes, which I'll take.
Right. I thought I was gonna have to do something to differentiate the second and third repetitions, but it turned out my earlier choice of space placement gave it to me for free!
glancing at it i thought the # was the syntax that does the uhh number conversion or something. i dont know im half awake. now i get it though thats a really clever optimization lol
Implement the RegPack decompressor
The JavaScript compressor RegPack uses a very simple string compression algorithm. Given a piece of code, it will make a list of characters that aren't used in that code and use them to delimit repeated strings that are inserted back into the string.
To show how...
Barbrack
Your task is to write a program or function that takes a non-negative integer (in decimal or any other convenient base for your language), and output a number in the numbering system Barbrack.
What's that?
Barbrack is a numbering system I made up that can represent non-negative integers....
Factorial Numbers
Write a function to print "factorial numbers" as defined in this xkcd comic.
You will take an integer number N as input.
You can either
output the factorial number representation of N
output the factorial number representation of all numbers up to and including N in order (note...