Am 19.10.2011 23:28, schrieb Andrew Pennebaker:
>>From what I gather, procedure variables can indeed be referenced and
> passed around, etc.
>
> However, procedures do not return anything, so it's hard to chain them.
They are called procedure variables but can also contain functions.
> In functi
On Wed, Oct 19, 2011 at 11:28 PM, Andrew Pennebaker
wrote:
> However, procedures do not return anything, so it's hard to chain them. In
> functional languages, it's handy to do several nested map(map(map f ...
> calls.
So just make a function instead of a procedure?
--
Felipe Monteiro de Carval
Am 19.10.2011 20:08, schrieb Andrew Pennebaker:
Right, I tried just {$mode delphi} and just generic, and when both
failed I tried them at the same time.
Maybe I'm not using a recent enough version?
Free Pascal Compiler version 2.4.4 [2011/05/01] for i386
That's why I said "trunk". Trunk is th
Am 19.10.2011 23:28, schrieb Andrew Pennebaker:
>From what I gather, procedure variables can indeed be referenced and
passed around, etc.
However, procedures do not return anything, so it's hard to chain them.
In functional languages, it's handy to do several nested map(map(map f
... calls.
P
>From what I gather, procedure variables can indeed be referenced and passed
around, etc.
However, procedures do not return anything, so it's hard to chain them. In
functional languages, it's handy to do several nested map(map(map f ...
calls.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Wed,
Am 19.10.2011 20:30, schrieb Florian Klämpfl:
> I still don't see why this cannot be done by procedure variables: one
> can easily pass a procedure reference to a compare function to any sort
> library call.
It is maybe easier to write a anonymous function inline than declaring a
function and pa
Am 19.10.2011 20:23, schrieb Andrew Pennebaker:
> Practical uses for referencable anonymous functions:
For such applications one uses procedure variables in pascal.
>
> (map f collection)
>
> This is the prototypical way to run a function over each element in a
> collection, returning the resul
Practical uses for referencable anonymous functions:
(map f collection)
This is the prototypical way to run a function over each element in a
collection, returning the results.
Example:
(map (lambda (x) (+ x 1)) '(1 2 3))
-> (2 3 4)
(sort compare collection)
When dealing with complex data ty
Am 19.10.2011 10:49, schrieb Sven Barth:
> Am 19.10.2011 10:27, schrieb Jonas Maebe:
>>
>> On 19 Oct 2011, at 09:59, Marco van de Voort wrote:
>>
>>> In our previous episode, Sven Barth said:
> This implementation will result in crashes if T is a
> reference-counted type.
Right...
Right, I tried just {$mode delphi} and just generic, and when both failed I
tried them at the same time.
Maybe I'm not using a recent enough version?
Free Pascal Compiler version 2.4.4 [2011/05/01] for i386
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Wed, Oct 19, 2011 at 4:34 AM, Sven Barth
Am 19.10.2011 10:16, schrieb Sven Barth:
> Am 19.10.2011 09:31, schrieb Michael Fuchs:
>> I would prefer a style like
>>
>> myfunc := @function(x, y: Integer): Integer Result := x + y;
>
> And how would you create more complex functions? In Pascal code blocks
> are started with "begin" and ended w
Hmm... I'm not really sure though, but I guess you could make use of "array
of const" feature. See the documentation here:
http://www.freepascal.org/docs-html/ref/refsu60.html
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/Delphi-s-anonymous-functions-in-Free-Pa
On 10/19/2011 07:05, Leonardo M. Ramé wrote:
> - Original Message -
<...snip...>
>>> I created a FastCGI based server that handles JSON requests from a
>>> Win32/Linux GUI app, that uses a custom made ORM similar to tiOPF
and it
>>> works really fast, even on slow-long distance netw
On Wednesday 19 October 2011 16.53:00 Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I am using sqldb to connect to a postgres database. Using wiki
> instructions, my final object is a TSQLQuery for each table. So, this
> basically is a TDataset and to read fields I know that I can use
> First(),
Hello,
I am using sqldb to connect to a postgres database. Using wiki
instructions, my final object is a TSQLQuery for each table. So, this
basically is a TDataset and to read fields I know that I can use
First(), Next(), EOF() and RecNo
But these are rather slow. Many fields in the tables refer
- Original Message -
> From: "michael.vancann...@wisa.be"
> To: Leonardo M. Ramé ; FPC-Pascal users discussions
>
> Cc:
> Sent: Wednesday, October 19, 2011 11:03 AM
> Subject: Re: [fpc-pascal] 3-tier database applications with FPC
>
>
>
> On Wed, 19 Oct 2011, Leonardo M. Ramé wrote:
On Wed, 19 Oct 2011, Leonardo M. Ramé wrote:
From: Graeme Geldenhuys
To: FPC-Pascal users discussions
Sent: Wednesday, October 19, 2011 8:25 AM
Subject: Re: [fpc-pascal] 3-tier database applications with FPC
On 2011-10-19 11:36, michael.vancann...@wisa.be wr
>
>From: Graeme Geldenhuys
>To: FPC-Pascal users discussions
>Sent: Wednesday, October 19, 2011 8:25 AM
>Subject: Re: [fpc-pascal] 3-tier database applications with FPC
>
>On 2011-10-19 11:36, michael.vancann...@wisa.be wrote:
>>
>> Out of the box: no.
>
>OK, than
On 2011-10-19 13:34, michael.vancann...@wisa.be wrote:
> factor 6 when switching from XML to binary messaging. Not using HTTP but a
> self-made TCP/IP protocol gets you another factor.
Are both the binary message format and self-made TCP/IP protocol
publicly available? Maybe that might be worth im
On Wed, 19 Oct 2011, Graeme Geldenhuys wrote:
On 2011-10-19 11:23, Marco van de Voort wrote:
- kbmMW http://components4developers.com/
the author was on the Lazarus day in 2010.
Strange, nowhere on the kbmMW website do I see any mention of Free
Pascal Compiler or Lazarus IDE support.
On Wed, 19 Oct 2011, Graeme Geldenhuys wrote:
On 2011-10-19 11:36, michael.vancann...@wisa.be wrote:
Out of the box: no.
OK, thanks. Do you know if TClientDataset has improved at all?
Midas is written in C++, so that's not going to happen.
I didn't know that.
OTOH the web-developme
On 2011-10-19 11:23, Marco van de Voort wrote:
>
> - kbmMW http://components4developers.com/
> the author was on the Lazarus day in 2010.
Strange, nowhere on the kbmMW website do I see any mention of Free
Pascal Compiler or Lazarus IDE support.
http://www.components4programmers.com/products
On 2011-10-19 11:36, michael.vancann...@wisa.be wrote:
>
> Out of the box: no.
OK, thanks. Do you know if TClientDataset has improved at all?
> Midas is written in C++, so that's not going to happen.
I didn't know that.
> OTOH the web-development part has resulted in a ready-to-use packet tr
On 2011-10-19 11:23, Marco van de Voort wrote:
>
> - kbmMW http://components4developers.com/
> the author was on the Lazarus day in 2010.
Thanks, I'll take a look.
> I take 3-tier above as a general framework for 3-tier, not necessarily a
> Datasnap compatible layer.
Correct, it doesn't nee
On 18-10-2011 7:13, Reinier Olislagers wrote:
> On 17-10-2011 20:57, Michael Van Canneyt wrote:
>>> Would it make sense to reopen this bug?
>>
>> ? Eh ? If indeed it is accepted, then yes please.
>>
>> Quite strange, because I implemented the SQL parser based on the
>> official Firebird server docs
On Wed, 19 Oct 2011, Graeme Geldenhuys wrote:
Hi,
Just over 3 years ago I asked about FPC support for creating 3-tier
database applications. The answer was basically: it's not possible
(unless you roll your own Midas / Datasnap code).
TClientDataset also missed some vital features, and the s
> In function `GDBINT$_$TGDBINTERFACE_$__$$_GDB__INIT':
> gdbint.pp:(.text+0xfde): undefined reference to
> `deprecated_create_breakpoint_hook'
> /data2/sources/subversion/fpc/packages/gdbint/units/x86_64-linux/gdbint.o:
> In function `GDBINT$_$TGDBINTERFACE_$__$$_GDB_DONE':
> gdbint.pp:(.text+0x10
In our previous episode, Graeme Geldenhuys said:
> Just over 3 years ago I asked about FPC support for creating 3-tier
> database applications. The answer was basically: it's not possible
> (unless you roll your own Midas / Datasnap code).
- kbmMW http://components4developers.com/
the author wa
19.10.2011 12:16, Sven Barth пишет:
E.g.
TIntegerFunc = reference to function: Integer;
procedure SomeOtherProc(aFunc: TIntegerFunc);
...
procedure Foo;
var
x: Integer;
begin
x := 42;
SomeOtherProc(function: Integer; begin Result := x; end;);
end;
I haven't tested that, but from the descript
Hi,
Just over 3 years ago I asked about FPC support for creating 3-tier
database applications. The answer was basically: it's not possible
(unless you roll your own Midas / Datasnap code).
TClientDataset also missed some vital features, and the state of
WebServices was also not complete.
Here is
Sven Barth wrote:
This seems to be related to building the textmode IDE.
If you don't need the textmode IDE you can try the following workaround:
Open the "Makefile" in the base directory and search for "IDE=1". Remove
the "1" so that it reads "IDE=". Save the file and try again. This
should s
brian wrote:
I assume there's an expectation that the sources downloaded from trunk
should compile on all platforms?
I've just updated to 19505, and attempting to build on Linux Mint 9
64-bit causes a few problems.
The first problem I see is that there are actually two makefiles in the
fpc
In our previous episode, Sven Barth said:
> >>
> >> Right... I tend to forget about these... what would the correct way to
> >> copy an array of ref counted types? E.g. an "array of string"?
> >
> > copy () ? :-)
>
> I thought about "copy", too, but how would you implement a generic
> "concat" us
Am 19.10.2011 10:27, schrieb Jonas Maebe:
On 19 Oct 2011, at 09:59, Marco van de Voort wrote:
In our previous episode, Sven Barth said:
This implementation will result in crashes if T is a
reference-counted type.
Right... I tend to forget about these... what would the correct way to
copy an
Am 18.10.2011 12:06, schrieb brian:
The first problem I see is that there are actually two makefiles in the
fpc directory, Makefile dated 31st Aug 2011 and Makefile.fpc dated 13th
Aug 2011.
This is normal. The "Makefile.fpc" basically contain the important parts
of the makefile (which units ar
In our previous episode, Jonas Maebe said:
> >> Right... I tend to forget about these... what would the correct way
> >> to
> >> copy an array of ref counted types? E.g. an "array of string"?
>
> For-loops.
>
> > copy () ? :-)
>
> copy() cannot be used to concatenate two arrays, because it is
Am 19.10.2011 10:16, schrieb Sven Barth:
I would prefer a style like
myfunc := @function(x, y: Integer): Integer Result := x + y;
And how would you create more complex functions? In Pascal code blocks
are started with "begin" and ended with "end". I don't see a reason why
anonymous methods sho
Am 19.10.2011 10:01, schrieb Andrew Pennebaker:
Sven, I added the {$mode delphi} macro and prefaced each type with the
"generic" specification. I'm still getting errors.
Either add "{$mode delphi}" XOR "generic"
E.g.
Solution 1:
unit Foo;
interface
type
generic TGenArray = array of T;
...
Am 19.10.2011 09:59, schrieb Marco van de Voort:
In our previous episode, Sven Barth said:
This implementation will result in crashes if T is a reference-counted type.
Right... I tend to forget about these... what would the correct way to
copy an array of ref counted types? E.g. an "array of s
On 19 Oct 2011, at 09:59, Marco van de Voort wrote:
In our previous episode, Sven Barth said:
This implementation will result in crashes if T is a reference-
counted type.
Right... I tend to forget about these... what would the correct way
to
copy an array of ref counted types? E.g. an "a
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
On Wed, Oct 19, 2011 at 10:11 AM, Mattias Gaertner
wrote:
> I never saw such code for ansistring. Only for shortstring.
Indeed, I copied some code from the RTL and it seams that I
inadvertedly copied code for shortstring instead of ansistring =o
I fixed this in rev 32977 in the Pascal Widestring
Hello,
On 2011-10-18 22:44, Michael Van Canneyt wrote:
use DBUS to query HAL. Normally you should get most of the info.
I wrote an article on how to do this in FPC. if you want, I can send
it to you.
Could you send it to me as well?
Regards,
Žilvinas Ledas
__
Felipe Monteiro de Carvalho hat am 19.
Oktober 2011 um 09:13 geschrieben:
> Hello,
>
> Usually when we work with PChars we do things like this to set the
> final terminator:
>
> var
> ansistr: ansistring;
> begin
> // Copy the originating string taking into account the specified length
>
Am 19.10.2011 09:31, schrieb Michael Fuchs:
I would prefer a style like
myfunc := @function(x, y: Integer): Integer Result := x + y;
And how would you create more complex functions? In Pascal code blocks
are started with "begin" and ended with "end". I don't see a reason why
anonymous method
2011/10/19 Tomas Hajny :
> Sorry for a silly question, but why the difference between the two
> implementations (i.e. why not addressing the WideStr element directly
> without the typecast)?
Actually it should be a pointer operation in the ansistring version
too, because setting chars in a string
Sven, I added the {$mode delphi} macro and prefaced each type with the
"generic" specification. I'm still getting errors.
paycheck.pas:
unit Paycheck;
{$mode delphi}
interface
type
generic TArray = array of T;
generic TFn = function() : T;
...
Trace:
fpc example.pas
Compiling example.pa
In our previous episode, Sven Barth said:
> > This implementation will result in crashes if T is a reference-counted type.
>
> Right... I tend to forget about these... what would the correct way to
> copy an array of ref counted types? E.g. an "array of string"?
copy () ? :-)
___
On Wed, October 19, 2011 09:13, Felipe Monteiro de Carvalho wrote:
Hi,
> Usually when we work with PChars we do things like this to set the
> final terminator:
>
> var
> ansistr: ansistring;
> begin
> // Copy the originating string taking into account the specified length
> SetLength(ansis
Am 19.10.2011 09:13, schrieb Felipe Monteiro de Carvalho:
Hello,
Usually when we work with PChars we do things like this to set the
final terminator:
var
ansistr: ansistring;
begin
// Copy the originating string taking into account the specified length
SetLength(ansistr, len+1);
Sys
On 19/10/2011 00:31, Den Jean wrote:
> read the output of lshw or read its source on how to do it yourself.
problems with that is that to get most of the information you must run
lshw as super-user (root).
eg: Serial numbers, product codes, vendor names etc are all missing from
the output if you
Am 18.10.2011 21:42, schrieb Sven Barth:
For anonymous functions you can take a look at Embarcadero's Delphi help
here:
http://docwiki.embarcadero.com/RADStudio/en/Anonymous_Methods_in_Delphi
The Embarcadero style of anonymous functions does not satify me.
myFunc := function(x, y: Integer):
Hello,
Usually when we work with PChars we do things like this to set the
final terminator:
var
ansistr: ansistring;
begin
// Copy the originating string taking into account the specified length
SetLength(ansistr, len+1);
System.Move(source^, ansistr[1], len);
ansistr[len+1] := #0;
Se
53 matches
Mail list logo