FPC with case insensitive file system under Linux

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: FPC with case insensitive file system under Linux

shiruba2012
Hi,

2012/2/25 Graeme Geldenhuys <[hidden email]>
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 -


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:
  
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC with case insensitive file system under Linux

Sven Barth-2
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC with case insensitive file system under Linux

shiruba2012
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 <[hidden email]>
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC with case insensitive file system under Linux

Sven Barth-2
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC with case insensitive file system under Linux

shiruba2012
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 <[hidden email]>
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC with case insensitive file system under Linux

Sven Barth-2
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

[admin] FPC with case insensitive file system under Linux

Jonas Maebe-2
Hi,

Can everyone please take this topic to the fpc-other list? It has no  
longer anything to do with FPC.

Thanks,


Jonas
FPC mailing lists admin
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC with case insensitive file system under Linux

Jorge Aldo G. de F. Junior
In reply to this post by Jürgen Hestermann
2012/2/27 Jürgen Hestermann <[hidden email]>:

> Virgo Pärna schrieb:
>
>>    Essentialy, case insensitive filesystems are less problematic.
>>
>
> No, just the opposite. The  problems are only moved (and increased) from the
> techie level (where it should belong to) to the user.
> This is not a good idea IMO.
> If there problems with capitalization of certain characters exist then these
> problems should be solved or
> if that's not possible for some reason such characters should not be allowed
> in file systems.
>
> But giving it all over to the user and tell him  "We did not know how to
> handle this mess, just try yourself" is not a solution.
>

Isnt that the unix/c philosophy ? "If you dont know how to handle the
problem, pretend the problem doesnt exists..."


>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
12