Re: [fpc-pascal] Darwin i386 socket polling
Am 23.12.11 04:35, schrieb Andrew Brunner: I'm needing to figure out how socket signaling mechanisms work under darwin. Windows and Linux work, Darwin however does not support ePoll. Anyone have any experience with Sockets events under OSX i386? Thanks. BSD's support the kqueue / kevent mechanism. helmut ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Forward declarations
On Fri, December 23, 2011 07:24, Jürgen Hestermann wrote: > Timothy Groves schrieb: >> Can anyone think of a situation in which you would *have* to use >> forward declared functions? I'm trying to come up with an example for >> such for my book, and I am drawing a blank. >> > > Well, maybe this one: > > --- > type SorterProcType = function (String1,String2 : shortstring) : > boolean; > function CompareIt1(String1,String2 : shortstring) : boolean; forward; > function CompareIt2(String1,String2 : shortstring) : boolean; forward; > function CompareIt3(String1,String2 : shortstring) : boolean; forward; > const SortCriteria : SortProcType = CompareIt1; > > --- > > I don't know of another way that you can use one of the "CompareIt1/2/3" > functions in the const declaration for "SortCriteria" (but maybe there > is one). In this case, you could directly include the implementation with the CompareIt* declaration (unless CompareIt1 needs to access SortCriteria too, of course - that would change the picture). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Forward declarations
On 22 Dec 2011, at 22:24, Timothy Groves wrote: On 11-12-22 04:04 PM, Anton Shepelev wrote: But are "mutually recursive procedures and functions" necessary? Not at all. I think they are only unnecessary in the same sense that having procedures/functions as a whole are unnecessary, just like for/do, while/do, repeat/until etc: * functions/procedures can be implemented by manually implementing a stack * loops can be implemented with a combination of if/then and goto * mutually recursive procedures and functions can be implemented by merging them into a single procedure/function, combining their parameter lists and adding a boolean to select between the code bodies of the two functions (or again by implementing the recursion via manually implemented stacks) The fact that something can also be implemented in a different way does not mean it's not appropriate or even necessary to write readable code. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for ARM
Is there an embedded web-server that would run on the ARM machine? I use this one from Synapse (work on openWRT and Android) -- Darek ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Darwin i386 socket polling
In our previous episode, Andrew Brunner said: > I'm needing to figure out how socket signaling mechanisms work under darwin. > Windows and Linux work, Darwin however does not support ePoll. Windows supports epoll? > Anyone have any experience with Sockets events under OSX i386? Helmut already answered that. But more importantly, there are example implementations for this stuff, see lnet. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Forward declarations
Back to high school time, I use it for turn based battle system for a game. I have two mutually (tail-)recursive procedures where one is the player movement decision (full with prompts) while the other is the enemy's (some AI calculation takes the decision). The battle could start ambushed (enemy first) or preemptive strike (player first). Because of this, the first procedure to call could be either of the two, and because both are mutually recursive, one needs to be declared forward. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Forward-declarations-tp5095571p5097085.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Darwin i386 socket polling
> Windows supports epoll? No, windows doesn't offer polling socket mechanisms. They send messages to windows with the socket number - it's event driven. Kernel polling is different, but I assumed that Darwin would support it via e-Poll. I searched and found a few references to kQueue/kEvent. Thanks for the help guys. I'll check the iNet code to see the supporting units. Anyone have a write-up on the website for sockets and the different nuances for each of the major oses? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpGUI Toolkit v0.8 release for FPC 2.4.4 & 2.6.0-rc
I have posted a 3.9 MB zip file that has a minimal distribution of the FPC 2.4.4 compiler as well as the new fpGUI v0.8 source code on this page: http://www.turbocontrol.com/easyfpgui.htm I've also included (Synapse) SynaSer source and a serial debug terminal program I've been working on. Also new is the option of compiling the new (alpha?) fpGUI IDE. No installation is needed! Just extract the zip into a new folder. Open a command prompt in the root folder of what was extracted. Then type "compile dbgterm" and when that finishes (give it some time) type "cd bin" and then "dbgterm" and you should be up and running the new serial debug terminal. It really is that easy thanks to the Free Pascal and other teams! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Darwin i386 socket polling
On 23 December 2011 15:27, Andrew Brunner wrote: >> Windows supports epoll? > > No, windows doesn't offer polling socket mechanisms. They send > messages to windows with the socket number - it's event driven. > Kernel polling is different, but I assumed that Darwin would support > it via e-Poll. I searched and found a few references to > kQueue/kEvent. Afaik, Windows has select(), but I/O Completion Ports is the thing to use for scalable event notification. Henry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal