-
Content Count
511 -
Joined
-
Last visited
-
Days Won
6
Posts posted by Tommi Prami
-
-
14 hours ago, Brandon Staggs said:The comments on that readme explicitly state it's not complete. However, it also says Argon2 is not fully documented and isn't as good as bcrypt, both of which are really odd things to say.
I take it as the BCrypt is better if run it one second or shoter period. . Whats actually the point of Argon2 that you run it long, and use much resources, to make it hard for brute force attack, even with GPU farms.
-
31 minutes ago, PeaShooter_OMO said:Why is it difficult to implement? Or shall I rather say; what about it makes it difficult to implement?
There is couple implementations. like: https://github.com/JackTrapper/argon2-for-delphi
Have not tested them tough...-Tee-
-
13 minutes ago, Kas Ob. said:Hi,
Not sure what is your question is, but from what Arnaud wrote and where did he mentioned the salting, i can expand on this,
Used word Salt as to ask in different words. But your explanation, I think answered question. It is not about adding "salt" to beginning but padding to end.
I would think that is the job for the AES library, not for individual programmer using the library. Kind would hope that best practices would be used as default, and if need something else, lets say receive data from 3rd party system, then you can change behavior.-Tee-
-
13 minutes ago, Arnaud Bouchez said:- there is also a need for 16-bytes padding of the encoded output - here Pkcs7 seems the de-facto standard.
What do you mean here actually. Add "salt" to the data to be crypted or to the crypted it result data?
and why is 16 bytes important, or it is 16 bytes or more, or any multiple of n bytes?
-
Thank you all,
Now I've ported the code from PPL to OTL, and next I'll polish it a bit and just use it, or maybe tune it a bit,. As is, it's good enough what it does...
-Tee-
-
54 minutes ago, Primož Gabrijelčič said:Use it's .OnStop function (async) or .OnStopInvoke (synchronized to the owner thread).
Thanks... I'll look into that...
That seems too obvious now, hopefully in few minutes also 😄 🙂
-Tee-
-
How I can wait for the ForEach to finish, if I use the NoWait-pattern?
Could not figure that out yet.-Tee-
-
Tried to add .NoWait to ForEach call, and did infinite loop processing messages after that it'll start more than one "task" parallel.
IOmniParallelLoop does not contain flag that I could wait for, that would be nice... (As I saw in some demo maybe in future, IsDone etc...)-Tee-
-
8 minutes ago, Primož Gabrijelčič said:ExecuteAndWait processes messages in the worker thread. You have to process messages in the thread that owns the parallel task (in this case the main thread).
Ah OK, did not realize that difference...
Thanks for info...
-Tee-
-
5 minutes ago, Primož Gabrijelčič said:Messages are still not processed while parallel for is executing.
ExecuteAndWait will pump messages, whic is 99.999% of work app does... Waiths 7-zip..
-Tee-
-
3 minutes ago, Primož Gabrijelčič said:Although, hmmmm, I would expect Parallel.ForEach to work in blocking mode without any message processing. I will look into that as soon as possible.
Take your time.
-
12 hours ago, Davide Angeli said:Before posting I tried several solutions, some of these suggested in this post:
According to Primoz OTL book it seems to be enough to assign the IOmniTimedTask instance to nil to get the call to Terminate(INFINITE) and Terminate should stop the task... This works perfectley in a little sample demo. In my case leads to random errors (the app is very complex).
I've tried calling the Stop method and then assign the instance to nil but I get the random errors too.
I've tried calling also Stop + Terminate(INFINTE) + WaitFor(INFINITE) + assigning to nil without results
Could you run the app in debugger and put break points at the end of DoSometing1 and DoSometing2, and be sure that you exit from them cleanly?
-Tee-
-
13 hours ago, Lars Fosdal said:Doesn't that mean that only ONE compression can happen at a time - i.e. serializing your use of CompressFile?
Edit: Are you reusing the same critical section in multiple locations in the code or on multiple nested levels? That could become a race condition.
As far as I know, you can re-enter to critical section, as long as you exit them all.
Was not problem with the PPL anyhow. I can remove Critical section code and test tough...Edit: Removed all critical section calls, does not change the behavior. Also removing my own CPU and Memory Throttling code at WaitForSystemStatus don't change the behaviour either.
-
13 hours ago, David Heffernan said:Is CompressFile CPU bound? Are we supposed to know what is in there? Seems like it would be important?
Posted link to the repo later, did not remember that it was public.
Currently it is not CPU bound, uses 10% of CPU and not that much memory also, there is my own CPU and Memory throttling code, but it has no effect. Tested it with putting break point there.,There will be one "thread" processing. With PPL it worked pretty well, with OTL it is running all in sequential manner, not in parallel, it completed the process but second compression after the first one.
-
13 hours ago, Ondrej Kelle said:`ProcessMessages` is never called...
There is a loop while waiting the running process that will process messages, but not with ProcessMessages-call but uses PeekMessage with PM_REMOVE flag.
-
Hehe.,..
I have whole code in GitHub: https://github.com/TommiPrami/7zFileCompress
Not too clean because just trying to hash it together. And tools for just own usage are not that important that would keep repo cleaned up all the time.-Tee-
-
1 minute ago, Primož Gabrijelčič said:Looked into that, but did not quite get how it would solve this problem.
Refactored ForEach loop into separate procedure which was used in Future, with same result. Now I let it wun to see if it'll do all "tasks" sequentially.
I was using Delphi PPL and it more than less worked, tried to port it to to OTL, but it was not that simple as I thought. -
35 minutes ago, Lars Fosdal said:No locks or semaphores in CompressFile?
Yes but released in try.. finally. I use Critical section and very short ones.
-
Code is basically this:
LFiles.AddStrings(TDirectory.GetFiles(LRootFolder, LSearchPattern, TSearchOption.soTopDirectoryOnly)); if LFiles.Count > 0 then begin Parallel.ForEach(LFiles).Execute( procedure(const AFileName: TOmniValue) var LCurrentFile: string; begin LCurrentFile := AFileName; CompressFile(LRootFolder, ExtractFileName(LCurrentFile)); end ); end
LFiles is TStringList;
This is in CommandLine app, so maybe it could not even work this way, and I should use some other coding pattern here than ForEach. I could not find way to wait the ForEach loop, If I put .NoWait in there.-Tee-
-
2 hours ago, Cristian Peța said:If someone do have an issue that is possible solved in latest commit why not trying?
I can't think that an commit is made without testing first.
Just pointing out that is "debug stuff" of FastMM5, usually not compiled to release-binaries, but it depends on how exe is built...
I've always used latest FastMM and never there has been proof that something was FastMM's fault. Not saying that it has always been bug free, but problems I've encountered always been at somewhere else, FastMM just had borough them into light.
-Tee-
- 1
- 1
-
22 minutes ago, Cristian Peța said:Have you checked https://github.com/pleriche/FastMM5/activity?ref=master ?
Latest commit is 6 nov. "Handle a potential race condition in FastMM_DetectClassInstance: If another thread frees a block while it is being evaluated as a potential class then an A/V could occur. This indirectly affects other functionality, like FastMM_LogStateToFile."
You can download sources if you don't use git to clone repository: https://github.com/pleriche/FastMM5/archive/refs/heads/master.zip
That is debug stuff, but if build that way sure can be one of the reasons...
-Tee-
- 1
-
19 minutes ago, msd said:And just like that, back to latest D11.3 + Updates 🙂
I'll post here my test and deploy results.
We usually wait some time after new release, and follow Tickets people start to post.
Some of the bugs/regressions now in D12 are pretty bad. and also quite weird that no one found those in beta. I ran all of our products and unit/integration tests and saw nothing when D12 came out. So those apparently needed some special code, as usually is when it is regression.
But anyhow. I really hope that D12.1 comes soon, because IDE is clearly better than D11. And some good fixes also coming in D12 too.
Depending on the situation and project, After we got everything compiling in D12 and made sure we kept D11 compatibility, it took couple of hours for me to get back to D11 with total D11 reinstall. But easily can see the situation that jumping back to early version can take long time, depending on the products and so on.-Tee-
- 1
-
14 hours ago, msd said:I'm using Delphi 12 Pro + FastMM 5 (build a 32- or 64-bit app).
D12 has some very bad bugs/regressions.
If you have latest D11 release available, I would go to that, with and without FastMM5 to get to the root of this.
- 1
-
https://towardsdatascience.com/34-faster-integer-to-string-conversion-algorithm-c72453d25352
To my understanding Delphi has bit different algorithm, but looking at "default implementation" mentioned article or one Delphi has, it is pretty complex beast in either case, and some what computationally heavy.Delphi has lookup tables and DivBy100() which I would guess it'll make it faster than the "default implementation". Not sure tough.
lr_printer Github repo: https://github.com/tigranh/lr_printer-Tee-
ANN: Parnassus Parallel Debugger
in Delphi Third-Party
Posted
UAC lurking in the task bar, asking for installation permission?
Been hit by that few times....
-Tee-