Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/24/20 in all areas

  1. A number of changes, fixes, improvements and speedups have been made compared to ZEOS 7.2.6.1-stable. Among others, OLE DB (for Windows) and ODBC protocols were added, newer versions of SQL servers were included. Feel free to test and use the ZEOS 7.3.1-beta: https://zeoslib.sourceforge.io/viewtopic.php?f=50&p=155611#p155611 https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/branches/testing-7.3/ https://github.com/marsupilami79/zeoslib Michal
  2. Hello, just a small note that I released a generic circular buffer library under open source license (Apache 2.0) here: https://github.com/MHumm/CircularBuffer Feel free to use it or to contribute to it. Cheers TubroMagic
  3. I disagree - if this implementation were done totally naive it would have actually worked for any T yet in a non optimized way - but the author tried to be clever by using Move 😉 Leave implementing generic collections to people experienced with it (which I in no way claim to have monopoly on) P.S. Since the XE7 refactoring disaster of System.Generics.Collections which still has existing bugs as aftermath I am very sensitive regarding this topic.
  4. Fr0sT.Brutal

    Inline array declaration

    Probably for the same reason why "function MyFunction(): array of Integer;" is not allowed
  5. Read System.Collections.Generics. Particularly the places where it checks for HasWeakRef(T) What weak references are and how they are handled and why you cannot simply System.Move them refer to System.pas (start with RegisterWeakRef)
  6. Fr0sT.Brutal

    The Delphi Parser - FIBPlus, BDE, legacy Migration

    I didn't understood a thing
  7. I made a similar (simple) ring buffer implementation a couple of years ago, which worked well for my needs then, but I refused to publish it due to exactly these issues. Sometimes it is safer to re-implement things for some specific purpose by coding from first principles than use a pre-built all-purpose library implementation, that is neither easy to understand nor easy to debug. I know this is breaking the DIY rule, but it follows the KISS rule.
  8. I admit - it's not common but good luck storing something like this in your list then: type TMyRecord = record [weak] something: IWhatever; end; I am not bashing any code here but when something is published as general purpose use (which an unconstrained generic collection class is) then I expect it to work for any T. If you don't handle this in your private code because you don't have such use case you of course don't need to care. As for TRingBuffer<T> - it leaks strings for example: var b: TRingbuffer<string>; begin b := TRingbuffer<string>.Create(8); b.Add('one'); b.Delete(1); b.Add(['two', 'three']); b.Free; end;
  9. Dave Nottage

    Problem with Delphi RIO 10.3.3 and Google API Level 29

    For anyone following this thread, the relevant QP report is here: https://quality.embarcadero.com/browse/RSP-27218 As per my comment on the report (dated Aug 24), it would be possible to recompile System.pas (it needs a change to ICU.inc), however unfortunately, the files ex.android.arm.inc and ex.android.arm64.inc are not supplied, thus making it impossible without help from Embarcadero.
  10. Anders Melander

    Free Resource Builder Utility?

    Yes I believe there are slight differences in the syntax but I simply can't remember them anymore. BRCC32 used to be a superset of RC back when Borland was a leader in development tools... So quite some time ago. If I could find some documentation of BRCC32 I could probably tell you what they are. See also:
  11. Only, and only if your application does not depend upon that DLL to do its work. If it is an extension, giving extra features, not needed for the overall result, then you may use it that way. However, if the main purpose of your application depends on that DLL, it is to be published under GPL as well.
  12. Just take a look at https://www.mozilla.org/en-US/MPL/2.0/FAQ/: Apart from the fact that this is just wrong, what does GPL have to do with MPL?
  13. Spring4d 2.0 already has this: https://bitbucket.org/sglienke/spring4d/src/c336b8dd39bfc30cbcf2fa1f6d8323e663bdcc05/Source/Base/Collections/Spring.Collections.Base.pas#lines-473 It is an abstract base class (you don't simply use that one) implemented by several different ready to use collections such as queue, deque, boundedqueue (does not grow like queue does), evictingqueue (drops the oldest element when full) TRingbuffer<T> unfortunately has several defects, mostly around simply using Move regardless the type of T (managed, containing weak reference)
  14. AFAIK even the strictest GPL allows dynamic linking without the burden of opening your code No, GPL is more severe than I thought
  15. I just had this exact same problem today, did a search, found your post and answer and joined this forum just to say THANK YOU for posting both the question and the answer. I had updated xcode to try and deploy to an iPhone but the iMac I was using was too old and ran into incompatibility problems. In the course of downloading an older xcode and trying to update libraries, I think it got stuck into the wrong directory and I was unsure what I did. Seeing your post made everything clear and fixed it immediately. Thanks again! David.
  16. Mike Torrettinni

    Enums and generics

    Your example gave me an idea, that I completely missed. I don't need 2 consts, 1 should be enough: const cProjectTypeNames: array[TProjectType] of TTypeAsName = ( {ptMain} (DisplayName: 'Main Project'; XMLName: 'xml_main'), {ptExternal} (DisplayName: 'External Project'; XMLName: 'xml_external') ); This is then easier to extend, adding additional name, and if there are many values, which you would split into multiple lines in code, the names are aligned and you can't make a mistake. The only drawback is, if you have 10 values, this becomes 10+2 lines, while before it was 4 lines for 2 consts, total.
  17. First thank you for mentioning kbmMW. Just FTR, kbmMW is also highly maintained and used in many critical projects, including the ones both bringing lives and protecting them, which goes thru serious scrutiny.
  18. Arnaud Bouchez

    Zeos 7.3 entered the beta phase.

    Great News! Zeos is IMHO the best data access library for Delphi and FPC. And it is Open Source. The direct ZDBC layer has tremendous performance, and a lot of work has been done for this 7.3 upcoming branch.
  19. Maybe one of the first things somebody could contribute, are English translations of the comments then. 😉
  20. Yes, I phrased myself incorrectly. I am pretty damn sure it would cause havoc now, after these many years. What I meant in the beginning to fix it [...], thanks for pointing that out. All I know is I had an imagination on how things should work and an urgent bug to fix. Caused me a serious headache. I'm sorry if I offended anyone by calling Earl a bug 🙂
  21. Rollo62

    Problems with FMX.CameraComponent Sample

    Since there were several questions that this sample doesn't work, I checked myself again. Indeed, it seems to be broken, out-of-the-box. I did the following to get it running: - re-create the project under Rx10.4 - add the Main unit to the project - check the Project/Forms tab, the main form should be auto-created - Removing all unnecessary permissions and entitlements, keeping just Camera permission - For some reason in uMain.pas, this line needed to be added. I have not cxhecked the orginal file again, but maybe there was some non-standard form creation. //21.08.20 added var CameraComponentForm : TCameraComponentForm; - For testing before, I moved the first creation, until the Camera shall be really started. This shouldn't be necessary, but I did that for testing to decouple the actions a little, und keep it in my final. That means you have to press START twice, 1. Get Resolutions, 2. Start camera procedure TCameraComponentForm.FormCreate(Sender: TObject); begin //21.08.20 PermissionsService.RequestPermissions([PermissionCamera], AccessCameraPermissionRequestResult, DisplayRationale); ... procedure TCameraComponentForm.btnStartCameraClick(Sender: TObject); begin //21.08.20 Try get resolutions here at first if cbResolutions.Items.Count = 0 then PermissionsService.RequestPermissions([PermissionCamera], AccessCameraPermissionRequestResult, DisplayRationale) else //only then start the camera with 2nd click PermissionsService.RequestPermissions([PermissionCamera], ActivateCameraPermissionRequestResult, DisplayRationale); end; Et voilâ, camera is working for me. I made some comments already, that I think the non-working samples and demos are a MAJOR SHOWSTOPPER, especially for new customers. If Embarcadero is making a trial, and CE version, they should better take most care that all samples will run out-of-the-box. If new customers trying new tools are a little bit like me, I will DROP the new tools immediately if I cannot get the basic demos and hello worlds running without major quirks. Thats my proof or quality for any software or tool. So its Embarcadero's marketing decision, not mine.
  22. Fr0sT.Brutal

    Anybody up for an ethics question?

    Another +1 for throwing an error. You can't tell whether it's OK to replace some value from "foo" to "0" and will take responsibility for this replacement f.ex., if someone's bank balance would become zero when a corrupted input is given to you app 🙂 In the area you described specs are your Bible, your weapon and defense. Don't do anything more or less
  23. Stefan Glienke

    Anybody up for an ethics question?

    Giving an error is *always* better than assuming an "instead of" value for invalid data. You can potentially ruin the entire system by doing that. The strategy of giving the error is up to the developer - the "it simply crashes and refuses to do anything with the entire data" is fine. It depends on the data itself if let's say all valid entries can be imported and only the invalid ones can be left out and possibly reported back so the customer can fix them and then import those.
  24. Issue resolved. The cause of my problem is this: Myxcode-select command-line tool was not pointing to my main Xcode installation folder. This must have happened when I used brew to download the latest Xcode command line tools, and brew then set xcode-selectto point to a different path (/Library/Developer/CommandLineTools). I repaired this by issuing this command at the terminal, following the instruction from http://docwiki.embarcadero.com/RADStudio/Sydney/en/SDK_Manager#Troubleshooting_.28macOS_and_iOS.29 sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
×