Re: [fpc-pascal] Amazon S3

2013-03-21 Thread Michael Schnell
Of course Android is a rather hot topic in the fpc and Lazarus developer's forums. There are pages in the fpc / Lazarus Wiki on Android. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] How To write an enumerator for trees

2013-03-21 Thread Michael Schnell
On 03/21/2013 04:11 AM, Xiangrong Fang wrote: Now I don't know how to write an enumerator for it. ... Syntax or algorithm ? -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How To write an enumerator for trees

2013-03-21 Thread Michael Schnell
I have read this. My question is not about how to write enumerator, but how to do this for TREEs Xiangrong Fang: Please anser to a message instead of creating a new thread ! There might be no necessary sort order of a tree. So you first need to invent a usable sort order and set up the

Re: [fpc-pascal] Amazon S3

2013-03-22 Thread Michael Schnell
On 03/21/2013 11:58 AM, Sven Barth wrote: Ehm... you do know that Amazon S3 Samsung Galaxy S3? Amazon S3 is the cloud storage solution by Amazon. See also: http://en.wikipedia.org/wiki/Amazon_S3 If you see both, you can easily tell them apart :-) :-) -Michael

Re: [fpc-pascal] Windows on ARM, how fast it can be implemented?

2013-03-27 Thread Michael Schnell
On 03/27/2013 09:20 AM, Sven Barth wrote: you need to jailbreak the Windows RT device to be able to run unsigned desktop applications. Never buy such a system ! I am not even sure if this is legal in Europe I.e. you are the owner of the hardware. -Michael

Re: [fpc-pascal] Windows on ARM, how fast it can be implemented?

2013-03-27 Thread Michael Schnell
On 03/27/2013 10:00 AM, Sven Barth wrote: That's why a complete new OS port would be necessary to support WinRT... A new OS would be more appropriate :-P . -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Windows on ARM, how fast it can be implemented?

2013-03-27 Thread Michael Schnell
On 03/27/2013 10:09 AM, Sven Barth wrote: I'm not a fan of Windows 8 either, ... Is Win 8 on normal PCs crippled in a similar manner or is only the ARM version affected ? -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Windows on ARM, how fast it can be implemented?

2013-03-27 Thread Michael Schnell
On 03/27/2013 10:16 AM, Sven Barth wrote: Only the ARM version. Though I'd not want to use the PC version either :P I'm planning a (kind of) embedded device that need high performance (quad core, 64 Bit, 4 Gig RAM, SSD). I need to use Windows, because of the 3rd party software I need to

Re: [fpc-pascal] Windows on ARM, how fast it can be implemented?

2013-03-27 Thread Michael Schnell
Thanks a lot for the answers to this very off-topic question. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] socket timeout

2013-04-16 Thread Michael Schnell
On 04/16/2013 11:26 AM, Xiangrong Fang wrote: How can I set the connection and read/write timeout when using socket in free pascal? I seem to remember that synapse can do this. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] How to detect connection status of a socket

2013-04-22 Thread Michael Schnell
On 04/22/2013 02:23 PM, Xiangrong Fang wrote: How do I tell if a socket is still connected or not? The connected State of a TCP/IP socket is a rather complex issue. A TCP IP connection is either on or off. if it gets disconnected it is dead and can't be reactivated but by a new open. As

Re: [fpc-pascal] RAD Studio XE4 Released?

2013-04-24 Thread Michael Schnell
Seemingly no support for Linux and Android. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Odyssey: SSockets and Threads.

2013-04-25 Thread Michael Schnell
On 04/24/2013 10:09 PM, silvioprog wrote: There are a multi-thread example using SSockets in FPC? It should be no problem at all to use sockets in Threads (native or via lnet or Synapse. Of course if using threads, you will see the problem of inter-thread communication and/or

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-25 Thread Michael Schnell
On 04/24/2013 10:21 PM, silvioprog wrote: (no Synapse, LNet or Indy please, I need to use native code) Indy does provide support for threading (as does AsyncPro, the Socket flavor of which could be of interest here). But I don't know if it's easy to use Indy with Lazarus, and I know that

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-25 Thread Michael Schnell
On 04/25/2013 05:15 PM, silvioprog wrote: Indy has a feature (OnDisconnect property) that notifies you when a client is not online. Nope. It notifies you when the other site actively and successfully does a disconnect and your site correctly understands the notification. Not correctly

Re: [fpc-pascal] MS DOS 8086 compiler?

2013-04-29 Thread Michael Schnell
On 04/27/2013 02:11 PM, Bart wrote: On 4/27/13, Reinier Olislagers reinierolislag...@gmail.com wrote: Noticed that an 8086 branch was merged to fpc trunk. Is it time to get out some 5.25 diskettes[1]? [1] Shame I dumped all the accompanying hardware long ago ;) Perhaps break out DOSBOX ;) I

Re: [fpc-pascal] AT-SPI fpc compatible ?

2013-05-08 Thread Michael Schnell
On 05/08/2013 10:07 AM, Fred van Stappen wrote: Toc, toc, toc, is there anybody here ? You hitchhiked a running forum thread. Nobody likes to answer on such indecent posts. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] AT-SPI fpc compatible ?

2013-05-08 Thread Michael Schnell
On 05/08/2013 10:17 AM, Sven Barth wrote: Except to tell the writer about his/her indecency :) ... if (s)he insists :-) -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: http://www.freepascal.org/future.var

2013-06-05 Thread Michael Schnell
On 06/05/2013 09:29 AM, Reinier Olislagers wrote: Jonas working on an LLVM backend - great (he's surely quite knowledgeable especially after the Java work) Does LLVM (e.g for a C frontend) provide code generation to Java Byte code out of the box ? Or are these two backends completely

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-12 Thread Michael Schnell
On 06/08/2013 05:35 PM, Sven Barth wrote: as I found /usr/mips-linux-gnu/bin folder contains the following files: ar as ld nm objcopy objdump ranlib strip Ok, then add the following option: BINUTILSPREFIX= Ooops ??`? The file names do not look like cross - binutils, but like native ones

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-12 Thread Michael Schnell
On 06/09/2013 05:43 PM, Dennis Poon wrote: My binutils as , ld etc files are located at /usr/mips-linux-gnu/bin/ ... first try to start these files form the command-line. (e.g. ld -v) If they don't work decently (which I do suppose), you need different files. -Michael

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-12 Thread Michael Schnell
On 06/12/2013 11:13 AM, Dennis Poon wrote: Michael, I just typed ld -v and it replied: GNU ld (GNU Binutils for Debian) 2.22 You'd better do gcc -v This should output (among others) a line starting Target: Same will state the architecture and be something like Target: MIPS-linux -Michael

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-12 Thread Michael Schnell
On 06/12/2013 12:01 PM, Dennis Poon wrote: But I am working on a i386 Debian box. I typed gcc -v and it just says Target: i486-linux-gnu but isn't that normal? Of course this is normal. what is not normal is that a cross-gcc (which is part of binutils) is supposed to be named just gcc. (It

Re: [fpc-pascal] can someone please email me a zipped hello world binary program MIPS big endian for testing on my MIPS hardware?

2013-06-13 Thread Michael Schnell
On 06/12/2013 05:29 PM, Dennis Poon wrote: My MIPS hardware is too slow to run a compiler. Is the project to be compiled so big, that it will take hours to compile ? -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] can someone please email me a zipped hello world binary program MIPS big endian for testing on my MIPS hardware?

2013-06-13 Thread Michael Schnell
On 06/13/2013 02:17 PM, Dennis Poon wrote: I tested the mipseb helloworld provided by Mark (Thanks again) but the result is the same as my own helloworld, on running, the whole shell just froze. did you try to test a heloworld done in C, using the cross toolchain you use ? -Michael

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

2013-06-19 Thread Michael Schnell
On 06/18/2013 02:35 PM, Marcos Douglas wrote: Today I call WriteXMLFile(Doc, AFileName) but I have XML with 5G, 10G.. 30G... What the best way to save line by line? Why not push it through a stream compressor ? -Michael ___ fpc-pascal maillist -

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

2013-06-19 Thread Michael Schnell
On 06/19/2013 12:14 PM, Graeme Geldenhuys wrote: XML is by far the worst format anybody could choose Yep. bus as it is Standard some need to Thus IMHO the way to go is to have the basic XML component work on linked lists with binary data in memory and only when loading/saving use an

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

2013-06-19 Thread Michael Schnell
On 06/19/2013 01:31 PM, Michael Van Canneyt wrote: What do you think TXMLDocument and XMLWriter do ? Exactly this. In fact I did thinks this until you stated the source XML is completely in memory which misled me to the assumption that the XML text would be in memory (the binary list is

Re: [fpc-pascal] How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-03 Thread Michael Schnell
Synaser: http://synapse.ararat.cz/doc/help/synaser.html -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Michael Schnell
On 07/03/2013 06:36 PM, Dennis Poon wrote: Can you give me some pointer on directly using UART? I need to implement half-duplex using UART for rs-485 protocol. In a Linux system, accessing the hardware by user code is strictly discouraged, at least whenever interrupts are involved (as with

Re: [fpc-pascal] How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Michael Schnell
On 07/04/2013 11:16 AM, Dennis Poon wrote: am afraid the bcm2835, the Soc of Raspberry Pi (the hardware I have to use) does not provide this hardware support :-( It states that it does not even support interrupt. Polling is the only way for events :-( As already discussed here the RPI is

Re: [fpc-pascal] How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Michael Schnell
On 07/04/2013 12:08 PM, Dennis Poon wrote: I have an ATEN usb-to-serial cable (UC-232A) b That is not suitable. There are dedicate RS485 Adapters (many of those also support RS422 mode (differential full duplex) ). But the problem might be that they don't come with a Linux driver for ARM.

Re: [fpc-pascal] (OT) Re: How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Michael Schnell
On 07/04/2013 12:52 PM, Lukasz Sokol wrote: For RS485 adaptation, use a MAX232 like chip (to convert +-12 to ttl) and then a RS485 transceiver chip; If you want to create hardware anyway, better use a PIC24 (pr PIC32) chip with USB plus a RS485 tranceiver chip. So you get rid of the ATEN

Re: [fpc-pascal] How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Michael Schnell
On 07/04/2013 03:55 PM, Luca Olivetti wrote: Since the driver for prolific/ftdi usb to serial bridge (which is the one these adapters use) is in the kernel since, like, forever, it will work with any architecture. I do know that there is a standard for how many USB-to-serial adapters work.

Re: [fpc-pascal] Re: (OT) Re: How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-05 Thread Michael Schnell
On 07/04/2013 05:24 PM, Mark Morgan Lloyd wrote: In any event, my experience is that USB-serial converters are very poor Same here ! Standard USB stuff is not really suitable for embedded use. Due to electrical disturbances the data on the USB line can be corrupted and the link between

Re: [fpc-pascal] Console Encoding in Windows (Local VS. UTF8)

2013-07-09 Thread Michael Schnell
On 07/09/2013 11:02 AM, Noah Silva wrote: I convert it to UTF8 before displaying it Not a good idea. The FPC developers are right now busy implementing the new Delphi Strings. This _could_ mean that the application programmer can use any encoding (such as multiple different ANSI

Re: [fpc-pascal] Console Encoding in Windows (Local VS. UTF8)

2013-07-09 Thread Michael Schnell
On 07/09/2013 12:55 PM, Marco van de Voort wrote: Well, the main reason is not FPC, but Windows. UTF8 in Windows on _API_ level is simply not a good idea You are absolutely right. Here, in theory the Lazarus LCL and the FPC RTL could help by by providing an application programmer API that

Re: [fpc-pascal] Re: JVM backend and language restrictions

2013-07-12 Thread Michael Schnell
On 07/11/2013 07:06 PM, waldo kitty wrote: i like the what links here links but have never seen a this links where one that shows the other pages the current one links to... you gotta already be on the page to find out what links to it but ya can't go the other way around... Funny that the

Re: [fpc-pascal] Strings

2013-07-16 Thread Michael Schnell
On 07/16/2013 12:17 PM, Carsten Bager wrote: If you look at my example underneath, I depend on that a dynamic string always is assigned memory space in one connected block. As the compiler allows for assigning a string to a pchar, the strings need to be compatible to C strings. Thus: - The

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Michael Schnell
Synapse makes handling of sockets rather easy. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Strings

2013-07-22 Thread Michael Schnell
On 07/20/2013 01:19 PM, Noah Silva wrote: Wait, I'm slightly confused. It seems people are talking about two different things: 1. Continuous memory as seen by the program running. 2. Actually physically contiguous memory. If you don't do hardware related things like DMA, you don't need to

Re: [fpc-pascal] Cross compiling Windows to arm-linux

2013-07-23 Thread Michael Schnell
On 07/22/2013 09:52 PM, John Hansen wrote: I am working on an API library for the new LEGO MINDSTORMS EV3 programmable brick. The brick is running Linux on a TI AM1808 ARM chip. Does the EV3 provide any graphic ? If not, you will need to set up a remote debugging environment, best using

Re: [fpc-pascal] is there a circular queue implementation already in FPC or FCL?

2013-07-29 Thread Michael Schnell
I know abouit these (e.g.): * Module: Parallel lockfree Fifo MPMC Queue * Version: 1.12 * Author: Amine Moulay Ramdane * and * modified and enhanced by Amine Moulay Ramdane * Company: Cyber-NT Communications * * Email:

Re: [fpc-pascal] Console Encoding in Windows (Local VS. UTF8)

2013-07-29 Thread Michael Schnell
On 07/29/2013 07:36 AM, Noah Silva wrote: Using UTF16 for internal string handling is a sensible option. It depends. UTF-16 needs more memory used Linux OS API in most cases is 8 Bit, while Windows OS API is 16 bit Conversions are very expensive. If you need to import export much data but

Re: [fpc-pascal] Console Encoding in Windows (Local VS. UTF8)

2013-07-29 Thread Michael Schnell
On 07/29/2013 12:12 PM, Mattias Gaertner wrote: fpc is not moving to Delphi strings. That would break all compatibility. This is exactly what Delphi did :-( . It will support both. There might be an appropriate compiler switch. But what about the RTL-Interface like the type StringList

Re: [fpc-pascal] Console Encoding in Windows (Local VS. UTF8)

2013-07-30 Thread Michael Schnell
On 07/30/2013 04:29 AM, Noah Silva wrote: No, UTF16 only needs more memory if most of the text is ASCII. It actually uses less than UTF8 in the average case for Japanese, for example. Of course you are right here. Linux OS API in most cases is 8 Bit, I assume by 8bit, you mean

Re: [fpc-pascal] mipsel status/direction?

2013-08-05 Thread Michael Schnell
On 08/04/2013 04:52 PM, Reinier Olislagers wrote: 1. if people are using the mipsel code already/how suitable it is for console (non-db, perhaps network) programs On the long run, in fact I am considering to do an embedded project with PIC32 (which is a MIPS CPU), and here there will be no

Re: [fpc-pascal] mipsel status/direction?

2013-08-05 Thread Michael Schnell
On 08/04/2013 05:39 PM, Sven Barth wrote: At least the nightly test suite results for MIPSel range from around 20 to around 60 failures which puts the target into a quite common area of other targets That does sound promising ? BTW.: is Zero such errors a requirement for a release version ?

Re: [fpc-pascal] Library callback : how do I do that?

2013-08-08 Thread Michael Schnell
On 08/08/2013 12:34 PM, Lukasz Sokol wrote: Hello, I am making a Pascal wrapper for a library, which states in its API description: Note that the Callback function will be called from an independent child thread, not from the ApplicationÂ’s Window thread. It should not therefore be used to

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Michael Schnell
On 08/08/2013 01:15 PM, Lukasz Sokol wrote: but I would then need to make the wrapper object aware of the Application or its forms then? This is provided by Runtime Packages with Delphi. Lazarus does not support Runtime packages (yet) so you are quite on your own to implement something

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Michael Schnell
On 08/08/2013 02:41 PM, Lukasz Sokol wrote: Very well then, thanks :) I suggest that - to exclude problems that might be imposed by some external non-Lazarus and software not by yourself - you do a test creating a combination of a Lazarus Application and a Lazarus-made dll (and/or so) that

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Michael Schnell
On 08/09/2013 10:57 AM, Henry Vermaak wrote: You seem to think that Lukasz is making a library, This is what I understood from self contained wrapper unit. But maybe I am wrong. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Michael Schnell
On 08/09/2013 11:02 AM, Sven Barth wrote: Michael, it seems that you understood Lukasz wrong, Yep. I thought he intents to do a dll himself, but maybe I am wrong. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Compiling to Java

2013-08-12 Thread Michael Schnell
Right now, the reach of fpc (and Lazarus) Write once compile everywhere ) is being extended to Android (e.g. by having fpc compile to Dalvik). AFAIK, compiling to Android Dalvik already woks rather well. IIRC, here, first fpc compiles to Java byte code and then this is converted to Dalvik

Re: [fpc-pascal] Compiling to Java

2013-08-12 Thread Michael Schnell
On 08/12/2013 10:15 AM, Sven Barth wrote: Can the Lazarus GUI designer be used to do the GUI of such (Desktop) applications ? No. In a perfect world, Write once compile everywhere would suggest this (and Web Applications) as a viable goal. But it might be difficult or completely impossible

Re: [fpc-pascal] Compiling to Java

2013-08-12 Thread Michael Schnell
On 08/12/2013 10:15 AM, Sven Barth wrote: For more information please take a look here: http://wiki.freepascal.org/FPC_JVM here I see: It is undoubtedly possible to set up Eclipse so that it will debug FPC-generated Java class files. Anyone who figures out the details, feel free to describe

Re: [fpc-pascal] Compiling to Java

2013-08-12 Thread Michael Schnell
On 08/12/2013 11:46 AM, Sven Barth wrote: I don't know whether GDB is capable of debugging Java applications. see http://gcc.gnu.org/java/gdb.html So it *might* be viable, but I'd not say that it is planned for now. Again to be discussed the other list. -Michael

Re: [fpc-pascal] math round vs banker's round

2013-08-14 Thread Michael Schnell
On 08/14/2013 09:38 AM, Sven Barth wrote: - 0.5 does not always have a direct representation as a floating point value and thus internally it might be 0.499 or something like that and thus it will be rounded to 0.4 (see also http://bugs.freepascal.org/view.php?id=24374 ) Hmmm AFAIU, in

Re: [fpc-pascal] math round vs banker's round

2013-08-14 Thread Michael Schnell
On 08/14/2013 10:42 AM, Vincent Snijders wrote: For any digit x, it still can be represented exactly in binary representation ... Nope, As the bit count of the mantissa is limited to - say - n , with x 2**(n-1) you will not have an exact representation of x.5. -Michael

Re: [fpc-pascal] Access site from app with login and password using http

2013-08-29 Thread Michael Schnell
On 08/28/2013 10:07 PM, Osvaldo Filho wrote: Is there any example to access information on web site that requires authentication with login and password in form using http from a Lazarus application? I used Synapse to access the web site of an embedded controller. Using FireFox with a

Re: [fpc-pascal] has anyone successfully written an app for iOS using Free Pascal and got it approved by Apple Appstore?

2013-08-29 Thread Michael Schnell
AFAIK, the current Delphi XE can do native code apps for iOS (while the next release is supposed to be able to do apps for Android, as well), I don't see why other native code apps should be banned. -Michael ___ fpc-pascal maillist -

Re: [fpc-pascal] BeagleBone

2013-08-29 Thread Michael Schnell
On 08/29/2013 12:44 PM, Rogério Martins wrote: Hi ! Have anyone programmed in lazarus to a BeagleBone board ? A friend of mine did (with a little help from myself). Cross compiling and remote debugging is not that easy, so he installed Lazarus on the BeagleBone and it works fine. To

Re: [fpc-pascal] has anyone successfully written an app for iOS using Free Pascal and got it approved by Apple Appstore?

2013-08-30 Thread Michael Schnell
On 08/30/2013 01:23 PM, Dennis Poon wrote: No wonder there are many categories in which Android has Free (or paid) apps but IOS does not. AFAIK, Apple keeps a decent share of the price of any APP sold in the shop. So it's no wonder they are not at all interested in free Apps. -Michael

Re: [fpc-pascal] lnet for TCP daemon

2013-09-12 Thread Michael Schnell
On 09/11/2013 07:22 PM, Mark Morgan Lloyd wrote: I'd normally use a thread for this, but I've already got lnet's telnet client running in the program so would rather stick to the same library if possible. AFAIK, Lnet does not do threading internally (as does AsyncPro or - partly - Indy),

Re: [fpc-pascal] lnet for TCP daemon

2013-09-12 Thread Michael Schnell
On 09/12/2013 12:47 PM, Mark Morgan Lloyd wrote: I've concluded that using a thread is, in fact, preferable True. It's a pity that Synapse and friend (especially SynaSer) does does not implement internal threads that throw appropriate events in the Main Thread when something comes in (or

Re: [fpc-pascal] lnet for TCP daemon

2013-09-12 Thread Michael Schnell
On 09/12/2013 01:28 PM, Michael Van Canneyt wrote: The very reason I use Synapse is that it DOES NOT use threads. Synapse is simple to use. Keep it so. Of course I don't vote for Synapse always using threads, but to provide _additional_ functions / objects (maybe units) that work similar to

Re: [fpc-pascal] lnet for TCP daemon

2013-09-12 Thread Michael Schnell
On 09/12/2013 02:45 PM, Marco van de Voort wrote: E.g. TComport only starts an helper thread if you register receive events. If you do not, you can use it in a select/waitformultiple like way in a thread. Sounds good. I'm going to test this ASAP. -Michael

Re: [fpc-pascal] lnet for TCP daemon

2013-09-13 Thread Michael Schnell
On 09/13/2013 06:06 AM, wkitt...@windstream.net wrote: would this hamper or cause problems with normal non-gui programs using the library? 1) This feature of course should only be provided additionally to the functions we know and love. 2) Other than the work-alike

Re: [fpc-pascal] lnet for TCP daemon

2013-09-16 Thread Michael Schnell
On 09/13/2013 07:08 PM, Sven Barth wrote: As we have already written in some previous mails to there is a global event procedure to wake up the main thread that is triggered when something is queued. The LCL uses this already and other programs could use a TEvent or whatever. Could you

Re: [fpc-pascal] lnet for TCP daemon

2013-09-16 Thread Michael Schnell
On 09/16/2013 11:14 AM, Marco van de Voort wrote: If you mean integrate with your own eventloop, then yes, make sure that your idle event in your eventloop calls checksyncrhonize OK, so checksynchronize() is the correct name of the RTL-provided function that pulls the event queue. (Sorry that

Re: [fpc-pascal] lnet for TCP daemon

2013-09-16 Thread Michael Schnell
On 09/16/2013 01:22 PM, Marco van de Voort wrote: The non-LCL one must simply call checksynchronize as the blocking part of the mainthread's eventloop. Thus, my wish already seems to be fulfilled. Great ! there is no LCL dependence in theory, but other eventloop systems might assume they

Re: [fpc-pascal] lnet for TCP daemon

2013-09-16 Thread Michael Schnell
On 09/16/2013 02:03 PM, Sven Barth wrote: CheckSynchronize has a timeout parameter: http://www.freepascal.org/docs-html/rtl/classes/checksynchronize.html Great ! Maybe the docs should be updated and mention TThread.Queue, which for me is most important, as it - finally - allows for decent

Re: [fpc-pascal] lnet for TCP daemon

2013-09-16 Thread Michael Schnell
On 09/16/2013 02:01 PM, Sven Barth wrote: WakeMainThread Thanks for the pointer. I'll take another look there. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] lnet for TCP daemon

2013-09-16 Thread Michael Schnell
On 09/16/2013 02:01 PM, Sven Barth wrote: ( http://www.freepascal.org/docs-html/rtl/classes/wakemainthread.html ). IIRC, TThread.Queue does this, as well. Thus updating this page might be appropriate... Thanks, -Michael ___ fpc-pascal maillist -

Re: [fpc-pascal] lnet for TCP daemon

2013-09-16 Thread Michael Schnell
Thanks for the clear information. Enhanced by the knowledge about TThread.queue It will allow me to do some nice tricks. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] lnet for TCP daemon

2013-09-18 Thread Michael Schnell
Conclusion: Thus we could draft a living noGUI TCustomApplication sibling (aka LCL WidgetType), that allows for firing MainThread Events triggered from (a newly implemented) TTimer, TThread.Queue(), TThread.Synchronize(), TApplication.QueueAsyncCall() and the legacy windowish PostMessage() -

Re: [fpc-pascal] lnet for TCP daemon

2013-09-18 Thread Michael Schnell
On 09/18/2013 10:05 AM, Mattias Gaertner wrote: On Wed, 18 Sep 2013 09:32:54 +0200 Michael Schnell mschn...@lumino.de wrote: [...] Instead I was told that I should look at the LCL source code and that in Windows, the Event queuing mechanism is done by Windows itself and in Linux it is done

Re: [fpc-pascal] lnet for TCP daemon

2013-09-18 Thread Michael Schnell
On 09/18/2013 10:38 AM, Mattias Gaertner wrote: On Wed, 18 Sep 2013 10:25:43 +0200 Michael Schnell mschn...@lumino.de wrote: What non-GUI events - additionally to the events I mentioned - would be needed for the whole event system of the LCL ? For example PostMessage can send messages

Re: [fpc-pascal] lnet for TCP daemon

2013-09-18 Thread Michael Schnell
On 09/18/2013 01:26 PM, Marco van de Voort wrote: While there is sigalarm, but can you have multiple independent timers in an application that way? I don't know. We would need to ask mse. -Michael ___ fpc-pascal maillist -

Re: [fpc-pascal] lnet for TCP daemon

2013-09-18 Thread Michael Schnell
On 09/18/2013 05:03 PM, Sven Barth wrote: TThread.Queue is a rather new addition. Delphi 2009 if I'm correct. So that's definitely not very early. OK, at least four years ;-) . I have Turbo Delphi. Here it is implemented but not to be found in the help. -Michael

Re: [fpc-pascal] bridging an C++ shared library statically

2013-09-23 Thread Michael Schnell
On 09/21/2013 04:04 PM, Xiangrong Fang wrote: Hi All, I need to use a C++ so file in FreePascal AFAIK, you only can use C++ libraries in Pascal, if the functions for the mutual interface are flat C function (i. e. ANSI C functions not using any C++ classes). Of course, on top of this in

Re: [fpc-pascal] Status of UTF8

2013-09-30 Thread Michael Schnell
On 09/28/2013 02:51 PM, 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

Re: [fpc-pascal] how to speed up lazarus compilation and debugging

2013-10-01 Thread Michael Schnell
On 09/30/2013 06:33 PM, m...@rpzdesign.com wrote: especially an SSD solid state disk drive. Really ? I don't suppose all necessary files will exceed the cache of a decently equipped Linux PC. -Michael ___ fpc-pascal maillist -

Re: [fpc-pascal] how to speed up lazarus compilation and debugging

2013-10-01 Thread Michael Schnell
On 10/01/2013 11:16 AM, Mattias Gaertner wrote: Multi-GUI has nothing to do with the compiler. But with project compile and link time, as the LCL (including the unit interface sections) is more complex because of that. -Michael ___ fpc-pascal

Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Michael Schnell
On 09/30/2013 12:25 PM, Graeme Geldenhuys wrote: All functionality works identical on all platforms, Which, regarding look and feel, does have pros and cons, depending on the users targeted. -Michael ___ fpc-pascal maillist -

Re: [fpc-pascal] fpGUI documentation

2013-10-02 Thread Michael Schnell
Graeme, as we are at this issue: A person in the German Lazarus forum might want to use fpGUI with OpenGL as a Backend. Is this viable ? Any chance ? Thanks, -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] use cwstring or fpwidestring on linux

2013-10-07 Thread Michael Schnell
On 10/04/2013 11:02 PM, Sven Barth wrote: If you want to share Unicode- or AnsiStrings between library and application you need to use a common memory manager. For example you could use unit cmem as one of the first units of both programs. It will work on Unix based systems and *should* work

Re: [fpc-pascal] free pascal and game consoles

2013-10-09 Thread Michael Schnell
On 10/09/2013 03:41 PM, Sven Barth wrote: One needs to port FPC for these platforms. For Wii, GameCube, Nintendo DS and GameBoy Advance this was already done, but noone did yet start a PlayStation or Xbox port. AFAIK: PS3 is a multi-Core PPC architecture with propriety display hardware.

Re: [fpc-pascal] Pointer to a const char

2013-11-05 Thread Michael Schnell
On 11/04/2013 02:18 PM, Alexander wrote: How can I describe a pointer to a constant char in FreePascal? For example this C function: int some_func(const char *arg, ...); My guess in FreePascal is this(with ctypes unit): function some_func(const arg: pcchar): cint; cdecl; external; A

Re: [fpc-pascal] MSElang, the future compiler for MSEide+MSEgui

2013-11-06 Thread Michael Schnell
On 11/06/2013 09:14 AM, Martin Schreiber wrote: if you like to discuss the matter. IMHO this theme is complex enough to start another mailing list instead of discussion it here. There already has been a (IMHO very interesting) discussion in the German Lazarus forum that in fact does have an

Re: [fpc-pascal] MSElang, the future compiler for MSEide+MSEgui

2013-11-06 Thread Michael Schnell
On 11/06/2013 10:46 AM, Martin Schreiber wrote: Please do not discuss MSElang here, I will not answer unless Jonas requests it. Please use the mentionend mailing list The post by Jonas seems to be private, as I don't see it in the list. What did he suggest ? -Michael

Re: [fpc-pascal] Is there an industry language for specifying for declaring GUIs in JSON?

2013-12-01 Thread Michael Schnell
On 12/01/2013 04:57 PM, vfclists . wrote: Are there some industry standards for specifying GUIs in JSON? As this is yet another post seeming to target a remote gui to be attached via a data stream: - Martin (mse), any news about ifi ( -

Re: [fpc-pascal] Is there an industry language for specifying for declaring GUIs in JSON?

2013-12-01 Thread Michael Schnell
On 12/02/2013 08:50 AM, Michael Schnell wrote: ... later: see a message (11/39/13: The future of the Desktop) by martin in the lazarus-devel mailing list. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] MD5 decryption?

2013-12-12 Thread Michael Schnell
On 12/11/2013 05:54 PM, silvioprog wrote: Go to: http://md5decryption.com http://md5decryption.com/ In Please input the MD5 hash that you would like to be decrypted: field, put: 7db4a8dae498d1b4686ebd1f79326602 See the result in Decrypted Text: field. Nice ! So you obviously can compress

Re: [fpc-pascal] Efficient millisecond timestamp

2014-01-10 Thread Michael Schnell
On 01/10/2014 09:56 AM, Mark Morgan Lloyd wrote: What's the most efficient and portable way of getting a millisecond timestamp. Do you run some realtime OS ? Otherwise millisecond timestamp don't make much sense, as the OS might delay you application for a second now and then. -Michael

[fpc-pascal] respawn a daemon in Linux

2014-01-14 Thread Michael Schnell
Hi Linux Experts. Since years I am running an fpc program as a kind of daemon on a PC Linux server. I simply defined a respawn line in /etc/inittab and with any start of the server, the program happily automatically runs as a daemon. Now I migrated the the PC Linux server to an ARM based

Re: [fpc-pascal] respawn a daemon in Linux

2014-01-14 Thread Michael Schnell
On 01/14/2014 11:26 AM, Mark Morgan Lloyd wrote: Does it exit in a sufficiently-controlled state Yep. If nothing completely unexpected happens, it writes a message in a log file and cleanly exits. Of course there _might_ be memory leaks, an unexpected kill signal or other queer stuff that

Re: [fpc-pascal] respawn a daemon in Linux

2014-01-14 Thread Michael Schnell
On 01/14/2014 11:32 AM, Michael Van Canneyt wrote: #!/bin/bash while [ 1 ]; do yourprogram youroptions done I feel this will start multiple parallel copies of the program and not wait until the previous one dies. Moreover I understand that this loop will never exit. Hence I can't use it

Re: [fpc-pascal] respawn a daemon in Linux

2014-01-14 Thread Michael Schnell
On 01/14/2014 11:35 AM, Tony Whyman wrote: Michael, This should be a classic Unix program with two separate parent and child processes, where the child process runs your program and the parent is responsible for monitoring the child and respawning it when it stops. The basic algorithm of the

Re: [fpc-pascal] respawn a daemon in Linux

2014-01-14 Thread Michael Schnell
On 01/14/2014 11:55 AM, Michael Van Canneyt wrote: I had thought about introducing this when doing the implementation, but decided against it. Thanks for the warning. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

  1   2   3   4   5   >