Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-07

DateTimeToUnix bug ?

64 messages · 16 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,
I have a linux application where I use DatetimeToUnix. I think it contains a bug.
Every minute I put a sample in an rrddb (rrdtool). When I dump the rrddb, the time of the samples is 2 hours in the future. Those 2 hours happen to be the time-zone difference, between UTC and CEST. Anyone can verify this ?

This is what I used to test this :
program DateTest;
{$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
uses
  {$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}
  sysutils, dateutils;
var
  Nu : TDateTime;
begin
Nu:=Now;
writeln(nu:1:8,' ',DateTimeToStr(nu),' ',DatetimeToUnix(Nu));
end.

When I run "./DateTest && date +%s && date" I get : 40009.44713685 15-7-09 10:43:52 1247654632
1247647432
wo jul 15 10:43:52 CEST 2009

Between the fpc-version and the linux-version of the unix-time there is 7200 seconds difference, fpc running ahead.

Is it a bug, or am I missing someting ? This happens with FPC 2.4.

Regards,
Koenraad Lelong.

Jonas Maebe
to Koenraad Lelong
Koenraad Lelong wrote 5 lines
I have a linux application where I use DatetimeToUnix. I think it contains a bug. Every minute I put a sample in an rrddb (rrdtool). When I dump the rrddb, the time of the samples is 2 hours in the future. Those 2 hours happen to be the time-zone difference, between UTC and CEST.

DatetimeToUnix is defined as returning the "Unix epoch time corresponding to AValue". So by definition it does not perform any time zone adjustments (which is logical, since there is no information regarding what time zone the input value is related to). It's the same in Delphi (just google for DatetimeToUnix+timezone

If you want "now" using the local time zone, use sysutils.getlocaltime instead.

Jonas

Koenraad Lelong
to Jonas Maebe
Jonas Maebe wrote 20 lines
On 15 Jul 2009, at 11:06, Koenraad Lelong wrote: > I have a linux application where I use DatetimeToUnix. I think it > contains a bug. > Every minute I put a sample in an rrddb (rrdtool). When I dump the > rrddb, the time of the samples is 2 hours in the future. Those 2 hours > happen to be the time-zone difference, between UTC and CEST. DatetimeToUnix is defined as returning the "Unix epoch time corresponding to AValue". So by definition it does not perform any time zone adjustments (which is logical, since there is no information regarding what time zone the input value is related to). It's the same in Delphi (just google for DatetimeToUnix+timezone If you want "now" using the local time zone, use sysutils.getlocaltime instead. Jonas

Thanks Jonas, but that gives the same result. I found that fpGetTimeOfDay does the trick.

Regards,
Koenraad.

Jürgen Hestermann
to Koenraad Lelong

I am not sure whether there exists a separate mailing list just for Lazarus so I am posting this here:

I have seen a small discussion on
about
where Lazarus stores its configuration settings. I wanted to mention that I have a problem with this because on our machines at work we have a roaming profile which only saves parts of the user profile but not the "Local settings" branch (where Lazarus stores its settings). So after each reboot all settings are gone. Is there a way to configure Lazarus to use a different (non-user) path? I didn't find any option to do that.

Jürgen Hestermann.

Jürgen Hestermann
to Koenraad Lelong: Thanks Jonas, but that gives the same result. I found that fpGetTimeOfDay does the trick.…

A question:

Do persistent blocks exist the Lazarus editor?
I didn't find any such option.
I am bit astonished about that because all Pascal forefathers like Turbo Pascal, Virtual Pascal and Delphi had it.

If it does not exist, is it planned to add?
I miss this mode very much. It allowed a way of working which cannot be achieved with the current temporary block mode.

Thanks in advance for answers.

Jürgen Hestermann.

Jürgen Hestermann
to Zaher Dirkey
Zaher Dirkey schrieb: use c:\lazarus\Lazarus.exe --pcp=x:\lazarus\config

Thanks for the solution!

Still I am wondering why the directory "Local Settings" is used and not "Application Data" as all other applications do. Then it would be saved with roaming profiles too.

Martin Friebe
to Jürgen Hestermann: A question: Do persistent blocks exist the Lazarus editor? I didn't find any such option.…

First of all, Lazarus has it's own mailing list, where you will be more likely to receive answers...

Jürgen Hestermann wrote
A question: Do persistent blocks exist the Lazarus editor?

Not at current.

If it does not exist, is it planned to add?

Maybe some day. There is no concrete plan that I know of, so it isn't likely to be any time soon.
Patches are welcome.

I miss this mode very much. It allowed a way of working which cannot be achieved with the current temporary block mode.

Out of curiosity (because I never used this feature in any editor), what would you use it for?

Best Regards
Martin

Luca Olivetti
to Jürgen Hestermann: Thanks for the solution! Still I am wondering why the directory "Local Settings" is used…

En/na Jürgen Hestermann ha escrit:

Show quoted text 8 lines
> Zaher Dirkey schrieb: > use c:\lazarus\Lazarus.exe --pcp=x:\lazarus\config Thanks for the solution! Still I am wondering why the directory "Local Settings" is used and not "Application Data" as all other applications do. Then it would be saved with roaming profiles too.

http://bugs.freepascal.org/view.php?id=13908

Bye

Luca
Jürgen Hestermann
to Luca Olivetti
Show quoted text 5 lines
> Still I am wondering why the directory "Local Settings" is used and > not "Application Data" as all other applications do. Then it would be > saved with roaming profiles too. Luca Olivetti schrieb: http://bugs.freepascal.org/view.php?id=13908

Interesting that noone mentioned the impact on roamed profiles. That's definitely a drawback because you lose all your settings then!

Jürgen.

Vincent Snijders
to Jürgen Hestermann
Jürgen Hestermann wrote 8 lines
>> Still I am wondering why the directory "Local Settings" is used and >> not "Application Data" as all other applications do. Then it would be >> saved with roaming profiles too. > Luca Olivetti schrieb: > http://bugs.freepascal.org/view.php?id=13908 Interesting that noone mentioned the impact on roamed profiles. That's definitely a drawback because you lose all your settings then!

I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea.

Vincent

Jürgen Hestermann
to Martin Friebe: First of all, Lazarus has it's own mailing list, where you will be more likely to receive…
Martin Friebe schrieb: Out of curiosity (because I never used this feature in any editor), what would you use it for?

I used it since Turbo Pascal 5 and found it in all other Pascal IDE's (even in the text mode IDE of Free Pascal!). And it seems others would like it too (see
http://www.lazarus.freepascal.org/index.php?topic=4978.0;wap2).

With persistent blocks you can easily mark text for later use as a (second) kind of clipboard which is local to the file you are editing.

You can easily move to the beginning or end (in most implementations even if the block is "hidden"/not visible). That works as a kind of "go to last working area".

You can also set visually marks with it (because it's highlighted) so that when you are srolling up or down you see immediately that you crossed that part of text.

Jürgen.

Luca Olivetti
to Vincent Snijders: I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea.…

En/na Vincent Snijders ha escrit:

Show quoted text 9 lines
Jürgen Hestermann schreef: >>> Still I am wondering why the directory "Local Settings" is used and >>> not "Application Data" as all other applications do. Then it would >>> be saved with roaming profiles too. >> Luca Olivetti schrieb: >> http://bugs.freepascal.org/view.php?id=13908 > > Interesting that noone mentioned the impact on roamed profiles. That's > definitely a drawback because you lose all your settings then!

They're not roaming but they're not lost (at least here).

I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea.

My lazarus config directory is 254K under windows and 196K under linux.

Bye

Luca
Vincent Snijders
to Luca Olivetti
Luca Olivetti wrote 5 lines
> > I am not sure having a 100 MB lazarus *roaming* profile by default > would be a good idea. My lazarus config directory is 254K under windows and 196K under linux.

I guess your lazarus directory is either writable or you didn't install components. Otherwise you have a lazarus executable with your components in <primary-config-path>/bin.

Vincent

Luca Olivetti
to Vincent Snijders

En/na Vincent Snijders ha escrit:

Show quoted text 10 lines
Luca Olivetti schreef: >> >> I am not sure having a 100 MB lazarus *roaming* profile by default >> would be a good idea. > > My lazarus config directory is 254K under windows and 196K under linux. I guess your lazarus directory is either writable or you didn't install components. Otherwise you have a lazarus executable with your components in <primary-config-path>/bin.

Yes, my lazarus directory is writable. The configuration directory doesn't seem to me a suitable place for the executable. That's why under windows you have both CSIDL_APPDATA and CSIDL_LOCAL_APPDATA.

Bye

Luca
Vincent Snijders
to Luca Olivetti
Luca Olivetti wrote 16 lines
En/na Vincent Snijders ha escrit: > Luca Olivetti schreef: >>> >>> I am not sure having a 100 MB lazarus *roaming* profile by default >>> would be a good idea. >> >> My lazarus config directory is 254K under windows and 196K under linux. > > I guess your lazarus directory is either writable or you didn't > install components. Otherwise you have a lazarus executable with your > components in <primary-config-path>/bin. Yes, my lazarus directory is writable. The configuration directory doesn't seem to me a suitable place for the executable. That's why under windows you have both CSIDL_APPDATA and CSIDL_LOCAL_APPDATA.

Correct. And that is why if you have only one config dir, local app data is maybe not so bad choice.

Vincent

Florian Klaempfl
to Vincent Snijders: I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea.…
Show quoted text 12 lines
Jürgen Hestermann schreef: >>> Still I am wondering why the directory "Local Settings" is used and >>> not "Application Data" as all other applications do. Then it would >>> be saved with roaming profiles too. >> Luca Olivetti schrieb: >> http://bugs.freepascal.org/view.php?id=13908 > > Interesting that noone mentioned the impact on roamed profiles. That's > definitely a drawback because you lose all your settings then! I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea.

I've a roaming profile of several you don't change your working machine daily, this is no problem. Only if I log in into a machine I never used before, it takes some minutes till the data is fetched.

Vincent Snijders
to Florian Klaempfl
Florian Klaempfl wrote 9 lines
Vincent Snijders schrieb: > Jürgen Hestermann schreef: >> definitely a drawback because you lose all your settings then! > I am not sure having a 100 MB lazarus *roaming* profile by default would > be a good idea. I've a roaming profile of several you don't change your working machine daily, this is no problem. Only if I log in into a machine I never used before, it takes some minutes till the data is fetched.

Jürgen Hestermann, how often do you change your working machine?

Vincent

Luca Olivetti
to Vincent Snijders: Correct. And that is why if you have only one config dir, local app data is maybe not so…

En/na Vincent Snijders ha escrit:

Show quoted text 7 lines
> Yes, my lazarus directory is writable. The configuration directory > doesn't seem to me a suitable place for the executable. > That's why under windows you have both CSIDL_APPDATA and > CSIDL_LOCAL_APPDATA. Correct. And that is why if you have only one config dir, local app data is maybe not so bad choice.

Well, I don't see why we can have only one config dir: windows offers two (notwithstanding the fact that the whole roaming profile implementation is moronic)

Bye

Luca
Vincent Snijders
to Luca Olivetti
Luca Olivetti wrote
Well, I don't see why we can have only one config dir: windows offers two (notwithstanding the fact that the whole roaming profile implementation is moronic)

I see why: not yet implemented.

Vincent

Jürgen Hestermann
to Vincent Snijders: Jürgen Hestermann, how often do you change your working machine? Vincent
Jürgen Hestermann, how often do you change your working machine?

Well, I seldom change it and I would not even need the Lazarus settings on other machines because I did not install it on these machines.

But our system works the following (I don't know whether it is specific to our company or whether Windows offers this way of working too):

If I log on to a machine a Windows user does not exist for me (yet). I log on to Novell Netware first, then a local (duplicate) of my user is created on the local Windows machine. Then the profile is copied from my (Novell) user home dir to the local (Windows) user. If I log off, the local profile is saved (partely) to the (Novell) home dir and then the local Windows user is deleted completely (including the profile!). So if I log on the next day all parts of the profile that were not saved are gone!

I think it would be much better if the Lazarus settings would be saved to the Lazarus directory by default. Having 2 or more people sharing the same machine for Lazarus developement would be very seldom I suppose. And if so, they would be able to use different settings (if needed) by using a command line option in the same way as people like me have to use them now when having roaming profiles. At least no one would lose any settings this way. It could just happen that people have to search for (command line) options to cope with multiple settings.

Jürgen Hestermann.

Jürgen Hestermann
to Vincent Snijders: I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea.…
I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea.

That's true (although my settings are only 130 kB but they may grow). Therefore it would be the best of all worlds to save the Lazarus settings to the Lazarus directory. Then you would not have any problems when using roaming profiles (neither losing settings nor performance impact when copying data on logon).

Jürgen Hestermann.

Vinzent Hoefler
to Jürgen Hestermann
Jürgen Hestermann wrote 6 lines
> I am not sure having a 100 MB lazarus *roaming* profile by default > would be a good idea. That's true (although my settings are only 130 kB but they may grow). Therefore it would be the best of all worlds to save the Lazarus settings to the Lazarus directory.

No. A sane environment shouldn't even grant you write permissions there.

Then you would not have any problems when using roaming profiles (neither losing settings nor performance impact when copying data on logon).

But you would lose your settings when changing the machine, because then the settings aren't part of your profile anymore.

Vinzent.

Michael Van Canneyt
to Vinzent Hoefler
Vinzent Hoefler wrote 16 lines
On Thursday 16 July 2009, Jürgen Hestermann wrote: >> I am not sure having a 100 MB lazarus *roaming* profile by default >> would be a good idea. > > That's true (although my settings are only 130 kB but they may grow). > Therefore it would be the best of all worlds to save the Lazarus > settings to the Lazarus directory. No. A sane environment shouldn't even grant you write permissions there. > Then you would not have any > problems when using roaming profiles (neither losing settings nor > performance impact when copying data on logon). But you would lose your settings when changing the machine, because then the settings aren't part of your profile anymore.

I will attempt to solve the discussion:
AFAIK Lazarus uses the getappconfigdir() call. I'll add a optional parameter called 'Roaming', which defaults to 'False' (for backward compatibility), and which can then be used to get the roaming profile directory. On non-windows, it will be ignored.

It is then up to the lazarus devs to use the call to check for the 2 directories if they are so inclined, and possibly offer the choice.

Can everybody live with that ?

Michael.

Mattias Gaertner
to Jürgen Hestermann: Well, I seldom change it and I would not even need the Lazarus settings on other machines…
Show quoted text 6 lines
> Jürgen Hestermann, how often do you change your working machine? Well, I seldom change it [...] If I log off, the local profile is saved (partely) to the (Novell) home dir and then the local Windows user is deleted completely (including the profile!)

IMO: This type of sharing does not sound very suitable for a development machine.

[...] I think it would be much better if the Lazarus settings would be saved to the Lazarus directory by default.

This is not always writable.
There are many platforms, many ways to install lazarus and development machines are almost always special. That's why the defaults are made for the binary packages where the lazarus directory is read only. If you don't use the default, you must tell lazarus and pass the pcp parameter.

Having 2 or more people sharing the same machine for Lazarus developement would be very seldom I suppose.

For example a pool for students.

[...] At least no one would lose any settings this way.

No default will fit all cases.

Mattias

Jürgen Hestermann
to Vinzent Hoefler: No. A sane environment shouldn't even grant you write permissions there. But you would…
> Therefore it would be the best of all worlds to save the Lazarus > settings to the Lazarus directory. No. A sane environment shouldn't even grant you write permissions there.

Then Lazarus should ask where to put the settings on installation because there are so many different configurations and Lazarus cannot guess it correctly. I would like to have it in the Lazarus directoy and you can be sure that my environment is "sane".

Show quoted text 5 lines
> Then you would not have any > problems when using roaming profiles (neither losing settings nor > performance impact when copying data on logon). But you would lose your settings when changing the machine, because then the settings aren't part of your profile anymore.

Well, I now lose the settings even on the one and only machine I am using Lazarus.

Vincent Snijders
to Jürgen Hestermann
Jürgen Hestermann wrote 8 lines
>> Therefore it would be the best of all worlds to save the Lazarus >> settings to the Lazarus directory. > No. A sane environment shouldn't even grant you write permissions there. Then Lazarus should ask where to put the settings on installation because there are so many different configurations and Lazarus cannot guess it correctly. I would like to have it in the Lazarus directoy and you can be sure that my environment is "sane".

Patches are welcome.

Show quoted text 9 lines
>> Then you would not have any problems when using roaming profiles >> (neither losing settings nor >> performance impact when copying data on logon). > But you would lose your settings when changing the machine, because > then the settings aren't part of your profile anymore. Well, I now lose the settings even on the one and only machine I am using Lazarus.

IMHO, that is more a problem of your novel setup than of Lazarus. Anyway you know now the trick: --pcp.

Vincent

Mattias Gaertner
to Jürgen Hestermann: Then Lazarus should ask where to put the settings on installation because there are so…
Show quoted text 9 lines
>> Therefore it would be the best of all worlds to save the Lazarus >> settings to the Lazarus directory. > No. A sane environment shouldn't even grant you write permissions > there. Then Lazarus should ask where to put the settings on installation because there are so many different configurations and Lazarus cannot guess it correctly. I would like to have it in the Lazarus directoy and you can be sure that my environment is "sane".

You can create a feature request (bug tracker) for the windows installer to ask for the config directory. Then the windows installer can setup the pcp parameter in the links.

Show quoted text 8 lines
>> Then you would not have any >> problems when using roaming profiles (neither losing settings nor >> performance impact when copying data on logon). > But you would lose your settings when changing the machine, because > then the settings aren't part of your profile anymore. Well, I now lose the settings even on the one and only machine I am using Lazarus.

Use the pcp param.

Mattias

Jürgen Hestermann
to Mattias Gaertner: On Thu, 16 Jul 2009 10:30:23 +0200 IMO: This type of sharing does not sound very suitable…
> If I log off, the local profile is saved (partely) to the (Novell) > home dir and then the local Windows user is deleted completely (including the profile!) IMO: This type of sharing does not sound very suitable for a development machine.

Our company has a world wide identical setup for computers. Deleting the user and its profile on logout prevents others from viewing it (favourites, recent lists, etc.) when they logon on to the same machine later. I am not able to change this and have to live with it. And I think that this a logical way of configuration.

Show quoted text 5 lines
> I think it would be much better if the Lazarus settings would be > saved to the Lazarus directory by default. This is not always writable. There are many platforms, many ways to install lazarus and development machines are almost always special.

Yes. Therefore I think Lazarus should ask on install. Would be better than letting users first lose settings. Some may blame other processes for the loss (as I did first too) and only find out later that it's the roaming profile. Especially, because all other software I know uses the "Application Data" directory to store application and user specific settings. That's what it is made for. Of course, this can again bring up problems in profile size (which is limited to 10 MB in our envrionment) so I think the only solution is to ask on installation where to put it. This also sensitizes the user to the problem.

No default will fit all cases.

That's true. Therefore the user should decide IMHO.

Jürgen Hestermann
to Vincent Snijders: Patches are welcome. IMHO, that is more a problem of your novel setup than of Lazarus.…
IMHO, that is more a problem of your novel setup than of Lazarus.

I don't think so. It's a vaild setup for Windows machines since many years (see http://www.novell.com/coolsolutions/feature/3136.html). So why consider all other setups but not this one?

Anyway you know now the trick: --pcp.

That's true. I am only thinking of others who have to learn this the hard way too.

Luca Olivetti
to Michael Van Canneyt: I will attempt to solve the discussion: AFAIK Lazarus uses the getappconfigdir() call.…

En/na Michael Van Canneyt ha escrit:

Show quoted text 6 lines
I will attempt to solve the discussion: AFAIK Lazarus uses the getappconfigdir() call. I'll add a optional parameter called 'Roaming', which defaults to 'False' (for backward compatibility), and which can then be used to get the roaming profile directory. On non-windows, it will be ignored.

Thats' a good solution: it won't break backwards compatibility and it gives the option to fix the behaviour of current programs that are using CSIDL_LOCAL_APPDATA.

It is then up to the lazarus devs to use the call to check for the 2 directories if they are so inclined, and possibly offer the choice.

I'd say that by default it should then use GetAppConfigDir(true) for the settings and GetAppConfigDir(false) for rebuilding the lazarus executable.

Bye

Luca
Michael Van Canneyt
to Andreas Berger
Andreas Berger wrote 5 lines
> Out of curiosity (because I never used this feature in any editor), what > would you use it for? Persistent blocks and the full Wordstar keyboard shortcuts is why I use the Delphi IDE until today.

Me too. I never got used to the windows way...

Michael.

Florian Klaempfl
to Mattias Gaertner: On Thu, 16 Jul 2009 10:30:23 +0200 IMO: This type of sharing does not sound very suitable…
Show quoted text 11 lines
On Thu, 16 Jul 2009 10:30:23 +0200 Jürgen Hestermann wrote: >> Jürgen Hestermann, how often do you change your working machine? > Well, I seldom change it [...] > > If I log off, the local profile is saved (partely) to the (Novell) > home dir and then the local Windows user is deleted completely (including the profile!) IMO: This type of sharing does not sound very suitable for a development machine.

I think roaming profiles are something very common in a commercial environment? It is a very good solution for the typcial professional use case where you use most of the time the same machine but sometimes you switch the machine. During your daily work you don't have the bottleneck of network/server access and when logging out, all data is stored again on the server so backups can be easily made. It combines the advantages of a networked home/profile directory and a fat client.

Jürgen Hestermann
to Vinzent Hoefler
> Well, this is happening now, since CSIDL_LOCAL_APPDATA isn't roamed. Yes. So what's the advantage in using the Lazarus directory instead? ;)

I wouldn't lose my settings on logoff. ;-)

Mattias Gärtner
to Florian Klaempfl: I think roaming profiles are something very common in a commercial environment? It is a…

Zitat von Florian Klaempfl :

Show quoted text 21 lines
Mattias Gaertner schrieb: > On Thu, 16 Jul 2009 10:30:23 +0200 > Jürgen Hestermann wrote: > >>> Jürgen Hestermann, how often do you change your working machine? >> Well, I seldom change it [...] >> >> If I log off, the local profile is saved (partely) to the (Novell) >> home dir and then the local Windows user is deleted completely >> (including the profile!) > > IMO: This type of sharing does not sound very suitable for a development > machine. I think roaming profiles are something very common in a commercial environment? It is a very good solution for the typcial professional use case where you use most of the time the same machine but sometimes you switch the machine. During your daily work you don't have the bottleneck of network/server access and when logging out, all data is stored again on the server so backups can be easily made. It combines the advantages of a networked home/profile directory and a fat client.

Sorry for the confusion. Of course this type of sharing makes perfect sense for office computers, stores and thin clients. The user settings are *normally* only a few MB and are machine independent, so they can be easily shared in whatever way you prefer (copy/delete, network file system, etc...).
But development easily creates hundreds or thousands of MB. Sharing this with with auto copy/delete on log on/off is not the best idea. That's why I think there are better network sharing systems for development machines (network file systems, incremental syncs, dfs, ...).

just my 2 cents.

Mattias

Florian Klaempfl
to Mattias Gärtner
Show quoted text 33 lines
Zitat von Florian Klaempfl : > Mattias Gaertner schrieb: >> On Thu, 16 Jul 2009 10:30:23 +0200 >> Jürgen Hestermann wrote: >> >>>> Jürgen Hestermann, how often do you change your working machine? >>> Well, I seldom change it [...] >>> >>> If I log off, the local profile is saved (partely) to the (Novell) >>> home dir and then the local Windows user is deleted completely >>> (including the profile!) >> >> IMO: This type of sharing does not sound very suitable for a development >> machine. > > I think roaming profiles are something very common in a commercial > environment? It is a very good solution for the typcial professional use > case where you use most of the time the same machine but sometimes you > switch the machine. During your daily work you don't have the bottleneck > of network/server access and when logging out, all data is stored again > on the server so backups can be easily made. It combines the advantages > of a networked home/profile directory and a fat client. Sorry for the confusion. Of course this type of sharing makes perfect sense for office computers, stores and thin clients. The user settings are *normally* only a few MB and are machine independent, so they can be easily shared in whatever way you prefer (copy/delete, network file system, etc...). But development easily creates hundreds or thousands of MB. Sharing this with with auto copy/delete on log on/off is not the best idea. That's why I think there are better network sharing systems for development machines (network file systems,

A network file system is too slow for developing. Compiling anything via nfs or smb is a nightmare speedwise.

incremental syncs, dfs, ...).

Indeed, sources etc. are just stored on the local harddisk being checked out from the vcs.

Zaher Dirkey
to Florian Klaempfl

Hi,

- "Use setup to define the link", i am compile Lazarus from the source not install the by setup.

Is it bad idea to make Lazarus read ini/config file in same Lazarus dir, if the file exists then read the path to config directory from it, if not leave Lazarus as is.

Eclipse IDE ask to workspace in first run.

Thanks

Zaher Dirkey
Mattias Gärtner
to Florian Klaempfl: A network file system is too slow for developing. Compiling anything via nfs or smb is a…

Zitat von Florian Klaempfl :

Show quoted text 6 lines
Mattias Gärtner schrieb: > Zitat von Florian Klaempfl : > >>> [...] A network file system is too slow for developing. Compiling anything via nfs or smb is a nightmare speedwise.

NFS over gigabit is not that bad.
For example compiling 94k lines of codetools on a network share and on local disc makes no difference.
Compiling whole lazarus on a network share can be even faster than compiling locally, because saving a big chunk like the IDE executable is faster than the local disk.

Lazarus itself had some performance problems with network shares in the past, because of its many file stat calls. I implemented a caching some years ago, which accelerated it by orders of magnitudes.

My conclusion:
I agree with Jonas, you can use network shares for development machines. Roaming profiles using auto copy/delete are not the best choice for that.

> incremental syncs, dfs, ...). Indeed, sources etc. are just stored on the local harddisk being checked out from the vcs.

Mattias

Mattias Gärtner
to Zaher Dirkey: - "Use setup to define the link", i am compile Lazarus from the source not install the by…

Zitat von Zaher Dirkey :

Show quoted text 8 lines
Hi, - "Use setup to define the link", i am compile Lazarus from the source not install the by setup. Is it bad idea to make Lazarus read ini/config file in same Lazarus dir, if the file exists then read the path to config directory from it, if not leave Lazarus as is.

I'm not sure what you mean. Can you explain this in other words/with examples?

Eclipse IDE ask to workspace in first run.

Lazarus does not have the concept of 'workspace' as eclipse.

Mattias

Florian Klaempfl
to Mattias Gärtner: Zitat von Florian Klaempfl : NFS over gigabit is not that bad. For example compiling 94k…
Show quoted text 10 lines
Zitat von Florian Klaempfl : > Mattias Gärtner schrieb: >> Zitat von Florian Klaempfl : >> >>>> [...] > A network file system is too slow for developing. Compiling anything > via nfs or smb is a nightmare speedwise. NFS over gigabit is not that bad.

For how much people working simultanously? And don't forget, it's about windows so probably smb is used.

For example compiling 94k lines of codetools on a network share and on local disc makes no difference.

Compiling itself is not a big problem but e.g. for fpc the file handling stuff in the makefiles causes a lot of delay.

My conclusion: I agree with Jonas, you can use network shares for development machines.

Consider 10-50 people working and accessing a server this way :) Using roaming profiles and local source checkouts, this can be handled easily by a 1k Eur server which even doesn't requires high availability/reliability because with a roaming profile you can continue to work even if the server crashes/must rebooted whatever.

Roaming profiles using auto copy/delete are not the best choice for that.

For me it works fine for years ;)

Micha Nelissen
to Florian Klaempfl
Florian Klaempfl wrote
> Roaming profiles using auto copy/delete are not the best choice for that. For me it works fine for years ;)

Then you must be the only one since everybody I know despises it. We use multiple times login sometimes and then the settings are always messed up. If the profile locally exists already it sometimes isn't updated but afterwards it does overwrite the server's! The only "solution" is not logging off, wow great engineering indeed!

Micha

Florian Klaempfl
to Micha Nelissen
Show quoted text 9 lines
Florian Klaempfl wrote: >> Roaming profiles using auto copy/delete are not the best choice for >> that. > > For me it works fine for years ;) Then you must be the only one since everybody I know despises it. We use multiple times login sometimes and then the settings are always messed up.

Well, this causes a headache with fully networked home drives as well ;)

If the profile locally exists already it sometimes isn't updated but afterwards it does overwrite the server's!

Hmm, I know only of this if the a machine starts up with a messed up clock because e.g. of an empty mainboard battery.

Jürgen Hestermann
to Vinzent Hoefler: Then don't. ;) Usually I just locked the machine overnight. Vinzent.
> I wouldn't lose my settings on logoff. ;-) Then don't. ;) Usually I just locked the machine overnight.

But as soon as I reboot my machine (for whatever reason and at whatever day) I lose all my settings. I am not able to configurate anything different from default because each reboot would make me lose it. I don't think you can find any arguments to make that a desired situation.

