« first day (2317 days earlier)      last day (2534 days later) » 

2:00 PM
@Riker ah of course why I didn't think of that
 
hi all
 
Okx
Is there a meta post on 'when answers should be downvoted'?
 
I have an idea for a challenge but I need some help
 
Okx
Sandbox?
 
@LeakyNun but what would count as a "snippet" in Vim?
 
2:02 PM
@KritixiLithos no idea
 
@Okx I could make a start there.. could point
good point
 
I wonder if I could combine vimscript and vim into one submission. If that is valid, I might be able to get one more number easily
 
-17
Q: Downvoting needs to change

Beta DecayAs shown by a recent challenge, once a few people have downvoted a question (say, three or four) everyone else thinks that they should downvote too leading to incredibly low scores. I think we need a reform on how we downvote and/or what we downvote on. This will stop people from becoming dishea...

 
Okx
'consider leaving comments when downvoting'
 
2:24 PM
D: it's -17
 
Can any python expert find a way to make 14 for this answer?
 
so... what's the best way to make a good challenge from codegolf.meta.stackexchange.com/a/12706/9206 ?
I would like to avoid running code on my computer as I only have a windows laptop so I assume I won't even be able to run most code
 
@Lembik maybe you should define what a Hamming distance is in your challenge
 
@KritixiLithos will do
 
@Lembik you don't need to run the code on your computer if it is
 
2:31 PM
@LeakyNun it's not very interesting as code-golf
it's interesting if you have to work out a quick way to solve it
 
so you intend to make it ?
 
@LeakyNun well that would be good but can you do that without volunteering to run everyone's code?
or could it be code-challenge where the person who does it for the highest n wins?
 
@Lembik you can redirect every entry to TIO
 
Okx
If it's runnable on TIO, that has a timer
 
is that allowed? Seems it would potentially kill TIO
whose PC does it run on?
 
Okx
2:33 PM
A dedicated machine
 
@Lembik it won't kill TIO
 
what happens if two people do that at the same time?
 
there's no problem
 
won't the timings be wrong??
or is it cpu time that is timed?
 
Okx
there's 3 timers
 
2:34 PM
Please ask @Dennis for the details
 
I like the idea though.. could you help me do this?
I need to offer some nice way for answers to do this
 
@Lembik you just need to tell them to include a TIO link
 
has this ever been done before?
for fastest-code questions
 
I've no idea
 
maybe it makes a good meta question
 
2:38 PM
Hey vsauce Michael here
 
@Lembik you can just state it instead of pinging me and waiting until we're both here :P
 
@orlp :) I made a sandbox question about it in the meantime
 
0
A: Sandbox for Proposed Challenges

LembikCompute approximate correlations Consider a binary string S of length n. Indexing from 1, we can compute the Hamming distances between S[1..i+1] and S[n-i..n] for all i in order from 0 to n-1. The Hamming distance between two strings of equal length is the number of positions at which the co...

 
CMC: Find an unicode ligature with the most characters in it
 
@TuxCopter the bismillah one?
 
2:42 PM
This? ﷽
 
﷽ | arabic ligature bismillah ar-rahman ar-raheem (U+FDFD)
 
Ok lol you win
 
@Lembik so the pairwise hamming distances between the prefixes and suffixes of a binary string of length n?
 
@orlp yep
 
@Lembik Unfortunately, I don't think this is a very reliable way of timing code. Even if counting CPU time rather than wall time, two processes running at the same time can affect, e.g., speed of memory access, especially if the data should already be in the CPU's cache. Finally, TIO currently runs user-supplied code on two different "arenas", and while they have identical specs, one is consistently slower than the other, by a rather large margin.
 
2:43 PM
@orlp but capped at 1
 
guys, is it according to the stackexchange rules, allowed to downvote a question because you just don't like it?
 
@Lembik capped at 1?
 
@orlp it is min(1, Hamming distance)
 
Okx
@Dennis Why's one consistently slower?
 
ah
 
2:45 PM
so [0, 2, 0, 4, 0] became [0, 1, 0, 1, 0]
 
so basically
'how many prefixes/suffixes are pairwise equal'
 
hmm no.. I must have a bug
2 secs
 
@Lembik there's no reason to introduce hamming distance here
 
it is how many prefixes/suffixes have at most 1 difference
0 doesn't mean equal
I need to fix that
 
min(1, hammingdist(a, b)) <=> a == b
@Lembik hammingdist(a, b) <= 1
so 0, 1 becomes 1
everything else 0
 
2:47 PM
@LucH I'd say that's the most common reason. As long as it's actually about the question (not, e.g., who posted it), I don't see any issues.
 
right...I have a bug
let me fix it
 
@Okx I wish I knew. Gremlins, probably.
 
Okx
Gremlins?
 
what Dennis blames his sloppy coding to the creatures that often randomly mess up with TIO
 
@Dennis i thought you could only downvote because it was badly formatted or impossible etc, not just because you personally find it too easy while others do a great job at it.
 
2:49 PM
@Lembik if a, b are the prefixes / suffixes as i-bit integers
 
@orlp ok I have hopefully fixed it. It was completely wrong before
thanks for helping me spot that
 
then your expression is !((a ^ b) & ((a^b) - 1))
a^b is bitwise differences
x&(x-1) is 0 if x has exactly 0 or 1 bit set, otherwise positive
then we invert that with !
 
@Dennis if you have any suggestions for how to run challenges such as my sandboxed one they are gratefully received
 
0
Q: Is TIO acceptable for fastest-code questions?

LembikI like to ask fastest-code questions. However, I don't want to run everyone's code on my PC, partly because I only have access to a slow Windows laptop at the moment and I can't imagine I could even run most code in most languages. Is it acceptable to ask people to include a TIO link in their...

 
@orlp is this for my fixed problem?
 
2:52 PM
yes
 
great :)
 
the i prefix of a word w is w & ((1 << i) - 1)
the ith suffix is
(w >> (n-i)) & ((1 << i) - 1)
 
@LucH I'd normally cite the tooltip of the voting buttons, but those were made for Q&A sites, and PPCG isn't exactly a Q&A site. I base my question upvotes on whether I think that the challenge adds something to PPCG. I don't like questions that don't, so if I vote based of whether I like the challenge is debatable.
 
@orlp is the & here necessary?
I'm writing a similar implementation also
 
@LeakyNun strictly speaking, no
 
2:55 PM
@Lembik here is my implementation:
def f(n):
	res = set()
	for i in range(2**(n-1)): #WLOG fix the highest bit
		res |= {tuple([i>>(n-j) != (i&((1<<j)-1)) for j in range(n)])}
	return len(res)


for n in range(1,21):
	print(f(n))
Output:
1
2
3
4
6
8
10
13
17
21
27
30
37
47
57
62
75
87
102
116
 
@LeakyNun the != was wrong
 
It differs from your provided solution significantly...
@orlp why?
 
he edited his question
he wants pairs of prefixes/suffixes that have at most hamming distance 1
 
oh...
 
@LeakyNun yes sorry.. the description was screwed up before
 
2:59 PM
def is_power_of_2(n):
	return n&(n-1) == 0

def is_zero_or_power_of_2(n):
	if n==0:
		return True
	return is_power_of_2(n)

def f(n):
	res = set()
	for i in range(2**(n-1)): #WLOG fix the highest bit
		res |= {tuple([is_zero_or_power_of_2((i>>(n-j)) ^ (i&((1<<j)-1))) for j in range(n)])}
	return len(res)


for n in range(1,21):
	print(f(n))
1
1
2
4
6
8
14
18
27
36
52
65
93
113
150
188
241
279
377
427
Real time: 15.647 s
User time: 15.483 s
Sys. time: 0.027 s
 
good :)
 
