Saturday, December 15, 2007

Pattern matching

This week I used for my first time (at least seriously) the pattern matching functions of Lua. I am amazed of how powerful they are! I made two programs using them.
  1. A program that parses the stdout of the finger command (which is issued for the name of all subdirectories of /home/ ) and then issues an id command for each user on the server of my university. This way I made a 250KB textfile containing usernames, realnames, registration numbers, emails and years of registration; just by organizing information that is normally available by using these two commands. Of course this program in it's present form works correctly only for my university...
  2. A simple crawler. After making the main crawler part I tried to find something more useful to collect than emails but I came up with nothing so I made it seek email addresses. (but I hate spam :-P )
Here is an example:
for u,n in string.gmatch(data,"Login: (%a+)%s+Name: (%a+ *%a*)\n") do This is how you start a for loop that will iterate for each username and realname pair that the output of the finger command contains. I uploaded both files (along with Lua interpreters for Linux and Windows and the Luasocket which is needed by the crawler) and you can get them by clicking here. In case you want to run the first program you should upload steal.lua and lua5.1 to a Unix system and then run something like this: ./lua5.1 steal.lua To run the crawler simply drag crawler on the appropriate Lua interpreter.

Saturday, November 17, 2007

Easy Keyboard Layout

The QWERTY keyboard layout (the one that you probably use every day) was made mainly to avoid stuck pairs of typebars in typewriters. Of course this is not a problem with modern keyboards and that makes the QWERTY layout a bit inefficient (at least for the right handed people). For example many words can be typed by using only the left hand while there are fewer that can be typed with the right hand only. The best case would be to have both hands type alternating keystrokes so that you can move one hand in place while you are striking a key with the other.

There are other keyboard layouts too which try to address some of these problems. One the most famous is the Dvorak keyboard which is probably better than QWERTY.

Anyway, to cut a long story sort, I wrote, before one or two days, a program in Lua that would try to make an optimized layout based on three criteria:
  1. Letters that appear next to each other often in English text should be far from each other on the keyboard so that the two hands can press them alternatively.
  2. Characters that appear often with a distance of two characters (like T and E in the word "the") should be close to each other so that that each hand moves as less as it is possible during the alternations.
  3. The most used character should be close to either the third or the seventh key of the second row (where the D and the J lie on QWERTY keyboards) because that's where I put my middle fingers. :-P
I run this program with LuaJIT (because I really needed more speed) and it came up with this layout:


Today I bought a keyboard (the cheapest I could find) and started switching the positions of the keys to turn it into this:
(the photo is outdated. The P and B should be switched)
I still haven't tested it because I bought a PS/2 keyboard while my laptop hasn't got a PS/2 port. So I am waiting to test it to a friend's PC tomorrow.

Of course to use this keyboard you will need to notify the system of the different letter positions. I made a file that can be loaded with xmodmap in Linux to use this keyboard. I will also do the same with Microsoft Keyboard Layout Creator so that Windows will be able to recognize my layout.

I won't upload the program's code yet because I am constantly changing it. If you really want it then just leave a comment asking for it and I will upload it. You might also want to try Kiwi: a program written in C that will create custom keyboard layouts. It looks like a great program but I haven't actually tested it yet.

Amazing fact: Just by changing the position of the letters on a keyboard you can create more than 403,291,461,126,605,635,584,000,000 different layouts.

Friday, November 16, 2007


Surely you've heard of terms like freeware and shareware but perhaps you do do not know what abandonware is. Adandoneware is a term, without any particular legal meaning, that is used to describe software that has either been placed on the public domain by the copyright holders (usually the company that produced it) or that no one is willing anymore to enforce it's copyright. For example some really old games are not sold anymore and the company normally doesn't care if you start making illegal copies since it won't loose any money at all.

There are many sites with huge collections of abandonware. Most of them host old games for DOS or Win9x but you might also find some programs too. My favourite site for abandonware is Abandonia but you can find others by Googling abandonware. I also found this interesting torrent on The Pirate Bay which supposedly contains around 3000 old games but I haven't downloaded it yet...

Before downloading any abandonware make sure that you have installed DosBox (it's the best DOS emulator out there and you will need it to play those old games) and also do not forget to check for alternative versions of the same game that run on modern systems. For example Heretic is a great game but why would you play it on DosBox while you can use ZDoom to run it with higher resolutions etc?

While witting this post I also came across a site that offers $200 to anyone that finds the English version of an old and extremely rare (based on the very few results that Google returns if you search for it) game called Fatal Encounter.

For more info on abandonware you should also read this article from Wikipedia

Monday, November 12, 2007

DizzyDiff v1.4.0

Normally I should be posting something about Abandonware right now but I am a bit bored to continue writing that post and I felt more like releasing this version. I mainly added lots of command line options so that you can customize the program by editing the batch script (for Windows users) or the shell script (for Linux users). For more information you should read the READ_ME.txt that is included in the archive. I also added DizzyDiff in Softpedia so you may rate it there. To download DizzyDiff click here.

Friday, November 2, 2007

DizzyDiff v1.3.0

One more version for DizzyDiff. It will now ask you what kind of search you want it to perform: Filenames only, filenames and ID3 tags, filenames and inside textfiles or everything. I also fixed some bugs. Click here to download the latest version.

Tuesday, October 30, 2007

DizzyDiff v1.2.0

I know I am posting quite often about DizzyDiff but I added ID3v1 support to this version so I think that it should be published. DizzyDiff will now by default search inside the ID3 tags (only version 1 is supported currently) of MP3 files as well. There are also some other minor changes. I tried to include the LuaJIT with this version but I cannot find the Windows binaries. The next version will hopefully include them along with support for ID3 tags version 2. If you happen to have the Windows binaries for LuaJIT then please email them to me. You can download DizzyDiff by clicking here.

Thursday, October 25, 2007

DizzyDiff v1.1.0

I improved DizzyDiff by adding two more features:
  1. It is now possible to search inside text files and not just in filenames.
  2. DizzyDiff will show you 5 results per screen but it will internally hold the top 100 result. By typing m and pressing enter you will be able to see more results.
To download the latest version (for Linux and Windows) click here.

Wednesday, October 24, 2007

DizzyDiff Search Tool

I hope you liked Where because DizzyDiff is a much more powerful search tool. It searches your disks for files either with the filename you specify or with filenames similar to it! It's ideal for searching for songs that you don't remember the exact spelling of their name.

For example you may search for "Tear of de bark" and DizzyDiff will find "Fear of the Dark" as a 82.5% match. You may search for "your my tempation" but it will find "you're my temptation" as a 89.9% match as well.

This is the first version of the program but it works quite well for me. What I haven't tested is Unicode support. I've only tried searching for filenames in english.

To download DizzyDiff (for Windows and Linux) click here. Then unzip everything in a folder and run DizzyDiffWindows.bat or The Linux version uses the Nautilus file manager to open the directories that contain the files. Of course you can change that in the source code. You may also ask me to do it for you.

DizzyDiff is open source and it's written in Lua.

Here is sample session:
DizzyDiff Search Tool version 1.0.0 by Tritonio
Use this program at your own risk. You may also share it,
with or without modifications, as long as you include this copyright
notice on all copies or portions of the program that you share.

Type the name (it hasn't to be the exact name) of the file you are looking for: in sane
From where should I start searching for it? (eg: /media/STORAGE/) Type the path: /media/TRITONIO/
Type the number of results that you want, or leave empty to show 5 results:

Please wait... /
Finished searching in 7466 files. I will show you the top 5 results:

1. 73.8% match with: is none

2. 68.6% match with: INSHAME

3. 64.7% match with: is banned

4. 58.3% match with: is release

5. 57.8% match with: 2 Name

Press enter to exit or type a number and press enter to open a window with the specified result selected...

Monday, October 22, 2007

Ubuntu Gutsy Gibbon

The last two days I've been fine tuning Gutsy Gibbon: the latest Ubuntu Linux release.

I had some problems upgrading to them because for some stupid reason I only made a 5GB partition for the root (/) of my filesystem so there was not enough free space for the upgrade. I tried to resize the root partition with the Live CD of Feisty Fawn but there was absolutely no way of doing this without having to delete three more partitions. Finally, I did the upgrade by downloading the alternative installation CD and doing the upgrade with it's help (read at the bottom of this page for more information on how to do this).

Gutsy have a very nice feel especially if you enable the Desktop effects. They are simply delicious... Just make sure you install Compiz Manager to configure the effects. You can install it through Synaptic Package Manager or by typing:
sudo apt-get install compizconfig-settings-manager
in a console.

If you are not using Linux then you should really consider doing so... And Ubuntu is a good start because of their simplicity. You can also try them without installing them by booting from their Live CD (that's the same CD that you will use to install them afterwards).

If you have any problems with Ubuntu then you can get free support from forums, chatrooms, etc. Visit this page for more information.

Congratulations to everybody who worked on this release!

Sunday, October 14, 2007

FuckBrainFuck v1.7.1

Today, while improving AskWise I had to look at a part of the source code of FBF and, luckily, I found a terrible mistake in it. The SET command was supposed to set a cell in the Brainfuck array to a specific value. But in addition to this, because of the bug, it zeroed the very next cell. I do not know how that stupid bug occurred! I wonder how did the compiled FBF programs work... :-( Click here to download the new version.

Tuesday, October 9, 2007

AskWise (Beta)

AskWise is a program that I made before two or three years that makes statistical predictions based on knowledge you give to it. I recently rewrote it in Lua so that it runs on Linux too. It is a console application now (the old one had a GUI) but the algorithm has been improved a bit. You may read the post about the old Ask Wise (the new version doesn't have the two words separated). What I just realized is that I have written AskWise three times from the scratch. The first one was in Plua, then in Visual Basic and finally to Lua. Click here to download the Beta version. Two sample databases are included. One that predicts someone's sex provided the height weight and age and another database with that tries (unsuccessfully in my opinion) to predict the resulting score of a football match based on three ratios given by OPAP in "Pame stoixima".

Tuesday, October 2, 2007

How To Make Portable Applications

Don't read this article. I've written a much better one which you can find here.

The purpose of this (late-night) post is to show the the possibility of creating portable applications and to encourage you into doing so. I can't teach you how to make one exactly because this depends on which application you choose. I will try, though, to write some headlines for you. Note that many applications cannot be turned into portable ones. Also different people understand the meaning of the word portable differently. When I say portable I only mean small in size, without unnecessary files and without the need to be installed. I also avoided using any commercial tools such as Thinstall.
  1. Download and decompress UPX. This is a great open source executable packer. I though I had previeusly written about it but I haven't. UPX (which stands for Universal Packer for eXecutables) is probably one of the best executable packers. It will compress any exe, dll or other executable (even Playstation executables!) If you didn't already know executable packers create compressed applications that can still be run just like the uncompressed ones.

  2. Download the program that you want to make portable. There might be an already portable version but usually it can get even smaller so download it and continue to the next step. If you can only find a version with an installer then download it, install it and continue to the next step.

  3. You may follow either one of this steps. The first one describes how to do the compression manually. The second one makes use of a small Lua script I made that automates the whole process.

    1. (Manual compression) The author of the program might have already compressed his executables so you'll need to decompress them (and hope he/she did compress them with UPX).

      • Open a DOS prompt (Start Menu->Run->"cmd.exe"->Enter).
      • Open the directory where UPX.exe is stored.
      • Finally open the directory where you installed the application (could be: "C:\Program Files\application name").
      • Now drag'n'drop UPX.exe into the DOS prompts window (or equivalently type the full path to UPX.exe).
      • Select the DOS prompt window and type: " -d ".
      • Next drag'n'drop the Directory of the installed program into the DOS prompt window (or equivalently type the full path to the directory) and also append a "*.*" (whithout the " of course) after the last "\".
      • Finally select the DOS Prompt window (which should contain a line like this: "c:\whatever\UPX.exe" -d "c:\Program Files\application name\*.*") Now press Enter.
      • UPX will decompress any executables inside the directory of the installed program. If there are subdirectories inside the directory of the installed program then you will have to repeat this process for them: Drag'n'drop UPX.exe, type -d, drag the subdirectory, press Enter.
      Now compress everything. Repeat the above process but instead of typing "-d" you should type "--ultra-brute". This will instruct UPX to try all possible compression algorithms and then use the best for each executable. It will take lots of time but it will always produce the best results. If you cannot wait that long you should use instead "--lzma".

    2. (Automatic compression) Download UPXALL. Then follow the instructions in the information.txt. When you are prompted for a directory you should use the application directory (could be: "C:\Program Files\application name"). Please note that UPXALL is still beta but will probably do the job.

  4. Now the hardest part. Copy the installation directory of the program somewhere else and start removing unnecessary files. It's hard to do it right and might not be possible to remove any files at all (it might even be illegal if you want to distribute the portable version). Remove skins, language files or whatever you consider not worthy its size. In some cases you might also have to update some configuration files about the removed skins for example. If you overdo it with the removals you might end up with menu items in the program that do not work. It has never happened to me but in this case you should probably remove these menu items. Don't worry, you don't have to recompile the source code... Just use Resource Hacker on the uncompressed executable, remove the unneeded menu items and then recompress it with UPX. Finally some applications might require other changes in their configuration files. For example you might need to change any references to directories with relative ones. Here is an example. If you make a portable version of Emule and you want to work from your flash drive you should consider that the drive letter of your flash drive won't be the same on every PC. That will make Emule lose the shared directory settings every time the drive letter changes. To avoid this you should open the configuration file of Emule, find the shared directory and the incoming directory settings and then change them with relative naming. For example if the shared directory is inside the directory of Emule you could put a path like this in the shared directory setting: ".\shared". If you don't understand something in this step then please leave a comment and I'll try to explain.

  5. If you just want to keep the portable version for yourself then you are finished. The directory now contains a portable version of the application (or at least that's how I call it). If you want to publish your application then you should first check if it legal to do so. Read the license of the application. If you are not sure for something, ask the authors.

Wednesday, September 26, 2007

Salad Fingers 8th episode

I have already written a post about David Firth's creations. I wrote about Salad Fingers which I hope that you watched and "enjoyed". The reason I post today is that the 8th episode of Salad fingers has been released! It's called the "cupboard" and I found out about it today. So if you haven't watched the previous episodes, do so and then watch the 8th too.

I also found a little secret. After Salad Fingers (on the 8th episode) gets electrocuted by the radio and puts his hands down, you can hear a weak sound playing for some seconds. Well I don't know if it is meant to be a stomach growl but at least that is what Firth suggests:

To see this picture yourself use the trick that I described in this post (read the important edit carefully).

Saturday, September 22, 2007

P2P Wars

I just read a post on Pirate Bay (an index site for Torrents and also a tracker) which says that the MediaDefender company, an anti-"piracy" company, in cooperation with major entertainment companies have been trying to harm trackers and other P2P networks even by using users' computers. This information was obtained from some leaked emails of the company that were published by the MediaDefender-Defenders group along with a phone call between MediaDefender and New York Attorney General's office.

MediaDefender denies everything and took legal action to remove the leaked emails from the sites that host them. But legal actions were not enough for them so they even performed DoS attacks to the site that hosted the leaked emails. MediaDefender had also previously vandalized the Wikipedia article about itself, probably because it revealed the connection of the company with, a site that trapped people who uploaded copyrighted content.

You can visit this site and read the emails (which have been edited so that the identity of the employees cannot be revealed). Even in the case of the site going down you can still find the emails and the phone call in Torrents. Just search on The Pirate Bay for "MediaDefender".

For more information read the Wikipedia article on MediaDefender and this article.

DosBox - DOS emulator

If I had to sort the OS that I have used by how much I like them I think that I would end up with this list:
  1. Ubuntu Linux
  2. Windows XP
  3. MS-DOS 6.22
  4. Windows 95
  5. Windows 3.11
  6. Windows 98 (stay away from me!)
The third place is held by MS-DOS. A simple and fast OS. It would be at the second position if it supported Internet... But DOS is now completely abandoned. Even Microsoft Windows does not run old MS-DOS applications and especially games!

Thankfully some guys made DosBox so that everybody can play his/her favorite old-fashioned games. DosBox is a free, complete Intel x86 PC emulator; it emulates the CPU, the graphics card, the sound card and supports joystick, mouse and many other things! It is open source and free software and will run on Linux and Windows. To play a game simply mount a directory as a drive in DosBox but I won't tell you how to do this. Instead go to this page to download DosBox and then visit the Wiki for more information on how to use the program.

Some suggestions:
There is also another DOS emulator for Linux called DosEmu. I don't have much experience with it but I think that DosBox is better.

Thursday, September 20, 2007

STOP RAR (on file-sharing networks)

If you hadn't noticed there are many RAR files on all file-sharing networks. This is soooooooo STUPID! There's absolutely no reason to use RAR. I'll tell you why.

  1. If you want to distribute MP3 files you should not use compression at all! These files are already compressed! If you need to put them on a collection then consider distributing them as a Torrent and not inside a RAR file. But even if you need to distribute them on another file-sharing network then consider using a zipfile instead which is free and works on all systems (Linux does not support RAR until you install some programs and the same goes for Windows).
  2. RAR is not free. It is patented. 7-Zip is a great open source application using a much better algorithm than the one WinRAR uses which achieves better compression ratios. So, if you want to distribute something that is not already compressed, why not use 7-Zip instead of WinRAR???
  3. Some guys believe that they are hackers because they use RAR to distribute their files. Bullshit... RAR was useful during the Newsgroups' era but there is no reason to use it while there is a free alternative like 7-Zip.
Anyway. If you still haven't been convinced you should read this article. You might also read this clueless (in my opinion) article that supports the usage of RAR files.

And do not forget to download 7-Zip.

Tuesday, September 18, 2007

Revised FuckBrainfuck Documentation

The current version of the FBF compiler is 1.7.0 and came along with the second revision of its documentation. I recently noticed that the documentation was full of mistakes and I also had forgotten to list some commands so I corrected it and now you can download the zipfile with the new documentation. The zipfile contains the compiler, the documentation, seven example programs and the Lua interpreter for Windows and Linux which is needed in order to run the FBF compiler.

Friday, September 14, 2007

Image Analyzer

Have you got any old photos that need retouching? If you don't want to use expensive and hard to use applications then you should try Image Analyzer. It might not be open source but it is high quality freeware that runs on Windows and on Linux with Wine. It has some great features like texture synthesis which will cover holes and other defects of old photos. Just keep in mind that it is not a drawing program, it is clearly a photo editing program focused on having many different filters.

But apart from enhancing photographs you can also do more funny things with it. Take a look at this cow which I made using the texture synthesis tool of Image Analyzer:

Image Analyzer can also be extended with plugins, so if you are a developer you might consider writing one for it. Currently there are about ten plugins.

The only bad thing about Image Analyzer is that it has no documentation. There is a short tutorial on its website and a nice support forum though.

I hope that it gets open source soon... ;-) (some older versions are already open source)

Monday, September 10, 2007


Infon is an online multiplayer game. You program the brain of little bugs witch try to survive in an arena by eating food, evolving and multiplying. To play you only need a telnet program. To watch the game though you will need to download the graphical client. Using your telnet program you upload the brain on the server and it executes it. Of course there other games like this like Droidbattles but what makes it different is that it is an online game and it uses my favorite language. Yes, you program the bugs in Lua!

I made a simple brain today which worked quite well. If you know any programming language then it will be easy to learn Lua and try this wonderful game! Click here to go to the website of Infon.

Have fun and if you create a nice brain, challenge me... ;-)

Friday, September 7, 2007

Pocket Computers

I think that most people like pocket computers (not Pocket PC's necessarily) and so I do. It's nice to have a device that fits in your pocket that enables you to keep notes and write programs anywhere.

I currently own a Palm Z22 and I also have my still-working Zire and a broken Palm Tungsten C. The oldest is my Zire which now has a worn out, thanks to Plua, digitizer making it almost impossible to input text without using the on screen keyboard. After the Zire I bought the Tungsten C which I managed to break in a month :'-(. The Tungsten C was far better than any other palmtop at the time. Finally I decided after some years of grief for my dead Tungsten that it was time to buy a new one and continue making some Plua programs. So I bought my Z22 because it was then the cheapest palmtop, so I wouldn't be shocked if I would ever break it like my Tungsten. The Z22 met my expectations in most areas. There are only a few things that I dislike. I will explain the most important in the next paragraph but you can skip reading it if you do not plan on buying a Z22.

Z22 has some differences from the other two palmtops. It has non-volatile memory as well as volatile (aka dynamic memory). It uses the faster volatile memory for buffering data that should be written on the non-volatile memory that is used as the storage of the Z22. How do I know that??? I know that it has two kinds of memory because there are even programs that show you the amount of used memory for both of them. And I suppose that the volatile holds unwritten data because if you reset the unit you will lose the last edited data. It is not a filesystem error because it also happens if you close the program that edits the data before resetting. So it must be that there are unsaved data in the volatile memory that are cleared with the reset. This is really annoying if you program on palmtops, because it's easy to crash the system and loose many lines of code! I found a way to avoid this. I installed FlushIt, an application that flushes the contents of the volatile memory when an application exits or on other system events (I also just noticed that it has been updated since I installed it).

I haven't said a word about Microsoft and Pocket PCs, now it's time. I never had one and do not intent to. Why?
  • I do not want to carry Windows with me. I want something different.
  • I prefer Palm to Microsoft. Those guys managed to create an extremely easy and powerful OS while ignoring some basic features! Palms, initially, didn't support multitasking or directory trees in their filesystem! The latest versions of Palm OS support multitasking although it is not that prominent as in Windows and other operating systems. Support for directory trees on external memory cards (secure digital) is also available on any model that has an expansion slot (my Z22 and my Zire don't have one).
  • I do not want to pay that much for a pocket computer. Any Palm is the only company that offers some cheap palmtops.
While Palm used to rule the palmtop market it seems that Microsoft made more clever moves. Or maybe it didn't, but the world prefers a palmtop that has "Windows", believing that it will be easier to learn. Of course Windows Mobile is completely different from XP. And Palm OS is much easier to learn, it can't get any easier in fact. But Palm is moving too slow; there are very few devices and they are quite expensive (except some low end devices like the Z22). The number of independent developers (who used to make quality freeware) is decreasing, and Palm isn't doing much to prevent this.

There are also some palmtops with Linux but do not know much about them. Maybe sometime I'll try one.

Tuesday, September 4, 2007

David Firth's Animations

David Firth is a very talented flash animator. I find his animations really interesting. Most of them (maybe all of them) are surrealistic and, usually, resemble dreams or nightmares.

One of the best animation series that Firth has made is Salad Fingers. Salad Fingers is a creepy green masochist man that loves touching rusty spoons and other rough surfaces with his oversized fingers. He lives in a strange world that seems to me like the earth after a great nuclear world war. I won't say more. Just click here and watch the 7 episodes that have been until now released. It will give you the creeps but watch all of them very carefully. Salad Fingers is really well done and is one of the best animations on the Internet. It is just NOT another violent and disgusting flash animation.

(IMPORTANT EDIT: It seems that Firth changed the structure of his website and the following trick will not work correctly. To view the flash animation on it's own and not on a webpage you find it's name in the source code of the corresponding webpage and then copy paste it's address manually in the address bar. Another solution would be to save the page. This will save an HTLM file and a directory with files. Find a file with ".swf" extension inside this directory and open it with Firefox. Then follow the instructions bellow. The text in the square brackets [] was working with the previous structure of Firth's website, ignore it and do what I told you instead. If I confused you then please leave a comment and I will try to explain it better to you.)

Here is a trick that might reveal strange things or even easter eggs in some of his animations. While you watch an animation on fat-pie (Firth's website), [change the ".html" ending of the current page into ".swf" so that you view the flash animation not embedded in a webpage]. Now by resizing the browser you will also resize the viewport of the flash animation and therefore you will be able to see things which normally would be out of sight. Try resizing your browser into a short and thin window and then view this animation. After the kid that smelt funny is burned you will have to pause on the point when the headmasters door is shown. Now, look at the board on the right. It will be like this:

Normally the right part of this board ("DON'T READ THIS BIT YOU LOSER") wouldn't be visible. ;-) Please note that I tried this with Firefox on Ubuntu Linux. I do not know if it is possible with Internet Explorer or Opera. I would be pleased if I had some feedback on this.
Anyway, back to the point. Go now to fat-pie cartoon section and watch everything. They rock!

Saturday, September 1, 2007

Globulation 2

To be a good RTS game player you have to be good in micromanagement as well as commanding your nation as a whole (macromanagement). This is true for most RTS games. Although some game titles focus on micromanagement and other on macromanagement, micromanagement exists to make things more difficult and unreal.

When I say that things became more unreal I mean that you can control every single unit that you own. That never happens in reality as units are not stupid robots that will always do whatever you say. And when I say that thing became more difficult with micromanagement I mean that you have to spend time to control individual units instead of focusing on your strategy.

Thankfully some guys decided to make Globulation. The first Globulation was shareware and had many features missing compared to the Globulation 2 which is free software.

Globulation 2 makes micromanagement unnecessary because tasks are automatically assigned to units. You only have to set a number on every building that indicates how many units will have to work there. Then the unit will start transferring goods to this building when it is needed. Some building also have other settings. For example the Swarm, which is the building that created buildings, accepts some values that indicate the ratio between different unit that it produces (eg: 1 soldier/2 scouts/4 builders).

Another unique but very realistic characteristic about this game is that you do not collect resources. The units simply take them directly from the nature to the place that they are needed.

You may wonder how you can attack the opponent without the necessary micromanagement. Flags are the solution to this and to other things as well. A war flag for example attracts a number (you set how many) of soldiers of a specific level (you set that too) into a radius around it (guess who sets that...). There are other flags too but I am not going to say anything more.

The DRAWBACK: there is no sound effects. Nice, comic-like graphics, nice multiplayer, nice AI (try to play against Nicowar) but no sound effects. If you can make some sound effects then please do and send them to the game developers, it's a pity for such a nice game to be mute. There is some music but I prefer turning it off and listen to some Blind Guardian instead. ;-)

Click here to go to the official website of Globulation 2. There you can find anything related to the game: tutorials, the game manual and of course the game itself.

Here is a video of a game:

Tuesday, August 28, 2007

BitTorrent - why I won't use it.

BitTorrent is a file sharing protocol. It (like other protocols) uses cleverly the bandwidth of many users (that belong to what is called a "swarm") to deliver some data to everyone that is interested. Everyone is supposed to upload data to other users while downloading, thus reducing the costs for anyone that wants to distribute a large file to many users. To join a swarm and download the shared file, you will need to download a BitTorrent client.

μTorrent is surely one of the most compact, stable and easy-to-use BitTorrent clients. But on December the 7th, 2006, μTorrent was purchased by BitTorrent inc. I was always a bit concerned about how good μTorrent was at protecting my privacy since it was closed source. But now I am not sure if I can anymore trust a closed source program that is owned by a company that is doing business with many "entertainment" media companies like Warner Bros and MTV. These companies will do anything to protect their millions and they wouldn't hesitate to spy on everything, so why not on the BitTorrent network?

I used Azureus for some time but I never liked it for the same reasons I do not like Java (which Azureus is written in): it is toooooo heavy. It needs some time to get started and then uses too much RAM. In addition to these, Azureus is not made to be portable. So although Azureus is a well-made open source application, I don't think I'll use it anymore.

What is left then? Taking into consideration that I am using Ubuntu and that I do not have any intentions to reinstall Windows in the near future I don't think that there are any good BitTorrent clients left. So, maybe I will continue using aMule: a program that connects to the great eDonkey and Kad networks and offers great variety of files while having nice mechanisms to reduce leeching.

EDIT: I now use Deluge on Ubuntu. :-)

Saturday, August 25, 2007

Goats and Cars

Before some years I've been on holidays at Samothraki. While trying to find a parking place outside a tavern we saw a sign saying: "ΜΗΝ ΠΑΡΚΑΡΕΤΕ ΚΑΤΩ ΑΠΟ ΤΑ ΔΕΝΤΡΑ ΑΝΕΒΑΙΝΟΥΝ ΚΑΤΣΙΚΙΑ" which in English means: "DON'T PARK UNDER THE TREES GOATS ARE CLIMBING" Well this is a very poor translation but the point is that this sign could either mean that we shouldn't park under the tree because the goats must have free space in order to climb on the trees........




Lua VS the rest: 1-0

(This will go through a story before ending up to the Lua programming language. Sorry but I felt like writing about myself a bit.)

I've started programming (if you can call DOS batch files programs) when I was 11. My first "program" was a wrapper that was supposed to make floppy disk formatting easier by calling format with some arguments and an optional volume label (I think that I had named it KAFmat). What I liked about files? Nothing. I just had no other choice at that time (I had no idea how I could use QBasic, I barely spoke English after all).

After 2 years a family friend gave me an verbatim CD of Visual Basic 6.0. At first I was only playing with putting buttons that did nothing on a form but soon I started making some programs (one year after I made Logicrypt). I continued programming with Visual Basic for about 4 to 5 years while at the same time I tried some other languages like Pascal, Basic, C++. I also tried and learned quite well Plua (=Palm Lua) which I liked a lot because of its great syntax and ease of programming and the fact that it was a complete IDE which I could use on my old Palm Zire.

But, not before a year, I completely uninstalled Windows and Ubuntu took their place. Of course Visual Basic doesn't run on Wine so I had to find an alternative. At that time I was taking Java and C lessons on my university but I never really liked any of these languages because I find them too tricky for daily use: Java is not lightweight at all while C need too much writing for simple programs. I tried Gambas which is like Visual Basic but I stopped using it because it creates executables for Linux only (but is a very good programming environment nevertheless). So I thought that it would be easy to learn Lua since I already knew Plua.

And so I did. I now program mostly in Lua. It is a very powerful language and suitable for daily use. If you have an idea then you simply open a notepad and write some Lua code which will easily run on Linux and Windows. The code is interpreted by the very lightweight and portable Lua virtual machine which fits easily even on a floppy disk. The virtual machine can either run the source code or the compiled bytecode (which you can distribute if you do not want to show the source code of your programs). The virtual machine doesn't support GUIs or sockets but this functionality can be added with the wxlua and the (great) LuaSocket libraries. You may also use LuaGL for OpenGL 3D or 2D Graphics.

I have only published one Lua program until now: FuckBrainfuck

For more info on Lua you may check its entry on wikipedia or go directly to its website by clicking here or at the title of this post.

Friday, August 24, 2007

Old Program - LogiCrypt

LogiCrypt is one of my the first programs that I made with Visual Basic. It can encode/decode create checksums, shred and create self-decrypting executables for any file. This is a really old program so do not expect to get any real security as all the algorithms are made by me. But it's worth giving it a try I think.

You can download Logicrypt by clicking here.

Here is a screenshot:


One of my favourite games in Linux is XMoto. It is so simple yet so addicting. It is a side scrolling motocross game; in fact it looks more like riding a trial motorcycle. The physics, although not completely realistic (eg: the angular momentum isn't conserved during the flight after a jump) , feel really good and smooth. The game is updated regularly and gives you the ability to download new levels, skins and world records (along with a replay of the record) without even closing the game. This way you can play straight for days if you want to even have a chance to break one of the world records. Soon you will start admiring (=hate) some names like: "Duuferna" or "Destroyer". The graphics are simple but adequate, some levels have their own textures too and a few of them look like other classic games like Sonic.

XMoto can be found in the Ubuntu Linux repositories so you can find and install it with Synaptic or by issuing the command apt-get install xmoto in the console. Windows users may visit the official site of XMoto and download the windows installer.

Wednesday, August 22, 2007

Old Program - Ask Wise

Ask Wise helps you make statistical predictions. Initially I had written it's algorithm in Plua which is port of Lua for palmtops and the first experiment with the program was to create a database with records of the height, weight, age and sex of many people. Then Ask Wise would be able to predict someones sex given his height weight and age.

Later I ported the algorithm to Visual Basic while improving many aspects of it. It now has much more features. But still the main idea is the same: Give it a database with sets of N numbers. Then give to it a set of N numbers with gaps (holes in a set of the N numbers) and Ask Wise will fill each hole with a number based on the databases records.

Does is seem complex? Well it might be a little but it is a very nice program as it can predict many things if you provide it with a good knowledge file (database). Just make sure that you read the help (by clicking the help button in the program).

You can download Ask Wise by clicking here.

Here is a screenshot:

Old Program - I'm Innocent

When I was at school I had I friend that used to get thrown out of the computer class because he was chatting on the Internet. So I made this program for him. It runs in the background and it will hide any window that you middle-click. To reveal the hidden windows middle-click anywhere while holding down shift. It's that simple! Just note that this program will not work if you use drivers that alter the middle click behaviour (like Logitech's drivers) You can download I'm Innocent by clicking here.

Old Program - A(X)I(O)

A(X)I(O) is my first successful effort to make a program with AI. It is a Tic Tac Toe game which I made before many years during Christmas. I also had to rewrite the code because my mother accidentally pulled the plug of the computer. It's name comes from the combination of AI and XO (the symbols used in Tic Tac Toe). There are 8 different levels to play but it becomes invincible at level 6 or more. In the zip you will also find a file with instructions.

You can download A(X)I(O) by clicking here.

Here is a screenshot:

Old Program - Simple

Simple is a portscanner. It used to be very simple at the beginning but it soon got a bit complex. Initially it was a program which scanned a class C network for computers with windows shares. Before some years there were lots of computers with unprotected shares. Now you will hardly find some. But Simple still works. The big hit for it was the Service Pack 2 for Windows XP. For some stupid reason (to stop your computer from doing DoS attacks or something) Microsoft decided to put a hardcoded (= not something that can be changed like a normal parameter) limit of 10 on the concurrently half-open connections. Fortunately some guys made a great toll to modify this limit (some antiviruses detect this tool as a virus but you can safely ignore them).

You can download Simple by clicking here.

Here is a screenshot:

Old Program - Emergency Process Terminator

EPT is a tiny program that let's you close crashed programs when the task manager doesn't show up. This usually happens when a fullscreen game crashes. EPT runs in the background and can terminate the foreground window or perform some other actions when some predefined hotkeys are pressed. In the zipfile you will find a help file with more information. You can download EPT by clicking here.

Old Program - Anonymous NET SEND

Windows messaging is a service that runs on the background of Windows (this is the default for Windows up to XP SP2. After that you have to manually turn this feature on). It's purpose is to send and receive messages to and from other users on the same local network (on older versions of Windows it used to accept messages from the Internet too, which was a welcoming gesture for spammers.). When you receive a message a window pops up containing the name of the computer that sent the message, the time on which it was sent and the message itself. Messages can be send by issuing the NET SEND user message command on the command line. But this of course will reveal the name of your computer to the recipient.

Anonymous NET SEND allows you to spoof your computers name while sending a message to another user.

You can download Anonymous NET SEND by clicking here.
The source code can be found here. (link broken, ask me if you want it)  (VB6 source released under GNU/GPL v3 or later)

Here is a screenshot:

Old Program - LightAss

Before some months I played a game with a friend. He quickly made up a story which he kept secret and my target was to unravel this secret story by asking questions that can only be answered with "yes" or "no". What I found out about his story was this: There are some sheep which in this story symbolize the university students. There was also ten wolfs which came to eat the sheep because they were trespassing into their cafe in order to eat the grass that was on the floor. This cafe was inside my university, it had no door, only windows. The university was under occupation by the students. The sheep got into the cafe through the windows and then locked them and threw the key somewhere on the floor but the wolfs could see it. Because I didn't find any meaning in the so far revealed story I asked my friend to tell it to me. But in fact there was no story at all. He simply answered "yes" if my question ended in "a". So the story was created purely by my imagination as my friend had no way to affect my thoughts. I wanted to play this game more times but this was not possible because now I knew the rule. So I made a small program that created a rule each time you want to play and then answer your questions using this rule. Of course the rule is extremely complex for the human mind so that you cannot deduce it after seeing the answers for many questions. I named the program after "translating" the name of a popular Greek script writer named Foskolos ("Φώσκολος") who also writes crazy stories. "Fos" ("φως") in Greek means light (as a noun). "kolos" ("κώλος") in Greek means ass (although it is spelled differently in "Foskolos"). So a "translation" of "Foskolos" is "LightAss". LightAss can create 1000 different rules based an "story codes". If you create a story and want to continue working on it later you can use the save/load buttons. You may also use a story code of your choice (that will create a specific rule). You can download LightAss by clicking here.

Tuesday, August 21, 2007

Old Program - Where

One thing I used to hate about Windows (I now have switched to Linux) was their file search program. It's REALY SLOW!!! I hated watching that stupid dog digging and digging without finding anything. And the funny thing is that I had turned on file indexing that "enables faster searching" according to Microsoft but no good. The only fast way to search for files is the dir command. Open the command line and type: dir c:\filename.ext /s /b This will search and list every file in c:\ that matches the specified filename.ext (you may also use wildcards in the filename. * means any number of characters, ? means any character). But still this wasn't enough for me. I wanted a fast searching tool that would navigate me directly to the results, something that the dir command could do. So I made one with Visual Basic. I named it Where. It's extremely small and at least as fast as the dir command, that means that it is much faster than the stupid dog. The only drawbacks are that it doesn't accept wildcards and that in some rare cases will not find some files that match the search text (I read on some forums that this is a Visual Basic related bug). You can download Where by clicking here.

MUTE Portable

MUTE is an anonymous filesharing application by Jason Rohrer, placed on the public domain. When you connect to the MUTE network, you connect to a few users, your "neighbours". When you search for a file you send a search request to all your neighbours and they forward it to their neighbours etc. The search results return to you through your neighbours and the same goes for the file if you decide to download it. This way you do not have to connect directly with the person that has the file and that, in addition to some other measures that MUTE takes, makes you anonymous in the network because it is really hard for someone to find what you share or what you download. MUTE Portable is what its name suggests. I made it by compressing the executables in the directory of MUTE and then packing the directory in a zipfile. Just unzip it and you will have a ready to use MUTE installation that occupies only 5.4MB. For more information on the MUTE network and the original application visit its homepage. You can download MUTE Portable by clicking here.

Old Program - StereoFreak

Stereofreak is a program that I wrote in Visual Basic. It helps you create stereoscopic photos. These are 3D photos that can be viewed with some special glasses (those that have a red and a green lens). For more information on stereoscopy you may read this article.

You can download Stereofreak by clicking here.

Here is a screenshot of the program:

And here is a 3D photo created with StereoFreak:

Old Program - Legend

Legend is a program which I made when I use was using Windows and Visual Basic. You give to it a picture, let's say a photo of a silly friend, and then a directory full of, for example, porn pictures. :-) Legend will create a photographic mosaic with the porn pictures that resembles the photo of your silly friend. It has an option to enlarge the resulting photo so that you can make it a poster. So print it and send it to your friends mum. ;-) Of course you can find much better uses for this program, like making a picture of a politician out of starving children or perhaps a picture of a flower made out of pictures from your holidays.

You can download Legend by clicking here.

Here is a screenshot of the program:

FBF 1.7.0

Brainfuck is a very beautiful esoteric programming language with only 8 commands. You can make any algorithm you can think of on this language but in most cases it is very hard to do so. In Brainfuck you do not have variables, functions, constants and many other convenient features that most programming languages have. You only have an array with byte sized cells (some implementations allow for other sizes too) and a pointer. Initially all cells in the array are equal to 0 and the pointer points to the beginning of the array. Now you can only issue 8 commands that are symbolized by one character and take no arguments: "< > - + , . [ ]". "<" decreases the value of the pointer by one, while ">" increases it. "-" decreases by one the value of the pointed cell on the array, while "+" increases it. "," read a character from the keyboard and stores it in the currently pointed cell, "." prints to the screen the character stored in the currently pointed cell. "[" will jump to the command after the corresponding "]" only if the currently pointed byte equals to 0. "]" will simply jump unconditionally to the corresponding "[". That's all. With this commands you can make any calculation but it will be very hard. You can see Brainfuck as a nice brainteaser; just think of an algorithm and try making it in Brainfuck. For more information on Brainfuck read this article or visit the open directory project for Brainfuck related pages.

(FBF) is a programming language which I made. It compiles directly to Brainfuck code and supports many features found in common programming languages so it makes creating a Brainfuck program easier. Of course you are not actually programming in Brainfuck but you will be able to create very complex Brainfuck programs. The FBF compiler is written in Lua (which is one of my favorite programming laguages) and will run on both Linux and Windows. In the zipfile you can find an extensive documentation, the source code of the compiler (GNU/GPL version 3 license), Lua interpreters for Windows and Linux and some example programs in FBF.

Here is a small program written in FBF:
#DIM char
READ char
UNEQ char '.'
IFNOTEQ char 'z'
INC char 1
IFEQ char 'z'
SET char 'a'
PRINT char
READ char

You can download FuckBrainfuck by clicking here.

Popular Posts