Micha Nelissen
to Florian Klaempfl: Well, this causes a headache with fully networked home drives as well ;) Hmm, I know only…
Florian Klaempfl wrote 5 lines
> Then you must be the only one since everybody I know despises it. We use > multiple times login sometimes and then the settings are always messed > up. Well, this causes a headache with fully networked home drives as well ;)

If configuration files are per application it's much less of a problem. And applications can implement a configuration file lock much easier if they want to detect multiple activity. It reduces the per-login problem to a per-application-start problem; which is much better already.

Show quoted text 5 lines
> If the profile locally exists already it sometimes isn't updated but > afterwards it does overwrite the server's! Hmm, I know only of this if the a machine starts up with a messed up clock because e.g. of an empty mainboard battery.

Or a server that is not responding quickly enough or so ... Perhaps a 1k euro server isn't sufficient after all ;-P

Micha

Micha Nelissen
to Florian Klaempfl: For how much people working simultanously? And don't forget, it's about windows so…
Florian Klaempfl wrote 6 lines
> My conclusion: > I agree with Jonas, you can use network shares for development machines.. Consider 10-50 people working and accessing a server this way :) Using roaming profiles and local source checkouts, this can be handled easily by a 1k Eur server which even doesn't requires high

We have like 150+ people accessing all project documents, designs, code on a single file server. Server runs Linux with Samba AFAIK. Some of Linux targeted development checkouts are on another Linux development server accessed by a small group of people though, but it still proves the occasional "home drive" configuration file on a networked drive could be handled easily.

