Tuesday, May 22, 2018

How to don't use PL/pgSQL and other fatal errors when PL/pgSQL is used

I wrote article Jak nepoužívat PL/pgSQL (případně PL/SQL) – fatální chyby při vývoji. The article is in Czech language, but google translator can be used.

Thursday, May 17, 2018

dude's test speed

I did one indicative benchmark of popular interpret languages, and I was surprised how modern PHP is fast now. This test is pretty simple and stupid, syntactical, unrealistic, and I know it. It say nothing about speed any interpret in practical usage. But can be interesting to see, how surprisingly some interprets are near to C, and what engines can be used for intensive numeric calculations.
void main()
{
   long int s = 0;
   int i;

   for (i 0; i < 10000000; i++)
     s := i;

   printf("%ld\n", s);
}
optimized C3ms
LuaJIT20ms
unoptimized C30ms
Lua100ms
PHP200ms
JavaScript V8 engine500ms
Perl600ms
JavaScrip Mozilla900ms
Python21200ms
Python31700ms
PostgreSQL SQL1700ms
PLpgSQL2200ms

I repeat, this test has very small value for life - Only C language from this list is designed for heavy numeric operations. All other languages has designed for different purposes and in their typical domain the typical bottleneck will be elsewhere than in simple numeric calculation. But can be interesting, how modern computers are fast - for example PLpgSQL is designed as SQL glue (I know, so it is absolutely without any optimization, and expr evaluation is really expensive there (due repeated security, database checks) - I hope so nobody use PLpgSQL for heavy numeric calculations, and still), and it is able do 10M operations in 2 sec.

Thursday, May 10, 2018

ncurses-st-menu library is available

I finished all work on CUA menu (menubar and pulldown menu) ncurses library. This library allows skins, shadows, supports accelerators, mouse. Look to demo.c for info about usage. Download from Github.

Thursday, May 3, 2018

ncurses CUA menu demo

I finished technology demo of ncurses based implementation of CUA menu - menubar and pull down menu. Please, check my github project https://github.com/okbob/ncurses-st-menu. I like when interface looking well - so I implemented few styles (owns styles are possible). You can see screenshots:

Tuesday, May 1, 2018

new presentation - plpgsql often issues

My presentation from last PostgreSQL meetup - https://postgres.cz/files/plpgsql_issues.pdf