Re: [fpc-devel] Object Pascal books
On Mon, 20 Aug 2007, Paschal Mushubi wrote: > Hi All > Could you recommend good introduction and reference books for Object Pascal? > I mean books about the language not the frameworks. Look on the web for Marco Cantu's book. I think this is pretty much what you are looking for. Marco has a website where you can read it on-line, I think. Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] patch fpmkunit
On 20 Aug 2007, at 09:27, Michael Van Canneyt wrote: - implemented archiving to zip using TZipper (only when no user assigned ArchiveFilesProc, because that overrides the command) The snapshots were broken last night: /FPC/home/fpc/snapshot/fpc-2.1/compiler/ppc386 -Ur -Xs -O2 -n -Fu/FPC/ home/fpc/s napshot/fpc-2.1/rtl/units/i386-linux -Fisrc -FE. -FUunits/i386-linux - di386 -dRE LEASE src/fpmkunit.pp Fatal: Can't find unit zipper used by fpmkunit Fatal: Compilation aborted Maybe you forgot to commit the zipper unit? Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] patch fpmkunit
Jonas Maebe schreef: On 20 Aug 2007, at 09:27, Michael Van Canneyt wrote: - implemented archiving to zip using TZipper (only when no user assigned ArchiveFilesProc, because that overrides the command) The snapshots were broken last night: /FPC/home/fpc/snapshot/fpc-2.1/compiler/ppc386 -Ur -Xs -O2 -n -Fu/FPC/home/fpc/s napshot/fpc-2.1/rtl/units/i386-linux -Fisrc -FE. -FUunits/i386-linux -di386 -dRE LEASE src/fpmkunit.pp Fatal: Can't find unit zipper used by fpmkunit Fatal: Compilation aborted Maybe you forgot to commit the zipper unit? It did work here on i386-linux. I have two zippers: /home/vsds/src/fpc/2.3/packages/fcl-base/src/inc/zipper.pp /home/vsds/src/fpc/2.3/utils/fppkg/fcl20/zipper.pp Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] patch fpmkunit
> Jonas Maebe schreef: >> >> On 20 Aug 2007, at 09:27, Michael Van Canneyt wrote: >> - implemented archiving to zip using TZipper (only when no user assigned ArchiveFilesProc, because that overrides the command) >> >> The snapshots were broken last night: >> >> /FPC/home/fpc/snapshot/fpc-2.1/compiler/ppc386 -Ur -Xs -O2 -n >> -Fu/FPC/home/fpc/s >> napshot/fpc-2.1/rtl/units/i386-linux -Fisrc -FE. -FUunits/i386-linux >> -di386 -dRE >> LEASE src/fpmkunit.pp >> Fatal: Can't find unit zipper used by fpmkunit >> Fatal: Compilation aborted >> >> Maybe you forgot to commit the zipper unit? > > It did work here on i386-linux. I have two zippers: > /home/vsds/src/fpc/2.3/packages/fcl-base/src/inc/zipper.pp > /home/vsds/src/fpc/2.3/utils/fppkg/fcl20/zipper.pp The zipper version in fppkg is there for bootstrapping purposes. I suppose that is what went wrong with the snapshot too. This is why MvC already suggested to ifdef the zipping in fpmkunit. Will send a patch this evening if that is ok. Darius ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] patch fpmkunit
On Tue, 21 Aug 2007, Jonas Maebe wrote: > > On 20 Aug 2007, at 09:27, Michael Van Canneyt wrote: > > > >- implemented archiving to zip using TZipper (only when no user assigned > > >ArchiveFilesProc, because that overrides the command) > > The snapshots were broken last night: > > /FPC/home/fpc/snapshot/fpc-2.1/compiler/ppc386 -Ur -Xs -O2 -n > -Fu/FPC/home/fpc/s > napshot/fpc-2.1/rtl/units/i386-linux -Fisrc -FE. -FUunits/i386-linux -di386 > -dRE > LEASE src/fpmkunit.pp > Fatal: Can't find unit zipper used by fpmkunit > Fatal: Compilation aborted > > Maybe you forgot to commit the zipper unit? No; It's in fcl-base, and has been since ages. Probably a missing dependency in the makefile... Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] patch fpmkunit
Vincent Snijders schreef: Jonas Maebe schreef: On 20 Aug 2007, at 09:27, Michael Van Canneyt wrote: - implemented archiving to zip using TZipper (only when no user assigned ArchiveFilesProc, because that overrides the command) The snapshots were broken last night: /FPC/home/fpc/snapshot/fpc-2.1/compiler/ppc386 -Ur -Xs -O2 -n -Fu/FPC/home/fpc/s napshot/fpc-2.1/rtl/units/i386-linux -Fisrc -FE. -FUunits/i386-linux -di386 -dRE LEASE src/fpmkunit.pp Fatal: Can't find unit zipper used by fpmkunit Fatal: Compilation aborted Maybe you forgot to commit the zipper unit? It did work here on i386-linux. On closer inspection, I get an error, when I do make packages This works (at least I don't see an error): make clean all It looks as if make all doesn't build packages/fpmkunit Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] patch fpmkunit
On 21 Aug 2007, at 10:34, [EMAIL PROTECTED] wrote: It did work here on i386-linux. I have two zippers: /home/vsds/src/fpc/2.3/packages/fcl-base/src/inc/zipper.pp /home/vsds/src/fpc/2.3/utils/fppkg/fcl20/zipper.pp The zipper version in fppkg is there for bootstrapping purposes. I suppose that is what went wrong with the snapshot too. This is why MvC already suggested to ifdef the zipping in fpmkunit. Will send a patch this evening if that is ok. Sounds good to me. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] error in comment?
Vincent Snijders schreef: While browsing the rtl sources, I stumbled on the following in rtl\win32\system.pp const CtrlZMarksEOF: boolean = true; (* #26 not considered as end of file *) The comment seems inconsistent with the the value 'true'. See also http://lazarus-ccr.sourceforge.net/docs/rtl/system/ctrlzmarkseof.html To make sure it is not forgotten, I created a bug report for this: http://www.freepascal.org/mantis/view.php?id=9475 Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] fpmake patch 21-aug
On Tue, 21 Aug 2007, Darius Blaszijk wrote: > The following patch implements: > - added EXTERNALZIP define to make bootstrapping possible (missing zipper > unit) > - implemented SearchFiles method which can search recursively and with a > filemask (asterisk or questionmark) using MatchesMask function > - implemented methods AddDocFiles, AddSrcFiles, AddExampleFiles, AddTestFiles > in TCustomInstaller > - implemented archiving of all files in TSources > > Although the patch produces valid code, I also discovered some caveats in the > process that need to be addressed. When using the fpmake.inc construct as in > fcl\packages, a problem with the base directory arises. A package is written > in such a way that files belonging to a package are described by using > relative paths. This works as long as you create a fpmake.pp file per package. > When using the .inc approach, all code is linked to the top level fpmake.pp > file, which destroys the paradigm. The only thing I can come up with is make > an ifdef per fpmake.inc (which is very ugly imho) or not to use this approach > and make it possible to cascade fpmake invocations starting from the top level > fpmake. Any thoughts? This problem has been considered when implementing the fpmake.inc. The ifdef with the directory name is already there. This should give you a hint as to the path that was taken then :-) The idea was that a single fpmake could be used to install all FPC-distributed packages. By making it a single fpmake, the build process will automatically take care of ordering. If you make it multiple fpmake files, then you must still add some extra fpmake which 'glues' things together in the correct order; but then the ordering must be done manually, and you need to add additional communication between fpmakes. Quite tricky. The current approach worked fine, so I don't see what the problem is ? Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] fpmake patch 21-aug
On Tue, 21 Aug 2007, Michael Van Canneyt wrote: > > > On Tue, 21 Aug 2007, Darius Blaszijk wrote: > > > The following patch implements: > > - added EXTERNALZIP define to make bootstrapping possible (missing zipper > > unit) > > - implemented SearchFiles method which can search recursively and with a > > filemask (asterisk or questionmark) using MatchesMask function > > - implemented methods AddDocFiles, AddSrcFiles, AddExampleFiles, > > AddTestFiles > > in TCustomInstaller > > - implemented archiving of all files in TSources > > > > Although the patch produces valid code, I also discovered some caveats in > > the > > process that need to be addressed. When using the fpmake.inc construct as in > > fcl\packages, a problem with the base directory arises. A package is written > > in such a way that files belonging to a package are described by using > > relative paths. This works as long as you create a fpmake.pp file per > > package. > > When using the .inc approach, all code is linked to the top level fpmake.pp > > file, which destroys the paradigm. The only thing I can come up with is make > > an ifdef per fpmake.inc (which is very ugly imho) or not to use this > > approach > > and make it possible to cascade fpmake invocations starting from the top > > level > > fpmake. Any thoughts? > > This problem has been considered when implementing the fpmake.inc. > > The ifdef with the directory name is already there. > This should give you a hint as to the path that was taken then :-) > > The idea was that a single fpmake could be used to install all > FPC-distributed > packages. By making it a single fpmake, the build process will automatically > take care of ordering. If you make it multiple fpmake files, then you must > still > add some extra fpmake which 'glues' things together in the correct order; but > then > the ordering must be done manually, and you need to add additional > communication > between fpmakes. Quite tricky. > > The current approach worked fine, so I don't see what the problem is ? Forgot to say that I implemented the patch, obviously. I think the 'MatchesMask' function belongs in strutils or sysutils. (a copy of it exists there anyway :/) Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] sdlgraph, pre-alpha
On 19 Aug 2007, at 23:28, Evgeniy Ivanov wrote: Hi! I did it. And working with its implementation. Congratulations! Just one note: please do not make it GPL, because that would mean anyone using that unit would have to make their program also GPL. Instead, please change the text at the top to something like this: *** Copyright (c) 2007 Evgeniy Ivanov This file implements the sdl support for the graph unit See the file COPYING.FPC, included in this distribution, for details about the copyright. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** You're of course free to also include your email address and a link to your website, like you have done in the version you put on the web. I need to do some hooks to speed up the module (Bar3d). But I have network problems and my dial up doesn't me allow to google much (I don't know how to hook functions/procedures). Bar3D is indeed one of the few routines which cannot be hooked currently. As long as you hook the line drawing it should be plenty fast though. Also readln function need to be hooked too (It works when alt+tab to console from which app was executed). This will indeed be difficult. It's probably best to create a generic "wincrt"-like unit (sdlcrt?) which can be used together with the sdl graph unit. Full input/output support can also be added to it over time, similarly to how the regular crt unit also takes over all input/ output. If you remember we were talking about it in April (or May). I've created sf.net project, but it is in Processing Queue. So, here are the temp links: Unit: http://itmo.vingrad.ru/files/sdlgraph.pas.txt Example: http://itmo.vingrad.ru/files/test.pas.txt Build script (you need to fix paths): http://itmo.vingrad.ru/files/build.sh.txt Very nice! P.S. Thanks you for your answers about the graph modules and to authers of graph*.inc and *Go32* module - the code is very nice. Carl will be happy to hear this :) Also I find some things I want you to have a look. They're in TODO of the sdlgraph.pas: {Graph inc and pp notes TODO: in modes.inc 421-430. Maybe delete lowNewMode..highNewMode case? else section does the same! But with this section code it is easier to read the code No, it doesn't do the same: the lowNewMode..highNewMode case uses IntcurrentNewDriver, while the else case uses IntcurrentDriver. It's to transparently support both the old and new mode selection logic. TODO: in modes.inc 181: Overloaded procedure initmode(var mode: TModeInfo); isn't used. I've looked only in modes.inc, so it may be my mistake It is used by all platform-specific graph units (also by your sdlgraph unit) to initialise a new mode. TODO: Go32 mistake 2740: modenumber is m1024x768x32k, but initmode = Init640x480x32k } Fixed, thanks. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] fpmake patch 21-aug
Michael Van Canneyt wrote: On Tue, 21 Aug 2007, Michael Van Canneyt wrote: On Tue, 21 Aug 2007, Darius Blaszijk wrote: The following patch implements: - added EXTERNALZIP define to make bootstrapping possible (missing zipper unit) - implemented SearchFiles method which can search recursively and with a filemask (asterisk or questionmark) using MatchesMask function - implemented methods AddDocFiles, AddSrcFiles, AddExampleFiles, AddTestFiles in TCustomInstaller - implemented archiving of all files in TSources Although the patch produces valid code, I also discovered some caveats in the process that need to be addressed. When using the fpmake.inc construct as in fcl\packages, a problem with the base directory arises. A package is written in such a way that files belonging to a package are described by using relative paths. This works as long as you create a fpmake.pp file per package. When using the .inc approach, all code is linked to the top level fpmake.pp file, which destroys the paradigm. The only thing I can come up with is make an ifdef per fpmake.inc (which is very ugly imho) or not to use this approach and make it possible to cascade fpmake invocations starting from the top level fpmake. Any thoughts? This problem has been considered when implementing the fpmake.inc. The ifdef with the directory name is already there. This should give you a hint as to the path that was taken then :-) The idea was that a single fpmake could be used to install all FPC-distributed packages. By making it a single fpmake, the build process will automatically take care of ordering. If you make it multiple fpmake files, then you must still add some extra fpmake which 'glues' things together in the correct order; but then the ordering must be done manually, and you need to add additional communication between fpmakes. Quite tricky. The current approach worked fine, so I don't see what the problem is ? There's no real problem. I proposed two alternatives from which the first one was chosen. I hadn't given much thought to this issue until I implemented the archive command. Forgot to say that I implemented the patch, obviously. I think the 'MatchesMask' function belongs in strutils or sysutils. (a copy of it exists there anyway :/) Sure? I searched the rtl and couldn't find the function. I agree it should live there, but afaict it doesn't yet. I found the code in fpunit.pp which was used in the fpc ide iirc. I modified it Can I make a patch to move the function to StrUtils or will you do it (don't forget documentation update)? Darius ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Delphi's generics syntax
Hi I just saw this blog about upcoming Delphi's generic syntax at this address http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:1498 -- Inoussa O. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Delphi's generics syntax
On Tue, 21 Aug 2007, Inoussa OUEDRAOGO wrote: > Hi > > I just saw this blog about upcoming Delphi's generic syntax at this > address http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:1498 They of course had to do it different from FPC, once more. I suppose their operator overloading will also be different again. They're not being very cooperative once again. All Delphi owners on the list should NOW complain, saying that they want it compatible to FPC's implementation :-) Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Delphi's generics syntax
Michael Van Canneyt schreef: On Tue, 21 Aug 2007, Inoussa OUEDRAOGO wrote: Hi I just saw this blog about upcoming Delphi's generic syntax at this address http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:1498 They of course had to do it different from FPC, once more. What are the differences? Maybe good to document them (after their release). I suppose their operator overloading will also be different again. They're not being very cooperative once again. All Delphi owners on the list should NOW complain, saying that they want it compatible to FPC's implementation :-) Why didn't the fpc team give Bob Swart permission to blog about the generics syntax in the upcoming fpc 2.2? :-) Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Delphi's generics syntax
Op Tue, 21 Aug 2007, schreef Michael Van Canneyt: > I suppose their operator overloading will also be different again. That is old news. In case you didn't notice: their operator syntax sucks horribly. Daniël___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Delphi's generics syntax
On 21 Aug 2007, at 23:00, Michael Van Canneyt wrote: I just saw this blog about upcoming Delphi's generic syntax at this address http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:1498 They of course had to do it different from FPC, once more. It wouldn't surprise me if their actual implementation (or at least design) predates FPC's. I doubt they just thought this up quickly since FPC 2.1.2 was released. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Delphi's generics syntax
On Tue, 21 Aug 2007, Vincent Snijders wrote: > Michael Van Canneyt schreef: > > > > On Tue, 21 Aug 2007, Inoussa OUEDRAOGO wrote: > > > > > Hi > > > > > > I just saw this blog about upcoming Delphi's generic syntax at this > > > address http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:1498 > > > > They of course had to do it different from FPC, once more. > > What are the differences? Maybe good to document them (after their release). Just look at the page above and compare with the FPC manual. > > > I suppose their operator overloading will also be different again. > > > > They're not being very cooperative once again. > > > > All Delphi owners on the list should NOW complain, saying that > > they want it compatible to FPC's implementation :-) > > Why didn't the fpc team give Bob Swart permission to blog about the generics > syntax in the upcoming fpc 2.2? :-) I'm not sure he would even want permission. I think if he started to look at FPC he would loose his status as "highly appreciated" Delphi guru :-) Seriously: Borland has never been very cooperative. When lazarus was started there was a radio broadcast with Michael Hess and Michael Swindell from Borland. Big words about the "big happy Pascal family", but unfortunately we've seen very little action to back up these words... Ah well, look where Lazarus is now... :-) Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Delphi's generics syntax
Op Tue, 21 Aug 2007, schreef Michael Van Canneyt: > > > On Tue, 21 Aug 2007, Inoussa OUEDRAOGO wrote: > > > Hi > > > > I just saw this blog about upcoming Delphi's generic syntax at this > > address http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:1498 > > They of course had to do it different from FPC, once more. > I suppose their operator overloading will also be different again. > > They're not being very cooperative once again. > > All Delphi owners on the list should NOW complain, saying that > they want it compatible to FPC's implementation :-) One argument is that Andreas Hausladen's generics implementation for Delphi *is* mostly FPC compatible. So they hurt their own customers who currently writing generics code using Andreas his solution. I spent some efforts a while back on the non-tech newsgroup regarding compatibility for 64-bit issues; everyone needing Win64 is currently using FPC, and many component writers are porting. When Borland will release their win64 compiler in 2010 all 64-bit code will be using FPC facilities like ptruint, hopefully for Borland with Delphi-compatibility ifdefs still there. It is in their own interrest that they can compile the code then that is being written now. Daniël___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Object Pascal books
On Mon, 20 Aug 2007, Paschal Mushubi wrote: Hi All Could you recommend good introduction and reference books for Object Pascal? I mean books about the language not the frameworks. Look on the web for Marco Cantu's book. I think this is pretty much what you are looking for. Marco has a website where you can read it on-line, I think. I saw Marco Cantù's Essential Pascal. But the book seems to assume you have you have Delphi ( the IDE). I was looking for GUI free code examples that I can compile with FPC. Are there no other alternatives? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Object Pascal books
I saw Marco Cantù's Essential Pascal. But the book seems to assume you have you have Delphi ( the IDE). I was looking for GUI free code examples that I can compile with FPC. Are there no other alternatives? The FPC alternative to Delphi is Lazarus. Check out www.lazarus.freepascal.org and download a binary for your system. Lazarus is similar (but not entirely the same) to Delphi. Normally though (like in the examples from Cantu) you will be able to compile the exact code from Delphi in Lazarus. If you have issues with code, then please let them know here. Darius ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Delphi's generics syntax
IMHO, the better FPC becomes the more Borland/CodeGear will be forced to be coperative as so many people will be using FPC; It's just a matter of time. -- Inoussa O. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] fpmake patch 21-aug
Darius Blaszijk wrote: I think the 'MatchesMask' function belongs in strutils or sysutils. (a copy of it exists there anyway :/) Sure? I searched the rtl and couldn't find the function. I agree it should live there, but afaict it doesn't yet. I found the code in fpunit.pp which was used in the fpc ide iirc. I modified it Can I make a patch to move the function to StrUtils or will you do it (don't forget documentation update)? Are you looking for StrUtils.IsWild? Luiz ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] fpmake patch 21-aug
Are you looking for StrUtils.IsWild? Luiz Thanks Luiz, that's it. Darius ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel