Recent

Author Topic: New Big Integer library is almost finished  (Read 18322 times)

Ștefan-Iulian Alecu

  • New Member
  • *
  • Posts: 21
Re: New Big Integer library is finished
« Reply #60 on: October 11, 2024, 01:22:57 am »
It means I don't have to learn the quirks/bugs of each fashionable source control system that comes along every few years.

You must be a dinosaur then. Git's been around since... checks 2005. Is that a fashionable source control? I guess 19 years in production on the Linux kernel and worldwide is not enough for you. You've just admitted what I had in mind: you don't want to use Git, yet you treat GitHub as your hard drive.

I don't care about your experiences with SCSS or CVS, since those are entirely different and (now) obsolete projects.

At that point I abandoned source control software, and used a manual source control method with every change going into a separately named file.

That surely can never fail... God forbid someone gets access to your computer and deletes your bulletproof files. Or if you overwrite your own files... Doing things in small chunks? What's that? That's for suckers.

If anyone else volunteered to help on this project, I would learn how to use Git. But until that happens, I will use my own method, because I can guarantee 100% that it works.

You got two pull requests from me and I am also maintaining (and improving) your code on a separate fork: https://github.com/vmaskmovps/Multi-Word-Int/tree/feat/improve-code. What's your excuse now? At least someone's taking a look through your 18k lines. I told y'all I am putting my money where my mouth is.  ;)

Ștefan-Iulian Alecu

  • New Member
  • *
  • Posts: 21
Re: New Big Integer library is finished
« Reply #61 on: October 11, 2024, 01:25:33 am »
PS: I also saw you using labels and goto's simply to jum to the end of a procedure.
Quoting from https://www.ee.ryerson.ca/~elf/hack/realmen.html

Real Programmers aren't afraid to use GOTOs.
Real Programmers can write five page long WHILE loops without getting confused.
Real Programmers don't need comments: the code is obvious.
 :)

Well, real programmers don't use Pascal. Are you a quiche eater? ;)

Tony Stone

  • Full Member
  • ***
  • Posts: 234
Re: New Big Integer library is finished
« Reply #62 on: October 11, 2024, 01:27:22 am »
I plan to use it this winter to attempt some of my own cryptographic functions. 
Can I ask...
1. Has anyone used my library, or planning to use it, in your own software?
2. If so, what are you using it for?
Just curious.
Thanks.


GordonFindlay

  • Guest
Re: New Big Integer library is finished
« Reply #63 on: October 11, 2024, 02:27:49 am »
Can I ask...
1. Has anyone used my library, or planning to use it, in your own software?
2. If so, what are you using it for?
Just curious.
Thanks.

Thanks for all your work.

I'm using it to explore prime numbers - a mathematical interest of many decades.  I've found the package, so far, considerably easier to use and more robust than the other two Pascal bigint packages that I have played with.

Slainte
Gordon

GordonFindlay

  • Guest
Re: New Big Integer library is finished
« Reply #64 on: October 11, 2024, 02:35:03 am »
PS: I also saw you using labels and goto's simply to jum to the end of a procedure.
Quoting from https://www.ee.ryerson.ca/~elf/hack/realmen.html

Real Programmers aren't afraid to use GOTOs.
Real Programmers can write five page long WHILE loops without getting confused.
Real Programmers don't need comments: the code is obvious.
 :)

Well, real programmers don't use Pascal. Are you a quiche eater? ;)

Since you are here I assume you use Pascal. And eat quiche.

I don't understand why the free gift of years of work from someone is greeted by such a pile-on as you have engaged in.

Your toolset and other peoples' may be different; that does not excuse (or justify) your transition from robust debate to rudeness. 

Don't bother replying to me - I am ignoring this topic now.  Your childish behaviour has ruined it.

Ștefan-Iulian Alecu

  • New Member
  • *
  • Posts: 21
Re: New Big Integer library is finished
« Reply #65 on: October 11, 2024, 03:20:13 am »
Since you are here I assume you use Pascal. And eat quiche.

...yes, that was the point. I understood the reference and I responded with a joke from the same article. I guess you didn't catch that. And no, I don't eat quiche, yet. I am also not a real programmer.

I am more honest and straightforward when it comes to my conversation skills, but I am not just shitting on the project for no reason. The repo link above + the posts here and the issues (with pull requests, so not just talking the talk) show that I can argue my points and offer constructive criticism, however abrasive I might come across to you. I am doing something to contribute to this project by going through it and improving it (you can watch the progress at the repo link above), so people like you and whoever else might come across this can more easily use this project. As it stands, the project's idea is useful (a big integer library in pure Pascal without bindings to GMP or any other tricks), and it is a lot of work that Mark (ad1mt) has done here, but it doesn't mean that we should protect him or the project from any criticism. It is in the public domain (allegedly), and Mark chose to post his project on GitHub, so I have the right to express my critiques, like everyone else.

Ștefan-Iulian Alecu

  • New Member
  • *
  • Posts: 21
Re: New Big Integer library is finished
« Reply #66 on: October 11, 2024, 03:23:17 am »
And ad1mt: {$define 32bit} doesn't work, it will always be true, and that's invalid as a define, so you should better choose something like {$define CPU_32}, like I did with my fork. As such, having those original defines doesn't actually do anything. I think someone else in this thread told you that last year. I got bit by that while trying to compile the unit. Better yet, I think you can default to 64 bit and have a {$define FORCE_32_BIT} or something similar, since that's what the intent seems to be, at least from my interpretation of:

Quote
Code: Pascal  [Select][+][-]
  1. // This should be changed to 32bit if you wish to override the default/detected setting
  2. // E.g. if your compiler is 64bit but you want to generate code for 32bit integers,
  3. // you would remove the "{$define CPU_64}" and replace it with "{$define CPU_32}"
  4. // In 99.9% of cases, you should leave this to default, unless you have problems
  5. // running the code in a 32bit environment.
  6.  

ad1mt

  • Sr. Member
  • ****
  • Posts: 327
    • Mark Taylor's Home Page
Re: New Big Integer library is finished
« Reply #67 on: October 11, 2024, 01:11:26 pm »
You must be a dinosaur then.
You are absolutely correct... I am a dinosaur!
I first started programming professionally in 1980. I had to write my entire COBOL program in pencil onto special sheets of paper, which were then converted into punched cards by special typists. The punched cards were then taken to the computer room and fed into the computer. If you dropped the cards on the way to the computer room, you had no chance of sorting them back into the correct order, and they had to be typed again from the sheets of paper. After the cards had been fed into the computer, the program could be compiled.
I am now 69 years old, and don't have the time or energy to learn all the latest fashionable methods of working!
regards, Mark.
« Last Edit: October 11, 2024, 06:27:34 pm by ad1mt »

ad1mt

  • Sr. Member
  • ****
  • Posts: 327
    • Mark Taylor's Home Page
Re: New Big Integer library is finished
« Reply #68 on: October 11, 2024, 01:16:35 pm »
I am also maintaining (and improving) your code on a separate fork
I welcome all suggestions for improving the code, so I will take a look.
Thanks.

ad1mt

  • Sr. Member
  • ****
  • Posts: 327
    • Mark Taylor's Home Page
Re: New Big Integer library is finished
« Reply #69 on: October 11, 2024, 01:19:38 pm »
I plan to use it this winter to attempt some of my own cryptographic functions.
That is also what I'm doing.
I've designed my own cryptographic RNG, although the people on reddit/crypto are not impressed!

ad1mt

  • Sr. Member
  • ****
  • Posts: 327
    • Mark Taylor's Home Page
Re: New Big Integer library is finished
« Reply #70 on: October 11, 2024, 01:22:16 pm »
You got two pull requests from me and I am also maintaining (and improving) your code on a separate fork
I would be especially interested in help with coding the Burnikel-Ziegler division algorithm; I think that would be my at the top of my list of improvements.
« Last Edit: October 11, 2024, 07:30:42 pm by ad1mt »

ad1mt

  • Sr. Member
  • ****
  • Posts: 327
    • Mark Taylor's Home Page
Re: New Big Integer library is finished
« Reply #71 on: October 11, 2024, 01:26:37 pm »
I'm using it to explore prime numbers - a mathematical interest of many decades.

I've found the package, so far, considerably easier to use and more robust than the other two Pascal bigint packages that I have played with.
I'm glad to hear my very basic library is of use to others.
I also did some experimenation with prime numbers and code to discover them. It was not very clever, just an extended implementation of the the seive.

Have you written a program to find/test primes?  If so, I would be interested to compare your code with mine.
« Last Edit: October 11, 2024, 07:31:34 pm by ad1mt »

ad1mt

  • Sr. Member
  • ****
  • Posts: 327
    • Mark Taylor's Home Page
Re: New Big Integer library is finished
« Reply #72 on: October 11, 2024, 07:34:37 pm »
I am also maintaining (and improving) your code on a separate fork
I'm curious to know what are your aims in forking my Github project?
Are you planning to improve the algorithms?  E.g. design & code faster division or multiplication algorithms?
« Last Edit: October 14, 2024, 11:47:14 pm by ad1mt »

MathMan

  • Sr. Member
  • ****
  • Posts: 405
Re: New Big Integer library is finished
« Reply #73 on: October 11, 2024, 08:09:42 pm »
You got two pull requests from me and I am also maintaining (and improving) your code on a separate fork
I would be especially interested in help with coding the Burnikel-Ziegler division algorithm; I think that would be my at the top of my list of improvements.

Implementing Burnikel-Ziegler will not improve the speed of your division as long as you do not have efficient multiplication in place.

From my perspective the way to go is

- get your act together on the base-case division (which is what you are currently working on). That includes, sorry to repeat myself here, reaping the low hanging fruits first and transfer the division routines I sent you last year into your lib.
- once you have that, and it is passing all tests, look into Karatsuba multiplication. This is the simplest of all efficient multiplication algorithms.
- once you have that, and it is passing all tests, you can look into divide & conquer divisions like Burnikel-Ziegler.

I personally would not implement Burnikel-Ziegler but rather the Jebelean D&C division - it is simpler in implementation, easier to understand and as fast as Burnikel-Ziegler.

Cheers,
MathMan

ad1mt

  • Sr. Member
  • ****
  • Posts: 327
    • Mark Taylor's Home Page
Re: New Big Integer library is finished
« Reply #74 on: October 12, 2024, 12:17:41 pm »
And ad1mt: {$define 32bit} doesn't work
Thanks for reporting this. I have just made version 4.62 available which should fix this bug.
« Last Edit: October 14, 2024, 11:46:51 pm by ad1mt »

 

TinyPortal © 2005-2018