2006-11-09

Links: Numerical Computation Guide

An interesting book - Numerical Computation Guide, especially the appendix What Every Computer Scientist Should Know About Floating-Point Arithmetic

For the first time I've met a description of the support of IEEE standards for the calculations with mantissa in C language.

P.S. But why this is not told in universities in study courses dedicated to the programming in C language and the computational modeling?

2006-11-06

Ubuntu update again... boring

I've updated my all three Ubuntus — at home on the laptop, at work under coLinux and on a usual computer of my little sister. Everything took place almost without adventures.

It's good that it is almost impossible to drive Linux to the completely idle state. Without looking into what is what I tried to cross upstart and the old 2.6.11 coLinux kernel. Naturally, nothing has worked. Not a problem, I booted with init=/bin/bash parameter ant apt-geted sysvinit back.

Linuxant still has not shared builds of modem drivers for the new Ubuntu. I've downloaded a package with srcs. Something there is incompatible with the new kernel. hcfpciconfig --rcstart initializes nothing. I had to do everything at full scale of hcfpciconfig.

2006-11-01

What is taught in schools...

Who said that Pascal is suitable language for the programming studying?

Well, about stack, heap, the difference between on-line storage, hard disk and above all why this separation is necessary I explained to my sister without a flub.

Took a time-out... I'm fussing about the syntax.

Such a doltish samples are given in books:
Type
vector = array[1..1000] of real;
p_vector = ^vector;

Var
a p_vector;

getmem(a,sizeof(vector));


Just an amazing possibility of declaring in the heap an array of fixed size.
Common sense waved me goodbye.

I had to dig in my old university programs.

Aha! To have a possibility of creation arrays of really beforehand unknown size a little trick is required:

row =  array[1..1] of real;


Little sister, have not you understood yet?

Look further:
Type
row = array[1..1] of real;
p_row = ^row;
Var
a p_row;
i integer;
Begin
getmem(a,10*sizeof(real));
for i := 1 to 10 do
a^[i] := i;
for i := 1 to 10 do
writeln(a^[i]);
End.


By declaring array of one element we deceive the compiler and later it allows us to refer to the array element by dereferencing the pointer.

Before this moment the inner organization of arrays was not very important for us but now the agreement that array elements are located close to each other has become critical.
Using it, we allocate memory for array with getmem function and calculate the size of the required piece just by multiplying the size of one element to their number. And we sure that the reference to an element number i is done by a^[i] expression.

Aha, and how many pupils spoiled by Pascal will guess how to create 2-D array, after all mentioned above?
Taking into account that the answer
row = array[1..1,1..1] of real;
is wrong?

I'm going to check my sister shrewdness.

2006-10-31

Happy Halloween

Ha-ha-ha, usually it is green...

2006-10-23

Links: Pythagorean Triple

Have you known that a right-angled rectangle with integer-valued sides always has an even perimeter? And that the multiplication of all sides is always multiply of 60?

A remarkable article Pythagorean Triple

2006-10-11

Asta la Vista, baby

We visited Microsoft event «Developer days 06» organized in Novosibirsk. The registration, six presentations, two coffee breaks, one dinner. In short, had a good time.

In the beginning I swore and wanted to describe in details all bugs of Vista and the new framework but all my records a lost because of an error occurred in Windows Mobile 2003.
Therefore short and calm.

The 1st presentation — Asta la Vista, baby
Microsoft Windows Vista и Microsoft Office 2007

For no purpose they presented Vista on week laptop (1 Gb RAM, embedded video intell). Constantly winked cursor spoiled the impression. Presentation of automatic killing a program using too much system resources failed, system rebooted.

The support of file versioning is embedded. There is still no answer for the following question. A file of version 1 was changed and saved, got the version 2, then rolled back. How to get back to the version 2?

Will I whether bind it on Linux? Trace by gamin changes in Document folder and automatically call svn commit. Plus bookmark module to Nautilus — to show versions and roll back.

In spite of extended possibilities of documents searching speakers did not use it, preferring searching in folders in the old ways.

IMHO Explorer has become overdriven with features, they managed to demonstrate the magic possibility of documents preview only after a little hitch and searching in menus. But these all are little fault findings.

Standard games are roolez. Very beautiful.

There is an embedded possibility of limitation of computer using for concrete user. One can switch on spying on visited sites and messager logs. Everything is for parents to control their child activities. Asta la vista, baby.

There was no time for the new Office demonstration, they casually mentioned that now Office supports formulas in TeX format, but it was not lead to a response from the audience. Those who knows TeX raised hands, it was 3 or 4 persons.

The 2nd presentation - continuous integration
Microsoft Visual Studio Team System for Database Professionals

Microsoft has discovered America one more time. There is a chance that now a lot of developers will join to the rational style of databases development, continuous integration, version control, automate testing. So far a tool there is for MSSQL only and has bugs as it is properly for beta, but I think that somebody will soon take advantage of the opportunity for Oracle. That's another story that the approach is quite famous and IMHO it needs a special tool only for decreasing enter threshold.

The 3-d presentation — integrators, do not sleep!
Windows Communication Foundation

I've always been interested why the functionality embedded to BPEL is not implemented as a library. Well, Microsoft just did it, very elegant from the first look — xml + attributes. As opposed to BPEL there is a possibility not to tie to web services and to chose an interaction protocol and even partially manage pieces of message header/body. I see so that one can use sessions support implemented in the protocol itself that's again very pleasant in opposed to BPEL.

In case of .Net<->.Net interaction it makes sense to choose one from binary protocols from the default set. For example, for a local interaction take named pipes and easy implement analogue of GStreamer.

Let me guess, just now somebody is implementing connectors to these new 4th protocols for Java.


The 4th presentation — creating monsters
Windows Presentation Foundation

Yes, XAML can totally change an application appearance simple tag turns into amusing puzzle, if to use image of rotated cube instead of the usual picture. Monsters scaring users by their look and behavior now can be implemented even more faster. Though in web peoples have got accustomed to it and very notable solutions are met. It is good that layouts by hook or by cook have appeared in .NET.

The 5th presentation - drm?
Windows CardSpace

A new unified standard of shared authentification and authorization. The speaker read me to sleep. To whom in first place is profitable this unification? To DRM? Safety of online payments will increase? Hm... There is still no answer how and where in the system is storying all information about user and how difficult to stole it.


The 6th presentation — own workflow again.
Windows Workflow Foundation

I wonder that did not sound buzzwords bpel, bpmn, bpm. Paint yet another xml format, compile and host. There is still no answer how to change workflow dynamically. What will happen with the current state of business processes? Is it possible to organize work of several versions of one workflow simultaneously? For example, to let old processes to finish in the old way.

The demonstration of dynamic garbage collector paradigm from Microsoft as an example of coffee break and waiters.
garbage collector

2006-10-05

Scheme: call-with-current-continuation

I've came across an interesting article Call with Current Continuation Patterns.

A lot of good examples, putting together.

Multi-threading, tail recursion optimization, exit and return to recursion. Great!

P. S. What's a pity that Russian-language literature on continuations is almost absent... I wish if it would be at least one article.