Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-28 Thread Sven Barth

Am 28.02.2012 08:38, schrieb Noah Silva:


Windows supports multiple locales and has 95% of the
computer market -


Not really: http://en.wikipedia.org/wiki/Usage_share_of_operating_systems

Anyway, if we did everything the way Microsoft suggested, we would give
up real sym links and litter the filesystem with .lnk files, too.


Modern versions of NTFS support symlinks, too. Also there were reasons 
why Microsoft decided to use .lnk files: 
http://technet.microsoft.com/de-de/magazine/2006.09.windowsconfidential%28en-us%29.aspx


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-28 Thread Noah Silva
Hi Sven,

From what I've read, the NT kernel (and filesystem) support a lot of things
that Windows in general doesn't.  Presumably this is because it is
(unofficially, of course) loosely based on VMS, but Win32 was originally
designed to work with DOS, etc.

Thank you,
 Noah Silva

2012/2/28 Sven Barth pascaldra...@googlemail.com

 Am 28.02.2012 08:38, schrieb Noah Silva:


Windows supports multiple locales and has 95% of the
computer market -


 Not really: http://en.wikipedia.org/wiki/**Usage_share_of_operating_**
 systems http://en.wikipedia.org/wiki/Usage_share_of_operating_systems

 Anyway, if we did everything the way Microsoft suggested, we would give
 up real sym links and litter the filesystem with .lnk files, too.


 Modern versions of NTFS support symlinks, too. Also there were reasons why
 Microsoft decided to use .lnk files: http://technet.microsoft.com/**
 de-de/magazine/2006.09.**windowsconfidential%28en-us%**29.aspxhttp://technet.microsoft.com/de-de/magazine/2006.09.windowsconfidential%28en-us%29.aspx

 Regards,
 Sven

 __**_
 fpc-pascal maillist  -  
 fpc-pascal@lists.freepascal.**orgfpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/**mailman/listinfo/fpc-pascalhttp://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-28 Thread Sven Barth

Am 28.02.2012 09:47, schrieb Noah Silva:

Hi Sven,

 From what I've read, the NT kernel (and filesystem) support a lot of
things that Windows in general doesn't.  Presumably this is because it
is (unofficially, of course) loosely based on VMS, but Win32 was
originally designed to work with DOS, etc.


Yes, the NT kernel is definitely much more powerful than the Win32 
subsystem. For example it has a single rooted object based file system 
where other file systems are automatically mounted and you can access 
them through e.g. \Devices\Harddisk0\HarddiskVolume1. Also it supports 
symbolic links in there (the Win32 subsystem uses them internally very 
much). One can explore all those things for example with my Native NT 
port of Free Pascal ;)


The symlink feature I talked about can be used in Vista and newer from 
within the Win32 subsystem as well though.


Regards,
Sven

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-28 Thread Noah Silva
Hi Sven,

It seems that since NT is the only remaining Windows kernel now that it
might make sense to use NT functions in (for example) the normal SysUtils
library for more efficient implementations - do you think there is any
strong reason not to?

You have to figure there are two layers of thunking going on now:
1. System/SysUtils - Win32
2. Win32 - NT.

Does .NET, etc. Actually use the Win32 APIs or NT APIs?
(The runtime, obviously the programs use the .NET API...)

Thank you,
 Noah Silva

2012/2/28 Sven Barth pascaldra...@googlemail.com

 Am 28.02.2012 09:47, schrieb Noah Silva:

  Hi Sven,

  From what I've read, the NT kernel (and filesystem) support a lot of
 things that Windows in general doesn't.  Presumably this is because it
 is (unofficially, of course) loosely based on VMS, but Win32 was
 originally designed to work with DOS, etc.


 Yes, the NT kernel is definitely much more powerful than the Win32
 subsystem. For example it has a single rooted object based file system
 where other file systems are automatically mounted and you can access them
 through e.g. \Devices\Harddisk0\**HarddiskVolume1. Also it supports
 symbolic links in there (the Win32 subsystem uses them internally very
 much). One can explore all those things for example with my Native NT port
 of Free Pascal ;)

 The symlink feature I talked about can be used in Vista and newer from
 within the Win32 subsystem as well though.


 Regards,
 Sven

 __**_
 fpc-pascal maillist  -  
 fpc-pascal@lists.freepascal.**orgfpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/**mailman/listinfo/fpc-pascalhttp://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-28 Thread Sven Barth

Am 28.02.2012 10:03, schrieb Noah Silva:

Hi Sven,

It seems that since NT is the only remaining Windows kernel now that it
might make sense to use NT functions in (for example) the normal
SysUtils library for more efficient implementations - do you think there
is any strong reason not to?

You have to figure there are two layers of thunking going on now:
1. System/SysUtils - Win32
2. Win32 - NT.


The NT API is not documented and I don't think it's worth the hazzle 
(working with an undocumented API) to improve performance a little bit. 
The Win32 API is THE API if you target Windows, so we shouldn't play 
with that. Also it might be that programs that check whether 
applications can be Windows certified will check whether the 
application accesses the native API and I don't want to tell a company 
that wants to certificate an application written in FPC that they can't 
do it...



Does .NET, etc. Actually use the Win32 APIs or NT APIs?
(The runtime, obviously the programs use the .NET API...)


.NET is based on top of Win32 so it uses only the Win32 API. The only 
people that officially use the Native API are driver, kernel and 
subsystem developers at Microsoft (and ReactOS).


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-27 Thread Noah Silva
Hi,

2012/2/25 Graeme Geldenhuys graemeg.li...@gmail.com

 On 24 February 2012 16:13, Henry Vermaak wrote:
 
  Because case sensitive systems don't create as much confusion
 Then lets look at it from an average user's point of view. Must they
 really be confronted with multiple files in a single folder named:

   test.txt
   Test.txt
   Test.Txt
   TEST.TXT
   test.TXT
   

 All the user wants to do, is open a test dot t x t file. Under Linux
 they could be confronted with multiple versions? Very confusing.

 I like to CamelCase my file names - it makes them easier to read in a
 file listing. But when I reference them in say a search dialog, I'll
 probably type them in all lowercase for speed reason. I would still
 like Linux to find that file though - but it wouldn't.


However, most users just click on the file.  And most users who would type
the filename know enough to type the proper case.  (And the GUI file
selector could search-as-you-type, in a case sensitive or insensitive way).


 As I, and it seems many others on the Internet, have found - there
 really isn't a good reason why Linux must still use case sensitive
 file systems.


Probably the main reason is because C does.  Also, while users don't care,
tech people tend to prefer definite accuracy over possible ease.  However,
while I am strongly for case insensitivity in programming languages (It's
too easy to have different cases in different parts of the code), I don't
think many people would have a huge preference in file systems.  Unlike C,
where many programmers make use of the case sensitivity, I don't see
otherwise duplicate files often in Linux (someone correct me if you have a
good example).  Yet very few have complained (in a valid way) about the way
Linux does it, so it's unlikely to change any time soon.  Also, as
mentioned before, to do things *properly* for case insensitivity with
non-ASCII would require a very large amounts of code.  This is the same
reason why SQLite doesn't even try.


 Windows supports multiple locales and has 95% of the
 computer market -


Not really: http://en.wikipedia.org/wiki/Usage_share_of_operating_systems

Anyway, if we did everything the way Microsoft suggested, we would give up
real sym links and litter the filesystem with .lnk files, too.

it doesn't have case sensitive file systems. Mac OS
 X by default doesn't either (though they are nice enough to give you
 the choice). I think Linux should give you the choice too.

 Linux does give you the choice, in a sense.  You can format many of the
filesystems as case insensitive, and I am fairly sure Linux will still boot
fine.  I use the case sensitive option on Mac OS X, btw.


 Anyway, hopefully my newly formatted JFS partitions will sort this out.

   At the end of the day, a computer thinks that a is 97 and A is 65,
 but
  what humans perceive is more complicated.

 And a computer should serve a human, not the other way round.  Read
 the excellent book About Face 3.

 Perhaps, but that that means is up to interpretation.  I interpret is as
do what I say and don't second-guess me.  If you really want to give the
user what they want, then you have to let them use any file names and
identifier names they want, with any characters, and do full Unicode case
collapsing and normalization.

At any rate, this is probably not the domain to deal with in FPC, all we
can do is support the OS policy.

more info:
http://en.wikipedia.org/wiki/Filename#Case:_upper.2C_lower.2C_preservation

As any rate, to bring this back to a Pascal related discussion:
1. FPC works with case sensitive and case insensitive filesystems quite
well.
2. FPC tries to mangle the case to come common cases in order to handle
legacy code on
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-25 Thread Graeme Geldenhuys
On 24 February 2012 16:13, Henry Vermaak wrote:

 Because case sensitive systems don't create as much confusion.


Here my thoughts are the opposite. While backing up my data no an
external drive with is case insensitive I came across a lot of
possible issues I never realised I had on my case sensitive Linux file
system.

eg:
  In one source code directory I had files as follows:
   tiDefines.inc
   tidefines.inc

Backing this up to a case insensitive file system, I program prompted
me that the origin file was going to be replaced? So, looking at those
files on my Linux (case sensitive) file system, which one is actually
the latest version? To find out, I had to fire up Beyond Compare and
to a content comparison.

This actually happened quite a few times with many of my source code.
This all probably got introduced when I moved source code over from
Windows to Linux some 6 years ago.

Confusing now? Definitely! Did Linux warn me, nope. Does the compiler
know which one to actually use - no idea. How does Lazarus know which
one to open (because Lazarus searches for multiple case files) - no
idea?


Then lets look at it from an average user's point of view. Must they
really be confronted with multiple files in a single folder named:

   test.txt
   Test.txt
   Test.Txt
   TEST.TXT
   test.TXT
   

All the user wants to do, is open a test dot t x t file. Under Linux
they could be confronted with multiple versions? Very confusing.

I like to CamelCase my file names - it makes them easier to read in a
file listing. But when I reference them in say a search dialog, I'll
probably type them in all lowercase for speed reason. I would still
like Linux to find that file though - but it wouldn't.

As I, and it seems many others on the Internet, have found - there
really isn't a good reason why Linux must still use case sensitive
file systems. Windows supports multiple locales and has 95% of the
computer market - it doesn't have case sensitive file systems. Mac OS
X by default doesn't either (though they are nice enough to give you
the choice). I think Linux should give you the choice too.

Anyway, hopefully my newly formatted JFS partitions will sort this out.


  At the end of the day, a computer thinks that a is 97 and A is 65, but
 what humans perceive is more complicated.

And a computer should serve a human, not the other way round.  Read
the excellent book About Face 3.


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-25 Thread Graeme Geldenhuys
On 24 February 2012 15:57, Mattias Gaertner wrote:

 The whole last week I cursed the opposite direction (first windows, then OS 
 X).
 It seems it depends on the current task.

:-)


 Linux can handle both. But many Linux tools only support case sensitive
 files.

Well, in a case insensitive file system, there will only be one copy
of a specific file name in a directory. So the Linux tools should get
confused with which one to open or use. So I don't really think it is
going to be a problem.  I guess I'll find out in the coming week.  :-)


 My recommendation: If you have the choice, use the OS defaults.
 Many programs will fail otherwise.

In the case of Linux, there is no default. Linux is just the kernel.
The Linux distro's on the other hand all make different choices. Some
distros choose ReiserFS, others Ext3, others Ext4, others JFS, some
are now experimenting with Btrfs etc.

Anyway, our company has done extensive testing (a couple years ago)
with performance and failure recovery of various file systems for
Linux, and JFS has come up tops. I personally have standardised on JFS
for many years. Only now am I deciding to switch to the case
insensitive option though. Luckily I have a choice under Linux.

Anyway, I just wanted to know if anybody knew of any blatant issues
with FPC or Lazarus on a case insensitive file system, but I guess
with Windows and Mac OS X being around, it is safe to assume
everything will continue to work as normal.

-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-25 Thread Jürgen Hestermann

Graeme Geldenhuys schrieb:
 On 24 February 2012 16:13, Henry Vermaak wrote:
 Because case sensitive systems don't create as much confusion.
 Here my thoughts are the opposite. While backing up my data no an
 external drive with is case insensitive I came across a lot of
 possible issues I never realised I had on my case sensitive Linux file
 system.
 eg:
   In one source code directory I had files as follows:
tiDefines.inc
tidefines.inc
 Backing this up to a case insensitive file system, I program prompted
 me that the origin file was going to be replaced? So, looking at those
 files on my Linux (case sensitive) file system, which one is actually
 the latest version? To find out, I had to fire up Beyond Compare and
 to a content comparison.
 This actually happened quite a few times with many of my source code.
 This all probably got introduced when I moved source code over from
 Windows to Linux some 6 years ago.
 Confusing now? Definitely! Did Linux warn me, nope. Does the compiler
 know which one to actually use - no idea. How does Lazarus know which
 one to open (because Lazarus searches for multiple case files) - no
 idea?
 Then lets look at it from an average user's point of view. Must they
 really be confronted with multiple files in a single folder named:
test.txt
Test.txt
Test.Txt
TEST.TXT
test.TXT

 All the user wants to do, is open a test dot t x t file. Under Linux
 they could be confronted with multiple versions? Very confusing.
 I like to CamelCase my file names - it makes them easier to read in a
 file listing. But when I reference them in say a search dialog, I'll
 probably type them in all lowercase for speed reason. I would still
 like Linux to find that file though - but it wouldn't.
 As I, and it seems many others on the Internet, have found - there
 really isn't a good reason why Linux must still use case sensitive
 file systems. Windows supports multiple locales and has 95% of the
 computer market - it doesn't have case sensitive file systems. Mac OS
 X by default doesn't either (though they are nice enough to give you
 the choice). I think Linux should give you the choice too.


 Anyway, hopefully my newly formatted JFS partitions will sort this out.
  At the end of the day, a computer thinks that a is 97 and A is 
65, but

 what humans perceive is more complicated.
 And a computer should serve a human, not the other way round.  Read
 the excellent book About Face 3.


I wholeheartly agree with you on case sensitive file names. It's a crap.
I never understood why they created such a nonsense.
And now generations of Linux users have to suffer from it.
For me it's one of the last obstacles on the way to Linux.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Graeme Geldenhuys
Hi,

[rant]
I'm just sick of the idiocy of Linux/Unix with there case sensitive
file systems! Google'ing a round for the reason for this, it seems
that in the 60's, it was C programmers that decided that searching for
case sensitive files was easier to implement (and marginally faster).
Well, 40+ years later, that is totally irrelevant - yet we are still
suck (by default) with case sensitive file systems. Mac OS X, Windows
and OS/2 proves that there is no problems with case insensitive file
systems, even for various locales. It also makes it MUCH easier for
the end-user. I see no reason why Linux must still be stuck with this.
Anyway, that is why I am busy reformatting all my JFS file systems (I
have long ago standardised on JFS) with the -O option to make them
case insensitive.
[/rant]


Anyway, back to the point I seriously doubt there would be any
problems, but I'll ask anyway. Has anybody here used JFS (case
insensitive option enabled) with FPC and experienced any problems? I
doubt there would be, because Mac OS X by default is case insensitive
too - and it is also a *nix system.

In the same breath, any possible Lazarus issues?


PS:
Anybody know of other Linux file systems that have a case insensitive
option? I really thought ext2 had this, but searching now through the
man pages, it seems I was mistaken. Anybody know if Btrfs would have
such an option?

-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread michael . vancanneyt



On Fri, 24 Feb 2012, Graeme Geldenhuys wrote:


Hi,

[rant]
I'm just sick of the idiocy of Linux/Unix with there case sensitive
file systems!


Well, some men prefer blondes, others prefer brunettes.


[/rant]


Anyway, back to the point I seriously doubt there would be any
problems, but I'll ask anyway. Has anybody here used JFS (case
insensitive option enabled) with FPC and experienced any problems? I
doubt there would be, because Mac OS X by default is case insensitive
too - and it is also a *nix system.


There is a constant in the system unit which controls the 'case sensitive' 
option for filename comparisions. You may have problems, because it is set

to True by default on Linux/Unix

See:

http://www.freepascal.org/docs-html/rtl/system/filenamecasesensitive.html

You can set its value, though, it is a typed constant.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Tomas Hajny
On Fri, February 24, 2012 12:21, michael.vancann...@wisa.be wrote:
 On Fri, 24 Feb 2012, Graeme Geldenhuys wrote:
 .
 .
 Anyway, back to the point I seriously doubt there would be any
 problems, but I'll ask anyway. Has anybody here used JFS (case
 insensitive option enabled) with FPC and experienced any problems? I
 doubt there would be, because Mac OS X by default is case insensitive
 too - and it is also a *nix system.

 There is a constant in the system unit which controls the 'case sensitive'
 option for filename comparisions. You may have problems, because it is set
 to True by default on Linux/Unix

 See:

 http://www.freepascal.org/docs-html/rtl/system/filenamecasesensitive.html

 You can set its value, though, it is a typed constant.

One concrete example - if you create a unit and store it in a file with a
mixed case name, it will be found by the compiler in your case. If you
share this source with someone else (also using Linux like you), it may
not be found. This would be an equal problem if done by someone on
Windows, but

BTW, I've heard some time ago that Linux kernel contains some files
differing only in letter case. If this is the case, you may not be able to
upgrade to a newer kernel if your filesystem is case insensitive.
Obviously, this is not related to FPC so I suggest directing potential
responses to this part to fpc-other.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Graeme Geldenhuys
2012/2/24 Tomas Hajny :
 One concrete example - if you create a unit and store it in a file with a
 mixed case name, it will be found by the compiler in your case. If you
 share this source with someone else (also using Linux like you), it may
 not be found. This would be an equal problem if done by someone on
 Windows, but

As you mentioned, this is a problem with somebody using Windows 
Linux too. Luckily I'm quite accustomed to using lowercase unit names,
but mixed case names inside the 'unit xxx' line and uses clauses. So
this should pose a problem to me, thanks for mentioning it though.


 BTW, I've heard some time ago that Linux kernel contains some files
 differing only in letter case. If this is the case, you may not be able to

I have no idea if this is true or not. At the moment I am only
converting my /opt and /home partitions. These are the ones I modify
or create files in. The / partition is still case sensitive - so again
this shouldn't cause me troubles.


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Mattias Gaertner
On Fri, 24 Feb 2012 13:09:09 +0200
Graeme Geldenhuys graemeg.li...@gmail.com wrote:

 Hi,
 
 [rant]
 I'm just sick of the idiocy of Linux/Unix with there case sensitive
 file systems! Google'ing a round for the reason for this, it seems
 that in the 60's, it was C programmers that decided that searching for
 case sensitive files was easier to implement (and marginally faster).
 Well, 40+ years later, that is totally irrelevant - yet we are still
 suck (by default) with case sensitive file systems. Mac OS X, Windows
 and OS/2 proves that there is no problems with case insensitive file
 systems, even for various locales. It also makes it MUCH easier for
 the end-user. I see no reason why Linux must still be stuck with this.
 Anyway, that is why I am busy reformatting all my JFS file systems (I
 have long ago standardised on JFS) with the -O option to make them
 case insensitive.
 [/rant]

The whole last week I cursed the opposite direction (first windows, then OS X).
It seems it depends on the current task.

 
 Anyway, back to the point I seriously doubt there would be any
 problems, but I'll ask anyway. Has anybody here used JFS (case
 insensitive option enabled) with FPC and experienced any problems? I
 doubt there would be, because Mac OS X by default is case insensitive
 too - and it is also a *nix system.

Linux can handle both. But many Linux tools only support case sensitive
files.

 
 In the same breath, any possible Lazarus issues?

Lazarus expects by default case sensitive file names under Linux.
OTOH it tries to find the real file name at various places so it can
find more units than the compiler. For example sources copied from
Windows. 
The Delphi converter fixes uses and includes.
Some users are using Lazarus with samba shares and ntfs mounts.

You can get similar problems when copying code from Windows to OS X,
because OS X is not only case insensitive, it normalizes UTF
characters.

 
 PS:
 Anybody know of other Linux file systems that have a case insensitive
 option? I really thought ext2 had this, but searching now through the
 man pages, it seems I was mistaken. Anybody know if Btrfs would have
 such an option?

Wikipedia has various tables comparing file systems.

My recommendation: If you have the choice, use the OS defaults.
Many programs will fail otherwise.

Mattias
 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Henry Vermaak

On 24/02/12 11:09, Graeme Geldenhuys wrote:

Hi,

[rant]
I'm just sick of the idiocy of Linux/Unix with there case sensitive
file systems! Google'ing a round for the reason for this, it seems
that in the 60's, it was C programmers that decided that searching for
case sensitive files was easier to implement (and marginally faster).
Well, 40+ years later, that is totally irrelevant - yet we are still
suck (by default) with case sensitive file systems. Mac OS X, Windows
and OS/2 proves that there is no problems with case insensitive file
systems, even for various locales. It also makes it MUCH easier for
the end-user. I see no reason why Linux must still be stuck with this.
Anyway, that is why I am busy reformatting all my JFS file systems (I
have long ago standardised on JFS) with the -O option to make them
case insensitive.
[/rant]


Because case sensitive systems don't create as much confusion. 
Converting something to upper case is a bit more tricky in some 
languages.  Look at the git macosx (hfs+) screwup a couple of years ago, 
because of how hfs+ normalizes unicode.  Also the Turkish I is a classic 
stumbling block:


http://www.i18nguy.com/unicode/turkish-i18n.html

You also seem to assume that file names will always be words.  Can they 
not be codes or hashes?  Why will you then want to throw away 26 
perfectly good characters?


Basically, it all depends what you are doing and what your experiences 
are.  At the end of the day, a computer thinks that a is 97 and A is 
65, but what humans perceive is more complicated.


Henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Mark Morgan Lloyd

Graeme Geldenhuys wrote:

Hi,

[rant]
I'm just sick of the idiocy of Linux/Unix with there case sensitive
file systems! Google'ing a round for the reason for this, it seems
that in the 60's, it was C programmers that decided that searching for
case sensitive files was easier to implement (and marginally faster).


I find that rather difficult to believe, since C was barely conceived in 
the '60s, and back in those days the dominant character I/O devices were 
(EBCDIC) punched cards and the (ASCII) ASR-33- both of which IIRC were 
de-facto uppercase-only.


Now it might be that by the time the Bell workers were hacking UNIX and 
C that they'd got video terminals with full character sets, and it might 
be that they gravitated towards lower-case because of received wisdom 
that the increased variation between letters makes them easier to read. 
But in any event their reluctance to assume any particular mapping 
between upper- and lower-case was probably influenced by the fact that 
there were still two major character sets (EBCDIC and ASCII) as well as 
several minor ones some of which were being used by the US government 
(e.g. Fieldata). As discussed in the context of an IBM mainframe port of 
FPC, it's bad enough having to deal with multiple mappings in the system 
library without having to define them as part of the language.


In any event, history has shown that they probably made the right 
decision, and similarly made the right decision when they pegged UNIX 
timestamps to GMT/UTC. The fact that Microsoft made different choices 
has caused nothing but grief.


All of which suggests that at the current time, when increasing numbers 
of people are wrestling with Unicode, we should all be very much aware 
of the possible problems that converting (or not) between similar 
characters can cause. For example, I found myself writing this yesterday:


  $50: { p P } inject:= #$002A; { * }
  $DB: { [  } inject:= #$2190; { ← }
  $DD: { ]  } inject:= #$2192; { → }

Some founts (e.g. the one used by default by GTK2 Lazarus) use almost 
identical glyphs for the braces in those comments, and it's only a 
matter of time before somebody with more ingenuity than common sense 
tries to use these to slip backdoor code past the casual reviewer.


So in summary, (not) translating characters is something that shouldn't 
be approached without deep understanding of the issues.



Anybody know of other Linux file systems that have a case insensitive
option? I really thought ext2 had this, but searching now through the
man pages, it seems I was mistaken. Anybody know if Btrfs would have
such an option?


The obvious ones are Windows and possibly CD filesystems mounted with 
appropriate options:


# Additional devices.

/dev/fd0   /mnt/floppy vfatnoauto,user,shortname=winnt 0   0
/dev/hda4  /mnt/zipvfatnoauto,user,shortname=winnt 0   0
/dev/cdrom /mnt/cdrom  iso9660 noauto,user,ro  0   0

This obviously includes USB mass storage devices such as cameras.

Not sure about btrfs. I tried using it a few months ago but it was very 
unclear whether I was getting any useful compression when it was 
enabled, I subsequently discovered that that depends on kernel version- 
frankly, it's too near the bleeding edge to be used in anger.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Marco van de Voort
In our previous episode, Sven Barth said:
  Anybody know of other Linux file systems that have a case insensitive
  option? I really thought ext2 had this, but searching now through the
  man pages, it seems I was mistaken. Anybody know if Btrfs would have
  such an option?
 
 Did you know that NTFS itself is also a case sensitive filesystem?

NTFS is a scary superset of all filesystems that NT had to support as a
server, which is why it also supports sparse and multi-forked files.

A small correction though, that the common implementation of NTFS  (read: NT
and derivatives) don't allow to change most of those properties anymore,
since there are only global settings for it, and changing them will
invalidate your bootdrive.

I found that out the hard way when I changed the setting equivalent to
noatime

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-24 Thread Noa Shiruba
Hi,
 You can get similar problems when copying code from Windows to OS X,
 because OS X is not only case insensitive, it normalizes UTF
 characters.

Well that's a good thing in the long run, because you can guarantee more 
matches if you always normalize.
 
 
 My recommendation: If you have the choice, use the OS defaults.
 Many programs will fail otherwise.
 

Heh, I use the case sensitive option on os x, and it hasn't caused me any 
issues yet - but then that's a bit of a different situation.

 Mattias
 

-- Noah
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal