Edwin Yip
Members-
Content Count
432 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Edwin Yip
-
Do you want to scroll TScrollBox vertically with mouse wheel?
-
As I understand it, although it's being released on github, this project is not open source, right?
-
I had the same curiosity and asked the author on facebook. It actually contains a modified version of Tiny C Compiler, but I didn't ask for implementation details. That being said, the OP might can give us more details.
-
DPROJ changes: SourceTree vs Beyond Compare
Edwin Yip replied to Mike Torrettinni's topic in General Help
Will you share your final choice with us then? ;) -
x-superobject?
-
Well done sir! BTW, what tool(s) do you use to measure the performance? Thanks.
-
Your hard work greatly improved the richness of drawing/painting/image-processing/animation abilities of Delphi! Thanks!
-
My experience has shown that FreeSSHd is better than FileZilla.
-
The Curiously Recurring Generic Pattern
Edwin Yip replied to Erik@Grijjy's topic in Tips / Blogs / Tutorials / Videos
Hi David, for simple use cases, the generic collections are simpler. However, please consider situations where you need to add a bunch of methods such as CopyFromLeft, CopyFromRight, Each, GetPropertyValuesByNameAsCSV, and so on, to the enhanced list class. In this case I have two options, and I'll outline the pros and cons: Inherit from the generic TObjectList<> Pros: Can eliminate some of the typecasting, but not all, without techniques such as Curiously Recurring Generic Pattern the OP is presenting. Cons: From time to time, the compiler emits strange internal error and I'll have to restart the IDE. bloated EXE sizes. Inherit from the non-generic TObjectList Pros: No strange compiler errors. No strange bloated EXE sizes. Cons: In order to eliminate all typecasting for the list users, you'll have to make a derived class for each object. That being said, I might be wrong, but my gut feeling is using the non-generic TList/TObjectList is more comfortable, especially without the need to constantly restart the IDE. By IList, sorry for not being clearer, it's from Spring4D which is excellent, so it just occurred to me. I should have said TList<>. -
The Curiously Recurring Generic Pattern
Edwin Yip replied to Erik@Grijjy's topic in Tips / Blogs / Tutorials / Videos
This is a good technique, but speaking of generic collections, honestly, after using it in several projects, now except for dictionaries, I've gone back to using the non-generic collections from `System.Contnrs`. In order to make it comfortable using the object lists, all I have to do is to override the `Items` property for a specific class, like this: TAddressList = class(TEyObjectList) // TEyObjectList is an enhanced descendent of TObjectList protected function GetItem(Index: Integer): TAddress; procedure SetItem(Index: Integer; aObj: TAddress); public property Items[Index: Integer]: TAddress read GetItem write SetItem; default; end; Making such derived class is a 10-seconds operation with the help of MMX's class templates and Find-and-Replace. Maybe it's just me, but I really don't find too much cases where a `IList` can serve both the objects and string items (for example) well. Maybe for library writers it's good to have a collection to rule them all, but for users of libraries, specificity is a good thing. Another burden is the lame support of generics of the Delphi compiler... -
The Curiously Recurring Generic Pattern
Edwin Yip replied to Erik@Grijjy's topic in Tips / Blogs / Tutorials / Videos
FYI, XE4 can compile the tests, after removing the inline var statements. -
Frequent and/or annoying typos you make while coding
Edwin Yip replied to Tommi Prami's topic in General Help
This is where GExperts Code Proofreader come to rescue. I couldn't code without it. When I encounter situations like what @dummzeuch described, I don't disable it, doing that is like a Chinese old saying: ;) You can get around it, can't you? For instance, use another var name instead. -
HTML Component Library + StyleControls from almdev can do that.
-
I upgraded THunSpell (by Stefan Ascher) for unicode Delphi
Edwin Yip replied to Edwin Yip's topic in I made this
Hi Ian, By "for Unicode" it means it can be compiled and run correctly under Delphi 2009 plus, of course it also works for ANSI. The repository already contains a libhunspell.dll in the demo subfolder. Hope it helps. -
So after: I failed to upgrade LS Speller to support Unicode Delphi, found that the TMS one from 2017 is not fast enough for me, none of the above mentioned Hunspell wrapper has a dialog which directly operates on TRichEdit/TMemo In the end I found on Torry.net another hunspell wrapper originally written by Stefan Ascher, and have upgraded to support Unicode Delphi. Check my new post if you are interested:
-
Very helpful and quite complete list and details about spell check libraries by Darian, thanks for sharing! I use the LS Spell Checker mentioned above in a project written in D7 (and contributed fixes back to Luzius the author in the past). Now I need a unicode version (for D2009 and above). I tried to modify it and it seems to be tricky since it mostly deals with character strings. So I wonder, if anyone has a unicode version of it and can you share it with the rest of us? And happy new year to every one in the forum!
-
Quite OK Image (QOI) image format
Edwin Yip replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
The official QOI repo as 3.8K stars, no bad. -
Image32 - 2D graphics library (open source freeware)
Edwin Yip replied to angusj's topic in I made this
The Image32-based controls demo is cool! And this seems to be a new feature added most recently.- 42 replies
-
- graphics
- cross-platform
-
(and 2 more)
Tagged with:
-
Announce: $150 discount on Rubicon Pro ( optimized full text search component suite for Delphi )
Edwin Yip replied to Ann Lynnworth's topic in Delphi Third-Party
@Ann Lynnworth, I'm not encourage nor pushing you to work on CJK words support in your FTS library, because I honestly think SQLite FTS is excellent already, even without Chinese word support built in, it allows me to supply call back procedures to overcome that, if I want to, thanks to the excellent works by authors of both SQLite and mORMot. But since you are interested, here are some points that might be of helpful: No, spaces used in Chinese writings are not for delimiting words, it's impossible to just use spaces and punctuation to segment Chinese words. Translation shown by services like Google Translate is a result of hard works by CS researchers all around the world in the past 4 or 5 decades. Yes, decades. It's not always feasible for a desktop app to use Google API, even if it provides the word segmentation service (which I don't think so as far as I know). Further more, in case of China, we have the GFW, which makes it impossible to use Google API. The 'cola' translation is not a mistake, but rather a local 'alias' (maybe only limited to that place) to cocaine :D -
Announce: $150 discount on Rubicon Pro ( optimized full text search component suite for Delphi )
Edwin Yip replied to Ann Lynnworth's topic in Delphi Third-Party
Hah, yes, languages in the world are extremely diverse. Algorithms exist, and open source projects too, some in c and some in golang on github. AFAIK, there is only one in Pascal: https://github.com/PassByYou888/zChinese, but I don't know how good it's and the size of the files. -
Announce: $150 discount on Rubicon Pro ( optimized full text search component suite for Delphi )
Edwin Yip replied to Ann Lynnworth's topic in Delphi Third-Party
Well, I must say, from your description I already know it most likely doesn't support it, because you didn't know CJK words have no word delimiters ;) -
Announce: $150 discount on Rubicon Pro ( optimized full text search component suite for Delphi )
Edwin Yip replied to Ann Lynnworth's topic in Delphi Third-Party
Sure, because Chinese, Japanese and Korean have no such a thing as word delimiter :D Word segmentation, is a fundamental and professional term in your area, I guess. -
Announce: $150 discount on Rubicon Pro ( optimized full text search component suite for Delphi )
Edwin Yip replied to Ann Lynnworth's topic in Delphi Third-Party
@Ann Lynnworth, Does it support CJK words? SQLITE FTS does not, and that's my only complain about it. -
Announce: $150 discount on Rubicon Pro ( optimized full text search component suite for Delphi )
Edwin Yip replied to Ann Lynnworth's topic in Delphi Third-Party
Yes. No. Re. FTS5 sample compile-able with Delphi, I know at least mORMot (which I use) and DISQLite have that. Hope it helps. -
Announce: $150 discount on Rubicon Pro ( optimized full text search component suite for Delphi )
Edwin Yip replied to Ann Lynnworth's topic in Delphi Third-Party
Thanks for the answers Ann. I use mORMot for db connection. Just one note - if you take full-text search seriously (I know you do), you cannot ignore SQLite's FTS3/4/5 (with code sponsor from the Google search team) because it's the currently the number one embedded/desktop FTS engine in the world. The features you described seems to be all supported by SQLite FTS as far as I know.