small web-tro

For everything that's not in any way related to PureBasic. General chat etc...
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Psychophanta wrote:Aha! I see. Then the size must be due to the ASM, or some fine tricks avoiding usual libs included in any C/C++ source. :)
Do you mean the opposite by any chance?
It's PureBasic that comes with an unchangeable footprint, not typical C compilers.
NOTE: :P If you would done it with PB it would work faster in my SiS VGA (in this VGA it work damnly slow).
What makes you think that?
Where's the difference in calling OpenGL in C or PureBasic?
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

traumatic wrote:Do you mean the opposite by any chance?
It's PureBasic that comes with an unchangeable footprint, not typical C compilers.
No no, i don't mean the opposit.
Well, in my experience, i have not found any C/C++ compiler (i have tried only gcc, MS VC++ and Borland C++ Builder) that generate an executeable file with a small size. Too far if compared to PB's ones.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

If you want to code something that is small per se and compresses well,
you'll have to write everything on your own and don't rely on 3rd party libraries.

With that in mind, you don't have a footprint in C if you don't want to.

PureBasic exes however always have it attached, no matter if your code
makes use of it or not.

It's much harder (if not even impossible at a certain level) to code small
executables in PB.

Here's a comparison I remember having done some time ago
(the thread is about speed but shows filesize differences as well):

http://purebasic.fr/english/viewtopic.p ... 866#118866

The footprint is smaller now in PB4, so maybe VC++ and PB produce
the same size now, don't know.

Apart from all that: There are a lot of utilities to bring the filesize further
down. Things that don't exist (yet?) for PureBasic.

Don't get me wrong. It's possible to code 4k intros PB as well!
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Sorry, but here the size i get for the PB executeable you mention in that thread is 3.584 Bytes, not 5.632 Bytes.
Besides, i serious comparation would be better without the use of console, and using more calculations, arrays, linked lists, pointers, double floats, floats, integers, loops, etc.
I tried myself several times (i didn't compare to Intel C) and always PB won in size and sometimes in speed.
Here is a thread:
http://www.purebasic.fr/english/viewtopic.php?t=9266
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Psychophanta wrote:Sorry, but here the size i get for the PB executeable you mention in that thread is 3.584 Bytes, not 5.632 Bytes.
I mentionend it was PB 3.x, didn't I?
Psychophanta wrote: Besides, i serious comparation would be better without the use of console, and using more calculations, arrays, linked lists, pointers, double floats, floats, integers, loops, etc.
I never said this was supposed to be a "serious comparison".
Psychophanta wrote: I tried myself several times (i didn't compare to Intel C) and always PB
won in size and sometimes in speed.
I'm happy for you.
Psychophanta wrote: Here is a thread:
http://www.purebasic.fr/english/viewtopic.php?t=9266

Code: Select all

#include <windows.h> 
See that's what I was talking about. You _can_ include unused stuff but
you don't _have to_ as in PureBasic. C compilers offer much more optimization
options.
Good programmers don't comment their code. It was hard to write, should be hard to read.
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

@psychophanta:

Hmm ... already did some tests in creating small purebasic executables.

Hava a look at the following thread for example :

http://www.purebasic.fr/english/viewtop ... +framework

( Note : The technique of cab-dropping which I used in this thread is
something which isn't really used anymore. E.g. it runs under Windows
XP only etc...)


Nevertheless, there are some options how you can make very tiny exes
in C. I use the Express Version of M$ Visual Studio C++ 2005 Suite. I
am pretty happy with it ( really like the new IDE compared to VC6.0 ).

Furthermore, like traumatic already mentioned, there are a lot of things
which you can exclude using C++. You can code smaller versions
of the libs you don't include e.g. In addition, I use the tool called Crinkler.
It replaces the linker and has some excellent shrinking techniques when
you compile tiny code ( around 4kb ). This doesnt work (yet?) with pure-
basic.

Last but not least there are several possible compiler options for creating
small executables.

So, as far as I can say, you can produce much smaller code ( focussing
on <4kb development ) with C/C++ as with PB.

Nevertheless, I don't want to start a flamewar PB versus C/C++. I like
PB and I still use it for some prototyping and small tools. It's a perfect
language for certain stuff. Just to make this clear ... :wink:
regards,
benny!
-
pe0ple ar3 str4nge!!!
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

benny wrote:Nevertheless, I don't want to start a flamewar PB versus C/C++.
Me neither, just in case this was unclear.
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Flame war? Come on!
I like VC++, i used it in the past, but i prefer ASM and/or PB for every program.
And btw, i find much better, fast and logical to do things using DirectX than OpenGL :wink:
As long as i know DirectX (Direct3D, DirectDraw, etc.) is currently the king
:P
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
codemaniac
Enthusiast
Enthusiast
Posts: 289
Joined: Mon Apr 02, 2007 7:22 am
Location: Finland

Post by codemaniac »

Come on benny, admit that you did it in Pure, because only with PureBasic you can get so damn small executables full of PurePower! :lol:
Cute?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

codemaniac wrote:Come on benny, admit that you did it in Pure, because only with PureBasic you can get so damn small executables full of PurePower! :lol:
:wink:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

codemaniac wrote:Come on benny, admit that you did it in Pure, because only with PureBasic you can get so damn small executables full of PurePower! :lol:
:lol: ... hehe ... no no this version was really done mit C/C++. The version
I did with PureBasic was even smaller ;-)
regards,
benny!
-
pe0ple ar3 str4nge!!!
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

:lol:
Good programmers don't comment their code. It was hard to write, should be hard to read.
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

Speaking of tiny productions - you might be interested in a small game
I squeezed into 3779 bytes ;-) Download it here :

http://www.weltenkonstrukteur.de/dl/Znax3D-4k.rar

(Check readme file for instructions and rules!)
regards,
benny!
-
pe0ple ar3 str4nge!!!
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

very nice and funny game... first i had to check how the game works but then i checked the system and it was real fun... really very nice done... esp nice tune! keep on your great work benny! respect!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

@va!n:
Thanks for the nice words !!! Glad you like it ;-)
regards,
benny!
-
pe0ple ar3 str4nge!!!
Post Reply