Re: [fpc-pascal] Is forum down?

2020-02-02 Thread Michael Van Canneyt



On Mon, 3 Feb 2020, Zamrony P. Juhara via fpc-pascal wrote:


From my location

https://forum.lazarus.freepascal.org/
takes long time to load or sometime timeout. Does it happens to anyone?


Something similar happened to the main FPC server.
We have the impression that the servers are under a DOS attack.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Is forum down?

2020-02-02 Thread Zamrony P. Juhara via fpc-pascal
>From my location
https://forum.lazarus.freepascal.org/
takes long time to load or sometime timeout. Does it happens to anyone?

Zamrony P. Juhara
Fano Framework, pascal web framework, https://fanoframework.github.io
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compatibility problems with fpc > 3.3.1 rev 42375

2020-02-02 Thread fredvs via fpc-pascal
Hello Martin.

Wow.

Indeed, I did a check in mse code and only exists, in msearrayutils.pas:

function aligntoptr(p: pointer): pointer; inline;
begin
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
 result:= align(p,sizeof(p));
{$else FPC_REQUIRES_PROPER_ALIGNMENT}
 result:=p;
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
end;

And nothing about aligntoqword()

I dont know if a function aligntoqword(p: pointer): pointer; inline;
must be added in msearrayutils.pas.

I will try using aligntoqword() of fpc and adapting mse code for it (ti:=
aligntoqword(ti); 

If you see a other way, please advice.

Many, many, many thanks.

Fre;D

 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] PPCJVM and Android Bionic compatibility question

2020-02-02 Thread Mgr. Janusz Chmiel via fpc-pascal
I Am very sorry. I have thought, that when I only change The subject of The
message, so that it will start new thread. I will be careful on this. So
instead pressinf reply to all on other thread, I will always type A new
message. I Am very sorry, some times I forget on The mailing list techniques
and some time I do error.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] PPCJVM and Android Bionic compatibility question

2020-02-02 Thread Sven Barth via fpc-pascal

Am 02.02.2020 um 14:06 schrieb Mgr. Janusz Chmiel via fpc-pascal:

Dear specialists here,
How complex would be to recode Free Pascal compiler for ARM and
ARM64 Bit so it would be fully compatible with Android Bionic library, so it
would be executed as A external app from some Android app which have GUI?

Sure. There is even Termux which can run many Linux distros by using Proot.
But it would be really very very useful, if it would be possible to recode
PPCJVM so atleast this compiler would work directly on Android ARM and ARM64
devices by using Android OS without complex software modules such as whole
Termux, Proot and some Linux distribution.


Please don't hijack existing threads by replying to an existing message 
with a completely new, unrelated topic. This is not only impolite to the 
thread participants but it also lowers the chance for your thread to be 
read as users might ignore messages in threads they're not interested 
in. Same with your message regarding Dex handling.


That said FPC already fully supports compiling native applications and 
libraries for Android on ARM, Aarch64, i386 and x86_64 (see here: 
https://wiki.freepascal.org/Android).


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Interface type error

2020-02-02 Thread Sven Barth via fpc-pascal

Am 02.02.2020 um 12:49 schrieb Ryan Joseph via fpc-pascal:



On Feb 2, 2020, at 3:23 PM, Sven Barth via fpc-pascal 
 wrote:

As I had explained in the other thread some months ago interfaces in Object Pascal mean 
literally that the type can be cast to the specified interfaces. Parent interfaces are 
*not* part of this. If you want this you need to first cast the class to IClassName2, 
then the "interface inheritance" mechanism can take over.


Hmm, isn't that inconsistent given how classes work? if TClassName implements 
IClassName2 then doesn't it also implement IClassName1 by definition?
You mix inheritance with interface implementation. They are conceptully 
*not* the same even if they use a similar syntax. Thus they can (and do) 
behave differently. And that means that you can cast a class instance 
only if that interface is explicitely implemented.


Look at the following code:

=== code begin ===

program tintftest;

{$mode objfpc}
{$interfaces corba}

type
  ITest1 = interface
    procedure Test;
  end;

  ITest2 = interface(ITest1)
    procedure Test2;
  end;

  TTest = class(TObject, ITest1, ITest2)
  public
    procedure ITest1.Test = ITest1Test;
    procedure ITest1Test;
    procedure Test;
    procedure Test2;
  end;

procedure TTest.Test;
begin
  Writeln('Test');
end;

procedure TTest.Test2;
begin
  Writeln('Test2');
end;

procedure TTest.ITest1Test;
begin
  Writeln('ITest1Test');
end;

var
  t: TTest;
  i1: ITest1;
  i2: ITest2;
begin
  t := TTest.Create;
  i1 := t;
  i1.Test;
  i2 := t;
  i2.Test;
  i2.Test2;
end.

=== code end ===

This will print:

=== output begin ===

ITest1Test
Test
Test2

=== output end ===

A class is in no way obliged to implement a interface in the same way as 
an descendant interface.


This might appear like an obstacle in some case but in the contrary 
declaring it explicitely allows for much more flexibility. Especially 
when you're dealing with more complex interface hierarchies.


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] PPCJVM and Android Bionic compatibility question

2020-02-02 Thread Mgr. Janusz Chmiel via fpc-pascal
Dear specialists here,
How complex would be to recode Free Pascal compiler for ARM and
ARM64 Bit so it would be fully compatible with Android Bionic library, so it
would be executed as A external app from some Android app which have GUI?

Sure. There is even Termux which can run many Linux distros by using Proot.
But it would be really very very useful, if it would be possible to recode
PPCJVM so atleast this compiler would work directly on Android ARM and ARM64
devices by using Android OS without complex software modules such as whole
Termux, Proot and some Linux distribution.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Interface type error

2020-02-02 Thread Ryan Joseph via fpc-pascal


> On Feb 2, 2020, at 3:23 PM, Sven Barth via fpc-pascal 
>  wrote:
> 
> As I had explained in the other thread some months ago interfaces in Object 
> Pascal mean literally that the type can be cast to the specified interfaces. 
> Parent interfaces are *not* part of this. If you want this you need to first 
> cast the class to IClassName2, then the "interface inheritance" mechanism can 
> take over. 
> 

Hmm, isn't that inconsistent given how classes work? if TClassName implements 
IClassName2 then doesn't it also implement IClassName1 by definition?

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Interface type error

2020-02-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal  schrieb am
So., 2. Feb. 2020, 03:37:

> Why doesn't this compile? IClassName2 descends from IClassName1 so
> shouldn't TClassName be compatible with IClassName1?
>
> 
>
> {$mode objfpc}
> {$interfaces corba}
>
> program test;
>
> type
>   IClassName1 = interface
>   end;
>   IClassName2 = interface(IClassName1)
>   end;
>
> type
>   TClassName = class(IClassName2)
>   end;
>
> procedure Pass(int: IClassName1);
> begin
>
> end;
>
> var
>   c: TClassName;
> begin
>   // Incompatible type for arg no. 1: Got "TClassName", expected
> "IClassName1"
>   Pass(c);
> end.
>

As I had explained in the other thread some months ago interfaces in Object
Pascal mean literally that the type can be cast to the specified
interfaces. Parent interfaces are *not* part of this. If you want this you
need to first cast the class to IClassName2, then the "interface
inheritance" mechanism can take over.

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal