Timeline - Delphi Workshop

Thumbnail

noreply@blogger.com (Rudy Velthuis) | 2017-07-04 13:32

A few years ago, in his Wiert Corner, Jeroen commented that some things were still missing from my article Addressing pointers. It took me a long time, but now I got around to it and updated the article with info about old Turbo-Pascal-style objects and with procedural types, method types and anonymous methods. Have "fun" reading.

Thumbnail

| 2017-06-30 00:00

Thumbnail

noreply@blogger.com (Rudy Velthuis) | 2017-05-20 10:30

Especially on StackOverflow, but also in the Embarcadero forums, I frequently encounter (stupidly) written DLLs, e.g. for hardware or some exotic piece of software that expose things like C++ classes or Delphi AnsiStrings or dynamic arrays. It should have been obvious that such DLLs can not be used by most users who use another language to communicate with the DLL. That is why I wrote an article called "DLL dos and don'ts" about how I would write DLLs that can be consumed by (almost) every language. I think that it could be a good read for anyone writing DLLs, not…

Thumbnail

noreply@blogger.com (Stefan Glienke) | 2017-05-11 22:15

Since the introduction of Nullable types in Spring4D they had a problem: assigning null to them was cumbersome. Some time ago you could implicitly assign a Variant to them which made it possible to assign Null. However that caused some issue because of implicit Variant type conversion. Imagine you had a Nullable<Integer> which should only allow Null or some Integer. But in fact you could assign a string to it - not good. Why was that the case? Well because it had an implicit operator for Variant to Nullable<Integer> and the compiler was too smart converting the string into a…

Thumbnail

noreply@blogger.com (Stefan Glienke) | 2017-05-11 19:37

Quick, what is wrong with this code performance wise? function TWhereIterator<T>.MoveNext: Boolean; var current: T; begin Result := False; if fState = STATE_ENUMERATOR then begin fEnumerator := fSource.GetEnumerator; fState := STATE_RUNNING; end; if fState = STATE_RUNNING then begin while fEnumerator.MoveNext do begin current := fEnumerator.Current; if fPredicate(current) then begin fCurrent := current; Exit(True); end; end; fState := STATE_FINISHED; fEnumerator := nil; end; end; Maybe you have read this article in the past (if not, feel free to read it first, I'll be waiting) and know what to look for. There is no exception or string here but a function returning…

Thumbnail

| 2017-05-11 00:00

Thumbnail

noreply@blogger.com (Stefan Glienke) | 2017-02-23 17:48

The good When working in a loosely coupled software architecture you might be using different modules: packages, dynamic link libraries and typically a host executable that loads them. If you are using a DI Container it is very easy to extend functionality by just putting that into one module and once its loaded it feeds the container all the nice things it contains and another module might consume these. That all works fine and well. The bad The fun begins as so often when generic types join the game. Let's say we have a generic interface that we are using…

Thumbnail

noreply@blogger.com (Rudy Velthuis) | 2017-01-01 19:13

To make it easier for me, as well as for downloaders, I put my BigIntegers and BigDecimals code on GitHub. You can find these and related files (tests, debug visualizers, test data generators, etc.) on my DelphiBigNumbers project on GitHub.

blong | 2016-11-22 22:15

During CodeRage XI I had a couple of Lightning Talks broadcast on a subject I’ve been intending to write up for quite a long time, but haven’t quite managed to achieve: how to emit debug log messages on the various FireMonkey platforms. I made a 10 minute video for Delphi and one for C++ looking at all the target platforms, Win32/Win64, OS X/macOS, Android and iOS, showing the logging options and then looking at how to view log output. Unfortunately I got a bit caught up in some work and didn’t publicise this ahead of the conference, so I think…

Page 133 of 144

```