Re: [fpc-pascal] windres not required/provided by Debian 2.6.0 FPC
On Mon, October 8, 2012 08:21, Reinier Olislagers wrote: Hi Reinier, > While getting a Jenkins continuous integration server going > > On Debian 6 (Squeeze), I installed just enough packages to get a > compiler and get a compile job going . . > The manual mentions that the FreePascal distribution comes with the > windres resource compiler > (http://www.freepascal.org/docs-html/prog/progse59.html). . . The manual forgets to mention that this is only the case on Win32 (where the various GNU tools and utilities are included with the FPC installation package). It also doesn't mention that different resource compilers may be used on other platforms (e.g. gorc on Win64, etc.). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Replacing line in big text file
Hi, I must modify some one line (mostly first line) in big text file (~10 000 lines). Doing this by loading and saving file using TStringList takes a long time (and amount of RAM). Exists any faster way based on TextFile type (like Write, WriteLn)? Regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Replacing line in big text file
If the line lenght has the same size, you can use a simple file of char to locate initial and ending offsets of the line and directly edit chars. I think this is the fastest way. 2012/10/8 Krzysztof : > Hi, > > I must modify some one line (mostly first line) in big text file (~10 > 000 lines). Doing this by loading and saving file using TStringList > takes a long time (and amount of RAM). Exists any faster way based on > TextFile type (like Write, WriteLn)? > > Regards > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Timeo hominem unius libri Cogito ergo sum - Carpe diem []s Guionardo Furlan http://guionardo.blogspot.com http://www.guionardofurlan.com.br ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Replacing line in big text file
On Mon, October 8, 2012 17:00, Guionardo Furlan wrote: > 2012/10/8 Krzysztof : Hi, >> I must modify some one line (mostly first line) in big text file (~10 >> 000 lines). Doing this by loading and saving file using TStringList >> takes a long time (and amount of RAM). Exists any faster way based on >> TextFile type (like Write, WriteLn)? > If the line lenght has the same size, you can use a simple file of > char to locate initial and ending offsets of the line and directly > edit chars. I think this is the fastest way. Depending on the underlying platform and its caching capabilities, you may want to use some caching mechanism even in that case to avoid reading the file one character by another. Especially if the size of the replaced text isn't equal to the original, you can have a look at my unit buffered (http://www.volny.cz/xhajt03/buffered.zip). The published version doesn't support ansistrings, but it can still handle lines with more than 255 characters (as supported by standard shortstrings). As an example, I've used it for modifying (broken) headers in e-mail messages which is fairly similar to your case, especially if it includes e-mail messages with large attachments (if you like, I can share this example with you too). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: windres not required/provided by Debian 2.6.0 FPC
Hi Tomas, On 8-10-2012 9:12, Tomas Hajny wrote: > On Mon, October 8, 2012 08:21, Reinier Olislagers wrote: > > > Hi Reinier, > >> While getting a Jenkins continuous integration server going >> >> On Debian 6 (Squeeze), I installed just enough packages to get a >> compiler and get a compile job going > . > . >> The manual mentions that the FreePascal distribution comes with the >> windres resource compiler >> (http://www.freepascal.org/docs-html/prog/progse59.html). > . > . > > The manual forgets to mention that this is only the case on Win32 (where > the various GNU tools and utilities are included with the FPC installation > package). It also doesn't mention that different resource compilers may be > used on other platforms (e.g. gorc on Win64, etc.). Could be. HOWEVER: I'm sure you can put multiple resource compiler packages in the Debian dependency requirements, so any one of those will satisfy the install. This way there would be no need to modify the manual as far as Debian/Ubuntu is concerned and users can just start to program without having to worry about satisfying dependencies. If that (for some obscure reason) is too restrictive, it could at least be put in the recommends section. I'm sure rpm has similar provisions. Thanks, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Replacing line in big text file
Thanks Tomas, I'll look at your example ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: windres not required/provided by Debian 2.6.0 FPC
On 8 Oct 12, at 18:31, Reinier Olislagers wrote: > On 8-10-2012 9:12, Tomas Hajny wrote: > > On Mon, October 8, 2012 08:21, Reinier Olislagers wrote: Hi Reinier, > >> While getting a Jenkins continuous integration server going > >> > >> On Debian 6 (Squeeze), I installed just enough packages to get a > >> compiler and get a compile job going > > . > > . > >> The manual mentions that the FreePascal distribution comes with the > >> windres resource compiler > >> (http://www.freepascal.org/docs-html/prog/progse59.html). > > . > > . > > > > The manual forgets to mention that this is only the case on Win32 (where > > the various GNU tools and utilities are included with the FPC installation > > package). It also doesn't mention that different resource compilers may be > > used on other platforms (e.g. gorc on Win64, etc.). > Could be. > > HOWEVER: I'm sure you can put multiple resource compiler packages in the > Debian dependency requirements, so any one of those will satisfy the > install. > This way there would be no need to modify the manual as far as > Debian/Ubuntu is concerned and users can just start to program without > having to worry about satisfying dependencies. > > If that (for some obscure reason) is too restrictive, it could at least > be put in the recommends section. > > I'm sure rpm has similar provisions. I understand your point and I didn't mean to disqualify your request / suggestion (which needs to be reviewed by people maintaining the RPM and Debian release building configuration) - I just wanted to mention that the description in our manual (as quoted by you) has even more issues. I'd suggest creating a bug report for this documentation fragment (windres will probably never get included as part of FPC distribution on Linux even after your proposed changes of dependencies) so that it isn't forgotten. You may want to create another bug report for the installation package itself and the missing dependency, or wait a bit more for the response from the respective platform maintainers (I cannot judge your proposed solution myself). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Replacing line in big text file
On 8 Oct 12, at 18:43, Krzysztof wrote: > Thanks Tomas, I'll look at your example Well, the provided URL contains just my unit, not the example for using it. I'll send you the example privately off list. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] FPC-2.6.1 daily build for Ubuntu Precise and Quantal, i386 and amd64
I have set up a daily build of latest 2.6.1: https://code.launchpad.net/~prof7bit/+archive/fpc-2.6-latest ppa:prof7bit/fpc-2.6-latest (should update automatically from now on without manual intervention) and also (because I needed it once for bootstrapping and will also need it for lazarus-1.0.0) two builds of fpc-2.6.0 (for Precise only) https://launchpad.net/~prof7bit/+archive/fpc-2.6.0 ppa:prof7bit/fpc-2.6.0 I have not used the official debian packaging files, instead I have made a much simpler packaging (similar to the ones produced by the build scripts in lazarus/tools/install) they consist of only two packages: fpc and fpc-source and replace all the fpc-* and fp-* from the official debian/ubuntu packages. Please test. I am planning to do the same with lazarus 1.0.0 and 1.0.x during the next few days ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal