-
Content Count
562 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Tommi Prami
-
Vote for QC entry: Add Reset App-button into the Debugger Exception Notification and/or enable Crtl+F2
Tommi Prami posted a topic in Delphi IDE and APIs
"Add Reset App-button into the Debugger Exception Notification and/or enable Crtl+F2 shortcut key to kill the app." if cae, vote please. https://quality.embarcadero.com/browse/RSP-27925 -
Vote for QC entry: Add Reset App-button into the Debugger Exception Notification and/or enable Crtl+F2
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
It seems that this was just resolved internally at Embarcadero -
Delphi Rio IDE hangs again and again
Tommi Prami replied to microtronx's topic in Delphi IDE and APIs
No sure if I suffer from same case, but IDE hangs once per week or so, lately not that often, but it happens. And at least what I get I need to kill bds.exe. Sometimes closing Tabs will hang/crash IDE (for me and one of my coworkers have complained about this) -Tee- -
Problem very poorly explained at : https://quality.embarcadero.com/browse/RSP-21814 Please vote for it. Now we have seen many cases of this that customers have bought new computer and this setting has been on as default. And then at least our software stops working. Hope that you'll test this in on your own environments and products. and report your findings on that Ticket. I'll try to get on this also day, and report more exact findings. -Tee-
-
Known fact or hoping for that? -Tee-
-
This was tested in 10.3 But not with the latest. Anyone in 10.4 Beta should test this, on different kinds of apps. And if there are problems, report issues inside beta-channels.
-
True dat.
-
Array of named and typed parameters. (My Mind is blank)
Tommi Prami posted a topic in Algorithms, Data Structures and Class Design
After couple o sleepless night my brain is shutting down. I need to do something like this. Foo( [ [1, 'First', 0.01], [2, 'Second', 0.02], [3, 'Third', 0.03] ]) So array of array of named and typed parameters. Think I've done something like this. In the method itself I could do something like if AParameters[1].IntValue = 2 then .... in Other words What I am trying to avoid is the I should do some kind of initialization of that array SetLEnght(LArray, 3); LArray[0].IntValue := 1; ... Foo(LArray); -Tee- -
Interesting size reduction algorithm for HashTable
Tommi Prami posted a topic in Algorithms, Data Structures and Class Design
https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/ -
Interesting size reduction algorithm for HashTable
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Yo duderinos. Could someone even slightly talk about the original subject, for courtesy 😄 -Tee- -
Array of named and typed parameters. (My Mind is blank)
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I was thinking that Record must be used in this... Sadly yes. That kind of constant one liner calling like that would be cool. Sometimes it is just handy. -
Interesting size reduction algorithm for HashTable
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Most likely so, but on other hand without issue in bug tracker, chances it'll get fixed is even lower 😄 -
Interesting size reduction algorithm for HashTable
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Don't quite understand what you are saying. Could you rephrase? -
Interesting size reduction algorithm for HashTable
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Lucky guess 😄 -
Interesting size reduction algorithm for HashTable
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
If I understand that algorithm could be used for sizes that are prime also. Not sure would it matter tough. (Did not read it through, just browsed it, so I might not understand it too well) -
Any Good tutorial on Parallel Programming Library?
Tommi Prami posted a topic in RTL and Delphi Object Pascal
I would rather use OTL, but can't justify committing it to our repository, for small utility app alone. All PPL tries have failed more than less miserably. And Embarcadero help doesn't have too good examples (Or I can't find them). Ot they are so synthetic and oversimplified. No need to do anything super complicated but still better examples would be good to have easier start... -Tee- -
Any Good tutorial on Parallel Programming Library?
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Word! I would put OTL to our repository right away if it would be up to just me. And make all threading with it. -Tee- -
Coworker made new free Firebird tool with Delphi. 1.0 is just out... https://texteditor.pro/firebird/ There is also superb text editor, which I use in my Delphi coding daily, very good features...
-
New free firebird tool... (Didn't make it ;) )
Tommi Prami replied to Tommi Prami's topic in I made this
From website I think. https://www.texteditor.pro/support/ -Tee- -
New free firebird tool... (Didn't make it ;) )
Tommi Prami replied to Tommi Prami's topic in I made this
Lasse released 1.10 version, some of the initial nastines fixed : https://www.texteditor.pro/firebird/ -
Any Good tutorial on Parallel Programming Library?
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Thanks for all of your help. Good chat 🙂 .Tee. -
Any Good tutorial on Parallel Programming Library?
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
OTL is pretty big library, PPL is already there. In our company it is pretty strict what libraries can be imported to our codebase. I rather use OTL for many reasons, but most likely can't justify it. But I think I am solved all problems, only problem is that with PPL code is pretty ugly. Because no proper way to pass workload and receive result. Not too many lines in this case. PPL would benefit some higher level abstraction and helper classes and so, and most important would be documentation. -Tee- -
Active Hunspell wrapper project would be cool. Jus saying... 🙂
-
Any Good tutorial on Parallel Programming Library?
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Always one way to go. Would save some lines of code with PPL. OTL is super cool tough. -Tee- -
Below is partial code that does actual running and capturing. It runs just fine but does not always capture the output of app. THere might be something very trivial that I just don't see, and Application.ProcessMessages calls Are not smart for start. Any ideas?? .Tee. const ExecutionTimeout = 60 * 1000; procedure TCommandLineApp.WaitforApp(const AProcessHandle: THandle; const ARaiseTimeoutException: Boolean; const AExplicitTimeOut: Integer = 0); var LApprunning: Cardinal; LStartTick: UInt64; LTimeout: Integer; LExecuteTimeOutExeeded: Boolean; LElapsedTime: UInt64; begin if AExplicitTimeOut <> 0 then LTimeout := AExplicitTimeOut else LTimeout := ExecutionTimeout; LStartTick := GetTickCount64; repeat LApprunning := WaitForSingleObject(AProcessHandle, Min(LTimeout, 100)); // TODO: This is not too smart, I think Application.ProcessMessages; LElapsedTime := Abs(GetTickCount64 - LStartTick); LExecuteTimeOutExeeded := LElapsedTime > LTimeout; until (LApprunning <> WAIT_TIMEOUT) or LExecuteTimeOutExeeded; if LExecuteTimeOutExeeded and ARaiseTimeoutException then raise Exception.Create('Commandline process timeout exeeded'); // TODO: This is not too smart, I think Application.ProcessMessages; end; function TCommandLineApp.InternalExecute(const AFullCommandLine: string; var AReturnedOutput: string): Boolean; function GetSystemErrorMessage: string; begin Result := CommandlineApplication + ': ' + SysErrorMessage(GetLastError); end; var LSecurityAttributes: TSecurityAttributes; LStartupInfo: TStartupInfo; LProcessInfo: TProcessInformation; LStdOutPipeRead, LStdOutPipeWrite: THandle; LWorkDir: string; LHandle: Boolean; LExitCode: DWord; begin Result := False; LSecurityAttributes := InitSecurityAtttributes; if CreatePipe(LStdOutPipeRead, LStdOutPipeWrite, @LSecurityAttributes, 0) then begin try LStartupInfo := InitStartupInfo(LStdOutPipeWrite); LWorkDir := GetCurrentDir; LHandle := CreateProcess(nil, PChar(AFullCommandLine), nil, nil, True, 0, nil, PChar(LWorkDir), LStartupInfo, LProcessInfo); if LHandle then begin try // Give app little bit time to start up (Not sure if needed) WaitforApp(LProcessInfo.hProcess, False, 500); ReadProcessStdOut(AReturnedOutput, LStdOutPipeRead); // If app does wait app hangs "for ever", exception is raised WaitforApp(LProcessInfo.hProcess, True); {TODO : Probaply should handle STILL_ACTIVE, Check out: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683189(v=vs.85).aspx } if GetExitCodeProcess(LProcessInfo.hProcess, LExitCode) then FExitCode := LExitCode else FExitCode := -1; // Don't have rights to check for the exit code Result := (FExitCode = -1) or (FExitCode = 0); if not Result then FLastError := AReturnedOutput; finally CloseHandle(LProcessInfo.hThread); CloseHandle(LProcessInfo.hProcess); end; end else FLastError := GetSystemErrorMessage; finally CloseHandle(LStdOutPipeWrite); CloseHandle(LStdOutPipeRead); end end else FLastError := GetSystemErrorMessage; end;