« first day (2033 days earlier)      last day (2793 days later) » 

11:00 PM
Alright, so it is on OEIS again.
Why am I not surprised.
Should I post it on main?
 
Has anyone just exploited OEIS for lots of rep?
Like just posting a random sequence from OEIS with no justification?
 
You may try.
 
It seems a bit
Just a free way to get rep
Or a quick way to be downvoted
 
The fact that the sequence appears in OEIS does not affect in any way whether the sequence itself is interesting enough to be posted on main.
 
I agree
But like if you pick a random sequence with no justification
Seems like perfect hnq bait
 
11:06 PM
The fact that the sequence appears in OEIS does not affect in any way whether the sequence itself is interesting enough to be posted on main.
 
@LeakyNun Currently out, will have to test later. Not sure how much faster your optimisations are exactly, still looks mainly on the same order of trial division (over primes)?
 
If you post an uninteresting sequence or a hard sequence then you will either get downvoted or have no answers.
 
Ok, that makes sense
 
Interesting inclusion of isqrt though, almost surprised Python doesn't have that
 
@Sp3000 sieve is on the same order of trial division?
I dont know, it improved quite a lot for me
because addition should be much faster than division
 
11:09 PM
@LeakyNun The problem is is_prime defaults to trial division if it divides none of the primes in the sieve
 
the old version was test each number and append independently
since array appending should be quite costly
@Sp3000 oh, will fix that later
I just heavily optimized the other functions
the prime count is so optimized now
 
tbh the part I'm confused about is why a sieve is being used for is_prime rather than a primality testing (or composite testing) algorithm
 
heh, I told myself I would not mess with those algorithms
 
Oh.. er... okay? Any particular reason out of curiosity?
 
because they are too complicated
I may do it later
 
11:16 PM
Er... I see
 
@Sp3000 how did you come up with n^3*n?
 
OEIS, haven't proven because I need to head off soon
 
How did you find that OEIS?
 
Sieve should be significantly faster than trial division iff you are trying to generate many prime numbers
 
seconded
 
11:19 PM
(Learnt that from Project Euler)
There is no way to succeed at a "generate the billionth prime" type question without such an algorithm.
 
I dont think you can generate the billionth prime by sieve
unless you have like a billion bits of memory
 
Sorry,
Billionth meant to be an illustrative example
Of generating a large number of primes
 
@LeakyNun you can store a large prime in one bit? That's awesome!
 
@DJMcMayhem yes
and think twice before you laugh at me
 
@DJMcMayhem we're using this compression scheme
https://1.bp.blogspot.com/-mQr2LHIF6fM/Vrae4WGmMGI/AAAAAAAAA8s/7hpffR5FbUg/s320/fitbit.png
user image
2
Citation to Conor O Brien of course
 
11:33 PM
well not really one bit
maybe like 1X bits for one prime
depends on the prime gaps
 
cheddar> 'asdafasdfas'.smallcaps
"ᴀsᴅᴀғᴀsᴅғᴀs"
@ConorO'Brien ^
 
But in all reality say we are storing 64 bit unsined long types
 
@Downgoat what the hell
 
\o/ \o/ \o/
what a useful feature
 
@RohanJhunjhunwala no i'm storing bitstring
where each prime is exactly the bit '1'
 
11:34 PM
@RohanJhunjhunwala ¯\_(ツ)_/¯ it was in the STDLIB suggestions
 
@Downgoat my remark was only fifty percent sarcastic (ok more like 80%-100%), but thats hilarious. Too bad you cant use it for the small caps question :(
@LeakyNun ok
 
whatever, i'm out
 
@LeakyNun 64 billion bits is "only" 8 gigabytes
it could be stored (with enough heap space and ram)
 
question: shuold i have substitution regex literals in cheddar?
 
yes
"String Literal".replaceAll("regex or string literal","substitution");
 
11:38 PM
@RohanJhunjhunwala that exists all ready
I mean like:
"goat".sub(s/oa/ao/) -> gaot
 
sure I guess
Its golifier
 
> .wipe() method for objects of class Ass
ಠ_ಠ
 
question: is there a compression algo that will correctly decompress even if i chop the decomperssed string in half?
(I want to store first million digits of PI but i dont want t o waste space)
 
I'm not sure what u want?
 
11:46 PM
Hello!
 
But from what I understand I hope that question is a joke
Ninjad by coldgolf
:(
 
??
 
e.g. 123abc -> åß∂ç but åß -> 123
 
So I was typing a comment, and your comment got in between the comment I was responding to @ColdGolf
@Downgoat yes this very effective compression algorithm ... en.wikipedia.org/wiki/Null_encryption
@Downgoat but in all seriousness, like a run length decoding algorithm would do it.
 
So, if there are any mods here, [my post](http://codegolf.stackexchange.com/questions/90391/repetition-of-letters) was marked as a duplicate of something not similar at all to it.

First of all, what the so-called "duplicate" post considers to be input, it's actually the *output* in my challenge. It's completely reversed.

Secondly, the format of the input I user, is nothing related to what the other poster used. The challenges are also different anyways, so it's not like I just changed the formats and that's it.
 
11:49 PM
@ColdGolf I think you're going under the idea that duplicate challenges are the exact same
 
sorry @ColdGolf it is clearly a dupe. The input format has just been changed
 
if I had a challenge that said "take input n and add one", it would be a dupe of "take input n and add two"
if the answers will be extermly similar than two posts are closed as dupe
 
@Downgoat The input of the dupe is the output in my challenge. It's reversed.
 
Though please checkout the Sandbox you can get feedback on challenge before its posted. People can find problems with it and dupes can be identified early
> if the answers will be extermly similar
hm
 
How much similar is it?
It's not similar enough that you can reuse your code for both posts.
 
11:52 PM
@Downgoat its interesting that ColdGolf came in with a question about the very compression algorithm I was justing. The algorithm is provably ineffective for pi, but it works on text with a lot of repeated characters. Run length encoding would have a theoretical upper bound of log(n) and an upper bound of 2*n (citation needed)
 
ok I guess it's sufficiently different
voted to repoen
 
@Downgoat Thanks! @RohanJhunjhunwala You too?
 
@ColdGolf though btw, use code-blocks for examples and headings to avoid downvotes
 
Personally I feel that it is a simple difference in the input requirement. Let me take a deeper look at it.
Voted to reopen, but it is likely to receive more downvotes as it is just a modification in the input format. Usually inputs here are very open (sometimes too open)
 
@RohanJhunjhunwala Thanks!
 
11:55 PM
@Downgoat you're looking for some kind of segmented encoding? It can't be very sufficieny
*efficient
 
@Downgoat @ConorO'Brien I feel like such an encoding is highly unlikely to work for a number like pi. In fact it is proven ineffective to try to compress pi. (it becomes a problem of lossless compression on random data)
 

« first day (2033 days earlier)      last day (2793 days later) »