Re: [fpc-pascal] Overriding or reimplementing a property

2013-03-01 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Given something like implementation var DBConnectionNearby: TSQLConnection= nil; .. case MainForm.NearbyKind of dbkFirebird: DBConnectionNearby := TIBConnection.Create(nil); dbkPostgres: DBConnectionNearby :=

Re: [fpc-pascal] Case based on type

2013-03-01 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Sven Barth said: === example end === Alternatively if you don't need to check the hierarchy, but can live with an exact match you can do this: === example begin === procedure checkLibrariesAndConnect(db: TSQLConnection); begin case Lower

Re: [fpc-pascal] Case based on type

2013-03-01 Thread waldo kitty
On 3/1/2013 17:57, Sven Barth wrote: [...] Alternatively if you don't need to check the hierarchy, but can live with an exact match you can do this: === example begin === procedure checkLibrariesAndConnect(db: TSQLConnection); begin case LowerCase(db.ClassName) of // Note: .ClassName won't work

[fpc-pascal] Re: fpc registry unit

2013-03-01 Thread leledumbo
> Registry is not part of rtl because it's not a base unit??? This is my point it uses 200 other f*** units that aren't really needed! YOU don't use those 200 units, but the UNIT YOU USE needs them. Get the point? Even though you don't, what about other people? FPC is not released just for you, du

Re: [fpc-pascal] Re: fpc registry unit

2013-03-01 Thread Marco van de Voort
In our previous episode, John Lee said: > Registry is not part of rtl because it's not a base unit??? Yes. The registry is not needed for bootstrapping the compiler, or internally in the RTL. This is roughly the definition of the RTL, though there is some history there. On non Windows, registry

Re: [fpc-pascal] Re: fpc registry unit

2013-03-01 Thread John Lee
Registry is not part of rtl because it's not a base unit??? This is my point it uses 200 other f*** units that aren't really needed! So you are saying if one wants a single 50 line unit & does a complex procedure eg installi ng 10^10 lines of fpc etc then it is simple? And of course you have to d

Re: [fpc-pascal] Re: fpc registry unit

2013-03-01 Thread Mark Morgan Lloyd
Sven Barth wrote: Everything should be as simple as possible... as the great man said!. It *is* simple. When you do an installation of FPC a "fpc.cfg" is created where all the unit paths included with the installation are already included. Provided that, on any given system, you've initial

Re: [fpc-pascal] Case based on type

2013-03-01 Thread Marco van de Voort
In our previous episode, Sven Barth said: > === example end === > > Alternatively if you don't need to check the hierarchy, but can live > with an exact match you can do this: > > === example begin === > > procedure checkLibrariesAndConnect(db: TSQLConnection); > begin >case LowerCase(db.Cl

Re: [fpc-pascal] Case based on type

2013-03-01 Thread Mark Morgan Lloyd
Sven Barth wrote: On 01.03.2013 23:35, Mark Morgan Lloyd wrote: Given a procedure definition like procedure checkLibrariesAndConnect(db: TSQLConnection); is there a more elegant way of performing type-specific actions than begin if db is TPQConnection then begin end; if db is TIBConn

Re: [fpc-pascal] Overriding or reimplementing a property

2013-03-01 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > Given something like > > implementation > > var DBConnectionNearby: TSQLConnection= nil; > > .. > case MainForm.NearbyKind of >dbkFirebird: DBConnectionNearby := TIBConnection.Create(nil); >dbkPostgres: DBConnectionNearby := TPQConne

[fpc-pascal] Overriding or reimplementing a property

2013-03-01 Thread Mark Morgan Lloyd
Given something like implementation var DBConnectionNearby: TSQLConnection= nil; .. case MainForm.NearbyKind of dbkFirebird: DBConnectionNearby := TIBConnection.Create(nil); dbkPostgres: DBConnectionNearby := TPQConnection.Create(nil); is there an elegant way of overriding the Connecte

Re: [fpc-pascal] Case based on type

2013-03-01 Thread Sven Barth
On 01.03.2013 23:35, Mark Morgan Lloyd wrote: Given a procedure definition like procedure checkLibrariesAndConnect(db: TSQLConnection); is there a more elegant way of performing type-specific actions than begin if db is TPQConnection then begin end; if db is TIBConnection then begin

[fpc-pascal] Case based on type

2013-03-01 Thread Mark Morgan Lloyd
Given a procedure definition like procedure checkLibrariesAndConnect(db: TSQLConnection); is there a more elegant way of performing type-specific actions than begin if db is TPQConnection then begin end; if db is TIBConnection then begin end end { checkLibrariesAndConnect } ; i.e. some

Re: [fpc-pascal] Re: fpc registry unit

2013-03-01 Thread Sven Barth
On 01.03.2013 21:57, John Lee wrote: Thanks all for your help - found the .ppu and .o at last - I note than inifiles itself needs some other stupid unit! ! I think you'll agree it is all more than somewhat compllcated tho' - can't see why registry unit is part of fcl tho - surely it is a simple

Re: [fpc-pascal] Solution for Timer in daemon

2013-03-01 Thread Sven Barth
On 01.03.2013 21:17, Krzysztof wrote: I know how sleep blocking works in thread :) . I'm just wondering what is better, sleep or RTL event or something else You might know, but we answered to Leonardo who does not seem to know ___ fpc-pascal maillist

Re: [fpc-pascal] Re: fpc registry unit

2013-03-01 Thread John Lee
Thanks all for your help - found the .ppu and .o at last - I note than inifiles itself needs some other stupid unit! ! I think you'll agree it is all more than somewhat compllcated tho' - can't see why registry unit is part of fcl tho - surely it is a simple routine for reading the registry - not

Re: [fpc-pascal] Virtual Constants

2013-03-01 Thread Michael Van Canneyt
On Fri, 1 Mar 2013, Daniel Gaspary wrote: The idea is strange. But here it is: Is possible to have a Class constant with different values in class descendants ? Would be something like that: TA = class const c1: integer; virtual; class function GetC1: integer; //returns c1 en

[fpc-pascal] Virtual Constants

2013-03-01 Thread Daniel Gaspary
The idea is strange. But here it is: Is possible to have a Class constant with different values in class descendants ? Would be something like that: TA = class const c1: integer; virtual; class function GetC1: integer; //returns c1 end; TB = class(TA) const c1: integer

Re: [fpc-pascal] Solution for Timer in daemon

2013-03-01 Thread Krzysztof
I know how sleep blocking works in thread :) . I'm just wondering what is better, sleep or RTL event or something else ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: fpc registry unit

2013-03-01 Thread Sven Barth
On 01.03.2013 19:57, John Lee wrote: Thanks - just want a simple unit, I'm not using lazarus. If I go to this directory and try to compile registry with v2.6.2, win32, it then uses inifiles so that's needed and not part of the fpc 2.6.2 distribution afaik. Where can I find that please? If you

Re: [fpc-pascal] Solution for Timer in daemon

2013-03-01 Thread Mattias Gaertner
On Fri, 1 Mar 2013 10:28:20 -0800 (PST) Leonardo M. Ramé wrote: >[...] > > Well, as far as I know, sleep is no thread safe, it will block your app. sleep blocks only the thread. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org htt

Re: [fpc-pascal] Solution for Timer in daemon

2013-03-01 Thread Sven Barth
On 01.03.2013 19:28, Leonardo M. Ramé wrote: From: Krzysztof To: fpc-pascal Sent: Friday, March 1, 2013 3:10 PM Subject: [fpc-pascal] Solution for Timer in daemon Hi, I'm reading that I can't use timer in daemon because daemon core is based on thread. So

Re: [fpc-pascal] Re: fpc registry unit

2013-03-01 Thread John Lee
Thanks - just want a simple unit, I'm not using lazarus. If I go to this directory and try to compile registry with v2.6.2, win32, it then uses inifiles so that's needed and not part of the fpc 2.6.2 distribution afaik. Where can I find that please? John On 1 March 2013 17:52, leledumbo wrote:

Re: [fpc-pascal] Solution for Timer in daemon

2013-03-01 Thread Leonardo M . Ramé
> > From: Krzysztof >To: fpc-pascal >Sent: Friday, March 1, 2013 3:10 PM >Subject: [fpc-pascal] Solution for Timer in daemon > > >Hi, > > >I'm reading that I can't use timer in daemon because daemon core is based on >thread. So I'm trying to create another thr

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Marco van de Voort
In our previous episode, Sven Barth said: > > Actually, I wouldn't have any interest working on a compiler using llvm > > as a backend because it leaves only the boring front end work :) Not to > > mention the maintainance problems when depending on an external cg > > written not in pascal, the pro

[fpc-pascal] Solution for Timer in daemon

2013-03-01 Thread Krzysztof
Hi, I'm reading that I can't use timer in daemon because daemon core is based on thread. So I'm trying to create another thread which simulate timer. My interval is quite big (~1-5 minutes), so I can't just use sleep(6) because daemon will hung on terminate. So I have two ideas: 1. Create loo

[fpc-pascal] Re: fpc registry unit

2013-03-01 Thread leledumbo
http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-registry/src/ -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-registry-unit-tp5713265p5713266.html Sent from the Free Pascal - General mailing list archive at Nabble.com. _

Re: [fpc-pascal] fpc registry unit

2013-03-01 Thread Howard Page-Clark
On 01/03/13 5:34, John Lee wrote: Think I'm missing something! I need the/a fpc registry unit - I can't seem to find it on svn - lots of references to it! Pls send or point me to it. If you use Lazarus, just make sure FCL is a declared dependency in your project, and add uses registry; to

[fpc-pascal] fpc registry unit