Micha

Jürgen Hestermann
to Micha Nelissen: Then you must be the only one since everybody I know despises it. We use multiple times…
>> Roaming profiles using auto copy/delete are not the best choice for that. > For me it works fine for years ;) Then you must be the only one since everybody I know despises it.

As I wrote, the company I work for uses this setup for *all* (30,000+) machines all over the world. And I doubt that it's the only company doing it this way.

We use multiple times login sometimes and then the settings are always messed up.

I agree that you can have problems with roaming profiles too. But what is the alternative? If you use a special directory on your home drive for (Lazarus) settings and then logon to 2 different machines simulatiously you will get problems too.

Florian Klaempfl
to Micha Nelissen: If configuration files are per application it's much less of a problem. And applications…
Show quoted text 10 lines
Florian Klaempfl wrote: >> Then you must be the only one since everybody I know despises it. We use >> multiple times login sometimes and then the settings are always messed >> up. > > Well, this causes a headache with fully networked home drives as well ;) If configuration files are per application it's much less of a problem. And applications can implement a configuration file lock much easier if they want to detect multiple activity.

Do they :)? Does lazarus?

Show quoted text 11 lines
It reduces the per-login problem to a per-application-start problem; which is much better already. >> If the profile locally exists already it sometimes isn't updated but >> afterwards it does overwrite the server's! > > Hmm, I know only of this if the a machine starts up with a messed up > clock because e.g. of an empty mainboard battery. Or a server that is not responding quickly enough or so ... Perhaps a 1k euro server isn't sufficient after all ;-P

Well, then you need two 1k Euro servers. Anyways, a server not responding quickly enough to serve a profile will be a real pain serving a fully networked home/profile dir :)

Micha Nelissen
to Florian Klaempfl: Do they :)? Does lazarus? Well, then you need two 1k Euro servers. Anyways, a server not…
Florian Klaempfl wrote 6 lines
Micha Nelissen schrieb: > Florian Klaempfl wrote: > And applications can implement a configuration file lock much easier if > they want to detect multiple activity. Do they :)? Does lazarus?

IIRC OpenOffice (3.0) does detect it already and warn me.

Well, then you need two 1k Euro servers. Anyways, a server not responding quickly enough to serve a profile will be a real pain serving a fully networked home/profile dir :)

That's the difference between a Windows server and one with a proper OS :-P. Or it's the administration of it. Or ... don't know. I know there are little problems with the file server I described in another post but many problems with corrupted profiles.

Micha

Mattias Gaertner
to Florian Klaempfl: Do they :)? Does lazarus? Well, then you need two 1k Euro servers. Anyways, a server not…
Show quoted text 14 lines
Micha Nelissen schrieb: > Florian Klaempfl wrote: >>> Then you must be the only one since everybody I know despises it. >>> We use multiple times login sometimes and then the settings are >>> always messed up. >> >> Well, this causes a headache with fully networked home drives as >> well ;) > > If configuration files are per application it's much less of a > problem. And applications can implement a configuration file lock > much easier if they want to detect multiple activity. Do they :)? Does lazarus?

At least lazarus does not.
It is pretty common to start several lazarus with the same configs. It only reads its configs on start and reads/writes files as whole. Lazarus users are programmers, so they understand this concept. Open Office users are - well - users.

Mattias

Andreas Berger
to Marco van de Voort
Show quoted text 10 lines
On Thu, Jul 16, 2009 at 01:36:15PM +0200, Andreas Berger wrote: >> Out of curiosity (because I never used this feature in any editor), >> what would you use it for? >> > Persistent blocks and the full Wordstar keyboard shortcuts is why I use > the Delphi IDE until today. > If you miss wordstar stuff, please list it.

Well, maybe I should use the Lazarus IDE again for a bit a jot down what I would like. I may even soon have time to help add some options.

Martin Friebe
to Andreas Berger

We are still on the wrong mailing list. Should be

Anyway, if it's about SynEdit, feel free to ask where to start looking, I am glad to give some pointers. (But please make sure you are on SVN 0.9.27, since it is completely different)

From What I understand, there are 2 issues:
- the missing persistent block
I don't even know how many persistent-block related commands there are. IIRC from never mind hom many years ago, you have to Key-Shortcuts, to set it's end and begin? (Instead of using shift-cursor?) What other commands are there?
It may be possible to break it down into the most needed (set-begin, set-end, copy, move) commands, and otheres that can be added over time?

