Apr 072009
 

I was trying to figure out how to load a file from the path where the executable stays, the first thing came to my mind is using Win32’s GetCommandLine, and then do GetFullPathName. It seems ideal in C/C++ world but obviously things don’t work quite well in Ada, especially delimiter changed from / to and then changed back, I have no idea what does Ada’s run-time library is doing.

Then I found Ada has this package – Ada.Directories, it is actually what I want. Using GetCommandLine to get the executable’s full path name, and use Ada.Directories.Containing_Directory to get the directory, all set.

This got me recall similar things in C/UNIX, though UNIX API can do whatever I want, it is usually convenience to use C functions as it fit the language well. Things are getting worse with Ada on Windows, since we all know Windows was not developed by Ada …

BTW, Ada’s identifier is really long, and actually this is the style I’m trying to follow.

Apr 072009
 

I’m watching a stupid movie – a detective always lost his memory after he got up in the morning, then whole crap happened.

I cannot stop laughing while watching him jump into a lecture, while everybody believe he’s the expert who’s going to do the presentation, while he has no idea about what’s that for. However, he managed to catch up the slide show quickly (did he?), telling some non-sense to audience, and mde it a, sort of, perfect presentation.

I always want to be that smart. ๐Ÿ˜€

 Posted by at 22:37
Apr 072009
 

Eclipse is a pretty good editor, but to me it still needs some effort to become a good IDE.

I know those who’s familiar with Eclipse won’t agree with me, but the problem is, I can get a plug-in from somewhere and install it easily, but it always took me sometime on how to setup compilation/debug, etc. I’m not sure if it is Eclipse’ fundmental problem, or it is just because of careless plug-in developers, or actually it is totally my fault, means everybody has to do something to set it up and it is common sense.

Anyway, after tried Eclipse plug-in for Ada from AdaCore and Aonix, I decided I’d better try it out later whenever I know more about Eclipse, or the whole setup becomes seemless. GNAT GPS from AdaCore is doing as good as Eclipse in editor – I do like the feature of prompting while you key in, this is really helpful to newbie like me, as I cannot remember (actually sometime I even don’t know) all those interfaces from a specific package. However, GPS is doing pretty good with debug, I guess I got this conclusion just because I came from gdb world.

So I will still keep looking for other IDE alternatives, I don’t think I need an IDE for my server side development, but as for client (GUI), it’s kind of a must, though I’m not using any interface builder like GLADE, etc.

Writing GUI by using Win32 API directly is kind of fun – remind me old days while I was using x11 toolkit. ๐Ÿ™‚

 Posted by at 18:32