Jump to content

Joseph MItzen

Members
  • Content Count

    270
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Joseph MItzen


  1. 7 hours ago, David Heffernan said:
    • binary integral literals (i.e. %0101 which equals 5 in decimal)
    • _ can be used as a digit separator for integral literals, e.g. const oneMillion = 1_000_000 (essentially the parser just ignores _ when parsing such literals)

    OK, that's two more things I can cross off my list of 35-45 improvements I wanted that I drew up in 2013. At the current rate of one to two items per release, as long as I don't add anything more to the list and they stop taking wishlist items back out (e.g. memory management) maybe another 15 years and I'll be all set. :classic_unsure:

     

    Seriously, I've had this list sitting on my desk since 2013 and every time I encounter something I think Delphi needs I squeeze it onto the same sheet of paper. It's getting rather crowded. It took me a minute to find "binary const" squeezed in between "int to bin" and "automatic memory management".

    • Haha 1

  2. 5 hours ago, Sherlock said:

    Show of hands: Who mucks up their code with decimal separators? Or would that one accountant who happens to dabble in Delphi please stand up!

    I do! And so does everyone else apparently. As I explained on Reddit last night, according to the Python Enhancement Proposal that was drawn up when Python wanted to add this feature, a version of this feature is already present in Ada, C#, C++, D, Java, Julia, Perl, Ruby, Rust and Swift (and subsequently Python and now Delphi). It makes it much easier to correctly read long numbers and be sure you've entered them correctly. In Python you can also use it to break up hexadecimal constants into words and binary literals into nibbles.

    • Like 1

  3. 5 hours ago, Darian Miller said:

    "To anyone trying to install RAD Studio 11, there is a hiccup on license refresh: In the Product Registration window please select the Advanced button, and in the License manager select your license and use the Update button. Alexandria gets added, continue with installation."

    The QA team missed that it doesn't want to install?

    • Confused 1

  4. On 5/22/2021 at 5:33 AM, adyble said:

    We manage the PK another way to not get duplicates and maintain sequences. We have more control our way. Never used one in 30 years.

    That's... not normal. This is as strange to me as the Delphi user on the old forum who said he never uses Delphi strings, only Pchars. You're not supposed to have control; the database is supposed to have control. You declare what you want and the RDMS query optimizer decides the best way to retrieve it. I can guarantee you there's no query optimizer designed with your "another way" in mind.

    • Like 4

  5. On 9/3/2021 at 5:51 PM, Uwe Raabe said:

    Nothing I am aware of

    Nothing that allows specifying the format in a template?
     

    OK, just looked; dang, the Datetime utilities are even worse than I remembered, and IMHO they're worse than Turbo Pascal's - which could convert a datetime into a record of all of its elements. With Delphi, datetime completely omits any type of dot notation and your datetime code ends up looking rather like LISP with all the parentheses.

     

    Whoever designed Delphi's datetime unit must have never seen another language's datetime library and been mad besides. So... many... functions. Except useful ones. The day Delphi gets optional parameters I'm writing an open source datetime unit for it.

     

    Even FreePascal can parse an arbitrary datetime string....

     

    https://www.freepascal.org/docs-html/rtl/sysutils/formatdatetime.html

     


  6. 10 hours ago, David Heffernan said:

    I love the parts where he says RAD Studio is awesome and Visual Studio is terrible.

    "and RAD Studio is the only tool I have found that actually makes the overall development experience extremely pleasurable. It has everything you need... well thought out, and highly customizable."

     

    I'd hate to see what he's comparing it to.

     

    Last weekend I was using a JetBrains IDE on Linux. I started creating a constant to hold a Linux path; it was really long, the file system is case-sensitive and I was trying to recall the path from memory. Somehow the Jetbrains IDE recognized that the string I was typing was a directory path and its code completion suddenly switched to offering suggestions to complete the file path. Now instead of almost certainly screwing up the path I was able to get the whole thing entered with just a few keystrokes. My jaw dropped open for a few seconds after the IDE pulled this trick on me. This came on top of discovering when I wanted to suppress a compiler warning that you can turn off warnings on a line-by-line basis for certain warnings or all of them. And this is done by specially-crafted comments so you don't even have to access a menu or use a special key combination to do it.

     

    I find it hard to imagine that RAD Studio, which still doesn't have code completion and compiler warnings sorted out after several years, and doesn't even allow key binding customization, is the only IDE that would be bearable to Joe Hecht.

     

     

    • Like 3

  7. On 6/9/2021 at 2:43 PM, sjordi said:

    This could be great news.

    Not really. Its website today is the same as when I used it 15 years ago; it still touts its number one selling point as the fact that it's a "BDE replacement". 

     

    This db has "SQL 92 compatibility" in 2021. It has no window functions, common table expressions  or other modern SQL features that you can get in something like SQLite (and once you use those, you never want to go back!). Its interface is the old TDataset style , e.g. https://www.componentace.com/help/absdb_manual/usingparametersinqueries.htm or even worse https://www.componentace.com/help/absdb_manual/addingnewrecords.htm.  

     

    I'm not sure it's added anything since I last used it in 2005. Their news page seems to suggest I'm right:

     

    https://www.componentace.com/info/news.php

     

    Major update in 2008, one new feature added by 2010. Supposedly a major update in 2012 but it doesn't list any changes and there's no changelog or version history because, again, it's like it's still 1999 on the website. Every Absolute Database update seems to be a "minor upgrade". The fact that it still supports Delphi 4 suggests it doesn't incorporate any modern (or not-so-modern) Delphi features either. They also have three articles about why you'd want to replace the BDE with this, suggesting they haven't updated their marketing since circa 1999. 

     

    Seriously, here's a web archive snapshot from 2005 and you can see nothing's changed:

     

    https://web.archive.org/web/20050807080939/https://www.componentace.com/

     

    I know this community tends to fetishize proprietary software, but seriously this is an obscure db whose reason for existence was to replace  the Borland Database Engine, which is long gone. There's no reason for it to exist today and you're not going to get anything for your $299 (software + source code) that you can't get for free, except perhaps grey hair from having to wait so long to finish your queries.

     

    EDIT: Good lord, under support they still list a FAX number and "ComponentAce is a Borland and CodeGear Technology Partner". :classic_blink:

    • Like 1

  8. On 6/9/2021 at 3:33 AM, sjordi said:

    Any experience with that tool to share with the community?
    Thanks

    I used Absolute Database a long time ago, so this might have changed, but....

     

    ...it was SLOW. Incredibly slow. Queries that ran instantaneously in dbs like FireBird took many seconds to run in Absolute. In fact I recently ran across one of my old programs compiled with Absolute Database and ran it on a modern CPU and... yes, it wasn't my imagination. Still unbelievably slow on a system that has to be at least six times faster than the one the code was originally written for. 

     

    I don't think SQLite needs an alternative; it hasn't become the most-used database in the world for no reason. Hence, there's no reason to look at Absolute Database for your embedded database needs. And for (almost) everything else, there's PostgreSQL. Unless your needs are incredibly exotic, these two can match or surpass any other solution for free. 


  9. On 5/19/2021 at 7:49 PM, Attila Kovacs said:

    I've already asked before, how can you work on a slow and laggy VM?

    It sounds like washing your feet with socks on.

    I've never encountered anyone except Delphi users who develop inside VMs. Seriously, no one else. I'm not sure why you'd want to do it either. You're going to end up with less RAM, slower CPU, slower disk access, and the need to maintain two OSes now. I can understand testing in a VM where isolation and reproducibility are important, but I don't understand the advantages of using a VM for development. Honestly, it might have something to do with how hard it's been historically to get a Delphi development environment set up (or upgraded).

    • Like 4

  10. On 5/12/2021 at 9:16 AM, Lars Fosdal said:

    3D GPU performance is a mixed bag, imo - but why would you test that in a VM? 

    You'd remote debug that from the VM on a physical machine.

     

    On Linux with KVM one can reserve hardware for the VM to have dedicated access to. On my home desktop I finally got this set up correctly so that a Windows VM has exclusive access to an old second video card I stuck in the machine. I was able to run some 3D games in the VM essentially as well as the old card could before under native Windows. I hooked the card's output to the second input on my monitor and can toggle back and forth between fullscreen Linux and fullscreen Windows with hardware GPU. 🙂 The keyboard and mouse can be toggled between systems and the sound is virtualized although one could also dedicate these to the VM too if they have the extra hardware.

     

    I *think* it's possible to configure things under some circumstances to automatically switch graphics cards such that, say, Linux boots with the newer graphic card but when the VM runs Linux gets the old card and the VM gets the better one, but I haven't tried this yet. If possible, it's not exactly easy.

    • Like 1

  11. On 5/19/2021 at 8:11 AM, Lars Fosdal said:

    MS submitted changes to the Linux kernel in June 2020 that would allow running Hyper-V hosting on Linux.

    Not sure if this is present in any current Linux release yet.

    I don't believe it was about running Hyper-V on desktop Linux so much as being able to replace all but Hyper-V's micro-kernel with Linux (aka "Linux as the root partition"). It doesn't look like the user space patches have landed yet to allow actually creating virtual machines with it.

     

    https://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Linux-Root-Partition

     

     


  12. 2 hours ago, David Heffernan said:

    It's all proscribed by ieee754.

    IEEE754 dictates exceptions?

     

    <Should know better than to question David Heffernan; checks and finds out it's true.>

     

    Wow. Interesting. Apparently several other languages ignore this... Python, Ruby and Perl all raised the same exception for either case when I just tried them. PHP returned INF or NaN and only issued a warning (good old frightening PHP). I guess my hat's off to Guido Van Rossum, Yukihiro Matsumoto and Larry Wall for doing the sensible thing rather than the "right" thing. As usual, Rasmus Lerdorf manages to zig when he should zag. 🙂

     

    Also, I now formally declare my allegiance to Unums, which only have two exception types....

     

    https://en.wikipedia.org/wiki/Unum_(number_format)


  13. 2 minutes ago, David Heffernan said:

    Well, this depends on whether or not exceptions are masked

    OK, let me try this then...

    Vandrovnik's code example raised different exceptions depending upon whether 0 / 0 or 1 / 0 was attempted, with no exceptions masked or calls to outside libraries. MDagg seemed to be justifying this because of the two returning different results. In that context I felt that they should both have raised a "division by zero" exception since that was what was attempted in both cases, regardless of returned value.

     

    And that's all I have to say on the subject lest I start thinking that 7 * 13 = 28....

     

     

    • Haha 1

  14. 24 minutes ago, David Heffernan said:

    Well, for ieee754 the former is NaN and the latter is +inf. 

     

    What I meant to say was that if an exception is called "division by zero" it should be raised for any division by zero or else renamed.


  15. 1 minute ago, Vandrovnik said:

    Try 1/0 and 0/0 on Wolfram Alpha: https://www.wolframalpha.com/input/?i=0%2F0

    Today I learned 1 / 0 is "complex infinity". :classic_blink: Perhaps I should have written "If an exception is called 'division by zero' it should be raised for any division by zero regardless of the numerator otherwise its name is misleading."

     

    I just checked and SymPy live gives the same complex infinity symbol for 1 / 0 while CoCalc & SageCell (powered by SageMath) raises a traditional "rational division by zero" exception for each. Wolfram and SymPy seem to be more math-oriented while SageMath is more programming-oriented I guess.

×