Jump to content

julkas

Members
  • Content Count

    44
  • Joined

  • Last visited

Everything posted by julkas

  1. Pascal bindings for PrimeSieve library - https://github.com/JulStrat/primesieve-pas. Examples provided. Tested with Rio 10.3 CE. it's my first code for Delphi. Suggestions and critics are welcome ...
  2. julkas

    Your Delphi verion does not support COMMAND

    Delphi 10.3 Community Edition $ dcc32 --version dcc (Embarcadero Delphi for Windows) 33.0 Embarcadero Delphi for Win32 compiler version 33.0 Copyright (c) 1983,2018 Embarcadero Technologies, Inc. $ dcc64 --version dcc (Embarcadero Delphi for Windows) 33.0 Embarcadero Delphi for Win64 compiler version 33.0 Copyright (c) 1983,2018 Embarcadero Technologies, Inc.
  3. Difficult question. Revise your project requirements. Don't forget CI, maintenance, community support, open source ... C or Pascal, front-end or back-end, firmware or UI, storage? Can you give more info about project?
  4. julkas

    Dashboard for Firebird

    For web reporting I use Tibco. Good option - Apache SuperSet.
  5. julkas

    Sql-Add Number begining of an INT field

    UPDATE mytable SET DOCNO = CAST(CONCAT('21', DOCNO) AS INT)
  6. julkas

    Physically reduce jpeg image size??

    Try recommendation-for-compressing-jpg-files-with-imagemagick
  7. julkas

    Binary size, how-to make it smaller?

    May be - kolmck
  8. There is no ready to use Pascal implementation 😞 . You can start / take ideas from existing C++ & Java code and create good (without remove/delete 😞) ordered set or order statistics set (array bisection algorithm may be helpful) Object Pascal class.
  9. Take a look - Binary Array Set. Rare, but very useful data structure.
  10. OK, it depends. Anyway, I suggest - xoshiro / xoroshiro generators Or 🙂 start with simple SplitMix64 Efficiently Generating a Number in a Range
  11. For parameters you can use const or var qualifiers (option - declare absolute). For return - use generic pointer. See - Parameters Pascal is a strongly typed. :-). https://ideone.com/5r1Uqf
  12. See - https://github.com/kandiral/Kandiral/tree/master/Automation Check also - http://www.pascalscada.com/ (I don't know about Delphi support).
  13. julkas

    Pascal bindings for PrimeSieve library

    Updates: added prime tuplets iterator (2, 3, ..., 6).
  14. I need platform independent and FPC compatible random unsigned 64 bit generator. Here is my solution: program rnd; {$IF Defined(FPC)}{$MODE Delphi}{$ENDIF} {$INLINE ON} function RandU64(): UInt64; inline; begin Result := UInt64(Random($10000)); Result := (Result shl 16) or UInt64(Random($10000)); Result := (Result shl 16) or UInt64(Random($10000)); Result := (Result shl 16) or UInt64(Random($10000)); end; var i: integer; begin Randomize(); for i := 1 to 1000 do WriteLn(RandU64()); end. Can it be done better? Thanks.
  15. julkas

    Chess board

    Check also: https://forum.lazarus.freepascal.org/index.php/topic,14956.0.html https://wiki.freepascal.org/fpChess
  16. julkas

    KC Chess

    Yet another old chess program written in TP5.5. https://github.com/JulStrat/kcchess
  17. julkas

    NERO5 chess engine

    Nero 5 is a chess program written in Pascal by Jari Huikari.
  18. julkas

    NERO5 chess engine

    It's old chess engine written in Turbo Pascal. It's good for beginners and not only. You can increase / decrease engine default thinking time with + / -. Executable created on Windows 10 with Delphi Community Edition is in the folder Delphi. So just enjoy chess and power of great Turbo Pascal. I think it's clear.
  19. Another generics collection (with TimSort) - https://github.com/avk959/LGenerics I don't know about Delphi support.
  20. Interesting. BTW I use always Merge Sort and Tim Sort.
  21. julkas

    Multiple two UInt64 modulo

    Hiere is my ASM code for (a * b) mod m, where a, b, m - UInt64. Can it be done better ? Thanks. Online - https://ideone.com/LKNjMM. program mulmod; {$IF Defined(FPC)}{$MODE Delphi}{$ASMMODE Intel}{$ENDIF} function MulModASM(a, b: UInt64; m: UInt64): UInt64; asm MOV RAX, a MOV RCX, m MUL b DIV RCX MOV @Result, RDX end; var a, b, m: UInt64; begin m := $FFFFFFFFFFFFFFFF; a := 3; b := m - 1; WriteLn(a, ' ', b, ' ', m); WriteLn(' ASM - ', MulModASM(a, b, m)); WriteLn('Pascal - ', (a * b) mod m); end.
×