- The Keyboard layout/scheme for "wordstar" ?
How different is that from current default, or classic-scheme default?

Martin

Andreas Berger wrote 18 lines
> On Thu, Jul 16, 2009 at 01:36:15PM +0200, Andreas Berger wrote: > >>> Out of curiosity (because I never used this feature in any editor), >>> what would you use it for? >>> >> Persistent blocks and the full Wordstar keyboard shortcuts is why I >> use the Delphi IDE until today. >> > > If you miss wordstar stuff, please list it. Well, maybe I should use the Lazarus IDE again for a bit a jot down what I would like. I may even soon have time to help add some options. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Andreas Berger
to Martin Friebe
- The Keyboard layout/scheme for "wordstar" ? How different is that from current default, or classic-scheme default?

I modified the classic-schema a few years ago to be mostly wordstar correct. What I didn't do at the time was add persistent blocks.

Martin Friebe
to Andreas Berger: Well, maybe I should use the Lazarus IDE again for a bit a jot down what I would like. I…

[cross-posted to lazarus list => please join there to continue the topic]

I am trying to figure out how they work....

- Block is kept, if cursor moves away. (obvious)
- Shift Cursur keys:
- Block is extended if cursor was next to block
- New block is started , if cursor was away from block. (could also be used to extend the block, like shift-left-mouse)
- Block is kept, position/size adjusted if text is typed before, or into the block (exception, column mode block is not adapted)
- ctrl-c copies the block, at any time

annoyances I found in turbo explorer (the free delphi), not sure if they are supposed to be.
- Move the caret via mouse (left click) => block is undone
- paste/ctrl-v : the newly inserted text is selected as new block? (this means the current block is lost)

That's all the knowledge I have about them sofar.

Anyone wants to update me?

Martin

Andreas Berger wrote 18 lines
> On Thu, Jul 16, 2009 at 01:36:15PM +0200, Andreas Berger wrote: > >>> Out of curiosity (because I never used this feature in any editor), >>> what would you use it for? >>> >> Persistent blocks and the full Wordstar keyboard shortcuts is why I >> use the Delphi IDE until today. >> > > If you miss wordstar stuff, please list it. Well, maybe I should use the Lazarus IDE again for a bit a jot down what I would like. I may even soon have time to help add some options. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal