-
Content Count
1428 -
Joined
-
Last visited
-
Days Won
141
Everything posted by Stefan Glienke
-
ScaleMM2 with MARS: +70% performance boost :-)
Stefan Glienke replied to Andrea Magni's topic in MARS-Curiosity REST Library
It's easy enough to profile where the mass of heap allocations are coming from by using FastMM full debug and log the callstacks. Or run under SamplingProfiler and check what hits the memory routines most. -
Rio has a broken REST Library
Stefan Glienke replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
@Attila Kovacs Your quote from the help is kinda misleading because the code path there is the one handling the function not succeeding but returning ERROR_INSUFFICIENT_BUFFER. @Kryvich The help combined with the code below is confusing me. It says number of bytes but then it also does a dwSize/sizeof(WCHAR) to allocate a wchar array š -
Delphi Bugs reported to QualityPortal
Stefan Glienke replied to Lars Fosdal's topic in Community Management
If you're interested, look there - otherwise too much noise for a forum imo. -
Delphi Bugs reported to QualityPortal
Stefan Glienke replied to Lars Fosdal's topic in Community Management
https://quality.embarcadero.com/issues/?jql=affectedVersion %3D "10.3 Rio" and status not in (Closed%2CDone%2CResolved) -
Yup, did that. To work around that issue, you can put list.List into the watches.
-
Delphi 10.3 TTimeSpan.GetScaledInterval Android
Stefan Glienke replied to mausmb's topic in Cross-platform
What exactly do you do, what you posted is a private method that obviously gets called from another public method. Please show your code. -
For..to..step in Delphi
Stefan Glienke replied to Primož GabrijelÄiÄ's topic in Tips / Blogs / Tutorials / Videos
@Arnaud Bouchez I know you like to deal with low level stuff but being able to be more declarative about loops and other language constructs is a benefit imo. That var passing of the loop variable is bad, but Primoz wrote that just for fun and advised not to use it. I guess every Delphi developer knows how a while or repeat loop works but I have seen enough off by one errors caused by counting the loop variable wrong, messing up the loop condition or other stuff which could just be eliminated if the language itself could treat it right without the need to put extra abstractions ontop that just make code slower. Another thing that just applies to 10.3 though is that only in a for loop you can inline declare the variable to only be valid in the loop scope and not outside. -
Custom Managed Records Coming in Delphi 10.3
Stefan Glienke replied to Marco Cantu's topic in RTL and Delphi Object Pascal
Better than releasing something that is broken and makes all your code fail, amiright? -
New feature: TMARSClientResourceJSON now implements REST.Client.IRESTResponseJSON
Stefan Glienke replied to Andrea Magni's topic in MARS-Curiosity REST Library
The joys of packages as a library author. Looks like commit ace9e54 only modified the 10.2 package. That commit removed the following files: MARS.Client.Messaging.Resource.pas MARS.Client.SubResource.JSON.pas MARS.Client.SubResource.pas MARS.Client.SubResource.Stream.pas Just remove them from the contains in the MARSClient.Core.dpk and you should be able to compile. -
untilhttps://conf.spring4d.com/
-
Custom Managed Records Coming in Delphi 10.3
Stefan Glienke replied to Marco Cantu's topic in RTL and Delphi Object Pascal
The second parameter of the Assign operator actually has to be either var or const [ref]. -
New official Embarcadero forums online
Stefan Glienke replied to Lars Fosdal's topic in Community Management
Wow they are still (happened on the old forums as well) leaking email addresses in the usernames as they seem to be generated from the email used on the old community page ... -
Clean Code and Fast Code Slides at EKON 22
Stefan Glienke replied to Arnaud Bouchez's topic in Tips / Blogs / Tutorials / Videos
I am sure using the type keyword after the equals sign was not part of the original pascal syntax and is only there to let the compiler produce a new typeinfo instead of it just being an alias that still points to the exact same type. -
Using configuration records and operators to reduce number of overloaded methods
Stefan Glienke replied to Primož GabrijelÄiÄ's topic in Tips / Blogs / Tutorials / Videos
Agreed, type redeclaration is really not very helpful in many situations. - you still have implicit type compatibility no matter what - but helpers stop working- 7 replies
-
- language
- configuration
-
(and 2 more)
Tagged with:
-
Using configuration records and operators to reduce number of overloaded methods
Stefan Glienke replied to Primož GabrijelÄiÄ's topic in Tips / Blogs / Tutorials / Videos
And after that you show why the "right" way is bad... An URL consists of different parts which combined give a string, yes but should be represented as the different parts, hence the record. Especially since there are cases where such a type cannot just be represented as string or number but consists of different data of different types. Yes there might be a string representation but it should not be passed as that through your API.- 7 replies
-
- language
- configuration
-
(and 2 more)
Tagged with:
-
New in 10.3: IDE UI Improvements in the Main Window
Stefan Glienke replied to Mohammed Nasman's topic in Delphi IDE and APIs
It will not get them more customers just because it's 64bit and runs out of memory later because all the instabilities and the compiler getting into a bad state because of compile errors or what not crashing the IDE will still be there as will the poor code tooling. Going the easy/cheap way every time is what puts Delphi and the IDE into the current situation of constantly having to react to external factors and tinker around edges. Sometimes I really have a hard time believing that or you just avoid certain features or have subconsciously developed a certain habit to do things differently. Or you just use it to prepare demos. -
Using configuration records and operators to reduce number of overloaded methods
Stefan Glienke replied to Primož GabrijelÄiÄ's topic in Tips / Blogs / Tutorials / Videos
The benefit of the TUrl type opposed to differently named overloads is also that you declare a domain type and make the API cleaner than just (string, string, string) regardless the naming of the parameters- 7 replies
-
- language
- configuration
-
(and 2 more)
Tagged with:
-
Aligned and atomic read/write
Stefan Glienke replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Well you have a different definition then than Intel in paragraph 8.1.1 it seems. So unaligned data can be as well part of a struct/record which fits into a cache line and thus is guaranteed to be atomic. -
Aligned and atomic read/write
Stefan Glienke replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
isAtomic := not IsCrossingCacheLine(unalignedData); -
Get into the beta - I guess being a maintainer of one of the most noticeable IDE plugins might help even if you are not on subscription personally. @Marco Cantu @David Millington might be helpful with that.
-
New in 10.3: IDE UI Improvements in the Main Window
Stefan Glienke replied to Mohammed Nasman's topic in Delphi IDE and APIs
Yeah, then the IDE can more excessively waste memory left and right until your RAM is used up instead of crash early, brilliant idea... Throwing more memory at an application that does not know how to properly manage memory is not the solution. Oh, please, no excuses about the compiler leaking memory because of LLVM, if you know that then don't load it into the IDE process. Ah, that has to be done to use it for IDE tooling, like code completion and all kinds of source related things. Now you see why other languages and IDEs go the way of separating this and using a language service to provide such information -
Warning W1010: Method hides virtual method of base type
Stefan Glienke replied to Kryvich's topic in RTL and Delphi Object Pascal
That fact that you have to mark overloads to a virtual method as reintroduce always bothers me but I never cba to actually report it. -
Directions for ARC Memory Management
Stefan Glienke replied to Marco Cantu's topic in RTL and Delphi Object Pascal
And how exactly can we call Add on that "New" record if ? -
Directions for ARC Memory Management
Stefan Glienke replied to Marco Cantu's topic in RTL and Delphi Object Pascal
Well, New.Of could return a record that has implicit operator overload to be assignable to the s1 variable which then implicitly goes out of scope at the end of the routine. -
Does anyone have some library/unit to make coding of tokeniser/parser/somekind of tree easier?
Stefan Glienke replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
It is very unfortunate that you used merge to get the latest master changes into your fork rather than rebasing. That makes looking at your changes very difficult (I had to look back through the commits until I found yours that were not integrated into master via PR). Also having all changes in one branch will result in some huge PR whereas putting each different change into it's own branch and submitting PRs for that would be easier to review. I don't know about Roman but I would not accept a PR with a ton of different fixes where I cannot separate them from each other and validate them individually. I just bring this up because I want those bugfixes incorporated back into the main project.