[fpc-pascal] wiki down again?

2012-08-21 Thread Chadisko
is the freepascal wiki down again? greetings -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/wiki-down-again-tp5710880.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maill

[fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
Hello As the language is currently specified, an identifier is searched in, and used from, the last unit in the USES clause that exposes that identifier. As some might know already, this exposes the user to future compatibility problems, stemming from the fact that the USES clause imports and "op

Re: [fpc-pascal] wiki down again?

2012-08-21 Thread Vincent Snijders
2012/8/20 Chadisko : > is the freepascal wiki down again? > It is working OK now. Vincent ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jonas Maebe
On 20 Aug 2012, at 18:15, Timothy Madden wrote: > This story is inspired from a real case when *lots* of user code > suddenly stopped compiling after JDK 1.2 was released, with a new List > class, which users had to import from a different package until JDK 1.1. > In this case is wasn't even a th

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jürgen Hestermann
Am 2012-08-21 00:00, schrieb Bart: > My Delphi projects are located like this: > ... > As Juha has pointed out, this is a general way projects are organized. Realy? How do you know? That's just an assumption. But my complain was more general about an increasing use of branch scanning (not only

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 10:59:41 +0200 Jürgen Hestermann wrote: > Am 2012-08-21 00:00, schrieb Bart: > > My Delphi projects are located like this: > > ... > > As Juha has pointed out, this is a general way projects are organized. > > Realy? How do you know? That's just an assumption. He meant "c

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jürgen Hestermann
Am 2012-08-21 00:55, schrieb Juha Manninen: > About scanning "only paths specified by the user", do you really mean > the user should search for pascal sources in a to-be-converted > Delphi project directories, then type the directory names into > a config file and then feed that file to the conve

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jonas Maebe
Hi, Please move this discussion to the fpc-other or Lazarus list, thanks. Jonas FPC mailing lists admin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread DaWorm
Very tedious, but you could create a wrapper unit and/or class for each library, and expose a prefixed name instead of the original. Jeff, On Aug 21, 2012 3:31 AM, "Jonas Maebe" wrote: > > On 20 Aug 2012, at 18:15, Timothy Madden wrote: > > > This story is inspired from a real case when *lots* o

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 10:30 AM, Jonas Maebe wrote: > > On 20 Aug 2012, at 18:15, Timothy Madden wrote: > >> This story is inspired from a real case when *lots* of user code >> suddenly stopped compiling after JDK 1.2 was released, with a new List >> class, which users had to import from a different packa

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 02:17 PM, DaWorm wrote: > Very tedious, but you could create a wrapper unit and/or class for each > library, and expose a prefixed name instead of the original. Very ingeniuos, I believe this is as close to a solution as I can get for now. But there are still a few probles I can se

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
I am trying hard to think of a situation where unit prefixes are not enough, but its hard to see. 2012/8/21 Timothy Madden : > On 08/21/2012 02:17 PM, DaWorm wrote: >> Very tedious, but you could create a wrapper unit and/or class for each >> library, and expose a prefixed name instead of the orig

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
"With no error messages, or even with no changes to the program since 1 and a half year in the repository, the scientific calculations are now all blown up, and program outputs only errors at runtime. The maintainer now curses and chases me for having the nerve to leave a program known as working i

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marco van de Voort
In our previous episode, Timothy Madden said: > Very ingeniuos, I believe this is as close to a solution as I can get > for now. > > But there are still a few probles I can see: >- there is no way to "prefix" symbols within a unit, that I know of. Some languages related to pascal and maybe ev

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Sven Barth
Am 21.08.2012 14:10, schrieb Jorge Aldo G. de F. Junior: "With no error messages, or even with no changes to the program since 1 and a half year in the repository, the scientific calculations are now all blown up, and program outputs only errors at runtime. The maintainer now curses and chases me

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
I already know that you can fully qualify, i believe you misread my post. Its not that common to have name colisions if you use prefixes like i said. I cant see how the added complexity of full name space support would help pascal in that regard. 2012/8/21 Sven Barth : > Am 21.08.2012 14:10, sch

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Sven Barth
Am 21.08.2012 15:13, schrieb Jorge Aldo G. de F. Junior: I already know that you can fully qualify, i believe you misread my post. Its not that common to have name colisions if you use prefixes like i said. I cant see how the added complexity of full name space support would help pascal in that

[fpc-pascal] Network mutex

2012-08-21 Thread Fabio Luis Girardi
Hi!! I'm searching about Network mutex/semaphore. The main idea is avoid multiple computers (running applications built with FPC) access at the same time a single network resource (like a PLC). The only solution at the moment is use a DB with transactions, but this is a non elegant solution. So,

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Mon, Aug 20, 2012 at 1:15 PM, Timothy Madden wrote: > Hello > > As the language is currently specified, an identifier is searched in, > and used from, the last unit in the USES clause that exposes that > identifier. > > As some might know already, this exposes the user to future > compatibility

Re: [fpc-pascal] Network mutex

2012-08-21 Thread Jorge Aldo G. de F. Junior
You could implement such a thing using my Pascal-Actor-Model classes. Simple TCP streams (or UDP with added guarantees) and a central actor that decides who use what. http://code.google.com/p/pascal-actor-model/ theres an udp sender/receiver actor that share a socket to send and receive messages

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 06:06 PM, Marcos Douglas wrote: > On Mon, Aug 20, 2012 at 1:15 PM, Timothy Madden > wrote: [...] >> Is there any form of proposal or some alternative to the USES clause, >> that will keep all the imported symbol names qualified by some namespace >> name or by some prefix I choose ?

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 03:10 PM, Jorge Aldo G. de F. Junior wrote: > "With no error messages, or even with no changes to the program since 1 > and a half year in the repository, the scientific calculations are now > all blown up, and program outputs only errors at runtime. The maintainer > now curses and ch

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 1:29 PM, Timothy Madden wrote: > On 08/21/2012 06:06 PM, Marcos Douglas wrote: >> On Mon, Aug 20, 2012 at 1:15 PM, Timothy Madden >> wrote: > [...] >>> Is there any form of proposal or some alternative to the USES clause, >>> that will keep all the imported symbol names q

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 1:43 PM, Timothy Madden wrote: > On 08/21/2012 03:10 PM, Jorge Aldo G. de F. Junior wrote: >> "With no error messages, or even with no changes to the program since 1 >> and a half year in the repository, the scientific calculations are now >> all blown up, and program outpu

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Mark Morgan Lloyd
Timothy Madden wrote: But next year, some unit I use will have reached a new version, and if I merely recompile my program I have already have a conflict, that was not there last year. I'd suggest that the first thing to do is to document in each unit what version of the compiler it's tested

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marco van de Voort
In our previous episode, Marcos Douglas said: > I proposed this sintaxe: > uses my_long_unit_name as my; > begin > my.proc(); > end This doesn't protect any better, since the new unit might also define "my". ___ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 3:08 PM, Marco van de Voort wrote: > In our previous episode, Marcos Douglas said: > >> I proposed this sintaxe: >> uses my_long_unit_name as my; >> begin >> my.proc(); >> end > > This doesn't protect any better, since > the new unit might also define "my". True, but usi

[fpc-pascal] wrong definition of SHCreateStdEnumFmtEtc() in unit shlobl

2012-08-21 Thread Bernd
While implementing an OLE drag&drop source I stumbled over this: shlobj.pp, Line 2444 function SHCreateStdEnumFmtEtc(cfmt:UINT; afmt:array of TFORMATETC; var ppenumFormatEtc:IEnumFORMATETC):HRESULT;StdCall;external External_library name 'SHCreateStdEnumFmtEtc'; this must be wrong. I got nothin

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
Instead of implementing the half-assed C++ namespace model, just add to the compiler a warning when it detects that there is a collision in the current scope (two functions with the same parameters from different units that can be called from the scope being inspected). I believe function overload

[fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-21 Thread Michael Van Canneyt
Hi, After recent discussions about which library to load when loading DB client libraries, I changed the default names for Firebird, MySQL, Postgres. araminta: >./loadlibdemo list Available connection types: Firebird, Default library name: libfbclient.so.2.5 MySQL 4.0, Default library name: libm

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 4:42 PM, Jorge Aldo G. de F. Junior wrote: > 2012/8/21 Marcos Douglas : >> On Tue, Aug 21, 2012 at 3:08 PM, Marco van de Voort wrote: >>> In our previous episode, Marcos Douglas said: >>> I proposed this sintaxe: uses my_long_unit_name as my; begin my

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 5:19 PM, Marcos Douglas wrote: > On Tue, Aug 21, 2012 at 4:42 PM, Jorge Aldo G. de F. Junior > wrote: >> 2012/8/21 Marcos Douglas : >>> On Tue, Aug 21, 2012 at 3:08 PM, Marco van de Voort wrote: In our previous episode, Marcos Douglas said: > I proposed this

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
the alias is the fully qualified function name : myunit1.function1() myunit2.function2() you dont need alias, cause you cant have two units with the same name, so you have two different fully qualified function names. The warning would simply point out that there are two functions with the same

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread leledumbo
> Requiring all functions to be allways fully qualified will make the most commom case worse than current implementation just to be better for the uncommon case. This is a step back, not forward... Indeed, and the way unit system works has an advantage: changing entry order / entry name in the

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 6:29 PM, Jorge Aldo G. de F. Junior wrote: > the alias is the fully qualified function name : > > myunit1.function1() > myunit2.function2() Yes, we know.. > you dont need alias, cause you cant have two units with the same name, > so you have two different fully qualified

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 10:23 PM, leledumbo wrote: >> Requiring all functions to be allways fully qualified will make the > most commom case worse than current implementation just to be better > for the uncommon case. This is a step back, not forward... > > Indeed, and the way unit system works ha

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
"Yes, we know too... but how prevent this using third-party libs? For example, what do you think if I have a project that have a file called lnet.pas? Can I use this identifier? I think so... WAIT, I can't because the lnet project already uses, right? But I didn't know before...ohh my... and now, I

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 11:13 PM, Jorge Aldo G. de F. Junior wrote: > "Yes, we know too... but how prevent this using third-party libs? > For example, what do you think if I have a project that have a file > called lnet.pas? Can I use this identifier? I think so... WAIT, I > can't because the lnet

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
Edit myunit.pas Unit myunit.pas; <- backspace backspace backspace Unit mynewunit.pas; Alt-S Alt-X Ren myunit.pas mynewunit.pas No collisions now ! 2012/8/21 Marcos Douglas : > On Tue, Aug 21, 2012 at 11:13 PM, Jorge Aldo G. de F. Junior > wrote: >> "Yes, we know too... but how prevent this u

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 11:34 PM, Jorge Aldo G. de F. Junior wrote: > Edit myunit.pas > > Unit myunit.pas; <- backspace backspace backspace > > Unit mynewunit.pas; > > Alt-S Alt-X > > Ren myunit.pas mynewunit.pas > > No collisions now ! Are you kidding me? Third-party means: you can't change (can

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-21 Thread LacaK
Hi Michael, ok, there is in sqldblib unit setter function "SetCype" ... may be, that there is typo and better name would be "SetCType" ? If you decide to correc it, then please change also all CType (Ctype, CTYpe,) occurences to "CType" ;-)) -Laco. Hi, After recent discussions about which li

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marco van de Voort
In our previous episode, Marcos Douglas said: > Yes, we know too... but how prevent this using third-party libs? > For example, what do you think if I have a project that have a file > called lnet.pas? Can I use this identifier? As much as any identifier. If you uses lnet; in the same unit where