« first day (4626 days earlier)      last day (68 days later) » 

1:47 AM
A: Sandbox for Proposed Challenges

emanresu AWrite 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, ...

^ feedback would be nice
1:59 AM
it seems like a fun cool idea im just not good at these kinds of "smallest possible" challenges kgjsdfg
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
2:22 AM
@NewPosts I was thinking of doing something similar as I was going to sleep last night
Luckily my idea is still unique :p
I'm working through my backlog of challenge ideas
i should work on my old sandbox ideas
i still think erasure poetry would be cool n stuff im just still hammering it outtt
is it common for JS quines to use console.log with %o?
i just used it for a coffeescript quine
Never seen that one before so probably nope
well if not it definitely should be used lol, it JSON stringifies the value, wrapping string in single quotes and escaping quotes
2:30 AM
Looks like it doesn't work in JS?
i only tested on node
imgur isn't working for some reason, I tested it in browser console but I guess it's a node thing
@emanresuA works for me in chrome, must be V8
Looks like it's the best non-function-stringifying JS quine, neat
maybe i should post it separately from my coffeescript quine?
2:36 AM
Probably yeah
i'll post it in a couple minutes
2 hours later…
4:14 AM
4:34 AM
So does anyone have advice for the least annoying way to set up GitHub's 2FA? I'm kinda pulling my hair out over it. Note: I don't have a smartphone.
do you have a pin lock on your computer?
because you might be able to use that as a passkey
e.g. windows hello
IDK, maybe I could
I have Windows 10
that might work
because every other form of 2fa requires a phone
maybe some form of android emulator?
oh actually
4:38 AM
@lyxal Can I set that up to not bug me when I log into Windows, but just supply GitHub authentication?
probably not
but forget that
much easier solution has been found
authenticator browser extension
one of those things that gives you a new 6 digit number like every 10 seconds
ironically github 2fa is only locking me out on my phone :P
you need it for when you need to do sudo mode things
like account modification
Oh, it doesn't do 2FA every time you log in?
...oh wait i totally forgot i had it set up with an authenticator app already and it just doesn't send me push notifications when i try to use it :p
4:42 AM
@DLosc that too, but most of the time you should stay logged in
that is, if you don't log out constantky
@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.
strange, i'm almost never signed out of github
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
there's always the recovery codes option, but those are one-use codes you'd need to reroll every 10 uses
also if you don't have a phone, how do you call people/take phone calls?
@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?
4:48 AM
that last one is typically what they say to do yes
i think
@lyxal I never said I didn't have a phone ;P
does it have a number you can receive texts on?
Yes. Although GitHub keeps strongly discouraging that avenue.
don't let that stop you :p
but seriously don't let that stop you
if you have it, just use it
considering you're probably not the only one in a situation like this i doubt they'll ever fully phase out sms 2fa
4:51 AM
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
it's less secure than most 2fa options
but still better than having the second factor on the same device
4:52 AM
I mean, I would also prefer not to give out my phone number to one more place, if I can help it...
@lyxal i am thankful for that site's sidebar
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
They could set up a sponsorship account and use your influence in the code golf/esolang community to con people into donating
It'd be a con only because the funds wouldn't be going to you
Notice: Unless you hear otherwise from me in TNB in the future, I will never ask for funds on GitHub
There. Now they'll also have to get into my StackExchange account. :P
2 hours later…
6:45 AM
@DLosc It's a real security risk. SMS is not encrypted so someone in your area could read the message
Yeah, decided not to do the SMS thing.
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!
Guess you'll need to add your keys again
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.)
1 hour later…
7:56 AM
@lyxal yeah I use a browser extension to log in to google 2fa to authenticate to stack exchange
8:38 AM
@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
ah answer chaining
I guess if my previous answer's still the last when I wake up I'll post it
CMC Output the complete list of functions that map from [0,1,2] to [0,1]
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.
@Simd isnt that undecideable
8:48 AM
@thejonymyster there are 8 of them :)
i dont think i understand the question. What is a function?
f1: {0 -> 0, 1 -> 0, 2 -> 0}
f2: {0 -> 0, 1 -> 0, 2 -> 1}
f3: {0 -> 0, 1 -> 1, 2 -> 0}
f4: {0 -> 0, 1 -> 1, 2 -> 1}
f5: {0 -> 1, 1 -> 0, 2 -> 0}
f6: {0 -> 1, 1 -> 0, 2 -> 1}
f7: {0 -> 1, 1 -> 1, 2 -> 0}
f8: {0 -> 1, 1 -> 1, 2 -> 1}
oh just i/o pairs not the actual process
guess i should have figured that one out
@Simd is this acceptable: Regenerate, 20 bytes: 0:[01] 1:[01] 2:[01]
8:54 AM
@thejonymyster yes!
[¬‿¬] yolo swag god
theres probably a language that can compress that further, getting the 0 1 2 bit right
or um
i phrased that poorly but what i mean is theres probably a lang that lets you do some sort of like {012}:[01] type jazz
but without being as specialized as regenerate i find it hard to imagine itd end up shorter unless its like
idk id love to see this lowered
vyxal, work your magic
9:45 AM
8 if the pairs can be swapped
1 hour later…
11:39 AM
@Simd Jelly, 6 bytes: 2ṗ3Ė€’ (assuming this is a reasonable output format)
11:56 AM
These are very impressive
5.375 with vyncode if so
12:14 PM
@mathscat huh, the behaviour of ė there doesn't match its docs
it's documented as enumerating starting from 1, but the actual output is enumerating starting from 0
(apart from 0-based versus 1-based corrections, your Vyxal is the same as my Jelly, I think)
I love it when tests take 6 hours to run
1 hour later…
1:32 PM
@Simd 05AB1E, 6 bytes: T3ãεāø, assuming this is a valid output format
1:54 PM
@ais523 seems to be
it's basically lyxal's implementation but with combinations instead of cartesian power
aren't ordered-combinations-with-replacement and cartesian power the same operation?
ig, but cartesian power is a byte longer
…in that case, why does Vyxal have two different builtins to do the same thing?
or do they behave differently in some context?
@CommandMaster cool
oh, seems that interprets its left argument as a list of digits, and ÞẊ interprets it as a range
but ÞẊ is still redundant to a range builtin and in most contexts, I think
2:19 PM
@ais523 yup
the former also has some overloads
any, list results in something else
4 hours later…
5:59 PM
I just monkeypatched a builtin in python!!!
oh wait it doesn't change literals.
Yea nothing can change literals
6:35 PM
hi @mousetail
look at this python code : bpa.st/SCUQ
Is it possible to rewrite the loops that create B in a less clumsy way?
ideally it would take time proportional to the size of A
You don't need the if so you can remove one level of indentation at least
@mousetail oh!
that's a good start
but how can you remove the if?
oh I see
The next loop would be empty anyways
You could combine any combination of nested loops with itertools.product
but can it be done in one or two passes somehow?
what upsets me is that it is writing to the same place in B repeatedly
it should be for k in range(i, i+A[i,j]+1): in fact
which might mean we need the if
Sure but it won't be any faster
6:48 PM
I was thinking that maybe you could first mark the corners of the righthand border of the True values
and then fill them in
which I was hoping would make it faster for larger matrices
Do you care about the entire shape or just want to calculate the bottom right corner?
I want the whole matrix of Trues and Falses
2 hours later…
8:32 PM
@thejonymyster Sadge, the clever answer is 2 bytes longer: (( ${$2+1}!0):[01]){3}
This is disappointingly difficult to golf in Pip
The stupid-simple iterative solution is 17 bytes: FatFbtFctPEN[abc]
If a bunch of extra list nesting is allowable, here's 15 bytes: {EN(gAE_)Mt}MC2
8:47 PM
@DLosc i had forgotten the syntax lol sadge indeed
There's no cartesian power (yet), but repeated cartesian product + flatten comes in at 13 bytes: EN*FL*tCPtCPt
@thejonymyster HOLD THE PHONE. I just stumbled upon something awesome.
Regenerate, 17 bytes: (( #2!0):[01]){3}
oh wow
i had a feeling there would be some kind of clever trick but what exactly is going on there (eyes)
9:06 PM
On each of the three times through, group 2 does something different:
$2   #2    New $2
n/a  fail  0
0    1      1  (note the leading space!)
 1   2      2
ohhh fun!
so does the space add one?
or uhh hm
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!
ah ok
is that like... intended behavior? or whats the underlying cause lol
#2 is "length of last match of group 2"
ah i misremembered
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
9:11 PM
It's quite a fortuitous choice of domain--anything other than [0,1] or [0,1,2] wouldn't work
perhaps that was intended all along
while were talking about regenerate, were you going to add lookaround anytime soon :PP
first I have to fix my GitHub access :P
Imagine just not having used github for the last month
A: Sandbox for Proposed Challenges

emanresu AImplement 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...

@emanresuA * 8 months =P
9:16 PM
^^ feedback appreciated
10:03 PM
Q: Convert a non-negative integer to Barbrack

SomeoneBarbrack 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....

@DLosc well that's what I'm doing right now how else do you think I'd be using SE chat on mobile?
@lyxal Yeah, so, keep doing that. You need to hold the phone long enough to see my Regenerate solution. ;)
When should I stop holding it?
When you've seen my Regenerate solution, clearly. Not sure what's hard about this. :P
I've already seen it
You never said </hold the phone>
10:13 PM
Simon says you can stop holding the phone whenever you desire
10:29 PM
How can I trust this Simon?
10:45 PM
Simon is the root authority. If you decide not to trust Simon, you can never trust anyone.
1 hour later…
11:57 PM
A: Sandbox for Proposed Challenges

Benjamin WangFactorial 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...


« first day (4626 days earlier)      last day (68 days later) »