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

2013-08-08 Thread Lukasz Sokol
On 08/08/13 11:58, Henry Vermaak wrote: > On Thu, Aug 08, 2013 at 11:34:53AM +0100, Lukasz Sokol wrote: >> This would be fine, IFF i was adding this to the main form of my >> application... but I'm not. I'm trying to wrap this .dll in a >> separate unit, only comm

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

2013-08-08 Thread Lukasz Sokol
On 08/08/13 11:52, Michael Schnell wrote: > 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

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

2013-08-08 Thread Lukasz Sokol
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 draw data directly to a Windows screen. The safes

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

2013-07-11 Thread Lukasz Sokol
On 10/07/2013 13:38, Graeme Geldenhuys wrote: > On 2013-07-10 11:19, Tomas Hajny wrote: >> >> Sure, but you can't select just any True Type fonts for console windows >> (only Lucida is offered in WinXP; > > And is so since Win95. Just amazing that Windows Console is so far > behind other platforms

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

2013-07-04 Thread Lukasz Sokol
On 04/07/2013 16:24, Mark Morgan Lloyd wrote: > Lukasz Sokol wrote: >> On 04/07/2013 12:03, Michael Schnell wrote: >>> 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

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

2013-07-04 Thread Lukasz Sokol
On 04/07/2013 12:03, Michael Schnell wrote: > 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) &

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

2013-07-04 Thread Lukasz Sokol
On 04/07/2013 11:08, Dennis Poon wrote: > thanks. I am not using the fpc email as it seems off topic. > > May I know the exact brand and model number of the adapter you used? > I have an ATEN usb-to-serial cable (UC-232A) but I am not sure how to > connect its serial pins to rs-485 's DIFFERENTIA

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

2013-04-30 Thread Lukasz Sokol
On 29/04/2013 17:58, waldo kitty wrote: > On 4/29/2013 06:04, Reinier Olislagers wrote: >> On 29-4-2013 11:50, Lukasz Sokol wrote: >>> On 27/04/2013 16:06, silvioprog wrote: >>>> 2013/4/27 Sven >>>> Barth>>> >>>> <mailto:pa

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

2013-04-29 Thread Lukasz Sokol
On 29/04/2013 11:04, Reinier Olislagers wrote: > On 29-4-2013 11:50, Lukasz Sokol wrote: >> On 27/04/2013 16:06, silvioprog wrote: >>> 2013/4/27 Sven Barth >> <mailto:pascaldragon-gM/ye1e23mwn+bqq9rb...@public.gmane.org>> >>> >>> On 26.04.2013

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

2013-04-29 Thread Lukasz Sokol
On 27/04/2013 16:06, silvioprog wrote: > 2013/4/27 Sven Barth > > > On 26.04.2013 21:38, silvioprog wrote: > > Select in socket of Delphi 2007 (a friend sent it to me: > http://www.sendspace.com/file/__06ev02 > ): > > >

[fpc-pascal] [OT] Re: Feature proposal: function-based assignment operatorst

2013-04-04 Thread Lukasz Sokol
On 02/04/2013 14:30, Sven Barth wrote: > Am 02.04.2013 15:14, schrieb Lukasz Sokol: >> On 02/04/2013 13:32, Lukasz Sokol wrote: >>> On 02/04/2013 13:18, Sven Barth wrote: >>>> Am 02.04.2013 11:03, schrieb Lukasz Sokol: >>>>> [case in point: the t

[fpc-pascal] Re: Feature proposal: function-based assignment operatorst

2013-04-02 Thread Lukasz Sokol
On 02/04/2013 13:32, Lukasz Sokol wrote: > On 02/04/2013 13:18, Sven Barth wrote: >> Am 02.04.2013 11:03, schrieb Lukasz Sokol: >>> [case in point: the try...[except]...[finally]...[except]...end; I >>> wrote about some time before] >> Which reminds me: would

[fpc-pascal] Re: Feature proposal: function-based assignment operatorst

2013-04-02 Thread Lukasz Sokol
On 02/04/2013 13:18, Sven Barth wrote: > Am 02.04.2013 11:03, schrieb Lukasz Sokol: >> [case in point: the try...[except]...[finally]...[except]...end; I >> wrote about some time before] > Which reminds me: would you please be so kind to create a feature > request for

[fpc-pascal] Re: Feature proposal: function-based assignment operatorst

2013-04-02 Thread Lukasz Sokol
On 29/03/2013 09:53, Jürgen Hestermann wrote: [...] > To program nowadays it > already requires a lot of other things to learn (different OSs and > interfaces). I see no need to add even more to that by adding > features over and over again. Pascal was successful because it was > easy and clear. No

[fpc-pascal] Re: position of External: SIGFPE

2013-03-25 Thread Lukasz Sokol
On 25/03/2013 09:29, Xiangrong Fang wrote: >> We are now several decades later, but for compatibility reasons the >> FPU on the x86 processors still uses the same logic. It is possible >> to get the exception at the place where it happened by inserting >> fwait instructions after every fpu operatio

[fpc-pascal] Re: a proposal about "with" syntax

2013-03-19 Thread Lukasz Sokol
On 18/03/2013 03:11, Paul Ishenin wrote: > 18.03.13, 9:27, Xiangrong Fang пишет: >> I am sorry I didn't follow this thread although I am the "OP" :-). If >> I understand correct, I would suggest NOT introduce the "absolute" >> keyword, instead, make it ALWAYS absolute. i.e.: >> >> with a = SomeOb

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-19 Thread Lukasz Sokol
On 18/02/2013 18:53, DaWorm wrote: > > If this is what is really desired, is this a good construct? > > try ... except ... finally ... except ... end; > > I don't care for the meaning of "except" looking to be contextual, > but is it really? Reading that, to me it looks mostly predictable > ho

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-18 Thread Lukasz Sokol
On 14/02/2013 13:58, Giuliano Colla wrote: > It depends on what one tries to do in the try.. clause, on which > errors one choses to deal with on the except clause, and the > likelihood of recoverable errors in the finally clause. Allowing both > constructs, (try..except..finally and try..finally..

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-14 Thread Lukasz Sokol
On 13/02/2013 16:50, Giuliano Colla wrote: > IMHO the try..except..finally construct should provide exactly the same > functionality as a nested > try > try > [code] > except > [code] > end; > finally > [code] > end; > > i.e. it should be executed whatever happened in the sections betw

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Lukasz Sokol
On 13/02/2013 13:14, Michael Van Canneyt wrote: > > > I see no problem in adding finally, if you define carefully when it is > executed. > > Michael. > > I second that, we don't need no pythonisms here ;) (or is it pythonosis?) I'd rephrase what I discussed with Sven Barth: this construc

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist. [OT]

2013-02-13 Thread Lukasz Sokol
On 13/02/2013 12:31, Sven Barth wrote: > On 13.02.2013 12:41, Lukasz Sokol wrote: [...] >> But it's not just 'shorter', it's relatively 'safer' too, and >> doesn't forbid anybody from using traditional constructs either, at >> all, if the

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Lukasz Sokol
On 13/02/2013 11:01, Sven Barth wrote: > Keep this FAQ entry in mind when suggesting features: > http://www.freepascal.org/faq.var#extensionselect > > (Note: I personally would have nothing against such a feature, but > the details need to be defined!) > Well I guess unless someone is ready to

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Lukasz Sokol
On 13/02/2013 11:01, Sven Barth wrote: > On 13.02.2013 10:11, Lukasz Sokol wrote: [...] >> To developers: How would a generalized/packed construct like >> >> try [code block] finally [code block] except [code block] end; > > or what about > > try [code block]

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Lukasz Sokol
On 13/02/2013 09:39, Mark Morgan Lloyd wrote: > Lukasz Sokol wrote: > >> To developers: How would a generalized/packed construct like >> >> try [code block] finally [code block] except [code block] end; >> >> (in other words: a try-*-end construct where *

[fpc-pascal] Re: Compiled program is a virus (seems to be internallinker problem)

2013-02-13 Thread Lukasz Sokol
On 12/02/2013 21:45, Sven Barth wrote: > > Note: If anyone wants to answer to this "anti virus" thread that was > off topic to begin with, we should move over to fpc-other. > > Regards, Sven My apologies, I should have added [OT] to my reply. Lukasz ___

[fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Lukasz Sokol
On 13/02/2013 07:34, Michael Müller wrote: > I'm not sure if somebody else mentioned this already but I have the feeling > that Giuliano thinks that he has to decide to use try-finally OR try-except > but there are situations where you need both. One of the criteria is if the > object is local

[fpc-pascal] Re: Compiled program is a virus (seems to be internallinker problem)

2013-02-12 Thread Lukasz Sokol
On 11/02/2013 23:19, Gerhard Scholz wrote: > I switched to AVAST free Antivirus now, the problem does not occur here. > > This is not a pascal question, but maybe can give me a hint if AVAST is good > or which software is more recommendable. > (I do not really trust the tests I find in the interne

[fpc-pascal] Re: x86 asm bswap

2013-02-09 Thread Lukasz Sokol
On 06/02/2013 08:25, Juha Manninen wrote: > A Delphi project "DeleD 3-D" which I try to convert, has > unit_PNGSupport with method: > > function TPNGProcessor.SwapLong( const aValue: Cardinal ): Cardinal; > assembler; > asm > mov eax, aValue > bswap eax; > end; > > What would be a cro

[fpc-pascal] Re: Pathscale: alternative debugger on Linux?

2012-11-12 Thread Lukasz Sokol
On 12/11/2012 13:20, Reinier Olislagers wrote: > On 12-11-2012 13:51, Lukasz Sokol wrote: >> On 11/11/2012 08:48, Reinier Olislagers wrote: >>> On 11-11-2012 6:55, microcode-ytc+ihgo...@public.gmane.org wrote: >>>> On Sat, Nov 10, 2012 at 07:57:09PM +0100, Jonas M

[fpc-pascal] Re: Pathscale: alternative debugger on Linux?

2012-11-12 Thread Lukasz Sokol
On 11/11/2012 08:48, Reinier Olislagers wrote: > [1] > 5.1.Term. This License will take effect as of the Effective date, and > will remain in effect until terminated (i) by Customer with or without > cause, upon twenty (20) days written notice to Pathscale, or (ii) by > Pathscale upon written not

[fpc-pascal] Re: Pathscale: alternative debugger on Linux?

2012-11-12 Thread Lukasz Sokol
On 11/11/2012 08:48, Reinier Olislagers wrote: > On 11-11-2012 6:55, microc...@zoho.com wrote: >> On Sat, Nov 10, 2012 at 07:57:09PM +0100, Jonas Maebe wrote: > > On 10 >> Nov 2012, at 19:38, microc...@zoho.com wrote: > > > On Sat, Nov 10, 2012 >> at 06:20:29PM +0100, Reinier Olislagers wrote: > >>

[fpc-pascal] Re: using macros

2012-10-01 Thread Lukasz Sokol
On 01/10/2012 15:21, dhkblas...@zeelandnet.nl wrote: > I need to translate this: > #define mymalloc(x,y) (x*)malloc((y)* sizeof(x)) > > Is it possible using macro's in FPC or do I need to convert it to a > procedure? How would I cast the pointer in the latter case (without > having to change the

[fpc-pascal] Re: Identifier not found "result" [OT]

2012-08-31 Thread Lukasz Sokol
On 30/08/2012 18:13, Reinier Olislagers wrote: > On 30-8-2012 18:44, Rainer Stratmann wrote: [...] >> Ok so you prefer to let the beginner leave out in the rain. >> Because he and someone else (more experienced) _could_ mislead a clearly >> formulated message (are you in the right syntax mode?). >

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2012-08-30 Thread Lukasz Sokol
On 30/08/2012 09:04, Arioch wrote: > > Ralf A. Quint wrote >> >> At 12:09 AM 8/30/2012, michael.vancanneyt@ wrote: >>> They are IMHO a negation of what pascal stands for. If your >>> programming >> +1 >> > > Well, the same should be told about everything modern pascal is. > > Open and dynamic

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Lukasz Sokol
On 21/08/2012 17:43, Timothy Madden wrote: > On 08/21/2012 03:10 PM, Jorge Aldo G. de F. Junior wrote: >> "With no error messages, or even with no changes to the program since 1 >> and a half year in the repository, the scientific calculations are now >> all blown up, and program outputs only error

[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-16 Thread Lukasz Sokol
On 16/08/2012 10:27, Rainer Stratmann wrote: > Am Thursday 16 August 2012 10:50:25 schrieb Mark Morgan Lloyd: [...] > Please note that it works perfect. > There can be more of those comments, making a bad mood. > But that does not affect that this is working perfect. > I further don't seen the need

[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-16 Thread Lukasz Sokol
On 15/08/2012 16:05, Rainer Stratmann wrote: > Am Wednesday 15 August 2012 16:45:03 schrieb Lukasz Sokol: >>> If the maintainers decide to build in the suggested function above then >>> everthing is solved. By now no one of the maintainers wants this. >> >> I

[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-15 Thread Lukasz Sokol
On 15/08/2012 15:17, Rainer Stratmann wrote: > > Then the > mov pcharconst , EAX > command also had changed. > At every start of the program I see if it works here. > If it works here ist works outside also. > >> For example if you add/remove units and rebuild. > > All pchar adresses are searc

[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-15 Thread Lukasz Sokol
On 15/08/2012 13:55, Rainer Stratmann wrote: > Am Wednesday 15 August 2012 14:49:04 schrieb Rainer Stratmann: >> I would call this function rs( s : pchar ) because it has to be short. >> if there is a rs() in the program the compiler stores the caller adress >> (unique handle) and the pointer to th

[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-15 Thread Lukasz Sokol
On 15/08/2012 08:33, Rainer Stratmann wrote: > Am Wednesday 15 August 2012 03:52:00 schrieb waldo kitty: >> the loading code simply >> chooses the proper po file and then loads the strings into an array or >> whatever using the same variables which are used everywhere no matter what >> language t

[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-13 Thread Lukasz Sokol
On 13/08/2012 10:09, Rainer Stratmann wrote: > Am Monday 13 August 2012 10:35:55 schrieb Lukasz Sokol: >> On 12/08/2012 14:41, Rainer Stratmann wrote: >>> It depends on the approach. >>> If you have a better solution would you take another approach? >> >> Wha

[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-13 Thread Lukasz Sokol
On 12/08/2012 14:41, Rainer Stratmann wrote: > Am Sunday 12 August 2012 15:29:44 schrieb Jonas Maebe: >> Florian already implemented that quite a while ago :) I suggest to drop the >> topic though, because Rainer does not appear to be open to taking another >> approach > > It depends on the approa

[fpc-pascal] Wiki Up again (was: Wiki down ? )

2012-07-04 Thread Lukasz Sokol
On 04/07/2012 10:01, Lukasz Sokol wrote: > Hello, > http://www.downforeveryoneorjustme.com/wiki.freepascal.org > > says > > It's not just you! http://wiki.freepascal.org looks down from here. > > > but freepascal.org does work... > > Can somebody c

[fpc-pascal] Wiki down ?

2012-07-04 Thread Lukasz Sokol
Hello, http://www.downforeveryoneorjustme.com/wiki.freepascal.org says It's not just you! http://wiki.freepascal.org looks down from here. but freepascal.org does work... Can somebody check what happened ? L. ___ fpc-pascal maillist - fpc-pasca

[fpc-pascal] Re: Parsing parameters inside an interpreter

2012-05-14 Thread Lukasz Sokol
On 14/05/2012 10:39, Lukasz Sokol wrote: > On 13/05/2012 11:20, luciano de souza wrote: >> Hello all, >> >> I trying to build a very small interpreter. I can type commands >> like: >> >> $ add "Luciano de Souza" >> luchya...@gmail.co

[fpc-pascal] Re: Parsing parameters inside an interpreter

2012-05-14 Thread Lukasz Sokol
On 13/05/2012 11:20, luciano de souza wrote: > Hello all, > > I trying to build a very small interpreter. I can type commands > like: > > $ add "Luciano de Souza" > luchya...@gmail.com > > Somewhere in my code, I can have something like: > > procedure parse(commandline: string; var params: arra

[fpc-pascal] Re: Can it map class type as key?

2012-04-26 Thread Lukasz Sokol
On 26/04/2012 10:14, JC Chu wrote: > It fails because the operators < and > are not defined for TObject, > which is assumed by TFPGMap.KeyCompare(). > > As a makeshift you can implement a record type to wrap TObject and > define these operators for it. See the attached file for an > example. >

[fpc-pascal] Re: Fix & Continue in FPC [was: off-topic discussion)

2012-02-28 Thread Lukasz Sokol
On 28/02/2012 10:45, Jonas Maebe wrote: > > On 27 Feb 2012, at 13:32, Lukasz Sokol wrote: > >> On 26/02/2012 11:17, Mattias Gaertner wrote: >>> The next step is to "compile" the function on every change. Easy >>> with an interpreter. How to compile

[fpc-pascal] Re: OT: Amazing new development tools

2012-02-28 Thread Lukasz Sokol
On 26/02/2012 11:17, Mattias Gaertner wrote: > On Sun, 26 Feb 2012 11:43:38 +0100 (CET) Michael Van Canneyt > wrote: > >> >> >> On Sun, 26 Feb 2012, Vinzent Höfler wrote: >> >>> On Sat, 25 Feb 2012 19:15:54 +0100, ik >>> wrote: >>> I found the following amazing lecture that present a ne

[fpc-pascal] Re: (no subject)

2012-02-24 Thread Lukasz Sokol
On 23/02/2012 16:17, Everton Vieira wrote: > Is there any plans to implement public procedures/function of a class > that can be used without been necessary to create the class? > > -- Everton Vieira. > does class procedure foo(bar: TSomething); not work ? L. ___

[fpc-pascal] Re: libQT4Pas - Why it is needed?

2012-01-30 Thread Lukasz Sokol
On 30/01/2012 11:25, Sven Barth wrote: > I wouldn't say that there is no plan for C++ support as some code for > this already exists in the compiler. While it's true that different > C++ compilers are incompatible to each other and that also G++ likes > to change its formats now and then, the basi

[fpc-pascal] [OT] Re: I found FPC v0.2 source code :-)

2012-01-30 Thread Lukasz Sokol
On 30/01/2012 02:31, waldo kitty wrote: [...] > problem where capacitors were purchased from manufacturers that fell > to the capacitor espionage situation of some, what?, 15 years ago? > Hi Waldo, it was hard to not notice that situation, 15 years ago, although I never heard it was espionage..

[fpc-pascal] Re: convert "epoch" to UTC

2012-01-16 Thread Lukasz Sokol
On 16/01/2012 03:09, waldo kitty wrote: > > i'm needing to convert a "UTC epoch" date to a "standard time > string"... by that, i mean that i want to get something like > "2011-01-13 22:24:04" out of the "epoch" number 12013.9338171... > > the above "epoch" number is (supposedly) built like this.

[fpc-pascal] Re: using exceptions

2012-01-04 Thread Lukasz Sokol
On 04/01/2012 12:49, Bernd wrote: > 2012/1/3 Lars : > >> But that just a goto statement going to the except label.. Exceptions in a >> way are actually forcing you to write your code in a GOTO way. > > I would see Exceptions as being more like the fabled COMEFROM, the > legendary counterpart of

[fpc-pascal] Re: using exceptions

2012-01-04 Thread Lukasz Sokol
On 04/01/2012 12:47, Marcos Douglas wrote: [i see I hit on the obvious so: cut] > > I agree with you! But I was discussing the possibility do not using > Exceptions. ;-) Another point is when and where uses Exceptions... > that's what they were discussing. > > Marcos Douglas Well I think the

[fpc-pascal] Re: using exceptions

2012-01-04 Thread Lukasz Sokol
On 04/01/2012 11:50, Marcos Douglas wrote: > Ok, I expressed myself poorly. > When I said: "If we could return more than one value, ok we (maybe) do > not need Exceptions." > I mean: "If we could return more than one value, using a better way > than 'out arguments' or 'array of const', ok we (mayb

[fpc-pascal] Re: using exceptions

2012-01-04 Thread Lukasz Sokol
On 04/01/2012 00:31, Marcos Douglas wrote: [...] >> Another interesting article is: >> http://www.joelonsoftware.com/items/2003/10/13.html > > Very interesting and I agree when he say: > "I think the reason programmers in C/C++/Java style languages have > been attracted to exceptions is simply bec

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal [OT]

2011-10-26 Thread Lukasz Sokol
On 26/10/2011 09:44, Lukasz Sokol wrote: > On 25/10/2011 12:52, Marco van de Voort wrote: > >> One can debate the syntax. I won't, since even while I have >> similar reservations, that will lead to the usual Delphi sucks >> debate, possible implementation of an-orph

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal OT]

2011-10-26 Thread Lukasz Sokol
On 25/10/2011 12:52, Marco van de Voort wrote: > One can debate the syntax. I won't, since even while I have similar > reservations, that will lead to the usual Delphi sucks debate, possible > implementation of an-orphaned-at-birth FPC specific syntax, and in the end > the Delphi syntax always pre

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-19 Thread Lukasz Sokol
Hi Andrew, first of all my /first/ name is Lukasz. Would you /like/ me to use your surname to refer to yourself ? Second you seem to be sending the same message twice in one post (once as plain text the other as HTML) and quoted/printable encoding to make matters even worse. Please teach your (gm

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-18 Thread Lukasz Sokol
[...] (facepalm) I did not try 'anonymous' function as you asked, oh. Need to learn to read ;) L. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-18 Thread Lukasz Sokol
On 17/10/2011 21:53, Andrew Pennebaker wrote: > Does Free Pascal have anonymous functions that you can pass around, > e.g. to a sort(compare : function, arr : array) function? > > If not, does anyone know any hacks to accomplish this? > > Cheers, > > Andrew Pennebaker www.yellosoft.us

[fpc-pascal] [Total OT] Re: Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-07 Thread Lukasz Sokol
On 07/10/2011 14:53, Reinier Olislagers wrote: > On 7-10-2011 15:13, Graeme Geldenhuys wrote: >> On 07/10/2011 12:52, Reinier Olislagers wrote: >>> doesn't work - will need patch -p1 < git.diff >> >> Correct, and anybody that has applied a handful of patches or more in >> there time would have know

[fpc-pascal] Re: random numbers negative

2011-08-17 Thread Lukasz Sokol
On 16/08/2011 16:25, Luis Fernando Del Aguila Mejía wrote: > I have a doubt. > With the random function, Can you generate random numbers negative? > > Begin > randomize; > Writeln (random (-127)) / / 0> = n> -127 > End. > > thanks. As only negative range : somebody (Felipe) wrote that: ( -1*Ran

[fpc-pascal] Re: Library for network calculation

2011-07-26 Thread Lukasz Sokol
On 26/07/2011 00:23, Paul Nicholls wrote: > I didn't know that freepascal handled binary formatted numbers?!? > > % > > cheers, > Paul > [pun] yeah don't tell anyone, we don't want them to play games with pointers ;) like the c-programmers do ;) [/pun] L. _

[fpc-pascal] Re: Linux: How to execute a program, but not to wait until finishes

2011-07-05 Thread Lukasz Sokol
On 04/07/2011 18:05, Marco van de Voort wrote: > In our previous episode, Lukasz Sokol said: >> >> ExecuteProcess('/bin/bash -c /my/path/to/exe &'); // >> (probably...?) > > First, the binary name is always separate, there are minimal two > paramet

[fpc-pascal] Re: Linux: How to execute a program, but not to wait until finishes

2011-07-04 Thread Lukasz Sokol
On 04/07/2011 08:14, fred f wrote: > Hi all, > > How can I execute an external program, but to let my code continue. > > This doesn't work as I want and waits for finishing called app: > > ExecuteProcess (MyPathToExe, ' &'); > That would only work if you do ExecuteProcess('/bin/bash -

[fpc-pascal] Re: Shootout: k-nucleotide implementation (was: Which programming language is fastest?)

2011-05-09 Thread Lukasz Sokol
On 09/05/2011 11:06, Lukasz Sokol wrote: > On 08/05/2011 21:25, Bernd wrote: >> Ok, I have looked at the example that was the slowest: 5 times slower than >> gcc. >> >> k-nucleitide: >> http://shootout.alioth.debian.org/u32/benchmark.php?test=knucleotide&lan

[fpc-pascal] Re: Shootout: k-nucleotide implementation (was: Which programming language is fastest?)

2011-05-09 Thread Lukasz Sokol
On 08/05/2011 21:25, Bernd wrote: > Ok, I have looked at the example that was the slowest: 5 times slower than > gcc. > > k-nucleitide: > http://shootout.alioth.debian.org/u32/benchmark.php?test=knucleotide&lang=all > > The C++ code is giving me headaches from only looking at it. I am > still n

[fpc-pascal] Re: run pascal programs as scripts [OT]

2011-03-31 Thread Lukasz Sokol
[THIS IS OFF TOPIC :) ] linux init scripts in Pascal, anyone :) L. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: run pascal programs as scripts

2011-03-31 Thread Lukasz Sokol
Hi, On 31/03/2011 10:06, Darius Blaszyk wrote: > > This simplifies things quite a bit. Thanks for the hint. Here's a new patch, > I also added a fix for the command line options issue. Should be alright now. > All examples work fine on win32. > > Darius I haven't tried to run that yet, but, w

[fpc-pascal] Re: Accessing USB HID from Lazarus programs?

2011-03-21 Thread Lukasz Sokol
On 20/03/2011 22:53, Bo Berglund wrote: > On Sun, 20 Mar 2011 19:47:28 +, Henry Vermaak > wrote: >> What you seen hidapi? >> >> http://www.signal11.us/oss/hidapi/ >> >> You will probably have to translate the headers. > > Thanks, interesting read. I looked over what I thought would be the > v

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Lukasz Sokol
On 25/02/2011 11:43, Jonas Maebe wrote: > > On 25 Feb 2011, at 11:45, Ben wrote: > >> Op 2011-02-25 12:31, Jonas Maebe het geskryf: >>> >>> It seems that it's licensed under Artistic License 1.0 >>> (), >> >> nYume is not part of powt

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-02-04 Thread Lukasz Sokol
Lukasz Sokol writes: Looks like kernel printk works with fpc varargs : http://wiki.freepascal.org/linux/kernel/module_development#Enhancing_printk Enjoy ;) Lukasz Enjoying enhancements one step at a time ;) ___ fpc-pascal maillist - fpc-pascal

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-01-23 Thread Lukasz Sokol
Lukasz Sokol writes: I decided to put the result of my fiddling back onto the wiki http://wiki.freepascal.org/linux/kernel/module_development as the pastebin seems to have disappeared mysteriously. Enjoy! Lukasz ___ fpc-pascal maillist - fpc

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-01-22 Thread Lukasz Sokol
Another week, another (half an) hour of fun : http://pastebin.com/gNZ220QK Now printk has got out to another pascal unit. It is not beautiful, but still works. Check it out and enjoy ;) Lukasz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.o

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-01-16 Thread Lukasz Sokol
Paul Breneman writes: > This looks *very* interesting. I'd like to add it (with *big* red flags > and notes not to try it on a production PC) to this page: >http://www.turbocontrol.com/helloworld.htm Yes please, you're welcome :) from my side no contradictions - you may like to talk to th

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-01-16 Thread Lukasz Sokol
Lukasz Sokol writes: I have posted http://pastebin.com/rM5GKB1q which is the new version of http://pastebin.com/9D9ye7Pt. This contains all 4 files needed for compilation, also moved the {$LINK } to the kernel_module.pas (and also the printk() declaration moved there; Added some of my touch to

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-01-15 Thread Lukasz Sokol
Hey, take a look. I've basically removed all the calls that were referring to creating, reading and writing the procfs file. Only left init_module and cleanup_module so I only left trivial Hello World and Bye-bye messages. In fact I think even that should be made par with current linux standard.

[fpc-pascal] Re: Building (linux) kernel modules using fpc (for fun)

2011-01-15 Thread Lukasz Sokol
Jonas Maebe writes: > > [16646.934537] kernel_pmodule: Unknown symbol unregister_chrdev > > [16646.934835] kernel_pmodule: Unknown symbol proc_root > > [16646.935174] kernel_pmodule: Unknown symbol register_chrdev > > Since the Linux kernel breaks ABI compatibility on purpose all the time, any

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-01-15 Thread Lukasz Sokol
Henry Vermaak writes: > > On 15 January 2011 19:48, Sven Barth wrote: > > I might not be able to help you regarding this topic, but I believe that > > you'll get a wall of "use C, god damnit" if you ask there :P @Sven : it's for fun. Whether I'd be having fun is probably debatable but it may b

[fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-01-15 Thread Lukasz Sokol
Henry Vermaak writes: > > On 15 January 2011 19:32, Lukasz Sokol wrote: > >        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \ > > Have you done this? It's required for building modules out of tree, i

[fpc-pascal] Re: Building (linux) kernel modules using fpc (for fun)

2011-01-15 Thread Lukasz Sokol
Lukasz Sokol writes: ah and sorry some clarifications : - i posted using gmane web interface that forces me to wrap lines at 80 chars manually - what happens after: if I tell my system to sudo insmod kernel_pmodule results in insmod: error inserting 'kernel_pmodule.ko': -1 Unknown

[fpc-pascal] Building kernel modules using fpc (for fun)

2011-01-15 Thread Lukasz Sokol
Hi, http://wiki.freepascal.org/linux/kernel/module_development has some information, unfortunately after copy-pasting into relevant files, and running make i get fpc kernel_module Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386 Copyright (c) 1993-2009 by Florian Klaempfl Target OS:

[fpc-pascal] Re: Sin function

2011-01-04 Thread Lukasz Sokol
Hi faber, well, even mathematically, it is sorta right... yes the sin(0)=0 but looking at its graph, it is a rising slope, so sin(x near to 0-) < 0 :) :) L. On 29/12/2010 10:03, faber wrote: > Hi, > according to docs/reference sin function should print 0.0 when > > Writeln (Sin(Pi):0:1); > >

[fpc-pascal] Re: Can variables be declared within a block?

2010-10-18 Thread Lukasz Sokol
On 18/10/2010 13:58, Frank Church wrote: > On 18 October 2010 07:49, Florian Klaempfl wrote: [...] >>> No. >>> >> > > That is a rather emphatic no :). > Is there some performance or other related reason why it is a bad idea? I'm > not knowledgeable in this area but I'd like to know. > > Som

<    1   2