-
Content Count
611 -
Joined
-
Last visited
-
Days Won
8
Everything posted by Tommi Prami
-
https://sourceforge.net/p/gexperts/feature-requests/197/ -Tee-
-
A Conditional Ternary Operator for the Delphi
Tommi Prami replied to EugeneK's topic in RTL and Delphi Object Pascal
On this atleast syuntax is readable X := if Left < 100 then 22 else 45; For example C-syntax is not what I really can say that I like. int result = (x > 5) ? 10 : 20; even worse if writte like this int result=(x>5)?10:20; Syntax highlighting saves a bit for sure but still easy to miss those... One character operator thingies... -Tee- -
Are TInterlocked.Exchange and CompareExchange implementation really Atomic with class types??
Tommi Prami replied to @AT's topic in RTL and Delphi Object Pascal
For clarity, maybe good code example would be needed. 🙂 Checked Embarcadero documentation, and it also would benefit code samples. And explanation what those can and can't do... -Tee- -
"Png to pixel-perfect svg conversion" (I didn't make this)
Tommi Prami posted a topic in I made this
Hello. Coworker made this: https://github.com/TextEditorPro/Png2Svg Kind of brute force Png to Svg conversion. Depenging on the case, this might be good first step to the using Svg-icons in your project. Like you don't mind if files are bit bigger . Or you have single size bitmaps which get resampled for different sizes and the blurryness really bugs you. -Tee- -
"Png to pixel-perfect svg conversion" (I didn't make this)
Tommi Prami replied to Tommi Prami's topic in I made this
Added Paths, instead of rectangles etc... -Tee- -
"Png to pixel-perfect svg conversion" (I didn't make this)
Tommi Prami replied to Tommi Prami's topic in I made this
Lasse made new algorithm yesterday, and said that in his tests file size dropped about 50% Have not tested my self... -
"Png to pixel-perfect svg conversion" (I didn't make this)
Tommi Prami replied to Tommi Prami's topic in I made this
My personal rationale is that you can onece and for all change icon technology/source from bitmap to vectorm and with for us, acceptable result. After that one can start pondering how to get better and way more optimal Svg-files. Anyhow, fully understanmd that this is not for even close good enough for all. -Tee- -
"Png to pixel-perfect svg conversion" (I didn't make this)
Tommi Prami replied to Tommi Prami's topic in I made this
At least we have blurriness problem. And resulted pixel svg stays grispier. But anyones mileage will definetely wary, if your exe is 150mb and if ypu make it 151mb, it is not big of a deal. If visual appearance is better. Have not checked that is resampling methods of Delphi virtual image list adjustable... Havent heard anything of such, I think. For use this could be good way to go forward. Not sure yet. Way better than trying to learn vector graphis and redrawing all aboiut 300 icons to svg, or paying graphic artist to do it for us. Most likely would cost 10k€ etc... I would not even think doing that for less Because we need quite many custom icons thaty are not available in any collections. -Tee- -
"Png to pixel-perfect svg conversion" (I didn't make this)
Tommi Prami replied to Tommi Prami's topic in I made this
And... I bet Lasse will accept pull requests, if you find a way to make it better. I would bet that some algorithm to analize color and/or tranparency cradients would make way smaller Svg-files. For me the vector graphics always has been ppure magic, but would guess, that som e cases those gradients would be possible to analyze to furher optimize the file... Molst likely justr rectangles with gradients would be goodf addition... -Tee- -
Spoiler, SwitshToThread <> Sleep(0). https://stackoverflow.com/questions/1383943/switchtothread-vs-sleep1 Sleep(0) will allow threads on other processors to run, as well. Seems that this is quite tricky, dependig what yuo are doing and what you are trying to achioeve. No silver bullets... -tee-
-
Interesting read about Sleep(0/1) and SwitshToThread
Tommi Prami replied to Tommi Prami's topic in Windows API
That is where this journey started... 😉 -Tee- -
Interesting read about Sleep(0/1) and SwitshToThread
Tommi Prami replied to Tommi Prami's topic in Windows API
One of the replies says that SwitchToThread will yeld to waiting thread on same CPU (not the core). If computer has multiple CPUs then Sleep(0) would run threads on other CPU also. That's how I understood the repply. But, thread cheduler might have changed over the years, so these might be very hard to be sure how it behaves... -Tee- -
Interesting read about Sleep(0/1) and SwitshToThread
Tommi Prami replied to Tommi Prami's topic in Windows API
As I understand what they say, for some ypou would need multiple CPUs. You for sure might have such a hardware. Thanks for extra info.,.. -
Hello, In case of I get Invite, if someone can make good guess to get JCL to install and compile on the beta. I would download it just in case. -Tee-
-
Delphi bug reports or feature requests to "vote"/comment for (important, fatal etc)/
Tommi Prami posted a topic in Delphi IDE and APIs
Post bug reports or feature requests what you feel need some publicity. I'll post mine: Default "styled elements" appears to the inherited form needlessly (into dfm) https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-779 Add Compiler/AST assisted "With remover" refactoring tool https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1666 SimpleRoundTo returns wrong value https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1651 -Tee- -
Sometimes one have questions that answer is not that easy 🙂 Or need quite bit of work. Lately I've had two. Where this unit is linking from? Which units in this project has initialization and/or finalization sections? I bet there are tons of these good questions we sometimes would need answers for 🙂 There might be something for these. Plain search for files does not help usually, because all depends what is linked into the specific project. -Tee-
-
Hello, Tried to find the documentation of [ref] attribute, famously used in FreeAndNil -implementation lately, but could not find it from Embacdero help. (FreeAndNil is defined as: procedure FreeAndNil(const [ref] Obj: TObject);) So could someone point me to the documentation of the attribute ands/or explain what it actually does? -Tee-
-
Way cool! Is there test/comparison is Objects and/or Record serialization supported and speed etc?? Did not check code, because bit busy... I've used Grijjy in one of my hobby projects for serializing objects and/or records. Can't remember which they all are, poossibly both)
-
{ "aud": "1", "jti": "c455147e32d593e35fe", "iat": 1746708640.21844, "nbf": 1746708640.218443, "exp": 1746715840.20109, "sub": "8314", "scopes": [ ], "user": { "name": "Prami Tommi", ... I've got JWToken that to me seems that is not standard. exp etc should not be float, but "UnixDate" is integer (Can't remeber what it is called on top of my head.) Is this some weird standard or just plain wrong? Did some googling but did not find any JWToken standard that would accept this. -Tee-
-
Unix Epoch is seconds, maybe fractions of seconds. But never the less, to me it seems to be agaisnt the standard. That it should be integer.
-
SSL/TLS certificate maximum issue period of 47 days is coming in 2029
Tommi Prami replied to Angus Robertson's topic in ICS - Internet Component Suite
Do you have any good sources of this? (To send people that might be interested) -
Article of Fibonacci hashing
Tommi Prami posted a topic in Algorithms, Data Structures and Class Design
FYI: https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/ -tee- -
Worker thread queue performance
Tommi Prami replied to snowdev's topic in Algorithms, Data Structures and Class Design
People tend to forget things. Right? As I recall ChatGPT gave virtually identical code also, but does not change the fact that I messed up... (EDIT: What I tried to say with that ChatGPT thing wea that I think (if recall) made ChatGPT implementation first. Checked out the API calls made, Google search and found the Grahics32 implementation and went with that. I think I had no intention to make the reposiotory public of that extracted version. As I was just testing the effect of the performance cores only thing out of curiocity, but at some point thought that mayeb some one also would like to use that. At that point most likely did not even think of the origin of the code any more. etc. I should have, for sure. Would not like to hijack more this thread on this, hope all is good now as the license is changed and added reference to the oigin, make issue on the project if something else is needed to fix)- 30 replies
-
- multithreading
- queue
-
(and 5 more)
Tagged with:
-
Worker thread queue performance
Tommi Prami replied to snowdev's topic in Algorithms, Data Structures and Class Design
Is there Lock free or Thread safe containers in Sping4D... Asking for a friend 😉 -Tee-- 30 replies
-
- multithreading
- queue
-
(and 5 more)
Tagged with:
-
Worker thread queue performance
Tommi Prami replied to snowdev's topic in Algorithms, Data Structures and Class Design
At least in my case, I ran 7-Zip processes in parallel, windows did piss poor job of allocating those prcesses to perdormance cores. Anyones mileage migh vary for sure.- 30 replies
-
- multithreading
- queue
-
(and 5 more)
Tagged with: