-
Content Count
655 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Bill Meyer
-
It was a long time ago, but let me offer a few recollections. I got UCSD Pascal (for CP/M) at a disk copying fest held at Foothill College in Los Altos Hills, CA. Fairly certain it was 1978. There was also Sorcim Pascal/M which was 1980-81, I think, and Pascal-MT+ from the same time. Microsoft also released an ISO Pascal which had no I/O, since ISO defined none. TP 1.0 (for CP/M) was 1983, and flyers were sent out with cartoon art of "Frank Borland". Looked like a prospector, as I recall. I still have my manual from that. When I called to ask about it, Philippe was answering the phone from his office above the Jaguar repair shop in Scotts Valley. TP 1 came out just after a scandal about JRT Pascal, which had been offered for $29.95, I think, but was apparently quite buggy. Some of the UK Borland team went off on their own when Borland elected not to market Modula-2. And how many here realize that Quattro Pro was written in Modula-2? But there were, in fact, versions of Modula-2 published by Borland, and I used to have one that ran on my LittleBoard Z80. The commercial Modula-2 was under the name Topspeed. And they also offered Topspeed C++. See this page: http://www.edm2.com/index.php/TopSpeed_Modula-2 Also see: https://en.wikipedia.org/wiki/Modula-2
-
Blogged : Advice for Delphi library authors
Bill Meyer replied to Vincent Parrett's topic in Tips / Blogs / Tutorials / Videos
GetIt doesn't -- in most cases -- let you put things where you would like. -
Blogged : Advice for Delphi library authors
Bill Meyer replied to Vincent Parrett's topic in Tips / Blogs / Tutorials / Videos
Also, as far as I know, many (most?) component packages ignore the possibility of "Install for All Users." Some claim (falsely) to support it. Not usually an issue, but some months ago, I was setting up a new VM to be used by members of our team, and it would have been convenient to install the 8 devs as users, then install everything to be for all users. Each could then make the VM personal by removing the other users. -
Max string literal length = 255
Bill Meyer replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
And despite the unwieldly nature of string literals you would have to scroll horizontally to read, that feature of the IDE begs the question of why the limit on the literals is 255. -
A Component Named xxxx Already Exists.
Bill Meyer replied to RockWallaby's topic in Delphi IDE and APIs
This can happen when the named component is present in the PAS file, but not on the form, or vice-versa. In my experience, it comes up when you move a form from a particular version of Delphi in which the component was installed to one in which the component type is not installed. Most often, it is in the DFM file, which will not display the component because it can't be found. Right-click on the form and edit as text, then search on the name. Alternately, it could be absent from the form, but the declaration in the PAS file may still be present. If that is the case, remove the declaration and then place your new component. As to the behavior described with CodeSite, I have no idea, as I have never experienced that. You could try a message to Ray Konopka, who is very helpful. -
Generic set comparer
Bill Meyer replied to Attila Kovacs's topic in Algorithms, Data Structures and Class Design
Ah, I did indeed misunderstand. So really, you want set operations on collections of whatever type. -
Generic set comparer
Bill Meyer replied to Attila Kovacs's topic in Algorithms, Data Structures and Class Design
Not aware of any library, but I have written small routines like function AnyOf(ATarget, AActual: TOptionSet): Boolean; and function Contains(ATarget, AActual: TOptionSet): Boolean; Makes the code more readable, I think, which is all I really needed. My notion was that although the set operations are pretty terse, not a lot of devs spend much time reading them, so comprehension may be a struggle. AnyOf() handles any members of the target being present in the actual: Result := ATarget * AActual <> []; while Contains() tests: Result := ATarget * AActual = ATarget; Unless your need is for a lot of densely coded operations, this kind of thing may be sufficient. If you do need dense code, then you may better simply use the existing operators. -
How do you identify bottleneck in Delphi code?
Bill Meyer replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I'm three generations removed from my German ancestry. -
Hiding a public property in a descendant class
Bill Meyer replied to Cristian Peța's topic in RTL and Delphi Object Pascal
Visibility can be increased, but not decreased. I seem to recall someone using a trick to gain the effect, but can't recall when or where. This is one of the drawbacks of inheritance. You may find this discussion helpful: https://stackoverflow.com/questions/4749867/delphi-how-to-hide-ancestor-methods -
How do you identify bottleneck in Delphi code?
Bill Meyer replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
You're right. But I find the fun proportional to the improvement. -
A colleague in the office is having an odd problem. We have long stored data in blob fields and now in moving from D2007 to Tokyo, we find that reading out of the blob has converted Ansi strings in the blob to Unicode. That's annoying for the string contend, but the string is simply a version identifier and the rest of the content is compressed data. What would seem obvious is to treat the content as an array of bytes, but somewhere in the chain, and before he pulls it, the conversion has occurred. Opening the table in Database Workbench, the blob editor shows it is correct in the blob. Unicode should not come into play here. The Transliterate property does not appear to alter the behavior. What are we missing?
-
DB Blob being converted to Unicode and should not be
Bill Meyer replied to Bill Meyer's topic in Databases
Will look at that next. Thanks. -
DB Blob being converted to Unicode and should not be
Bill Meyer replied to Bill Meyer's topic in Databases
We were just discussing that. I am not an IB or FB expert either, but we now suspect that the subtype may be the root cause. It should be 0 for binary, but is now set to 1. If that is the issue, we're looking at a lot of scripts to update DBs. -
DB Blob being converted to Unicode and should not be
Bill Meyer replied to Bill Meyer's topic in Databases
Firebird, Blob, and TDataset. The concern now is to read from data written out of D2007, where it has worked fine for years. -
DB Blob being converted to Unicode and should not be
Bill Meyer replied to Bill Meyer's topic in Databases
Yes, blob editor shows us raw hex. Tried TBlobField, and same problem. The conversion appears to occur before the call to CreateBlobStream. Using the answer given here: https://stackoverflow.com/questions/44365344/how-to-read-data-from-a-tblobfield-using-ado-in-delphi In debug with this: function ReadBlobField(DataSet: TDataSet; Field: TField): TBytes; var Stream: TStream; begin Stream := DataSet.CreateBlobStream(Field, bmRead); try SetLength(Result, Stream.Size); if Stream.Size>0 then Stream.ReadBuffer(Result[0], Stream.Size); finally Stream.Free; end; end; Right after Stream.ReadBuffer, Result shows characters with alternating zeroes. -
How do you identify bottleneck in Delphi code?
Bill Meyer replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
You began with the question of how to identify a bottleneck. The first criterion should be whether it is observable by your users. If you have a button click event which executes in 200mS, and you can cut that in half, you may get satisfaction from doing it, but the user will not see the difference. Ordinarily, unless a) an action takes at least dozens of seconds to complete, b) is frequently used and c) can be significantly speeded up (by which I mean 2X or more), the time invested is unlikely to be repaid in user satisfaction. If you are analyzing or converting some kind of data, and the amount to process is large, then you are likely looking in the wrong place. Some years ago, I had a spreadsheet which the app took a few minutes to produce. In the end, it was not code rework, but replacement of some memory datasets which made a difference. Profiling showed that I might improve code execution by 10% or so, but changing to a more suitable component brought a speedup of over 20 times. -
How do you identify bottleneck in Delphi code?
Bill Meyer replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Sorry, can't agree. There are many good reasons to rework code, and performance is just one of them. When I was learning to code, many years ago, a colleague advised "first make it work, then make it fast." Performance optimization should be done because of performance issues, not simply to see whether you can buy another 10% improvement in a routine which doesn't affect user perception at all. Good reasons to rework code include clarity, reduced coupling, better organization of modules, improving naming, adding documentation of the need for the actions in routines. Seeking to optimize every routine in a program is a waste of energy, and a needless cost. Justifiable for a hobby, or in open-source, perhaps, but not in commercial work. -
Delphi Event-based and Asynchronous Programming eBook complete version released
Bill Meyer replied to Dalija Prasnikar's topic in Tips / Blogs / Tutorials / Videos
https://dalija.prasnikar.info/delphiebap -
Global variable : why the compiler don't complain about this ?
Bill Meyer replied to mderie's topic in General Help
So mix or match at every turn? -
Global variable : why the compiler don't complain about this ?
Bill Meyer replied to mderie's topic in General Help
Although it is true that the compiler ought to catch such things, it is also true that - Delphi declares type names like TIntArray - we should declare like TwmIntArray The more the Delphi types increase, the greater the likelihood of collisions with built-in types. Naming is hard, yes, because too often names are assigned thoughtlessly. -
Object Pascal Handbook - Delphi 10.4 Sydney Edition - Marco Cantù (2020) - 571pg
Bill Meyer replied to a topic in Tips / Blogs / Tutorials / Videos
You exchange data for the book. That is implied consent. -
TMS FlexCel would make it a trivial task.
-
How to determine the subjective brightness of my screen?
Bill Meyer replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
Since in the end, you cannot do anything about the monitor characteristics, or the adjustments applied by the user, I think that concern is probably below the noise level. -
At the least... I agree that the site should present in English. That said, Google translate does a good job on the descriptions, at least sufficient to let you decide whether you have an interest in the components.
-
Install recent Delphi versions on Windows XP
Bill Meyer replied to dummzeuch's topic in Delphi IDE and APIs
I have a VM running XP which I keep because it allows me to run Lotus Improv. I believe I had installed and run XE on XP some years ago.