Re: [fpc-pascal] com port using prolific driver
try synaser, its portable across various O.S. and provides a very modern interface. 2011/3/12 Paul Breneman : > John, > >> I'm trying to get data from a device via a serial (com) port, 9600 baud, >> connected via the prolific cable (serial to usb). This allows one to >> connect >> a serial device via a usb port (many new PCs do not have a real serial >> port. >> I've loaded the prolific driver. >> >> Anyone have fpc program that'll work on win xp. > > I have some files here that might help you get started using the SynaSer > package with FPC: > http://www.turbocontrol.com/simpleserial.htm > > -- > Regards, > Paul Breneman > www.dbReplication.com - VCL database replication components > www.TurboControl.com - Hardware and software development services > - Educational programming project for environment monitoring > - Information on using FreePascal for embedded systems > - Support information for the TurboPower open source libraries > ___ > 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
[fpc-pascal] Actor Model implementation in Pascal
This is my attempt at implementing an actor model in freepascal http://code.google.com/p/pascal-actor-model/ This is an very early code. Any help is appreciated. Every communication between thread is done by using messages (wich are itself objects). I am improving the current code a bit so this EXACTLY release maybe dont compiles. If you want to compile the test code, simply create dummy procedure/functions for anything that the compiler complains about not being implemented. The base code works, i am just trying to implement a form of message/object streaming to allow threads to communicate across TCP/IP and not just by using the internal switchboard queues. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Actor Model implementation in Pascal
Am 13.03.2011 22:08, schrieb Jorge Aldo G. de F. Junior: This is my attempt at implementing an actor model in freepascal Never heard of "actor model" yet, but I'll read about it ^^ http://code.google.com/p/pascal-actor-model/ This is an very early code. Any help is appreciated. Every communication between thread is done by using messages (wich are itself objects). I am improving the current code a bit so this EXACTLY release maybe dont compiles. If you want to compile the test code, simply create dummy procedure/functions for anything that the compiler complains about not being implemented. The base code works, i am just trying to implement a form of message/object streaming to allow threads to communicate across TCP/IP and not just by using the internal switchboard queues. Do you mean something like this? http://wiki.lazarus.freepascal.org/MPICH Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Actor Model implementation in Pascal
yes, its a kind of message passing. but mine is in native pascal and i have no intention of making bindings for other languages... its wayyy simpler than mpich too. you just pass TObjects back and forth from threads. (I understand that TCustomMessage is way too restrictive, so i am planing to develop a kind of interface based model, so you can pass arbitrary objects around). it simplyfies thread programming a lot, at a cost of a little overhead. the switchboard (the thing that routes messages between threads) is itself a class factory, so your threads can start/stop other threads (called 'actors" in this context) and send message to them. the default actor implementation is event based, where the class name of the object received triggers an dispatchstr... but i am looking for other ways to deal with message receiving. if you dont like this model you can override TActorThread.Execute and do business your own way... As it is a simple implementation in native pascal, theres no concept of security or whatever. later i can add blowfish encryption to the TCP/IP part of the thing and message authentication using SHA1 (TCP/IP streaming of messages across machines, for this little library "Pascal-Actor-Model", is the reason behind so many questions i've sent to this mailing list about multi-threading, blowfish and SHA1 encryption...) 2011/3/13 Sven Barth : > Am 13.03.2011 22:08, schrieb Jorge Aldo G. de F. Junior: >> >> This is my attempt at implementing an actor model in freepascal >> > > Never heard of "actor model" yet, but I'll read about it ^^ > >> http://code.google.com/p/pascal-actor-model/ >> >> This is an very early code. Any help is appreciated. >> >> Every communication between thread is done by using messages (wich are >> itself objects). >> >> I am improving the current code a bit so this EXACTLY release maybe >> dont compiles. >> >> If you want to compile the test code, simply create dummy >> procedure/functions for anything that the compiler complains about not >> being implemented. >> >> The base code works, i am just trying to implement a form of >> message/object streaming to allow threads to communicate across TCP/IP >> and not just by using the internal switchboard queues. > > Do you mean something like this? http://wiki.lazarus.freepascal.org/MPICH > > Regards, > Sven > ___ > 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] Actor Model implementation in Pascal
Am 13.03.2011 22:30, schrieb Jorge Aldo G. de F. Junior: yes, its a kind of message passing. but mine is in native pascal and i have no intention of making bindings for other languages... its wayyy simpler than mpich too. you just pass TObjects back and forth from threads. (I understand that TCustomMessage is way too restrictive, so i am planing to develop a kind of interface based model, so you can pass arbitrary objects around). it simplyfies thread programming a lot, at a cost of a little overhead. the switchboard (the thing that routes messages between threads) is itself a class factory, so your threads can start/stop other threads (called 'actors" in this context) and send message to them. the default actor implementation is event based, where the class name of the object received triggers an dispatchstr... but i am looking for other ways to deal with message receiving. if you dont like this model you can override TActorThread.Execute and do business your own way... As it is a simple implementation in native pascal, theres no concept of security or whatever. later i can add blowfish encryption to the TCP/IP part of the thing and message authentication using SHA1 (TCP/IP streaming of messages across machines, for this little library "Pascal-Actor-Model", is the reason behind so many questions i've sent to this mailing list about multi-threading, blowfish and SHA1 encryption...) I might look at this once I have a usecase for it (currently I have rather single threaded problems to solve :P ). Thank you for sharing, though. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Actor Model implementation in Pascal
the actor model can accelerate tasks that would be dealt with in singlethreaded fashion... lets suppose that your program needs to read 8 files at the same time, pre-process them, and use their data. you can write an actor that opens the file and pre-process it in your main thread (the program itself, wich is a thread of sorts, even if not being a TThread) you start 8 of those actors and sit in a loop waiting for then to produce a message. your 8 actor instances will, each one, pre-process the data to you. if your end-user happens to have a multi-core processor, the end result is that your 8 actors will finish faster than if you used only one thread to deal with each one of the 8 files... what i mean is that, under current processor technology, the actor model is a way to simplify the usage of threads, without the complexities of locks, semaphores and the like. you just pass messages around, wich, in the case of my little library, are just plain tobject descendents... 2011/3/13 Sven Barth : > Am 13.03.2011 22:30, schrieb Jorge Aldo G. de F. Junior: >> >> yes, its a kind of message passing. >> >> but mine is in native pascal and i have no intention of making >> bindings for other languages... >> >> its wayyy simpler than mpich too. you just pass TObjects back and >> forth from threads. >> >> (I understand that TCustomMessage is way too restrictive, so i am >> planing to develop a kind of interface based model, so you can pass >> arbitrary objects around). >> >> it simplyfies thread programming a lot, at a cost of a little overhead. >> >> the switchboard (the thing that routes messages between threads) is >> itself a class factory, so your threads can start/stop other threads >> (called 'actors" in this context) and send message to them. >> >> the default actor implementation is event based, where the class name >> of the object received triggers an dispatchstr... but i am looking for >> other ways to deal with message receiving. >> >> if you dont like this model you can override TActorThread.Execute and >> do business your own way... >> >> As it is a simple implementation in native pascal, theres no concept >> of security or whatever. >> >> later i can add blowfish encryption to the TCP/IP part of the thing >> and message authentication using SHA1 >> >> (TCP/IP streaming of messages across machines, for this little library >> "Pascal-Actor-Model", is the reason behind so many questions i've sent >> to this mailing list about multi-threading, blowfish and SHA1 >> encryption...) > > I might look at this once I have a usecase for it (currently I have rather > single threaded problems to solve :P ). Thank you for sharing, though. > > Regards, > Sven > ___ > 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