Recent

Author Topic: free Pascal x64 platform  (Read 21574 times)

Handoko

  • Hero Member
  • *****
  • Posts: 5545
  • My goal: build my own game engine using Lazarus
Re: free Pascal x64 platform
« Reply #15 on: September 20, 2016, 10:03:22 am »
- On Windows I use Delphi for non-GUI fpc apps with two compile option macro's added to the tools menu: fpc compile release and fpc compile debug.

As I do not use Delphi, I would like to know what things of Delphi that so good that make you use Delphi IDE instead of Lazarus to build non-GUI fpc apps. Can you please explain more?

Actually the startup was optimized a lot for 1.4, together with the configurable component palette feature.
It is now very snappy if you don't have lots of editor files open.

Yes I feel it. Previously, I ever tried Lazarus 0.9xx. The startup time was really slow. It's better now although still a bit slower.

I did some tests of the startup of time of Lazarus vs Ubuntu Terminal + FP IDE on my pc. To start Terminal (I use shortcut Ctrl+Shift+T) and typing "FP" + [Enter] and wait until it's fully loaded, it takes 1.5 seconds. The startup time of Lazarus is about 4 seconds. It's just 2.5 seconds slower, I personally think it shouldn't be a problem that causes others not to use Lazarus.

I can understand Molly's points about a lot of individual files, multiple projects and multiple executables. I write an unit uniItemBox, to test it I created a project just for testing the unit. And I wrote a real project prjSideNote which uses uniItemBox. I often need to switch between them. I found something not convenient, perhaps bugs, not very sure. So for now I simple close all and open the one I want when doing the switching. Glad to hear there is project groups feature in the trunk.

You can use build modes for different targets from the same source. Many things can be configured by macros. BTW, "Debug" and "Release" build modes are created semi-automatically for you (hint Thaddy).

Build Modes is an awesome feature I like in Lazarus. Also Desktop (Tools > Desktop) which seems not much users know about it. Using Desktop, we can customize and save multiple desktop settings (windows sizes, positions, toolbars, etc). Unfortunately, the ToDo List windows settings can't be saved.

I use Build Modes and Desktop a lot. I put Desktop shortcut on source editor window's toolbar. I wish I can do it on Build Modes, for now it can't be put on the toolbar.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: free Pascal x64 platform
« Reply #16 on: September 20, 2016, 10:13:26 am »
Uhm. I could have written that ;)
Even the most unlikely combination of people can have something in common  ;D

Some of the points are surely valid but not all. Some notes:

Thank you for your feedback JuhaManninen

Quote
Actually the startup was optimized a lot for 1.4, together with the configurable component palette feature.
Yes, i agree that it is much faster then it was.

You also have a valid point with regards to the configurable component palette but i more or less hinted to that with my remark:
Quote
- Why should i configure IDE to have it better suited for the situation when all i want is compiling pure pascal without LCL ?

Quote
You mean the startup and some other operations slow down polynomially with lots of editor files? Yes, it should be profiled further and optimized, t
That is indeed one of them. The other one is that the tabs run out quickly :-)

Of course also the code-explorer can be used for that but i haven't seen that working (yet) for multiple subprojects.

Quote
Lazarus trunk can by using the project groups feature.
I was hesitant refering to that (as i initially intended), simply because i do not know curent state/progress. For sure i'll give that a try and see if i can proof myself wrong  :D

Quote
You mean the project inspector window? It can be closed and then it stays closed. All IDE windows remember their state, including visibility, size and position.
Or, did you mean something else?
I was referring to the project wizard. Start lazarus (in comparison to editor), open .pas file, ... uh... nope, not really:
"The file xxx.pas is not a lazarus project file."

Let alone being able to actually compile the code.

In addition to that. Try to create a new simple pascal project and then try replace it with that .pas file... again, nope ... much headache :-S

Quote
You can use build modes for different targets from the same source.
Sorry, as i can see now that i should have been more clear. I am aware that i can build multiple targets in one go.

I meant i have a single project, consisting of multiple files with program header that all need to be compiled.

Or is that (currently) also possible to realize with using project groups / macro's ?

In any case it is hard to please everybody. Build modes had to be hidden by default because FP IDE does not have them. Now other people say Lazarus is worse than FP IDE because certain build modes are not enabled by default.
Such is life... :)
huh ? what have i been using all this time then ? (with fp-ide that is)

I have a hunch that i'm misinterpreting something there or am missing the context in which the remark was placed ?

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #17 on: September 20, 2016, 10:21:53 am »
In any case it is hard to please everybody. Build modes had to be hidden by default because FP IDE does not have them. Now other people say Lazarus is worse than FP IDE because certain build modes are not enabled by default.
Such is life... :)
huh ? what have i been using all this time then ? (with fp-ide that is)

I have a hunch that i'm misinterpreting something there or am missing the context in which the remark was placed ?

Yup, we agree again. Scary.

Furthermore it is in the correct place, directly under "options|mode" as it should be. No other cumbersome idiotic Pokemon style roundabouts.
For Juha: here's a screenshot:
« Last Edit: September 20, 2016, 10:24:56 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: free Pascal x64 platform
« Reply #18 on: September 20, 2016, 10:35:30 am »
I write an unit uniItemBox, to test it I created a project just for testing the unit. And I wrote a real project prjSideNote which uses uniItemBox. I often need to switch between them. I found something not convenient, perhaps bugs, not very sure. So for now I simple close all and open the one I want when doing the switching. Glad to hear there is project groups feature in the trunk.

How about adding that one unit to your test project? I have done such thing many times and don't see any problem there.
If code is shared between "real" projects then it should be placed in a package, but for a simple test project you can just use it directly.

Quote
I use Build Modes and Desktop a lot. I put Desktop shortcut on source editor window's toolbar. I wish I can do it on Build Modes, for now it can't be put on the toolbar.

Yes it can. There is "Change build mode" command. Use the filter in Toolbar Configuration window.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #19 on: September 20, 2016, 10:40:03 am »
That's no help, although it works. The user interface flow is simply very badly designed for such an important feature. That's opinion, I know, but a founded one.
Even this original is better:
« Last Edit: September 20, 2016, 10:41:56 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: free Pascal x64 platform
« Reply #20 on: September 20, 2016, 10:41:19 am »
Furthermore it is in the correct place, directly under "options|mode" as it should be. No other cumbersome idiotic Pokemon style roundabouts.

Yes, this is embarrassing. I found that right after molly's post after opening "fp". Has it been there for long? Was it added for 3.0?
I practically never use FP IDE myself but I should have studied it more.
Why did Michael van Canneyt insist on hiding build modes in Lazarus by default? Either I misunderstood him or then the FP IDE feature was added later to compete with the Lazarus feature.
« Last Edit: September 20, 2016, 10:53:40 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #21 on: September 20, 2016, 10:43:36 am »
No, the build modes are really old. before 2.6.
objects are fine constructs. You can even initialize them with constructors.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #22 on: September 20, 2016, 10:49:34 am »
Michael may have a good reason, but he has to answer that himself. Hiding build modes is never a good idea. It is the only option to build a release-like executable quickly.
Note that for some platforms it is even essential: there are supported platforms that need a virtual machine to debug sourcecode in any meaningful way. Because the generated code simply won't run by lack of memory/storage space. I have no clue why it should be hidden/tucked away in a safe place? Michael?

I hope Michael means that debug mode should be on by default. Nothing more.
« Last Edit: September 20, 2016, 10:52:04 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #23 on: September 20, 2016, 11:09:17 am »
But we are digressing from the subject.
objects are fine constructs. You can even initialize them with constructors.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: free Pascal x64 platform
« Reply #24 on: September 20, 2016, 11:22:04 am »
I was referring to the project wizard. Start lazarus (in comparison to editor), open .pas file, ... uh... nope, not really:
"The file xxx.pas is not a lazarus project file."
Let alone being able to actually compile the code.
In addition to that. Try to create a new simple pascal project and then try replace it with that .pas file... again, nope ... much headache :-S

Ok, you are using Lazarus in a wrong way. I mean seriously wrong.
The Project wizard that shows after closing a project is never needed in normal work-flow. It was added by Mattias after many newbie users requested for a "Close Project" feature and then something must be shown.
In Lazarus the session info is tied into a project. It means there must be a project open always. It can be a "virtual" non-saved project, you don't have to create or save it yourself. Thus the project is not in your way when you just use Lazarus as an editor.

For Pascal programs that you develop you must create and save a project. You can combine related projects under project groups if you want.
Projects are your friend, not your enemy.

A project never needs to be closed explicitly. It is closed automatically when you open another one or when you close Lazarus.

Quote
I meant i have a single project, consisting of multiple files with program header that all need to be compiled.
Or is that (currently) also possible to realize with using project groups / macro's ?

Apparently you have logically many projects. Each of the files with program header must be compiled separately, right. Then you must obviously create a Lazarus project for each of them.
Again, projects are your friend, not your enemy.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #25 on: September 20, 2016, 01:17:53 pm »
Users are never wrong, seldom seriously wrong. Beginners are never wrong.
I would advise a thorough session or 3-5 in workflow analyses.
Of course I am likely and able to contribute. I majored in that.

I really think this is helpful.

You can also read "About Face" as an introduction.
https://www.amazon.com/About-Face-Essentials-Interaction-Design/dp/1118766571/ref=dp_ob_title_bk

There are sone earlier copies flying around on the web.
« Last Edit: September 20, 2016, 01:22:12 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #26 on: September 20, 2016, 01:36:44 pm »
- On Windows I use Delphi for non-GUI fpc apps with two compile option macro's added to the tools menu: fpc compile release and fpc compile debug.

