Cali alpha release #2

Апрель 1st, 2014

Today I announce that Cali alpha #2 is ready for internal testing.

It took me about year to make basic documentation and internal structure, but it was fun!

So, for those who just joined — CALI is new programming language paradigm,  language and framework.

Main idea is that basic language unit is not function nor class, but it’s some abstract abstraction in abstract knowledge storage.

Doh, it was pretty hard to explain for my alpha-testers, I need to go work on better «getting started».

Anyway, CALI is happening soon, stay tuned!

Skype lagging as hell in Windows 8 — solved

Декабрь 20th, 2013

There are some weird and obscure ways to program things. Such ways can lead to what we have currently in Skype under Windows 8/8.1:

If you have not IE as default browser, your Skype eats up CPU and lags as hell.

And make IE as your default browser is NOT a solution — since we don’t cooperate with bad guys and dirty methods ;)

Actually there is simpler workaround:

Turn off all systray event notices

Turn off «Display avatar in contact list»

That’s it! Maybe you’ll be forced to read all messages and restart Skype before lags stops, but at least you have now way.

Wildfly 8.0.0 from git on FreeBSD

Октябрь 8th, 2013

I’m glad to announce that today Wildfly, formerly known as JBoss AS, building and working under FreeBSD just fine.

Without patches. Clean git download are buildable. Yay!

P.S. port coming soon, stay tuned!

Cali: road to alpha #1

Октябрь 6th, 2013

When you need to invent a new programming language, you need clear and bold answer to simple question: «why».
Why you need new language at all. Why this is somehow new. Why there’s not a single other language which can satisfy you. Why this is not simple «nih».

These questions not just aggressive attacks, they even useful and good ones. If you want to invent new language, then first thing you should do is to find your own answers.

Let’s elaborate a bit about how programs are developed in world.

Currently, there are some SRS in some free-form doc, and according to them software are developed. Except few thoughts in light head of engineer, there are no connection between document and program. Changes made in SRS not magically appearing in program, and vice versa, some added code to program not transferring into requirements in document.

To fill this gap, there appeared several of professions — such as QA officers, testers, tech writers/reviewers etc. But this is not very flexible approach, since it’s still loose connection.

Idea 1: Requirements must be part of project in Cali.

That’s it. Before you have a lot of code, doing something, you need to made a prototype, or SRS, or just place accents and stresses on desired behavior. I’m totally believe that this is part of project, of same degree of needfulness as some source file, or build script. Requirements, definitions, proposals all of them must be defined in clear and strict form. Why strict form? Because they all could be used not only by humans, but rather by programs.

Now time to make one bold move and declare every elements in Cali as Concept. Concept is abstraction form of knowledge, this can be class, object, file, requirement, set of classes, feature, logic or algorithm. Sounds crazy, I know. But I think it’s only way to evolve programming, further and above from current code-monkey culture.

Idea 2: Basic unit of Cali is abstract thing, codename ‘Concept’

What in common do have Concept «Class» and «Logic»? «File» and «provided method»? I think there’s no common base for Concept (even name).

Idea 3: ‘Concept’ have no properties (except unique ID, which is must exist to distinguish one Concept from another)

Read soon — which very basic Concepts will be part of language.

Rrdtool strange rounding produces seesaw graphs

Май 15th, 2013

 

I have need of monitoring some processes — for example, count of requests per minute to external services.

First choice to have monitoring and graphs tool was rrdtool. It pretty simple choice, since there’s not much alternatives around.

So, background: Software X makes requests to somewhere, and increments some local counter. Each minute it tries to dump value to rrdtool.

«Tries» is the keyword, since dump happens not by cron, but in non-priority thread instead.

Rrd db file created with such settings:

rrdtool create -s 60 testing.rrd DS:cnt:GAUGE:60:U:U RRA:AVERAGE:0.5:1:1440 RRA:AVERAGE:0.5:60:720 RRA:AVERAGE:0.5:1440:365

This all came from internet/mans/tutorials. Basically, I’m interested in each minute’s value of requests (so, I chosed GAUGE as advices rrdtool homepage).

Second part — data dump, it happens not quite each minute exactly, but instead around each 60000 msecs, maybe plus some time to call «rrdupdate». So, probably this happens each 60500-61000 millisecs.

Seems reasonable, isn’t it? For hour I’ll get maybe 59 data points instead 60.

But instead I got some strange rounded values in rrd database…

To show problem, I created empty file with specified above command, and run for a while such commands in cycle:

rrdtool update testing.rrd N:5

sleep 61

This is quite similar behavior that I have in my software. In each minute I have cnt value = 5. Due to update going not each 60 seconds exactly, I can accept that in base I’ll have some value which close to 5.0 but a bit less than it.

What I got instead you can see in this graph:

rrd_seesawThis is very bad graph for me. I can deal with 59 records with 5.0 and one missing; Or I can live with 60 values with 4.91, But I really need to see trends and dynamics…

Funny thing is, that GAUGE should be used (as recommend site) when you measure some parameter, like temperature, but it failing to deal with unregular updates.

I could use ABSOLUTE, with hacks: I need to multiply value from rrd by 60 when I’m plotting graph. Also, If I’ll change period of updates from 60 secs to some other value, I’ll get garbage set of data, which not represents anything useful.

The question is, are there any way to measure data, with getting close to actual data in rrd, using «N:» update, or this problem should be solved with hacks-bikes in every usage?

Or am I missing something? I’ll appreciate any tips, comments.

 

P.S. I recreated data file with bigger heartbeat = 1800, here’s graph:

testing.rrd-avg-hb1800

P.P.S. Culprit happens to be old forgotten script, which ticked every minute and just placed «0″ to all data files in given directory!