Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Fr0sT.Brutal

    Transform string into TDateTime

    Sure. SIX Copy calls. Six IntToStr calls. Argument is not "const".
  2. IMHO: First option (Classic). Delphi is typed so most collisions will be caught by type checking.
  3. 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)
  4. I agree that this identifier overriding should produce a warning or a hint.
  5. +1 for manual handling of RC resource. RAD's embedded one sucks anyway.
  6. 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.
  7. 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
  8. Unless you implement custom editors for components, making packages is pretty trivial.
  9. Fr0sT.Brutal

    record with null-terminated string

    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!)
  10. Fr0sT.Brutal

    kuLibrary

    3rd party is more about shareware projects, opensourced ones should go to "I made this" I suppose
  11. Fr0sT.Brutal

    Uniqueness and Security of domain name

    The most secure code is non-existing code
  12. Fr0sT.Brutal

    record with null-terminated string

    First read string length (obviously it must be written to the file), then set length of a string and read length number of chars
  13. Fr0sT.Brutal

    Are there any free DBGrid components out there?

    If you'd switched it first to awesome-pascal list you'd found that grid much more early 😉
  14. Up to ~XE7 StringReplace is piece of straightforward dumb slow code. Later they optimized it pretty well.
  15. Fr0sT.Brutal

    Are there any free DBGrid components out there?

    ehLib has very powerful grid and an old open-source version.
  16. 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.
  17. Fr0sT.Brutal

    Prevent External DLL from Exiting Application

    Exception raised by a DLL function will crash the app. So you can ask DLL developers /change DLL yourself to handle all exceptions.
  18. 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.
  19. Probably Google decided that apps must use system libs instead of their own
  20. 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.
  21. Fr0sT.Brutal

    When will IDE Editor support more fonts?

    Side note: VS Code is Chromium in fact
  22. Fr0sT.Brutal

    Try-Finally-end; & Exit??

    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?))
  23. Fr0sT.Brutal

    High processor due to internal loop

    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
  24. Fr0sT.Brutal

    TFileOpenDialog - limit functionality in RemoteApp

    With these requirements I guess it's easier to implement fully custom open dialog
  25. 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
×