Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/11/24 in all areas

  1. Angus Robertson

    ICS V9.1 announced

    ICS V9.1 has been released at: https://wiki.overbyte.eu/wiki/index.php/ICS_Download ICS is a free internet component library for Delphi 7, 2006 to 2010, XE to XE8, 10, 10.1, 10.2, 10.3, 10.4, 11 and 12 and C++ Builder 10.4, 11 and 12. ICS supports VCL and FMX, Win32, Win64 and MacOS 32-bit targets. Beware Mac OS-X and C++ have not been tested recently due to lack of support from such users. The distribution zip includes the latest OpenSSL 3.0.13. 3.1.5 and 3.2.1, for Win32 and Win64. The highlights of V9.1 were posted in this topic two weeks ago, and are included in the download page. The full release notes for V9.1 are at https://wiki.overbyte.eu/wiki/index.php/ICS_V9.1 There is also a new page https://wiki.overbyte.eu/wiki/index.php/Updating_projects_to_V9.1 to help with migrating existing projects. The main ICS readme9.txt has the installation section rewritten to explain the new common groups and packages used for Delphi 10.4 and later, so you won't find any dedicated ICS packages for Delphi 11 or 12. The readme now also explains all defines in the .\Source\Include\OverbyteIcsDefs.inc file that control how OpenSSL is loaded. All ICS active samples are available as prebuilt executables, to allow ease of testing without needing to install ICS and build them all. There are four separate zip files split into clients, servers, tools and miscellaneous samples which can be downloaded from https://wiki.overbyte.eu/wiki/index.php/ICS_Samples Angus
  2. JonRobertson

    Delphi and "Use only memory safe languages"

    I do, and I suspect many others do as well. What I was mostly disappointed about was the statement below. The company promoted in that link and the accompanying webinar was DerScanner. I watched the webinar last September and it intrigued me enough to ask approval to pursue having a small project analyzed and review the results. Their home page had a short form to request a trial. Instead of providing a trial, I received an email that I will share, since it is typical marketing: I responded that I requested a trial from their home page. The reply was that my request for a trial was forwarded and included a whitepaper that "describes the key features of DerScanner". One of the key features was that DerScanner could analyze 36 programming languages, "even obsolete Delphi, COBOL and Visual Basic 6.0". I also noticed that the short form on their home page was changed from a trial request to "Get a Demo". They did provide a trial account and I submitted the project along with a couple third-party libraries (with each vendor's permission). The resulting report contained thousands of incorrect analysis. One of the more prominent and obnoxious was “hardcoded encryption key”, for code such as "ctrlKey := GetKeyState(VK_Control) < 0", and every other line of code that contained these three characters in sequence: k e y, including static text. The analysis that DerScanner provided was a complete joke and a total waste of time. The trial included two scans for free (I only used one), additional scans after the trial were $1,000 per scan. Sure, my employer can say "Yes, we are concerned about security. We had our application analyzed by a third-party that specializes in code analysis. They used a highly sophisticated tool named grep to analyze our code for vulnerabilities." I am particularly disappointed in the recent statement because I had direct contact with Ian regarding my frustrating experience, and the laugh that I had after reviewing the generated report.
  3. Kas Ob.

    Delphi and "Use only memory safe languages"

    I mentioned or to be exact dreamed about more evolved Pascal enhancement, mentioned it here at once as i recall, but really can't remember any comments or any discussions. So will write it here as it is relevant for memory safety. My suggestion is to introduce new modifier(s) to managed (and non managed) variables, this include classes/objects, the new main modifier is "Auto", example procedure Test(aFileName: string); var SList: TStringList; auto; // the compiler will ensure calling the default constructor and destructor begin //SList := TStringList.Create; // should stop the compiler with specific Error, you are not allowed to create an auto SList.LoadFromFile(aFileName); //SList.Free // should stop the compiler with specific Error, you are not allowed to destreuct/free an auto end There is also similar modifier like "init/create" and "free" these will only their part and the compiler will ensure you can't abuse the memory layout or use after free. This also can be applied to fields in TObject/Class, the compiler will put the default constructor and destructor in their right position and will stop compiling when the code is trying to call constructor and destructor. But one could say using "auto" for the fields in classes will make initializing slower, no it will not as sooner or later it will initialized or used (except other usage, will follow down), will this cause degradation in performance?, no, not really, after all there is a price for pay. Another modifier which i can argue will be very helpful, is "delayed" or "onuse".., this one is for places when you don't know if that class will be needed or not, so the compiler will not auto create it !, but will initialize it to 0 (nil), and will check against that nil on every first usage with in the current scope then call the constructor in-place, guaranteeing its readiness, while will enforce calling the destructor in every scope it mentioned (referenced) but again if it is nil then nothing to do. With "delayed" modifier there is a performance hit for sure but it is merely "if assigned(x)" and as i mentioned above at the first usage in the current scope, so when in doubt i will leave to the compiler but when i am sure i will need that delayed to be ready for lets say a loop, then i can call specific function on it or just touch it in any code so the following code will not have to have the check for creation, of course if such delayed var is used in a loop then the compiler will put the constructor before entering the loop (at the loop limit preparing code) Also to mention how clean the code will become not just eliminating user after free or use non initialized. as for compiler: Delphi compiler is already equipped and has the ability to do that so minimal adjusting is needed, it does the same with all managed types (strings, arrays..) for the suggested modifiers above it will be close to this Currently the compiler does the same with strings and arrays as seen here ( though this is my XE8 so not sure about the latest versions) for combining the suggested "delayed" with the above the compiler could check for referencing one to another and adjust or rearrange the creation and destruction order. Anyway, this i this another short by me to reach a discussion about this enhancement or call it evolution, also this is the right evolution toward more memory safety. There is also can be a suggestion for different modifier "secure" "mute" (or something), with this one the compiler will allow any assigning to referencing (or double referencing), in other words and as example, X is a class, no code such Y := X is allowed, you need X (the object in X) you have to use it where is it which is X, This will ensure specific design and will limit pointer miss using, you want to load a bunch of the like of that X in an array then either declare them there with in the array and use them there, or, custom and precise steps should be done as guarantee to the compiler that this is well thought of, otherwise we need to write better code and design the structure better, another example ; X is secure object and it is a field in the non secure Z, the compiler will not allow to use X out side the scope of this current scope and/or outside the Z, meaning, the compiler will not allow passing X as parameter to a procedure, but will allow Z, X and its value is not allowed to be used in any direct assigning ":=", still we have the ability to introduce assign as operator that will ship or duplicate X fields, but not X itself or its pointer, that pointer should not be reached or allowed to be accessed by the compiler, and when i say compiler i mean the new language constraints for these suggestions.
  4. Hey Y'All, Official launch of the 1 Billion Row Challenge Happy coding and don't forget to have fun!! Cheers, Gus
  5. JonRobertson

    Delphi and "Use only memory safe languages"

    I do, and I suspect many others do as well "Promoting tools to help in this area" sounds good. But "Sounds good" is marketing rubbish.
  6. Scaling is not linear there. Real 10^9 file (16.5 Gb) is processed in 15 minutes (936 sec) on Ryzen 5 4600H notebook (single thread).
  7. Rollo62

    Delphi and "Use only memory safe languages"

    This has bubbled up to an official statement now, I like these fast reactions 👍 https://blogs.embarcadero.com/is-delphi-a-memory-safe-language/?utm_source=Eloqua&utm_medium=email&utm_content=Article-240311-Multicontent
  8. Hey Cornelius, Absolutely!! Correctomundo!! You are correct. As any well behaved Linux command, well at least I made an effort on the Lazarus side, if you run it with the `-h` or `--help` param it will print it's usage. The Delphi one also has the same behaviour. And we also made an effort to make the Delphi and Lazarus side of things match in terms of generation. The main objective of having a generator is the fact that anyone can practice with the exact same content. The other objective is simply the fact that the file that contains the full 1 billion rows is ~16GiB. No way we were going to store that on a free GitHub repository. $ ./bin/generator -h Generates the measurement file with the specified number of lines USAGE generator <flags> FLAGS -h|--help Writes this help message and exits -v|--version Writes the version and exits -i|--input-file <filename> The file containing the Weather Stations -o|--output-file <filename> The file that will contain the generated lines -n|--line-count <number> The amount of lines to be generated ( Can use 1_000_000_000 ) The input and output files are needed. As is the number of lines to generate. The input file being the one you mentioned having the ~44K entries. The output file is of your choice. The number of lines can be in the normal base 10 format, or use underscores for the thousands separator, as shown on the usage printed above. Most have been running on test files of about 100 million rows, but this is just an example. You're more than welcome !! Hope you can make the time to participate and have a ton of fun while doing it!! Cheers, Gus
  9. Hey Gus, It seems like a fun challenge that people who have time and interest will look at and participate. We've got a couple of months, so plenty of time to get involved if you're so inclined. One question: the .CSV in the repository has only 44,691 entries. So, the idea is that we need to run the generator program first to generate the 1B file, right? I suppose this could also, then, be used to generate smaller files for development testing. Thanks for the links and for bringing it to the Delphi community!
  10. Hey Brian Evans, I was only trying to be brief, since the README file on the GitHub repository has all the needed information, plus the necessary attributions. I left the correct trail to be followed for the ones that would have the interest of getting to the bottom of it all. I don't think that me leaving a breadcrumb trail is to be used as an excuse to just dismiss the hole thing entirely. But again, maybe due to my short fuse, while it did take more than a couple of hours to actually come back and write a less honourable post, I will apologise for the type of wording I used. But not for the content itself!! Cheers, Gus
  11. I'm performing tests on both an SSD and an HDD and the results reflect that: https://github.com/gcarreno/1brc-ObjectPascal#results I'm using hyperfine to run the program 10 times. This will give the system ( Ubuntu 23.10 64b ) the opportunity to cache what it needs to cache. The specs of my machine are listed on the GitHub repository. The input file has 1 (American Billion) 1.000.000.000 lines and has the size of ~16GiB. Yeah, sorry, don't have the necessary knowledge to even comment on that 😅 Yeah, agreed! Depends on the opinion you have about using threads and their implicit complexity. But yeah, the real challenge is to make it as blazing fast as you can!! And the time to match, or beat, is one second. This from the results of the original challenge made in Java. Cheers, Gus
  12. Hey Attila, Thank you very much !!! I don't see that as an issue. I see that as a fact of life, like everyone has a personal life. Then you chose to make the time for it or not, and that depends on your schedule and your will to participate. I'm not putting a gun on anyone's head, just proposing a fun, and quite optional, exercise in programming. Cheers, Gus
  13. Welp, has to be a command line program I can time with hyperfine, as stated on the rules. Needs to output to STDOUT, as stated on the rules. Needs to be pure Object Pascal with no external libs or package dependency, as stated in the rules. Must I go on 😉 ? Cheers, Gus
  14. Stefan Glienke

    What new features would you like to see in Delphi 13?

    Niklaus Wirth just turned over in his grave about this proposal.
  15. Vincent Parrett

    What new features would you like to see in Delphi 13?

    that sent me down a rabbit hole for the last few hours 😉 The most interesting thing though was the link to talk on the Carbon compiler Super interesting talk (although annoying that he takes sooo many questions during the talk when we can't actually hear the questions and he doesn't repeat them - wish people would save the questions till the end). I've written bunch of lexers/parsers/ast's over the years - this talk makes me want to go and rewrite them all (of course I won't because I just don't have the time).
  16. HTML Library / SQL framework: 0.33s. Zero lines of code)
  17. TotteKarlsson

    What's the general opinion on v12?

    I am disappointed in the CMake/compiler implementation, as it fails to compile a standard 3rd party project, e.g. Poco (https://pocoproject.org/). Poco used to compile even with the old compiler, and is obviously easy to compile with Visual Studio. However, as libraries evolve, together with the C++ language, the old compiler is now more or less obsolete. This fact prevents me from even trying another large 3rd party C++ project, like OpenCV or VTK. This "should" be no problem, as the Clang C++ compiler is absolutely capable of compiling these projects. However, with a broken front end CMake implementation, it is a more or less an impossible task. This makes the whole platform not very useful, unless for small projects not using 3rd party C++ libraries. I hope the day comes when CMake has an Embarcadero/Clang compiler option, that can be selected and compile these very important 3rd party libraries, without copy and pasting CMake files around on the file system, as now is the proposed solution (https://docwiki.embarcadero.com/RADStudio/Athens/en/Using_CMake_with_C%2B%2B_Builder) , that I have tried, and cannot get to work. These are not real solutions, but just crude hacks... that does not even work. I have a post about this here
×