Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-06 Thread Paulo Pinto via Digitalmars-d
Am 06.09.2014 02:03, schrieb Ary Borenszweig: On 8/31/14, 8:51 PM, Abe wrote: Please note: 502064 bytes!!! [for the curious: 490.296875 kilobytes] The real question is: why does size matter for you? A simple hello world program in Go is 2 megabytes. That's four times the size in D. I don't

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread Marco Leise via Digitalmars-d
Am Tue, 02 Sep 2014 07:03:52 + schrieb Dicebot pub...@dicebot.lv: On Tuesday, 2 September 2014 at 06:18:27 UTC, Jacob Carlborg wrote: On 01/09/14 20:33, Dicebot wrote: Any reason why it can't work for OSX in a same way? Assuming LDC does emit ModuleInfo Co sections the same way

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread via Digitalmars-d
On Friday, 5 September 2014 at 09:27:41 UTC, Marco Leise wrote: Only when you think about how people put 5 minutes of a stunning 3D gfx demo into 64 KiB you start to worry about 34 KiB for Hello World! again. You meant 4KiB… https://www.youtube.com/watch?v=RCh3Q08HMfslist=PLA5E2FF8E143DA58C

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread deadalnix via Digitalmars-d
On Friday, 5 September 2014 at 11:50:37 UTC, Ola Fosheim Grøstad wrote: On Friday, 5 September 2014 at 09:27:41 UTC, Marco Leise wrote: Only when you think about how people put 5 minutes of a stunning 3D gfx demo into 64 KiB you start to worry about 34 KiB for Hello World! again. You meant

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread Israel via Digitalmars-d
On Friday, 5 September 2014 at 09:27:41 UTC, Marco Leise wrote: Am Tue, 02 Sep 2014 07:03:52 + schrieb Dicebot pub...@dicebot.lv: Only when you think about how people put 5 minutes of a stunning 3D gfx demo into 64 KiB you start to worry about 34 KiB for Hello World! again. This made my

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread Marco Leise via Digitalmars-d
Am Fri, 05 Sep 2014 19:38:13 + schrieb deadalnix deadal...@gmail.com: On Friday, 5 September 2014 at 11:50:37 UTC, Ola Fosheim Grøstad wrote: On Friday, 5 September 2014 at 09:27:41 UTC, Marco Leise wrote: Only when you think about how people put 5 minutes of a stunning 3D gfx demo

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread Ary Borenszweig via Digitalmars-d
On 8/31/14, 8:51 PM, Abe wrote: Please note: 502064 bytes!!! [for the curious: 490.296875 kilobytes] The real question is: why does size matter for you? A simple hello world program in Go is 2 megabytes. That's four times the size in D. I don't know if people complain about that. I

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread deadalnix via Digitalmars-d
On Saturday, 6 September 2014 at 00:03:02 UTC, Ary Borenszweig wrote: The real question is: why does size matter for you? I've been told that it does...

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread via Digitalmars-d
On Saturday, 6 September 2014 at 00:03:02 UTC, Ary Borenszweig wrote: The real question is: why does size matter for you? 1. download size for PNaCL/asm.js 2. ease of low level debugging/transparency 3. potential cache pollution 4. embedded programming / SoCs 5. bloat signals loss of control

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-05 Thread via Digitalmars-d
On Friday, 5 September 2014 at 19:38:14 UTC, deadalnix wrote: On Friday, 5 September 2014 at 11:50:37 UTC, Ola Fosheim Grøstad https://www.youtube.com/watch?v=RCh3Q08HMfslist=PLA5E2FF8E143DA58C That is beyond sanity... I love it. Quite impressive what they can do with algorithmic

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-02 Thread Jacob Carlborg via Digitalmars-d
On 01/09/14 20:33, Dicebot wrote: Any reason why it can't work for OSX in a same way? Assuming LDC does emit ModuleInfo Co sections the same way it does on Linux, using OSX specific alternative to --gc-sections should just work. It does not emit these sections the same way, at least not on

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-02 Thread Dicebot via Digitalmars-d
On Tuesday, 2 September 2014 at 06:18:27 UTC, Jacob Carlborg wrote: On 01/09/14 20:33, Dicebot wrote: Any reason why it can't work for OSX in a same way? Assuming LDC does emit ModuleInfo Co sections the same way it does on Linux, using OSX specific alternative to --gc-sections should just

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-01 Thread Jacob Carlborg via Digitalmars-d
On 01/09/14 01:51, Abe wrote: The question: why is Hello World so frickin` huge?!? The runtime and standard library is statically linked, compared to C where it's dynamically linked. Also unnecessary symbols are not stripped. DMD on OS X doesn't currently support dynamic libraries. LDC has

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-01 Thread Dan Olson via Digitalmars-d
Jacob Carlborg d...@me.com writes: On 01/09/14 01:51, Abe wrote: The question: why is Hello World so frickin` huge?!? The runtime and standard library is statically linked, compared to C where it's dynamically linked. Also unnecessary symbols are not stripped. DMD on OS X doesn't currently

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-01 Thread Dicebot via Digitalmars-d
On Monday, 1 September 2014 at 17:23:03 UTC, Dan Olson wrote: Jacob Carlborg d...@me.com writes: On 01/09/14 01:51, Abe wrote: The question: why is Hello World so frickin` huge?!? The runtime and standard library is statically linked, compared to C where it's dynamically linked. Also

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-01 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-01 19:28, Dicebot wrote: This was supposed to be enabled by default in 0.14.0 (it is exactly what ld --gc-sections does). Probably some issue with ld argument wrapper for whatever lines OSX uses? It only works for Linux. -- /Jacob Carlborg

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-01 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-01 19:23, Dan Olson wrote: When I try -dead_strip with DMD, I get runtime SEGV with simple writeln hello world :-( It will probably clean out TLS, module info and similar data which is not reachable from the main function. -- /Jacob Carlborg

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-01 Thread Dicebot via Digitalmars-d
On Monday, 1 September 2014 at 17:46:11 UTC, Jacob Carlborg wrote: On 2014-09-01 19:28, Dicebot wrote: This was supposed to be enabled by default in 0.14.0 (it is exactly what ld --gc-sections does). Probably some issue with ld argument wrapper for whatever lines OSX uses? It only works

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-09-01 Thread David Nadlinger via Digitalmars-d
On Monday, 1 September 2014 at 18:33:44 UTC, Dicebot wrote: Any reason why it can't work for OSX in a same way? Assuming LDC does emit ModuleInfo Co sections the same way it does on Linux, using OSX specific alternative to --gc-sections should just work. The reason we don't enable the

why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-08-31 Thread Abe via Digitalmars-d
Dear all, Me: a very experienced computer programmer, a newbie to D. The test program: import std.stdio; void main() { writeln(hello world!); } The result: ls -l foo -rwxr-xr-x 1 Abe wheel 502064 Aug 31 18:47 foo file foo foo: Mach-O 64-bit executable

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-08-31 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 31 August 2014 at 23:51:41 UTC, Abe wrote: writeln(hello world!); The std.stdio package imports most the standard library, so using it means a lot of library code is linked into your executable too. About 200kb is the D runtime code and the rest is standard library code.