-
Content Count
2563 -
Joined
-
Last visited
-
Days Won
134
Everything posted by Anders Melander
-
Contributing to projects on GitHub with Subversion
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Looks nice. Do you know if they can also host the Gitlab runners or do you need to host those elsewhere? As far as I can tell, for a Delphi environment, I would need a runner running on Windows hosted on another platform (e.g. Azure) or a docker service running somewhere. -
Contributing to projects on GitHub with Subversion
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
-
Contributing to projects on GitHub with Subversion
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Coming from SVN I struggled for a long time with Git. Primarily because the terminology is different. Once I understood the terms properly it clicked and I haven't touched SVN since. Nor do I want to. I think you need to try some more then. There's always TortoiseGit. I have it installed but I very seldom use it. It just feels clunky compared to *everything else*. One thing you need to be aware of is that in Git a file rename (or move) is is just a delete followed by an add. So there is no move/rename per se. That these two operations (delete+add) constitutes a move/rename is detected based on the content of the file. Therefore you should never rename a file and change the content in the same commit. -
Contributing to projects on GitHub with Subversion
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Slashdot? https://slashdot.org/ Did you mean SourceForge? https://sourceforge.net/ Also, there are plenty of other public Git sites besides Github. -
Remove non-utf8 characters from a utf8 string
Anders Melander replied to borni69's topic in Algorithms, Data Structures and Class Design
Are you sure? -
Yes it could. And before reporting it as such one should find out if it is. That's not really a reliable metric to determine where a bug is located. Regardless, these kind of problems are regularly found in ZLib. Just try to search for "zlib loop" or go through the issue list at Github.
-
Yes, that's probably a bug. I don't know if ZLib is supposed to be able to handle anything you throw at it gracefully but being a general purpose library I would think so. We haven't seen the code that exhibits the problem or a sample of the data that causes it, so I'm hesitant to declare the problem a bug in ZLib or the Delphi wrapper. If it's caused by a bug in ZLib then it would be a good idea to also report it at the ZLib repository: https://github.com/madler/zlib I don't think Embarcadero is likely to fix bugs in ZLib.
-
That is not the purpose of the checksum. The purpose is to guarantee that the output is correct.
-
I think the checksum is there to guard against a broken implementation. You can't validate the algorithm. Only the output it produces. I'm not really sure what it is you're disputing.
-
Yes, if it's documented as doing so. It's perfectly acceptable to have an implementation that requires the input data to be valid. For example if you have already verified that the input data is valid elsewhere then you'd probably want the decompressor to not be slowed down with validating the data once more. At some point you have to assume that the input you're given is valid.
-
Yes, you're right and it makes sense. The integrity of the data within a container is the responsibility of the container so the ZLib decompressor can assume that it's being given valid data and only uses its own checksum to verify that it is producing the correct output.
-
As far as I can see the fix suggested in RSP-9819 has already been implemented in DispatchInvoke (I checked D10.3). The RSP-14749 issue looks more promising. I'm not sure why it was closed with the resolution "test case error" but since it's marked as fixed in 10.4.1 I compared the source of ComObj.pas and the only change in it is this (10.3.1 on the left, 10.4.1 on the right): That does actually look like a fix for the issue in RSP-14749. If you don't have 10.4.1 you can try patching the 10.3 ComObj.pas with the above change to see if solves the problem for you.
- 14 replies
-
- rio
- olevariant
-
(and 1 more)
Tagged with:
-
How to operate a private field in other unit?
Anders Melander replied to pcplayer99's topic in RTL and Delphi Object Pascal
Yes, poor me. Crying all the way to the bank -
Didn't anyone Google "zlib checksum"? According to the ZLib specification there is a checksum: https://tools.ietf.org/html/rfc1950
-
How to operate a private field in other unit?
Anders Melander replied to pcplayer99's topic in RTL and Delphi Object Pascal
That almost sounded like an insult but assuming that wasn't the intention; I didn't write the code but I've been tasked with maintaining, fixing and modernizing it. with isn't the only problem but it's the one that makes refactoring the code a much harder task than it should have been - and it makes the code undebuggable. Among the other beauties in this code base are the local procedures; The above was actually found in a local procedure, several levels down. The top level method is a few thousand lines of pure horror. -
Double-dabble to convert binary to decimal
Anders Melander replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
Ummm. I must be missing some deeper meaning here but what is the point of pretending that an integer values isn't already stored in binary format? I mean, I could understand if you were trying to implement bin/dec conversion on a denary computer but other than that this sounds like an algorithm for people that doesn't have access to computers. -
How to operate a private field in other unit?
Anders Melander replied to pcplayer99's topic in RTL and Delphi Object Pascal
I dnt knw bout u, bt I gt $ 4 the Q of my cde. Not for the amount of keystrokes I can save. -
Double-dabble to convert binary to decimal
Anders Melander replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
You mean to say that you've memorized all the 16 hex digits? Wow -
How to operate a private field in other unit?
Anders Melander replied to pcplayer99's topic in RTL and Delphi Object Pascal
I'm still hoping that with will be completely eliminated from the language. Here's a few lines from the code I'm currently working on: begin ...3-400 lines of code... with vPlan.DataController, dbSlaktePlan, BLPlan, Grupper ,Data[Id] do begin ...a few hundre lines more... with vPlan, BLPlan.SiteSum, Plans[Id] do begin ...and it goes on... -
Localization inquery
Anders Melander replied to Clément's topic in Algorithms, Data Structures and Class Design
It seems to me that what you're describing is beyond the scope of localization and therefore BTM. BTM is a localization manager/editor. It provides translations to the standard localization mechanism built into the Delphi RTL. If you're not using that, and it doesn't sound like it, then I can't see how BTM can meet your needs. That said, the translated resource modules generated by BTM are just DLLs containing the translated resources (i.e. resourcestrings and DFMs). This means that you can use regular Windows APIs to load and extract the resources from these resource modules. It's also possible to hook into the resource loading mechanism and redirect the loading of selected forms to other resource modules. This could provide the multi-language capability. You could also just read the translation project file (it's XML) and extract the translations from there. But, to be honest, none of the above sounds like a good path to go down. -
Workaround for binary data in strings ...
Anders Melander replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
Yes but that was not what you wrote. -
Workaround for binary data in strings ...
Anders Melander replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
*cough* WideString *cough* Available since D4 or thereabouts... -
Local string variable value is not assigned for 2nd and following calls
Anders Melander replied to ertank's topic in RTL and Delphi Object Pascal
Yet again the duck proves that it's invaluable. -
ArduPilot and QGroundControl not working for you?
-
Yes. Without that I wouldn't use them.