Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/19/24 in Posts

  1. Just for completeness, there are also some lists on version information on the Delphi Wiki: https://delphi.fandom.com/wiki/Delphi_Release_Dates https://delphi.fandom.com/wiki/CompilerVersion_Constant https://delphi.fandom.com/wiki/Delphiversions.inc https://delphi.fandom.com/wiki/RTLVersion_Constant https://delphi.fandom.com/wiki/Borland_Compiler_Conditional_Defines https://delphi.fandom.com/wiki/Delphi_Build_Numbers I (and a few others) try to keep them more or less up to date, but I just noticed that some have lapsed again. Having seen that there are other lists that seem to be better maintained I'm considering just pointing there instead. The whole Wiki is mostly outdated anyway, the original maintainer(s) having disappeared.
  2. Yes, they work 🙂 (and why wouldn't they?). program RecursiveAnon; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; function MakeFib: TFunc<integer,int64>; var fib: TFunc<integer,int64>; begin fib := function (value: integer): int64 begin if value < 3 then Result := 1 else Result := fib(value - 1) + fib(value -2); end; Result := fib; end; begin var fib := MakeFib; for var i := 1 to 10 do Write(fib(i), ' '); Readln; end.
  3. Patrick PREMARTIN

    Is there a Delphi "subprocess" library?

    Isn't it what TDosCommand does ? (for Windows only) https://github.com/TurboPack/DOSCommand
  4. Thanks for pointing to this, there I also find the link to Darian Miller's great version list https://github.com/ideasawakened/DelphiKB/wiki/Delphi-Master-Release-List Thanks for that great summary. Which makes me reconsider my simplified, internal nomenclature, which also uses 3 elements Major, Minor, Update. Nevertheless, I think this list is perhaps not 100% clear regarding the patch nomenclature, or I miss something, for example. VER360 D29.ATHENS. 12.1.0.1 12.1 Patch 1 VER360 D29.ATHENS. 12.1.0.0 RAD Studio 12 Athens Release 1 VER360 D29.ATHENS. 12.0.0.2 12 Inline Release VER360 D29.ATHENS. 12.0.0.1 12.0 Patch 1 VER360 D29.ATHENS. 12.0.0.0 RAD Studio 12 Athens VER350 D28.ALEXANDRIA.11.3.0.0 RAD Studio 11 Alexandria Release 3 VER350 D28.ALEXANDRIA.11.2.0.1 11.2 Patch 1 VER350 D28.ALEXANDRIA.11.2.0.0 RAD Studio 11 Alexandria Release 2 VER350 D28.ALEXANDRIA.11.1.0.2 11.1 Patch 2 VER350 D28.ALEXANDRIA.11.1.0.1 11.1 Patch 1 VER350 D28.ALEXANDRIA.11.1.0.0 RAD Studio 11 Alexandria Release 1 VER350 D28.ALEXANDRIA.11.0.0.4 11.0 January PAServer Patch VER350 D28.ALEXANDRIA.11.0.0.3 11.0 November Patch VER350 D28.ALEXANDRIA.11.0.0.2 11.0 PA Server Patch for iOS VER350 D28.ALEXANDRIA.11.0.0.1 11.0 Patch 1 VER350 D28.ALEXANDRIA.11.0.0.0 RAD Studio 11 Alexandria VER340 D27.SYDNEY. 10.4.2.3 10.4.2 RTL Patch 1 VER340 D27.SYDNEY. 10.4.2.2 10.4.2 General Patch 1 VER340 D27.SYDNEY. 10.4.2.1 10.4.2 Compiler Patch 1 VER340 D27.SYDNEY. 10.4.2.0 10.4.2 RAD Studio Sydney Update 2 VER340 D27.SYDNEY. 10.4.1.4 10.4.1 Sydney Patch 4 VER340 D27.SYDNEY. 10.4.1.3 10.4.1 Sydney Patch 3 VER340 D27.SYDNEY. 10.4.1.2 10.4.1 Sydney Patch 2 VER340 D27.SYDNEY. 10.4.1.1 10.4.1 Sydney Patch 1 VER340 D27.SYDNEY. 10.4.1.0 10.4.1 RAD Studio Sydney Update 1 VER340 D27.SYDNEY. 10.4.0.0 RAD Studio 10.4 Sydney ... This leads me to the rule for versioning: Major Release Update Patch version version version version 10. 4. 2. 2 Where the 4 elements have the meaning: Major = is the major version Release = is a kind of Minor version Update = is a kind of kumulative, big Patch or Build Patch = is a kind of Build, as small patch, or inline release, or maybe build, where the numbering and naming can be not very consistent. Patch can be a running number, no matter if the original patch number may differ. VERnn0 = A combination of relocated running Major and Release, with the options to have a 3rd number for exotic reasons (not happened in the near past). Is my understanding of the everchanging naming wilderness correct, to get a more consistent view about this? At least for future releases. The question will be, how to detect the Update and Patch parts by runtime correctly? I think this is not consistently possible at all, and always will be a manual process, or a lot of hardcore trickery, by checking DLL versions or the like.
  5. Nicolò Blunda

    Form size reduced in macOS

    I have find the solution. In MyForm.Create I insert this Constraints.MinWidth := MyForm.Width; Constraints.MinHeight:= MyForm.Height; Note that if MyForm.Position property is set to Designed, this affects only MyForm aspect under Windows OS and not under macOS.
  6. David Schwartz

    Access to Dropbox/Google Drive/One Drive

    TMS Cloud Pack is the best I know of. (There are a few varieties of it.) There's a free trial that works when running inside of the IDE if it's just for your own use. Only you can place a value on your own time. Far too many programmers undervalue their time and refuse to pay for stuff that costs less than a day's earnings, some less than one hour's earnings. Also, if you're building a solution that's going to put money into your pocket (by selling to clients), then why should someone pay you for something of value if you don't see the value in the work others do? You pay people to prepare food for you; you pay for electricity delivered to your house; you pay for water, sewer, and garbage collection; you pay for clothes that people make; you pay for food that people farm; you pay for music, for movies, for popcorn; you even pay $1 or more for a bottle of water where the bottle costs more than the water inside of it; but you won't pay for software that people write? Let's say it took someone a week to build each of the interfaces in TMS VCL Cloud Pack -- it's probably more than a month, with all of the testing, support, and other stuff they've got invested, none of which you're going to provide by rolling your own -- and you don't think it's worth it to save yourself a month or more of your time by paying $200 USD or so to have a solution ready-to-go in 5 minutes? Do you only earn $200 per month? Is that how LITTLE you value your time -- that you'd "spend" 200 hours of your time in order to "save" $200? That works out to a whopping $1 per hour that you value your programming skills at. This whole notion of "software should be free" baffles the hell out of me. It's like when the CEO of Spotify said recently, "Very little effort goes into making music." Then he raised his subscription rate. Yeah, like that took him a few thousand hours to do. It will actually put a few hundred million dollars into his pocket, while not adding a penny of income to the artists who he's hardly paying for the "very little effort" they put into their artistry. I paid for a college degree in Math and Computer Science. I've spent 40+ years honing my skills, and untold thousands of dollars on tools, hardware, and services. I charge a lot for my time as a software developer, because I believe I deserve it. If someone would rather hire someone from India at $2/hr that's fine by me. You get what you pay for. But I've ALWAYS found it FAR CHEAPER to pay for software that has hundreds if not thousands of hours of work behind it than trying to do it myself from scratch. People PAY ME TO BUILD STUFF FOR THEM! Why would I want to charge them for the time it takes me to re-invent something from scratch that I can buy that's already working, debugged, and production-ready? Spending $200 for a software library that probably has over 1000 hours of work put into it is a SCREAMING DEAL in my mind. (Would it surprise you to learn that I have a TMS ALL-ACCESS PASS license?) BTW, did you write your own Delphi compiler and IDE?
  7. Hey my challenge peeps!! We have finally arrived at the end of the challenge!! It's been a fun ride, to say the least. The final results have been posted, with the usual minor ooopss, of course. Like stated before, I'll be accepting entries until I'm no longer in this plane of existence. A new results table for those entries will be made, and it will include all of the entries, old and new. Eventually, I'll also publish a results table for 400 Stations and 8 threads. Just need a bit of breathing space to get that done. But it will come. Let's hope this repository, and the effort of the participants, can stand as an example of the power that still resides in Object Pascal. Let's hope we can all shut up the nay sayers by merely pointing at it. All the best for you all in your future Object Pascal endeavours!! Cheers, Gus
  8. Hey my challenge peeps!! Looks like we have the results of the comparison back and Object Pascal is quicker than Java. Reference: https://github.com/gcarreno/1brc-ObjectPascal/discussions/103#discussioncomment-9359820 Cheers, Gus
  9. My dear challenge peeps!! Now that the Blaise Pascal Magazine new edition is out, I can finally talk about this: Ian Barker has written an article that mentions our little challenge. I would provide a link to this new edition if I could. Their site is a bit sub-par, to put it quite politely. Cheers, Gus
  10. And don't forget the command line parser available in mORMot 2. - Works on all OS; - Works on Delphi and FPC; - Can auto-generate the help content with proper formatting; - Minimal code writing. In practice, resulting code is short and efficient: https://github.com/synopse/1brc-ObjectPascal/blob/main/entries/abouchez/src/brcmormot.lpr#L446
  11. Nice list, thanks 👍 You missed these few, probably: https://rosettacode.org/wiki/Parse_command-line_arguments#Delphi https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.SysUtils.FindCmdLineSwitch https://github.com/exilon/QuickLib/blob/d085aa28e5fd65bae766446f5355ec4dc80fae9e/Quick.Commons.pas#L1292 https://wiert.me/2015/05/13/on-the-delphi-tcommandparser-class-for-parsing-command-lines-and-arguments-via-suggestions-for-how-to-define-command-line-parameters-stack-overflow/ https://github.com/jackdp/JPLib/blob/master/Base/JPL.CmdLineParser.pas https://github.com/tokibito/delphi-argparse
  12. This is a "classical" problem with Delphi, overloaded functions, and floating points values. IMHO using currency is an awful workaround here, and should not be kept in any serious codebase. It works "by chance". Another workaround, still using the Math unit, is to make the computation in two steps: function RoundExDouble(x: double): Double; begin x := x * 10; Result := Ceil(x) / 10; end; function RoundExInteger(x: double): Integer; begin x := x * 10; Result := Ceil(x); end; So the expected Ceil(double) overload is clearly picked up by the compiler. Or define our own unique Ceil() function, which does not depend on Math.pas and ensure we use the right value type: function ceil(x: double): integer; begin result := trunc(x) + ord(frac(x) > 0); end; This is this solution I used in my entry of the challenge: stay away from Math.pas. 😉
  13. Hey Cornelius, We are coordinating, live, on Discord. I'm not sure you're a Discord person, or even if you're into online chat things, but I thought you should have that piece of info. We are assembling on these: The "Delphi Community" Discord server on the events channel The "Unofficial Free Pascal" Discord server on the off-topic channel( mainly, because the server owner did not create a channel for the event ) Cheers, Gus
  14. Lots of options! Command-line parameter validation fixed for Delphi--pull request made. Generated a few different sized files for testing, the last two: 100-million row file created in 9 seconds 1-billion row file created in 2 minutes, 23 seconds.
  15. Hey Cornelius, I was actually considering this one: VSoft.CommandLineParser That one seems to be a self contained thing without dragging much more. But also had these in the back burner: rcmdline FDC.CommandLine.pas GpCommandLineParser.pas But now I need to add that one to my list since I don't have it 😃 Thanks !! Cheers, Gus
  16. So assuming that your code scales linearly it will only take 92 days for 1 billion rows
  17. 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!
  18. Hey Attila, I am know to go off in tangents and angry rants, sometimes, for not much. I'm also involved in a bunch of other communities like Telegram(English and Portuguese, Lazarus and Delphi), Discord( 3 Servers of Lazarus and Delphi) and the Lazarus Forums. In none of those have I ever had such a response. In all of the above I try really hard to welcome the padawans that wander in with the most devilishly incomplete and weird questions, trying to hang on to the patience of a saint. Heck, I even got made MVP by Ian because of that alone!! When I come to a new place and I'm greeted this way, welp, my short fuse did get lit, consumed and passed the spark to the gun powder!! I probably need to apologise for the words I've used. But I'm not apologising for the message conveyed! Cheers, Gus
  19. Hey dummzeuch, BTW... Writing 5 paragraphs with a conjecture of how to do it and then dismissing the entire thing as being "not much of a challenge" is a bit of a crappy dismissal, no? Instead of just resting on your thought experiment, why don't you put your money where your mouth is and prove what you claim? Shooting from the hip is rather easy, but making an entry and proving your chops is something entirely different, right? I'm a bit miffed and my choice of words may seem harsh, but the lack of usefulness or any point in the answers I got just gave me a very bad brogrammer machismo vibe that I've only seen in Stack Overflow. If this is the type of welcome you peeps extend to a newcomer... I dunno... It's pretty toxic... Even in the case that this could not be the type of thing that the regulars here have an interest in, at least a sense of community is the least to expect, no? I deeply regret the thought I had of attempting to post here! I just hope that name calling and dumb shaming is not the next thing I'm to be dealt... Cheers, Gus
  20. 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
  21. Darian Miller

    Is there a Delphi "subprocess" library?

    There's quite a few options out there. I wrote a related blog post and provided some example code: https://ideasawakened.com/post/use-createprocess-and-capture-the-output-in-windows
  22. dummzeuch

    Is there a Delphi "subprocess" library?

    If I understood this correctly, a Python subprocess starts an external program, connects its stdin/out/err to pipes and gets the return code when it exits. There is nothing like this in the standard Delphi RTL but there are multiple third party options. If I remember correctly one is in the JCL, another is my own TAsyncExec class in unit u_dzAsyncExec which is part of my dzlib library.
  23. Dalija Prasnikar

    Recursive anonymous functions

    var [weak] fib: TFunc<integer,int64>; Marking it as weak breaks the cycle. However, there was a bug with weak that is only recently fixed (not sure whether in 10.3 or 10.3.1)
  24. Primož Gabrijelčič

    Recursive anonymous functions

    Of course it is! You can do this: for i := 1 to 10 do Writeln(MakeFib()(i), ' '); As Stefan noted on a side-channel, calling MakeFib causes a memory leak because the anonfunc interface now contains a cyclic reference to itself.
  25. Lars Fosdal

    Recursive anonymous functions

    You should read this post
×