Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Fr0sT.Brutal

    Localization of constant arrays - best practice?

    Thanks, I'll consider it Thanks! I'm now making my own translation system and already got used to res strings incl pointers to them. However, AFAIU there's a drawback in their organization - their codes are consistent only within single binary, any change in their order or number and rebuilding causes part of them to shift. So these numbers couldn't be used as IDs in translation files. Of course DRC file could help but some automated check must be run to control translation files consistency or just use built-in values as keys (I'm now building the latter approach). I also try to realize how can I distinguish one string key from another when using res strings (case of synonyms in English - different words in other languages). I also took a look at hooking LoadResString (shame that everyone has to do these tricks !) and I find it Windows-only. While currently I don't need another platforms but in theory it could be Linux. I'm curious what people do with res strings on that platform?
  2. Fr0sT.Brutal

    Delphi REST frameworks that run on Linux?

    Check out the list in my signature
  3. No. There's only rename being run by post-build event and libsuffix
  4. Fr0sT.Brutal

    Localization of constant arrays - best practice?

    Yes, clearing the items removes mem leak. Weird but I still can't see leak report.
  5. Fr0sT.Brutal

    Localization of constant arrays - best practice?

    Well, kind of. After that assignment we have string with refcnt=1 stored in an array item. Another assignment will clear the previous value and allocate new one with same refcnt=1 - OK here. So the only leak will be on app exit where the last values won't be cleared because typed consts aren't finalized (I suppose?). Anyway, clearing the assigned items with pstring(@src_arr[1])^ := ''; invokes memory cleanup. Funny however, FastMM4 won't catch string leak in this setup... I use Fulldebugmode and every tracking option turned on and it doesn't report memory leak neither with built-in FastMM nor with full one from GH.
  6. Fr0sT.Brutal

    Localization of constant arrays - best practice?

    Yes, language change via restart is OK. I also found the way to modify constants const src_arr: array[1..3] of string = ('foo', 'bar', 'quz'); PString(@src_arr[1])^ := 'translated'+Inttostr(2); // imitate dynamically-created string AFAICT no issues happen in my test project
  7. Fr0sT.Brutal

    Problems with debugging after migration.

    EIdException is likely thrown by Indy. Probably units register some extensions twice in unit init code and exceptions there are always painful. You can observe all kinds of weird behavior incl. unknown exceptions, app crashes and silent closing. Try to find what method throws it in Indy and track the duplicated call (or use debug DCU's and place breakpoint at exception raising to see call stack)
  8. Fr0sT.Brutal

    VCL Wrap

    TSuperButton = class(TButton) ... end; TButton = TSuperButton // ! the trick Tform1 = class(TForm) btn: TButton; // <- will be TSuperButton in fact Type reassignment trick
  9. Citing you the same for this: Asserting something an interlocutor hadn't said is dark pattern. Several steps from labeling any arguing people "whatever-ist".
  10. Fr0sT.Brutal

    Line number at build/compile time??

    https://github.com/Fr0sT-Brutal/Delphi_StackTraces/blob/master/Ice.Debug.pas Requires MAP file (but there's option to include it into EXE)
  11. Fr0sT.Brutal

    SvCom - Services 64bit on Delphi 11.3

    What's the point of pushing ASM into elementary API calls? What's the point of ASM not inside speed-critical routines?
  12. Fr0sT.Brutal

    FTP - Problems sind update to Alexandria

    Well, you always can look at what server sends. FTP is really easy for humans. This way you'd spot the issue in a moment
  13. Well, I find it so tiring that people think that discrimination exists literally everywhere even if nobody sees it. Well, we actually have female coders so the chances of gender discrimination are quite low with obvious evidence. And we have much more women in fin/doc/secretary depts.
  14. I talked with them. Well, you never could be 100% sure there wasn't any discrimination unless someone confident tells you that directly. But none of my colleagues ever mentioned she faced any kind of offense. And what's the percentage? Balance is nice (oh how I wanted we had more girls at university! :)) but it must never be the only goal. Diversity before professional skills is awful tendency. Hire workers just because they belong to minorities even if their hands grow out of their butts? Madness. Why there are less female programmers ? They're just not interested.
  15. Fr0sT.Brutal

    SvCom - Services 64bit on Delphi 11.3

    I wonder how components could cause troubles when running in service mode? The form shouldn't be created at all so they won't exist.
  16. And that restriction could have been caused by the care of women's health. Conditions in mines are really heavy even for strong men.
  17. Sure, just accept incoming data with Server's socket and relay it to 2nd proxy. IDK about a special component for that.
  18. Funny fact. A couple of local IT forums where I actively chatted were quite severe to noobs and dumb questions. And I know some guys (male guys) were creating female-named accounts just to get more gentle relation and receive answer even if the questions were dumb/elementary/googleable.
  19. I consider these numbers just another reason to buzz about "offended minorities", they did the right decision removing these properties. Guys (AFAIK this word relates to all genders in English?), let's face the truth - vast majority of coders are male. "It's a fact you can't deny". Tech university where I studied had about 1/5 of girls. At work there are ~1/4 of female coders. I'm sure there's no any kind of discrimination - girls, in mass, just not interested in tech stuff. However, of those who do there are really smart ones (and smarter than me :)). I think it's just natural effect. Just like, say, from Norwegian miners 99% are likely white male (IDK in fact, probably nowadays only robots work there? :))
  20. Fr0sT.Brutal

    No timeout in THttpCli?

    procedure TForm1.SocketTimeout(Sender: TObject; Reason: TTimeoutReason); begin case Reason of torConnect : Log('conn timeout'); torIdle : Log('idle timeout'); end; end; procedure TForm1.Button3Click(Sender: TObject); begin HttpCli1.CtrlSocket.TimeoutConnect := 3000; HttpCli1.CtrlSocket.TimeoutIdle := 4000; HttpCli1.CtrlSocket.OnTimeout := SocketTimeout; HttpCli1.URL := 'example.com:802/'; HttpCli1.Head; end; This fires "conn timeout" event. However this needs polishing because ~20secs later the "httpHEAD: Error# 10060Winsock - Connection timed out (Error #10060) to 93.184.216.34:802." raises. I only use plain ICS sockets not HTTPCli so I can't say much about it but timeouts of plain sockets work very well in my app where I have ~300 of them. I always thought IcsThreadTimer was created exactly to solve this issue
  21. IMHO Tiktok has been a pile of shit from the very beginning so nothing is changing. It just rots. However, I agree that most of services degrade. Google's dark patterns of marking ads, Facebook's spamming with endless useless crap. Local taxi app has integrated food delivery (with the price of 50% slowdown) - who the hell needs pizza popups when he wants to move from point A to point B?? Anyway I'm glad to learn the right term. It should be a RHCP song : " It's understood that Hollywood sells Enshittification "
  22. Fr0sT.Brutal

    VirtualStringTree image alignment in cell

    Custom draw is always a method where you can do everything you want (OnDrawCell IIRC)
  23. Fr0sT.Brutal

    No timeout in THttpCli?

    Have you assigned Socket's OnTimeout as well?
  24. Fr0sT.Brutal

    Use-case question for average phone users re: file-sharing

    I'm that one old-schooler. However I find myself using simple and cheap streaming services more and more, especially as "radio" of favorite genre at home or in the car. What such users want it to look like, I guess : they locate a song in streaming app, press "Share" and send it to your app. On your side: 1 - I'm not sure a web app can register itself as Share receiver. Okay, you can require them to copy URL and paste into your app 2 - Getting a song from a service. If it has API, it's lucky case. However user still will have to enter his login once again as I doubt a service gives its songs to anonymous connections - all that copyright stuff. 3 - bonus item - remember that you do not own these tracks even if you bought them in iTunes/GMusic, you're just renting them. No usage besides listening on your devices with official client apps is allowed. Streaming services are even worse - you just buy the temporary ability to listen tracks that finishes when you end subscription. 4 - Well, now it's time to estimate how strongly you want this feature.
  25. Fr0sT.Brutal

    No timeout in THttpCli?

    Hmm AsyncResolve has been there for long time. THttpCli.CtrlSocket.TimeoutConnect/Idle if ICS is built with BUILTIN_TIMEOUT define (default)
×