-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Posts posted by Fr0sT.Brutal
-
-
12 hours ago, Clément said:I was just talking with a friend, and he would to have his own VPN integrated solution. He asked me if I could do it (write both VPN server and Client in Delphi)
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.
-
2 hours ago, David Heffernan said:That does seem a strange design choice. If you can wait for at least one byte then surely you can wait for all requested.
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.
- 1
-
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 nighmareNot the architecture I'd like to supportIf 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.
-
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.
-
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).
-
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.
-
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)?
-
On 8/5/2023 at 10:48 PM, chkaufmann said:This library cannot handle this data because it looks at "splash.annually" as path
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.
-
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
-
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
- 1
-
12 minutes ago, David Heffernan said:The thing is, how are you going to get to the stage where you have got a token that you know is a valid keyword?
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
-
3 hours ago, David Heffernan said:What seems missing to me is how to restrict the input data to be just valid typescript keywords.
AFAIU he solves just the task of keyword lookup, not the general data.
-
13 hours ago, David Heffernan said:The big change is Unicode. Everything else is simple.
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.
-
9 hours ago, Uwe Raabe said:Looks like as designed:
Yep, you're right. XE2 help hasn't this note but 10.3 has. I wonder what the purpose of this.
-
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
-
17 hours ago, Remy Lebeau said:I think you meant SetWindowLongPtr() instead.
Yeah, of course
-
8 hours ago, David Schwartz said:But keep in mind that a D7 app was targeting Win XP. Windows is four major releases beyond that, and lots of things have been deprecated if not eliminated
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
-
Files. The simpler - the better. Probably DB for index but you'll have to keep it in sync with filesystem
-
On 7/15/2023 at 2:37 PM, alex1234 said:type
{$IF (defined(CPUX64) or defined(CPU64BITS) or defined(CPUARM64))}
ULONG_PTR = UInt64;
{$else}
ULONG_PTR = Longword;
{$endif}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 🙂
-
-
6 hours ago, Chris1701 said:In the forms oncreate event I would then have to iterate through all TFDQuery's
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
-
Could a candidate speak, for example, JavaScript instead of French? 🙂
"Incompatible parameter lists" when using Types.T*DynArray?
in VCL
Posted
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).