September 08, 2014
On Monday, 8 September 2014 at 07:59:37 UTC, Ola Fosheim Grøstad wrote:
> «Smallest PE file that downloads a file over WebDAV and executes it: 133 bytes»
>
> http://www.phreedom.org/research/tinype/

But that downloaded file is bloatware, because it has to implement functionality, which is not provided by the system. That tiny pe file doesn't download anything, it's completely done by the system.
September 08, 2014
On Monday, 8 September 2014 at 08:08:23 UTC, Kagamin wrote:
> But that downloaded file is bloatware, because it has to implement functionality, which is not provided by the system. That tiny pe file doesn't download anything, it's completely done by the system.

Yeah…

http://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes

September 08, 2014
On Monday, 8 September 2014 at 08:06:37 UTC, Ola Fosheim Grøstad wrote:
> On Sunday, 7 September 2014 at 21:03:17 UTC, Vladimir Panteleev wrote:
>> The 438-byte "Hello, world" program is achieved using Crinkler, which is a COFF linker with aggressive compression and header optimization. It was created for compressing 4K demos.
>
> Pretty nice! Is the format correct too, or can it break on OS upgrades?

From the Crinkler manual:

COMPATIBILITY
-------------

The goal of Crinkler is for the produced EXE files to be compatible with all widely used Windows versions and configurations. As of version 1.4, the EXE files produced by Crinkler are, to the best of our knowledge, compatible with Windows XP, Windows Vista, Windows 7 and Windows 8, both 32 bit and 64 bit versions. They are compatible with Data Execution Prevention and with execution hooks that inspect the import or export table of launched executables (graphics drivers are known to do this).

It is not a primary goal of Crinkler to anticipate incompatibilities that may arise in the future as a consequence of new Windows versions, graphics drivers or other widespread system changes. Guaranteeing such compatibility would require Crinkler to follow the EXE file format specification to the letter, precluding most of the header hacks that Crinkler utilizes in order to reduce the size overhead of the EXE format as much as possible. Rather, we strive to continually monitor the compatibility situation and release a new, fixed version of Crinkler whenever a situation arises that affects the compatibility severely (such as a new, incompatible version of Windows). This has occurred several times already throughout the history of Crinkler.

Each new version of Crinkler not only produces executables that are compatible with the current majority of targeted systems. It also includes a way of fixing old Crinkler executables to have the same level of compatibility. See the section on recompression for more details on this feature.

This compatibility strategy ensures that intros made using Crinkler will continue to be accessible to their audience, even if the Windows EXE loader changes in an incompatible way that could not be anticipated at the time the intro was produced.
September 09, 2014
On Monday, 8 September 2014 at 08:18:32 UTC, Ola Fosheim Grøstad wrote:
> On Monday, 8 September 2014 at 08:08:23 UTC, Kagamin wrote:
>> But that downloaded file is bloatware, because it has to implement functionality, which is not provided by the system. That tiny pe file doesn't download anything, it's completely done by the system.
>
> Yeah…
>
> http://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes

My personal best --

At my first job, a customer once made a request for a very simple DOS utility. They did mention that they didn't have much disk space on their machine, so they asked me to try to make the program small.
That was a once-in-a-lifetime opportunity. Naturally, I wrote it in asm.
The final executable size was 15 bytes. <g>
The customer loved it.
September 09, 2014
And how do ldc and gdc do? =)
September 10, 2014
Am Tue, 09 Sep 2014 10:20:43 +0000
schrieb "Don" <x@nospam.com>:

> On Monday, 8 September 2014 at 08:18:32 UTC, Ola Fosheim Grøstad wrote:
> > On Monday, 8 September 2014 at 08:08:23 UTC, Kagamin wrote:
> >> But that downloaded file is bloatware, because it has to implement functionality, which is not provided by the system. That tiny pe file doesn't download anything, it's completely done by the system.
> >
> > Yeah…
> >
> > http://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes
> 
> My personal best --
> 
> At my first job, a customer once made a request for a very simple
> DOS utility. They did mention that they didn't have much disk
> space on their machine, so they asked me to try to make the
> program small.
> That was a once-in-a-lifetime opportunity. Naturally, I wrote it
> in asm.
> The final executable size was 15 bytes. <g>
> The customer loved it.

Vladimir: Good job!
Don: Nice story. What did it do?

