Recent

Author Topic: PRNG - the license of Thaddy's code from wiki  (Read 4489 times)

Zoran

  • Hero Member
  • *****
  • Posts: 1988
    • http://wiki.lazarus.freepascal.org/User:Zoran
PRNG - the license of Thaddy's code from wiki
« on: January 17, 2024, 04:18:14 pm »
I'm considering Thaddy's Mersenne twister 32-bit implementation, published in our wiki.

For my needs I would modify the code, change class functions and class varibles to ordinary object methods and variables. For thread-safety, I want to be able to create a separate instance for each thread.

In main thread there will be one instance, seeded with GetTickCount(), and when creating threads, this instance will be used to provide seed for instances owned by threads.

But there I don't see any mention of the licensing of the code. Am I allowed to use it (and change it) in my code? Are there restrictions with licensing the applications which use it?

So, what is the license?
Thaddy?
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

Kays

  • Hero Member
  • *****
  • Posts: 632
  • Whasup!?
    • KaiBurghardt.de
Re: PRNG - the license of Thaddy's code from wiki
« Reply #1 on: January 18, 2024, 07:45:08 pm »
According to https://wiki.FreePascal.org/Free_Pascal_wiki:Copyrights all rights are reserved except other wiki editors may edit your text (i. e. an infringement to the creator’s personality rights is OK).
Yours Sincerely
Kai Burghardt

ccrause

  • Hero Member
  • *****
  • Posts: 1117
Re: PRNG - the license of Thaddy's code from wiki
« Reply #2 on: January 19, 2024, 06:27:11 am »
So, what is the license?
Thaddy?
Maybe send a PM to Thaddy with a link to this topic.

Zoran

  • Hero Member
  • *****
  • Posts: 1988
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: PRNG - the license of Thaddy's code from wiki
« Reply #3 on: January 19, 2024, 01:51:53 pm »
According to https://wiki.FreePascal.org/Free_Pascal_wiki:Copyrights all rights are reserved except other wiki editors may edit your text (i. e. an infringement to the creator’s personality rights is OK).

Thank you for the link. If I understand correctly, it says we are allowed to change the code in the wiki (which I don't intend to, it is well written), but not use it (changed or not) without the permission from the author.

So it seems that, when contributing code to wiki, one should also write there what the license is.

Maybe send a PM to Thaddy with a link to this topic.
Thanks. Now I sent private message to Thaddy.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: PRNG - the license of Thaddy's code from wiki
« Reply #4 on: January 19, 2024, 04:18:50 pm »
I received the private message but decided to answer in public.
Regarding the Mersenne Twister itself, basically we have two, both written from scratch:
- The original FreePascal code written by Jonas Maebe and released under the usual gpl2 + linker exception and until recently the standard FPC PRNG.
- My version, released under a nothing license, free as in free beer, as far as licensing is concerned. Basically written to have Delphi inter-op with FPC generated data..... (I also wrote it the other way around: Delphi's LCG for FPC)
The difference does not matter too much and only concerns code written in Pascal.

Then there is the matter of copyright claims:
The algorithm itself is still under copyright, but free to use and it is also a part of  e.g. the current C - and derivatives -standard. Since it is included in many standards without references to any copyrights you may consider at least my version license free. And I wave my copyrights for such simple code. Just do not claim the code is yours... (ethics rather than anything else)

Note that, given the same random seed, both FPC versions behave exactly the same. It even behaves the same compared to other compiled languages like C and C++.
It is nothing more than implementing a mathematical abstract theory in concrete code.
« Last Edit: January 19, 2024, 05:45:01 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

paweld

  • Hero Member
  • *****
  • Posts: 1639
Re: PRNG - the license of Thaddy's code from wiki
« Reply #5 on: January 19, 2024, 05:43:42 pm »
Quote from: Thaddy
... released under the usual gpl2 + linker exception ...
LGPL2 + linker exception.GPLv2 does not allow any exclusions
Best regards / Pozdrawiam
paweld

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: PRNG - the license of Thaddy's code from wiki
« Reply #6 on: January 19, 2024, 05:47:08 pm »
Pawel, that goes only for Jonas implementation and my implementation is from the algorithm, not from knowledge of previous FPC code, so my code is free, really free, but be an ethical programmer.
My code is considerably different. But I suppose Jonas has the same feeling: It is quite easy to implement.

Zoran is free to use my code without any issues.
« Last Edit: January 19, 2024, 05:50:50 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

paweld

  • Hero Member
  • *****
  • Posts: 1639
Re: PRNG - the license of Thaddy's code from wiki
« Reply #7 on: January 19, 2024, 06:08:39 pm »
@Thaddy - I understand, but I just want to correct the name of the license, not "GPL2" as you wrote, but "LGPL2", because GPLv2 does not allow any exclusions from the license
Best regards / Pozdrawiam
paweld

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: PRNG - the license of Thaddy's code from wiki
« Reply #8 on: January 19, 2024, 08:14:23 pm »
I added in  my remark the linker exception, so that was already clear.
For the record: all code written by me has always no license unless I explicitly add a license, sometimes because it is a derived work.
But of course, the ethics need to be taken into account: the limitation is just that you can not claim copyright.
If I find that out, I get angry and we get the famous  >:D >:D >:D >:D >:D  %)
But you do not need to quote me or be worried about a license: there isn't any.

In this case it is obvious: my version is based on the wikipedia entry, not our wiki.

https://en.wikipedia.org/wiki/Mersenne_Twister

So technically - its initial implementation in C, not the algorithm,  - it is BSD, but that is the same.
Feel free to use my implementation in Pascal  without consequences apart from misrepresentation.
« Last Edit: January 19, 2024, 08:37:24 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

paweld

  • Hero Member
  • *****
  • Posts: 1639
Re: PRNG - the license of Thaddy's code from wiki
« Reply #9 on: January 19, 2024, 08:36:37 pm »
Thaddy, I don't think we understand each other. I understand what you wrote, that you have to respect copyright, that for your code you can give whatever license you want.
I just want to correct a typo you made: the GPLv2 license does not allow any exclusions, including linker exception - you probably meant LGPL2, which is a different license.
Have a great weekend
Best regards / Pozdrawiam
paweld

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: PRNG - the license of Thaddy's code from wiki
« Reply #10 on: January 19, 2024, 08:41:52 pm »
Again: MY sources are not subject to GPLv2+LGPL, but the original implementation for FreePascal by Jonas  is.
That is because it is/was part of the core RTL sources, but mine is clean-roomed original. And is thread-safe apart from maybe the Randomize() part.
objects are fine constructs. You can even initialize them with constructors.

RadThadd

  • Newbie
  • Posts: 2
Re: PRNG - the license of Thaddy's code from wiki
« Reply #11 on: February 04, 2024, 08:07:31 pm »
So weird he has the same name as me and I just signed up  :o %)

 

TinyPortal © 2005-2018