[fpc-pascal] Unicode support

2012-05-16 Thread Andrew Brunner
I wanted to ask what the present state of unicode support is now. I'm running into problems with some various strings. Sometimes when a string contains a unicode character postgresql won't allow the insert/update. Also, some MP3 tags contain UTF16, UTF16BE and I really don't know of the best pra

[fpc-pascal] Darwin i386

2012-05-19 Thread Andrew Brunner
I'm having a hard time with GDB and debugging threads on a OSX 10.7.4 with fpc/trunk The shipped gdb worked great with the exception of threads calling methods via synchronize (so I can debug). I'm in the process of building GDB from download and configure set gdb to x64 darwin. Configure detect

Re: [fpc-pascal] Darwin i386

2012-05-20 Thread Andrew Brunner
> > > What are you doing exactly, what happens, and what is the expected result > instead? > I'm upgrading my gdb from shipping version with darwin to gdb version from download. I downloaded and ran /configure make make install 7.1. It doesn't work with fpc. I'm going to have to switch back. T

Re: [fpc-pascal] Darwin i386

2012-05-20 Thread Andrew Brunner
On Sun, May 20, 2012 at 8:52 AM, Jonas Maebe The above was a question relating to "... with the exception of threads calling methods via synchronize (so I can debug)." I.e., what are the exact things you are doing, what is happening, and what are the expected results regarding trying to debug thre

[fpc-pascal] Postgresql Concurrent Transactions

2012-06-21 Thread Andrew Brunner
Hi there, I'm seeking help to address an issue I presently have with a Server application that uses TPostgres components. Each manager thread has its own Connection, Transaction, and TQuery. Each manager can handle potentially thousands of sockets Each server instance (1 process) can have up to ~

[fpc-pascal] Problems with Postgresql Character Encoding

2012-09-26 Thread Andrew Brunner
:='LATIN1'; This does nothing for me when Connection is a postgresql connection. Anyone have any experience with postgresql character sets / encoding??? I can't hard-code any one character set because users from 1 region will have different encoding needs than another. Any he

Re: [fpc-pascal] Problems with Postgresql Character Encoding

2012-09-26 Thread Andrew Brunner
he patch - I'm updating my FPC /Lazarus and building now... -- Andrew Brunner Aurawin LLC 512.574.6298 http://aurawin.com/ Aurawin is a great new place to store, share, and enjoy your photos, videos, music and more. ___ fpc-pascal maillist - f

Re: [fpc-pascal] Problems with Postgresql Character Encoding

2012-09-26 Thread Andrew Brunner
/view.php?id=22985 (I did only basic testing) -Laco. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Andrew Brunner Aurawin LLC 512.574.6298 http://aurawin.com/ Aurawin is a great

[fpc-pascal] Subversion Client/Server Source

2012-10-24 Thread Andrew Brunner
e have any contributions of SVN client/server code in pascal? Any help is greatly appreciated, Andrew Brunner Aurawin LLC 512.574.6298 A safe new way to store and share your files, pictures, videos, and more. http://aurawin.com/ ___ fpc-pascal maillist -

Re: [fpc-pascal] Subversion Client/Server Source

2012-10-24 Thread Andrew Brunner
look at Apache svn source (C++) to port to Aurawin's HTTP server. But where is the "Official" svn documentation for implementing svn over http? -- Andrew Brunner Aurawin LLC 512.574.6298 A safe new way to store and share your files, pictures, videos, and more. htt

Re: [fpc-pascal] Subversion Client/Server Source

2012-10-24 Thread Andrew Brunner
alled. It looks like heavy XML. It will require use the fpc-xml. Are the DOM components proven to be memory leak free at this point? -- Andrew Brunner Aurawin LLC 512.574.6298 A safe new way to store and share your files, pictures, videos, and more. http://aurawi

[fpc-pascal] fcl-db components missing from 2.6.0 (Lazarus winx64 bin inst)

2012-10-29 Thread Andrew Brunner
code-tools system does find the unit when I hot-click the unit. I'm going to FPC/Laz build from svn/source but I just wanted to post here to see what was the cause... -- Andrew Brunner Aurawin LLC 512.574.6298 http://aurawin.com/ Aurawin is a great new way to store, share, and enjoy your

Re: [fpc-pascal] Configuration file handling

2013-02-15 Thread Andrew Brunner
ey don't try to update it simultaneously? In the case that I'm thinking of, I don't anticipate e.g. multiple logins trying to write setup information at the same time. The more risky case is if there are e.g. multiple daemons or apps trying to save state when a UPS signals imm

Re: [fpc-pascal] Re: Configuration file handling

2013-02-16 Thread Andrew Brunner
On Feb 16, 2013, at 2:37 AM, Reinier Olislagers wrote: > > Security problems with world-writable files? Yes, that problem applies > to *nix as well but Mark has given no indication his config files are > world-writable. (Even if the logins Mark speaks of run under different > user accounts, t

[fpc-pascal] Performance problems with Image Conversions

2013-02-23 Thread Andrew Brunner
iews images via my preview app, I don't send the originals, I scale those too using the same methods. The speed is killing my server's performance. Does anyone have any idea how to speed up the underlining code? -- Andrew Brunner Aurawin LLC 15843 Garrison Circle Austin, TX 787

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-24 Thread Andrew Brunner
On 02/24/2013 04:44 AM, Michael Van Canneyt wrote: Try to get rid of the XML, it is always going to be slow. Using XML can slow your applications with a factor 6. If you are mime-encoding an image, it'll be even more. I was just thinking about that. I think JSON would be ok, especially if I

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-25 Thread Andrew Brunner
On 02/25/2013 04:51 AM, Graeme Geldenhuys wrote: ImageMagick will probably be a good choice. Regards, - Graeme - Ok, I'm going to start tests with that. Thanks ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/m

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-25 Thread Andrew Brunner
m.Size:=0; blob:=MagickGetImageBlob(wand,@bSize); Stream.Write(blob^,bSize); Result:=true; end; end; finally DestroyMagickWand(wand); end; end; -- Andrew Brunner Aurawin LLC 15843 Garrison Circle Austin, TX 78717 https://aurawin.com Aurawin is a great n

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

2013-02-27 Thread Andrew Brunner
orced into a bracket it ought-not-be. Jascal DOES look cool ;-) -- Andrew Brunner Aurawin LLC 15843 Garrison Circle Austin, TX 78717 https://aurawin.com Aurawin is a great new way to store, share, and explore all your content featuring our innovative cloud social computin

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

2013-02-28 Thread Andrew Brunner
ad code would be limited to reflect on the code contributor/creator. But to 1.) above, wrongly kowning up to bad code contributions is my largest genuine concern. -- Andrew Brunner Aurawin LLC 15843 Garrison Circle Austin, TX 78717 https://aurawin.com Aurawin is a great new way to store,

[fpc-pascal] Problems with ImageMagick Win64

2013-04-28 Thread Andrew Brunner
x27;; WandExport = 'libMagickWand'; // Previous ImageMagick versions used 'libWand' {$endif} CORE_RL_magick_.dll CORE_RL_wand_.dll' Apon running the app, libMagickWand.dll was not found. Can someone please look into this? Thanks, -- Andrew Brunner Aurawin LLC 15843 Ga

Re: [fpc-pascal] Problems with ImageMagick Win64

2013-04-28 Thread Andrew Brunner
On 04/28/2013 02:49 PM, Andrew Brunner wrote: I can't get ImageMagick unit to work under Windows XP 64. Also, I have confirmed that ImageMagick installed and the application does work. Can someone please edit change the unit code for Windows instead of Win32? The libraries are identica

Re: [fpc-pascal] Win64 release of FPC 2.6.2 missing

2013-05-04 Thread Andrew Brunner
solution must conform to FPC standards with regards to builds/packaging. Thanks for any help in offering a 64bit download of FPC. Andrew Brunner, Aurawin LLC 512.574.6298 http://aurawin.com/ Aurawin is great new way to store and share your pictures, videos, and more, featuring our innovative

Re: [fpc-pascal] Problems with ImageMagick Win64

2013-05-04 Thread Andrew Brunner
http://bugs.freepascal.org/view.php?id=24346 Can someone please apply patch? Thanks. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Win64 release of FPC 2.6.2 missing

2013-05-06 Thread Andrew Brunner
I agree with what you are saying as long as the os matches the binary type. An x64 native package must install a x64bit binary and utils. I would be understating if I said that a 32bit binary would be normal on a 64bit distro. Andrew Brunner Aurawin LLC 512.574.6298 A safe new way to

[fpc-pascal] ImageMagick and Static Linking

2013-05-08 Thread Andrew Brunner
Image Magick comes with static libraries and dynamic libraries. Is there any way to make ImageMagick unit support the *.lib files? I'm trying to avoid having to distribute the ImageMagick dlls. Thanks, -- Andrew Brunner Aurawin LLC 15843 Garrison Circle Austin, TX 78717 https://aurawi

Re: [fpc-pascal] How to save a huge XML?

2013-06-19 Thread Andrew Brunner
is a limitation of strings and memory allocation w/r/t xml. I would suggest that the reporter just implement function toXML() method(s) to construct XML data as a string and use T(File/Memory)Stream. This method has worked well for me. -- Andrew Brunner Aurawin LLC 15843 Garrison Circle A

[fpc-pascal] Status of UTF8

2013-09-28 Thread Andrew Brunner
/decoding of strings as perhaps some inspiration that may lead to FPC internal support for such a mechanism. Thanks, Andrew Brunner Aurawin LLC 512.574.6298 https://aurawin.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] Status of UTF8

2013-09-28 Thread Andrew Brunner
On 09/28/2013 07:51 AM, Jonas Maebe wrote: You can read your data into a RawByteString and then call SetCodePage(rawbytestr,codepagenr,false) to set its code page to whatever the code page of the data in that string is (without attempting to convert the data, which is what the last "false" pa

[fpc-pascal] Is Nested Procedure Types

2013-11-23 Thread Andrew Brunner
pascal.org/FPC_New_Features_2.6.0#Support_for_nested_procedure_variables Thanks, -- Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more. ___ fpc-pasca

Re: [fpc-pascal] Is Nested Procedure Types

2013-11-23 Thread Andrew Brunner
system wide without compiler directives? What's the hold-up or reason why the mode is even needed? Thanks again, On 11/23/2013 09:43 AM, Jonas Maebe wrote: On 23 Nov 2013, at 15:47, Andrew Brunner wrote: I'm wondering if the is nested procedure type is supposed to work {$

[fpc-pascal] Problems with Dynlibs.UnloadLibrary on Linux

2008-12-16 Thread Andrew Brunner
I've been experiencing problems with SOs under Linux and am trying to develop a "Plugin" system for my Server I'm porting to Lazarus. I'm confident can get these Plug-ins to Load and Operate just fine at least in (Ubuntu). I can't however, Unload them. I want to be able to use the DynLibs.Unload

Re: [fpc-pascal] Problems with Dynlibs.UnloadLibrary on Linux

2008-12-16 Thread Andrew Brunner
On Tue, Dec 16, 2008 at 3:29 PM, Jonas Maebe wrote: > In what code does it crash? Inside unloadlibrary, or (shortly) afterwards? > What is the backtrace at the point of the crash? It blows out right during the DynLibs.UnloadLibrary(FLibHandle) There is only a read access violation that is raise

Re: [fpc-pascal] Problems with Dynlibs.UnloadLibrary on Linux

2008-12-17 Thread Andrew Brunner
Thanks for that tip! So running under GDB I get the following info... This GDB was configured as "x86_64-linux-gnu"... (gdb) run Starting program: /mnt/Raid/Developer/Source/Lazarus/Test/TestApplication [Thread debugging using libthread_db enabled] [New Thread 0x7f9e79102770 (LWP 7388)] [WARNING

Re: [fpc-pascal] Problems with Dynlibs.UnloadLibrary on Linux

2008-12-18 Thread Andrew Brunner
On Thu, Dec 18, 2008 at 2:04 AM, Michael Van Canneyt wrote: > Are you using threads ? > > Michael. Hi Michael, Not in the library project. Although I do plan on having threads in the Main Application. Many pooled threads will be running in the main application. Just the "application" thread

Re: [fpc-pascal] FreePascal/Lazarus plug-in's for Delphi.

2008-12-19 Thread Andrew Brunner
I think all efforts should the concentrated on providing mainstream features that are common in newer development platforms (Java/C#) . I feel that spending time on making Delphi code more readable is a waste since there are SO many other issues that need to be dealt with. C# has a lot of ideas F

Re: [fpc-pascal] Schema Types

2008-12-22 Thread Andrew Brunner
I would also add that it's wise to employ overloaded commands for each data structure that contains dynamic arrays. There may be nested dynamic arrays, and Delphi at least would not respect copying over nested data structures that contained Dynamic Arrays, so I write Copy, Empty, SetSize routines

[fpc-pascal] Dynlibs.LoadLibrary on 64bit Debian (Ubuntu)

2008-12-23 Thread Andrew Brunner
I'm running into another issue where I create all classes from scratch to avoid using Classes unit inside library and now my library won't load. The only FPC related unit I use is SysUtils. If I strip out my all my units as uses then the Application LoadLibrary will return a handle. I tried to u

Re: [fpc-pascal] Dynlibs.LoadLibrary on 64bit Debian (Ubuntu)

2008-12-23 Thread Andrew Brunner
> This is on Scientific Linux 5.2 (free distro based on Red Hat Enterprise > Linux 5.2). Are you sure that you are using 2.2.3 and not 2.3.1? Hi Jonas, Yes, I did use build 2.3.1 from SVN. I'll try 2.2.3 build b/c I'm having so many different Issues with this one and re-post back. __

Re: [fpc-pascal] Dynlibs.LoadLibrary on 64bit Debian (Ubuntu)

2008-12-23 Thread Andrew Brunner
ory map of pointers based on the current processID. TMemoryMap=Array[THandle] of Pointer. This does work on Delphi. But it does not work on FPC. On Tue, Dec 23, 2008 at 1:26 PM, Andrew Brunner wrote: >> This is on Scientific Linux 5.2 (free distro based on Red Hat Enterprise >> Li

[fpc-pascal] Array [THandle] of pointer

2008-12-23 Thread Andrew Brunner
Following Setup: Ubuntu 8.10 x64 FPC 2.2.3 (latest and greatest) Lazarus (Latest and greatest) I'm seeing an anomaly with reading/writing to an Array[THandle] of Pointers. TMyStruct=record Index:integer; end; PMyStruct=^TMyStruct; TMyList = Array[THandle] of PMyStruct; If I declare a lo

Re: [fpc-pascal] Array [THandle] of pointer

2008-12-23 Thread Andrew Brunner
Hehehehe I know. I didn't realize that the map was that large. It's for Indexing memory objects to threads. I did something similar under Delphi but now recall limiting the size from [-1..9] or something like that. But that's in a 32 bit OS. Doing it that way isn't going to work. I've

Re: [fpc-pascal] Dynlibs.LoadLibrary on 64bit Debian (Ubuntu)

2008-12-23 Thread Andrew Brunner
On Tue, Dec 23, 2008 at 1:36 PM, Jonas Maebe wrote: > Your bug report indicates version "2.2.3" in the details view. I noticed that. I don't recall paying much attention to the version or perhaps it wasn't available in the combobox. It was listed in the more detailed version. > 2.2.x is the fi

Re: [fpc-pascal] Dynlibs.LoadLibrary on 64bit Debian (Ubuntu)

2008-12-24 Thread Andrew Brunner
I've been struggling with an issue of Dynlibs.LoadLibrary(completepath/something.so) always returning zero for libraries in subfolders that are traced back to samba shares. Example Library Project is built on /home/atbrunner/Source/Libraries/Test/project1.so but /home/atbrunner/Source is a smbfs

Re: [fpc-pascal] Initializing Arrays?

2008-12-25 Thread Andrew Brunner
I typically use Empty, SetSize, Copy, and IndexOf etc. Methods for all my DataTyped Arrays. The SetSize method sets the size and for each Item in the Array I call empty. Empty(Var Item:TJSMContact); overload; Empty(Var Items:TJSMContacts); overload; var iLcv:integer; begin For iLcv:=0 to High

Re: [fpc-pascal] Dynlibs.LoadLibrary on 64bit Debian (Ubuntu)

2008-12-27 Thread Andrew Brunner
om 13:42 uur [tijdzone -0600], schreef Andrew > Brunner: >> I've been struggling with an issue of >> Dynlibs.LoadLibrary(completepath/something.so) always returning zero >> for libraries in subfolders that are traced back to samba shares. > > This sounds as if yo

[fpc-pascal] Library Project raises Linker Error Hints at -fPIC option

2009-01-06 Thread Andrew Brunner
I'm looking for a reason why I get this error while linking a compile of a Shared Object I'm building under x64 (Ubuntu). BinUtils 2.19 (Started with 2.18) but 2.19 did not fix problem. FPC 2.2.3 (1/6/2009) Lazarus SVN RVN :17967 0.9.27 beta Error while building. /usr/local/bin/ld: libpuMatrixMe

Re: [fpc-pascal] Library Project raises Linker Error Hints at -fPIC option

2009-01-07 Thread Andrew Brunner
Hi Jonas, I posted bug with source. Here is a link http://bugs.freepascal.org/view.php?id=12940 Thanks, -Andy On Wed, Jan 7, 2009 at 6:09 AM, Jonas Maebe wrote: > > On 07 Jan 2009, at 03:46, Andrew Brunner wrote: > >> Can anyone tell me why this would be a problem or what

[fpc-pascal] Re: Library Project raises Linker Error Hints at -fPIC option

2009-01-12 Thread Andrew Brunner
I'm still unable to build my libraries. Can I get anyone to help? :-) On Tue, Jan 6, 2009 at 8:46 PM, Andrew Brunner wrote: > I'm looking for a reason why I get this error while linking a compile > of a Shared Object I'm building under x64 (Ubuntu). > > BinUtils 2

[fpc-pascal] Debian Linux, BinUtils, FPC question

2009-01-14 Thread Andrew Brunner
Hi there, I'm trying to get more information on how FPC uses BinUtils under Debian flavored linux. Any help would be greatly appreciated. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Creating FPC enabled websites

2009-03-03 Thread Andrew Brunner
On Tue, Mar 3, 2009 at 2:44 PM, Joost van der Sluis wrote: > > If users use the application constantly, don't use a web-application. > > So the things explained in this document from IBM is usefull for very > large systems which a lot of users (Like Amazon, but they also don't > like the idea of a

Re: [fpc-pascal] Creating FPC enabled websites

2009-03-03 Thread Andrew Brunner
On Tue, Mar 3, 2009 at 3:04 PM, Michael Van Canneyt wrote: > To prove my point I once did performance tests with AJAX, SOAP and whatnot > technologies when compared to a specialized C/S protocol. In general the > conclusion was that SOAP and standards-based applications worked 6 times > slower. A

Re: [fpc-pascal] Array initialization

2009-03-17 Thread Andrew Brunner
var c1 : array[1..10] of char; begin fillchar(c1[1],5,0); fillchar(c1[5],5,#32); You might need @ sign in front of c1 though... ...or... const c1:array[1..10] of char = '123456789a'; On Tue, Mar 17, 2009 at 5:50 PM, Francisco Reyes wrote: > On the following URL, > http://web.mit.edu/

Re: [fpc-pascal] Re: Servlet server for Fpc apps

2009-03-30 Thread Andrew Brunner
I've been reading this thread for a while and wanted to ask something... What if someone had a cluster based cloud computing server written entirely from the ground up in Delphi? Including hot-swappable core object for backend AJAX calls and all the major Web2.0 protocol implements (XMPP/HTTP/SMT

Re: [fpc-pascal] Re: Servlet server for Fpc apps

2009-03-30 Thread Andrew Brunner
On Mon, Mar 30, 2009 at 2:26 PM, Dariusz Mazur wrote: > Andrew Brunner pisze: >> >> I've been reading this thread for a while and wanted to ask something... >> >> What if someone had a cluster based cloud computing server written >> entirely from the ground

Re: [fpc-pascal] Re: Servlet server for Fpc apps

2009-03-30 Thread Andrew Brunner
help delivering an affordable open sourced alternative. On Mon, Mar 30, 2009 at 2:40 PM, Leonardo M. Ramé wrote: > > Andrew, do you have an example, or web page where we can read more about the > project? > > > Leonardo M. Ramé > > > --- On Mon, 3/30/09, Andrew Brunne

[fpc-pascal] SQL Administration Component for MySQL, PostgreSQL, and Oracle

2009-07-20 Thread Andrew Brunner
a model of existing Delphi code. Components must be complete for Linux, MAC, & Windows. Thanks, Andrew Brunner ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Environment Variables with Include Directive

2009-07-26 Thread Andrew Brunner
I've got a situation where I'm wanting to concatenate a path from the environment with a string to specify the path to the actual file to include when building. PATH_TO_DATA_INCLUDES = '/mnt/Source/Includes/Data/ {$i %PATH_TO_DATA_INCLUDES%+definitions.inc} Is there any way to get FPC to join th

[fpc-pascal] DB unit and Parameter Binding with Variants

2009-08-04 Thread Andrew Brunner
I am very pleased with the core features of the DB components and more specially the SQL components. Many thanks for your efforts. Development of these components for Linux, MAC, and Windows will make this platform more palatable. After reviewing the code for the TParams and TParam components, ha

Re: [fpc-pascal] DB unit and Parameter Binding with Variants

2009-08-04 Thread Andrew Brunner
Michael, If I extend the Param system to depend on the memory being allocated by the caller of the SetData and that the memory will be there for the duration of the SQL operation then all we need to do is have a pointer to the memory, the size of the memory, and the kind of memory. With these thr

Re: [fpc-pascal] Byte array manipulation

2009-08-16 Thread Andrew Brunner
Hi there, I have a ByteArray unit that's pretty extensive. function toString(Var Item:TByteArray):string var iLen:Integer; begin iLen:=System.Length(Item); SetLength(Result,iLen); if iLen>0 then System.Move(Item[0],Result[1],iLen); end; On Sun, Aug 16, 2009 at 12:35 PM, Wimpie Nortje

[fpc-pascal] FIONREAD FPC FpIOCtl for Cross platform Sockets

2009-10-07 Thread Andrew Brunner
Sockets programming often requires a poll for how much data is available on a particular socket descriptor. I'm porting an inhouse library for a sockets implementation and I realize that while I have a FpIOCtl call in the baseUnix unit I have no such animal in the Sockets implement which would be

Re: [fpc-pascal] How to free this memory and avoid memory leak

2009-10-08 Thread Andrew Brunner
> >      Move(p, tocarray[0], SizeOf(tocarray)); > This causes an Access Violation at runtime. > This should not cause as RAV. You must call SetLength(toarray,SizeOfMemory) and also don't use SizeOf(tocarray) use Length(tocarray)*SizeOf(What ever the element is)) _

[fpc-pascal] QueueUserAPC Similar Cross platform Functionality

2009-10-08 Thread Andrew Brunner
Hi there, I've got a unit I'm porting from Windows to Linux and I came across a QueueUserAPC (Kernel32 Windows) I make to add a callback method that gets executed by the thread I added this to. function QueueUserAPC(Callback: Pointer; hThread: THandle; dwData:DWORD): boolean; stdcall; When the T

[fpc-pascal] Re: QueueUserAPC Similar Cross platform Functionality

2009-10-09 Thread Andrew Brunner
ernel call but hey... my options are limited. If anyone has a better solution for Linux/Unix/Mac- I'm all ears. Thanks. On Thu, Oct 8, 2009 at 12:34 PM, Andrew Brunner wrote: > Does Threading under Linux have anything like this?  Have any of you > done anything like this under *ni

Re: [fpc-pascal] QueueUserAPC Similar Cross platform Functionality

2009-10-09 Thread Andrew Brunner
- a thread handling > function that would repeatedly request tasks and execute them, until > the tasks were all complete. (I added a repeat loop...) > > Hope this helps... (or inspires you to think of something that will > work :) > > ~David. > > > On Thu 8 Oct 2009,

Re: [fpc-pascal] Why use pointers to arrays?

2009-10-11 Thread Andrew Brunner
In general I use pointers to data structures and especially when they are arrays. Take the following PIntArray: ^TIntArray; TIntArray:Array of Integer; 1st benefit: declaring methods associated with classes before TIntArray needs to be defined or declared. eg. procedure DoSomething(Var Data

Re: [fpc-pascal] Why use pointers to arrays?

2009-10-12 Thread Andrew Brunner
On Sun, Oct 11, 2009 at 5:25 PM, "Vinzent Höfler" wrote: > Andrew Brunner : > >> 1st benefit: >> >> declaring methods associated with classes before TIntArray needs to be >> defined or declared. >>   eg. procedure DoSomething(Var Data:TIntArray

Re: [fpc-pascal] Why use pointers to arrays?

2009-10-12 Thread Andrew Brunner
On Mon, Oct 12, 2009 at 12:43 PM, Marc Weustink wrote: > Graeme Geldenhuys wrote: >> >> On 11/10/2009, Andrew Brunner wrote: >>> >>>  FPC forces the ^ operator while accessing structures as pointers. >>>  Delphi didn't force it and I even suspect

[fpc-pascal] Windows Seven and SVN source install

2009-11-07 Thread Andrew Brunner
Hi there, I just got a laptop that came with Windows Seven. I have complete automation scripts with my Ubuntu boxes but NONE of the commands to "make" FPC translate for me. I poured over wikis and blogs for info and even found the official (link below). http://wiki.lazarus.freepascal.org/Install

Re: [fpc-pascal] Windows Seven and SVN source install

2009-11-07 Thread Andrew Brunner
Yes. From any folder in command prompt I get fpc access. I just don't know the make commands and parameters. -Andy On Sat, Nov 7, 2009 at 7:31 AM, Vincent Snijders wrote: > Andrew Brunner schreef: >> >> Hi there, >> >> I just got a laptop that came with

Re: [fpc-pascal] Windows Seven and SVN source install

2009-11-07 Thread Andrew Brunner
And I didn't get the source copied using make install sourceinstall PREFIX=MyPrefix On Sat, Nov 7, 2009 at 7:54 AM, Vincent Snijders wrote: > Andrew Brunner schreef: >> >> Yes.  From any folder in command prompt I get fpc access.  I just >> don't know the make commands

Re: [fpc-pascal] Windows Seven and SVN source install

2009-11-07 Thread Andrew Brunner
C:\Developer\FPC>make install sourceinstall PREFIX=C:\FPC make -C win32 exampleinstall make[4]: Entering directory `C:/Developer/FPC/rtl/win32' make[4]: Nothing to be done for `exampleinstall'. make[4]: Leaving directory `C:/Developer/FPC/rtl/win32' make[3]: Leaving directory `C:/Developer/FPC/rtl

Re: [fpc-pascal] Windows Seven and SVN source install

2009-11-07 Thread Andrew Brunner
On Sat, Nov 7, 2009 at 12:21 PM, Jonas Maebe wrote: > > You have to build/install an exported copy under Windows due to a bug in > cp.exe there. First perform > > C:\Developer\FPC> svn export . c:\Developer\FPCExport > > Then build/install from c:\Developer\FPCExport Well, if this is a bug I gues

Re: [fpc-pascal] dynamic array contents and system.move

2010-04-24 Thread Andrew Brunner
David, I don't see how you are not getting memory leaks by doing a move before making sure that the destination buffer has the memory allocated. You see, in Delphi and FPC, move d/n actually move the memory... It just copies it. You were warned :-) On Sat, Apr 24, 2010 at 3:01 PM, David Emerson

Re: Re[2]: [fpc-pascal] dynamic array contents and system.move

2010-05-05 Thread Andrew Brunner
> Constants (values) or variable values (variables). Let's not forget assignable constants that must be typed :-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] methods of an object to create others objects

2010-07-05 Thread Andrew Brunner
If Memory allocation is the point of discussion and you need to create objects ... You should nest the creations in order of usage. In your declarations you needed bot Object1 and Object2 as TMyObject; That said the proper usage would be: obj1:=TMyObject.Create; Try obj2:=TMyObject.Create; T

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
>> obj1:=TMyObject.Create; >> Try >>  obj2:=TMyObject.Create; >>  Try >>    Obj1.DoSomething1; >>    Obj2.DoSomething2; >>   Finally >>     FreeAndNil(Obj2); >>   end; >>  Finally >>   FreeAndNil(Obj1); >> end; > > Hum... I do not agree. Why not this? See.. > > obj1:=TMyObject.Create; > obj2:=TMyOb

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
On Tue, Jul 6, 2010 at 10:31 AM, Marcos Douglas wrote: > Better: > > obj1 := nil; > obj2 := nil; > Try >  obj1 := TMyObject.Create; >  obj2 := TMyObject.Create; > >  obj1.DoSomething1; >  obj2.DoSomething2; > finally >  obj1.Free; >  obj2.Free; > end; > > The objectcs are protected. But is boring.

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
On Tue, Jul 6, 2010 at 11:39 AM, Marco van de Voort wrote: > In our previous episode, Andrew Brunner said: >> > obj1 := nil; >> > obj2 := nil; >> > Try >> > ?obj1 := TMyObject.Create; >> > ?obj2 := TMyObject.Create; >> > >> > ?o

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
> Wrong again Andrew. Calling .Free is safe (even if the instance > variable is nil) because internally it checks if the instance exists > before continuing with calling .Destroy on that instance.  Delphi 101. >  ;-) It most certainly is not "safe". LOL. Free calls destroy.. Destroy may contain

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
On Tue, Jul 6, 2010 at 4:41 PM, Graeme Geldenhuys wrote: > On 6 July 2010 19:51, Marcos Douglas wrote: >>> That's the problematic one I think. >> >> Can an exception happen in Free method?!  :-O > > Yes! I often have to debug those in our complex business objects. > You got that right. Which is

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
On Tue, Jul 6, 2010 at 5:04 PM, Graeme Geldenhuys wrote: > I meant is as in it is safe to call MyObj.Free even if MyObj = nil. I > answered based on the explicit question. > > But yes, in your example where MyObj was an instance, the code in the > destructor could still trip you up if it caused a

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
On Tue, Jul 6, 2010 at 5:09 PM, Graeme Geldenhuys wrote: > Even with a try..except, if you call MyObj.Free and it causes an > exception, you are screwed either way and it will always cause a > memory leak. Best is no notify the user some how, or crash out of the > program, or fire the programmer f

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Andrew Brunner
On Tue, Jul 6, 2010 at 8:14 PM, Marcos Douglas wrote: > On Tue, Jul 6, 2010 at 7:14 PM, Andrew Brunner > wrote: >> On Tue, Jul 6, 2010 at 5:09 PM, Graeme Geldenhuys >> wrote: >>> Even with a try..except, if you call MyObj.Free and it causes an >>> exceptio

Re: [fpc-pascal] methods of an object to create others objects

2010-07-07 Thread Andrew Brunner
On Wed, Jul 7, 2010 at 2:09 AM, Graeme Geldenhuys wrote: > Op 2010-07-07 03:32, Martin het geskryf: >> >> And in the 2nd case, mem leaks are no worry => the app is going to be >> closed, mem will be freed by the OS. >>[...snip...] >> >> The whole memory management could be corrupted. Trying to fre

Re: [fpc-pascal] methods of an object to create others objects

2010-07-07 Thread Andrew Brunner
On Wed, Jul 7, 2010 at 8:05 AM, Martin wrote: > > if " obj1.free; " crashes, then yes obj2 is not going to be released. But as > explained in this and my last mail: It should not be attempted to be > released. > Martin, I can't disagree more. I find it completely ludicrous that if obj1.free rais

Re: [fpc-pascal] methods of an object to create others objects

2010-07-07 Thread Andrew Brunner
On Wed, Jul 7, 2010 at 8:37 AM, Graeme Geldenhuys wrote: >> procedure TObj1.Free; >> begin >>  Try >>    Disk1.Unmount; >>  Except >>    On E:Exception do begin >>       // Some case stuff here >>    end; >>  end; >>  Inherited Destroy; >> end; >> > > With the exception of a possible memory leak

Re: [fpc-pascal] methods of an object to create others objects

2010-07-07 Thread Andrew Brunner
On Wed, Jul 7, 2010 at 8:34 AM, Martin wrote: > Had you only read to the end of my mail. You are deliberately ignoring > part of what I wrote and the blame me for the remainder being incomplete? > > I clearly stated that there are cases where "free" can raise a valid > exception, and that the

Re: [fpc-pascal] methods of an object to create others objects

2010-07-07 Thread Andrew Brunner
> Well... I think CGI gateway is a good way. If the real app (FCGI) have > troubles, I can change the URL that the CGI (gateway) uses to call the > real app and to point to another app (in other server, e.g.). What do > you think about it? I think it would be worth discussing what can be done or a

Re: [fpc-pascal] lNet getting the local IP

2010-10-06 Thread Andrew Brunner
I just read the first line in /etc/hosts file. The first entry is the IPv4. On Tue, Oct 5, 2010 at 3:04 PM, Felipe Monteiro de Carvalho wrote: > hello, > > I am searching for a way to get the local IP. I already found examples > with winsock, synapse and indy. Does anyone know how to do that wit

Re: [fpc-pascal] lNet getting the local IP

2010-10-06 Thread Andrew Brunner
On Wed, Oct 6, 2010 at 7:55 AM, Sven Barth wrote: > You'll only find "127.0.0.1" for my computer there... I don't think that > this is a very good solution. Oh well. That makes sense b/c these are servers that I have obtaining the same IP over DHCP. On clients when DHCP is being used with dynami

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
> procedure TBarThread.Execute; > begin >  FFinished := False;    // work-around variable >  while not Terminated do >  begin >    Synchronize(@UpdateProgressBar); >  end; >  FFinished := True;     // work-around variable > end; > What about dropping that loop and put it in UpdateProgressBar TForm

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
This seems like a discussion of semantics more than anything. In an application thread if you say WAITFOR something then the app cannot process messages b/c the execution is put on hold until WAITFOR returns. This is normal behaviour, IMO. So if this is just an exercise, I really don't see a pro

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
poll the Completes to see if they are all true. There are a million ways to accomplish safe thread usage without waitfor... On Fri, Oct 8, 2010 at 8:49 AM, Graeme Geldenhuys wrote: > On 8 October 2010 15:32, Andrew Brunner wrote: >> This seems like a discussion of semantics more than anyt

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
experience problems in the past with this does not mean I won't with a future. ;-) On Fri, Oct 8, 2010 at 9:04 AM, Jonas Maebe wrote: > > On 08 Oct 2010, at 15:57, Andrew Brunner wrote: > >> A better way of achieving this is looking at the collection of threads >> you have.  S

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
On Fri, Oct 8, 2010 at 9:21 AM, Jonas Maebe wrote: > No, the main source of problems is that the cpu may reordering memory > operations resulting in those booleans in the arrays becoming true before > all memory locations written in the thread are visible. The result is that > you may try to use d

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
On Fri, Oct 8, 2010 at 9:52 AM, Jonas Maebe wrote: >> So are you referring to the topic of this conversation regarding data >> flushing?  The notion of creating an index of completions to poll and >> waiting for all the values to turn true as a means to determine actual >> job completion without u

[fpc-pascal] Help getting Lazarus app in Ubuntu to elevate to root and back again

2010-10-08 Thread Andrew Brunner
I'm needing help to take my Lazarus app, elevate process to root (using GUI prompt like GKSU) and I want to drop back down to the user's level after port binding and listening. Ubuntu has port restrictions for low port numbers. I'm developing a platform that happens to use ports for HTTP, XMPP, e

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
Right. But in the case of an array of booleans that will be polled and an exit condition will only be met if all booleans are set to true. The order in which a polling thread sees them as being true has no bearing on the functionality. On Fri, Oct 8, 2010 at 3:07 PM, Paulo Costa wrote: > On 08

  1   2   >