-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
Sure. SIX Copy calls. Six IntToStr calls. Argument is not "const".
-
Global variable : why the compiler don't complain about this ?
Fr0sT.Brutal replied to mderie's topic in General Help
IMHO: First option (Classic). Delphi is typed so most collisions will be caught by type checking. -
PasDoc v0.16.0 released - Documentation tool for Pascal source code
Fr0sT.Brutal posted a topic in Delphi Third-Party
Long awaited release of powerful open-source documentation generator for Pascal code is out. Get it New website, using Jekyll, generated from our wiki, see https://github.com/pasdoc/pasdoc.github.io (Michalis) Moved everything to GitHub Ancestors list is now affected by external class hierarchy (Michalis) Markdown support (Fr0sT-Brutal) Supporting bold, italic, inline code, multi-line code, URLs, lists. @note and @warning tags (Bi0T1N) @url tag (Bi0T1N) Allow to lowercase output of @nil, @false, @true by --lowercase-keywords (Bi0T1N) Automatically detect flag like [xxx] at @param description. See here for example. (PifPof) Scan implementation section of a unit in addition to the interface section (Fr0sT-Brutal) Parser improvements to correctly handle some special cases: reading chars > $FF, "*.inc" includes, files with Mac-style line endings (Fr0sT-Brutal) Mem leaks fixed (Fr0sT-Brutal) Tag parameters now could be multiline without enclosing parens by means of "line feed" character "" (Fr0sT-Brutal) Read additional command-line options from file (Fr0sT-Brutal) --auto-back-comments command-line option (Fr0sT-Brutal) pasdoc_gui opens a file given at command-line, opening WWW browser is optional (Fr0sT-Brutal) @longcode without markers fixed (Michalis) Support for namespaces in units in @links (Fr0sT-Brutal) --ignore-marker option (Fr0sT-Brutal) Test suite fixes and better documentation, in particular for Windows users Catalan translation updated (Xavier Martínez) Delphi Tokyo files, to compile all projects and packages (Carlos Feitoza Filho) Brazilian Portuguese translation updated (Carlos Feitoza Filho) Parse identifiers declared as &xxx, where "xxx" may be a reserved word. Possibility to specify additional files using -A or --additional (just like introduction or conclusion, but you can provide any number of items) (Alex Merkel) Added de.utf8 (German with UTF-8 encoding) Automatically remove %region and %endregion from comments Show visibility (public, protected, private...) inside records too (it is meanigful for advanced records) Implement in pasdoc_gui options to (Michalis) customize HTML head and body set external descriptions file configure identifiers excluded from auto-linking Rename "internal" to "nested" to describe this language feature. Because that is how it's called in official docs ( http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Nested_Type_Declarations, https://www.freepascal.org/docs-html/ref/refse41.html ) and the "internal" word has traditionally different meaning ("something not supposed to be visible/used from the outside"). (Michalis) The automatic tests are now easier to run and check (see tests/README.md) (Michalis) @raises and @param is now supported at properties as well as methods. Actually, it's supported everywhere now, but it makes sense only at properties and methods now. (Michalis) Tipue (client-side search) improvements: we have upgraded to use Tipue 6.1, which highlights the found terms we strip HTML from Tipue index, which makes the "search results" page correct Fix handling SVN fixed-length $Date:: Parsing of $if and $elseif expressions, like defined(MSWINDOWS) or defined(UNIX) (Michalis) -
Global variable : why the compiler don't complain about this ?
Fr0sT.Brutal replied to mderie's topic in General Help
I agree that this identifier overriding should produce a warning or a hint. -
How to set version number for all the projects in a project group
Fr0sT.Brutal replied to Soji's topic in Delphi IDE and APIs
+1 for manual handling of RC resource. RAD's embedded one sucks anyway.- 11 replies
-
- build version
- configuration manager
-
(and 3 more)
Tagged with:
-
Splitting existing components to run- and design time packages
Fr0sT.Brutal replied to aehimself's topic in General Help
Are you rebuilding whole VCL&RTL as well every time you build a project? ))) You're reinsuring here IMHO. Moreover, components could likely have special compiler options set in package file. -
Micro optimization: String starts with substring
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
function StrSize(const Str: UnicodeString): Int64; inline; begin Result := Length(Str)*SizeOf(WideChar); end; function StrSize(const Str: RawByteString): Int64; inline; begin Result := Length(Str)*SizeOf(AnsiChar); end; function StrIsStartingFrom(const Str, SubStr: string): Boolean; begin Result := False; if ((Str = '') or (SubStr = '')) or (Length(SubStr) > Length(Str)) then Exit; Result := CompareMem(Pointer(Str), Pointer(SubStr), StrSize(SubStr)); end; function StrIsStartingFrom(const Str, SubStr: RawByteString): Boolean; begin Result := False; if ((Str = '') or (SubStr = '')) or (Length(SubStr) > Length(Str)) then Exit; Result := CompareMem(Pointer(Str), Pointer(SubStr), StrSize(SubStr)); end; ADD: If you just check 1st char of a string, then simple `if Str[1] = SomeChar` will be faster; moreover it could be optimized further as `if Pointer(Str)^ = SomeChar` but you'll have to ensure Str is not empty -
Splitting existing components to run- and design time packages
Fr0sT.Brutal replied to aehimself's topic in General Help
Unless you implement custom editors for components, making packages is pretty trivial. -
If file could be loaded to memory fully, just use strA := StrPas(pCurr); Inc(pCurr, Length(strA) + 1); ... Alternatively, I believe there are plenty of 3rd party buffer/stream readers available (it's weird RTL still doesn't have one!)
-
3rd party is more about shareware projects, opensourced ones should go to "I made this" I suppose
-
The most secure code is non-existing code
-
First read string length (obviously it must be written to the file), then set length of a string and read length number of chars
-
If you'd switched it first to awesome-pascal list you'd found that grid much more early 😉
-
Micro optimization: use Pos before StringReplace
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Up to ~XE7 StringReplace is piece of straightforward dumb slow code. Later they optimized it pretty well. -
ehLib has very powerful grid and an old open-source version.
-
Micro optimization: use Pos before StringReplace
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Pos is much faster than Replace so what are you wondering about? Of course to not call Replace at all is faster than call it. -
Prevent External DLL from Exiting Application
Fr0sT.Brutal replied to fjames's topic in Python4Delphi
Exception raised by a DLL function will crash the app. So you can ask DLL developers /change DLL yourself to handle all exceptions. -
32bit RGBA TBitmap to RGB byte stream.
Fr0sT.Brutal replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Because timers have resolution. If lineA is executed in 1 ms and lineB in 1.5 ms, they will likely miss the difference or, even worse, add a noise by their actions thus producing irrelevant results. But if these lines are repeated in loop 10E9 times, overall difference between then will be noticeable. -
Could not load SSL library on the 64 bit Release version from Play Store
Fr0sT.Brutal replied to Alex40's topic in Cross-platform
Probably Google decided that apps must use system libs instead of their own -
32bit RGBA TBitmap to RGB byte stream.
Fr0sT.Brutal replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Another option is some kind of binary search when one comments out most of the code until things are fast and then uncomments pieces to track what exactly causes slowdown. This method is especially useful when there is some piece which runs for a small time but executes very frequently. Profilers and timers won't help much here. -
When will IDE Editor support more fonts?
Fr0sT.Brutal replied to amit's topic in Delphi IDE and APIs
Side note: VS Code is Chromium in fact -
Ehm... you could have checked it by yourself in 5 secs. Instead you wasted much more time for writing the post and other guys wasted time for answering. Where's the logic?))
-
Show us your code, probably it could be optimized though I wouldn't count on great improvement. Reading and manipulating big XML is always quite slow
-
TFileOpenDialog - limit functionality in RemoteApp
Fr0sT.Brutal replied to chkaufmann's topic in Windows API
With these requirements I guess it's easier to implement fully custom open dialog -
32bit RGBA TBitmap to RGB byte stream.
Fr0sT.Brutal replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Also: if you use FastMM4, in some configs it could enable many debug actions that help hunt bugs but slow things down. When you have massive memory allocs/disposes, difference could be significant