During my time at a vocation school I wrote some stuff like a tiny Windows media player with some of the ASM in the DOS/PE header area. And an animated GIF player in ASM as a .com executable with the GIF included in it. (Easy since GIF algorithms are 16-bit and they use 8-bit color palettes)

-- 
Marco

September 10, 2014
On Wed, 10 Sep 2014 16:02:01 +0200
Marco Leise via Digitalmars-d-announce
<digitalmars-d-announce@puremagic.com> wrote:

> > The final executable size was 15 bytes. <g>
> > The customer loved it.
and they never knows that it took at least 512 bytes anyway. or even more, depending of claster size. heh.


September 11, 2014
On Wednesday, 10 September 2014 at 13:53:32 UTC, Marco Leise wrote:
> Am Tue, 09 Sep 2014 10:20:43 +0000
> schrieb "Don" <x@nospam.com>:
>
>> On Monday, 8 September 2014 at 08:18:32 UTC, Ola Fosheim Grøstad wrote:
>> > On Monday, 8 September 2014 at 08:08:23 UTC, Kagamin wrote:
>> >> But that downloaded file is bloatware, because it has to implement functionality, which is not provided by the system. That tiny pe file doesn't download anything, it's completely done by the system.
>> >
>> > Yeah…
>> >
>> > http://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes
>> 
>> My personal best --
>> 
>> At my first job, a customer once made a request for a very simple DOS utility. They did mention that they didn't have much disk space on their machine, so they asked me to try to make the program small.
>> That was a once-in-a-lifetime opportunity. Naturally, I wrote it in asm.
>> The final executable size was 15 bytes. <g>
>> The customer loved it.
>
> Vladimir: Good job!
> Don: Nice story. What did it do?

It blanked the screen in a particular way. It was purely for aesthetic reasons.

> During my time at a vocation school I wrote some stuff like a
> tiny Windows media player with some of the ASM in the DOS/PE
> header area. And an animated GIF player in ASM as a .com
> executable with the GIF included in it. (Easy since GIF
> algorithms are 16-bit and they use 8-bit color palettes)

Nice.
That was the only time I ever made a commercial release that was entirely in asm. It only took me about ten minutes to write. It would have been far more difficult in another language.

On Wednesday, 10 September 2014 at 14:17:25 UTC, ketmar via Digitalmars-d-announce wrote:
> On Wed, 10 Sep 2014 16:02:01 +0200
> Marco Leise via Digitalmars-d-announce
> <digitalmars-d-announce@puremagic.com> wrote:
>
>> > The final executable size was 15 bytes. <g>
>> > The customer loved it.
> and they never knows that it took at least 512 bytes anyway. or even
> more, depending of claster size. heh.

Yeah. Plus the filename took up almost as much space as the executable code. But when they said they wanted it to be small, they actually meant "less than 2 megabytes". When our sales guy saw it, he said, "You got it down to 15kb? That's incredible!"

But I won't pollute D.announce any more. :)
September 15, 2014
> -m32mscoff allows using more linkers. Specifically, the Microsoft Linker and Crinkler, which only understand COFF, can both generate executables which are much smaller than those created by OPTLINK.

Hi, I've been experimenting with getting a basic D program
consisting of nothing more than "int main() { return 0; }" to
compile using -m32mscoff, but I keep getting this error message:

fatal error LNK1104: cannot open file 'phobos32mscoff.lib'

I don't see that library file anywhere in the D folders, so I'm
wondering what I need to do to workaround that problem (or to
create that file). I'm using the latest beta (v2.067.0-b1), and
using VC2010 linker.

Thanks!
September 16, 2014
On Monday, 15 September 2014 at 21:18:53 UTC, dcrepid wrote:
>> -m32mscoff allows using more linkers. Specifically, the Microsoft Linker and Crinkler, which only understand COFF, can both generate executables which are much smaller than those created by OPTLINK.
>
> Hi, I've been experimenting with getting a basic D program
> consisting of nothing more than "int main() { return 0; }" to
> compile using -m32mscoff, but I keep getting this error message:
>
> fatal error LNK1104: cannot open file 'phobos32mscoff.lib'
>
> I don't see that library file anywhere in the D folders, so I'm
> wondering what I need to do to workaround that problem (or to
> create that file). I'm using the latest beta (v2.067.0-b1), and
> using VC2010 linker.
>
> Thanks!

You have to build it yourself, run "make -f win64.mak MODEL=32mscoff" in Druntime and Phobos source directories.