Code snippets
I have now opened a Code snippets section at winsbydefault.com
The idea here is to be able to released random code I’ve written, and so that people can use it and report the bugs they find.. or just post comments about my code.
Right now, The trac allows anyone to submit new tickets. I realize this might get abused a lot so if that happens I will have to figure something else out.
Please have a look
Trac page
note that the trac page allows svn browsing, so its the only really important page
SVN page
trac page will get some wiki love soon(tm) as well as some sort of logo I guess.
Lazarus
Its been years since I tried Lazarus the last time..
Lazarus, is for those of you who doesnt know, A FOSS Delphi IDE, its look is almost identical to Borland Delphi 7 which I normally use. I decided to give it a go and downloaded it last night to try it out.
First impressions, nice. looks professional now. The interface does not look like its from the 90s, code editor works pretty well, and unlike the last time, it actually is ok to work in and it compiles fine.
This is certainly a good alternative for those who seek to try Delphi and wants a good FOSS alternative for the IDE. By default, Lazarus will use the FPC (Free Pascal Compiler), which is an excellent compiler and works on a wide range of platforms as well.
You can get Lazarus at
Delphi hashmaps
Hashmaps are nice, everyone likes hashmaps.
I’ve wanted one for Delphi for a while, for no real reason. Been thinking of making one, how hard can it be?
(it turned out to be very easy heh heh)
I ended up with some spare time over this weekend, so I threw together a quick hashmap, written in Delphi 7.
The usage is pretty clear here. The hashmap will store a pointer to whatever value it wants to hold. Ill provide an example:
var
hashmap: THashmap;
ptr: ^TTest;
begin
hashmap := THashmap.Create();
new(ptr);
ptr^ := TTest.Create();
hashmap.SetValue('somekey', ptr);
ptr := nil;
ptr := hashmap.GetValue('somekey');
FreeAndNil(ptr^);
FreeAndNil(hashmap)
end;
The unit is available on my SVN here
Its worth noting that, due to the genericness of the hasmap, It only keeps a pointer to its value therefor has no clue
what data it points to and can thusly not be responsible for freeing the object it reference to, this has to be the responsibility
of the programmer.
Also, The unit is still very much work-in-progress, allthough it works, one sould be aware that I will update it as I get time to and
full usage will be available in the units comment at the top.
The Dark Knight as a SNES game
Stuff that wins
Since this blogs subtitle is ‘Stuff that wins by default’ i am going to show you some stuff that wins by default.
First off all, let us define ‘win’:
to win (third-person singular simple present wins, present participle winning, simple past and past participle won)
(transitive) To achieve victory in (a game, a war, etc).
You may say “Well, cut the ‘bla bla’ and start showing me some funny pictures, ffs!” and i guess you are right. Let’s begin:
Ninjas

they will always win, you can’t argue with that.
Root Beer

concentrated awesomeness in a can.
Stielhandgranate

if you see one you are probably doomed.
Cheeseburgers

probably the best food ever made!
Pirates

“I’m Guybrush Treeepwood and i’m a mighty pirate!”
HELLO WORLD
Hello World.
This is the first entry on my brand new blog, hosted on Winsbydefault.com
Lets see if I can keep this updated or not, to start I shall present to you, Chocolate Rain with a touch of 8bit!

