Re: [fpc-pascal] Primitive Record Wrappers

2016-02-20 Thread Sven Barth
Am 20.02.2016 06:25 schrieb "Michalis Kamburelis" :
> I remember a thread on fpc-devel "Pascal Smart Pointers Idea + ARC
> implementation" where the original author (Maciej Izak) was already
> working to overcome this:
> https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg33172.html
> . His reasons was similar (force the contents to be initialized with
> zero) and his solution felt cleaner -- introduce "class operator
> Initialize" where you can initialize your record.
>
> Any chance that this would be added/merged to FPC one day?:)

I'm indeed inclined to implement this one day, though I don't know yet how
exactly I want it to look.

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

Re: [fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread Sven Barth
Am 20.02.2016 08:55 schrieb "Maciej Izak" :
>
> Notifications events already works in Generics.Collections. ;P
>

Which reminds me that I wanted to work on integrating them...

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

Re: [fpc-pascal] Happy tickets benchmark

2016-02-20 Thread Serguei TARASSOV

On 19/02/2016 20:20, fpc-pascal-requ...@lists.freepascal.org wrote:

Date: Fri, 19 Feb 2016 14:01:16 +0100
From: Jonas Maebe
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] Happy tickets benchmark

Serguei TARASSOV wrote:

>For info, simple loop test like
>
>while i < 10 do
>  i := i + 1;
>
>shows that the FPC code is 2 times slower than Delphi 7 and Borland C
>5.5 and 4 times slower that C#.

If that's really all there is in your program, then the C# compiler
probably replaces that with "i+=10;" (gcc and clang definitely
will do that, I don't know about Delph 7/Borland C 5.5). This is another
kind of optimisation that is seldom useful in real world programs
(normally the loop will also do something useful, in which case you
can't do that).
MSVC does (hence I didn't include it) but all previously listed 
compilers don't remove the loop.

The time ratio is about
FPC - 100, Delphi 7, Borland C - 50, C# - 25, MSVC - 0.

So my doubts was about extra-code generation for the loops.

Regards,
Serguei

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


Re: [fpc-pascal] Happy tickets benchmark

2016-02-20 Thread Serguei TARASSOV

On 19/02/2016 20:20, fpc-pascal-requ...@lists.freepascal.org wrote:
Date: Fri, 19 Feb 2016 11:49:57 -0700 (MST) From: leledumbo 
 To: fpc-pascal@lists.freepascal.org 
Subject: Re: [fpc-pascal] Happy tickets benchmark

>Do you have any ideas why this kind of optimization is special?

Didn't Florian said that this kind of optimization has no benefit in real
world programs and will only increase compilation time?
After more than 20 years in software engineering I'm avoiding to use the 
phrases like "real world program" or I put in quotes the word "real" at 
least :)



>For info, simple loop test like
>
>   while i < 10 do
> i := i + 1;
>
>shows that the FPC code is 2 times slower than Delphi 7 and Borland C
>5.5 and 4 times slower that C#.

Just checked such a code with gcc 5.3.0, in -O2 the generated assembly is:

xorl%eax, %eax
ret

which literally does nothing. Without optimization the speed is equal.

It shows that gcc do the same kind of optimization as MSVC (hence I 
didn't include it), but other don't.

See my answer to Jonas for more details.

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


[fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread Serguei TARASSOV

On 19/02/2016 20:20, fpc-pascal-requ...@lists.freepascal.org wrote:

Date: Fri, 19 Feb 2016 14:24:30 +0100
From: Sven Barth
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] [PATCH] Addition of OnNotify event on
"TFPGObjectList" and "TFPGList" triggered on the insert, delete and
extract methods.

Am 19.02.2016 12:45 schrieb "silvioprog":

>
>Hello,
>
>I have a friend here in Brazil that added the `notify` support to the FGL

lists, however he sented it to this Github PR [1].

I'm against that. That would negatively impact the performance of these
lists.

Regards,
Sven

I agree.
Actually TFPGList has already an overhead vs TList (related tests 
http://arbinada.com/main/en/node/1411) and it is not a good idea to 
increase it.

Why not simple create subclass to implement events?

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


Re: [fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread Michael Van Canneyt



On Sat, 20 Feb 2016, Michalis Kamburelis wrote:


Can you send little bit sample showing this degradation? I can inform him
to not send the patch because this problem. (I think that him isn't
registered here in the list yet)


There's no need for a sample. This degradation is the whole reason why the
non-generic classes TFPObjectList and TFPList exist compared to TObjectList
and TList which do have notifications.


Hm, two points.

1. I'm using FGL containers a lot (because I like type-safety given by
generics), and I agree that adding a notification mechanism there can
slow them down. Mostly at allocation (because a deallocation is
already burdened down by having to do Deref() on every item, so it
would probably not suffer *so much* with unassigned OnNotify).

2. But this should not stop us from making a "generic container with
notification" classes. Maybe as new classes, maybe as a boolean toggle
to existing classes (as Graeme nicely suggests).

 Right now we only have "with notifications, and not type-safe"
containers (TObjectList/TList) and "without notifications, and
type-safe using generics" containers (TFPObjectList/TFPList).


These latter 2 are not generics based. There was some experimental code
which attempted to implement TFPObjectList/TFPList on top of generics,
but they were slower than the native implementation. That experiment is
unmaintained.

TFPGList is the one you meant, probably.

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


Re: [fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread denisgolovan
Hi That always keeps me wondering - why neither FPC, no any other mainstream static-type language implements specialization based not only on types, but on compile-time constants as well? I mean something like   TGenericList = class    ...  end; procedure TGenericList.Delete(index:integer);begin  if (nnNotifyDelete in options) and Assigned(FOnDelete) then FOnDelete(...);  end;end; // usagetype  TMyList = specialize TGenericList; ... that "if (nnNotifyDelete in options) " condition will optimized out by compiler if options lack corresponding enum constant.Of course, FOnDelete property should be omitted as well in ideal case. That might require something like "static if" in D. I've done that trick for ages using m4 preprocessor and it works really good, why it's still not supported natively by compilers themselves? 20.02.2016, 02:05, "Sven Barth" :There's no need for a sample. This degradation is the whole reason why the non-generic classes TFPObjectList and TFPList exist compared to TObjectList and TList which do have notifications.Regards, Sven,___fpc-pascal maillist - fpc-pascal@lists.freepascal.orghttp://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal  -- Regards,Denis Golovan ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] {$J} default setting for today

2016-02-20 Thread Mr Bee
Hi, I read this: http://www.freepascal.org/docs-html/ref/refse10.html
"Support for assigning values to typed constants is controlled by the {$J} 
directive: it can be switched off, but is on by default (for Turbo Pascal 
compatibility). Initialized variables are always allowed."
Then I read this: 
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirswriteabletypedconstants_xml.html
"In early versions of Delphi and Object Pascal, typed constants were always 
writeable, corresponding to the {$J+} state. Old source code that uses 
writeable typed constants must be compiled in the {$J+} state, but for new 
applications it is recommended that you use initialized variables and compile 
your code in the {$J-} state."
I think we should follow Delphi in this case. Typed constant should not be 
writeable by default. That's what a constant should be. The old behavior is a 
flaw. At least let {$J-} be the default for {$MODE DELPHI} and {$MODE OBJFPC}.
What do you think?
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to pass an array of bytes directly in a TBytes param?

2016-02-20 Thread Nitorami
I would do it like this
  test(TBytes.Create (65, 66, 67));




--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/How-to-pass-an-array-of-bytes-directly-in-a-TBytes-param-tp5724202p5724215.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/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] {$J} default setting for today

2016-02-20 Thread Bart
On 2/20/16, Mr Bee  wrote:

> I think we should follow Delphi in this case. Typed constant should not be
> writeable by default. That's what a constant should be. The old behavior is
> a flaw. At least let {$J-} be the default for {$MODE DELPHI} and {$MODE
> OBJFPC}

Yes please, break a ton of existing projects.

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


Re: [fpc-pascal] {$J} default setting for today

2016-02-20 Thread Jonas Maebe

Mr Bee wrote:

I think we should follow Delphi in this case. Typed constant should not
be writeable by default. That's what a constant should be. The old
behavior is a flaw. At least let {$J-} be the default for {$MODE DELPHI}
and {$MODE OBJFPC}.

What do you think?


It can maybe be changed for {$mode delphiunicode}


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


Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Philippe Lévi
I may have missed something 

I installed lazarus from lazarus-1.6.0-fpc-3.0.0-win64.exe

everything seem to have been installed well.

but when I start Lazarus ... it requires "C:\lazarus64\fpc\2.7.1\source" ... 
but 2.6.4 has been installed! 

what is the best (easiest) solution to clean this situation?

thanks
Philippe


De: fpc-pascal-boun...@lists.freepascal.org 
 em nome de Mattias Gaertner 

Enviado: quinta-feira, 18 de fevereiro de 2016 12:27
Para: fpc-pascal@lists.freepascal.org
Assunto: [fpc-pascal] Lazarus Release 1.6

The Lazarus team is glad to announce the release of Lazarus 1.6.

This release was built with FPC 3.0.0.
The previous release Lazarus 1.4.4 was built with FPC 2.6.4.

Here is the list of changes for Lazarus and Free Pascal:
http://wiki.lazarus.freepascal.org/Lazarus_1.6.0_release_notes
http://wiki.lazarus.freepascal.org/User_Changes_3.0.0

The release is available for download on SourceForge:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU, OS, distro and then the "Lazarus 1.6" directory.

Checksums for the SourceForge files:
http://www.lazarus-ide.org/index.php?page=checksums#1_6

Minimum requirements:

Windows:
  98, 2000, XP, Vista, 7, 8/8.1, 10, 32 or 64 bit.
  Win98 and WinNT IDE needs FPC 2.6.4 and building with flag
-dWIN9XPLATFORM.

FreeBSD/Linux:
  gtk 2.8 or qt4.5, 32 or 64bit.

Mac OS X:
  10.5 to 10.11, LCL only 32bit, non LCL apps can be 64bit.

The svn tag is
http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_6

Here is the list of fixes for Lazarus 1.6:
http://wiki.freepascal.org/Lazarus_1.6_fixes_branch

For people who are blocked by SF, the Lazarus releases from SourceForge
are mirrored at:
ftp://freepascal.dfmk.hu/pub/lazarus/releases/
and later at (after some time for synchronization)
http://michael-ep3.physik.uni-halle.de/Lazarus/releases/
and
http://mirrors.iwi.me/lazarus/

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


Re: [fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread denisgolovan
20.02.2016, 02:05, "Sven Barth" :
> There's no need for a sample. This degradation is the whole reason why the 
> non-generic classes TFPObjectList and TFPList exist compared to TObjectList 
> and TList which do have notifications.
>
> Regards,
> Sven

/ My previous mail appeared to be in html format. Sorry for that.

Hi

That always keeps me wondering - why neither FPC, no any other mainstream 
static-type language implements specialization based not only on types, but on 
compile-time constants as well?

I mean something like

  TGenericList = class
    ...
  end;

procedure TGenericList.Delete(index:integer);
begin
  if (nnNotifyDelete in options) and Assigned(FOnDelete) then
    FOnDelete(...);
  end;
end;

// usage
type
  TMyList = specialize TGenericList;

... that "if (nnNotifyDelete in options) " condition will optimized out by 
compiler if options lack corresponding enum constant.
Of course, FOnDelete property should be omitted as well in ideal case. That 
might require something like "static if" in D.

I've done that trick for ages using m4 preprocessor and it works really good, 
why it's still not supported natively by compilers themselves?

-- 
Regards,
Denis Golovan
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Martin

On 20/02/2016 13:30, Philippe Lévi wrote:

I may have missed something 

I installed lazarus from lazarus-1.6.0-fpc-3.0.0-win64.exe

everything seem to have been installed well.

but when I start Lazarus ... it requires "C:\lazarus64\fpc\2.7.1\source" ... 
but 2.6.4 has been installed!

what is the best (easiest) solution to clean this situation?


Looks like you had a previous or parallel install with a custom config.

If you need none of your config, you can delete the old config. The 
windows installer has a checkbox to do this. Or you delete the folder 
"primary config path" as found in menu "view" > ide internals > ide settings


Less drastic, open the Tools > Options and
- chose the fpc inside your installation 
C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.exe

- same for sources$(LazarusDir)fpc\$(FPCVer)\source

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


Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Philippe Lévi
you probably right! I'll check soon.



De: fpc-pascal-boun...@lists.freepascal.org 
 em nome de Martin 
Enviado: sábado, 20 de fevereiro de 2016 12:23
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] Lazarus Release 1.6

On 20/02/2016 13:30, Philippe Lévi wrote:
> I may have missed something 
>
> I installed lazarus from lazarus-1.6.0-fpc-3.0.0-win64.exe
>
> everything seem to have been installed well.
>
> but when I start Lazarus ... it requires "C:\lazarus64\fpc\2.7.1\source" ... 
> but 2.6.4 has been installed!
>
> what is the best (easiest) solution to clean this situation?
>
Looks like you had a previous or parallel install with a custom config.

If you need none of your config, you can delete the old config. The
windows installer has a checkbox to do this. Or you delete the folder
"primary config path" as found in menu "view" > ide internals > ide settings

Less drastic, open the Tools > Options and
- chose the fpc inside your installation
C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.exe
- same for sources$(LazarusDir)fpc\$(FPCVer)\source

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


Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Philippe Lévi
reinstalled with clean option ... it looks ok now!

thanks again
Philippe


De: fpc-pascal-boun...@lists.freepascal.org 
 em nome de Martin 
Enviado: sábado, 20 de fevereiro de 2016 12:23
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] Lazarus Release 1.6

On 20/02/2016 13:30, Philippe Lévi wrote:
> I may have missed something 
>
> I installed lazarus from lazarus-1.6.0-fpc-3.0.0-win64.exe
>
> everything seem to have been installed well.
>
> but when I start Lazarus ... it requires "C:\lazarus64\fpc\2.7.1\source" ... 
> but 2.6.4 has been installed!
>
> what is the best (easiest) solution to clean this situation?
>
Looks like you had a previous or parallel install with a custom config.

If you need none of your config, you can delete the old config. The
windows installer has a checkbox to do this. Or you delete the folder
"primary config path" as found in menu "view" > ide internals > ide settings

Less drastic, open the Tools > Options and
- chose the fpc inside your installation
C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.exe
- same for sources$(LazarusDir)fpc\$(FPCVer)\source

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


Re: [fpc-pascal] How to pass an array of bytes directly in a TBytes param?

2016-02-20 Thread silvioprog
On Sat, Feb 20, 2016 at 8:39 AM, Nitorami  wrote:

> I would do it like this
>   test(TBytes.Create (65, 66, 67));


Awesome. It compiles and works, thank you! :-)

-- 
Silvio Clécio
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread Graeme Geldenhuys
On 2016-02-20 05:05, Michalis Kamburelis wrote:
>   So I would not reject the idea so quickly. But it indeed should be
> implemented carefully

And it will take 5-10 minutes to write some unit tests to see exactly
what speed penalty would occur. Why guess or assume. Write some unit
tests and get the facts! Then go from there.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Philippe Lévi
installed 1.6 on my windows 8 64bits machine.

the exe file is 22.398 bytes 

if I rebuild Lazarus ... after installing a component or after building Lazarus 
from the Tools menu ... the exe file is more then 225.000 bytes big ... and ... 
it does not run! ... 

if I reboot the machine and try to run from startlazarus.exe it stops on the 
image ("Free Pascal ... Lazarus ... Project ... ... ...") ... 

if I try directly lazarus.exe ... "windows explorer" does not seem to be able 
to run it ... on then tasks manager "Windows Explorer" stays at the top of the 
list (ordered by name) ... and Lazarus does not appear ...

appreciate any tip!

Philippe


De: fpc-pascal-boun...@lists.freepascal.org 
 em nome de Martin 
Enviado: sábado, 20 de fevereiro de 2016 12:23
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] Lazarus Release 1.6

On 20/02/2016 13:30, Philippe Lévi wrote:
> I may have missed something 
>
> I installed lazarus from lazarus-1.6.0-fpc-3.0.0-win64.exe
>
> everything seem to have been installed well.
>
> but when I start Lazarus ... it requires "C:\lazarus64\fpc\2.7.1\source" ... 
> but 2.6.4 has been installed!
>
> what is the best (easiest) solution to clean this situation?
>
Looks like you had a previous or parallel install with a custom config.

If you need none of your config, you can delete the old config. The
windows installer has a checkbox to do this. Or you delete the folder
"primary config path" as found in menu "view" > ide internals > ide settings

Less drastic, open the Tools > Options and
- chose the fpc inside your installation
C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.exe
- same for sources$(LazarusDir)fpc\$(FPCVer)\source

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


Re: [fpc-pascal] {$J} default setting for today

2016-02-20 Thread Graeme Geldenhuys
On 2016-02-20 13:09, Bart wrote:
> Yes please, break a ton of existing projects.

Yes, then they can finally fix there code and use global variables instead.

If it was originally implemented for Turbo Pascal compatibility, why is
it enabled for ObjFPC and Delphi modes?

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] {$J} default setting for today

2016-02-20 Thread Jonas Maebe

Graeme Geldenhuys wrote:

If it was originally implemented for Turbo Pascal compatibility, why is
it enabled for ObjFPC and Delphi modes?


Because original Delphi versions also had {$j+} by default.


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


Re: [fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread Michalis Kamburelis
>>  Right now we only have "with notifications, and not type-safe"
>> containers (TObjectList/TList) and "without notifications, and
>> type-safe using generics" containers (TFPObjectList/TFPList).
>
>
> These latter 2 are not generics based. There was some experimental code
> which attempted to implement TFPObjectList/TFPList on top of generics,
> but they were slower than the native implementation. That experiment is
> unmaintained.
>
> TFPGList is the one you meant, probably.
>

Ups. Yeah, by "without notifications, and type-safe using generics"
containers I meant TFPGList and TFPGObjectList (and other TFPGXxx)
from the FGL unit.

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


Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Serguei TARASSOV
Good news, good job!
Finally, I'll be able to migrate our team to FPC 3.



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Lazarus-Release-1-6-tp5724185p5724230.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/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Wiki upgraded

2016-02-20 Thread Jonas Maebe

Hi,

The wiki has been upgraded to MediaWiki 1.23.13 LTS. I've also replaced 
our custom captcha with Google's ReCaptcha, as we've been hit very hard 
by spammers the last couple of days.


If something is not working right since the upgrade, please let us know 
here.


Thanks,


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


Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Philippe Lévi
I still do not understand the reason why the size is 10 times bigger after 
rebuilding Lazarus ...

but ... I understood why it does not run ... Avast! is the responsible for it! 
... 

I found how to exclude lazarus directory from Avast! scanning ... and now it 
looks that Lazarus is running fine ...

Thanks  and sorry for may be useless messages!

Philippe


De: fpc-pascal-boun...@lists.freepascal.org 
 em nome de Philippe Lévi 

Enviado: sábado, 20 de fevereiro de 2016 16:14
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] Lazarus Release 1.6

installed 1.6 on my windows 8 64bits machine.

the exe file is 22.398 bytes

if I rebuild Lazarus ... after installing a component or after building Lazarus 
from the Tools menu ... the exe file is more then 225.000 bytes big ... and ... 
it does not run! ...

if I reboot the machine and try to run from startlazarus.exe it stops on the 
image ("Free Pascal ... Lazarus ... Project ... ... ...") ...

if I try directly lazarus.exe ... "windows explorer" does not seem to be able 
to run it ... on then tasks manager "Windows Explorer" stays at the top of the 
list (ordered by name) ... and Lazarus does not appear ...

appreciate any tip!

Philippe


De: fpc-pascal-boun...@lists.freepascal.org 
 em nome de Martin 
Enviado: sábado, 20 de fevereiro de 2016 12:23
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] Lazarus Release 1.6

On 20/02/2016 13:30, Philippe Lévi wrote:
> I may have missed something 
>
> I installed lazarus from lazarus-1.6.0-fpc-3.0.0-win64.exe
>
> everything seem to have been installed well.
>
> but when I start Lazarus ... it requires "C:\lazarus64\fpc\2.7.1\source" ... 
> but 2.6.4 has been installed!
>
> what is the best (easiest) solution to clean this situation?
>
Looks like you had a previous or parallel install with a custom config.

If you need none of your config, you can delete the old config. The
windows installer has a checkbox to do this. Or you delete the folder
"primary config path" as found in menu "view" > ide internals > ide settings

Less drastic, open the Tools > Options and
- chose the fpc inside your installation
C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.exe
- same for sources$(LazarusDir)fpc\$(FPCVer)\source

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


Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Juha Manninen
On Sun, Feb 21, 2016 at 2:28 AM, Philippe Lévi  wrote:
> I still do not understand the reason why the size is 10 times bigger after 
> rebuilding Lazarus ...

Open Tools -> Configure "Build Lazarus" ... dialog.
Select profile "Optimized IDE". You can also use -O3 optimization in
options. Then build again.

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

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-20 Thread Mazola Winstrol
2016-02-20 3:24 GMT-02:00 Michalis Kamburelis :

> The major problem there is that it's difficult to force it to be
> always initialized with zeroes. Currently, a non-global variable of
> unmanaged type can always be filled with memory garbage, as explained
> in other thread. The trick in
> http://blogs.embarcadero.com/abauer/2008/09/18/38869 to use interfaces
> feels ugly, it's an over-use of the "interface" specifics in Object
> Pascal.
>
>
A less "ugly" code could be to store the pointer value in an array of bytes
(TBytes). As the TBytes type is a managed type, it will always be
initialized.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Philippe Lévi
nice! it worked fine!

thanks
Philippe


De: fpc-pascal-boun...@lists.freepascal.org 
 em nome de Juha Manninen 

Enviado: sábado, 20 de fevereiro de 2016 21:38
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] Lazarus Release 1.6

On Sun, Feb 21, 2016 at 2:28 AM, Philippe Lévi  wrote:
> I still do not understand the reason why the size is 10 times bigger after 
> rebuilding Lazarus ...

Open Tools -> Configure "Build Lazarus" ... dialog.
Select profile "Optimized IDE". You can also use -O3 optimization in
options. Then build again.

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


[fpc-pascal] Android porting ideas

2016-02-20 Thread Ryan Joseph
I’m going to attempt to port a game to Android but I have some questions about 
potential problems. Now at least I think building a library and loading using 
the JNI would be best but using the JVM could be helpful also (the entire 
project couldn’t be compiled though). Not sure which way is best or if they can 
be mixed perhaps.

1) All the file I/O in the FPC RTL is not available so what possible work 
arounds are there for loading data from files?

2) OpenGL functions are not available so how can I call into the Android 
library? Callback wrappers perhaps?

3) I use ReadXMLFile from XMLRead but that uses file loading internally so is 
there anyway to load XML on Android? 

Since there are limitations with the JVM right now building a static library 
seems easiest but if I can’t wrap what’s missing from the RTL and call from 
Java there’s no way to get 1 and 2 working. Callbacks make sense here but I’m 
not sure.

Any ideas? Thanks.

Regards,
Ryan Joseph

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

Re: [fpc-pascal] [PATCH] Addition of OnNotify event on "TFPGObjectList" and "TFPGList" triggered on the insert, delete and extract methods.

2016-02-20 Thread denisgolovan

21.02.2016, 02:59, "Sven Barth" :
> Then you don't consider C++ as mainstream, do you?
>
> Regards,
> Sven

Hm. Looks like C++ actually does that and that's great.
Unfortunately I stopped using C++ for large projects about 12 years ago, so my 
C++ template knowledge must be too old :)  

> I had thought about this some time ago and then found a reason why I wouldn't 
> do it... Now if I'd only remember that reason -.-
Yes, it's interesting to see why. It's wildly useful and gives a lot of power.

-- 
Regards,
Denis Golovan
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal