Re: [fpc-pascal] with in classes/records

2018-09-04 Thread Maciej Izak
not best idea. You can always wait for my implementation because I am working on this (in free time, feature rather expected at the end of year) and you can extract patch and submit to FPC (or create your own earlier if you wish). "Default field without indexer" will be needed for Delphi compati

Re: [fpc-pascal] Auto vars (again)

2018-08-19 Thread Maciej Izak
Delphi is able to break the rule and such interface is released earlier (but no one was able to provide this example) - I was also trying without success, so SCOPEDINTERFACEDESTROY seems really Delphi compatible. -- Best regards, Maciej Izak ___ fpc-pascal ma

Re: [fpc-pascal] Auto vars (again)

2018-08-18 Thread Maciej Izak
e are many other directions to solve "auto free" problems without compiler modifications - maybe not all can be solved but many problems for sure - for example you have ready to use TAutoFree from mORMot or initial experiments with ARC objects for NewPascal (still

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-17 Thread Maciej Izak
Counting support" -- 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] Management operators question

2018-05-25 Thread Maciej Izak
all. In the worst scenario I will "burn out" (which is not planned by me) but in general FPC will be better. -- 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] Management operators question

2018-05-25 Thread Maciej Izak
s. I am waiting for any concrete message almost since month. -- 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] Management operators question

2018-05-25 Thread Maciej Izak
1 calculation. The work is discontinued and MO without further work / other features is not fully usefully so removing MO from trunk seems for me like rational step. Am I wrong in some point? If yes then please explain me :). -- Best regards, Maciej Izak ___

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Maciej Izak
nd related compiler fixes can be found in NewPascal and in https://github.com/maciej-izak/generics.collections (for now it works for trunk and 3.0.4 but may stops to work with tunk/3.0.4 at some point). NOTE 2: I have hope at some point to merge back all my patches and features with official FPC trunk

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-21 Thread Maciej Izak
nk about it too much to avoid > nightmares :P > xD > I've decided to lift the restriction again in r39078. Happy now? > I can't be fully happy because I am not part of FPC core anymore but for sure I am more happy than before :) -- Best regards, Maciej Izak _

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-21 Thread Maciej Izak
ill be able to do new mode when I will done few modeswitches, but now I am outside core team, situation is a little complicated but I am more determined. :) -- 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] Feature announcement: Dynamic array extensions

2018-05-20 Thread Maciej Izak
fferent route than those modes that copy existing > implementations. > I am worried about all Pascal modes including ObjFPC and Delphi mode. :) -- 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] Feature announcement: Dynamic array extensions

2018-05-20 Thread Maciej Izak
tax. It was consulted with community or this is just individual decision? (and here sorry if I overlooked something). -- 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] Feature announcement: Dynamic array extensions

2018-05-20 Thread Maciej Izak
nd this decision. It is some punishment for using Delphi mode? -,- IMO bad decision. For the consequence the following code var f: array of TSomeRec = [(a: 10; b: ['1', '2']), (a: 20; b: ['6'])]; should be also prohibited in Delphi mode, because it not works in Delphi li

Re: [fpc-pascal] Copy dynamic array

2018-05-15 Thread Maciej Izak
2018-05-14 11:46 GMT+02:00 Torsten Bonde Christiansen : > SetLength(NewArray, Length(OldArray)); > for i := Low(OldArray) to High(OldArray) do > NewArray[i] := OldArray[i]; > you can just use : NewArray := Copy(OldArray); looks better ;) -- Best regards,

Re: [fpc-pascal] Stack alias for ARC like memory management?

2018-04-25 Thread Maciej Izak
tps://github.com/maciej- izak/freepascal/tree/fastrtti ) which is related to speed up managed types (also very important for management operators) 3. "default field" functionality for smart pointers / simple ARC classes 4. finish work for closures 5. few parts of extended RTTI 6. aspects after point

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
elpers" because it is reserved for more amazing feature like "aspects", but when type helper has the same root as aspect (aspect as sub kind of helper) then "with" can be used for both : "type helpers" and "type aspects" -- Best regards, Ma

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
more elegant for example as specialization in new type) ... instanceA := TClassA.Create; instanceA.Method1; instanceA.MethodB1; // defined in unit B instanceA.MethodC1; // defined in unit C -- Best regards, Maciej Izak ___ fpc-pascal maillist -

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
2018-04-23 13:45 GMT+02:00 Maciej Izak : > https://github.com/maciej-izak/PascalSmartPointers/tree/master/examples > small mistake, this is more proper url :) https://github.com/maciej-izak/PascalSmartPointers/tree/master/sources -- Best regards, Macie

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
rk is in progress (not yet in trunk), but can be tested with NewPascal version of FPC compiler. You can check examples (compilable with NewPascal): https://github.com/maciej-izak/PascalSmartPointers/tree/master/examples the usage in PascalSmartPointers is rather more advanced and related to man

Re: [fpc-pascal] compile time init'ing records

2018-04-13 Thread Maciej Izak
n my TODO list (but not with high priority). -- 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] compile time init'ing records

2018-04-13 Thread Maciej Izak
2018-04-13 10:51 GMT+02:00 Ryan Joseph : > Records don’t have default constructors also like other modern languages > so they need some work in my opinion. > FPC has "Initialize" operator for such purposes : http://wiki.freepascal.org/management_operators -- Best r

Re: [fpc-pascal] compile time init'ing records

2018-04-13 Thread Maciej Izak
2018-04-13 10:29 GMT+02:00 Marco van de Voort : > p.s. does r:=default(r); do anything ? Or does that only work in generics? works for non-generics types too, can be used instead of FillChar(..,..,0); -- Best regards, Maciej Izak ___ fpc-pas

Re: [fpc-pascal] compile time init'ing records

2018-04-12 Thread Maciej Izak
end; var myRec: TMyRecord = TMyRecord_Default; ===code end=== you can also try new management operator "Initialize": http://wiki.freepascal.org/management_operators -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.free

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-03-30 Thread Maciej Izak
ich shows the idea in private. > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.o

[fpc-pascal] ANN: Generics.Collections 2.0

2018-03-08 Thread Maciej Izak
I'm pleased to finally announce next release of rtl-generics aka Generics.Collections 2.0 version for trunk available in trunk ;) version for 3.0.4 available at : https://github.com/maciej-izak/generics.collections What is new: * New collections: - TSortedList - THa

Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Maciej Izak
toFree.One(list, TList.Create) do begin list.Add(x); { ... some other stuff with list here } end; // <-- here is called list.Free end; There is also nice module AutoScope which uses management operators (!) by Dmitriy Pomerantsev aka pda0: https://github.com/pda0/Auto

Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Maciej Izak
2018-03-08 9:12 GMT+01:00 Michael Van Canneyt : > You can still use objects. +1. in most of cases this is enough -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mail

Re: [fpc-pascal] Managed record questions

2018-03-07 Thread Maciej Izak
ence on performance for RTL and Object Pascal. Because of legacy of all FPC modes the topic is a little complicated but IMO is possible to achieve (for such feature new mode should be introduced [and maybe modeswitch]). -- Best regards, Maciej Izak

Re: [fpc-pascal] Managed record questions

2018-03-07 Thread Maciej Izak
ng this same template every time is daunting and records don’t have > inheritance so there’s no way to capture it once. > Management operators are almost unusable without default field/default property. How it works you can see here : https://github.com/maciej-izak/PascalSmartPointers the examples

Re: [fpc-pascal] Operator overload resolution with arrays

2018-02-05 Thread Maciej Izak
my code - internal errors, fatal errors, errors without source locations and false errors... New challenges/issues to fix :) -- 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] Operator overload resolution with arrays

2018-02-05 Thread Maciej Izak
r for MyInteger { something } end; for such case TMyHelper (or operator) should be invisible in specializations, otherwise compiled program will explode :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] Operator overload resolution with arrays

2018-02-05 Thread Maciej Izak
-generics seems pretty outdated > compared to your repo? > I'am working on Generics.Collections 2.0 it is not ready for trunk yet (anyway https://github.com/maciej-izak/generics.collections is full functional for 3.0.4 and trunk - just few tests are missing and part of interface for T*AVLTree*

Re: [fpc-pascal] Operator overload resolution with arrays

2018-02-05 Thread Maciej Izak
record with class operator Equal * use Generics.Collections -- 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] _Release call location for unused function results

2018-01-30 Thread Maciej Izak
tion is: would we like to enabling this for all Delphi modes? > > Everything that needs this is essentially feature abuse. I would not enable > it by default +1 . Anyway I am still considering : commit or not :P. -- Best regards, Maciej Izak ___

Re: [fpc-pascal] _Release call location for unused function results

2018-01-30 Thread Maciej Izak
quot; seems more proper even in Delphi mode. Probably SCOPEDINTERFACEDESTROY should stay off for all modes including Delphi modes. -- 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] _Release call location for unused function results

2018-01-29 Thread Maciej Izak
r do begin WriteLn('Foo <'); end; 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] Generics vs templates

2018-01-09 Thread Maciej Izak
improved for incoming smart pointers/objects). -- 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 procedure modifier []

2017-11-16 Thread Maciej Izak
all :( see: https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=35000 in above example it works without semicolon without any problems -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://list

Re: [fpc-pascal] fpc procedure modifier []

2017-11-16 Thread Maciej Izak
nicode) enables prefixedattributes, all other modes need an > explicit modeswitch to enable it. > > Let's keep it clear, simple and unambiguous. +1 . so I think that we have clear situation. -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] fpc procedure modifier []

2017-11-16 Thread Maciej Izak
maybe is possible to use both "[]" at the same time, but that need to be checked. -- 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 procedure modifier []

2017-11-16 Thread Maciej Izak
for $prefixedattributes in DELPHI/DELPHIUNICODE mode is not decided yet (but IMO this is probable 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] Generic compiler error

2017-10-23 Thread Maciej Izak
2017-10-23 14:33 GMT+02:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Don't know. Only time will tell. > Did we have new team member? I would like to meet him! ;) -- Best regards, Maciej Izak ___ fpc-pascal

Re: [fpc-pascal] State of Extended RTTI

2017-10-21 Thread Maciej Izak
ds and for classes with managed fields. I am in last testing phase. After FastRTTI the plan is to continue work with other RTTI elements: $RTTI directive and related parts with improvements for rtti module, typinfo and so on step by step. -- Best regards, Maciej Izak

Re: [fpc-pascal] Managed properties idea

2017-10-09 Thread Maciej Izak
TFoo.Create) do begin WriteLn(o.SomeMethod); o.SomeProperty := 123; end; end; ===code end=== Maybe at some point the first code listing will be valid in FPC too (by usage of new modeswitch SCOPEDINTERFACEDESTROY). implementation of TAutoFree can be found here: https://github

Re: [fpc-pascal] Managed properties idea

2017-10-09 Thread Maciej Izak
e end=== somehow similar in usage like "using" from C# -- 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] Managed properties idea

2017-10-06 Thread Maciej Izak
nalizing and > copying that record. See $fpcdir/tests/test/tmoperator[1-10].pp > ... and here is library with exclusive usage of "management operators" for FPC: https://github.com/pda0/AutoScope ... and here is experimental smart pointers/

Re: [fpc-pascal] Comparison operator for generics

2017-09-12 Thread Maciej Izak
ords without operator overloads. > Generics.Defaults :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] Comparison operator for generics

2017-09-12 Thread Maciej Izak
t regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Const attributes

2017-07-30 Thread Maciej Izak
2017-07-30 18:37 GMT+02:00 Marcos Douglas B. Santos : > 1. Is this by design? > Yes. To disallow this you need to use {$J-} directive. > 2. Is there a way to declare attributes "final" like Java does? > No for constants. -- Bes

Re: [fpc-pascal] Compiler debug build

2017-07-22 Thread Maciej Izak
use this: make clean all LINKSMART=1 CREATESMART=1 DEBUG=1 OPTIMIZE=0 OPT="-gl -gw -godwarfsets -O-1" -- 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] Static local variables available?

2017-07-20 Thread Maciej Izak
st{$J+} s : string =''; {$POP} begin writeln(s); if s = '' then s := 'hello from static local variable'; end; begin foo; // will print empty line foo; // will print 'hello from static local variable' foo; // will print 'hell

Re: [fpc-pascal] Size of program vs library ?

2017-05-17 Thread Maciej Izak
od to have reported thing like this on bugtracker for documentation purposes (even if finally will be rejected). -- 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] Size of program vs library ?

2017-05-16 Thread Maciej Izak
2017-05-16 10:15 GMT+02:00 fredvs : > It works for all situations, so I propose that fpc add --gc-sections as > parameter for the linker if the user has used -XX parameter to compile a > library. > for features requests please use https://bugs.freepascal.org . -- Best regards,

Re: [fpc-pascal] Constants in generics

2017-04-09 Thread Maciej Izak
X: TB; === 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] Feature announcement: Management Operators

2017-02-28 Thread Maciej Izak
2017-02-28 13:19 GMT+01:00 Michael Van Canneyt : > You do now. I took care of that :) Thanks ^^ now I can officially fix bugs related to new feature. Mhm. Great... ;) -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] Feature announcement: Management Operators

2017-02-28 Thread Maciej Izak
2017-02-28 12:28 GMT+01:00 denisgolovan : > Thanks a lot. > I guess http://bugs.freepascal.org/view.php?id=30687 should be closed now > :) > I don't have such powers ;) -- Best regards, Maciej Izak ___ fpc-pascal mailli

[fpc-pascal] Feature announcement: Management Operators

2017-02-28 Thread Maciej Izak
ner). Future directions and opened doors (where management operators can be used but not directly): + "default" field for better handling smart pointers / nullable types (maybe will be introduced new type called proxy record for handling "default" modifier) (eg. https://github

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Maciej Izak
2017-02-07 19:49 GMT+01:00 Mattias Gaertner : > In FPC static class methods can be virtual as well. So we have bug... -- Best regards, Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Maciej Izak
you can use property as array and is possible to use index keyword. type TFoo = class class function F(i: integer): byte; static; class property P1: byte index 10 read F; class property P2[idx: integer]: byte read F; end; -- Best regards, Maciej Izak __

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Maciej Izak
property: ===code begin=== var Foo: TFoo; begin Foo := TFoo.Create; WriteLn(Foo.D); end; ===code end=== > True. > OTOH you loose some possibilities. > True. -- 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] 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

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] 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] 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] 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] 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] 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] 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] 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-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
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

[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] 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

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
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
); 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-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: 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] 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] 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] 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] 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] 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] 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] 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] 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
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
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
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-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-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
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
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
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-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] 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] 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] 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] 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] 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

  1   2   >