Re: [fpc-pascal] Be careful of too many features

2022-05-30 Thread Brian via fpc-pascal
space that you could just about debug 'Hello, world' and that was it. Hopefully Whitesmiths improved in the couple of years before you started with it, or there was a better implementation if you used it on a machine other than a PDP-11. Brian. _

[fpc-pascal] Linux Yad

2021-06-06 Thread Brian via fpc-pascal
Has anyone called Yad (linux file manager) as an external program form a main program ? If so can you provide an example of how to do it and retrieve the selected file name? Thanks Brian -- Sent from: http://free-pascal-general.1045716.n5.nabble.com

Re: [fpc-pascal] 50 years of Pascal, by the the author himself

2021-05-12 Thread Brian via fpc-pascal
to assume that VAX Pascal is still alive and kicking, albeit very much a minority compiler. Brian. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Sending Hex codes over TCP/IP

2020-09-13 Thread Brian via fpc-pascal
Use Ararat Synapse . http://synapse.ararat.cz/doc/help/ Unit blcksock Class TTCPBlockSocket Then send and receive byte arrays using : Public function SendBuffer(Buffer: TMemory; Length: Integer): Integer; override; Public function RecvBuffer(Buffer: TMemory; Len: Integer): Integer; override;

Re: [fpc-pascal] How to implement a circular buffer object in pascal?

2020-09-08 Thread Brian via fpc-pascal
>Bo, > >Most of the users on this forum have never interfaced with hardware , as you >can see from the responses. Those who have interfaced with hardware have >developed circular buffers which they know work , and they reuse them again >and again. I did this about 10 years ago when working on a P

Re: [fpc-pascal] How to implement a circular buffer object in pascal?

2020-09-07 Thread Brian via fpc-pascal
send you code snippets showing exactly how to implement the circular buffer. Regards Brian -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.or

Re: [fpc-pascal] Writing to a drive which may be spun down

2019-11-21 Thread Brian
On 11/21/19 2:38 PM, Winfried Bartnick wrote: <...> > > writeln (txt,'I''m so tired ...'); > closeFile(txt); > io := ioResult; Thanks Winni, that sounds the sort of idea I'm looking for... Brian. ___

Re: [fpc-pascal] Writing to a drive which may be spun down

2019-11-21 Thread Brian
On 11/21/19 7:12 AM, wkitt...@windstream.net wrote: > On 11/21/19 1:16 AM, Brian wrote: >> My question: Is there a standard method for handling this situation, >> i.e. making sure that a drive has not spun down, or is it just a case >> of writing a wrapper round the write func

[fpc-pascal] Writing to a drive which may be spun down

2019-11-20 Thread Brian
iting a wrapper round the write function and handling the 'No such file' error with a wait and a retry? Thanks, Brian. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] USB Human Interface Devices

2019-08-29 Thread Brian
Yes , and it works well on Linux. I use it on a circular (ring) buffer where the main program reads data from the circular buffer and increments the read index while a totally random thread reads data from an incoming Ethernet UDP , serial port or a custom hardware port , writes to the circular bu

Re: [fpc-pascal] USB Human Interface Devices

2019-08-29 Thread Brian
A bit of clarification .. Also rather than using critical sections , use syncobs to ensure that you are not trying to /SIMULTANEOUSLY/ read and write to the same USB address or your data memory. Try using an Ethernet UDP connection to simulate the USB connection as it may illuminate an issue in

Re: [fpc-pascal] USB Human Interface Devices

2019-08-29 Thread Brian
A few general thoughts. Having been in similar situations when dealing with hardware interfaces .. the hardware is what it is .. and annoying as it is you have to work around it , as the hardware isn't going to change. It seems you have two problems 1) the USB hardware and 2) your program , in whi

Re: [fpc-pascal] USB Human Interface Devices

2019-07-25 Thread Brian
Try the libusb library Free Pascal interface .. but be aware of his license requirements. It works well. http://johann-glaser.blogspot.com/2012/07/libusb-for-pascal.html -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal ma

Re: [fpc-pascal] USB Human Interface Devices

2019-07-25 Thread Brian
If you can find a controller with an Ethernet input then Synapse is simple and works well. I have used it for RS-232 and Ethernet , but it claims to work with USB http://www.ararat.cz/synapse/doku.php/start -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___

Re: [fpc-pascal] USB Human Interface Devices

2019-07-25 Thread Brian
If you can find a controller with an Ethernet input , the Synapse is simple to use and works well. http://www.ararat.cz/synapse/doku.php/start It also works well for RS-232. It also claims to work with USB but I haven't tried it on USB. -- Sent from: http://free-pascal-general.1045716.n5.nabb

Re: [fpc-pascal] Realtime and freepascal???

2018-06-06 Thread Brian
FPGA , or some special hardware , then preconditioning the data using buffers removes the need for hard real-time and Free Pascal running under vanilla Linux will more than suffice. Brian -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___

Re: [fpc-pascal] Linux getifaddrs

2018-03-01 Thread Brian
e.net/msg03470/getlocalips.lpr It is a bit odd that something like this isn't incorporated into Free Pascal sockets. Thanks Brian -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepasca

Re: [fpc-pascal] Linux getifaddrs

2018-03-01 Thread Brian
Do you know of any kernel functions that would return the current IP address ? Thanks Brian -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi

[fpc-pascal] Linux getifaddrs

2018-02-28 Thread Brian
Has anyone translated* getifaddrs* function to Free Pascal ? http://man7.org/linux/man-pages/man3/getifaddrs.3.html Thanks Brian -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-13 Thread brian
On 11/13/2017 10:20 AM, Adriaan van Os wrote: > brian wrote: >> Anyone with any past experience here? It seems I have two choices, to >> try to call the FORTRAN subroutines from FreePascal or to port the >> FORTRAN code to Pascal, I'm looking for advice... > >

[fpc-pascal] FORTRAN from FreePascal

2017-11-13 Thread brian
, that long ago ): ). Anyone with any past experience here? It seems I have two choices, to try to call the FORTRAN subroutines from FreePascal or to port the FORTRAN code to Pascal, I'm looking for advice... Thanks, Brian. ___ fpc-pascal mai

Re: [fpc-pascal] BlockWrite() version 2.6.4

2017-08-14 Thread Brian
Ok. Many thanks guys. Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/BlockWrite-version-2-6-4-tp5729418p5729456.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal

Re: [fpc-pascal] BlockWrite() version 2.6.4

2017-08-14 Thread Brian
Thanks Charlie. I notice the Do_Write() uses repeat .. until where fpWrite() does a direct call. What was the reasoning for the repeat..until in Do_Write() ? Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/BlockWrite-version-2-6-4

[fpc-pascal] BlockWrite() version 2.6.4

2017-08-05 Thread Brian
can the source code specific to BlockWrite() version 2.6.4 be found ? Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/BlockWrite-version-2-6-4-tp5729418.html Sent from the Free Pascal - General mailing list archive at Nabble.com

[fpc-pascal] Syncobjs Event and BlockWrite() question

2017-08-01 Thread Brian
-main loop-- MySemaphore.ResetEvent; doing something MySemaphore.SetEvent - Thread MySemaphore.WaitFor(10); BlockWrite() - Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Syncobjs

Re: [fpc-pascal] FPC for AVR

2017-06-14 Thread Brian
mikroPascal (not free) supports AVR and many other chips. https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPC-for-AVR-tp5729005p5729056.html Sent from the Free Pascal - General

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Brian
but whichever thread in which you create the window , all subsequent function calls to SDL2.0 must be made from within that thread , including events otherwise strange behavior or crashes will ensue. Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPC-Graph

Re: [fpc-pascal] FPC Graphics options?

2017-05-11 Thread Brian
/ Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPC-Graphics-options-tp5728513p5728519.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] FPC Graphics options?

2017-05-11 Thread Brian
to the graphics card at say 60Hz frame rate which make things appear faster than the eye can perceive. Here is basically how to do it. http://gigi.nullneuron.net/gigilabs/sdl2-pixel-drawing/ There is a nice Image and TTF library with SDL 2.0 Brian -- View this message in context: http

Re: [fpc-pascal] Threading vs Parallelism ?

2017-05-09 Thread Brian
e. Another approach is to abandon the add-in (PCIe) card approach and use gigabit Ethernet with a dedicated CPU core as the I/O. This what was done on the current project. Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Threading-vs-Parallelism-tp57280

Re: [fpc-pascal] Threading vs Parallelism ?

2017-05-06 Thread Brian
; function pthread_getaffinity_np(pid : Ptruint; cpusetsize : longint; cpuset : pointer) : longint; cdecl; external; Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Threading-vs-Parallelism-tp5728018p5728443.html Sent from the Free Pascal - General mailing list

Re: [fpc-pascal] Threading vs Parallelism ?

2017-05-05 Thread Brian
s set the affinity for threads : pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t *cpuset); pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset); They are very simple to translate into Free Pascal Brian -- View this messa

Re: [fpc-pascal] Warning for anybody else using Linux Mint Debian ('Betsy')

2017-03-08 Thread brian
On 03/07/2017 07:10 PM, Mattias Gaertner wrote: > >> brian hat am 8. März 2017 um 00:16 geschrieben: >> [...] >>> /usr/bin/ld: /usr/lib/fpc/3.0.2/units/x86_64-linux/rtl/cprt0.o: >>> unrecognized relocation (0x2a) in section `.text' >>

[fpc-pascal] Warning for anybody else using Linux Mint Debian ('Betsy')

2017-03-07 Thread brian
3.0.0 and Lazarus 1.6.2-1 means that everything works again as expected. I don't pretend to understand what has happened to cause this error on a system based on stable rather than testing, but as far as users with my configuration are concerned, there a

Re: [fpc-pascal] changes to include file do not trigger recompilation of unit

2016-09-11 Thread Brian
recompile whatever you are working on. Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/changes-to-include-file-do-not-trigger-recompilation-of-unit-tp5726310p5726323.html Sent from the Free Pascal - General mailing list archive at Nabble.com

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-24 Thread brian
On Wed, 24 Aug 2016 05:12:54 -0700, you wrote: >On 8/24/2016 1:04 AM, brian wrote: >> On Tue, 23 Aug 2016 23:40:06 +0800, you wrote: >> >> It should maybe be noted that this download apparently requires that >> you have Windows 10? >Negative. I downloaded and install

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-24 Thread brian
On Tue, 23 Aug 2016 23:40:06 +0800, you wrote: It should maybe be noted that this download apparently requires that you have Windows 10? Brian. > > >Maciej Izak wrote: >> Hi, >> >> finally we have simple way to test new syntax to improve FPC quality / >> $

Re: [fpc-pascal] Ararat Synapse UDP Rx Speed (Mbps)

2016-02-04 Thread Brian
0Mbps with no errors or lost data. Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Ararat-Synapse-UDP-Rx-Speed-Mbps-tp5723972p5723992.html Sent from the Free Pascal - General mailing list archive at Nabbl

Re: [fpc-pascal] Ararat Synapse UDP Rx Speed (Mbps)

2016-02-03 Thread Brian
Forgot to mention : Running on Linux / Ubuntu -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Ararat-Synapse-UDP-Rx-Speed-Mbps-tp5723972p5723973.html Sent from the Free Pascal - General mailing list archive at Nabble.com. __

[fpc-pascal] Ararat Synapse UDP Rx Speed (Mbps)

2016-02-03 Thread Brian
Does anyone have any benchmark speed tests using Synapse to receive UDP data ? (ie Mbps transfer). Thanks -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Ararat-Synapse-UDP-Rx-Speed-Mbps-tp5723972.html Sent from the Free Pascal - General mailing list archive a

[fpc-pascal] Question C to Pascal translation ....Re: Wraper for libpciaccess ?

2015-02-05 Thread Brian
Ref libpciaccess.h Any suggestions on the conversions below ? Thanks in advance. Brian C Union --- 00043 struct pci_device_iterator { unsigned next_index; enum { match_any, match_slot, match_id } mode; union { struct pci_slot_match slot

Re: [fpc-pascal] SDL 2.xx

2015-02-03 Thread Brian
Threading SDL 2.03 is not particularly difficult if you observe the rules that a texture/renderer must reside in the same thread that created the window and (it appears) there is only one event (which as you mentioned makes sense) , and in my case the event handler is in a thread. SDL 2.03 has so

Re: [fpc-pascal] SDL 2.xx

2015-02-02 Thread Brian
n the main thread (program) , by using SDL_GetWindowID() to get the identify of a window (WindowID) and later use it to recognize which window generated the event. Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/SDL-2-xx-tp5720887p5720900.html Sent fro

[fpc-pascal] SDL 2.xx

2015-01-30 Thread Brian
easily create another window / renderer / handler in the main program for the new window , but the question is can there be two event handlers in SDL 2.xx ? Thanks in advance Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/SDL-2-xx-tp5720887.html Sent

Re: [fpc-pascal] Cross-compile vs native

2015-01-30 Thread Brian
Thanks for all the suggestions. I rather like Fred's method using Linux / Wine , and after getting it working under Wine , I would do an end test native on on a Windows PC. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Cross-compile-vs-native-tp5720834p5720

[fpc-pascal] Cross-compile vs native

2015-01-27 Thread Brian
A question to those who must maintain a Linux version and a Windows versions application. Do you tend to cross-compile from Linux or do you compile native (with separate projects) on each OS (Linux and Windows)? Thanks Brian -- View this message in context: http://free-pascal-general.1045716

Re: [fpc-pascal] SDL_Net vs Synapse

2015-01-05 Thread Brian
SDL2 Headers also available here ... http://sourceforge.net/projects/sdl2fpc/ -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/SDL-Net-vs-Synapse-tp5720715p5720720.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] SDL_Net vs Synapse

2015-01-05 Thread Brian
Any opinions/experience pro/con using SDL2 (SDL_Net) vs Synapse (http://synapse.ararat.cz/doku.php) ? Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/SDL-Net-vs-Synapse-tp5720715.html Sent from the Free Pascal - General mailing list archive at

Re: [fpc-pascal] FPC Heap Management : sub-allocation ?

2014-10-31 Thread Brian
Frederic Da Vitoria wrote > I think that Brian is asking if a memory leak could eat the system's > memory > irreversibly. IIUC in Windows, when the program is stopped, all it's > memory > is freed, even if the program leaked memory. I don't know about Linux, but &g

Re: [fpc-pascal] FPC Heap Management : sub-allocation ?

2014-10-31 Thread Brian
Thanks Sven. Do you know how it behaves when running under Linux? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPC-Heap-Management-sub-allocation-tp5720419p5720423.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] FPC Heap Management : sub-allocation ?

2014-10-31 Thread Brian
the OS to crash? ... sorry for the long winded sentence. Thanks in advance Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPC-Heap-Management-sub-allocation-tp5720419.html Sent from the Free Pascal - General mailing list archive at

Re: [fpc-pascal] fpGUI Thread-safe

2014-10-15 Thread Brian
Sorry , I meant fpGUI created applications , not the toolkit. Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpGUI-Thread-safe-tp5720361p5720365.html Sent from the Free Pascal - General mailing list archive at Nabble.com

[fpc-pascal] fpGUI Thread-safe

2014-10-15 Thread Brian
Is fpGUI running under X11 thread-safe? Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpGUI-Thread-safe-tp5720361.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc

Re: [fpc-pascal] Free Pascal Directories

2014-10-02 Thread Brian
Conclusion : Using {$UNITPATH /home/some/*} in the main program DOES NOT WORK ! When using Geany if the directive is added in Set Build Command , COMPILE line as -Fu/home/some/* it works properly. Much better than dumping everything into one pot. Regards Brian -- View this message in

Re: [fpc-pascal] Free Pascal Directories

2014-10-02 Thread Brian
My mistake ... Using directive -Va I can see that PFC cannot find fpg_base also. Question : Does the directive $UNITPATH acvtually work ? Regards Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Free-Pascal-Directories-tp5720212p5720266.html Sent from

Re: [fpc-pascal] Free Pascal Directories

2014-10-02 Thread Brian
The compiler accepts the directory and loads the first unit fpg_base , but then fails to load the next unit that is called by fpg_base which is fpg_impl . Then it fails. Regards Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Free-Pascal-Directories

Re: [fpc-pascal] Free Pascal Directories

2014-10-02 Thread Brian
_BASE (interface) unit FPG_IMPL [0.058] Loading unit FPG_IMPL [0.058] Unitsearch: fpg_impl.ppu [0.058] Searching file fpg_impl.ppu... not found ... FPC then begins searching for the source file fpg_impl.pas which is not in the directory and eventually fails. Any suggestions ? Thanks Brian -- View

Re: [fpc-pascal] Free Pascal Directories

2014-10-02 Thread Brian
files. Searching file /usr/lib/fpc/2.6.4/fpg_impl.pas... not found Fatal: Can't find unit fpg_impl used by fpg_base Is there any way to tell the compiler to just link existing .ppu and .o files ? Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com

Re: [fpc-pascal] Free Pascal Directories

2014-10-02 Thread Brian
so FPC is able to find the required units? Thanks Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Free-Pascal-Directories-tp5720212p5720252.html Sent from the Free Pascal - General mailing list archive at Nabble.com

Re: [fpc-pascal] Free Pascal Directories

2014-10-02 Thread Brian
directory path such as : {$UNITPATH /home/mydir/fpgui/fpgui-1.2/src/units/i386-linux} and then it only finds the first unit in the uses list and cannot find the rest of the units in i386-linux. Why doesn't FPC continue to look for units in the directory specified by $UNITPATH ? Regards

Re: [fpc-pascal] Free Pascal Directories

2014-10-01 Thread Brian
Mattias Gaertner wrote > On Wed, 1 Oct 2014 13:39:39 -0700 (PDT) > Brian < > vmst@ > > wrote: > >> Sorry , I wasn't specific about my problem. Using the example in the >> fpGUI >> distribution (but the following comments are not specific to fpGUI). &

Re: [fpc-pascal] Free Pascal Directories

2014-10-01 Thread Brian
e complier will find fpg_base but then fail to find the next unit called by fpg_base ... Fatal: Can't find unit fpg_impl used by fpg_base What am I missing? Thanks in Advance Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Free-Pas

[fpc-pascal] Free Pascal Directories

2014-09-30 Thread Brian
n (my code) in a separate directory. Any suggestions ? Thanks in advance Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Free-Pascal-Directories-tp5720212.html Sent from the Free Pascal - General mailing list archive at Nabbl

[fpc-pascal] Wraper for libpciaccess ?

2014-09-21 Thread Brian
Does anyone know of an FPC wrapper for the library libpciaccess ? Thanks in advance Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Wraper-for-libpciaccess-tp5720127.html Sent from the Free Pascal - General mailing list archive at Nabble.com

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Brian
An interesting discussion at this link on the subject. http://networkedblogs.com/axUUw *Effectively, the beginning of the main() function is the only really safe place to call XInitThreads(). * -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Xlib-Threads-tp

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Brian
Yes , Xlib has many impressive features , but it is lacking in a simple (and fast) way to independently write to specific bit planes without altering the other bit planes for 2D animation. OpenGL can be used (I think) for 2D automation using the z-buffer , but it really is and end around to a defic

Re: [fpc-pascal] Xlib Threads

2014-04-26 Thread Brian
SOLVED XInitThreads() must be called prior to initailizing X , then it works using XLockDisplay() and XUnlockDisplay() XLockDisplay(TheDisplay); NewEvent := Xpending(TheDisplay) > 0 ; if NewEvent then begin XNextEvent(TheDisplay, @myevent); KeypressedX := myevent._type = k

[fpc-pascal] Xlib Threads

2014-04-25 Thread Brian
All the Xlib documentation seems to imply that threads can be used , however if I attempt to put XNextEvent() or XPending() in a thread , the rsult is a GP fault . The error message suggests using XInitThreads() but it still generates a GP fault. Tried using XlockDisplay() and XUnlockDisplay() in

[fpc-pascal] SOLVED : Re: GetAffinity\SetAffinity

2013-11-25 Thread Brian
Problem solved ... ironically the solution was from a Windows guy. Faulty Code Core2Thread_ID := BeginThread(@Core2_Thread_Test); InitCriticalSection(CriticalSection_Core2); Set_Thread_CPU_Core(Core2Thread_ID,$01); writeln('Core2 ok'); Core22Thread_ID := BeginThread(@Core22_T

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-22 Thread Brian
Mark ... many thanks. Your last comment prompted me to avoid using Write/Writeln to monitor what was happening. By removing Write/Writeln from the threads , ... everything works correctly with two threads , one running on core1 and the other thread running on core2. I think this boils down to the

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-22 Thread Brian
"... The critical sections you are using only protect each thread against itself, meaning they basically do nothing. Being inside a critical section is not a guarantee that you won't get preempted, but just that no other threads can enter the same section. ..." The two threads do not share and var

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-22 Thread Brian
Attached binary executables which run on Ubuntu 12.04lts , but should be portable. coret_ok sets the process and two threads to core1 coret_fail sets to process to cores1 and 2 , one thread to core 1 and one thread to core 2. It soemtimes runs ok , but usually fails with a GP fault. coret_ok

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-22 Thread Brian
Mark ... sorry for the mixup. The program and unit should now be stand alone. The unit links libc (rev6). Regards Brian coret.pas <http://free-pascal-general.1045716.n5.nabble.com/file/n5717549/coret.pas> test_threads.pas <http://free-pascal-general.1045716.n5.nabble.com/file

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-21 Thread Brian
increases , as the scheduler then starts to try and spread the load between the two cores. If only one core is used everything works fine. Regards Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/GetAffinity-SetAffinity-tp3351231p5717543.html Sent from

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-21 Thread Brian
ree-pascal-general.1045716.n5.nabble.com/file/n5717544/test_threads.pas> Regards Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/GetAffinity-SetAffinity-tp3351231p5717544.html Sent from the Free Pascal - General ma

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-20 Thread Brian
Mark, All the documentation seems to indicate that processes and threads are treated alike in Linux , however , even having established that I can apparently select a core to run a thread , I haven't yet been able to make it work. I explain the findings from a dual core Intel CPU. Using the sche

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-19 Thread Brian
After a bit of research , the issue of setting the cpu affinity has been solved , which may be of use to other folks. A bit of info here concerning the data type cpu_set_t , which as far as I can determine (no help from the mess that is the c library source) is essentially an array of DWORD. For m

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-17 Thread Brian
explains > why and how to use hard affinity, and provides sample code showing you how > to use the available functionality. Any suggestions Thanks in advance Brian -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/GetAffinity-SetAffinity-tp3351231p5717507

[fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-15 Thread Brian
listinfo/fpc-pascal Request for additional info : do_Syscall(syscall_nr_sched_setaffinity,fpgetpid,setsize,@cpu_set); The above generalized suggestion is very helpful , but can someone provide or point me to a link which describes the type cpu_set_t which @cpu_set points to. sched.h doesn

Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-09 Thread brian
this one has been carefully noted - the idea of needing to wrap parameter AND value in quotes wouldn't have occurred to me in a month of Sundays. Brian. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-08 Thread brian
genc (with or without the full path) and ParamString is the rest of the commands I gave above. Do I need to add a separator to the front of ParamString when using ExecuteProcess? It wouldn't seem sensible to require it, since there are the two parameters to Execu

Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread brian
m. Nope. I'll give TProcess a whirl. Thanks for the suggestion. Brian. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread brian
files, and yes, I've checked all the file permissions. It's got to be something obvious, or some quirk of Linux programming that I haven't met up with yet (I'm still a novice with FreePascal and Linux, though I've many years experience with Delphi and Windows

[fpc-pascal] Handling recursive symlinks in Linux

2011-02-18 Thread brian
I'm trying to convert a Delphi console-mode program which needs to walk directory trees to FP **and Linux** - is there a standard way to detect and handle recursive symlinks, if the user has been daft enough to create them? Thanks, Brian. __

Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Brian Winfrey
On Mon, Feb 7, 2011 at 6:27 AM, wrote: > > > On Mon, 7 Feb 2011, Andrew Brunner wrote: > >> On Mon, Feb 7, 2011 at 7:35 AM,   wrote: >>> >>> A cross-platform solution is to use one of libsee or BESEN. >>> >>> The latter is implemented in 100% native Object Pascal. >>> >>> Michael. >> >> BESEN is

Re: [fpc-pascal] Win32 Application Query.

2011-01-31 Thread Brian Winfrey
On Sun, Jan 23, 2011 at 2:25 AM, Justin Smyth wrote: > Hi guys > > I've been working on a application to application communications protocol > via named pipes. > > the basic idea would be for Application A to change a Component Property on > Applications B ( ie the visible property) or a text or c

Re: [fpc-pascal] JSON - RTTI streaming.

2011-01-20 Thread Brian Winfrey
On Wed, Jan 5, 2011 at 3:12 PM, Michael Van Canneyt wrote: > Hello, > > For those of you that need JSON support: > > I have committed support for streaming published properties (properties for > which RTTI  is generated) from objects to JSON and vice versa, in a unit > fpjsonrtti. > > Not the full

Re: [fpc-pascal] Cannot get TFPTimer to work

2010-12-02 Thread Brian Winfrey
See .../fpcsrc/packages/fcl-base/examples/testtimer.pp for example usage. On Thu, Dec 2, 2010 at 10:39 AM, Darius Blaszyk wrote: > Whatever I tried, I cannot get TFPTimer to work. Can someone help? For > some reason the OnTimer even is never fired. Tried on Windows and Linux. > Here's a snippet

Re: [fpc-pascal] make fpc

2010-11-22 Thread Brian Winfrey
On Mon, Nov 22, 2010 at 1:48 AM, Jonas Maebe wrote: > > On 21 Nov 2010, at 19:03, Brian Winfrey wrote: > >> What version should fpc display (Revision: 16393). >> >> When I get latest and make /usr/bin/fpc is at version 2.4.2. >> >> fpc -vut dummy.pas >&g

[fpc-pascal] Re: make fpc

2010-11-21 Thread Brian Winfrey
I also tried "make cycle" as outlined in programmers guide, but results are the same. On Sun, Nov 21, 2010 at 10:03 AM, Brian Winfrey wrote: > What version should fpc display (Revision: 16393). > > When I get latest and make /usr/bin/fpc is at version 2.4.2. >

Re: [fpc-pascal] TReader.ReadProperty

2010-11-04 Thread Brian Winfrey
See post from about two weeks ago. "Building FPC with debug information" On Wed, Nov 3, 2010 at 3:39 AM, Roland Turčan - RoTurSoft wrote: > > > On Wed, Nov 3, 2010 at 9:17 AM, Michael Van Canneyt > wrote: >>> >>> PS: How can I debug TReader class, because debuger steps over my calls >>> from >>>

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-02 Thread Brian Winfrey
> > The fixes_2_4 is already at version 2.4.3 and contains everything from > 2.4.2 and more... > Thank you. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-01 Thread Brian Winfrey
Which address should I be using? It looks like the UUID and revision are the same while Last changed revision and path are different. svn info http://svn.freepascal.org/svn/fpc/tags/release_2_4_2 Path: release_2_4_2 URL: http://svn.freepascal.org/svn/fpc/tags/release_2_4_2 Repository Root: http:/

Re: [fpc-pascal] TPLY

2010-10-29 Thread Brian Winfrey
Thanks, I'll look into this as well. On Fri, Oct 29, 2010 at 2:19 AM, Thierry Coq wrote: > Brian, > thanks for the diff, I'll take it into account and publish an update. > > On 28/10/2010 18:50, Brian Winfrey wrote: > ... >> >> The changes I made in this

Re: [fpc-pascal] Re: Re: TPLY

2010-10-29 Thread Brian Winfrey
Well, seems like you all have given some material to get me started. As nobody suggested sticking with TPLY or plex/bison I will back-burner that and proceed with crenshaw/oberon. Thanks to everyone. ___ fpc-pascal maillist - fpc-pascal@lists.freepasca

Re: [fpc-pascal] Re: TPLY

2010-10-28 Thread Brian Winfrey
Thank you, What techiniques have you used in the past that you could share to get me started? On Wed, Oct 27, 2010 at 8:04 PM, leledumbo wrote: > > Learn compilation technique, a recursive descent parser should be easy to > understand and code instead of learning automatic lexer and parser > gene

Re: [fpc-pascal] TPLY

2010-10-27 Thread Brian Winfrey
On Wed, Oct 27, 2010 at 9:21 AM, Brian Winfrey wrote: >> there is a port to Lazarus here: >> >> http://www.tcoq.org/ >> >> with some examples. I can help you if needed. The documentation is quite >> complete. > > Thanks it looks interesting, I like the

Re: [fpc-pascal] Re: TPLY

2010-10-26 Thread Brian Winfrey
> I prefer doing this manually, syntax conversion is easy, but library design > is totally different. A conversion of the Java code will provide a good starting point I think. Additionally, learning TPLY or lex/yacc could prove very useful I think. Do you have grammer files for syntax conversion

[fpc-pascal] TPLY

2010-10-25 Thread Brian Winfrey
libraries to FPC 2.5.x, and am unfamiliar with the TPLY tools. Thanks, Brian ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Building FPC with debug information

2010-10-20 Thread Brian Winfrey
> make OPT="-O-" DEBUG=1 all When I ran this I see that both -dDEBUG and -dRELEASE are passed on the fpc command line. Is that correct? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

  1   2   >