Max. Compilation lines of code... ?

Just starting out? Need help? Post your questions and find answers here.
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Max. Compilation lines of code... ?

Post by marc_256 »

Hi,

- For my program that I just compiled,
I'm about 758 374 lines of code to compilation.
And I'm not in 40% of my program... :shock:

Image

Q: What is the max. of lines that PB can compile :?:

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Nubcake
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Feb 03, 2011 7:44 pm

Re: Max. Compilation lines of code... ?

Post by Nubcake »

marc_256 wrote:Hi,

- For my program that I just compiled,
I'm about 758 374 lines of code to compilation.
And I'm not in 40% of my program... :shock:

Image

Q: What is the max. of lines that PB can compile :?:

Marc,
That's a lot of code! :D

Curious questions:

1.What program are you creating?
2.How long does it take to compile all that?

Nubcake
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Max. Compilation lines of code... ?

Post by marc_256 »

Hi Nubcake,
That's a lot of code! :D

Curious questions:

1.What program are you creating?
2.How long does it take to compile all that?

Nubcake
1. Its my 3D CAD/CAM/CAE program, now with *'Mesh editing' and *'Image editing' ...
I started 2 years ago now :(
it a lot of code specially for the 3D part (OGRE).
* = Not finished yet... :( but moving on every day... :)

2. About 2...3 minutes on a 2.8 GHz pc with only 2Gb of ram with PB 4.61 Final.

Parts of the program are DATA (DataSections) so...
In a week or two... :?: , I will post a part of it in a small demo.

I just love PB 4.61 with CanvasGadget(),


Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Franky
Enthusiast
Enthusiast
Posts: 213
Joined: Sat Apr 26, 2003 2:58 pm

Re: Max. Compilation lines of code... ?

Post by Franky »

You did 760 000 lines of code in 2 years which would be twice 365 days?
That's more than 1000 lines every DAY, MONDAY to SUNDAY, WINTER TO SUMMER TO WINTER TO SUMMER TO WINTER. :shock:

Don't get me wrong, the screens on your website look impressive, but I would guess that once you get a bug report, you might get in very big trouble :?


my biggest project got 10% of your's and all in all I wrote about 60% of the lines of code you've written in that program.

So, simple question: How did you get so many lines of code?
Give Up everything but trying!
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Max. Compilation lines of code... ?

Post by marc_256 »

Hi Franky,
You did 760 000 lines of code in 2 years which would be twice 365 days?
That's more than 1000 lines every DAY, MONDAY to SUNDAY, WINTER TO SUMMER TO WINTER TO SUMMER TO WINTER. :shock:
Like I wrote in my previous post, there is about 50% data.
I wrote a program to convert 'Blender' pre build meshes to Ogre mesh data.
Also I wrote a program to convert '.bmp' images to binary data for store button images, logos, ...
Don't get me wrong, the screens on your website look impressive, but I would guess that once you get a bug report, you might get in very big trouble :?
I started programming on an APPLE II, and did my first 3D applications on it. :twisted:
Veeeeery slowly, .... 1 Mhz 6502 cpu with 16Kb ram :shock:
I learned to do partial programming.
I test small parts of the big project for about 90% and only then I implement them in to the big project.
So, simple question: How did you get so many lines of code
If you use 'macros', and 3D stuff maths and lots of programming hours, about 14 Hrs a day...
Hope one day to be payed back for all this. :mrgreen:

PS: I'm just divorced (is this correct english), do not look to far to find a reason ... :?

marc,

[Edit]: I wrote a program to convert (for 60%) C++ code to PB code.
So I copied some old 3D stuff from C++ to PB.
Even old 3D (like 3D matrices and math) stuff I did on my oldest PC 486 in QB4.5 I converted to PB.
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Max. Compilation lines of code... ?

Post by MachineCode »

Franky wrote:How did you get so many lines of code?
Number of lines never impresses me. Half could be blank lines for white space reasons, or even lots of single lines like "a=a+1".
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Max. Compilation lines of code... ?

Post by c4s »

marc_256 wrote:Like I wrote in my previous post, there is about 50% data.
I wrote a program to convert 'Blender' pre build meshes to Ogre mesh data.
Also I wrote a program to convert '.bmp' images to binary data for store button images, logos
You say roughly 400.000 lines of code which is actually just data?
If that's correct then I think that you are doing something wrong. Why don't you include PNG images (smaller filesize than BMP), or use IncludeBinary or even better: Not compile them into the executable at all and store them in a custom data file?!

300.000-400.000 lines of code is still very impressive. Good luck with your project!
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Max. Compilation lines of code... ?

Post by Tenaja »

MachineCode wrote:
Franky wrote:How did you get so many lines of code?
Number of lines never impresses me. Half could be blank lines for white space reasons, or even lots of single lines like "a=a+1".
Yes, but even if half are blank, and even if you are one of those guys who refuses to make a proc longer than 10 lines with 20 lines of comments, that is STILL a LOT of code and a LOT of comments!
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Max. Compilation lines of code... ?

Post by Danilo »

marc_256 wrote:Q: What is the max. of lines that PB can compile :?:
Should only be limited by the amount of RAM you have.
PB full version does not have a line limit.
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Max. Compilation lines of code... ?

Post by marc_256 »

Hi Danilo,
Should only be limited by the amount of RAM you have.
PB full version does not have a line limit.
Thanks for your answer.
Now I can go on with my project, without to be worry. :wink:

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Max. Compilation lines of code... ?

Post by marc_256 »

Hi c4s,
300.000-400.000 lines of code is still very impressive. Good luck with your project!
Thanks for the your encouraging words, I can use them ... :wink:

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Max. Compilation lines of code... ?

Post by marc_256 »

Hi Tenaja,
Yes, but even if half are blank, and even if you are one of those guys who refuses to make a proc longer than 10 lines with 20 lines of comments, that is STILL a LOT of code and a LOT of comments!
Well how bigger the project, how more I use comments to remember some things.
There are parts of the software I wrote more than a year now,
and if you have to find something back or to change it is sometimes hard to remember how I programmed it.

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Max. Compilation lines of code... ?

Post by luis »

c4s wrote:You say roughly 400.000 lines of code which is actually just data?
If that's correct then I think that you are doing something wrong.
[...]
Not compile them into the executable at all and store them in a custom data file?!
I agree on that. Instead of all that data forced in the data segment maybe he should consider to store it in a single external resource file, packed or encrypted if that's really needed. Also it would speed up compilation time.
"Have you tried turning it off and on again ?"
Fred
Administrator
Administrator
Posts: 18247
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Max. Compilation lines of code... ?

Post by Fred »

You should really use IncludeBinary (or even external files) instead of tons of Data, it will speed up the compiling quite a bit.

edit: luis got me ;)
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Max. Compilation lines of code... ?

Post by marc_256 »

Hello Luis,

c4s and you are write,
but I'm in a development stadium,
there are to many images who are changing, button images, logos, background images, cursors, etc. ...
So, it is the best way for this moment.
If all my images , cursors and meshes are ok, then I can put them together.

Thanks for the advice,

Marc,

Edit: and Fred thanks
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Post Reply