Monday, December 27, 2010

Concept 2.0 RC available

Concept 2.0 RC is now available. Now it supports IPv6 both Concept Client and Server.
Except the announced features, I've added a few unplanned ones:

1) Background textures for windowed objects

2) User confirmation for operations that pose a security risk

3) Alerts in GyroGears

A few tests are still to go, but it is generally stable.

Wednesday, December 22, 2010

Concept 2.0 sneak preview

I've been working a lot lately to the new services and Concept Application Server.
A new operator added to the language core:

operator ?? (cannot be overloaded)

Is somehow similar to || except that instead of true it returns the first non-null value.


var object=new A();
var object2=new B();
var a=object ?? object2;

If object is null, then a==object2 , if object is not null, a=object
Also, arrays are a little special. An empty array is considered to be null, same for empty strings, so:

var a= [] ?? [1,2,3];

will return [1,2,3] and:

var s= "" ? "123";

will return "123"


A better serialization engine and a safer InterApp message exchange system is now available.

Some screen shots from the working version of Concept BeeKeeper (concept administration tool):

For Concept Application Server 2.0 a new Client is provided (2.0). Old clients remain compatible (though some controls will look different).

I'll post back when a BETA version will be available.

Monday, December 13, 2010

Preparing for Concept 2.0

Concept 1.x is now powerful and mature. It is stable and the relation between Concept Application Server and GyroGears is now truly symbiotic. GyroGears is also stable and prepared to evolve into a new generation of application generators. The 2.0 release of Concept will include:
  1. faster execution time
  2. smaller memory footprint
  3. less CPU usage
  4. same zero crash-tolerance policy
  5. more security features
  6. Zero-downtime updating system that will allow the update of Concept Server with no downtime (or with at most a few seconds of downtime without affecting the users).
  7. CLB (Concept Load Balancer) out of BETA
  8. CIDE enhancements
  9. Do/Install deployment tool replacing CUDW
  10. Binary compatible with Concept 1.x (Concept will always be backward-compatible)
  11. An enhanced GyroGears (1.2) distribution
  12. Thread-safe variables and better multithread APIs
Concept 2.0 will focus on mission critical applications. The first BETA version will be available early in 2011. Some of the features are already available in the official Concept 1.2 distribution.

Sunday, December 5, 2010

Faster compiler (6x), CSV library, client updates and Gyro

I've had some work done on the accel compiler - which was a little slow (12mb of source code compiled in about 8 minutes). Now, is about few seconds over a minute ... After some tests, the average optimization is about 6x (six times faster).

I've added a convenient csv library (standard.lib.csv and CSV.con) with both a complex and a simple interface.

For the simple interface you can do something like:

var matrix=CSV::Parse(ReadFile("data.txt"));

matrix being an array of arrays.

Also I've updated the Concept Client - some small memory leaks fixed and the webkit component. I dropped the microhttpd used to emulate a server for managing local request (request that are handled within the application itself). Now the request are intercepted directly from the webkit/libsoup requests.

In GyroGears I've added a new field (optional) in the User entity: Failed attempts
This logs the failed attempts for an user, and then locks the account after 3 failed attempts.

I have no pretty screen shots this time...

Tuesday, November 23, 2010

Sheet, GyroGears and Apache follow up

Concept Framework was missing a nice Grid control. After some searches I came over GtkSheet in gtk-extra-2.0. A very nice set of controls, but with some problems on windows. I've took some file from the CVS and is working fine now. I've made a test application for reading Excel files:

Works fine with excel 97-2003 files, bot doesn't support images (however the grid does, and you can insert virtually any control - buttons, charts, etc.).

Also I've made the grid available in GyroGears via the long string data type, with the "Sheet" option. Here is a sample screen shot from a Gyro application:

In the previous post I've talked about the caching on Apache HTTPD2. I've made some nice charts (in Concept) that illustrate the server response time for cached csp scripts, static html and cached csp.

I've ran the test several times and isolated the first run and the best run. As you can see, for Cached CSP the delivery time is slightly better from the static HTML. And some random key were generated to memcached to emulate a real-world situation.
I've activated the engine on , and the optimization is now dramatic.

Friday, November 19, 2010

Its awesomeness, Apache HTTPD2

I've been working a lot in the last few days. I've added a GeoIP wrapper for Concept, documentation available at Nice library by the way.

Now, for the cool stuff. I was thinking how much content is served to all the visitors ... and that content is cached by memcached to reduce workload ... but I think I can go further - direct caching from the web server. Let's see in the pretty colored schema bellow.

Let's say that an user (Client1) makes a request to Apache HTTPD. The server will call ConceptCGI to process the request, and the script will access a memcached server for caching data. But, if we cache the whole page, images, etc., why is a need for the CGI to run? Well, it isn't. For that I write an Apache module (mod_conceptcache) that allows the server to serve cached memcached data very fast, so fast that Client 2 will access cached data very fast without generating any significant CPU or memory usage on the server - and that's critical because the server can serve more users using the same resources. I've set some nice APIs for the back-end, the programmer being able to explicitly cache data for visitors, users or locations (as you can see in the figure, mod_concept_cache is linked to GeoIP). Documentation is available on
GyroGears is already aware of this, and generates code for the http back-end using ApacheCacher.

PS: Fast = tens of times faster

Tuesday, November 9, 2010

SQLite now in GyroGears

Added SQLite on the list of supported servers in GyroGears. Now GyroGears is tested on MySQL, PostgreSQL, Firebird and SQLite. Oracle XE support will be available soon.

Wednesday, November 3, 2010

HTTP as a transport layer

I've implemented two modules - one for Concept Client and another for Apache HTTPD 2 that allows concept:// packages to be transported over http://. It uses GET for receiving data from the Concept Application Server and POST to send the concept:// binary package. This is the first step towards the Concept://JavaScript Client that will use the concept:// protocol over http://.
The main benefit of using http:// as a transport layer is that connection can now be stateless, although is a little bit slower than the concept:// standard protocol. Another major advantage is on firewalled networks that allow only HTTP traffic.

Thursday, October 28, 2010

Full touch screen support

A new class available in Concept Framework: RTouchKeyboard. Is a fully customizable keyboard layout (the constructor takes an array for the rendered keys).

The keyboard is already integrated in GyroGears.

A few changes in the Concept Client (windows version): added native Save File and Load File dialogs replacing the GTK dialogs that use to crash when listing files with diacritics.

Wednesday, October 20, 2010

Excel support in Concept

New library added (no. 55): standard.lib.xls
I've came across libxls accidentally. I was surprise to see that is a really nice library with simple APIs - not very mature yet but it promises a lot. I just had to write a wrapper, and I did.

Nice and simple APIs, as usual. Of course, you have low level cell accessing APIs but xls_matrix is convenient (at least for me) - it returns a sheet as a matrix.

I'm having problems with a bug in webkit - when is in editable mode, and I move the cursor from right to left over a link it freezes. I've submitted a bug report and now I wait. Until it will be fixed, I hacked the client module in order to ignore the left keyboard key. Is not nice, but is working (the cursor can be moved with the mouse with no problems).

I've integrated MemCached client into GyroGears. Now, when generating http:// applications, you can set in DataBase.ini or MyDataBase.ini MemCachedServer = "localhost" for example, and the application will use the server running on localhost. If no host is set, no caching will be available.

Tomorrow will open the new website.

Tuesday, October 12, 2010

Concept native WYSIWYG control

I've created a WYSIWYG widget based on Webkit. Tomorrow I'll dump nicedit from GyroGears in favor of the native RWebEditor control.

The interface is pretty simple: RWebEditor extends RWebView and ads just one property: Text

The code should look like this:

Editor=new RWebEditor(owner);
Editor.Text="my html code";

Simple enough ?

On windows webkit-gtk is pretty unstable. I hope to get a fix soon.

Monday, October 11, 2010

Captcha in Concept Framework 1.2

Added a new import library: standard.lib.captcha

This is a captcha generator based on libcaptcha .

The APIs are simple, as usual:

var text=Captcha(var gif);
WriteFile(gif, "captcha.gif");

Resulting in

text will contain the actual generated letters.

Wednesday, September 29, 2010

How do you create ?

This morning I was in a hurry to get to my desktop. I had to get to the old keyboard, filled with kitten hair because I wanted a new feature: a class generator for command line-based scripts or programs. I've tested it with MSMTP (command line smtp client).

Every property was automatically generated from a file that contains parameters description

#Separator is =

Using DoWrap.con (the tool) you can easily generate a wrapper for every command-line based tool.

Also, I've translated Facebook.php from facebook php sdk to Facebook.con, having now the Facebook APIs available in Concept. I still don't use Facebook and I still won't. Nor twitter (Concept Twitter APIs are up-to-date).

Gyro has now a working plug-in system. All features from now on will be implemented as plug-ins.

Do you smile on your way to work?

Sunday, September 26, 2010

GyroGears 1.2 RC1 Released !

GyroGears is out of BETA. Sure, a lot o things can still go wrong, but I'm fairly optimistic that is at release-quality level. I've added a few things:

- Picture and multimedia data fields are now shown in PDF reports (picture bellow)

- A new skin based on the Blue Space II (a few color changes, different progress bar and a modified REditComboBox (the original had black text on black background)

- XML data import and export system now can work with pictures, multimedia or other files. Those are mime encoded into (or from) the XML file

- Update the Twitter library (didn't work anymore due to changes in Twitter log in API)

And again ... hours of testing ...

Saturday, September 25, 2010

New features and more testing

I've spent the last days optimizing GyroGeas for application with heavy data. I've tested MySQL, Firebird and PostgreSQL with databases of at least 500,000 random records. I was impressed by PostgreSQL (being surprisingly fast). On the worst case query, MySQL 5 executed a select (with indexes) in about 14 seconds, Firebird 2.5, in about 20 seconds and PostgreSQL 8.4 in less than 8 seconds. The average query took about 1 second. Firebird was very slow on executing SELECT COUNT()... GROUP BY statements. Except that, overall performance is relatively good for all of the three engines.

New features in Concept Client:
Windows notify using the tray balloon

Combo edit box with progress bar on background for pagination (progress bar shows current page/total pages fraction)

GyroGears now generates all the required indexes for the generated database. I've optimized all the queries and the speed was enhanced.

Tuesday, September 21, 2010

"Paste from clipboard" option for picture data type in GyroGears

I've added a new feature for "picture" data type: paste from clipboard.

Now you can "open", "paste" or "capture from webcam".

Simple but useful.

Memcached client now available in Concept

A few weeks ago I was talking with a friend of mine about memcached. I was very curious about what it can do, and it didn't disappoint me (more about memcached).

I've written a wrapper for libmemcached client library and now it's available for Concept. Here you have a code snippet illustrating a simple "hello world" memcached-based application.

It's really simple and you can ease off the database server. As a cool feature, it supports multiple servers, allowing the developer to dynamically add caching servers.

Tuesday, September 7, 2010

An elephant, a bird, a fish (yes, I know, dolphin != fish) friends of The Bee

Concept Bee (the black one, because blogspot doesn't know about transparency) is now friend with PostgreSQL, Firebird and MySQL.

Now you can generate data-driven applications from scratch for these servers using GyroGears and a set of rules.

Oracle XE is still to be tested. I've made some cosmetic changes to the Gyro generated applications (some custom background and cooler tool bars).

New visual markers (icons) based on row rules:

Also some minor bugs are now fixed thanks to extensive testing with FirebirdSQL. I've posted a bug on the Firebird ODBC bug list regardin SQLNumParams when using "INSERT ... RETURNING id" in a prepared query (it returns the number of parameters + 1).

And now I'm almost there ...

Thursday, September 2, 2010

GyroGears is now DBMS independent

I've just regenerated and tested some of my commercial GyroGears applications on PostgreSQL. I've added rules and definitions both for InnoDB and for PostgreSQL in Gyro. Firebird and Oracle should now work (I'll test it these days with Oracle XE). I'm systematically dropping MySQL/InnoDB in favor of PostgreSQL, which seems more suited to GyroGears applications - nicer API, mature transactional model, nicer support, friendlier tools and no Oracle nor Larry Ellison to sue me.

Thursday, August 19, 2010

PostgreSQL cool driver

I've wrapped these days a driver for PostgreSQL database. I must say that I'm more that impressed by the APIs that are at least clean and straight forward. I will gradually port all my applications from MySQL/InnoDB to PostgreSQL. I'm sure that PostgreSQL will have a really nice future. I was impressed by the way that Postgre handles blobs - you work with them as if they were files.

For Concept Application Server some minor bug fixes, same for GyroGears.

Also, source distribution is now (again) up to date.

Tuesday, July 20, 2010

6 years of Concept

I'm getting closer to an official release after 6 years of Concept. With countless nights of coding, countless days of testing and debugging and many friends to suggest new features, Concept has now commercial quality, although is under an open source license.
Without having a dead-line, I'm trying to create a safe, fast and powerful platform that integrates the best technologies, without focusing on a specific platform.

Concept is ready to bring back the fun in coding.

6 years and 2 days ago, in an afternoon I've started this project.

Sunday, July 11, 2010

OCR in Concept Framework

I've included tesseract in Concept Framework. It's a really nice OCR library and I'm impressed by the quality of the character recognition. I've tried to keep the APIs really simple: just 2 functions, one for debugging and one for the actual OCR.

Prototype looks like this:

number OCR(szImage_filename, refOutText, szLanguage="eng", szDataPath="", szConfigFile="");

It returns OCR_E_CANT_OPEN or OCR_E_CANT_READ if error, or 0 otherwise.

A basic example:

import standard.lib.ocr

class Main {
function Main() {
// if debug file is not set, nul or /dev/null is assumed
if (!OCR("cap.bmp", var data))
echo data;

I hope is as straight forward as it can be.

This morning I've realized that although the framework has many PDF writing APIs (like libharu and PDFLib), it has no PDF reading APIs. So, I've integrated poppler (already used by de Concept Client). Now you can convert PDFs to images or extract text.

The APIs are pretty basic:

import standard.lib.poppler

class Main {
function Main() {
var pdf=PDFLoadBuffer(ReadFile("test.pdf"), "", var err);
if (pdf) {
var pages=PDFPageCount(pdf);
echo "Document has $pages pages\n";
for (var i=0;i<pages;i++) {
echo "Page ${i+1}:\n";
echo "==============";
// extract the text
echo PDFPageText(pdf, i);
// extract page as an image
echo PDFPageImage(pdf, i, "page_$i.png");
echo "==============";
// Don't forget to close !

(sorry for the indentation, blogspot didn't handle it very well)

Thursday, July 8, 2010

UTF8 string functions and MetaObjects for Gyro

UTF8 functions like UTF8Length are now available in standard.lib.str.

Also, Gyro generates now Meta Object interface for each entity. This enables the developer to "populate" only the needed properties for an object instead of reading the whole object. This is useful in http:// applications, minimizing the database traffic.

I'm currently working on the new RadGs website, hope to have it online soon !

Wednesday, June 2, 2010

Marker functions for Gyro Apps

GyroGears applications have now markers. A marked object will stand out in lists or views, by having different background color, a marker image or text, or a progress bar (indicating for example the progress status for a given task).

Here are some screen captures:

You just have to write a marker function that will return the marker value.

Monday, May 31, 2010

Concept Application Server 1.2 is now available!

Several security features added:
- MaxInitialIDLE setting in concept.ini that sets the maximum allowed idle time for a client connection BEFORE initializing an application
- Keep Alive packets to check if client is on-line
- New Concept Update Service

New properties for GUI objects, updated with GTK 2.20.
New client dialogs, like this one:

Friday, April 30, 2010

More optimizations

I've optimized the memory fragmentation (far less memory allocations/deallocations in Concept Core). GyroGears now generates smart update functions reducing the amount of data sent to the database server (reducing the load in high-concurrency). These are the final steps to the first release. Also, a bug in Concept Client regarding a desynchronization between the server and the client treeview reference was fixed.

Wednesday, April 21, 2010

Purple supported in Concept

I've just finished testing the basic functionality for libpurlpe (the IM library behind Pidgin). It now has a wrapper in the standard Concept Application Server distribution. It's a nice library supporting most common IM protocols like AIM, Yahoo, MSN, ICQ, IRC, MySpaceIM and many more. Also, lots of custom plug-ins available on the web, like microblog. It has a really complex interface with almost 0 documentation, but after spending almost 3 days I've managed to write a basic wrapper for it.

So, just include BasicPurpleIO.con in your project, and you can work with something like this:

P=new BasicPurpleIO();
echo P.Protocols;
P.Login("prpl-yahoo", "your_id", "your_password");

the Protocols property will list all the supported properties, anything else is really straightforward. See the Samples/Net directory for an working example (test-IM.con).

On Debian, there is a catch. You must run it with a LD_PRELOAD option (not really sure why, but I've seen the same problem in Python). For example, if your script is called test-IM.con, you should run it:
$ LD_PRELOAD=/usr/lib/ conceptcli test-IM.con

I hope to solve this problem soon (or at least somebody does).

You just have to write a pretty colors user interface, and you'll have your own IM client.

By the way, while writing the wrapper, I've noticed some APIs that could be used to write software to identify your invisible buddies on Yahoo. Did you noticed the number of users of scanner websites? Now multiply with 0.1c ... One more reason to learn Concept.

Sunday, April 18, 2010

CAS and GyroGears stress-test

I've tested at cheapest 64-bit, Debian Linux virtual server with 256 MB of memory (1.5c/hour) with the new Concept Application Server running a real-world medium CRM application generated by GyroGears used by telephony-services reseller, application developed by a friend (a non-programmer). I've managed to squeeze about 75 connection with the server still standing up. I wanted to go for 100, but I had no memory on my desktop to open client connections to the server and I was to lazy to go for the laptop. I believe that it could support 100 simultaneous connections. Keep in mind that the test was made on a 64-bit server with minimum amount of RAM. Using a 64-bit system will cause a significant increase in memory usage (about 20%). I'm sure that on a 32-bit server, 100 CRM instances will easily be supported.
In conclusion, I could say that concept:// application have now no significant disadvantages to http://. Peak memory usage was the last major one, but now it's a clear advantage. Peak-memory-usage for server-side processing is incredibly low due its shared-memory pool.

Tuesday, April 13, 2010

Keep playing

I'm switching my posts to English. I've debugged a lot, especially the compiler and parse. Some crashes related to unclosed arrays expressions, eg: [1,2; (missing ']') that in some particular cases caused crashes in the parser were fixed. In GyroGears I've added two new features:
  • multi-select when searching that will allow to select multiple items when advanced searching
  • read-only fields - fields that cannot be edited by the user
I'm often asked why I do Concept Application Server and GyroGears for free, and I'm not sure I have an answer for that. Apparently is a non-purpose action... but not for me. Is fun, and I'm playing !
I was just thinking the other day about what "being a man" is supposed to be. Is maybe a standard imposed by women in order to gain something in return ? Maybe the "being a boy" is incompatible with the woman's essence.
Playing, seen as activities with no monetary value:
  • whistling just for fun
  • climbing a mountain or even a hill just for the view
  • coding software just for fun
  • walking, running just for the fun of it
  • singing with no audience
  • playing hide and seek with your cat
  • being happy when you're broke
  • playing with toy-boats in the bathtub
  • dreaming
Manhood as defined by average woman:
  • being a provider
  • worrying
  • stop dreaming, stop playing
So, let's play!
Today I'm getting older - I'm 33 (3 x 3 x 3 = 27 not yet 33 !) years now, and I continue playing.

Friday, April 9, 2010

Reducerea finala - 40% + cele anterioare = ~60%

... am reusit sa reduc cu inca 40% consumul de memorie, in total in ultimele zece zile reducand cu 60% ... eu personal sunt impresionat, dar asta e doar pentru ca sunt prea plin de mine. Am mutat vectorii de relocare (numiti in termeni populari "niste chestii") in zona de memorie partajata obtinand o economie serioasa, suprinzatoare si pentru mine de altfel. Fata de acum un an, memoria folosita de CAS a scazut cu 90%... nici macar un octet nu mai ramane nefolosit. O alta varianta de a reduce, ar fi un procesor care sa stie sa lucreze pe 24 de biti, pentru ca de multe ori, 16 biti e prea putin iar 32 prea mult.

Oricum, sa-ti arat modelul shared - e colorat.

Toata zona de "code" ramane incarca o singura data indiferent de numarul de utilizatori, consumul de memorie fiind redus asa cu peste 67%.

Cateva aplicatii si consumul lor actual:
  • Concept IDE - 7.8 MB ram/user pe server
  • GyroGears - 7.5 MB ram/user pe server
  • Concept WKB (web browser-ul) - 2.8 MB ram/user pe server
  • HR Companion 2.4 - 18 MB ram/user pe server (are spre 1 milion de linii de cod)

Monday, April 5, 2010

Redus cu inca 11.5%

Am redus cu inca 11.5% ... nu e chiar "inca 15%" dar e destul de aproape ... Nu stiu de unde mai pot reduce dar probabil ca-mi va veni o idee.

Concept IDE consuma acum 8.6 MB ram/user pe server ... Concept ruleaza ! (varianta romaneasca la "Concept rules !")

Thursday, April 1, 2010

Cu 11.3% mai multi useri

Am redus consumul de memorie cu inca 11.3% ... asta inseamna ca pe resursele hardware pe care puteam tine 100 de useri, ducem acum 111. O reducere de memorie de inca 15% m-ar multumi pentru moment, dar nu am nici cea mai mica idee de unde.

Ca sa-ti faci o idee, Concept IDE consuma acum pe server (fara proiect deschis) 9.5 MB RAM.

Am testat foarte mult cu Memory Validator - o unealta excelenta - din toate uneltele de memory analysis pe care le-am testat, acceasta mi s-a parut cea mai utila. Probleme mari nu au fost gasite (eu fiind mandru de asta).

Am filtrat si warning-urile (fiind excesiv de multe). Acum, pe o aplicatie de test pe care se generau aproximativ 5800 de warning-uri, se genereaza acum 235 relevante. Iti dai seama ca la 5800 nu le-ar fi luat nimeni in serios ...

Pe GyroGears - multe lucruri noi si mult debugging - au fost corectate niste bug-uri legate de butonul ce apare pe formurile child pentru referire la parinti (daca se apasa pe acel buton, din copil, se mergea pe parinte si se faceau operatiuni de add/modify pe relatii se ajungea la invalidarea tranzactiei).

S-au adaugat membri "read-only". Acum orice membru poate fi definit ca read-only, indiferent de tipul lor.

Am inceput lucrul la noul site (sper sa si reusesc sa-l si termin).

Sunday, February 7, 2010


Cautam prin sertare astazi si am dat de cablul improvizat ce-l foloseam cu Data (primul meu computer) ... un HC91. Intr-o pauza de testare, ma tot gandesc la un Dizzy... cred ca primul calculator e poate ca primul sarut, nu-l uiti ... cred ca pot spune ca as lucra cu drag pe HC, daca nu ar exista o lume ce se invarte din ce in ce mai repede, ce nu mi-ar cere din ce in ce mai mult. Daca ai avut placerea de a cunoste procesoarele Zilog, nu crezi ca au poate un fel de romantism ... ce te atrage ... te fac sa crezi ca orice este posibil. Ma tot gandeam la reclama cu "Hi, I'm a Mac, and I'm a PC" ... as adauga si "I am a Zilog". Daca Mac e un OM cool, PC un alt OM ce stie sa faca de toate dar nu are stil, hc-ul ar putea fi ... un calculator sau poate Dizzy.

Cu riscul de a parea ca batranii ce zic ca era mai bine pe vremea lui ... imi amintesc ca pe HC credeam ca orice este posibil. Nu aveam casetofon la el ... am luat casetofonul maica-mii si am legat la un jack acea mufa cu 5 pini a hc-ului ... apoi am legat si microfonul ca sa pot si salva. De ziua mea, prin clasa a 6-a cred, am primit un floppy double-density (de 720k) ... ce nu se potrivea ... m-am chinuit 2-3 luni pana am reusit sa-l leg la interfata lui, iar asta ma ajuta sa visez, sa cred ca poate face orice. Si totusi, continui sa cred asta Era revista Tehnium, o cumpara tatal unui prieten foarte bun, in care gaseam listing-uri de programe, pe care le copiam ca prostu', doar pentru rezultat. Si era mereu acel RANDOMIZE USR ... spaima mea cand ma uitam pe codul altuia.

PS - Update Concept&GyroGears: pe Gyro merg grupurile (foarte beta, dar merg). Mult debugging, o sa revin cu un update curand.

Tuesday, January 19, 2010

Concept Video Conference

Am adaugat un exemplu nou in distributia de Concept: Concept Video Conference. Este un sistem minimal, demonstrativ pentru chat (text+audio+video). Nu foloseste database, useri etc ... pur si simplu toti ce-l acceseaza vad pe toata lumea si aud pe toata lumea, iar asta folosind doar sistemul de mesagerie interna Concept.
Ca de obicei, totul este cross-platform, aceleasi api-uri indiferent se sistem (prin plug-in-urile OpenCV, portaudio si speex pentru compresie de voce).

Tuesday, January 12, 2010

Șpici ricognișăn

Am adaugat feature-uri noi atat in GyroGears cat si in Concept Client.
Incep cu concept client in care am adaugat Julian, o biblioteca extraordinara pentru speech recognition. Este foarte customizabila (dictionarele se configureaza fonetic, ca urmare poate fi folosita perfect si pentru limba romana). Se comporta absolut identic pe Windows si pe Unices (inclusiv OS X). Am inclus un dictionar de test pentru cateva cuvinte.
Screen-urile sunt de pe OS X si Win32.

Am pronuntat "dial five" corect, si "dia' fie" ... si a recunoscut suprinzator de bine.

Acum, pe Gyro, am incorporat webcam-ul. Astfel, la tipul de date "picture" exista optiunea "Allow webcam capture" ceea ce va lasa userul sa faca o poza cu webcam-ul direct in aplicatia gyro. Rezultatul arata cam asa:

Butonul incercuit e cel de "get from webcam", moment in care ni se deschide:
... aceasta fereastra. Am pozat monitorul .... dupa ce i-am dat ok, a intrat in baza de date, totul fiind generat 100% automat (fara nicio linie de cod).

Sunday, January 10, 2010

OpenCV embedded in Concept Client

Am reusit sa integrez OpenCV in Concept Client, avand acum acces pe aceiasi interfata (cross-platform) la webcam. Odata cu accesul la camera video vine si un set de functii foarte interesante, de genul motion detector sau object detector. Cel din urma este chiar interesant, pentru ca pe baza unor xml-uri de configurare, poate detecta fetele umane, corpuri, etc.. API-urile OpenCV sunt foarte comode, iar eu am incercat sa le simplific si mai mult. Clientul acum este capabil sa inregistreze si video direct de pe webcam sau sa faca streaming.

... totul in realtime !

Wednesday, January 6, 2010

Jucarii noi

Acum, daca tot am implementat tot ce mi-a trecut prin cap, am inceput sa ma joc. Prima problema de care m-am lovit a fost "shaped window" (de fapt, in Concept poate fi shaped-anything). Problema era ca trebuia setat in bitmap in format xpm. Foarte frumos, doar ca pe windows e relativ dificil sa gasesti unelte cu care sa faci xpm-uri. Atunci, am zis asa: setezi un png cu transparenta ca mask. Unde ai bit transparent, nu vei avea "fereastra" iar unde ai orice altceva, vei avea canvas.
Dupa cum se vede, este suficient sa setez o imagine ca mask, pt o fereastra rotunda. Atentie doar la ferestrele "principale" ce au obligatoriu titlebar (cel putin pe Win32). Solutia e sa creati o fereastra "copil" (transistient for). Aici, m-am jucat putin, si am setat o imagine ce era si vizibila, ca mask. O problema a fost suprapunerea imaginii peste fereastra (pentru ca apare o diferenta data de border-ul ferestrei. Ca solutie, am pus un scrollbar in spate, si m-am jucat doar din pozitia pe verticala, asa cum vezi aici:
E un pic de munca de trial and error potrivirea lor, dar merita in final, mai ales ca volumul de munca este simtitor mai mic decat pe orice alt framework.

Tot la capitolul joaca, sunt 2 noi feature-uri: Metoda Screenshot pentru controale si proprietatea DragIcon ce acum accepta orice, nu numai obiecte de tip RImage.

Astfel, pentru un buton, putem spune WriteFile(CApplication::Screenshot(button1), "button1.png") rezultand fisierul button1.png pe SERVER cu "fotografia" controlului, asa cum se vede pe client, cu skin-ul aplicat.

DragIcon-ul poate fi setat chiar cu controlul:

Nu se vede cursorul mouse-ului in shot, dar e suficient sa-ti faci o idee cum am luat butonul de pe fereastra si i-am facut drag in afara ferestrei.

Observatie: Shaped-window nu este functional pe Mac OS X.