Now the answers match
 
Okx
You might want to make a separate chatroom for all of this, it's getting a bit spammy
 
@Okx there isn't any other on-going discussions ATM
 
Okx
Never said you had to
 
3:00 PM
@LeakyNun is_zero_or_power_of_2 is the same without the if statement
0 & -1 == 0
 
@LeakyNun maybe just give the link instead of all the code
 
@orlp wow
 
but thanks for reproducing it!
 
I don't understand the fixing the highest bit part
 
@orlp well, S and ~S produce the same results for any bitstring S
 
3:02 PM
oh you fix it to zero
I was looking for the code to fix it to one haha
 
:)
 
@Okx no way to assign to variables in Neim it seems?
 
Okx
Planned feature.
 
ok
wow there are really 1-byte equivalents for 0-33? o_O
 
>>> def L(n):
...     V = set()
...     for w in range(2**(n-1)): # Highest bit is zero.
...         v = []
...         for i in range(1, n+1):
...             pre = w & ((1 << i) - 1)
...             suf = w >> (n-i)
...             v.append((pre ^ suf) & ((pre ^ suf) - 1) == 0)
...         V.add(tuple(v))
...     return V

>>> [len(L(n)) for n in range(1, 20)]
[1, 1, 2, 4, 6, 8, 14, 18, 27, 36, 52, 65, 93, 113, 150, 188, 241, 279, 377]
 
Okx
@EriktheOutgolfer One of the first features of Neim, and the first time it's been used :P
 
@orlp for i in range(2, n)?
 
@LeakyNun yeah you could do that
I wasn't going for speed
 
fastest-code seems interesting
 
@LeakyNun I think you need n+1 though
 
3:05 PM
@Okx it's even more than CJam! (CJam has 0-20)
 
now, instead of storing as tuple, we store as another bitstring
@orlp the results are the same
 
@LeakyNun that could be luck
 
my question wants to be fastest-code
 
oh no it's not luck, the full string is always equal to itself
 
Okx
@EriktheOutgolfer Breaking records here :D
 
3:05 PM
@KritixiLithos thanks :)
 
:o is your question sentient?
 
@Okx and how do you make a string? like, at least push codepoints to stack?
 
Okx
@EriktheOutgolfer You don't.
 
don't tell me what to do
 
@LeakyNun we can skip 2 as well, range(3, n)
 
3:08 PM
@orlp because 01 and 10 has a hamming distance 1?
 
@LeakyNun always at most 1
@LeakyNun how do you see the time?
 
@orlp for example, 2?
@orlp debug
 
@LeakyNun actually now I'm not so sure anymore
it just seemed from my tests it's always the same
 
@LeakyNun the time seems to vary quite a bit, when I ran it now it says ~12 seconds instead of ~15
 
@KritixiLithos indeed
 
3:12 PM
@LeakyNun oh no, I see my confusion
i = n-1 always seems to have more than 1 hamming distance
 
except for the all-zero bitstring
 
you'd think
oh no
I'm really silly
never mind =/
 
what? except for the all-zero bitstring, i=n-1 always returns false.
that's a nice observation. I don't get why you call yourself silly for that.
 
because that wasn't my observation >.<
 
whose observation was that?
 
3:17 PM
@LeakyNun I also don't necessarily think that's true
@LeakyNun yours, I had a simple bug in my code
 
@orlp mine was a typo. I intended it to mean j=n.
@orlp you're right. It only works if there are 2 blocks of contiguous letters
e.g. 000011111
 
@Emigna @PhiNotPi @WheatWizard Please don't cast regular delete votes on spam. Deleting a post via spam flags replaces the actual post with a stub, locks it, and puts the poster's IP on a network-wide naughty list, thus preventing them from using the same IP to post more than a couple of spam posts.
 
OK
 
I wanted to flag but I can't seem to flag from the review queue
 
@Dennis I don't see the problem
 
