Laser Blog

Articles tagged "open source"

23 command-line calculations using bc

Sunday 26th November, 2006

If like me, you do most of your work from the command-line, using vim to edit files, mutt for e-mails, cd/ls/mv/find/etc instead of a file manager, then you may get annoyed by having to fire up a GUI calculator to make (what may sometimes be) a single calculation.

One useful feature of calculating on the command-line is that you can see what you've typed. For instance, sometimes when I'm entering a long, complex calculation on a calculator (either the GUI or the solid, hold-in-your-hand type), I sometimes forget if I've actually typed in all those numbers or made the calculations in the right order. Maybe it's just me ... :)

This article shows how to quickly perform standard calculations on the command line including addition, subtraction, multiplication, division, square root, powers, conversion from decimal to hex, decimal to binary, hex to decimal, and binary to decimal. It also briefly introduces using bc in interactive mode and how to write files for use with bc for frequently repeated operations. There is a mention of using Google for performing calulations. It finishes with a little challenge to test the power of your CPU.

Other advantages of using bc include:

  • bc is included with (almost?) all Linux distros as standard, as well as (again, almost?) all Unices.
  • Results from calculations in some proprietary flavours of bc have up to 99 decimal digits before and after the decimal point. This limit has been greatly surpassed in GNU bc. I don't know what that limit is, but it's at least many, many tens of thousands. Certainly it's more than any GUI-based calculators (I've used) could accomodate.
  • You may also find yourself working in an environment where you simply don't have access to a GUI.
  • The syntax for basic sums is almost identical to Google's calculator function, so you can learn how to use two utilities in one go!

21 Microsoft claims Linux has stolen it's "intellectual property"

Sunday 19th November, 2006

Just a few of the more interesting links related to these sordid claims. It's something that Ballmer has claimed before, but that was back in the heyday of the SCO debacle which is now nearly over. It's typical FUD, possibly the actions of a desperate man? Who knows how these people think, except others like them.

~

20 Samba Team Asks Novell to Reconsider

Monday 13th November, 2006

The Samba team has issued a statement asking Novell to reconsider its recent deal with Microsoft.

If historical precedence is anything to go by, Microsoft tends to strike deals which either buys them some time to regroup, or hinder their "partners". Novell has been here before. They should know better.

~

19 The war is over and Linux won?

Friday 10th November, 2006

According to this ZDNet Blog entry, an IBM-sponsored study claims that 83% of companies expect to support new workloads on Linux next year, against 23% for Windows.

It cites the recent moves by Oracle and Microsoft with regard to Linux as evidence of this trend.

I would never rule Microsoft out any race it wishes to take part in, until the race is truly over. One particular comment to this blog entry raises the interesting assertion:

Microsoft has obtained the expertise and assistance of SuSE in creating the migration tools that will ease the Linux to Windows transition. The path was already marked out.

Linux to Windows will soon be far easier than Unix to Windows has ever been. And companies can't wait for their chance to leap into the future.

I must admit, I find it hard to trust Novell's recent actions. I'm not the only one.

~

16 Slash'EM on Linux: configure, install, setup and play

Tuesday 7th November, 2006

When I tell my World of Warcraft/EverQuest-playing friends that I play Slash'EM, they usually raise their eyebrows and give me a slightly condescending smile before going on to explain how they prefer 3D graphics, interaction, etc. The fact is that comparing WoW/EQ to Slash'EM is like comparing movies to books. Did you read the Harry Potter books? Did you then go and see the movies? Slightly disappointed? Not quite what you expected? Then you'll have an inkling of what I'm on about.

As with reading, some imagination is required. Compared to it's more modern peers, Slash'EM and its relatives are extremely challenging. If you get it wrong, your character dies. Sometimes your character will die in seemingly grossly unfair circumstances. And it's permanent, unlike in certain other games. C'est la vie. This game hasn't been designed to pander to the requirements of the "I want it all and I want it now" crew.

It's a bit sad that such a fine open source game is easier to install on Windows than it is to install onto many Linux systems. So, hopefully this article will address that issue.