2013-03-01 Thread John Lee
Think I'm missing something! I need the/a fpc registry unit - I can't seem to find it on svn - lots of references to it! Pls send or point me to it. Code extract (from synaser) that I need to work is var reg:tregistry; ... reg.RootKey := HKEY_LOCAL_MACHINE; reg.OpenKey('\HARDWARE\DEVICEMA

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 04:37 PM, Michael Van Canneyt wrote: > > On Fri, 1 Mar 2013, Ludo Brands wrote: > >> What about just using a 32k buffer? > > No problem with that as far as I am concerned. > > Since the code is shared between embedded and non-embedded targets, it > might be better to have the opti

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Sven Barth
On 01.03.2013 18:13, Florian Klämpfl wrote: Am 01.03.2013 11:04, schrieb Sven Barth: But even if LLVM would support all targets that FPC supports the core developers don't *want* to make LLVM the default. Actually, I wouldn't have any interest working on a compiler using llvm as a backend bec

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 06:02 PM, Sven Barth wrote: > > While the kernel might pass less than 256 characters the dirent > structure contains a "dd_nextoff" field which is already used in FPC's > fpreaddir call to locate the next returned entry. > Yes, I know. Otherwise we would lose more than one file na

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Florian Klämpfl
Am 01.03.2013 11:04, schrieb Sven Barth: > > But even if LLVM would support all targets that FPC supports the core > developers don't *want* to make LLVM the default. Actually, I wouldn't have any interest working on a compiler using llvm as a backend because it leaves only the boring front end w

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Sven Barth
On 01.03.2013 16:08, Ludo Brands wrote: On 03/01/2013 12:52 PM, Sven Barth wrote: Currently FPC allocates only one pdirent in fpopendir (rtl/linux/ossysc.inc). Maybe it should first stat the directory and then decide based on st_blksize how much pdirent entries to allocate (but it should also p

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Michael Van Canneyt
On Fri, 1 Mar 2013, Ludo Brands wrote: On 03/01/2013 12:52 PM, Sven Barth wrote: Currently FPC allocates only one pdirent in fpopendir (rtl/linux/ossysc.inc). Maybe it should first stat the directory and then decide based on st_blksize how much pdirent entries to allocate (but it should also

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 12:52 PM, Sven Barth wrote: > Currently FPC allocates only one pdirent in fpopendir > (rtl/linux/ossysc.inc). Maybe it should first stat the directory and > then decide based on st_blksize how much pdirent entries to allocate > (but it should also provide a sane default, as there is

[fpc-pascal] Re: optimisation v2.2.2

2013-03-01 Thread leledumbo
FPC optimizations have never been aggressive, despite the trunk has several new optimizations with -O4. Since you're stuck with 2.2.2, and your problem is on string operation*, I don't think there's anything else you can do. Note that those -O thing won't suddenly boost your code, there are many fa

Re: [fpc-pascal] [news] DA-Soft discontinues AnyDAC component suite

2013-03-01 Thread Juha Manninen
On Fri, Mar 1, 2013 at 1:33 PM, Sven Barth wrote: > As I'm not talking about FireMonkey's architecture, but Embarcadero's style > of business it would be off-topic on either list :) Ok, it is about business and marketing decisions. It is not interesting for me, I am more interested in technical m

[fpc-pascal] optimisation v2.2.2

2013-03-01 Thread John Lee
I'm stuck with v2.2.2 because I have units from that version w/o source code, tho' not sure whether later fpcs would be any better? Any performance improvements made? I have a program that does quite a bit of processing on xml strings (eg using str functions such as pos, npos,posex) that occur eve

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Marco van de Voort
In our previous episode, microc...@zoho.com said: > > Personally I can only hope additional interest in LLVM will lead to more > supported platforms. I understand they don't have manpower for every > platform but as it is the narrow focus is certainly a concern, especially > when big projects like

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Sven Barth
On 01.03.2013 12:31, Marco van de Voort wrote: In our previous episode, Ludo Brands said: The question is what is different in nautilus and midnight commander comparing to fpc directoy-listing functions that allows them to list directories correctly in the bug's case? The difference with oth

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Marco van de Voort
In our previous episode, Sven Barth said: > But even if LLVM would support all targets that FPC supports the core > developers don't *want* to make LLVM the default. At the very least, no irreversible decisions should be made for LLVM is running at least a full version cycle in production. So pe

Re: [fpc-pascal] [news] DA-Soft discontinues AnyDAC component suite

2013-03-01 Thread Sven Barth
On 01.03.2013 12:28, Juha Manninen wrote: On Fri, Mar 1, 2013 at 11:52 AM, Sven Barth wrote: Indeed. Like was the case with the project FireMonkey is based on... I have heard mixed comments about FireMonkey. I don't know what to think about it myself. I seriously considered using it about hal

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Marco van de Voort
In our previous episode, Ludo Brands said: > > > > The question is what is different in nautilus and midnight commander > > comparing to fpc directoy-listing functions that allows them to list > > directories correctly in the bug's case? > > > > The difference with other tools is that FPC gives

Re: [fpc-pascal] [news] DA-Soft discontinues AnyDAC component suite

2013-03-01 Thread Juha Manninen
On Fri, Mar 1, 2013 at 11:52 AM, Sven Barth wrote: > Indeed. Like was the case with the project FireMonkey is based on... I have heard mixed comments about FireMonkey. I don't know what to think about it myself. I seriously considered using it about half a year ago for a project but I didn't beca

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Graeme Geldenhuys
On 2013-03-01 10:30, microc...@zoho.com wrote: > platform but as it is the narrow focus is certainly a concern, especially > when big projects like FreeBSD move away from gcc and make LLVM the official > "compiler of FreeBSD". I don't know anything really about LLVM, but did read recently the comp

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread ik
On Fri, Mar 1, 2013 at 8:56 AM, Jürgen Hestermann wrote: > > Am 2013-03-01 04:41, schrieb dmitry boyarintsev: > >> All the new "strange" features doesn't really matter as long as: >> 1) the backward compatibility is in place (and or guidelines are given >> how to make the code compatible with mini

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread microcode
On Fri, Mar 01, 2013 at 09:23:29AM +, Mark Morgan Lloyd wrote: > Sven Barth wrote: > > >>An llvm target will move the optimisation burden away from fpc, which > >>would be very interesting. > > > >While we would welcome a LLVM backend it is basically a consent in > >the development team that t

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 10:55 AM, Max Vlasov wrote: > > On Fri, Mar 1, 2013 at 12:32 PM, Ludo Brands > wrote: > > On 03/01/2013 09:14 AM, Max Vlasov wrote: > > > > The question is what is different in nautilus and midnight commander > > comparing to fpc directoy

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Mark Morgan Lloyd
Henry Vermaak wrote: On Fri, Mar 01, 2013 at 09:23:29AM +, Mark Morgan Lloyd wrote: Sven Barth wrote: An llvm target will move the optimisation burden away from fpc, which would be very interesting. While we would welcome a LLVM backend it is basically a consent in the development team th

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Sven Barth
On 01.03.2013 10:50, Henry Vermaak wrote: On Fri, Mar 01, 2013 at 09:23:29AM +, Mark Morgan Lloyd wrote: Sven Barth wrote: An llvm target will move the optimisation burden away from fpc, which would be very interesting. While we would welcome a LLVM backend it is basically a consent in t

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Max Vlasov
On Fri, Mar 1, 2013 at 12:32 PM, Ludo Brands wrote: > On 03/01/2013 09:14 AM, Max Vlasov wrote: > > > > The question is what is different in nautilus and midnight commander > > comparing to fpc directoy-listing functions that allows them to list > > directories correctly in the bug's case? > > >

Re: [fpc-pascal] [news] DA-Soft discontinues AnyDAC component suite

2013-03-01 Thread Sven Barth
On 01.03.2013 10:48, stdreamer wrote: In their FAQ they only talk about Delphi XE3 and C++ builder... also they mention in "Does it work with other IDEs?" "No, it doesn't"... find attached a screen shot with firedac installed on lazarus 1.1 this is just to make my point that the current relea

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Henry Vermaak
On Fri, Mar 01, 2013 at 09:23:29AM +, Mark Morgan Lloyd wrote: > Sven Barth wrote: > > >>An llvm target will move the optimisation burden away from fpc, which > >>would be very interesting. > > > >While we would welcome a LLVM backend it is basically a consent in > >the development team that t

Re: [fpc-pascal] [news] DA-Soft discontinues AnyDAC component suite

2013-03-01 Thread stdreamer
In their FAQ they only talk about Delphi XE3 and C++ builder... also they mention in "Does it work with other IDEs?" "No, it doesn't"... find attached a screen shot with firedac installed on lazarus 1.1 this is just to make my point that the current release works with lazarus at the same tim

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Sven Barth
On 01.03.2013 10:23, Mark Morgan Lloyd wrote: Sven Barth wrote: An llvm target will move the optimisation burden away from fpc, which would be very interesting. While we would welcome a LLVM backend it is basically a consent in the development team that this would only be an additional altern

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Mark Morgan Lloyd
Sven Barth wrote: An llvm target will move the optimisation burden away from fpc, which would be very interesting. While we would welcome a LLVM backend it is basically a consent in the development team that this would only be an additional alternative to the normal backends FPC provides.

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Mark Morgan Lloyd
Martin Schreiber wrote: Am 01.03.2013 07:56, schrieb Jürgen Hestermann: Am 2013-03-01 04:41, schrieb dmitry boyarintsev: All the new "strange" features doesn't really matter as long as: 1) the backward compatibility is in place (and or guidelines are given how to make the code compatible with

[fpc-pascal] tiOPF: Repository migrated to Git

2013-03-01 Thread Graeme Geldenhuys
Hi, In case there are anybody using tiOPF, please note the following. I'll also update the Free Pascal wiki in the next few minutes. Original Message Subject: Repository migrated to Git Date: Wed, 27 Feb 2013 19:43:33 + From: Graeme Geldenhuys Newsgroups: tiopf.development,

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread dev . dliw
> We were only joking around with the name. :) Fully understood, but just to be sure :D d.l.i.w ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 09:14 AM, Max Vlasov wrote: > Hi, > > Working with lazarus on Linux Mint I noticed that when I mount a windows > shared with "Connect to server", everything works fine (Nautilus, > Midnight Commander, Lazarus file operations). But meeting that .gvfs > folder is hidden, I tried to mou

[fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Max Vlasov
Hi, Working with lazarus on Linux Mint I noticed that when I mount a windows shared with "Connect to server", everything works fine (Nautilus, Midnight Commander, Lazarus file operations). But meeting that .gvfs folder is hidden, I tried to mount "mount -t cifs" directly in the shell. After such

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Martin Schreiber
Am 01.03.2013 07:56, schrieb Jürgen Hestermann: Am 2013-03-01 04:41, schrieb dmitry boyarintsev: All the new "strange" features doesn't really matter as long as: 1) the backward compatibility is in place (and or guidelines are given how to make the code compatible with minimal efforts) 2) execu