Saturday, June 24, 2006
Files and pictures hosting
There is an interesting startup company Streamload that implements files, pictures and various media hosting in a way that could be potentially correct.
Namely, they allow you to both store files with a simple web-based file manager and selectively open access to these files for the public. The way it is done, essentially two completely different (Web) UIs are implemented; as of today, internal UI isn't bad (though does need a lot of polishing) while external UI is outright terrible.
Their pricing model is based on providing "unlimited" storage while restricting bandwidth which is also a sound business model. Storage space nowadays is so cheap that it practically does not count, while various other services guaranteeing "unlimited access" must compensate for it somehow (one popular "solution" is of course to limit your storage in a hope that it will indirectly limit bandwidth which is outright stupid). As for me personally, everything I might ever want publish online will be accessed very rarely so I am absolutely happy with bandwidth restriction.
That said, number of problems facing this service (and similar) is enormous; the most important question of course being whether it will survive in the more and more competitive marketplace. But, the good ideas outlined above make it worth checking periodically for the progress...
At the end, a few links of interest. I originally came across this site from Slashdot article referencing a PC World review of a few online file storage services. On the Internet, you can also enjoy older (February) review from PCMag, demo.com business overview of the company, both old and new blogs of company programmer(s), and perhaps most invaluably example of a user publishing many pictures and other media with this service.
Finally, one unrelated remark that could be more important than all of of the above: there are unconfirmed, but reliable reports that Google is preparing its own Web hosting platform.
UPD (10-Dec-06). Another interesting attempt at file hosting, www.bluetie.com .
Friday, June 23, 2006
Google Summer of Code 2006
Google Summer of Code is another interesting initiative from Google which I haven't heard about before or at least haven't mentioned it in this blog. Very interesting list of FOSS projects which Google deems important enough for the community and ideas from the authors of each respective project on various ways to improve it.
Thursday, June 22, 2006
printf() and 64-bit integers
In the last post we talked about scanf(), so perhaps it would be proper now to discuss printf().
Some interesting features are there, e.g. you can use <'> format (single quote) to enable locale-specific number output (has no effect in C locale); you can also refer to specific argument by number, specify format width as a separate argument, and so on.
Let's consider one specific task to print some (large) 64-bit value. The basic problem is that you must know (1) what (integer) type to use to represent (at least) 64-bit integers, and (2) what printf() format does this type correspond to, if any.
On UNIX platforms long usually correspond to "machine word" (that is to say, has same size as pointer) so on 64-bit UNIX long is 64-bit and the following code:
printf ( "2^63 = %lu\n", 1L << 63 );
will print 2^63 = 9223372036854775808.
On 32-bit UNIX systems long is 32-bit but long long is 64-bit, and then the following code will work as expected:
printf ( "2^63 = %llu\n", (long long)1 << 63 )
(Gnu gcc understands 1LL, but I am not sure if other compilers do).
On Windows, however (with Microsoft compiler) approach is different and size of basic types does not change with CPU and so long is always 32-bit (same as int). Thus, in older Visual C++ systems you have to write:
printf ( "2^63 = %I64u\n", (__int64)1 << 63 );
... while in Visual .NET the above example with "long long" will work.
Tuesday, June 06, 2006
For the first time since I learned C 18 years ago I noticed that the standard library function scanf (and friends) has been enhanced with many new formats and features.
E.g., the following code
scanf ("%s %[^\n]\n", name, args);
reads a "word" from the input (and assigns it to name) and then reads the rest of the line till end-of-line, irrespective of spaces and other symbols, and assigns it to args.
Very detailed description of scanf formats is available at Solaris 10 Reference Manual Collection pages.