3:23 PM
Wait I think I'm thinking of something else, I don't see the post in the review queue.
@Dennis Whats the post in question?
 
@LeakyNun no need to do all mask arithmetic every iteration
>>> def L(n):
...     V = set()
...     for w in range(2**(n-1)): # Highest bit is zero.
...         r = 0
...         suf = w; premask = (1<<n) - 1
...         for i in range(n-2):
...             premask >>= 1
...             suf >>= 1
...             r <<= 1
...             pre = w & premask
...             r |= ((pre ^ suf) & ((pre ^ suf) - 1) == 0)
...         V.add(r)
...     return V
 
right.
 
@KritixiLithos How so?
 
0
Q: Bruteforcing a geo coordinate hash

BigZi'm posting this because of a question in a german python forum and i'm curios on how to perform even better. For non german speaking stackoverflow users: The question was about bruteforcing a geo coordinate from a SHA384 hash with and without parallelizing with concurrent.futures in Python 3 The...

 
Hm, I thought I reviewed that. I guess I just saw it. I'll flag it next time.
 
3:25 PM
@Dennis so what is the difference between just flagging the post and deleting it?
 
@WheatWizard You did review it. Does it now show up here?
 
@orlp look, we need new innovations. Our current "optimizations" don't really speed up the code.
 
I don't see the downside to deletion
 
@Dennis It seems that it's very hard to run a fastest-code competition currently unless you have linux ...
 
3:27 PM
@LeakyNun yeah I know I'm just messing around
 
@KritixiLithos I think I'm misunderstanding your question, because I think I answered it before you asked.
 
@Lembik then why don't you get linux?
 
@orlp well :) For the next few months I am restricted to a work windows machine
then back to linux!
 
@Lembik you can install a virtual machine
 
@orlp won't that screw up timings too?
 
3:28 PM
not that much
 
or maybe I should learn how to run everyone's code in Windows
 
@Dennis Ooh, I think I understand your point now. I thought "Deleting a post via spam flags" meant deleting without flags
@LeakyNun So why is it for i in range(2**(n-1)) instead of 2**n?
 
@KritixiLithos we fix the highest bit.
 
so you don't calculate when the highest bit is 1?
 
correct.
 
3:36 PM
why?
 
@orlp I'm thinking about reflecting S, but I don't really know how to implement it speedily
@KritixiLithos S and ~S are guaranteed to produce the same result
 
@LeakyNun there isn't really a fast way of doing it
or at least not a fast way that speeds up the whole thing, assuming I understand what you want to do
 
what I want to do is that, when we check S, we don't check its reflection
 
@LeakyNun it may be possible to iterate through all possible w in a different order such that all reflected S are at the end (and can thusbe skipped)
 
@orlp however, I have no idea how to do it
 
3:44 PM
something like a gray code
@LeakyNun I might make a PPCG challenge out of this :D
 
@orlp hang on! :)
 
@Lembik ?
I mean only for the reflected ordering part
not your problem
 
2
Q: Extended Truth Machine

caird coinheringaahingMany people know what a truth machine in programming is. But is time we kick things up a notch. Introducing, the extended truth machine! An extended truth machine takes two things as input, a integer n and a nonempty string s. It outputs s n times with optional trailing whitespace. However, if n ...

 
@orlp I was only joking
I think I have to bite the bullet and agree to run people's code on my windows machine
I am trying to work out which languages are going to be hard
question edited
 
4:02 PM
@Dennis TBH this is pretty unintuitive
 
No arguments here.
 
Okx
@orlp NMP isn't going to be very happy with that
 
NMP?
 
Okx
New Main Posts
 
4:13 PM
I'm confused
 
Okx
 
@Okx where is that
 
1
Q: Reflective binary ordering

orlpThe reverse of an n-bit number is just its n binary digits in reverse order: 001010010 → 010010100 Given a number n, generate the all n-bit integers ([0, 2n-1]) in an arbitrary order, with only one restriction: there must be a splitting point such that the reverse of an integer is on the o...

0
Q: Is there an unmatched parentheses in this String?

ArjunIntroduction Given a String containing an arithmetic expression, your task is to output a truthy or falsey value based on whether it contains unmatched parentheses. Input Your program should take in a String containing an arithmetic expression. It may take input in any way except assuming it...

 
@Okx but he didn't onebox it
also, ^^^
 
4:17 PM
oh wait I've already starred that
wait PPCG is 88th SE site CR is 86th >_>
and 87th is closed
 
@EriktheOutgolfer what ranking is that?
 
reputation leagues id
assuming it goes in order of oldest to newest
 
@LeakyNun my lastest challenge (not the binary reflective one) is really interesting
should be fun to solve :)
 
@orlp I just upvoted it
 
@orlp I take it ^ is exponentiation?
"infinite power tower" so it is exponentiation
 
4:30 PM
1
Q: Output the nth Even Perfect Number

Beta DecayChallenge Given an integer, n, as input where 0 <= n <= 2^10, output the nth even perfect number. Perfect Numbers A perfect number is a number, x where the sum of its factors (excluding itself) equals x. For example, 6: 6: 1, 2, 3, 6 And, of course, 1 + 2 + 3 = 6, so 6 is perfect. If a per...

1
Q: Evaluate modular power towers

orlpGiven two numbers n and m, evaluate the infinite power tower: n^(n+1)^(n+2)^(n+3)^(n+4)^... mod m Keep in mind that ^ is right-associative. So 2^3^4 = 2^(3^4). Now how can you possibly assign a value to an infinite sequence of right-associative operators? Define f(n,m,i) as the power towe...

 
@KritixiLithos correct
 
@orlp is there a theorem like the Euler totient theorem for non-coprime integers?
 
@LeakyNun you're on the right path, but no there isn't (AFAIK) just some direct identity you can apply
 
:(
that isn't good
 
@BetaDecay Why did you delete the challenge? People may have been working on it (I was)
 
4:34 PM
@LuisMendo it's undeleted
 
Ah, thanks
 
@BetaDecay You stole my views!
 
@LuisMendo Yeah, sorry, I had a moment of doubt. Peter Taylor said I should restrict the challenge to generating Even Perfect Numbers and, I've completely misunderstood what he meant :P
@Arjun Haha sorry :D
 
@BetaDecay I hadn's seen it was already undeleted :-)
 
5:03 PM
hi @LeakyNun
 
hi
 
so do you think I can post the question?
 
I don't know
 
ah :)
why so?
 
ask others
 
5:05 PM
I am hoping there are clever ways to approach the problem
@LeakyNun not many people look at sandboxed questions sadly
@LeakyNun in theory there could be a closed form answer... but that seems tricky
 
@Lembik not Leaky, but I'd suggest you edit the sandboxed post so that it gets more attention (it will bump)
 
Okx
@EriktheOutgolfer I added assign in Neim, just letting you know (and there's now a chatroom that will probably be mostly dead all the time)
 
you're such an on-topic person...+1
 
@MartinEnder I can only notify one person in a comment, but codegolf.stackexchange.com/questions/124391/…
 
@EriktheOutgolfer hi.. You mean edit it every few hours? I only wrote it recently
 
5:20 PM
oh
 
@EriktheOutgolfer this is it codegolf.meta.stackexchange.com/a/12706/9206
 
@orlp did you mix up n and m in the limits?
 
@MartinEnder I believe I did
@MartinEnder fixed now
 
installing gcc on my poor windows machine in anticipation
@MartinEnder hi
 
@Mayube Just curious - have you golfed anything else in Decimal?
 
Help : Can I use an external DVD burner, which does not explicitly state that it is compatible with Windows 10, with Windows 10?
 
I hope that's just as good
ok now I have C and python.. what else is there ? :)
 
@Arjun Google for - then download and install - the proper drivers, and you should be fine
 
@Arjun what is the make and model?
 
5:32 PM
^ google that and add "windows 10 drivers" to the end of the query
 
is anyone here familiar with Lenguage
 
@musicman523 I'm familiar with how ridiculous it is
 
Fair
In Lenguage, how do you tell the difference between the BF program "+" and "++"?
 
why would you need to?
they're both "do nothing"
 
It's a theoretical question
Because I can't seem to tell the difference between "." and "+." and "++." and so on
 
Okx
5:38 PM
CMC: Given a string and a number as input, append the number to the end of the string, but if the string ends with a number, first remove that before appending (abc123 + 33 -> abc33; abc + 123 -> abc123)
 
Because + has the value 000, so it doesn't seem to affect the length of the Lenguage program
When it comes at the beginning of the BF program
 
Okx
@musicman523 You prefix with a 1, so + -> 1000 (in binary) and ++ -> 1000000
 
Do you do that for all commands? It doesn't appear to say so on the Esolangs page
 
@Okx JavaScript, 27 bytes, s=>i=>s.replace(/\d+$/,``)+i
takes input by currying
 
Oh wait no, you just prefix the PROGRAM with a 1. Gotcha :D
 
5:45 PM
Hey @DestructibleLemon I'm beating you in the monthly ranking now :P
 
Nooooo
Squad has been aquired by Take-Two
 
@Lembik don't, that's outdated as hell
follow my guide
 
@orlp argh! When you say outdated do you mean the version of gcc you get is old?
there is some advantage to using the cygwin installer
 
6:08 PM
@Lembik that, and cygwin is inferior to msys2 in various aspects
just follow my guide, should take 10 mins
 
Okx
6:21 PM
Should I post the CMC I made a bit ago as a challenge?
 
@Okx Which one?
 
Okx
The one at the top of this page :P
 
You know, I'd really like to see this post. It's deleted but I can see deleted posts. How can I find it :P
 
Okx
I can try and find it for you
 
6:29 PM
Only moderators can search for deleted posts.
 
> Note: only content you own is returned when searching for deleted content
 
@Doorknob Oh, darn. Are you allowed to link it?
 
@Doorknob dunno why
 
there are two undelete votes...
 
6:30 PM
@Okx Thanks!!
 
why was spam starred?
@LeakyNun wait you voted to undelete?
 
@EriktheOutgolfer no i didn't
 
because there was only 1 undelete vote before you said that
iirc
 
wat
 
@EriktheOutgolfer Idk maybe this?
 
Okx
6:31 PM
Wasn't that hard, just went to the TNB chat history for the day it was posted (which I saw in the image) and found it pretty easily there
 
@MDXF and that's exactly why that question was locked
 
@Okx Oh lol
@EriktheOutgolfer Because of spam?
 
> Post Undeleted by betseg, MD XF, Doorknob♦
 
because he wanted to clear the undelete votes
 
Exactly
@EriktheOutgolfer ninja'd, was about to say that
 
6:33 PM
@MDXF why did you vote to undelete?
 
@MDXF Your edit/delete privileges are not meant to be used as a joke. Please don't abuse them as such.
 
> because we wanted to clear the undelete votes
 
I figured if it got undeleted, it could then get re-deleted, and have no undelete votes
 
mods can undelete then delete again single-handedly, no need to vote to undelete
 
6:34 PM
@EriktheOutgolfer Ohh
That's right. Sorry
 
-1
Q: Dankify this string

Nathan PriceChallenge An ascii string is made 'dank' when a exactly one space is inserted between any two consecutive letters and all capital letters are replaced with lowercase ones. In this challenge I would like you to write a program that takes a string (not necessarily 'dank') as input and outputs a 'd...

 
Ugh. Where's that Mother Meta post about why the rep cap?
 
Okx
Not finding that one for you :P
 
I still can't find it
 

« first day (2317 days earlier)      last day (2534 days later) »