500th

April 27, 2011 · Posted in Blog · Comment 

I am just posting the fact that I am now officially in the top 500 of WhatPulse users!

On to first place, then! (A)

Earth Hour

March 27, 2011 · Posted in Blog · Comment 

This is just fucking hilarious. Earth Hour. Come on, what the hell?

Here we are, on the planet Earth. A rare and precious jewel in the infinite void of the Universe. The only place we know of capable of sustaining human life, and the only place we know for certain to have life in any capacity in the first place. If Earth wasn’t here, or it was just a little bit warmer or colder or the whole balance of it was just off a little bit, we would never have evolved the way we are now.

And in return, we turn off a few lights for an hour.

It is so absurd and ridiculous that it’s just really funny.

Not to mention this quote from YouTube: “Earth Hour – One person has the power to make change.”

Havn’t had a laugh that good in some time.

Houdini

March 4, 2011 · Posted in Blog · Comment 

Well, okay, maybe not Houdini. But I did perform the Great Swapping Trick(tm) today.

Here’s the deal. My parents have a laptop (which is mainly used by my father) and a desktop PC (which is mainly used by my mother). The latter one suffered from a failing hard drive. Not entirely broken yet, but performance declined rapidly and bad sectors were popping up. Those are no good signs, and I’ve seen failing hard drives more than enough times to recognize the symptoms.

The old drive was a 80 GB. Not too big, sure, but since usage of the system is mostly limited to on-line Flash games and e-mail, it’s no big deal. Only a few gigabytes were actually in use, and most of that for the operating system.

So, I ordered a new drive and picked it up yesterday. A nice new 500 GB drive (can’t seem to get ‘em much smaller anymore – they had smaller drives, but those were more expensive, so screw you, small harddrives) arrived here in it’s shiny anti-static packaging.

It also happens that my main PC is suffering from a serious lack of hard-drive space. There is about 100 GB free on one of the storage drives (and filling up rapidly) and the rest of the free space is a bit of headroom on the operating system drive (which I’d like to keep that way). Since the OS drive is 160 GB (and by far the smallest drive in the system), and 500 GB is obviously more than that, I figured, why not do the Great Swapping Trick(tm)?

I plugged the new 500 GB disk into the system (borrowing the optical drive’s SATA cable, for lack of free ports on the motherboard), found a utility that copies hard-drives sector-by-sector, and let that run. Next up was shutting down, phyiscally replacing the 160 GB OS drive with the new 500 GB drive (which contains exactly the same data as the ‘old’ OS drive), and booting up again.

And voĆ­la, 316 GB of additional storage space, and it didn’t cost me anything except for 10 minutes of work and watching two episodes of The Office to fill the time it took to clone the drive.

My mother’s PC will get what used to be my OS drive. It’s smaller than the drive she thinks she’s getting, but still twice as big as the one she had (and she hardly used that one), so no one will ever know.

And as an added bonus, I got to see Windows come up with a ‘Found new hardware’ message about the hard drive that it was installed on, which was interesting too.

Freeware

February 13, 2011 · Posted in Blog · Comment 

There is a program, called Eagle, that I frequently use. It comes in a commercial, paid version, as well as a freeware version.

The freeware version is more limited, and you may only use it for non-profit applications.

The website says:

If you earn (or save) money by using the Freeware version of EAGLE Light, you have to register it.

That sounds reasonable. Except for one problem…

Because you’re taking the freeware version instead of the commercial one, you’re saving money, and therefore, you cannot use the free version.

Nice, huh?

Screw You

January 21, 2011 · Posted in Blog · Comment 

Screw you, Microsoft. Screw you. Really. Screw you.

I am NOT going to submit to your devilish tyranny called Windows Live Messenger 2011.

The version I was using refused to sign on earlier today because it was ‘required’ to update to the newest version. Well, screw you. I’m not installing it and I never will.

You can think you can flood us with crappier and crappier products which don’t add anything new except for ugly emoticons and even more annoying advertisements, but I’m not buying it. I’m exploring alternative clients and am currently using Trillian. It’s a bit of work to set it up to my liking but I’d rather get used to a completely different program than go with the fiendish beast from hell that Microsoft has unleashed.

Screw you, Microsoft. Really.

Screw you.

About

November 14, 2010 · Posted in Blog · Comment 

Despite the fact that this blog has been in existence for quite a while now, I never bothered to actually write something about the guy who writes it. Today I finally added an About Me page. If you know me there’s probably not a whole lot of information there that you didn’t already know but /meh.

Also, the MSP430 LaunchPad that I’ve mentioned a few posts back has been tagged ‘unobtanium’ on TI’s website. I like it. :)

Toothpicks

September 25, 2010 · Posted in Blog · 1 Comment 

1. Moisten thoroughly in mouth.
2. Insert pointed end between teeth with flat side next to gums as shown.
3. Use gentle in-and-out motion to clean between teeth. Do not force into tight spaces between teeth.

It is official. The world has gone insane.

Lua

September 13, 2010 · Posted in Blog, Programming · Comment 

So, I went ahead and tried out working with Lua. For those of you unfamiliar with it, Lua is a lightweight scripting language which is usually embedded in other applications – for instance, a whole lot of games use Lua for various purposes (configuration scripts, AI, and so on). The whole package is pretty small (the static library is actually less than 200 kilobytes, and that includes the standard libraries!) and it performs extremely well.

A couple of years ago I used Lua quite a bit (only writing Lua scripts, not applications that employ Lua). Back then I used to know it pretty well, but that was years ago. Not using the knowledge for so long combined with updates to the language make it necessary to re-learn a lot of things. But fortunately, Lua is actually a very simple language, it doesn’t come with tons of things we don’t need, the syntax is easy, and it has a couple of nice features.

One thing I love about Lua is the ability for functions to return more than 1 value. In pretty much any other language, a function can only ever return a single value, but often we want to return more data than that. In C/C++ the “obvious” workaround is to use additional function arguments, which will be pointers to the location where the result data is written to. Lua, on the other hand, does allow functions to return more than one value.

So instead of a complex function call with lots of arguments where you’re not really sure if they actually affect the behaviour of the function or if they are used to pass a result back, we can do this in Lua:

result1, result2, result3 = somefunction( argument1, argument2, argument3 )

Getting the basics of Lua working on your system isn’t that hard. It is downloaded in source form from the website, and needs to be built into a library (which you’ll also use if you write any applications that use Lua), the Lua interpreter (lua.exe), and the Lua compiler (luac.exe), which pre-compiles Lua scripts into bytecode (optional but does increase performance a bit). On Linux this is of course an extremely trivial task (tar xzvf lua-5.1.4.tar.gz, cd lua-5.1.4, make, make install), on Windows it’s a bit more work but still easy enough.

Then comes writing a little test application that calls an external Lua script, followed by making said test application a bit more complicated (by setting variables, adding functions, calling functions inside the Lua script, and things like that). To the untrained eye a C/C++ program that embeds Lua may seem complicated, but it’s really not that bad: Lua uses a stack for most of its work, and once you see how it works, it’s actually quite easy to work with. A lot of the work you do is just pushing or popping values to/from the stack.

I wonder how easy (or difficult) it will be to make Lua run from an embedded CPU.

Wiki

September 11, 2010 · Posted in Blog · Comment 

I set up a private wiki for myself last night :)

The thing is, I tend to gather a lot of random notes and things in text files. Also, I have an astonishing and ever-growing amount of bookmarks, which I usually have either on my PC but not on my laptop, or the other way around (and of course, I always need them while I’m using the computer that doesn’t have them).

Because that is rather inconvenient, and because I generally hate having lots of random text files and garbage around on my desktop, I decided to set up a wiki for myself, where I can dump all those random notes and little things. Any important bookmarks also get copied to the wiki. This way I can access them wherever I am, and keep my PC clean at the same time. Yay!

I can probably set up a little script to import bookmarks from the wiki into Firefox and run that on both my PC and laptop, that would be the ultimate awesome :)

Thunderfail

August 11, 2010 · Posted in Blog, Random Things · Comment 

It seems that updating my copy of Mozilla Thunderbird on my laptop involved deleting the main program executable, because that is what the updater did.

Sure, it’s guaranteed bug-free now, but the number of new features is pretty disappointing.

« Previous PageNext Page »