G3nka1 | Hello I am finding fib number for a large series, here is my code https://pastebin.com/Eu5J4r5y but I get the following error |
AbleBacon | man this python looks like Greek to me. I'm so out of touch |
rindolf | G3nka1: hi |
rindolf | G3nka1: this is an inaccurate method |
rindolf | G3nka1: perhaps try using matrix exp |
G3nka1 | Hi rindolf |
G3nka1 | oh |
G3nka1 | matrix exp? |
rindolf | G3nka1: yes |
rindolf | G3nka1: or just use the a,b = b, a+b algo |
G3nka1 | But rindolf it will take longer that way, and stack overflows because of multiple recursions |
rindolf | G3nka1: what? |
rindolf | G3nka1: why? |
GeDaMo | You don't have to do it recursively |
rindolf | G3nka1: do it iteratively |
G3nka1 | rindolf, using yield |
G3nka1 | ? |
rindolf | G3nka1: that is an option |
rindolf | G3nka1: wait a sec |
G3nka1 | alright |
rindolf | G3nka1: see https://github.com/shlomif/shlomif-perl-snippets/blob/master/fibonacci-iterative.py |
AbleBacon | good lord... you need an enormous license statement for that snippet? |
rindolf | AbleBacon: yes |
iodev | AbleBacon, LOL!!! |
AbleBacon | "i used this snippet in my production software and it totally destroyed everything and now I'm gonna sue" |
iodev | rindolf, this is illegal! |
iodev | you can't copyright Fibonacci! |
G3nka1 | rindolf, yup I also had written something similar https://paste.pound-python.org/show/WnXeO2U2BwuzHRQ8k8e2/ |
iodev | you can only copyright a unique idea, fibonacci-iterative.py is like copyrighting the stool :D |
rindolf | iodev: i copyright the code and it is Expat |
AbleBacon | that's not similar... it doesn't have an elaborate license explicitly stated in the code file |
iodev | rindolf, well, i can do whatever I want with it, Fibonacci is public domain, you can't MIT it, if I wanna use it in proprietary software, I can |
AbleBacon | it's a good thing you didn't write something similar, because that shit is already copyrighted |
rindolf | iodev: go ahead |
iodev | because it's not really original, so not copyrighted, so you can't sue |
rindolf | iodev: mit allows that |
AbleBacon | did he just implicitly award you a license to use Fibonacci? |
rindolf | iodev: i wont sue you |
iodev | The above copyright notice and this permission notice shall be |
iodev | included in all copies or substantial portions of the Software. |
iodev | no, even if I don't do this, you can't sue me rindolf |
AbleBacon | "i used this Fibonacci code as the random number generator for my library and my security has been cracked. I'm totally suing" |
iodev | rindolf, there, I broke your license :D http://dpaste.com/1NWZFH0 |
rindolf | G3nka1: fibgen and F are identical |
iodev | and I dare you to sue me! rindolf make me rich, sue me :D I'll win |
Trashlord | heh |
rindolf | iodev: I'm cool with that |
iodev | or get the MIT to sue me, even better :D |
Trashlord | it didn't occur to me that I should use something like b = a, a = a+b |
Trashlord | I always do it like result = a+b, b = a, a = result |
iodev | rindolf, I'm joking pal, don't be angry okay |
rindolf | iodev: http://fc-solve.shlomifish.org/faq.html#abuse_of_fc_solve |
Trashlord | I need a course in how to not over complicated software |
rindolf | iodev: I'm laughing |
rindolf | iodev: that is OK |
AbleBacon | i mean, an iterative approach is what you use when generating Fibonacci numbers on paper |
G3nka1 | I know rindolf |
iodev | rindolf, anyway, you see, before you MIT/GPL something you must having something Original, that is the copyrighted thing :D |
iodev | if anyone can make it, just like anyone can make a stool, no patent, no copyright is given, because you're not the author of anything, rindolf |
AbleBacon | Fibonacci isn't around to say that it's not original |
AbleBacon | that mofo is 6 feet under somewhere in Italy |
GeDaMo | fibs = 0 : 1 : zipWith (+) fibs (tail fibs) |
iodev | I'm an amateur lawyer, rindolf :-) |
iodev | I like to learn legalese :D |
AbleBacon | I've seen a couple of episodes of law & order and i can confirm he's correct |
AbleBacon | this case just needs a bombshell for the thrill factor |
AbleBacon | Fibonacci's great-great-great-great-grandson comes in as a surprise witness |
AbleBacon | and testifies that Fibonacci stole the formula |
iodev | AbleBacon, yes, soap opera |
iodev | and in 20 years, he confesses on his death bead to have stolen the formula from an orphan |
iodev | and asks him for forgiveness through an email, and gets a "NOO!" |
iodev | and then he dies, crying :D |
AbleBacon | :-( |
iodev | AbleBacon, don't cry, it sells |
iodev | or it seems like he died, in about 200 episodes he wakes up out of a comma on a hospital bed! |
iodev | when everyone has forgotten that he was dead, and the soap opera contradicts itself :-) |
rindolf | heh |
rindolf | LOL |
iodev | rindolf, you are sworn to tell the truth and nothing but the truth, don't soap operas contradict themselves? |
rindolf | iodev: see http://linuxmafia.com/faq/Licensing_and_Law/public-domain.html |
iodev | LOL!!! linuxmafia |
iodev | rindolf, a site against Linux, unbelievable! |
rindolf | iodev: it isn't against Linux |