pouët.net

64k with mingw

category: general [glöplog]
midiclub: as sagacity said, you are already compressing the executable with an LZ-variant if you use UPX, why not let the packer do all the work? The result tend to be smaller that way.
added on the 2003-10-23 17:35:57 by kusma kusma
kusma: it's called "clueless" ;)
added on the 2003-10-23 23:36:10 by superplek superplek
it's a bit counterintuitive, but such things CAN (though only in *very* limited cases :) improve compression ratio a bit. the basic point is that you can improve on areas of the file that otherwise seriously pollute your lz dictionary :) - ~150 bytes of basically non-compressible data can perform better overall than ~5k of well-compressible but "dictionary polluting" data in that case.

i'd not recommend writing an own lz packer for it though - doing a decent lz is not as easy as one might think, and it's too much work for too little improvement if you don't happen to have code for it lying around :)
added on the 2003-10-23 23:52:46 by ryg ryg
ryg: exactly what i meant!

And by LZ-compression i really meant the executable compressor, effect of which is to be considered anyway. If i would (try to) code anything myself, it should be as simple as data reordering. Tokeniser/detokeniser sounds appealing, just because de-tokeniser can be made very tiny and simple.

I was in fact pointing out that executable compressor is almost equivalent to a tokeniser/detokeniser idea! So it is really a small difference to one or the other side.

-eye/midiclub

PS. plek: you are clueless enough to call me clueless? Beware of me on the parties! I'll be right behind you! And my teeth are sharp. I need fresh blood!
added on the 2003-10-27 00:42:07 by eye eye
yeah yeah, hear hear, whatever :)
added on the 2003-10-27 11:27:04 by superplek superplek
Better be carefull that he doesn't anallyze you :)
added on the 2003-10-30 11:44:21 by OmeCloak OmeCloak
GNU ld _can_ optimize out unneeded object files, but it has much bigger problems optimizing out unneeded functions. Try -ffunction-sections -fdata-sections (putting each function in its own section, more or less) and -Wl,--gc-sections to the linker to garbage collect away unused sections (GNU ld on Linux refuses to to gc-sections on dynamic binaries, but you can override that in the code and clean up the mess afterwards yourself ;-) ). I don't know if gc-sections is supported on Windows (ie. with mingw), though.

Another problem is that for weird technical reasons (virtual inheritance, for instance) every constructor is emitted twice. Don't use big constructors if you're using C++, have an init() method instead. :-)

In general, I'd believe that MSVC++ has the edge for producing small executables and code still, but with some tweaking mingw is probably OK too. Still, if you want to have those extra kilobytes... =)
added on the 2003-10-30 15:54:28 by Sesse Sesse
Talking code ? great ..
I'm just starting code, and i use LCC-win32 compiler, because it's free and damn enough for my debut needs ... ( though the IDE sucks big time, and that the compiled exes are slower than any DevC/MsVC exes ).

Do anybody know if it used in demoscene ? or even for 64K intros, as the exes produced are really small in size ? ( i have troubles getting MiniFmod running under LCC, as i doesn't handle ASM code the way MsVC does ... and it's far from my knwoledge, for now :( )

Anyone ?
added on the 2003-10-31 13:25:00 by kohai kohai
this might sound stupid but WHY IN THE HELL ARE YOU USING SHITTY FREE COMPILERS IF YOU DON'T HAVE TO - as if they could beat vc6/vc7 at anything at all. and don't give me that "i dont want to use pirated software" shit, because thats probably what you've been doing all your life.
added on the 2003-10-31 16:22:07 by superplek superplek
I want to code a compiler. It will be a basic compiler with integrated assembly and special features and ideas that were never introduced before. I will start the project in Quickbasic, just to see that it works and to learn, and perhaps I will convert it later to assembler. The produced code will be assembly of course and not interpreted bytecode. I'll try to optimise at it's best. That's because I found out that modern compilers are not for me. Every coder who respects himself should code his own tool that fits him the best. That's what I am gonna do sooner or later..
added on the 2003-10-31 16:28:28 by Optimus Optimus
Mr PLEK > uh oh ! You just sound like all my friends around ! ^^ "Leave that shitty compiler, get to work with a real tool ! " ...
Well, what can i say: i feel comfortable with it's little straight and minimalistic IDE. As i said, it's really enough for my needs, and i'm getting nice little results using LCC/OpenGL.
And i never said it could beat VC6/7.

No harm ... It's just a matter of taste after all ! :)
added on the 2003-10-31 16:58:48 by kohai kohai
Optimus : have you got any idea how difficult it is to write a compiler ? IN QUICKBASIC ?? ON YOUR OWN ?? impossible. better learn some c, and do it fast..
added on the 2003-10-31 18:08:06 by Navis Navis
Every coder who respects himself should code his own tool that fits him the best.

why leave it at that?
every coder who respects himself should invent his own programming language. every graphics artist who respects himself should create a new colour space instead of settling with rgb or cmyk. and every coder should program a tool for the graphics artist, naturally using his newly-invented programming language. and every musician should invent a new scale.
added on the 2003-10-31 21:06:29 by reed reed
reed: indeed. and possibly the new scale should use a very personal set of frequencies which don't correspond to the common notation scheme... and oh! the coder should also code a proper tracker to allow that, obviously using his brand new language.

Then, the demo will mostly suck arse and will show dutch color scheme fx with psytrance music :D
added on the 2003-10-31 21:42:05 by dixan dixan
Um, why would one use "suck arse" in the same sentence with "dutch color scheme"?

Oh, wait.
added on the 2003-10-31 22:50:01 by sagacity sagacity
let's all just suck ass and use "free" compilers (not as in free money, but as in free bukkake)
added on the 2003-11-01 06:05:48 by kusma kusma
I decided it. I will code my ultimate compiler and I will bring world domination by coding a demo in that!

P.S. I am bored to hear people "Do you know how hard this is? You should better not try it..". This is nonsense to me..
added on the 2003-11-01 12:11:26 by Optimus Optimus

login