On 22/04/2011 22.36, Sven Barth wrote:
On 22.04.2011 18:31, Jilani Khaldi wrote:
{$linklib c}
uses
dynlibs;
procedure hello(const x: double); cdecl; external 'libmylib.so';
var
lHandle: TLibHandle;
v: double;
begin
lHandle := LoadLibrary('./libmylib.so');
if lHandle <> nilHandle then
begin
v
In our previous episode, michael.vancann...@wisa.be said:
> >>> IMHO it is the long term solution. Anything else would be madness, or
> >>> minor
> >>> damage control at best.
> >>
> >> Most of the more "recent" or "new" languages I know do not have generics,
> >
> > What do you mean, C++,C#, Java
On 22.04.2011 18:31, Jilani Khaldi wrote:
{$linklib c}
uses
dynlibs;
procedure hello(const x: double); cdecl; external 'libmylib.so';
var
lHandle: TLibHandle;
v: double;
begin
lHandle := LoadLibrary('./libmylib.so');
if lHandle <> nilHandle then
begin
v := 3.14159;
hello(v);
end else
writeln('
On Fri, 22 Apr 2011, Žilvinas Ledas wrote:
On 2011-04-22 20:05, Michael Van Canneyt wrote:
IMO a helper is bound closer to a type than an operator.
Please explain ? To my understanding, they're on exactly the same level ?
(from a language feature point of view).
I mean, what can be more
You do not have the library path on the system LD_LIBRARY_PATH variable or
at the ldconfig path.
I have set it manually and it works. How to set it inside "fpc.cfg" file?
BTW, why don't you load it dynamically instead of statically if you are
going the next mile to test it.
How to do this?
Th
On Fri, Apr 22, 2011 at 19:31, Jilani Khaldi wrote:
> {$linklib c}
>
> uses
> dynlibs;
>
> procedure hello(const x: double); cdecl; external 'libmylib.so';
>
> var
> lHandle: TLibHandle;
> v: double;
> begin
> lHandle := LoadLibrary('./libmylib.so');
> if lHandle <> nilHandle then
> begin
>
On 2011-04-22 20:05, Michael Van Canneyt wrote:
IMO a helper is bound closer to a type than an operator.
Please explain ? To my understanding, they're on exactly the same
level ?
(from a language feature point of view).
I mean, what can be more close to a type than a := operator ?
From
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
Am 22.04.2011 14:01, schrieb michael.vancann...@wisa.be:
By this rule, the helper class/operator/beast you proposed in the other
mail
should also not be available, because it is not known during definition.
Just as a helper is 'attached' to a type
{$linklib c}
uses
dynlibs;
procedure hello(const x: double); cdecl; external 'libmylib.so';
var
lHandle: TLibHandle;
v: double;
begin
lHandle := LoadLibrary('./libmylib.so');
if lHandle <> nilHandle then
begin
v := 3.14159;
hello(v);
end else
writeln('Cannot load "myli
Am 22.04.2011 14:01, schrieb michael.vancann...@wisa.be:
>
> By this rule, the helper class/operator/beast you proposed in the other
> mail
> should also not be available, because it is not known during definition.
>
> Just as a helper is 'attached' to a type, an operator is equally
> 'attached'
On 22.04.2011 16:51, Žilvinas Ledas wrote:
On 2011-04-22 14:47, michael.vancann...@wisa.be wrote:
On Fri, 22 Apr 2011, Marco van de Voort wrote:
In our previous episode, michael.vancann...@wisa.be said:
class for each storage type and deal with delegation overhead.
I've complete understand
On 2011-04-22 14:47, michael.vancann...@wisa.be wrote:
On Fri, 22 Apr 2011, Marco van de Voort wrote:
In our previous episode, michael.vancann...@wisa.be said:
class for each storage type and deal with delegation overhead.
I've complete understanding for the fact that generics are too
earl
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
Am 22.04.2011 12:58, schrieb Sven Barth:
No. He can define a record helper operator. The question is simple: do
we want generics behave like macros or more like .Net generics. Some
hybrid approach is imo wrong.
Before I forget it: Why do you think
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
Am 22.04.2011 13:32, schrieb michael.vancann...@wisa.be:
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
(I suspect this is why it is possible to add type restrictions in the
Delphi/.Net implementations)
2. If I have my own overloaded version of
On Fri, 22 Apr 2011, Marco van de Voort wrote:
In our previous episode, michael.vancann...@wisa.be said:
class for each storage type and deal with delegation overhead.
I've complete understanding for the fact that generics are too early, but
IMHO it is the long term solution. Anything else w
Am 22.04.2011 13:32, schrieb michael.vancann...@wisa.be:
>
>
> On Fri, 22 Apr 2011, Florian Klämpfl wrote:
>
>>>(I suspect this is why it is possible to add type restrictions in the
>>> Delphi/.Net implementations)
>>>
>>> 2. If I have my own overloaded version of '+' for a record, the above
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
(I suspect this is why it is possible to add type restrictions in the
Delphi/.Net implementations)
2. If I have my own overloaded version of '+' for a record, the above
means that it
cannot ever be used for generics, while it will be used for
Am 22.04.2011 12:36, schrieb Sven Barth:
>
> Oh dear... I have completely forgotton about operators in record helpers
> in my implementation...
That's the problem with every new language feature: the complexity of
the compiler probably increases not with O(n) but something between O(n)
and O(n^2
Am 22.04.2011 12:58, schrieb Sven Barth:
>> No. He can define a record helper operator. The question is simple: do
>> we want generics behave like macros or more like .Net generics. Some
>> hybrid approach is imo wrong.
>
> Before I forget it: Why do you think that a hybrid approach is wrong?
I m
On 22.04.2011 12:18, Florian Klämpfl wrote:
Am 22.04.2011 12:06, schrieb michael.vancann...@wisa.be:
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
mya.pp(16,12) Error: Operator is not overloaded: "complex" + "complex"
myb.pp(9,14) Fatal: There were 1 errors compiling module, stopping
Which is
In our previous episode, michael.vancann...@wisa.be said:
> > class for each storage type and deal with delegation overhead.
> >
> > I've complete understanding for the fact that generics are too early, but
> > IMHO it is the long term solution. Anything else would be madness, or minor
> > damage c
On 22.04.2011 12:36, Sven Barth wrote:
On 22.04.2011 12:18, Florian Klämpfl wrote:
Am 22.04.2011 12:06, schrieb michael.vancann...@wisa.be:
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
mya.pp(16,12) Error: Operator is not overloaded: "complex" + "complex"
myb.pp(9,14) Fatal: There were 1 err
On 22.04.2011 12:18, Florian Klämpfl wrote:
Am 22.04.2011 12:06, schrieb michael.vancann...@wisa.be:
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
mya.pp(16,12) Error: Operator is not overloaded: "complex" + "complex"
myb.pp(9,14) Fatal: There were 1 errors compiling module, stopping
Which is
On 22.04.2011 11:23, Florian Klämpfl wrote:
Am 22.04.2011 00:31, schrieb Michael Van Canneyt:
On Thu, 21 Apr 2011, Sven Barth wrote:
On 21.04.2011 21:45, Michael Van Canneyt wrote:
On Thu, 21 Apr 2011, Marco van de Voort wrote:
In our previous episode, Michael Van Canneyt said:
You ca
Am 22.04.2011 11:32, schrieb Sven Barth:
> On 22.04.2011 11:23, Florian Klämpfl wrote:
>> Am 22.04.2011 00:31, schrieb Michael Van Canneyt:
>>>
>>>
>>> On Thu, 21 Apr 2011, Sven Barth wrote:
>>>
On 21.04.2011 21:45, Michael Van Canneyt wrote:
>
>
> On Thu, 21 Apr 2011, Marco van de
Am 22.04.2011 12:06, schrieb michael.vancann...@wisa.be:
>
>
> On Fri, 22 Apr 2011, Florian Klämpfl wrote:
>
>>> mya.pp(16,12) Error: Operator is not overloaded: "complex" + "complex"
>>> myb.pp(9,14) Fatal: There were 1 errors compiling module, stopping
>>>
>>> Which is strange to say the least
On Fri, 22 Apr 2011, Sven Barth wrote:
It is correct that the second doesn't compile. To make the second
compile, the overloaded operators for the complex type must be defined
inside complex (which was/is? not possible).
It should be possible now, I didn't test it though yet.
The question i
On Fri, 22 Apr 2011, Florian Klämpfl wrote:
mya.pp(16,12) Error: Operator is not overloaded: "complex" + "complex"
myb.pp(9,14) Fatal: There were 1 errors compiling module, stopping
Which is strange to say the least, as the per the definition/intent of
generics, the code in mya should not kno
On 22.04.2011 11:23, Florian Klämpfl wrote:
Am 22.04.2011 00:31, schrieb Michael Van Canneyt:
On Thu, 21 Apr 2011, Sven Barth wrote:
On 21.04.2011 21:45, Michael Van Canneyt wrote:
On Thu, 21 Apr 2011, Marco van de Voort wrote:
In our previous episode, Michael Van Canneyt said:
You ca
On 22.04.2011 11:19, Florian Klämpfl wrote:
Am 22.04.2011 11:18, schrieb Florian Klämpfl:
Am 22.04.2011 00:08, schrieb Jonas Maebe:
On 21 Apr 2011, at 23:26, Sven Barth wrote:
On 21.04.2011 21:45, Michael Van Canneyt wrote:
Threefold: a) The compiler's handling of generics is still beta
cod
Am 22.04.2011 00:31, schrieb Michael Van Canneyt:
>
>
> On Thu, 21 Apr 2011, Sven Barth wrote:
>
>> On 21.04.2011 21:45, Michael Van Canneyt wrote:
>>>
>>>
>>> On Thu, 21 Apr 2011, Marco van de Voort wrote:
>>>
In our previous episode, Michael Van Canneyt said:
>
> You can propose w
Am 22.04.2011 11:18, schrieb Florian Klämpfl:
> Am 22.04.2011 00:08, schrieb Jonas Maebe:
>>
>> On 21 Apr 2011, at 23:26, Sven Barth wrote:
>>
>>> On 21.04.2011 21:45, Michael Van Canneyt wrote:
Threefold: a) The compiler's handling of generics is still beta
code in my opinion. As far as
Am 22.04.2011 00:08, schrieb Jonas Maebe:
>
> On 21 Apr 2011, at 23:26, Sven Barth wrote:
>
>> On 21.04.2011 21:45, Michael Van Canneyt wrote:
>>> Threefold: a) The compiler's handling of generics is still beta
>>> code in my opinion. As far as I know, the original problem I
>>> reported when wri
On Fri, 22 Apr 2011, Marco van de Voort wrote:
In our previous episode, Michael Van Canneyt said:
However when implemented using generics you can also directly use the
specialized type, and have fairly quick direct access.
You don't need generics for that. Any form of an array of bytes wil
On 22.04.2011 00:31, Michael Van Canneyt wrote:
But then different rules will apply for operators and procedure calls:
- procedure calls must be resolvable at define time
- Operators must be resolvable at specialization time.
No principal problem (we can define it so), but strange at least.
(BTW
In our previous episode, Michael Van Canneyt said:
> >
> > However when implemented using generics you can also directly use the
> > specialized type, and have fairly quick direct access.
>
> You don't need generics for that. Any form of an array of bytes will do,
> since that's what it amounts t
36 matches
Mail list logo