Jump to content

Joseph MItzen

Members
  • Content Count

    270
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Joseph MItzen

  1. Joseph MItzen

    "Divided by zero" exception

    Division by zero is division by zero, whether it's 0 / 0 or 1 / 0.
  2. Joseph MItzen

    List of usable RegEx for source code

    I never use any RegEx in my code.
  3. If you're using the version of Python bundled with your Linux distro, you should either install NumPy from the Linux distro's package manager, use the "--user" option to install the package in the user's home directory (making sure the path is adjusted accordingly) or install into a virtual environment. Otherwise you could have problems with the distro package manager and pip conflicting. The distro package manager won't know pip installed NumPy to the system directory and could end up overwriting it in the future during an install or update.
  4. Joseph MItzen

    FireDAC Add On discountinued? (Good by Embarcadero?)

    It was like a one step forward, one step back situation: I believe they removed FireDAC from Professional at the same time they added Mobile support to it.
  5. Joseph MItzen

    FireDAC Add On discountinued? (Good by Embarcadero?)

    Honest question - you pay $500 and then $250 a year to use an open source database, with none of that money going back to the database project itself?
  6. Joseph MItzen

    Best Practices for FireDAC FetchMode/RecordCount Settings

    That depends on the database and the version. For instance, in PostgreSQL < 9.2, a count(*) query would have to perform a sequential scan through the database: MS SQL Server, and now PostgreSQL, can often do index-only scans in situations like this, for much quicker results.
  7. Joseph MItzen

    10.4.1 Update

    They're modern classes in essentially every way except inheritance. I imagine they did this to get around the memory management issues with the standard classes. Heck, even Niklaus Wirth in the past has suggested that objects are just Pascal records with methods. 🙂
  8. Joseph MItzen

    10.4.1 Update

    But what happens now that Embarcadero has been turning records into classes?
  9. Joseph MItzen

    10.4.1 Released today

    When did they hire a Java developer to name things?
  10. Joseph MItzen

    XML to SVG

    Honestly, if I ran the idea of paying $149 to be able to display an SVG file to any programming forum outside of this one, I guarantee you the reaction would not be positive. I've always said, "Make money with Delphi, not from Delphi". A survey of developers found that the number one reason they gave for choosing a language for a project was the number of libraries available for it (and preferably open source ones). When the Delphi community tries to charge for things that are free everywhere else, it just makes it that much less likely that someone will choose Delphi in the future. The barrier to entry is raised that much higher.
  11. Joseph MItzen

    XML to SVG

    And yet, that's the way the software world has headed towards. Open source is more than just good for "social collaboration", it's good for producing secure, reliable code at a potential pace that far outstrips what any commercial vendor can produce (e.g. the Linux kernel has more contributors than even Microsoft can devote to its own kernel).
  12. Joseph MItzen

    TEmbeddedWB in a 64 Bit application

    Damn, even floating points have to wear masks right now.
  13. UTF8 doesn't need a BOM regardless of encoding.
  14. BOM is both not required by the UTF8 standard and discouraged. Use of a BOM is neither required nor recommended for UTF-8, but may be encountered in contexts where UTF-8 data is converted from other encoding forms that use a BOM or where the BOM is used as a UTF-8 signature
  15. I thought it was only Windows programs that ever put the BOM in in the first place. At least in the Linux development community they tend to consider it a Windows thing. Wikipedia says... So basically no one should be expecting a BOM in a UTF-8 file (and it's not required) so I don't believe you'd run into problems omitting it.
  16. Joseph MItzen

    RAD Studio 10.3.3 now available

    This is what they're saying on Reddit too... the software says contact support, and the support team just sends an email back saying to refer to the FAQ which states that support doesn't cover Community Edition. 😞 It's a crazy Catch-22.
  17. Joseph MItzen

    RAD Studio 10.3.3 now available

    So from what I've been hearing, when the year is up the user is going to have to uninstall the old CE, get a new license (if they're still offering it) and then install the new CE and all of their components over again. At least that's what the understanding is without any official comment to the contrary.
  18. Joseph MItzen

    Cross-platform solution to forcefully end a thread

    Life, the universe, everything... and threads. Lots of things are theoretically possible but incredibly difficult in practice. And should one want to do things the hardest and most error-prone way possible? Professor Lee goes on with a mathematical/logical proof for two pages disagreeing with you on this. 🙂 He goes on about a theory of equivalence for sequential programs, and then... Basically, you can't know that you've written a threaded program whose behavior is deterministic except in the most trivial of cases. The case I cited in my reply to Lars mentioned a project whose purpose was to test using rigorous engineering practices to combat threads and despite code reviews, 100% code coverage, the involvement of concurrency experts, etc. it took four years to turn up a deadlock problem. And that's why threads are evil. Even the SQLite FAQ reads.... I believe this idea is becoming mainstream enough in computer science (if not in application development) that we're seeing the creation of the actor model, the MapReduce algorithm, etc. as ways to implement parallelism more safely. For those interested, I just started reading "Seven Concurrency Models In Seven Weeks: When Threads Unravel" and so far it's a great book. It covers threads and locks, functional programming, separating identity and state, actors, sequential processes, data parallelism, and the lambda architecture. Hee hee, I'll leave you with my favorite quote from Lee's paper then (in jest!)....
  19. Joseph MItzen

    Cross-platform solution to forcefully end a thread

    I'm not sure I can agree with your optimistic outlook. Threads are inherently nondeterministic in a way that human beings are not. -Edward A. Lee, "The Problem With Threads" It's more like traveling on the back of a hungry crocodile. If I may quote Swizec Teller's discussion of Lee's paper because it sites a perfect example (as well as giving its own car-related analogy): That's not a comforting example, is it? Concurrency tends to cause problems, but threads are a really dangerous practice because of the shared memory issues. Processes, the actor model, functional programming with immutable values - there are a lot of other solutions that are a lot less volatile. As Guido Van Rossum pointed out several years ago, threads were never even originally intended for parallel computation! Unfortunately, a lot of developers continue to equate concurrency with threads. As Mark Summerfield puts it,
  20. Joseph MItzen

    Cross-platform solution to forcefully end a thread

    But processes can do all those things as well while being much less dangerous.
  21. Joseph MItzen

    Cross-platform solution to forcefully end a thread

    Is now a good time to bring up that threads are evil? 😈
  22. Joseph MItzen

    Saving registry keys

    OK, that is the worst name for a return value I've ever encountered!
  23. Joseph MItzen

    Firebird 3 and SP in Object Pascal

    Well, again, they're working towards adding other language abilities, so it's not like it's been rejected on design grounds. As for security, some of the languages available with PostgreSQL come in "trusted" and "untrusted" modes. For instance, from the PostgreSQL documentation: And of course any of these other languages will need to be enabled by a system administrator. Regarding "rm -rf" or the like, the PostgreSQL database should be set up to run under its own account with very limited privileges and its own group. In PostgreSQL, only database superusers can create functions with an untrusted language. Now as for performance, there are two points. The first regards performing actions on a large volume of data.It can be far quicker to perform the action on the server, even via Python, than to move the entire body of data to the target machine and perform that action locally. The second is that other languages can allow the end user to easily perform actions that would be incredibly difficult via the inbuilt procedural SQL language, hence it's a performance enhancer. To quote from the anonymous author of "PostgreSQL Vs. MS Server": Python and R have become the dominant languages in data analysis, and machine learning which is why MS SQL Server has added support for them (along with .NET languages). Being able to use a machine learning routine or do logistic regression right on the server inlined with SQL is a really powerful feature.
  24. You really don't want to have an honest discussion, do you? You seemed to come into it with some sort of chip on your shoulder.
  25. Having lots of methods that all do the same thing with a slight twist isn't a good idea. In normal development, you make that one function and supply a parameter. For instance, you don't want one function that returns squares of a number, another for cubes, etc. You have one power function that takes a parameter that raises a number to the specified power. I'm also not clear about the coupling. Classic OOP would, for instance, create a deck of cards class and then inherit from that to produce a blackjack game and a poker class would similarly inherit from the deck class. In the VCL, TJpegImage, TPNGImage, etc. are all inheriting from the TGraphic base class. If they all inherited from the TImage class instead you wouldn't need to do any converting to load and alter an image. In fact, this is how many popular image libraries across languages work. ImageMagick, one of the most popular open source image editing libraries, has a ReadImage method that takes a file name and returns an ImageMagick Image object. One function to load any image type, one object type returned to work with. Pillow is the most popular library in Python. One image type, "image". Further: Same idea as ImageMagick. It's the VCL inheritance scheme that seems rather ad hoc and unusual.
×