-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
I'm just theorizing basing on what I read on Firebird forum from a guy that develops universal FB replicator and adding some logic.The idea is simple - having identical initial state and set of changes, current state could be easily achieved. The devil is in details. If replica is just a RO mirror, things are relatively simple but if it must be a fully functional node with all modifications allowed - things are getting much more interesting
-
That's why the only really reliable option is to record log of all changes and then replay it over replica.
-
Shred'NBurn Android app open testing (no ads, freeware, no Internet usage, no in store purchase)
Fr0sT.Brutal replied to Al T's topic in I made this
I doubt it. The bottleneck is the flash memory not the CPU This shouldn't happen. Probably OS has the option to set file size at start? This will remove file growth at every write. Anyway are you writing blocks or byte by byte? But the app won't do exactly what it claims to do. Data remnants will survive There's almost nothing "basic" in this world 🙂 even with steel anvil there's hundreds of hidden nuances to consider -
Is there buffered Memory stream implementation available
Fr0sT.Brutal replied to Tommi Prami's topic in RTL and Delphi Object Pascal
FastMM already reserves memory when reallocating. Once I made elementary benchmark of adding chars to a string: straight way and with stringbuilder. Results were almost the same... Anyway don't forget the rule: "Profile first, then optimize" -
Exception call stacks on Windows with only a few LOCs
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
Good to know! If you know how to determine current base address, ASLR would be supported as well. The only simple option I see without diving too deep into PE analysis is to compare actual addr of any function (f.ex., @ReadMapFile) with that taken from MAP file. -
Exception call stacks on Windows with only a few LOCs
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
IDK. "Nested#" functions should have $004xxxxx addrs ($00401000 + $000D22A4 for StackTraceSample.Nested0). No idea why are you getting $00Axxxxx addrs. Maybe it's code relocation? What happens if you stop at any breakpoint and execute "Go to address" with some of these $00Axxxxx? -
Exception call stacks on Windows with only a few LOCs
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
Remnants of initial sources, thanks for pointing this out No guess... I'll need your actual stack trace and MAP file itself. -
Exception call stacks on Windows with only a few LOCs
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
Check the results here https://github.com/Fr0sT-Brutal/Delphi_StackTraces >StackTraceSample.exe Operation aborted (EAbort @ $449D18) Stack trace: StackTraceSample.dpr:16 [StackTraceSample.Nested2] StackTraceSample.dpr:21 [StackTraceSample.Nested1] StackTraceSample.dpr:26 [StackTraceSample.Nested0] StackTraceSample.dpr:~37 [StackTraceSample.StackTraceSample] $7582343D $77D69802 $77D697D5 -
Exception call stacks on Windows with only a few LOCs
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
function GetExceptionStackInfo(P: PExceptionRecord): Pointer; begin Result := AllocMem(SizeOf(TDbgInfoStack)); // ! Excluding nested functions: // - GetCallStackOS // - GetExceptionStackInfo // - System.SysUtils.Exception.RaisingException GetCallStackOS(PDbgInfoStack(Result)^, 3); end; Fix: remove 2 non-relevant functions being added to call stack -
Sure it could. I wouldn't. Field values are better and much more flexible. In general, if talking about your client-side replication (which I rather call duplication), I consider the following scheme to be more or less correct: - Start transaction on Master blocking access to record (if DB engine can do this) or to table - Start the same transaction on Replica - Update Master - Update Replica - Commit Master - Commit Replica - In case of any error rollback both - In case of error at Replica only - you seem to have troubles. However, this scheme will only work if both DBs are online. If any of them goes offline even for a second, the state could get unsync'ed. That's why replications usually made at server side. Either with update logs filled by triggers (but be careful with rollback'ed transactions!) or some kind of "last modified" marks. Anyway Nexus doesn't seem the good choice for this. There are plenty of opensource DB's which have replication out-of-the-box
-
TDBLookupComboboxEh from EhLib seems to handle all of that
-
Shred'NBurn Android app open testing (no ads, freeware, no Internet usage, no in store purchase)
Fr0sT.Brutal replied to Al T's topic in I made this
Good job, there was several times I felt I needed such a tool. Why are you copying files instead of just filling one large file? Are you taking cluster sizes into account (data tails could survive if your filler file is not aligned to cluster)? Are you handling the case when remaining free space is smaller than your filler file? -
Little semantic note: being sibling is always two-way link. So the one setter should assign both properties to ensure consistency. Otherwise this relations could be better named mater-slave or smth alike
-
Conditional Define for Packages
Fr0sT.Brutal replied to chkaufmann's topic in RTL and Delphi Object Pascal
"Package-specific Compiler Directives" help topic. However it doesn't contain anything like "IFDEF PACKAGE". I'm afraid there's no straight way to do it, only some kinds of workarounds -
Exception call stacks on Windows with only a few LOCs
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
You're right for sure, that's why I recently implemented MAP file reading and extracting all the info available for any given address. Besides some tricky aspects, that wasn't too hard. I merged that with built-in stack traces and now I have fully detailed traces with module, function name and LOC. Alas, the code requires some other my routines which are not fully ready for publishing yet (translate & add comments etc). But in case someone is interested I could try to switch to built-in routines -
And it's fun to have '01/02/03' 🙂
-
You can write your own debugger visualizer
-
Don't forget locales. '10/22/2022' => OK in USA, invalid in EU
-
Welcome to the house of interface pain. Hint: you can evaluate intf's methods
-
I Broke Delphi ->> Low bound exceeds high bound & Duplicate case label if you swap'em (Case Z of) Table error
Fr0sT.Brutal replied to Al T's topic in Algorithms, Data Structures and Class Design
Why not? Fair point -
AFAIK this API sits in the area of "dialing" so look for *Dial* WinAPI functions
-
64bit RTL patches with Intel OneApi and TBB
Fr0sT.Brutal replied to RDP1974's topic in RTL and Delphi Object Pascal
Would be interesting to test against FastMM5 -
I Broke Delphi ->> Low bound exceeds high bound & Duplicate case label if you swap'em (Case Z of) Table error
Fr0sT.Brutal replied to Al T's topic in Algorithms, Data Structures and Class Design
@Leif Uneus yep, in fact the check for 1000000000..High(UInt32) should be instead of those "else"s. Anyway I'm really shocked that algo gave no perf gain compared to straight set of comparisons. Looks like CPU smartness made it run fast -
TCP server rejecting connections
Fr0sT.Brutal replied to DusMac's topic in ICS - Internet Component Suite
I bet on uncaught bg exception -
I Broke Delphi ->> Low bound exceeds high bound & Duplicate case label if you swap'em (Case Z of) Table error
Fr0sT.Brutal replied to Al T's topic in Algorithms, Data Structures and Class Design
Ridiculous but two-cases algo while seeming more fast and elegant gives the same results if inlined, even for the input that gives the largest difference (5 - the worst case for Leif's algo and almost the best for mine) function AltCntCaseTbl2( v : Int64) : Int64; inline; begin if (v > MaxLongInt) then begin case v shr 32 of 0..9: Exit(11); 10..99 : Exit(12); 100..999: Exit(13); 1000..9999: Exit(14); 10000..99999: Exit(15); 100000..999999: Exit(16); 1000000..9999999: Exit(17); 10000000..99999999: Exit(18); 100000000..999999999: Exit(19); else Exit(20); end; end else case v of 0..9: Exit(1); 10..99 : Exit(2); 100..999: Exit(3); 1000..9999: Exit(4); 10000..99999: Exit(5); 100000..999999: Exit(6); 1000000..9999999: Exit(7); 10000000..99999999: Exit(8); 100000000..999999999: Exit(9); else Exit(10); end; Result := 0; end; If not inlined it's 3x faster than Leif's version