Lazarus

Announcements => Third party => Topic started by: mjm on March 17, 2020, 04:39:18 pm

Title: FNX (big integers)
Post by: mjm on March 17, 2020, 04:39:18 pm
Hello,

The FNX library can be downloaded at
https://www.ellipsa.eu/public/fnx/fnx.html

Though it is still an alpha version, there are already many units allowing to work with big primes, quadratic integers, elliptic curves, etc. All seems to work as it should with 64-bit Linux. The Pascal version should also work with Windows (there is almost no asm code for Windows, since I only have Linux I cannot check it). What is absolutely necessary is a 64-bit 3.0.0+ Free Pascal compiler.

Most objects, like TBigInt, are immutable. The programs would be faster if the objects were mutable but not so much. The big advantage is the ease of use: to declare, to initialize and to use (no need to create nor to destroy).

Currently, there are two Lazarus demo projects: fnx.Demo.BigInts and fnx.Demo.MultiThreadApp

Have fun,
mjm
Title: Re: FNX (big integers)
Post by: marcov on March 17, 2020, 05:53:07 pm
Hmm. Didn't get much further than the download page, as the license is GPL and thus too restrictive for me.
Title: Re: FNX (big integers)
Post by: piola on March 17, 2020, 06:16:49 pm
Pardon my question, but how did you download?​ I only get an 403  :(
Title: Re: FNX (big integers)
Post by: af0815 on March 17, 2020, 06:39:57 pm
I think LGPL with extensions like freepascal lib are ok for libraries. If GPL, it is useless for professional (closed) Source software. So i am not able to use it.
Title: Re: FNX (big integers)
Post by: AlexTP on March 17, 2020, 07:37:31 pm
I cannot use GPL licensed lib too, e.g. in CudaText app which has MPL2 license.
Title: Re: FNX (big integers)
Post by: mjm on March 18, 2020, 02:15:52 am

Regarding the GPL license.
Frankly, there is a license because it is needed but I strictly don't care about it. So, OK, with the next release, a user will be able to choose: GPL or LGPL.

Regarding the 403 error.
Using the link of the fnx.html page should work. If not, what is your IP?
Notice that using a link to the file from an other site than ellipsa.eu doesn't work (it is intentional, the goal is to calm down robot frenzy).
Title: Re: FNX (big integers)
Post by: avra on March 18, 2020, 08:38:17 am
with the next release, a user will be able to choose: GPL or LGPL.
I welcome your decision, but pure LGPL is not enough to allow static linking of our closed source with your library. If you want to let us do that then you would need to use FPC/Lazarus like modified LGPL license:
https://wiki.lazarus.freepascal.org/FPC_modified_LGPL
Title: Re: FNX (big integers)
Post by: eljo on March 18, 2020, 05:38:13 pm
Any gpl license is a no go for me I stay away from them all.
Title: Re: FNX (big integers)
Post by: guest58172 on March 18, 2020, 08:49:08 pm
If you don't care you can choose a permissive one, so MIT, Boost or BSD-3. Permissives are actually more common for libraries while GPL more used for applications. GPL for libraries and **especially non mainstream libraries** sux IMO.
Title: Re: FNX (big integers)
Post by: mjm on March 19, 2020, 01:30:41 am
with the next release, a user will be able to choose: GPL or LGPL.
I welcome your decision, but pure LGPL is not enough to allow static linking of our closed source with your library.

I think I cannot use the modified LGPL. In the fnx.Common.LowLevel unit, about half the assembler code (64-bit Linux) is adapted from GMP. And GMP is GPL or LGPL.
Title: Re: FNX (big integers)
Post by: marcov on March 19, 2020, 09:06:16 am
Yeah, that is a pity. The library looked interesting.

Or maybe relicense on a per unit basis. Then it can at least be used as a basis, and attempt to find substitutes for the encumbered routines.
Title: Re: FNX (big integers)
Post by: Thaddy on March 19, 2020, 09:35:13 am
I think I cannot use the modified LGPL. In the fnx.Common.LowLevel unit, about half the assembler code (64-bit Linux) is adapted from GMP. And GMP is GPL or LGPL.
For me it is not so much the license, but the fact that you mention the assembler code... That is usually not a good idea (me thinking X-platform).
About licensing: there is always the option to request a LGPL with linker exception from the original  license holders. I did so in the past on a few occasions and with 100% success.
I understand GMP is too big a project to get that done easily, but you always can try....

Also, I believe our member Xor-El has a similar library with a more liberal license. (And Marco, didn't you write a biginteger lib in the past?)
Title: Re: FNX (big integers)
Post by: avra on March 19, 2020, 10:27:15 am
with the next release, a user will be able to choose: GPL or LGPL.
I welcome your decision, but pure LGPL is not enough to allow static linking of our closed source with your library.

I think I cannot use the modified LGPL. In the fnx.Common.LowLevel unit, about half the assembler code (64-bit Linux) is adapted from GMP. And GMP is GPL or LGPL.
Thanks for letting us know that. Luckily there are alternatives.
Title: Re: FNX (big integers)
Post by: marcov on March 19, 2020, 10:31:31 am
Also, I believe our member Xor-El has a similar library with a more liberal license. (And Marco, didn't you write a biginteger lib in the past?)

No, but I was interested in the subject and usually engage with posters interested in it.  Besides bigints I also worked on a project that required (fast) int128s, but that project didn't progress to the next stage.

Title: Re: FNX (big integers)
Post by: mjm on March 19, 2020, 10:50:06 am
Or maybe relicense on a per unit basis. Then it can at least be used as a basis, and attempt to find substitutes for the encumbered routines.

Yes, it is a good idea. I could use a compiler directive to select the code, GPL/LGPL or modified LGPL.
Since it will take time to rewrite the concerned functions, obviously the code will be less good but I want it good enough, in the meantime I will release ASAP a 'new' version with both GPL and LGPL licenses.
Title: Re: FNX (big integers)
Post by: PascalDragon on March 19, 2020, 10:53:05 am
Any gpl license is a no go for me I stay away from them all.

You are aware that FPC's RTL and most of the packages are released as modified LGPL? ;D (though the point of that license is explicitly to allow inclusion in closed source applications; though if you modify the RTL or the packages then you need to provide these changes)
Title: Re: FNX (big integers)
Post by: mjm on March 19, 2020, 10:59:04 am
I think I cannot use the modified LGPL. In the fnx.Common.LowLevel unit, about half the assembler code (64-bit Linux) is adapted from GMP. And GMP is GPL or LGPL.
For me it is not so much the license, but the fact that you mention the assembler code... That is usually not a good idea

The assembler code can be disabled with {$DEFINE FNX_PASCAL_CODE_ONLY}.
Title: Re: FNX (big integers)
Post by: eljo on March 20, 2020, 08:29:44 pm
Any gpl license is a no go for me I stay away from them all.

You are aware that FPC's RTL and most of the packages are released as modified LGPL? ;D (though the point of that license is explicitly to allow inclusion in closed source applications; though if you modify the RTL or the packages then you need to provide these changes)
yes, that is why I have no lcl or fpc based commercial applications. Its a playground for me, not a development environment.
Title: Re: FNX (big integers)
Post by: avra on March 21, 2020, 06:38:29 pm
Any gpl license is a no go for me I stay away from them all.

You are aware that FPC's RTL and most of the packages are released as modified LGPL? ;D (though the point of that license is explicitly to allow inclusion in closed source applications; though if you modify the RTL or the packages then you need to provide these changes)
yes, that is why I have no lcl or fpc based commercial applications. Its a playground for me, not a development environment.
You are mistaken. You can use FPC and LCL for producing commercial applications. Details here: https://wiki.lazarus.freepascal.org/licensing#Licensing_relating_to_FPC.2FLazarus_usage
Title: Re: FNX (big integers)
Post by: eljo on March 21, 2020, 08:37:35 pm
Any gpl license is a no go for me I stay away from them all.

You are aware that FPC's RTL and most of the packages are released as modified LGPL? ;D (though the point of that license is explicitly to allow inclusion in closed source applications; though if you modify the RTL or the packages then you need to provide these changes)
yes, that is why I have no lcl or fpc based commercial applications. Its a playground for me, not a development environment.
You are mistaken. You can use FPC and LCL for producing commercial applications. Details here: https://wiki.lazarus.freepascal.org/licensing#Licensing_relating_to_FPC.2FLazarus_usage
I do not doubt that the goal is to allow for commercial development. I just don't need the gpl headache so I stay away from it. I might use it for freeware or open source in the near future but I will stay away from commercial unless I can't find find anything else that suits me. Any way this is OT in here and I'll stop responding.
Title: Re: FNX (big integers)
Post by: Otto on March 21, 2020, 09:06:55 pm
Any gpl license is a no go for me I stay away from them all.

You are aware that FPC's RTL and most of the packages are released as modified LGPL? ;D (though the point of that license is explicitly to allow inclusion in closed source applications; though if you modify the RTL or the packages then you need to provide these changes)
yes, that is why I have no lcl or fpc based commercial applications. Its a playground for me, not a development environment.
You are mistaken. You can use FPC and LCL for producing commercial applications. Details here: https://wiki.lazarus.freepascal.org/licensing#Licensing_relating_to_FPC.2FLazarus_usage
I do not doubt that the goal is to allow for commercial development. I just don't need the gpl headache so I stay away from it. I might use it for freeware or open source in the near future but I will stay away from commercial unless I can't find find anything else that suits me. Any way this is OT in here and I'll stop responding.

Hi eljo.

I agree with Avra, it would be better if you read the page that he linked to you.

Greetings.

Otto.

P.S.
(-: Warning! :-)
When I reread the post my browser went into stack overflow for too many recursive citation calls.
Title: Re: FNX (big integers)
Post by: mjm on March 29, 2020, 04:17:24 pm

FNX 0.9.5 is now licensed according to the "3-Clause BSD" License.
See https://www.ellipsa.eu/public/fnx/fnx.html

I have added a "Towers of Hanoi" method to fnx.Demo.BigInts (only to show how to use the TBigIntStack object).
I also fixed a bug: BIGINT_ZERO instead of TBIGINT_ZERO in some units. It should have been done since v0.9.3 -- maybe one day I will succeed in correctly using the Lazarus refactoring stuff.  :)
Title: Re: FNX (big integers)
Post by: avra on March 30, 2020, 01:16:57 pm
FNX 0.9.5 is now licensed according to the "3-Clause BSD" License.
That is much more liberal then I have hoped for. Thank you!
TinyPortal © 2005-2018