Re: [fpc-pascal] FPC with Firebird SuperServer
On 27 Jan 2009, at 08:36, Bee wrote: 2) Is there other advice the forum can offer (eg. does Classic remain a reasonable choice, is SuperServer support planned, etc). I simply made a symlink name libfbclient.so in folder /usr/lib which point to /Library/Frameworks/Firebird.framework/Versions/Current/ Firebird then everything worked fine (as in Linux). You can do that on your own system, but it's not a solution for distributing your application (/usr/lib is off-limits to third parties, and while you could use /usr/local instead it's just hackish). The main problem to me seems that the database units are all very rigid regarding how the database library should be found. There appears to be no way at all to say where the library is or may be located. And there also appears to be no way either to link to the Firebird client libaries directly (e.g. by adding {$linkframework Firebird} to your main program and embedding the framework in your application bundle -- well, you can do that, but the firebird units still won't work because they insist on having the library available under a particular name and findable using dlopen). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] very simple text indexing system
On Tue, 27 Jan 2009, Graeme Geldenhuys wrote: > Hi, > > I would like to implement a very simple text indexing system (full > text search) for one of our products. I know there are a few products > our there I can use in combination with RDBMS etc... But I would like > to keep the 3rdParty components down to a minimum. So I thought, if I > could implement something myself and be able to compile it into our > software, that would be great. > > I must admit, I have no idea how text indexing software work. So maybe > my idea is unrealistic. Either way, does anybody think something like > this is possible in a few days? Anybody got some articles or > documents explaining the basics of how text indexing and full text > search systems work? Check this out: http://ioda.sourceforge.net/ If you don't use their code, at least it'll give you some ideas. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC with Firebird SuperServer
On Tue, 27 Jan 2009, Jonas Maebe wrote: > > On 27 Jan 2009, at 08:36, Bee wrote: > > > >2) Is there other advice the forum can offer (eg. does Classic remain a > > >reasonable choice, is SuperServer support planned, etc). > > > >I simply made a symlink name libfbclient.so in folder /usr/lib which point to > >/Library/Frameworks/Firebird.framework/Versions/Current/Firebird then > >everything worked fine (as in Linux). > > You can do that on your own system, but it's not a solution for distributing > your application (/usr/lib is off-limits to third parties, and while you could > use /usr/local instead it's just hackish). > > The main problem to me seems that the database units are all very rigid > regarding how the database library should be found. There appears to be no way > at all to say where the library is or may be located. This is not correct: function InitialiseIBase60(Const LibraryName : String) : integer; You can specify the full path if you want. > And there also appears > to be no way either to link to the Firebird client libaries directly (e.g. by > adding {$linkframework Firebird} to your main program and embedding the > framework in your application bundle -- well, you can do that, but the > firebird units still won't work because they insist on having the library > available under a particular name and findable using dlopen). This is also not correct, there is a ibase60 unit which - contrary to the ibase60dyn unit - is statically linked. TSQLQuery and friends use the dynamically loaded version, for good reason: they must be usable in circumstances where you don't know if the library is present or not, as is the case in Lazarus, the database desktop and whatnot. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] very simple text indexing system
At 07:47 27/01/2009, you wrote: Hi, I would like to implement a very simple text indexing system (full text search) for one of our products. I know there are a few products our there I can use in combination with RDBMS etc... But I would like to keep the 3rdParty components down to a minimum. So I thought, if I could implement something myself and be able to compile it into our software, that would be great. I must admit, I have no idea how text indexing software work. So maybe my idea is unrealistic. Either way, does anybody think something like this is possible in a few days? Anybody got some articles or documents explaining the basics of how text indexing and full text search systems work? SQLite has a FTS module used in Firefox, google desktop and more... Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Profiling
On 26 Jan 2009, at 22:49, Mattias Gaertner wrote: I need to profile lazarus applications under linux. I tried gprof, but it is broken since years and shows no record. Neither does the bug repository show any record of open bugs against - pg on Linux. I found the following page, but it does not help here: http://wiki.lazarus.freepascal.org/Profiling How can I profile under linux? I've used qprof successfully in the past (not for FPC programs, but for other things). It's a sampling-based profiler, so it shouldn't slow down things too much. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC with Firebird SuperServer
On 27 Jan 2009, at 10:07, Michael Van Canneyt wrote: On Tue, 27 Jan 2009, Jonas Maebe wrote: On 27 Jan 2009, at 08:36, Bee wrote: 2) Is there other advice the forum can offer (eg. does Classic remain a reasonable choice, is SuperServer support planned, etc). I simply made a symlink name libfbclient.so in folder /usr/lib which point to /Library/Frameworks/Firebird.framework/Versions/Current/Firebird then everything worked fine (as in Linux). You can do that on your own system, but it's not a solution for distributing your application (/usr/lib is off-limits to third parties, and while you could use /usr/local instead it's just hackish). The main problem to me seems that the database units are all very rigid regarding how the database library should be found. There appears to be no way at all to say where the library is or may be located. This is not correct: function InitialiseIBase60(Const LibraryName : String) : integer; You can specify the full path if you want. Good, then the problem should be easily solvable by using this function in combination with the information in the blog post that Bee referenced. This is also not correct, there is a ibase60 unit which - contrary to the ibase60dyn unit - is statically linked. Thanks. That one should indeed work if you then add {$linkframework Firebird} to your main program. TSQLQuery and friends use the dynamically loaded version, for good reason: they must be usable in circumstances where you don't know if the library is present or not, as is the case in Lazarus, the database desktop and whatnot. I know, but if you know for sure that the library/framework is available (e.g., because you put it inside your application bundle on Mac OS X), then directly linking can be useful. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC with Firebird SuperServer
On Tue, 27 Jan 2009, Jonas Maebe wrote: > > On 27 Jan 2009, at 10:07, Michael Van Canneyt wrote: > > >On Tue, 27 Jan 2009, Jonas Maebe wrote: > > > > > > > >On 27 Jan 2009, at 08:36, Bee wrote: > > > > > > > >2) Is there other advice the forum can offer (eg. does Classic remain a > > > > >reasonable choice, is SuperServer support planned, etc). > > > > > > > >I simply made a symlink name libfbclient.so in folder /usr/lib which > > > >point to > > > >/Library/Frameworks/Firebird.framework/Versions/Current/Firebird then > > > >everything worked fine (as in Linux). > > > > > >You can do that on your own system, but it's not a solution for > > >distributing > > >your application (/usr/lib is off-limits to third parties, and while you > > >could > > >use /usr/local instead it's just hackish). > > > > > >The main problem to me seems that the database units are all very rigid > > >regarding how the database library should be found. There appears to be no > > >way > > >at all to say where the library is or may be located. > > > >This is not correct: > > > >function InitialiseIBase60(Const LibraryName : String) : integer; > > > >You can specify the full path if you want. > > Good, then the problem should be easily solvable by using this function in > combination with the information in the blog post that Bee referenced. > > >This is also not correct, there is a ibase60 unit which - contrary to the > >ibase60dyn unit - is statically linked. > > Thanks. That one should indeed work if you then add {$linkframework Firebird} > to your main program. > > >TSQLQuery and friends use the dynamically loaded version, for good reason: > >they must be usable in circumstances where you don't know if the library is > >present or not, as is the case in Lazarus, the database desktop and whatnot. > > I know, but if you know for sure that the library/framework is available > (e.g., because you put it inside your application bundle on Mac OS X), then > directly linking can be useful. All you'd need to do is include the unit, I suppose. The dlopen() should then probably return the already linked library ? Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Profiling
On Tue, Jan 27, 2009 at 10:15 AM, Jonas Maebe wrote: > > On 26 Jan 2009, at 22:49, Mattias Gaertner wrote: > >> I need to profile lazarus applications under linux. >> I tried gprof, but it is broken since years and shows no record. > > Neither does the bug repository show any record of open bugs against -pg on > Linux. I can confirm with Mattias. I tried over a year ago to do profiling using gprof. It always generated a empty (0 byte) file. Nothing else. I posted messages to the mailing list and was told to try valgrind instead. It issues with gprof was known at the time. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC with Firebird SuperServer
On 27 Jan 2009, at 10:22, Michael Van Canneyt wrote: On Tue, 27 Jan 2009, Jonas Maebe wrote: On 27 Jan 2009, at 10:07, Michael Van Canneyt wrote: TSQLQuery and friends use the dynamically loaded version, for good reason: they must be usable in circumstances where you don't know if the library is present or not, as is the case in Lazarus, the database desktop and whatnot. I know, but if you know for sure that the library/framework is available (e.g., because you put it inside your application bundle on Mac OS X), then directly linking can be useful. All you'd need to do is include the unit, I suppose. The dlopen() should then probably return the already linked library ? Only if the name matches exactly. In case of a framework, the name of the library inside the may be different. Jonasx ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Profiling
On 27 Jan 2009, at 10:49, Graeme Geldenhuys wrote: I can confirm with Mattias. I tried over a year ago to do profiling using gprof. It always generated a empty (0 byte) file. Nothing else. I posted messages to the mailing list and was told to try valgrind instead. It issues with gprof was known at the time. If there is no bug report about it, it's very likely that it will be forgotten over time (as in this case, apparently -- I indeed seem to remember that at one point I knew about this). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Profiling
On Tue, 27 Jan 2009, Jonas Maebe wrote: > > On 27 Jan 2009, at 10:49, Graeme Geldenhuys wrote: > > >I can confirm with Mattias. I tried over a year ago to do profiling > >using gprof. It always generated a empty (0 byte) file. Nothing else. > >I posted messages to the mailing list and was told to try valgrind > >instead. It issues with gprof was known at the time. > > If there is no bug report about it, it's very likely that it will be forgotten > over time (as in this case, apparently -- I indeed seem to remember that at > one point I knew about this). There is indeed a problem. I submitted a bugreport with a test program. The program does not execute correctly when compiled with -pg. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Profiling
Zitat von Jonas Maebe : > > On 26 Jan 2009, at 22:49, Mattias Gaertner wrote: > > > I need to profile lazarus applications under linux. > > I tried gprof, but it is broken since years and shows no record. > > Neither does the bug repository show any record of open bugs against - > pg on Linux. Sorry. I thought the problem is known and the fpc team prefers valgrind. I saw that Michael created a bug report, with major urgent priority - wow. > > I found the following page, but it does not help here: > > http://wiki.lazarus.freepascal.org/Profiling > > > > How can I profile under linux? > > I've used qprof successfully in the past (not for FPC programs, but > for other things). It's a sampling-based profiler, so it shouldn't > slow down things too much. Yes, that's why I prefer gprof and used it a lot in the past. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Profiling
On 27 Jan 2009, at 11:30, Mattias Gärtner wrote: Zitat von Jonas Maebe : I've used qprof successfully in the past (not for FPC programs, but for other things). It's a sampling-based profiler, so it shouldn't slow down things too much. Yes, that's why I prefer gprof and used it a lot in the past. Note that I was talking about qprof (http://www.hpl.hp.com/research/linux/qprof/ ), not gprof. As opposed to qprof (and Shark on Mac OS X), gprof is not a sampling-based profiler (gprof traces the entire execution). Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Profiling
In our previous episode, Michael Van Canneyt said: > > If there is no bug report about it, it's very likely that it will be > > forgotten > > over time (as in this case, apparently -- I indeed seem to remember that at > > one point I knew about this). > > There is indeed a problem. I submitted a bugreport with a test program. > > The program does not execute correctly when compiled with -pg. Has it worked at all for 64-bit ? Otherwise maybe the title of the bugreport should be corrected. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Xcode access to fpc documentation
Aha! That's why the unix find of FPCMacOSAll did not find anything either! It's not there anymore. That clears up a couple mysteries for me. Thx, Ken G. Brown At 9:05 AM +0100 1/27/09, fpc-pascal-requ...@lists.freepascal.org apparently wrote: >Date: Tue, 27 Jan 2009 09:42:00 +0200 >From: Jonas Maebe >Subject: Re: [fpc-pascal] Xcode access to fpc documentation >To: FPC-Pascal users discussions >Message-ID: <963ac7c8-1313-46ac-a81f-f2ecbfb7d...@elis.ugent.be> >Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > >On 27 Jan 2009, at 00:55, Ken G. Brown wrote: > >> Is there a way to add the fpc documentation so that Xcode help can >> access it like the docsets? > >Not that I know. > >> In the MacOS fpc 2.2.2 download, in the MainUnit.pas of the FPC-C-C+ >> +CarbonApplication template for new projects, there is a typo >> causing it to not compile. >> The ) after $endif should be }. > >Thanks for reporting this, I'm not sure how I missed that. It's still >there in 2.2.4rc1, I'll fix it for the final 2.2.4 release. > >> As well, the way the code is commented out causes both MacOSAll and >> FPCMacOSAll to be used. Are they both necessary? > >No, only MacOSAll is. See >http://wiki.freepascal.org/User_Changes_2.2.2#FPCMacOSAll_unit > for more information. > >> Where are MacOSAll and FPCMacOSAll supposed to be located? At the >> moment Spotlight does not find them for me. > >The unit is located at /usr/local/lib/fpc/2.2.2/units/i386-darwin/ >univint/MacOSAll.ppu (or powerpc-darwin in case you're on ppc). The >reason that you didn't find it with Spotlight, is that it does not >show files under /usr by default (because you seldom want to find >files there, as only command line applications put things there). You >can either use the command line interface to spotlight (mdfind >MacOSAll), or change the settings of the GUI one to also include >"system files"). > >That said, this unit (just like all others) is only distributed in >compiled form with the installer, so it's not going to be very useful >to you. If you want the sources, you can download them here: >http://www.freepascal.org/down/source/sources.var > >Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Changes in sockets unit
In our previous episode, leledumbo said: > I saw many deprecated things in sockets unit. Could someone tell me what to > do to port existing code? All the code was already deprecated since 2.0, but the "deprecate" function was only new in 2.2.0, and 2.2.0 had to be 2.0.4 compilable. Use the fp* versions of the functions as much as possible. They have standard errorhandling like documented by e.g. manpages. The older functions had their own conventions related to 1.0.x Linux unit behaviour, which is why they were deprecated. Since they don't hurt that bad it was decided to not remove them directly, but have a reasonable grace period. However 2.0.0 is now almost 4 years ago, and in 2.4 they will be removed. > Why are Sock2Text and Text2Sock deprecated? You know, they're very handy > (sometimes). The errorhandling related to their use can be cumbersome, which makes them handy for little stuff but hard to support. Moreover, nobody was interested to maintain them. (though inbetween afaik Daniel worked on it a bit to keep them working). ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then
Is the problem that you don't see output from del2pas.bat? or is it not executed at all (and how do you know this)? If the problem is the first, that may be so because in a .lnk you specify that the file needs a console, and just running the .bat ma prevent it frome getting a console? Put in your del2pas.bat a line like starts a GUI program like notepad.exe and see if it is launched, that would tell you definitely if the problem is having assigned a console or not. (Just a wild guess) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Lazarus Resource...
Hi all! An stupid question... A resource file (lrs) can have 2 resources with the same name? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Lazarus Resource...
Zitat von "papelhigien...@gmail.com" : > Hi all! > > An stupid question... A resource file (lrs) can have 2 resources with the > same name? The last counts. Which means: no. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then
I tried many combinations of "%COMSPEC% /c Del2Pas.bat" ExecuteName := ('C:\\WINDOWS\\system32\\cmd.exe ' + AppPathExe + 'Del2Pas.bat'); ExecuteName := ('"%COMSPEC%/c Del2Pas.bat"'); and many more! but still: Unable to open file: "%COMSPEC%/c Del2Pas.bat" ErrorCode=0 Help... ô¿ô V e r n WinXp sp2 , Delphi5, WebDwarf, Trellian WebPage, Lazarus-0.9.26-fpc-2.2.2-win32.exe, wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1 http://www.flickr.com/photos/vmars956/ Wanted: Dwarf Hibiscus (Orange/Rasberry) - Original Message - From: ""Vinzent Höfler"" To: "FPC-Pascal users discussions" Sent: Monday, January 26, 2009 11:53 PM Subject: Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '','', 0) <= 32 Then Original-Nachricht Datum: Mon, 26 Jan 2009 17:42:23 -0600 Von: "vmars" An: fpc-pascal@lists.freepascal.org Betreff: [fpc-pascal] If ShellExecute(0, \'open\', PChar(ExecuteName), \'\', \'\', 0) <= 32 Then Thanks in advance! [Any ideas why this works: ExecuteName := (AppPathExe + 'Del2Pas.bat.lnk'); ExecuteShell; ] [But this doesn't work: ExecuteName := (AppPathExe + 'Del2Pas.bat'); ExecuteShell; And doesn't give an error msg.] Just trying an educated guess here, but I suppose .bat-files can only be executed via command.com (cmd.exe). Something like "%COMSPEC% /c Del2Pas.bat" could do the trick. Vinzent. -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then
Wild is good, but same results: Unable to open file: "%COMSPEC%/c Del2Pas.bat" ErrorCode=0 ô¿ô V e r n WinXp sp2 , Delphi5, WebDwarf, Trellian WebPage, Lazarus-0.9.26-fpc-2.2.2-win32.exe, wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1 http://www.flickr.com/photos/vmars956/ Wanted: Dwarf Hibiscus (Orange/Rasberry) - Original Message - From: "Bart" To: "FPC-Pascal users discussions" Sent: Tuesday, January 27, 2009 8:00 AM Subject: Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then Is the problem that you don't see output from del2pas.bat? or is it not executed at all (and how do you know this)? If the problem is the first, that may be so because in a .lnk you specify that the file needs a console, and just running the .bat ma prevent it frome getting a console? Put in your del2pas.bat a line like starts a GUI program like notepad.exe and see if it is launched, that would tell you definitely if the problem is having assigned a console or not. (Just a wild guess) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then
On 28 Jan 2009, at 02:02, vmars wrote: Wild is good, but same results: Unable to open file: "%COMSPEC%/c Del2Pas.bat" ErrorCode=0 You have to resolve %COMSPEC% first (it's an environment variable). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal