Re: [fpc-pascal] Generics and key words

2014-02-14 Thread Maciej Izak
) don't work in objfpc... the main reason why objfpc is unusable for me (also because "generic" and "specialize" keyword)... >.< Regards, Maciej Izak (hnb) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ObjAuto.ObjectInvoke

2014-02-22 Thread Maciej Izak
AFAIK - no. We must wait when someone will implement RTTI.Invoke (Sven? or if no one decide to implement this then I will try). With RTTI.Invoke will be possible to implement ObjAuto... Regards, Maciej Izak (aka. HNB) 2014-02-22 21:00 GMT+01:00 silvioprog : > Hello, > > Is

Re: [fpc-pascal] Delphi compatible anonymous functions

2014-05-16 Thread Maciej Izak
4. :D Not everyone is an old pascal "procedural" dinosaur :) anonymous methods = fresh air. Regards Maciej Izak (hnb) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi compatible anonymous functions

2014-05-22 Thread Maciej Izak
2014-05-22 11:18 GMT+02:00 Sven Barth : > Yes. Though first step is compile time packages and runtime packages > later... > Any timeline? Regards, hnb ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailma

Re: [fpc-pascal] Typinfo incompatibilities between FPC and Delphi

2014-05-31 Thread Maciej Izak
nvention to work, and part of the typeinfo itself makes as much sense as any. That is to say, it's not there for the linker; it's there because of the convention, and the convention is there because of dynamic linking, which is done the way it is to maximize potential fo

Re: [fpc-pascal] Typinfo incompatibilities between FPC and Delphi

2014-06-09 Thread Maciej Izak
> I have the feeling that the introduction of dynamic packages in FPC *will* > require us to change our current RTTI from PTypeInfo to PPTypeInfo... :/ > > Regards, > Sven > So better to do it earlier rather than later ;P Regards

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-16 Thread Maciej Izak
-> http://bugs.freepascal.org/file_download.php?file_id=21394&type=bug) (to work with Unix 64 bits you need to use rev. 30239 and newer) Regards Maciej Izak (hnb.c...@gmail.com) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-17 Thread Maciej Izak
2015-03-16 14:15 GMT+01:00 denisgolovan : > BTW, could you upload it to GitHub to be able to pull new changes easier? > It looks like it will be a long way to official FPC package. Right :D, maybe FPC team don't need Generics.* :O https://github.com/dathox/generics.collections Rega

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-18 Thread Maciej Izak
al.org/view.php?id=25607 Regards Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC roadmap?

2015-06-11 Thread Maciej Izak
any chance to release FPC 3.0 with Generics.Collections library? 2015-06-11 16:33 GMT+02:00 Michael Van Canneyt : > > The documentation is the only 'blocking' issue. Maybe for good measure > some extra fixes need to be merged. > bes

Re: [fpc-pascal] FPC roadmap?

2015-06-11 Thread Maciej Izak
rfaces), new compiler intrinsic: function GetReferenceToValue(Value: T): Pointer; function GetValueSize(Value: T): Integer; Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC roadmap?

2015-06-11 Thread Maciej Izak
ter that (as in: as of monday) as far as I am concerned, RC1 may be > built. best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC roadmap?

2015-06-11 Thread Maciej Izak
> > btw. there is no info about few functions introduced by > Generics.Collections patch, as I can see all of my work for RTL is now part > of FPC 3.0 compiler ^^ :) > > ofc. except generics.* units :) ___ fpc-pascal maillist - fpc-pascal@lists.freepasc

Re: [fpc-pascal] FPC roadmap?

2015-06-11 Thread Maciej Izak
_Features_3.0 http://wiki.freepascal.org/User_Changes_3.0 regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Maciej Izak
sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. 2015-07-16 15:34 GMT+02:00 Marcos Douglas: > Hi, > > Is there some way to write this: Best regards Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freep

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Maciej Izak
TArray.Sort>(e, TComparer>.Construct( function(const Left, Right: TList): Integer begin //... end) ); === DELPHI CODE END === Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Maciej Izak
>" are added, because I don't know yet > whether I'll be able to deal with the fact that the scanner always converts > ">>" to "shr" (and "<<" to "shl") > > === code end === > no difference ;) contrary

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-30 Thread Maciej Izak
is bugfix for mORMot framework related to broken/lack of implementation of RTTI for interfaces. In Delphi this kind of RTTI is available since Delphi 7 or 6 (I don't remember precisely). -- Best regards, Maciej Izak ___ fpc-pascal maillist -

Re: [fpc-pascal] Is the TFPGMap.KeyData()/TDictionary.TryGetValue() faster than TStringList.Values[]?

2016-01-13 Thread Maciej Izak
TStringList: 00:00:03.708 Delphi XE2 : TStringList: 00:00:02.938 TMyList: 00:00:00.002 TMyList: 00:00:00.003 TStringList: 00:00:03.063 -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/

Re: [fpc-pascal] [FEATURE REQUEST] New FGL type: TFPGMapObjectData

2016-01-17 Thread Maciej Izak
2016-01-17 23:50 GMT+01:00 silvioprog : > Hello, > > The FGL unit has many very nice classes, but we should add a new type: > TFPGMapObjectData. (or simply TFPGMapObject) > > This type is just a list that frees its itens on destroy, similar to the > Delphi `TObjectDictionary` [1]. > > [1] > http:/

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
2016-02-01 9:35 GMT+01:00 David Butler : > This is usually called "inline if". > > Maybe call it "inlineif" or "iif", e..g > > x := iif (a < 3, 1, 2) > > or even > > x := iif a < 3 then 1 else 2; > > anything is better than System.IfThen blatant incompatibility. I opt for oxygene syntax. Anyway re

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
to implement this and was chosen the worst scenario. :\ -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
hi to introduce TObject.DisposeOf instead of any other name to help not breaking someones code. >From my point of view, Sven took the worst possible route, *especially there is a hundred other ways to achieve this* (!). -- Best regards, Maciej Izak ___ f

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
for IIF. You are kidding me? You can never be sure what you use. When is used Math or StrUtils I need to use System.IfThen. O___o *The decision Sven is wrong.* -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.free

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
hen" is better. To be clear : I like new feature but the name *must* be different. It is impossible to prove that "IfThen" name is right ;););) :P. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
2016-02-01 11:28 GMT+01:00 Sven Barth : > It does *not* break existing code at all. > Right. As mentioned in my other message: "Paradoxically, "IfThen" hinders future usage of the code" :) -- Best regards, Maciej Izak ___ f

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
2016-02-01 11:31 GMT+01:00 Sven Barth : > I personally would have preferred "if a < 3 then 1 else 2", > The first step to compatibility with Oxygene :) I love it -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@l

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
at FPC also has an intrinsic, and you can see when it is the > intrinsic and when the library function. > > But then you have already pulled out most of your hair. > It even can be worser when you're bald man. :/ -- Best regards, Maciej Izak

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
; ThenExpr, ElseExpr: type): type; & is used rarely (and it is legal ident part), collision with existing code base is minimal. Looks almost like regular Pascal syntax ;). -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
gt; &if:=1; > end. > > So &if is a bad idea. Yes it is possible. Anyway it is better idea than IfThen. You treat facts selectively. How often is used &if and how often is used IfThen? &IfThen looks also good (I like shorter syntax &if). Wit

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
2016-02-01 13:15 GMT+01:00 Maciej Izak : > 2016-02-01 13:09 GMT+01:00 Michael Van Canneyt : >> >> No. The compiler already uses &. >> >> & means 'the following is an identifier even if it is a keyword'. >> >> You can perfectly decla

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
e 4607. > > And modifying the scanner for this exception is a REALLY bad idea. in that case you are right :) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
close to native usage of if then else 4. we can have both. IIF and &if. Don't create precedents! -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
t to create monstrosities as > > &if:=system.&if(a>3,1,3) * b > > Really guys, I know it is ugly, but we don't have to add to it even more; > > Using & in a system intrinsic identifier: how crazy can you get ? > Looks good and clever. Logical cho

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
rue, 0, 0); 2) x := if true then 0 else 0; 3) x := ite(true, 0, 0); // If Then Else = ITE, more correct than IIF -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
c sugar for if-then-else > > statement. > > +1 > iif is not semantic clear. IIF means "Immediate IF". Citation: "both truepart and the falsepart will be evaluated regardless of which one is actually returned." - https://en.wikipedia.org/wiki/IIf IIF is equivalent

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
2016-02-01 18:08 GMT+01:00 Jürgen Hestermann : > From the above I would vote for "InlineIf" or eve better "IfThenElse". > InlineIf sounds better than IIF. Very suggestive and correct. IfThenElse looks more like "Immediate IF" (or IfThen) functiona

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
rrect behavior ? 2. a little more oxygene compatibility ? if 1 will be chosen, is possible to create alias to InlineIf/Ifthen/whateverIf intrinsic in the future? (for example iif alias in Oxygene mode) -- Best regards, Maciej Izak ___ fpc-pascal maillist

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
fully. There is one language that has an > iif() intrinsic that evaluates only the taken branch: Oxygene. ;) > This is the strong argument for "iif". Mea culpa. You are the only one who is reading my links in this mailing list even better than me ;) Now I'm convinced

Re: [fpc-pascal] if-then-else expression

2016-02-01 Thread Maciej Izak
to start developing {$MODE OXYGENE} ? -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Maciej Izak
that name ? Same here. I see no reason to differ from it. Introducing new incompatibility is bad idea. For me is good to have booth (Oxygene compatible): x := iif (a < 3, 1, 2); V := If a < 3 then 1 else 2; sometimes is better to use first option and sometimes is better to use second o

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Maciej Izak
r than in other languages (but still compatible with Oxygene) - I like &if ;) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Maciej Izak
2016-02-02 8:22 GMT+01:00 Maciej Izak : > 2016-02-01 10:59 GMT+01:00 Michael Schnell : > >> On 02/01/2016 09:35 AM, David Butler wrote: >> >>> >>> >>> Maybe call it "inlineif" or "iif", e..g >>> >>> x := iif (a &l

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Maciej Izak
intrinsic instead of > statement to identifier and octal) ";)" emoticon means joke/not serious. Damn, you are really old fashioned. the fact is one: iif is good new name for "IfThen" intrinsic. I don't have any more to say. -- Best regards, Maciej Izak ___

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Maciej Izak
said. profit of different behavior for iif is huge: x := iif(obj = nil, 0, obj.foo); and as was stated many times, this behavior iif is *compatible with existing Oxygene* (!). Finally some compatible part. maybe is worth to implement additional IfThen intrinsic (just generic version of regular

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Maciej Izak
Is possible to close thread on mailing list? -,- -- Best regards, Maciej Izak ___ 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-19 Thread Maciej Izak
Notifications events already works in Generics.Collections. ;P ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Delphi compiler team left Embarcadero/Idera

2016-02-21 Thread Maciej Izak
 [/quote] Source: https://plus.google.com/104660942073125276831/posts/AuEUb95pUZu Related initiative "Lets buy Delphi": https://plus.google.com/115032677792043930563/posts/Tc4s6jCLEos IMO Interesting and sad time for whole community. -- Best regards, Maciej Izak ___

Re: [fpc-pascal] Delphi compiler team left Embarcadero/Idera

2016-02-22 Thread Maciej Izak
eam. -- Best regards, Maciej Izak ___ 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-23 Thread Maciej Izak
2016-02-20 9:23 GMT+01:00 Sven Barth : > Am 20.02.2016 06:25 schrieb "Michalis Kamburelis" < > michalis.ka...@gmail.com>: > > I remember a thread on fpc-devel "Pascal Smart Pointers Idea + ARC > > implementation" where the original author (Maciej Iz

Re: [fpc-pascal] Compiler Mode?

2016-02-24 Thread Maciej Izak
pi...) * I cant use the same name for class var and for parameter in method http://bugs.freepascal.org/view.php?id=24963 * generic and specialize keyword hell in extensively used generics... -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pasc

Re: [fpc-pascal] Compiler Mode?

2016-02-24 Thread Maciej Izak
2016-02-24 13:15 GMT+01:00 Michael Van Canneyt : > As said, ours is an opinion. Your mileage may vary. Phew ;) everyone can be happy! -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-27 Thread Maciej Izak
e to the FPC compiler code standard :P -- Best regards, Maciej Izak ___ 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-28 Thread Maciej Izak
y machine, works fine even for code with -New -GetMem + Initialize/InitializeArray it is important base for SmartPtr / SmartObj. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CMS in Pascal ?

2016-03-13 Thread Maciej Izak
presents it using one or another > nice template, with the necessary page links and whatnot. (as in the sample > link I presented). > mORMot + mustache? :) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Smartphone apps in FPC

2016-03-18 Thread Maciej Izak
n is possible visual remote-debugging from Lazarus (but that requires many IDE modifications). -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Smartphone apps in FPC

2016-03-19 Thread Maciej Izak
s used ofc mORMot framework I am looking forward to more information here! :) as a proof ;) : https://drive.google.com/file/d/0B4PZhd929_ZRY2NmT1QtSTdlWEU/view?usp=sharing -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepasca

Re: [fpc-pascal] Smartphone apps in FPC

2016-03-19 Thread Maciej Izak
:) > > > even is possible visual remote-debugging > > from Lazarus (but that requires many IDE modifications). > > wow, any link describing how to achieve that? Work in progress. -- Best regards, Maciej Izak ___ fpc-pascal maillist

Re: [fpc-pascal] Class constructor called unconditionally

2016-03-31 Thread Maciej Izak
911 http://bugs.freepascal.org/view.php?id=29245 -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC 3.0.0 and constref default param

2016-04-10 Thread Maciej Izak
only be specified for > value, const and constref parameters > I can confirm. Seems like is worth to put this on bugtracker :) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Build in a C compiler

2016-04-20 Thread Maciej Izak
'printf'; begin printf('%d%d%d'#10,1,2,3,4); end. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Build in a C compiler

2016-04-20 Thread Maciej Izak
> Here's the wikipedia article to make you understand: > https://en.wikipedia.org/wiki/Comma_operator In that case you are right. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal

Re: [fpc-pascal] Is Generics.collections stable?

2016-04-20 Thread Maciej Izak
nary is well tested. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is Generics.collections stable?

2016-04-20 Thread Maciej Izak
2016-04-21 6:26 GMT+02:00 Graeme Geldenhuys : > I don't see a single unit test, so that would make me weary. > Feel free to help in that field. I have inner tests, but I don't have time to adjust them for public release :\ anyway you are right, that can be confusing. -- Best

Re: [fpc-pascal] Class/Record helpers on genericd?

2016-04-25 Thread Maciej Izak
2016-04-26 7:57 GMT+02:00 Sven Barth : > > As it is right now the compiler will not allow this. > > No, I did not and it's also not planned. > That is planned in other way, as extra profit of smart pointers (related to new syntax). -- Best

Re: [fpc-pascal] Smart Pointers

2016-05-09 Thread Maciej Izak
tibility with Delphi Nextgen, also will be possible to link ARC modules with "non-ARC" modules and vice-versa). -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
is "outlawed" by definition. "Smart pointer" related syntax is step into Oxygene mode so dedication might be not enough :P. Seems like my own little FPC fork + small website to host binaries, according to current situation is rational step, especially I need to merge few ot

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
I have few working versions I need to decide which one is the best. The new syntax/compiler behavior is developed for many new elements (nullable types, smart pointers, arc objects) and must be perfect. -- Best regards, Maciej Izak ___ fpc-pascal maill

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
c, equivalent of: i := a.Instance[0]; foo(a); // compiler magic, equivalent of: foo(a.Instance); pa := @a; // compiler magic, equivalent of: pa := @a.Instance; WriteLn(pa^[0], ' = ', i); // 10 = 10 end. -- Best regards, Maciej Izak ___ fpc-

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
e started to fix few of them... -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
e" for generic methods/functions like in Java (which is on my TODO list), but is possible to compile and run example like this: var a: TManagedArray; begin Foo1(a); Foo2(a); Foo3(a); -- Best regards, Maciej Izak ___ fpc-pascal maillist - f

Re: [fpc-pascal] Smart Pointers

2016-05-11 Thread Maciej Izak
comfortable for me is excluding whole library from FPC (easier maintenance of FreePascal fork...) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Smart Pointers

2016-05-11 Thread Maciej Izak
odule with base and complex support for *any* stuff related to generics + has better testing purposes than fgl. Please just don't add Generics.* into FPC as package. :/ -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] Smart Pointers

2016-05-11 Thread Maciej Izak
compiler in other, more correct way. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Smart Pointers

2016-05-11 Thread Maciej Izak
or Delphi compatibility it performs infrastructure to *any* generics library like Spring4D etc. Sorry Sven but keeping fgl in RTL is ridiculous (!). There is no technical reason for that. Only your personal convenience. You can use normal tests suite like others. Or maybe Marco reply is untrue? -

Re: [fpc-pascal] Smart Pointers

2016-05-11 Thread Maciej Izak
2016-05-11 15:07 GMT+02:00 Maciej Izak : > > 2016-05-11 14:51 GMT+02:00 Sven Barth : > >> And I stand by that decision. Generics are a rather frickle feature and I >> want to know of critical failures as early as possible (and yes, I've made >> use of that already

Re: [fpc-pascal] passing "array of const" into cdecl procvar

2016-05-13 Thread Maciej Izak
ited but works fine for x86 on Windows. Look my old question and great answer from Barry Kelly: http://stackoverflow.com/questions/2305962/delphi-array-of-const-to-varargs It can be ported to other platforms/architectures but not so easy :) -- Best regard

Re: [fpc-pascal] Java equivalent of Pascal's class reference functionality

2016-06-08 Thread Maciej Izak
ss.getName()); throw e; } ... } -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] reference-counted function results not initialized to nil

2016-06-25 Thread Maciej Izak
Studio/Berlin/en/Program_Control#Handling_Function_Results -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New Arc attempt

2016-08-02 Thread Maciej Izak
aster implementation (based on the default field): https://github.com/maciej-izak/PascalSmartPointers which is usable also for nullable types. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fr

Re: [fpc-pascal] TArray.Sort(array) returns 'Error: Identifier not found "TArray" '

2016-08-03 Thread Maciej Izak
ix.pdf). > P.S.: You should remove the {$H+} from the generics.* units, the mode > Delphi already enables the long strings > <http://www.freepascal.org/docs-html/prog/progsu25.html>. > That will be probably removed ;) -- Best regards, Maciej Izak __

Re: [fpc-pascal] TArray.Sort(array) returns 'Error: Identifier not found "TArray" '

2016-08-08 Thread Maciej Izak
2016-08-08 4:09 GMT+02:00 silvioprog : > Will you keep the sparta-generics package at Lazarus sources? Probably yes. sparta_Generics package exist because FPC 3.0 does not contain Generics.*... -- Best regards, Maciej Izak ___ fpc-pascal maill

Re: [fpc-pascal] rtl-generics: Suggestion and question

2016-08-12 Thread Maciej Izak
ly for testing purposes, thanks to GetMemoryLayout you can see how looks memory layout for each kind of dictionary (we have many memory layouts, even more - we have unique de-amortized cuckoo hashing - http://arxiv.org/abs/0903.0391 declared as THashMap/TFastHashMap). -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-16 Thread Maciej Izak
uding packages, everything else is merely a workaround. But for that I first need to finish my work on packages." btw, already reported: http://bugs.freepascal.org/view.php?id=30433 -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-p

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
); end; var list: TDictionary; begin list := TDictionary.Create(TEqualityComparer.Construct(EqualityComparison, ExtendedHasher)); === end code === -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
2016-08-17 17:20 GMT+02:00 Maciej Izak : > procedure ExtendedHasher(constref AValue: string; AHashList: PUInt32); > begin > TDefaultHashFactory.GetHashList(Pointer(AValue), Length(AValue) * > SizeOf(Char), AHashList); > end; > there is bug, correct version: procedure Exten

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
most annoying ever (for generic programmers ;) ) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
ct(...) which is used for THashMap (THashMap is much faster than TDictionary for big data) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-23 Thread Maciej Izak
Hi, finally we have simple way to test new syntax to improve FPC quality / $MODE DELPHI without spending $ on Delphi :) Probably limited time offer: https://www.embarcadero.com/products/delphi/starter/promotional-download -- Best regards, Maciej Izak

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-23 Thread Maciej Izak
do so ;)... You can't dictate people what they can not do with compiler. That means Delphi can't be used to develop any OS project (Zeos, mORMot). -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-23 Thread Maciej Izak
ilers. They have FireDac and other stuff... -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-23 Thread Maciej Izak
2016-08-23 20:02 GMT+02:00 Marco van de Voort : > Well, that is of course subject to interpretation, is a free product > "competitive" ? Topic on G+ to get more info... : https://plus.google.com/115782878581272923715/posts/AUHPRTJyF9b -- Best rega

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-25 Thread Maciej Izak
understanding is similar to what +Roland Kossow said. Anything that someone would do to specifically target or clone our products. I expect that unless what you are doing is pretty blatant there won't be a reaction. Basically, don't try to bite the hand that feeds you.  ===

Re: [fpc-pascal] Could someone explain me which the correct triggering of the BeforeDestruction method?

2016-09-06 Thread Maciej Izak
2016-09-05 17:56 GMT+02:00 silvioprog : > FPC triggers 132, Delphi 1342. :-/ Please report on bug tracker. IMO in presented context - definitely bug. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org h

Re: [fpc-pascal] Checking the validity of Format and friends at compile-time

2016-10-05 Thread Maciej Izak
x27;, [123], []); // same string '%' works for both: integer and string values FormatUTF8('%', ['123'], []); Documentation: http://synopse.info/files/html/api-1.18/SynCommons.html#FORMATUTF8 -- Best regards, Maciej Izak __

Re: [fpc-pascal] New Feature: "Management Operators"

2016-11-08 Thread Maciej Izak
2016-11-07 22:24 GMT+01:00 African Wild Dog : > > I saw on the bug tracker a patch submission by Maciej Izak about the > feature "Management Operators". > > This feature is related to Automatic Reference Counting? > Yes. We have a working ARC objects (not officia

Re: [fpc-pascal] destructor

2017-01-24 Thread Maciej Izak
Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Parameterless constructors are not allowed in records or record/type helpers

2017-02-05 Thread Maciej Izak
;class function Foo: MyRecord ;" instead. Probably syntax "constructor Create;" will be used for record initializers in next Delphi releases (around 2018?). In FPC we have implemented this feature (not merged yet : http://bugs.freepascal.org/view.php?id=30687 ) but as "

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Maciej Izak
no self property D: Int32 read A; property E: Int32 read B; class property F: Int32 read C; ===code end=== "class property" has two advantages. First: you can use "static" methods for properties and second: will work for impr

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Maciej Izak
er scenario (for normal "property") this call will raise AV. btw. "class property" is probably slightly faster ;) because don't pass "self" parameter. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

  1   2   >