-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
Get Parent process Current directory
Fr0sT.Brutal replied to Mike Torrettinni's topic in Windows API
Don't CurrDir of your project that is by default inherited from launching process and path to launching process' image file satisfy your needs? Btw, CurrDir is unreliable anyway. F.ex.: >cmd c:\users\user> d:\soft\that-tool-calling-my-project\tool.exe -
Get Parent process Current directory
Fr0sT.Brutal replied to Mike Torrettinni's topic in Windows API
I still can't realize what exactly you're trying to achieve -
We use DUnitX and it discovers all our silly mistakes before release
Fr0sT.Brutal replied to Lars Fosdal's topic in DUnitX
I also experienced crashes on a code that runs CreateProcess but didn't investigate that yet. Alas, the coverage doesn't check multiple branches sharing the same line so its results aren't 100% reliable. Moreover, Delphi compiler strips out unused functions even in full debug mode so untested lines seem identical to ignored ones. -
Well I don't care about openness at all unless I get any benefits from it 🙂 but if this openness will lead to data leakage or crap like "Oh, I see you have pretty penny on Bank1's deposit, now if you take a credit in Bank2 and credit card by Bank3 you could afford buying some cool stuff you absolutely definitely need just right now!!!" then I definitely don't want it
-
Get Parent process Current directory
Fr0sT.Brutal replied to Mike Torrettinni's topic in Windows API
Child process inherits current directory. I doubt it's possible to get parent's CDir with any API except by injecting and other hackish methods -
Question about Delphi class (static) constructor
Fr0sT.Brutal replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
*facepalm* is it really so hard to run init sections in the order of unit appearance? -
I wouldn't wish the bank 1 to know about my state in bank 2.
-
is it possible to create an Enumeration Type at runtime ?
Fr0sT.Brutal replied to bravesofts's topic in Algorithms, Data Structures and Class Design
Well, OK. Talking precisely, if you ask if it's possible to create dynamic enumeration type with random props - then answer is: No But - depending on what you want from this dynamic enum some kind of imitation is possible -
is it possible to create an Enumeration Type at runtime ?
Fr0sT.Brutal replied to bravesofts's topic in Algorithms, Data Structures and Class Design
Why do you think you need dynamic enum here? The task looks like "get a user-picked set of items from colors enum". Of course there could be not more than 256 elements in enum so if you allow custom colors you'd have to use arrays/lists of integers. -
Delphi memory manager takes care of allocations so no 4Kb-for-each-10b-array happens. You should specify what "performance is terrible" means for you. As quick check, you could comment out all processing actions and leave only looping through the array. This will show you the best performance you could reach with this data structure.
-
is it possible to create an Enumeration Type at runtime ?
Fr0sT.Brutal replied to bravesofts's topic in Algorithms, Data Structures and Class Design
I don't think so. Probably with dirty hacks only (like modifying TypeInfo of a previously declared type). But if you just want to use custom names, you don't need to declare a new type for this -
Anybody changing FileVersion directly in dproj file?
Fr0sT.Brutal replied to Mike Torrettinni's topic in General Help
Actually it's MSBuild's format so all WTF's should go to Micro$oft -
We use DUnitX and it discovers all our silly mistakes before release
Fr0sT.Brutal replied to Lars Fosdal's topic in DUnitX
I tried https://github.com/DelphiCodeCoverage/DelphiCodeCoverage and it's pretty good -
Alternative could be Ctrl-A, Delete, "cons", Space + predefined code template named "cons" with the contents you want.
-
How to use unit BufferedFileStream & FastCopy?
Fr0sT.Brutal replied to Quarks's topic in General Help
Well, probably you're right and I've got to update my internal price lists. -
thread-safe ways to call REST APIs in parallel
Fr0sT.Brutal replied to David Schwartz's topic in Network, Cloud and Web
May I conclude to move this floody topic to more precise rails? 1. You have to use one client object per simult request. 2. You can either use worker threads with blocking requests or async requests in main thread. 3. Ehm... that's all? -
How to use unit BufferedFileStream & FastCopy?
Fr0sT.Brutal replied to Quarks's topic in General Help
1 Tb of SSD is still too expensive -
How to use unit BufferedFileStream & FastCopy?
Fr0sT.Brutal replied to Quarks's topic in General Help
?? How magnetic HDDs could work without heads? -
How to use unit BufferedFileStream & FastCopy?
Fr0sT.Brutal replied to Quarks's topic in General Help
I doubt this will cause any gain. Contrary, HDD will have to reposition the writing head every time. -
How to use unit BufferedFileStream & FastCopy?
Fr0sT.Brutal replied to Quarks's topic in General Help
Why don't you bench your FastCopy code against Windows copy on a 4 Gb file and see if it really worth trying? -
upcoming language enhancements?
Fr0sT.Brutal replied to David Schwartz's topic in RTL and Delphi Object Pascal
Yes, and it works even in ancient Delphis including partial init which is what I learned many years later since I started coding in Delphi 🙂 Yes, and for local vars too. Pretty weird why it's not allowed actually, because this kind of declaring is very handy. Let's hope Emba will implement this feature sometimes - as they did for arrays -
upcoming language enhancements?
Fr0sT.Brutal replied to David Schwartz's topic in RTL and Delphi Object Pascal
I was surprised to discover that it's still impossible to assign record vars inline var pi: TProcessInformation := (cb: 0); at least in 10.3. So if this impossible with 10.4 as well then it looks like good feature to implement -
Why not catching OnChange? Input could be done by many different ways - by mouse, with SendMessage, etc.
-
Image32 - 2D graphics library (open source freeware)
Fr0sT.Brutal replied to angusj's topic in I made this
Huh. I guess we all do such kind of things for requests we're not interested in. But the real PR rarely follow - more probable for libs (people using them a priori know the language and techs and have dev&build workflow ready) and less for apps (hey, I just came for a tool and don't care what language it's written in, am I supposed to learn COBOL and TCL and tons of other stuff to implement what I request?!)- 42 replies
-
- graphics
- cross-platform
-
(and 2 more)
Tagged with:
-
10.4.1+ Custom Managed Records usable?
Fr0sT.Brutal replied to Darian Miller's topic in RTL and Delphi Object Pascal
Of course you're right but this naming is too common because conditional seems to be the only existing ternary operator 🙂 at least I don't know any others