-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
"Incompatible parameter lists" when using Types.T*DynArray?
Fr0sT.Brutal replied to Zoë Peterson's topic in VCL
I suspect you only could change the event declaration to generics or define your own alias. Type aliases have pretty much quirks (for ex., even if T1 and T2 are declared identically, they're not compatible). -
Is it possible to create a VPN client/server in Delphi?
Fr0sT.Brutal replied to Clément's topic in RTL and Delphi Object Pascal
Again. What exactly he wants to have? Full featured VPN with system-wide local network, system-wide secure channel and app-specific secure channel are 3 different things. -
while TStream_TryRead() do
Fr0sT.Brutal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
This design was made to handle streaming sources (socket, pipe, file being written, etc). At the moment of call there could be no data but next time it could arrive (I'm sure you know it anyway). But it really could puzzle those who are not aware of this behavior and are sure that Read() really waits until it reads requested amount of data. -
Commented out exceptions in OverbyteIcsHttpPort
Fr0sT.Brutal replied to sfrazor's topic in ICS - Internet Component Suite
I answered you in PM, so adding more specific info regarding ICS here: it is async so you have to setup message pump by yourself. I'm not sure ICS is the best choice here. Moreover, you have main DLL that loads child DLL via system's low-level functions (memorymodule) that itself loads SSL DLLs via regular LoadLibrary. It's just a nighmare Not the architecture I'd like to support If you only target Windows, why not try WinInet/WinHTTP - the short sync function will do all the network magic for you, without any exceptions (result code is returned). Moreover it will respect proxy settings of a target OS. -
Type within a class
Fr0sT.Brutal replied to AndrewHoward's topic in Algorithms, Data Structures and Class Design
OT: this always requires a knowing people (or knowing AI) to realize how to name "the weird thing you see in code" properly. The following RTFM-ing with exact naming is trivial but that initial step could be really hard. -
Detect stack full for recursive routine
Fr0sT.Brutal replied to david_navigator's topic in RTL and Delphi Object Pascal
You can setup counter and check it. The catch is that you never know how much space is occupied on the stack by single call. First I'd add logging of enters and leaves to that function and see whether it is really the source of problems. Then you'd have to decide whether this consumption is acceptable by algo (like matrix reverse - big matrix means big nesting, that's not an issue in algo but in input) or it's a algo's flaw (endless/excess recursion). In the former case you can try to optimize the code. Remember any local variable eats stack - probably you can reduce their number by using heap or object fields. Function parameters, if there's many of them, also consume stack so you can unite them into a record (but store it in heap otherwise it eats stack of the caller). -
Communication between Unicode and non-Unicode applications
Fr0sT.Brutal replied to dummzeuch's topic in Indy
Anyway, if your server is supportable and updatable, I'd recommend to throw away any ANSI (ACP, Def system codepage etc) stuff and just explicitly use UTF-8 and probably explicit plain ASCII for commands. -
Is it possible to create a VPN client/server in Delphi?
Fr0sT.Brutal replied to Clément's topic in RTL and Delphi Object Pascal
Do you really need N in VPN (local network between peers connected through the channel) or just what browser addons and mobile apps call VPN (secure proxy)? -
Problem with JSON library "SuperObjects"
Fr0sT.Brutal replied to chkaufmann's topic in Network, Cloud and Web
Probably there is some option to not use paths or redefine path delimiters? -
Hmm, IMHO click-then-press is pretty weird sequence. This doesn't work neither in text editors nor with graphical tools I ever used. No surprise the system is not ready to handle it as you want it to.
-
Compile and Run from IDE OK but not if Running from the Output App.
Fr0sT.Brutal replied to amit's topic in Delphi IDE and APIs
Try under IDE with Project Options > Debugger > Notify on language exceptions Also try running under IDE with F7, then open CPU window with ASM code and Go to address $ 0142EA7C -
String comparison in HashTable
Fr0sT.Brutal replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I watched the video in jumps but what I understood: - The guy needs specialized function to check if a word is from a very short set of predefined words - These words are latin - He uses "hash" as int32 = s[0],s[1],s[-2],s[-1] (inputs are ASCII/UTF8 but algo may also work with UTF16 with only 1st and last char used as hash) (hmm, but he'll got array of 2bil of pointers then...) - The hash is assumed to be unique for his set (he just takes wordlist[key] without any sub-arrays of items with the same hash) - And he also checks for 1st char before running full compare -
String comparison in HashTable
Fr0sT.Brutal replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Well, I just watched it super quickly with rewind but my guess is that he optimizes a parser or something similar when software already got token that is known to be an identifier and he just wants to quickly check if it's a keyword. I wonder whether things would be even faster if he'd stored lengths of keywords and compared them before calling strncmp. That should give some gain on cases with similar first letter but different lengths -
String comparison in HashTable
Fr0sT.Brutal replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
AFAIU he solves just the task of keyword lookup, not the general data. -
How do I upgrade an old 2007 project ?
Fr0sT.Brutal replied to dormky's topic in Delphi IDE and APIs
That's why David suggested starting with D2010, I suppose. IIRC it had no significant changes compared to first Unicode D2009 but was, according to my personal impression, more stable. -
If I set Map file option to Detailed, compiler always produces .DRC file regardless of the "Output .drc" option. I'm not sure is it bug or feature? The newest version I tested with is 10.3
-
Map file = Detailed also produces DRC file
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in Delphi IDE and APIs
Yep, you're right. XE2 help hasn't this note but 10.3 has. I wonder what the purpose of this. -
How do I upgrade an old 2007 project ?
Fr0sT.Brutal replied to dormky's topic in Delphi IDE and APIs
Yeah, of course -
How do I upgrade an old 2007 project ?
Fr0sT.Brutal replied to dormky's topic in Delphi IDE and APIs
Besides requirement of commandline to be modifiable in CreateProcess, I don't remember any significant breaking changes unless an app uses bad practice hacks like hardcoded system folders, running always as admin and so on. x64 could require transition to SetWindowLong. I'm not dealing much with advanced UI though, maybe more changes happened in that area -
Store a large number of images in the filesystem or in a DB?
Fr0sT.Brutal replied to RaelB's topic in Databases
Files. The simpler - the better. Probably DB for index but you'll have to keep it in sync with filesystem -
error in OverbyteIcsSspi.pas
Fr0sT.Brutal replied to alex1234's topic in ICS - Internet Component Suite
Better to check if NativeUInt is declared -
Why you want to modify the code? If you encounter perf issues then profiler will help. If you have buggy areas - try static analyzer or AI or a programmer. If you want some fragments just simplified - well, why? To be more maintainable? Then just ask the maintainers 🙂
-
[Delphi] Looking for a Delphi Profiler in 2023
Fr0sT.Brutal replied to Willicious's topic in Delphi IDE and APIs
For the simple start: https://www.delphitools.info/samplingprofiler -
Trap TFDConnection error on data module create etc?
Fr0sT.Brutal replied to Chris1701's topic in Databases
All linked datasources are registered at the connection object so you can loop thru them for activation. Moreover you can filter only those which belong to a specific DM -
Luxembourg; open job position: Delphi software developer / customer support
Fr0sT.Brutal replied to Foersom's topic in Job Opportunities / Coder for Hire
Could a candidate speak, for example, JavaScript instead of French? 🙂