-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
Automatically killing a service when stuck
Fr0sT.Brutal replied to Thijs van Dien's topic in Windows API
F.ex., some corruption in memory manager that happened in bg thread could make the whole app insane. Full control over the whole stack is an utopia; you write code that runs 3rd party code that runs tons of RTL code that runs tons of OS DLL functions that run hardware drivers... And all these levels could cause deadlock. It's frequently better to shut the service down and restart it - with proper logging of course - than just hang waiting for dev to come. Consider it as a network socket that couldn't connect. Just reconnect and things will be OK. -
Migration from BDE paradox to TFDtable or other options
Fr0sT.Brutal replied to Javier Tarí's topic in Databases
Well then, probably you have low concurrent queries in fact or a truly brilliant application. Here at work we once had a complex based on Paradox and it was just a Pandora's box of paradoxical bugs. Ten years ago it was changed to Oracle and forgotten like a nightmare. Anyway, the initial question is sort of incorrect. What exactly do you mean by performance? What structure your complex has? How many users, requests, reads/writes etc are expected? These are architectural questions. Implementation-specific questions are related to DB-classes. Usually if you reach the limits of TTable or experience very high memory consumption, it means you have wrong structure ("select * from DAMNBIGTABLE" + TTable + DBGrid with possibility to fetch billions of records). Client app doesn't need too much data. Simple example of low memory consumption: one master table with only ID's and multiple detail tables linked by this ID to master. In every moment client app will have loaded only the list of ID's and details for just a single ID. -
Migration from BDE paradox to TFDtable or other options
Fr0sT.Brutal replied to Javier Tarí's topic in Databases
So you suppose everyone is aware of the Paradox performance? Seems it was already dead when I finished school Multiuser with hundreds of tables? On Paradox? You're such a joker! -
Migration from BDE paradox to TFDtable or other options
Fr0sT.Brutal replied to Javier Tarí's topic in Databases
You weren't asking for any additional requirements. TTable by definition stores all its fetched data (but it won't fetch ALL records in dataset at once unless you make it to). I'm not aware of any dataset implementation that is able to keep only a part of data besides the most primitive IBSQL that stores just the current record. -
Migration from BDE paradox to TFDtable or other options
Fr0sT.Brutal replied to Javier Tarí's topic in Databases
SQLite - lightweight, widely used, open source Zeos - mimics TTable -
Best type for data buffer: TBytes, RawByteString, String, AnsiString, ...
Fr0sT.Brutal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
What perf gain it really brings? My feelings say that allocation cost is much greater than fill cost. Especially because the latter is very well optimized with asm routines using block CPU commands -
Migration from BDE paradox to TFDtable or other options
Fr0sT.Brutal replied to Javier Tarí's topic in Databases
Hmm, SQLite+Zeos? -
Delphi's code formatter vs. GExperts' code formatter
Fr0sT.Brutal replied to dummzeuch's topic in GExperts
Isn't it a bug as well? b-c-d should go right below a -
How make event be called with an inherited class?
Fr0sT.Brutal replied to Magno's topic in Algorithms, Data Structures and Class Design
Honestly I don't think the "private" stuff is important for protecting. It's more like for logical structure, exposed API's and the number of shown items in field list. Private items could be changed freely without care about breaking changes but if someone wants to access them, why not let him do it? -
Best type for data buffer: TBytes, RawByteString, String, AnsiString, ...
Fr0sT.Brutal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
Sure it could be done with any AnsiString. But "RawByteString = type AnsiString($ffff);" so I just manually set the right value. I suppose no conversion is done for this codepage so regardless of the value compiler will set to result, it still will be raw bytes. I really can't understand why wouldn't they name the "any codepage string" type like "CodepagedString" and make RawByteString behave just like its name supposes PS Post #555! )) -
Best type for data buffer: TBytes, RawByteString, String, AnsiString, ...
Fr0sT.Brutal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
Yes, faced the same issue. Despite its name, this type is kinda tricky. I had to use SetCodePage(S, $FFFF, False); in my function where I create variabe of this type. -
Contributing to projects on GitHub with Subversion
Fr0sT.Brutal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
In every place, to get local one's 1-hour speech, just say "What the hell they did with this country..." 😄 -
How make event be called with an inherited class?
Fr0sT.Brutal replied to Magno's topic in Algorithms, Data Structures and Class Design
If you only deal with Windows, check out my https://github.com/Fr0sT-Brutal/Delphi_SChannelTLS set of classes that allow to add OS-provided TLS to any communication transport (even SendMessage 🙂 ) . But OTOH I wish Emba adopted curl in the form of obj-s. -
Contributing to projects on GitHub with Subversion
Fr0sT.Brutal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
It's a big surprise that Trump influences mobile network in EU 😄 -
Best type for data buffer: TBytes, RawByteString, String, AnsiString, ...
Fr0sT.Brutal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
That's why hard-coded index should be avoided where possible. @str[1] => Pointer(str) @arr[0] => Pointer(arr) for i := 0 to Length(arr) => for i := Low(arr) to High(arr) / for elem in arr Low and High for strings will also work in modern compilers -
Best type for data buffer: TBytes, RawByteString, String, AnsiString, ...
Fr0sT.Brutal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
Byte array still really lacks useful optimized routines. Annoying thing is that in general the code of such routines could be almost the same (Length, SetLength, indexed access...). I wish RTL had good old pointer-and-length routines as basis so that calling them on string, tbytes or even raw buffer would be equally convenient. Regarding the topic: I'd still use byte strings because they're simple to use and convenient but try to isolate string-specific stuff to routines so that changing them to tbytes would be just a matter of type rename. -
Contributing to projects on GitHub with Subversion
Fr0sT.Brutal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Honestly I'm got so used to TortoiseGit that I don't use built-in CSV facilities neither in RAD nor in VSCode. In RAD I've setup several most used commands as external tools (commit, pull, log and command line). I also added these commands to file manager (with Classic start menu app even Windows explorer allows to setup custom commands and place them on toolbar) -
Contributing to projects on GitHub with Subversion
Fr0sT.Brutal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Contrary, I first got used to Git and then had to use SVN for committing and it felt sucks. -
Sure. But it could be a bug in RTL's wrapper (there are chances for this because zlib is used much more widely so such a critical bug would've been reported much earlier).
-
The core of zlib is borrowed from C sources compiled to obj so you can build your own obj from recent version and try to use them. Anyway I think the problem MUST be reported to QC together with problem files because the issue is critical, it could cause DoS on any Delphi server. 10.3 sources say they use zlib 1.2.11 which seems to be the latest version
-
Automatically killing a service when stuck
Fr0sT.Brutal replied to Thijs van Dien's topic in Windows API
From what I've read about these functions, there are always timeouts for close/system shutdown notifications. So OS will do what it intended to regardless of the app's reaction. Yes, this is clear. It's just not clear from description that these functions could help with non-interactive service without any user action. -
Automatically killing a service when stuck
Fr0sT.Brutal replied to Thijs van Dien's topic in Windows API
I've never seen a hang console app that couldn't be closed. And while service of course could hang, the description of these functions always mentioned WER dialog and user clicking a button. -
How to operate a private field in other unit?
Fr0sT.Brutal replied to pcplayer99's topic in RTL and Delphi Object Pascal
F.ex., C-like langs are full of such constructions that allow such write-only clauses as "while (*p++=*r++)" or "i+++++j" but noone tries to throw them out. Shittycode could be written in any language even in Brainfuck (lol) -
Automatically killing a service when stuck
Fr0sT.Brutal replied to Thijs van Dien's topic in Windows API
AFAIU this mechanism only deals with GUI apps not services and requires user interaction anyway? -
But it uses built-in ZLib anyway.