« first day (2338 days earlier)      last day (2505 days later) » 

3:00 PM
@KritixiLithos I merged your PR; dunno exactly what difference it makes though :P
 
>_> i wanted to make a successful language but instead a made a boring working language
 
it removes an empty code block, you swapped the <code> and <pre> around
@HyperNeutrino ... I agree
 
>_> that makes a difference?
lol
@totallyhuman better than a boring broken language at least
 
fair point
 
So what should BF5 contain?
 
3:05 PM
@HyperNeutrino before that, did you finish off functions?
 
Yes
Did I forget to push >_>
 
I always push right after a commit
 
rip I never committed though lol
 
pushed
wat thingy didn't update
 
3:09 PM
@HyperNeutrino I was about to reply with ಠ_ಠ but then you said ∧
 
and now it's messed up
wait that's cuz i didn't delete the HEAD id after pull did weird stuff
somehow I ended up 3 commits ahead of master >_>
 
welcome to the world of git
3
 
git is weird >_>
 
wait did you add the builtin for ,[>,] yet?
 
3:14 PM
wait whoops no
 
Jim
@HyperNeutrino I can help if you're messing up with Git
 
I figured it out, thanks.
@Kritixi pushed
 
@KritixiLithos fib%n is always periodic
 
okay
even the length of the period is a pattern
@HyperNeutrino parseInt functions
 
@KritixiLithos how?
 
3:19 PM
@KritixiLithos how would I do that?
 
@LeakyNun 3, 6, 12, 24
@HyperNeutrino given a stack containing "835" where the ascii values are in the stack, convert them to usable numbers, so value of 49, 50 will be converted to 12, 0 (49 and 50 are the code points of the chars "1" and "2" respectively)
 
hm. that might be possible
lemme think about how i'd do that
 
@KritixiLithos firstly we have the theorem fib(m) | fib(mn)
 
what does that theorem tell us?
(is | modulo?)
 
no, it means divisible
 
3:25 PM
@HyperNeutrino wait, what is the size of each cell? Are they 8 bits each?
 
no, unbounded
both positive and negative
unless you specify max and min parameters
 
so you can't zero in a cell?
 
yes you can
 
0,1,1,2,3,5,2,1,3,4,1,5,0,5,5,4,3,1,4,5,3,2,5,1,0,1,1,...
the period for fib%6 is longer (and passes through zero)
at this point I'm not sure whether this is true
10 mins ago, by Leaky Nun
@KritixiLithos fib%n is always periodic
 
oh I started counting from 1
 
3:28 PM
@KritixiLithos but you can make it into a challenge
 
@HyperNeutrino won't that make a negative cell more negative?
 
ohwait
whoops
huh
should I restrict it?
 
if you are going to restrict it, restrict it to non-negative integers
 
0,1,1,2,3,5,8,4,3,7,1,8,0,8,8,...,0,1,1
24 again
 
3:33 PM
what does your fibonacci generator look like?
 
@KritixiLithos a brain
 
I wrote a very inefficient C script
 
def fast_fib(n):
    global fib_cache
    if n==0: return 1,0
    shift = n>>1
    if shift in fib_cache and shift-1 in fib_cache:
        a,b = fib_cache[shift-1],fib_cache[shift]
    else:
        a,b = fast_fib(shift)
        fib_cache[shift-1] = a
        fib_cache[shift] = b
    b2 = b*b
    a,b = a*a+b2, (a<<1)*b+b2
    if n%2 == 1:
        fib_cache[n-1] = b
        return b,a+b
    fib_cache[n-1] = a
    return a,b
 
Anonymous
@LeakyNun Hey that looks familiar :P
 
# F(2n) = (F(n-1) + F(n+1)) * F(n)
#       = (F(n-1) + F(n-1) + F(n)) * F(n)
#       = (2F(n-1) + F(n)) * F(n)

# F(2n-1) = F(n-1)*F(n-1) + F(n)*F(n)
@Mego hey I wrote that code :P
 
Anonymous
3:35 PM
Lol yep, it works well
 
@KritixiLithos this is O(log(n)) time theoretically
 
Mine is simply f(n){return n<3?1:f(n-1)+f(n-2);}
 
you could use some caching
 
Anonymous
@KritixiLithos That's a great way to have a stack overflow
 
thank you
 
3:37 PM
0,1,1,2,3,5,0,5,5,2,7,1,0,1,1,...
 
Anonymous
Also f(2) would return 1, which is incorrect for zero-indexed Fib (the best Fib)
 
I'm starting to see something
 
Anonymous
@LeakyNun Is it aliens?
 
@Mego ya
 
mine is 1-indexed
 
3:38 PM
their yuge
@KritixiLithos that makes no sense
considering this theorem for zero-indexed fib
14 mins ago, by Leaky Nun
@KritixiLithos firstly we have the theorem fib(m) | fib(mn)
 
Anonymous
F(1) = F(2) = 1 is inferior to F(0) = F(1) = 1
 
@Mego what?
oh, never mind then, I meant f(2)=1 is the better version
of course f(0)=0
 
Anonymous
That also works I guess
 
Anonymous
Actually yeah that is better in a lot of ways
 
then we can have the theorem fib(m) | fib(mn)
which is so elegant
I wouldn't replace it by fib(m-1) | fib((m-1)(n-1))
 
Anonymous
3:41 PM
Excatly
 
Anonymous
I'm not fixing that typo :P
 
oh, I have a proof now
that fib%n is always periodic
but it relies on a theorem which I haven't proved
 
Anonymous
What's the theorem?
 
namely the existence of a Fibonacci number divisible by m
 
Wait so what is being proven? I want to try :P
 
3:42 PM
1 min ago, by Leaky Nun
that fib%n is always periodic
15 mins ago, by Leaky Nun
10 mins ago, by Leaky Nun
@KritixiLithos fib%n is always periodic
 
ah ok
Do we know for sure that the cycle is of period n, or is that not necessarily true?
 
that is not true.
 
Anonymous
@LeakyNun You mean: ∀m:m ϵ N → ∃ n: n ϵ F ∧ m | n?
 
Anonymous
Or in English: for all m > 0, there exists a Fibonacci number n such that m divides n?
 
3:46 PM
@Mego yes, or more simply ∀m:m ϵ N_0 → ∃ n: m | fib(n)
 
@LeakyNun cache made it much faster
 
@KritixiLithos of course
you decreased the runtime complexity from O(2^n) to O(n)
 
just to check, what do you get for fib(60)?
 
Anonymous
@KritixiLithos 1548008755920
 
@KritixiLithos 1548008755920
 
3:47 PM
that's good then
 
Should I add a limit to the BF cell memory size?
 
I wrote that code for Actually
 
Anonymous
@LeakyNun I'll ponder this while I'm eating lunch
 
oh, the default is wrapping at 256 right
 
yes
%256
>>> int(((1 + 5 ** 0.5) / 2) ** 60 / (5 ** 0.5))
<<< 1548008755920
 
3:50 PM
oh, another O(log(n)) algorithm :p
 
:P
anyway gtg do stuff (wash dishes, laundry (heh), etc). sigh will be back in like 1 hour hopefully ಠ/
 
@HyperNeutrino nice
 
@Mego never mind, the fact that fib%n has to be periodic is merely a corollary of the pigeonhole principle
and some identities involving fibonacci numbers
 
1,3,8,6,20,24,16,12,24
length of the period of fib%n starting at n=1
 
thanks
 
4:09 PM
1,3,8,6,20,24,16,12,24,100,10,24,28,100,40 after testing with 100 fib numbers for numbers from 1 to 15
1; 3; 8; 6; 20; 24; 16; 12; 24; 150; 10; 24; 28; 150; 40 with 150 fibs. Apparently fib(n)%10 (0-indexed where fib(0) = 0) is the first time we see a potentially unending sequence
even after testing with 200 fibs, fib(n)%10 does not appear to repeat
@HyperNeutrino how does that even work?
 
1, 3, 8, 6, 20, 24, 16, 12, 24, 60, 20, 24, 28, 48, 40
we don't match up
 
what are you doing to find the pattern?
I use a retina script
 
11
Q: Prove this formula for the Fibonacci Sequence

SANTOSH KUMARThis formula provides the $n$th term in the Fibonacci Sequence, and is defined using the recurrence formula: $u_n = u_{n − 1} + u_{n − 2}$, for $n > 1$, where $u_0 = 0$ and $u_1 = 1$. Show that $$u_n = \frac{(1 + \sqrt{5})^n - (1 - \sqrt{5})^n}{2^n \sqrt{5}}.$$ Please help me with its p...

 
@LeakyNun what is N_0?
@HyperNeutrino see this is why yuo don't use pull unless oyu're 100% sure the two branches are even :P
 
@Downgoat natural numbers including 0, I guess
for some godforsaken reason there is still not a consensus that the natural numbers include 0
 
4:20 PM
@LeakyNun goo.gl/C9ZSC4
 
@LeakyNun For me, I disambiguate by Natural Number to be>=0, Whole Number >0
 
@KritixiLithos how did you generate the input?
@Downgoat I see
 
@LeakyNun a separate C program
 
obvious overflow
 
;_; I didn't notice the overflow
error: ‘long long long’ is too long for GCC
5
oh well
 
4:25 PM
@KritixiLithos there's a ( ͡° ͜ʖ ͡°) in there somewhere :P
 
ಠ_ಠ did sh**p take over you again
 
excuse me (this is family friendly chatroom please censor)
 
.code.tio.c:11:20: warning: return makes integer from pointer without a cast [-Wint-conversion]
    return fib_cache[n];
           ~~~~~~~~~^~~
what is this warning?
 
@Downgoat sorry for my swearing
 
@LeakyNun what's the code?
 
4:28 PM
unsigned long long *fib_cache[400]={0};

unsigned long long fib(int n){
 if(!n) {
  return 0LL;
 } else if(n<3) {
  return 1LL;
 } else {
  if(fib_cache[n]) {
   return fib_cache[n];
  } else {
   return (fib_cache[n] = fib(n-1) + fib(n-2));
  }
 }
}
 
after adding the cast I get .code.tio.c:12:46: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
at return (unsigned long long) (fib_cache[n] = fib(n-1) + fib(n-2));
 
why would you need to cast
 
@LeakyNun the assignment returns fib_cache + n so you can't return it
 
because of the warning
 
@Downgoat heh?
 
4:31 PM
wait actually no
:| then how does a = b = c work then
ohh
nevemrind please ignore
 
@LeakyNun so I added (unsigned long long) casts in two places
 
2 mins ago, by Leaky Nun
why would you need to cast
does that mean it was integer before you cast?
does that mean the information is lost already?
 
I thought it wanted me to cast
 
yes, but why?
 
the warning wanted me to cast the pointer
 
4:44 PM
@LeakyNun fib_cache[n] is a ULL* but the function should return ULL
 
@betseg eh?
so I should use &?
 
*(fib_cache[n]) I think
 
pointers are too confusing ;_;
 
/shrug oh i forgot im on mobile
@LeakyNun or just remove the * in the declaration of fib_cache and leave everything the same?
 
@betseg oh
cc @KritixiLithos
 
4:50 PM
@betseg ¯\_(ツ)_/¯
 
Erik wat did u say
 
I just said "¯\_(ツ)_/¯"...dunno what you mean
 
You removed a make I message?
 
can't understand what you mean by "make I"...
 
Autocorrect + dirty screen:(
You removed a message?
 
4:52 PM
yeah...I didn't intend to post that although it wasn't interesting at all
 
oh, Question: how do C define size_t
I am using UInt64 for Cheddar but seem like bad idea
 
@LeakyNun but I still can't prevent overflow ;_;
 
@KritixiLithos you don't need to generate them one by one
you can generate them in one go
and you only need two pointers
 
what do you mean?
 
tfw you change your whole approach and shrink from a 3 line full program to a one line lambda and save one byte
 
5:00 PM
@totallyhuman link?
 
2
A: Create a stem-and-leaf plot

totallyhumanPython 2, 146 140 133 124 120 118 109 107 90 86 84 91 82 81 bytes back to 90 :c -6 bytes thanks to Rod. -9 bytes thanks to ovs. This is bad... The sorting really hurts the byte count... It's still bad but I golfed a fair amount of bytes off. If only I could catch up to the other answer... l...

 
I'd expect something like that from something as low as like Python
 
nice
 
@KritixiLithos tio.run/…
 
5:02 PM
> On systems using the GNU C Library, this will be unsigned int or unsigned long int.
Standard only says it'll be unsigned
 
how to know if it will be unsigned long int
 
@LeakyNun that is a cool property
 
is it that if 64-bit?
 
wait
:o
i don't need to sort it
yesssssss
 
@Dennis did you remove tio cache?
 
5:05 PM
Wrong room. :P
 
@EriktheOutgolfer did you disable tio cache?
 
@LeakyNun there's not even the option to
 
@Downgoat sizeof(size_t)
 
in talk.tryitonline.net, 1 min ago, by Dennis
The changes to output cache are now live. Loading a permalink automatically fetches the result from cache (if it exists). Pressing the Run button bypasses cache and actually runs the code.
 
oh, I just refreshed it
@Dennis wow, nice!
 
5:05 PM
@betseg that tells me size of size_t I want to know like in what case does C make size_t an unsigned long int
 
@Dennis oh that's what you meant by wrong room...nice
 
@Downgoat oh
No idea
 
except that kinda kills the purpose of a cache
 
@Downgoat But something weird happened, I only commited twice in total and it said I was 3 ahead so a push must have failed :I
 
5:22 PM
0
A: Sandbox for Proposed Challenges

HyperNeutrinoOutput the last program code-golfanswer-chaining The first answer to this challenge must output "First!" exactly (without the quotes), in that case. Then, every subsequent answer must output the code of the previous answer. Your answer may include any Unicode characters (sorry to languages that ...

Someone pointed out that this would be considered "having no winning criteria".
However, I don't want to mark an answer as winning, and won't work.
Any suggestions to avoid DV+CV?
 
well, this is a competition site so you do need an objective winning criterion...but challenges usually have "second-from-last answer" as winning criterion
 
Second from last?
 
Guess my ACT score:
 
I've seen "first answer to stay as the last answer for a week" or some other period of time as the winning criterion used before.
 
sometimes that wouldn't work since you "must not break the chain" too or something...and you can't prove the last answer hasn't broken the chain yet, but you can prove the second-from-last answer hasn't, since there's an answer after it, the last answer
 
5:33 PM
Hm. That might be a possibility too; so like, once an answer goes unchained for <period-of-time>, the second-last answer wins?
Let me go check the winning criteri(a|on) for the polyglot chaining challenge.
 
is pretty much a winning criterion on its own imo
 
Ah, yes, it was "second-last answer".
 
IMO a better winning criteria for answer-chaining is n points for the nth answer, most points wins
I also don't see a point in questions having a deadline
 
maybe make it a catalog then with the fluctuating criterion that most points wins...
 
What do you mean by fluctuating criterion?
 
5:40 PM
well if a new valid answer gets posted then the winning answer will change since there's no deadline
 
Oh okay.
My intention is to not mark any answer as accepted for the purpose of this challenge, if that works.
 
6:10 PM
> Okay, something is slightly wonky. As all Python programmers should know, dicts are unordered, meaning the original order of the key-value pairs is not preserved. However, in my current code, I do not sort the resulting dict at all. Yet, I have tested multiple times, checking for equality and order every single time, and the dict always comes out right. If anybody either disproves that it always comes out right or knows why this works, I'd love to know.
i might be missing something dumb but yeah
 
Am I the only one who did not know that TIO has an option to fully format your code golf submission?
 
@Mr.Xcoder then how did you save your code?
 
@LeakyNun I only looked at the top of the page, and only seen the first section with the plain URL
ಠ_ಠ Happens all the time
Haven't noticed it since March, I am so blind ಠ_ಠ...
Today I finally got 2k on PPCG and 5k on SE
Yaay ^
 
CMC: given a positive integer > 1, prime factorize, remove largest factor, product.
 
Sounds perfect for Jelly :P
 
6:20 PM
75 -> [3 5 5] -> [3 5] -> 15
 
@LeakyNun Jelly, 4 bytes: ÆfṖP
 
Jim
@LeakyNun Pyth, 5 bytes: *Ft_P
 
@LeakyNun I thought I finally golfed it in Python, but the result was 4651713902136637142239964459361381311423670728731898032086730221122970502044912‌​6392707153920000000000000000000000 for 75 :/
 
@Mr.Xcoder For the most recent CMC?
 
@HyperNeutrino Yes
 
6:31 PM
Can I see your code?
 
@HyperNeutrino I fixed the small error, but still have a bug
 
I can try to figure out what the problem is
But I might fail :P
 
I'll post it soon (I think)
 
@Jim t_ is basically P
 
@LeakyNun Pyth, 4 bytes: *FPP
 
Jim
6:35 PM
@LeakyNun 4 bytes: *FPP
Hey
I had it
 
@Jim Just kidding
:P
I didn't want to steal it, just a joke
 
Jim
@Mr.Xcoder Alright ^^
 
@Mr.Xcoder can you post your python code?
@Christopher wat
 
@LeakyNun Now it does not even compile
 
6:39 PM
@LeakyNun My email is sql injection confirmed
 
n,p,d,t=input(),[],2,1
while d*d<=n:
 while n%d<1:p+=[d];n/=d;d+=1
if n>1:p=p+[n]
for i in p[:-1]:t*=i
print t
Doesn't compile ^
And ain't golfed
at all
 
And it's not codeblock-formatted.
 
@HyperNeutrino How can I format it?
I dunno chat markdown
 
ctrl+k
 
Spaces
4 Spaces
 
6:41 PM
or 4 spaces front of it
ninja'd sorta
 
Thx
 
sya, gtg :P
 
Move the d+=1 outside of the inner loop ಠ_ಠ
bye :P
 
6:43 PM
@totallyhuman anybody?
 
Whoever clicked twenty I am no longer friends with you
(jk)
@Everyone why is TNB so quite?
 
@Christopher why you don't let bots vote that's discrimination
 
@EriktheOutgolfer I don't???
 
well you have put a captcha
 
Uhh are you a bot?
 
7:00 PM
@Christopher well, still please no discrimination...this isn't supposed to be discriminating room
 
@carusocomputing Magic Octopus Urn is obviously the best anagram.
 
that's creepy...
 
@EriktheOutgolfer O man i am going to b 11'd by dennis for bot discrimination
 
1
Q: Am I an Automorphic Number?

GryphonAn Automorphic number is a number which is a suffix of its square in base 10. This is sequence A003226 in the OEIS. Your Task: Write a program or function to determine whether an input is an Automorphic number. Input: An integer between 0 and 10^12 (inclusive), that may or may not be an ...

 
@HyperNeutrino Cannot believe it :/... That moment when you golf without caring about indentation
 
7:27 PM
Who on earth 11'd the comments of the question?
@Dennis
 
I can't tell you who, but I agree with the mod action.
 
@Dennis why?
 
Because it wasn't constructive. Constructive criticism could be used to improve the challenge in some way.
 
0
A: Am I an Automorphic Number?

Leaky NunRetina, 44 bytes $ ;918212890625;81787109376;0;1; ^(\d+;).*\1 Try it online! There are exactly 4 solutions to the p-adic equation x*x = x.

I wonder in which language would this algorithm be the golfiest
@EriktheOutgolfer can we clear the brachylog comments?
 
7:50 PM
@NewMainPosts "An integer between 0 and 10^12 (inclusive), that may or may not be an Automorphic number."
so the result can be 10^24? RIP C
oh long double can be 128 bit
C, dont RIP
 

« first day (2338 days earlier)      last day (2505 days later) »