Saturday, June 14, 2014

Concept 3.0

A lot has happened since the last time I've posted. To start with, I finally written the Concept manual, a 600 pages book describing the Concept programming language and framework. Now I'm looking for an editor that I could afford. I hope that the book will be available in October 2014.

Let's start with the new stuff in Concept 3.0
  • it comes with in .deb packages for i386 and amd64
  • added support for GPU programming
  • added support for libvirt
  • added code profiler
  • added SSH APIs
  • added Modbus protocol support
  • added tls/ssl support via OpenSSL
  • added support for the netflow protocol
  • added new compiler and run-time optimizations that makes Concept run up to two times faster
  • added support for green threads (beside native threads). Note that I prefer calling green threads "cheap" threads.
  • has a brand new client, Concept Client 3.0 that dropped GTK in favor of QT (see bellow)

Lets start with the GPU programming. It uses OpenCL and it automatically converts Concept bytecode to GPU bytecode, for example:


As you see, all the code is written in Concept (no OpenCL code). The Parallel framework may use both concept code and/or OpenCL code. As a note, for Concept functions, all parameters must be declared by type (see foo4 definition).


Now, the Profiler worked miracles for me, making Gyro faster than ever.


It will give you real-time information directly in the application (via ProfilerForm), or you could  use the low-level APIs for background analytic:

Or even simpler, you could just choose "Profiler project" from the Concept IDE.


The green threads are a really cool toy:

These threads are scheduled directly by the Concept Core, not needing semaphores or any kind of synchronization. These threads are really fast, but are limited to one CPU core. You could combine native threads with green threads for maximum performance. Also, green threads run with the regular Concept Core (not needing the multi-threaded core).

The Concept Client was completely rewritten. I have hesitated in forcing the Gtk3 version due to stability problems on MS Windows. I've watched the Qt community, forums and list, and I was impressed by the passion of the developers, unlike the Gtk groups where there were mixed posts, both by professionals and "political" individuals involved in ego wars. So, I've rewritten Concept Client on Qt, I even made a converter from .glade files to Qt code. I like that Qt looks and performs better, supports a lot more platforms, and seems stabler. The only advantages of Gtk are the significantly lower memory usage (for the same test application, Concept Client Qt uses 102 MB of memory while Gtk 63 MB). Since I'm talking of a "Client" 40 MB difference is relatively low comparing to the advantages. Qt is faster, more responsive and behaves consistently on every platform. I find Gtk slightly more flexible on "exotic" operations, for example, adding custom controls in a tab header.

Perhaps the greatest advantage of Qt is the completeness of the framework. It includes webkit, audio, network and event webcam APIs, elements missing in Gtk (I've compiled webkit for gtk, and added OpenCV for webcam support). It also has a sheet control, that Gtk supported only with the additional GtkExtra package. However the GtkExtra developers don't seem to hurry the port to Gtk3.

It actually looks better:


I hope I will manage to post more often in the next month. In August this year, Concept will be 10 years old!