-
Content Count
2771 -
Joined
-
Last visited
-
Days Won
147
Everything posted by Anders Melander
-
Contributing to projects on GitHub with Subversion
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
And there's even a medical term for it: Rigor Mortis No but seriously, I'm not that young myself, but once you start not learning new stuff your cognitive abilities will deteriorate: Use it or Lose it. Your brain will create new neurons your whole life as long as you give it reason to. Luckily the brains plasticity means that a decline is reversible. Just give your brain some exercise. -
Best type for data buffer: TBytes, RawByteString, String, AnsiString, ...
Anders Melander replied to Rollo62's topic in Algorithms, Data Structures and Class Design
The only general advice I can give is: Convenience or Performance? Pick one. I won't get into this discussion about which of the many different data types can solve your problem best, because your requirements seems rather fluid and it's impossible to give any targeted advice, when we don't know anything about the specifics. I'm puzzled why one would even be asking a question like this other than to pass time. If the implementation details are important you shouldn't rely on something someone said on a forum anyway. Try different solutions and benchmark them. If none of the solutions are good enough then there will be something to discuss. Disclaimer: I've been up all night and I'm on my eight cup of coffee. -
Yes you're right. That's what I get for thinking I can remember issue numbers while watching a Counter Strike match..
- 14 replies
-
- rio
- olevariant
-
(and 1 more)
Tagged with:
-
That was the performance issue. RSP-14749 was the leak. But as Dave suggested, the change in ComObj probably fixed both.
- 14 replies
-
- rio
- olevariant
-
(and 1 more)
Tagged with:
-
Contributing to projects on GitHub with Subversion
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Here's my VCS journey, as I remember it: 1994: MKS Source Integrity 1997: StarBase Versions & StarTeam, PVCS and CVS 1999: Borland TeamSource & Visual SourceSafe 2004 Borland StarTeam 2008 SVN 2018 Visual Studio Team Services 2019 Git Of these VSS and VSTS were bad but PVCS was horrible. Borland TeamSource is best forgotten. -
Contributing to projects on GitHub with Subversion
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Reminds me of the time I tried to teach the great grandparents to use a mobile phone... -
Yeah. There's a reason we don't have <BLINK> in HTML anymore. P.S. I just tried googling "blink html"... WTH? Do they think they're clever? Okay they're a bit clever because if you google "html blink" the result differs subtly.
-
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