Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by stijnsanders

  1. stijnsanders

    Hebrew font in Web Browser

    You're not showing us enough code, so we're not sure what you're trying to do. The <meta> tag you're supposed to use is <meta charset=""> not content. It also can only be either "iso-8859-1" or "iso-8859-8", you can't offer a combination there. What you can do is use "utf-8" or "utf-16" and be asured that the TStringStream you're building is written using the correct encoding, but we can only check if that's done right if you show us more code.
  2. stijnsanders

    Interesting article about dying languages

    tl;dr: It specifically mentions COBOL and Delphi as other dying languages alongside Perl, plots their decending popularity curve into the future, Delphi hits 0 a few months before Perl 😿, (COBOL years after...)
  3. stijnsanders

    Embedded MongoDB

    Just to get to know MongoDB and what it's about, I once started the hard way and created a really bare-bones just-the-essentials connector to MongoDB: http://github.com/stijnsanders/TMongoWire So, no, I'm afraid the plain MongoDB isn't quite fit for embedding. A basic install would require a basic mongoDB installation alongside with your software. What you could do depending on what you would need from the data-component, is store your own list of JSON documents indexed by their "id" value... But that won't allow you to do clever queries like mongo has with the "$" prefixed query fields...
  4. stijnsanders

    Modern C++ and Delphi

    I've heard about projects that would use Delphi for all user-facing interfaces like forms and configuration tools, but have all the deep-down stuff done by DLL's written in C++ that the Delphi front-end uses to make stuff work.
  5. stijnsanders

    ISAPI DLL concurrent requests

    Would you like to share some code? From what I learned about isapi from making xxm, it's important to catch any and all exceptions in your code, and not have them pass through into IIS as it can't properly handle Delphi exceptions and indeed may terminate the worker process. Typically you have a try except inside of every callback handler, the except clauses set an appropriate return value, but never re-raises, perhaps writes to an extra log.
  6. Just to be able to support TLS without the need for extra DLL's, I've used Windows' own 'SChannel' for a project once here.
  7. stijnsanders

    GZip compression in MARS

    Hmm, yes if it's static content, there would be sense in keeping a cache of the gzipped-data somewhere and serve that on subsequent requests. If it's dynamic content on the other hand, you might suspect this data to be one-off specifically for each request. So if there's a lot of it (and might take some time to generate, typically longer than it takes to transmit over to the client...) and you're having transfer-encoding chunked (which enables keeping the connection open when the response is sent over) then you should use TZCompressionStream's capability to zip a next chunk based on the existing stream...
  8. stijnsanders

    GZip compression in MARS

    Does MARS do streaming? Or does MARS do transfer-encoding chunked? (If so, you're apparently supposed to gzip first and then do the chunking...)
  9. stijnsanders

    his control requires version 4.70 or great of COMCTL32.DLL

    I remember Windows introduced manifest resources into exe files at some version and they also control the mapping to one of the versions of comctrl.dll that is present in the system. Could a manually modified .manifest file be causing this problem?
  10. stijnsanders

    Relaxed JSON

    I've been dabbling on a JSON parser that accepts pascal strings, and "=" instead of ":", and allows missing ","... https://github.com/stijnsanders/jsonDoc
  11. stijnsanders

    registering D6

    I rember something about old Delphi versions acting up when you've done some of the most recent windows updates. If I recall correctly, you need to delete a key "LM" under HKEY_CURRENT_USER\Software\Borland\Delphi\6.0 and then start Delphi to re-create that value with the right data.
  12. I've noticed something strange with Delphi 10.3 update 2: If you have the IDE maximized, minimize it, and restore it again, the window appears to get narrowed a bit, even the "X" top right is no longer visible. Is that a bug that is recently introduced, or is this something I only get?
  13. stijnsanders

    COM server to MARS

    I would respectfully request you to have a look at an alternative web platform I've been working on: https://github.com/stijnsanders/xxm It's not really designed to do REST endpoints, but all of the worker threads are COM enabled and also the main interface to generically connect all of the things any HTTP server environment offers is a COM interface. If I understand correctly, mapping each request to and from the different COM objects and their methods should be set up. This could be quite a manual task, or in the best case partially generated from scripts based on the IDL, but for a public facing HTTP endpoint it's important to do input sanitation and other security measures.
  14. stijnsanders


    I copied the reference code for sha256 and hmac to Delphi once, have a look if you can make these work for you: http://yoy.be/md5.html
  15. stijnsanders

    Funny Code in System.Types

    Guys, are all of you missing this? Due to the Pascal calling convention, the first (plain!) argument of a function maps into the same register(s), so in fact this is valid and correct code. Though strictly I agree it looks weird and like as if in 'normal' cases the Value members aren't assigned to Result members. Bit in fact, they're already there! So what is actually needed is a 'type size limiting' cast, which is exactly what Result.x:=SmallInt(Result.x); is.
  16. stijnsanders

    LLVM static C objects triple need for IosSimulator

    Shoudn't that be "i686-apple-darwin-sim"? https://clang.llvm.org/docs/CrossCompilation.html
  17. stijnsanders


    I like alliterations, what about "total tire travel"? https://dictionary.reverso.net/german-english/Leistung
  18. stijnsanders

    DelphiTwain on 64-bit

    Even so, is TWINDSM.DLL you're using also 64-bits? (Is this the place to get current ones?)
  19. stijnsanders

    JSON string value

    Funny thing is, I recently had to think back at how I started with Delphi. Yes I did a bit of Turbo Pascal before, but I can't clearly remember what exactly it was I needed to get fluent in Delphi. As far as I can vaguely remember, it all did start with the documentation and the 'get stated' tutorial. Even if something like that covers the bases, the next step should be obvious. You should have enough knowledge to start a simple project. I remember my first Delphi project was a good old numbers to roman numerals converter. And I took off from there. (And about the initial discussion, sorry but I can't help it, I want people to know: If you know what you're doing, and really really need only the JSON and nothing extra, I've written my own no frills JSON parser here)
  20. stijnsanders

    Saving a large project takes soooo Loooonnnnggg..

    Would mounting a RAM-disk (perhaps with something like ImDisk) work with speeding it up?
  21. stijnsanders

    Git UI tools

    I use both TortoiseGit and https://gitforwindows.org/ without any problem. Comitting shouldn't feel like it's not easy. I've worked with TortoiseSVN (and still do) as well, and with git you just need to remember you're comitting to something local and still need to push to a remote somewhere. (and/or fetch and merge)
  22. stijnsanders

    Can TFDQuery (SQLite) work as fast as TFDmemtable ?

    My own clean SQLite 3.dll wrapper is here: https://github.com/stijnsanders/TSQLite
  23. stijnsanders

    Exclude already read posts

    I just consume the RSS feed with my (own) feed reader
  24. stijnsanders

    PDF Encryption

    You should check if synpdf can do it: https://github.com/synopse/SynPDF
  25. Because of the problems with Delphi's own ISAPI units, and because I'm always searching to have the thinnest possible wrapper around things, I've created my own ISAPI units for my own web-solution: https://github.com/stijnsanders/xxm#xxm There's a lot more in the project where the entire website compiles into a single library, and the ISAPI handler (or the Apache handler, or the SCGI handler) can re-compile the library if the source has changes, or auto-update the library when a new version is available, all hot-loaded by suspending incoming requests a little while unloading the old and loading the new. But in this specific case I wonder if you would run into the same problem if you base your project on xxm.