Tuesday, July 31, 2012

Async/Await in Delphi

Let’s assume you’ve inherited this pretty useless code.
procedure TForm125.Button1Click(Sender: TObject);
var
  button: TButton;
begin
  button := Sender as TButton;
  button.Caption := 'Working ...';
  button.Enabled := false;
  Sleep(5000);
  button.Enabled := true;
  button.Caption := 'Done!';
end;

Now, your boss says, you have to make it parallel so the user can start three copies of it. (You also have to add two new buttons to the form to start those instances but that’s easy to do.)

Tuesday, July 17, 2012

Параллельное программирование с OmniThreadLibrary

Alex did the impossible and translated all existing parts of Parallel Programming with OmniThreadLibrary in a record time! The Russian version of the book is now on sale at LeanPub.

Параллельное программирование с OmniThreadLibrary

Click here for additional information about the book…

Monday, July 16, 2012

Programming with Smart

Today I have published a new chapter in A Smart BookProgramming with Smart. Inside you’ll find:

  • My First Smart Program
  • File Management
  • Application Architecture
  • Forms and Navigation
  • Message Dialogs
  • Themes and Styles
  • Command-line Applications
  • Writing Games

Click here for more information about the book …

Tuesday, July 10, 2012

Параллельное программирование с OmniThreadLibrary *

bookpage[* Translation: Parallel Programming with OmniThreadLibrary]

Fellow programmer Егоров Александр (Alex Egorov) has offered to translate the OmniThreadLibrary book into Russian.

As the original book, it will be published on the LeanPub. Current plan is to make it available after the High-level multithreading chapter is translated. At the moment, you can download the first draft which contains translated Introduction.

You can express your interest in the book here.

Sunday, July 08, 2012

Introduction to OmniThreadLibrary

The Introduction to OmniThreadLibrary chapter is completed. New version of the book has already been published and all buyers have been notified by the email.

Wiki will be updated soon.

Please remember – the best way to support the OmniThreadLibrary project is to buy the book!

The next chapter will be either Synchronisation or How-to. I’ll give you few more days of voting time to decide the matter.

Friday, July 06, 2012

New Poll

There’s a new poll available – look to the right and you’ll see it.

If you have any preferences on what you want to read in the Parallel Programming with OmniThreadLibrary next, please vote.

Thursday, July 05, 2012

High-level Multithreading

Chapter five of my book Parallel Programming with OmniThreadLibrary is now completed. New version of the book has already been published and all buyers have been notified by the email.

Wiki will be updated soon.

Please remember – the best way to support the OmniThreadLibrary project is to buy the book!

The next chapter on the list is Introduction to OmniThreadLibrary which won the public poll by a very small margin (34 votes against the 31 votes for the Synchronisation chapter).

Smart Controls

Today I have published new version of the A Smart Book.

Newly added chapter Smart Control on 54 pages covers all built-in controls, from TW3Panel to TW3Header. Additional sections include tips on writing custom controls and description of the TW3ScrollControl control.

Sample book was also extended. In addition to Smart Pascal and Regular Expressions chapters it now contains selected parts from the Smart Controls chapter, including full text on TW3EditBox and TW3Toolbar.

Click this link for more information about the book …

Wednesday, July 04, 2012

OmniThreadLibrary Documentation: Blocking Collection

A chapter on blocking collection (IOmniBlockingCollection) is now available online.

Tuesday, July 03, 2012

OmniThreadLibrary Documentation: ForkJoin

A chapter on Parallel.ForkJoin is now available online.

Better OnStop

Pop quiz! What’s wrong with this code?

  FPipeline1 := Parallel.Pipeline
.Stage(
procedure (const input: TOmniValue; var output: TOmniValue)
begin
end)
.Stage(
procedure (const input: TOmniValue; var output: TOmniValue)
begin
end)
.OnStop(
procedure
begin
Caption := 'All done';
FPipeline1 := nil;
end)
.Run;
FPipeline1.Input.CompleteAdding;