Jump to content

Chosing a language

- - - - -

  • Please log in to reply
11 replies to this topic

#1
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Ok now I'm just tired. I tried to create a program that will be able to use GUI, will be light, portable and platform-independent. It turns out to be very hard.

First, which language?
Java fits very well, but it won't run on a PC that doesn't have Java installed. Is there a way I can fix it?
I tried C++. Seems like the best option, but what's the best GUI kit that's platform independent and portable?
If that's what it takes, I'll even learn Assembly. It produces the lightest code.

Second, the program to use. Qt, wxWidgets, or anything else that's compileable on both Windows and Linux with minor modifications, light, and doesn't need anything to be pre-installed.

Please help me to chose :(

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#2
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts
Go check FreePascal accompanied with Lazarus (FreePascal most popular IDE for easier development with GUI).

If Java claim

Quote

Write Once Run Anywhere
(which somehow I feel simply misleading since you need to install its virtual machine first), FreePascall aiming for:

Quote

Write Once Compile Everywhere
.

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
For C++, I think Qt or gtkmm are good options. I don't care for wxWidgets, but that's just a style issue. It's actually a strong library.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#4
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
I'm downloading FreePascal right now, thanks.
I tried Qt, but it's kinda heavy. I need to carry files that are more than 5MB. The IDE I'm inspired by is MicroASM, which weights only 1.08MB unpacked. I wanna make something similar, with the weight of maximum 10MB. The less the better.
-EDIT-
FreePascal is a Turbo Pascal-like IDE, did I download the right program?

Edited by AdvMutant, 16 December 2010 - 04:19 AM.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#5
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
TurboPascal is Borland's old creation, FreePascal is what you would want out of the two. Lazarus (which I am sure WP can tell you a lot about if you ask) is developed for FreePascal: http://en.wikipedia....zarus_(software) , It support GTK widgets which may be to your liking and is cross platform, just quite a different syntax from C.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#6
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts

AdvMutant said:

FreePascal is a Turbo Pascal-like IDE, did I download the right program?

Yes you did. For GUI development you may want to use Lazarus. With them you can write program and compile it for Windows, Linux, MacOS, and WinCE (with ARM processors) and get native executable.

While of course Pascal has different syntax, but you will find it much easier to read and to understand, with basic structure not very different with C.

#7
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
How about portability and size? What do I need to carry with me to run my program on another computer, other than the executable? And is the executable heavy? Sorry I can't test it myself, I'll only be home tomorrow.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#8
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
A sample hello world form with a few forms and textboxes, before and after stripping debugging symbol:
C:\Documents and Settings\foo>ls -l project1.exe
-rwx------+ 1 A!3X None 12428254 Dec 17 12:00 project1.exe
C:\Documents and Settings\foo>C:\lazarus\fpc\2.2.4\bin\i386-win32\strip.exe project1.exe
C:\Documents and Settings\foo>ls -l project1.exe
-rwx------+ 1 A!3X None 1711616 Dec 17 12:04 project1.exe
1/11 is not a bad decrease in size, it can be further decreased by UPX. It also zips into a nice size:

Attached Files


Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#9
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Once again, thanks NullW0rm.
I think I've just found the language I want to code my project on.

++rep! Happy X-Mas!

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#10
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
http://wiki.lazarus....azarus_Tutorial
http://wiki.lazarus....org/Lazarus_Faq
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#11
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts

AdvMutant said:

How about portability and size?

Although in some rare occasion you can immediately compile your source code in all OS/platform FreePascal supports without any modification, but usually some modifications are required for best compatibility. Especially with things that is very different between platforms (for example there is no drive letter in linux or any unix variants while Windows has). But usually the modifications are easy and straightforward.

AdvMutant said:

What do I need to carry with me to run my program on another computer, other than the executable?

Only those that related with your program. So if your program does not require external library, then you only need to distribute the executable.

AdvMutant said:

And is the executable heavy?

If you were thinking about the size of the executable, then there is no definitive answer. The size is growing along with complexity of your program. Simple hello world will have much smaller size than a word processor, for example :). However to my knowledge and experience, although "commercial" Pascal (i.e. Delphi) produces smaller executable size but the size from FreePascal is still very good.

#12
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Along with that note that FreePascal applications raise in size very slowly (which is great) compared C++ applications can easily double their size without too much extra code.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users