As I do not use Delphi, I would like to know what things of Delphi that so good that make you use Delphi IDE instead of Lazarus to build non-GUI fpc apps. Can you please explain more?

More specific: Delphi 7 IDE. But I used an still use Delphi professionally since before its official release, upto XE2, but including now the freebee 10.1 .
And Delphi has some quirks with speed over the years. The old IDE's are superior for single non-gui programs or libraries.
- Speed
-Options
-
objects are fine constructs. You can even initialize them with constructors.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: free Pascal x64 platform
« Reply #27 on: September 20, 2016, 02:00:56 pm »
Ok, you are using Lazarus in a wrong way. I mean seriously wrong.
Not so long ago it was not possible to circumvent the project wizard _ever_ except for opening an existing project or creating a new one. I can see things progressed  :)

Quote
It was added by Mattias after many newbie users requested for a "Close Project" feature and then something must be shown.
Depending on what direction was chosen it might be valid. I never understood such 'wizards' myself but, once chosen you usually stick to it.

The other solution is graying out all non valid menu options when no project is 'active'. Perhaps that is an old-fashioned view of things.

Quote
For Pascal programs that you develop you must create and save a project.
Yes, i understand that.

Quote
You can combine related projects under project groups if you want.
I was pleasantly surprised as well as a bit disappointed (but perhaps i am missing something with regards to the latter).

Yes, i can create groups and yes it will compile the whole projects group all in one consecutive flow.

I'm actually lost when closing the project group window. Is there a way to get the 'active' project group back or is the group itself simply 'closed' when the group window is closed ?

The disappointment is in that the group window seems lost when closed and that i seem unable to 'switch' between projects in a more natural integrated view inside the IDE. But, that is perhaps something that still needs a bit of work.

It is good progress nonetheless  :)

Users are never wrong, seldom seriously wrong. Beginners are never wrong.

Yes i am aware i am a newbie when it comes to Lazarus. Some things i know where to find and how to use, others features/options simply aren't that intuitive to/for me. Add to that, that lazarus is constantly changing and you get confused users such as me  :D

Got it sorted now  :-*

My apologies to lazarus team for my clumsiness.  :-[

Quote
You can also read "About Face" as an introduction.
Will take me some time to read  :P

Thanks for mentioning though, seems like a good read.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: free Pascal x64 platform
« Reply #28 on: September 20, 2016, 03:20:48 pm »
Not so long ago it was not possible to circumvent the project wizard _ever_ except for opening an existing project or creating a new one. I can see things progressed  :)
There has always been either a user selected project or a "virtual" empty project open initially.
The project wizard showed up only after explicitly closing a project which was never really needed.

Quote
The other solution is graying out all non valid menu options when no project is 'active'. Perhaps that is an old-fashioned view of things.
It is not old fashioned but it follows a different concept.
In Lazarus you would need to gray out all menu options without a project. How useful is that?
As I wrote the IDE session info goes together with a project. It may not be a perfect solution but it works very well. In practice every new user (including me a long time ago) initially wants to edit files without a project and scratches his head for a while, then after few days it becomes a non-issue. A project does not slow you down in any situation, honestly. You can even run the default "virtual" project without explicitly saving it.
Shortly put: pretend there is no default empty project and everything works just fine.

Quote
The disappointment is in that the group window seems lost when closed and that i seem unable to 'switch' between projects in a more natural integrated view inside the IDE. But, that is perhaps something that still needs a bit of work.
Exactly. It is not ready yet.
Mattias recently fixed a crash bug there but otherwise has had a creative pause with it.
Maybe some new contributors can look at the code and provide patches...

Quote
Add to that, that lazarus is constantly changing and you get confused users such as me  :D
... My apologies to lazarus team for my clumsiness.  :-[
I think the changes in recent years have been for good. For example build modes and the desktop feature inevitably required some changes. You must break some eggs to make an omelet.
But yes, the IDE itself is rather clumsy in some places. I know. However the requirement for an open project is not one of the clumsy spots. It quickly becomes a non-issue when you learn it.

Users are never wrong, seldom seriously wrong. Beginners are never wrong.
Yes beginners are wrong sometimes. :)
You should also pretend there is no default empty project and all your problems go away.
A patch for separating session info from a project would be accepted. It was discussed a long time ago. Be warned though: it is not a trivial task, and the benefit in practice is small.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

RAW

  • Hero Member
  • *****
  • Posts: 871
Re: free Pascal x64 platform
« Reply #29 on: September 21, 2016, 01:21:02 am »
Quote
Lazarus can't handle multiple projects, let alone those using/mixing with other programming/scripting languages...
...
Lazarus trunk can by using the project groups feature.
Of course LAZARUS can handle as many projects as you want, take a look at the picture.
That is called "HARDCORE GROUP FEATURE" and as nowadays many people have got 20 to 100 GB of RAM.... what's the big deal ???  :D

Thanks for all the information...

 

TinyPortal © 2005-2018