Hello World

2017-08-22 Thread Roffi Ulwn via Digitalmars-d
import std.stdio; void main(char[][] args) { writefln("Hello World"); }

hello world in D

2013-05-31 Thread khurshid
I just download dmd 2.063, and compile simple "hello world" program: // hello.d import std.stdio; int main() { writeln("hello world"); return 0; } with -O -release -inline -noboundscheck flags. And size of result output file 'hello' equal to 1004.1 Kb

hello world executable size

2015-06-25 Thread Joakim via Digitalmars-d
I was curious if binary sizes had decreased because of the changes Ilya had been making to try and scope imports better and make them more selective: https://github.com/D-Programming-Language/phobos/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3A9il+clean Hello world (void main(){ import std.s

Re: hello world in D

2013-05-31 Thread Adam D. Ruppe
tandard library they use with them. That 195K test2 program is mostly druntime's code. If you pull in std.stdio it also grabs much of the phobos standard library to support printing, conversion of numbers to strings, and much more. A 1 MB hello world is just strange though, I'm sure

Re: hello world in D

2013-05-31 Thread Regan Heath
On Fri, 31 May 2013 15:33:46 +0100, khurshid wrote: I just download dmd 2.063, and compile simple "hello world" program: // hello.d import std.stdio; int main() { writeln("hello world"); return 0; } with -O -release -inline -noboundscheck flags. And size o

Re: hello world in D

2013-05-31 Thread khurshid
On Friday, 31 May 2013 at 14:48:02 UTC, Adam D. Ruppe wrote: If you use printf instead of std.stdio, you'll save about 150 KB in the executable import core.stdc.stdio; void main() { printf("hello\n"); } $ dmd test2.d $ ls -lh test2 -rwxr-xr-x 1 me users 287K 2013-05-31 10:40 test2 $

Re: hello world in D

2013-05-31 Thread Adam D. Ruppe
On Friday, 31 May 2013 at 14:48:12 UTC, Regan Heath wrote: You will get a similar size (or greater) if you statically link the stdc library. That's not necessarily true because static linking only pulls functions that are actually used by the program even though I just tried gcc hello.c

Re: hello world in D

2013-05-31 Thread Regan Heath
On Fri, 31 May 2013 16:00:00 +0100, Adam D. Ruppe wrote: On Friday, 31 May 2013 at 14:48:12 UTC, Regan Heath wrote: You will get a similar size (or greater) if you statically link the stdc library. That's not necessarily true because static linking only pulls functions that are actually

Re: hello world in D

2013-05-31 Thread Adam D. Ruppe
On Friday, 31 May 2013 at 14:56:17 UTC, khurshid wrote: i.e. 299 Kbyte. yeah it varies a bit by computer and 32 bit vs 64 bit etc, but same ballpark. Why copyright 2012 not a 2013? Walter probably just forgot to update the message.

Re: hello world in D

2013-05-31 Thread Adam D. Ruppe
On Friday, 31 May 2013 at 15:03:58 UTC, Regan Heath wrote: It is a bit surprising isn't it. Aye. BTW if you want to get into really small, statically linked D programs, you can do a custom druntime, no phobos, no C lib, with just the code you want. I recently wrote about a toy I've been pla

Re: hello world in D

2013-05-31 Thread Craig Dillabaugh
Under 40 kilobytes! If you do the bare minimum you can get down to about 1 KB, but at that point, you're actually writing in mostly (inline) assembly rather than D. The code in the link though supports a majority (though certainly not all) of D's features. Agreed 100%. But newcomers don't

Re: hello world in D

2013-05-31 Thread Rob T
I've seen this happen with 2.062, if you take out -noboundscheck it may reduce the size significantly and compile a lot faster. Makes no sense. --rt

Re: hello world in D

2013-05-31 Thread Adam D. Ruppe
On Friday, 31 May 2013 at 15:58:12 UTC, Craig Dillabaugh wrote: Do you really think that is such a big issue? I can't remember the last time I looked at the size of an executable I generated. There's three cases where I sometimes care: 1) if I build the program on my computer, then push it to

Re: hello world in D

2013-05-31 Thread Brad Anderson
On Friday, 31 May 2013 at 14:56:17 UTC, khurshid wrote: [snip] Even, when I type dmd -v : DMD32 D Compiler v2.063 Copyright (c) 1999-2012 by Digital Mars written by Walter Bright Documentation: http://dlang.org/ - Why copyright 2012 not a 2013? Fixed

Re: hello world in D

2013-05-31 Thread Regan Heath
On Fri, 31 May 2013 16:58:11 +0100, Craig Dillabaugh wrote: Under 40 kilobytes! If you do the bare minimum you can get down to about 1 KB, but at that point, you're actually writing in mostly (inline) assembly rather than D. The code in the link though supports a majority (though certa

Re: hello world in D

2013-05-31 Thread Joseph Rushton Wakeling
On 05/31/2013 06:34 PM, Brad Anderson wrote: > On Friday, 31 May 2013 at 14:56:17 UTC, khurshid wrote: >> Why copyright 2012 not a 2013? > > Fixed in git. Is this not something where some clever CTFE could be used to swipe the date of build and insert the correct year? :-P

Re: hello world in D

2013-05-31 Thread Jonathan M Davis
On Friday, May 31, 2013 18:05:16 Rob T wrote: > I've seen this happen with 2.062, if you take out -noboundscheck > it may reduce the size significantly and compile a lot faster. > Makes no sense. My first guess would be that more ends up being inlined with -noboundscheck due to the differences in

Re: hello world in D

2013-05-31 Thread Andrei Alexandrescu
On 5/31/13 12:48 PM, Joseph Rushton Wakeling wrote: On 05/31/2013 06:34 PM, Brad Anderson wrote: On Friday, 31 May 2013 at 14:56:17 UTC, khurshid wrote: Why copyright 2012 not a 2013? Fixed in git. Is this not something where some clever CTFE could be used to swipe the date of build and in

Re: hello world in D

2013-05-31 Thread deadalnix
On Friday, 31 May 2013 at 16:31:42 UTC, Regan Heath wrote: On Fri, 31 May 2013 16:58:11 +0100, Craig Dillabaugh wrote: Under 40 kilobytes! If you do the bare minimum you can get down to about 1 KB, but at that point, you're actually writing in mostly (inline) assembly rather than D. The co

Re: hello world in D

2013-05-31 Thread Rob T
On Friday, 31 May 2013 at 16:52:53 UTC, Jonathan M Davis wrote: On Friday, May 31, 2013 18:05:16 Rob T wrote: I've seen this happen with 2.062, if you take out -noboundscheck it may reduce the size significantly and compile a lot faster. Makes no sense. My first guess would be that more ends

Re: hello world in D

2013-05-31 Thread Marco Leise
Am Fri, 31 May 2013 17:58:11 +0200 schrieb "Craig Dillabaugh" : > Do you really think that is such a big issue? I can't remember > the last time I looked at the size of an executable I generated. > When I am trying to learn a new language it is really not > something I think of as a major issue.

Re: hello world in D

2013-05-31 Thread Marco Leise
Am Fri, 31 May 2013 13:14:48 -0400 schrieb Andrei Alexandrescu : > On 5/31/13 12:48 PM, Joseph Rushton Wakeling wrote: > > On 05/31/2013 06:34 PM, Brad Anderson wrote: > >> On Friday, 31 May 2013 at 14:56:17 UTC, khurshid wrote: > >>> Why copyright 2012 not a 2013? > >> > >> Fixed in git. > > > >

Re: hello world in D

2013-06-01 Thread Paulo Pinto
Am 31.05.2013 19:21, schrieb Rob T: On Friday, 31 May 2013 at 16:52:53 UTC, Jonathan M Davis wrote: On Friday, May 31, 2013 18:05:16 Rob T wrote: I've seen this happen with 2.062, if you take out -noboundscheck it may reduce the size significantly and compile a lot faster. Makes no sense. My

Re: hello world in D

2013-06-01 Thread Paulo Pinto
Am 31.05.2013 19:19, schrieb deadalnix: On Friday, 31 May 2013 at 16:31:42 UTC, Regan Heath wrote: On Fri, 31 May 2013 16:58:11 +0100, Craig Dillabaugh wrote: Under 40 kilobytes! If you do the bare minimum you can get down to about 1 KB, but at that point, you're actually writing in mostly (

Re: hello world in D

2013-06-01 Thread SomeDude
On Friday, 31 May 2013 at 16:31:42 UTC, Regan Heath wrote: Do you really think that is such a big issue? Not really an issue, no. But newcomers keep creating threads like this one time and again and who knows how many have been turned away without finding out the whys and wherefores. R

Re: hello world in D

2013-06-01 Thread Rob T
On Friday, 31 May 2013 at 14:33:48 UTC, khurshid wrote: I just download dmd 2.063, and compile simple "hello world" program: // hello.d import std.stdio; int main() { writeln("hello world"); return 0; } with -O -release -inline -noboundscheck flags. And size o

Re: hello world executable size

2015-06-25 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 25 June 2015 at 11:05:00 UTC, Joakim wrote: I was curious if binary sizes had decreased because of the changes Ilya had been making to try and scope imports better and make them more selective: http://digger.k3.1azy.net/trend/ I used nm to try and find some of the symbols using t

Re: hello world executable size

2015-06-25 Thread Joakim via Digitalmars-d
On Thursday, 25 June 2015 at 11:07:11 UTC, Vladimir Panteleev wrote: On Thursday, 25 June 2015 at 11:05:00 UTC, Joakim wrote: I was curious if binary sizes had decreased because of the changes Ilya had been making to try and scope imports better and make them more selective: http://digger.k3.

Re: hello world executable size

2015-06-25 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 25 June 2015 at 11:59:24 UTC, Joakim wrote: On Thursday, 25 June 2015 at 11:07:11 UTC, Vladimir Panteleev wrote: On Thursday, 25 June 2015 at 11:05:00 UTC, Joakim wrote: I was curious if binary sizes had decreased because of the changes Ilya had been making to try and scope imports

Re: hello world executable size

2015-06-25 Thread Joakim via Digitalmars-d
: http://wiki.dlang.org/Development_tools#File_size_profiling Looks nice: http://thecybershadow.net/d/mapview/view.php?id=558bef76234eb Surprising that core.* and gc.* are almost as large as std.*, but I guess "hello world" isn't going to exercise that much of phobos. :)

Re: hello world executable size

2015-06-28 Thread Joakim via Digitalmars-d
On Thursday, 25 June 2015 at 12:15:26 UTC, Joakim wrote: On Thursday, 25 June 2015 at 12:04:26 UTC, Vladimir Panteleev wrote: On Thursday, 25 June 2015 at 11:59:24 UTC, Joakim wrote: Took 90 MiB of JSON to see it, but finally got it, funny how executable size swings wildly up to five times larg

Re: hello world executable size

2015-06-28 Thread rsw0x via Digitalmars-d
://digger.k3.1azy.net/trend/ looks like this commit more than doubled the size of hello world https://github.com/D-Programming-Language/phobos/pull/3443

Re: hello world executable size

2015-06-28 Thread Vladimir Panteleev via Digitalmars-d
better and make them more selective: http://digger.k3.1azy.net/trend/ looks like this commit more than doubled the size of hello world https://github.com/D-Programming-Language/phobos/pull/3443 Woah. Why would removing an import increase the filesize?

Re: hello world executable size

2015-06-28 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 28 June 2015 at 09:27:56 UTC, Joakim wrote: Another check that would be more worthwhile but harder to measure would be speed of compilation of druntime/phobos, especially since speed of compilation is considered a key selling point of D. Harder to measure because it depends on what

Re: hello world executable size

2015-06-28 Thread Joakim via Digitalmars-d
On Sunday, 28 June 2015 at 09:55:53 UTC, Vladimir Panteleev wrote: On Sunday, 28 June 2015 at 09:46:45 UTC, rsw0x wrote: looks like this commit more than doubled the size of hello world https://github.com/D-Programming-Language/phobos/pull/3443 Woah. Why would removing an import increase

Re: hello world executable size

2015-06-28 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 28 June 2015 at 10:06:20 UTC, Joakim wrote: On Sunday, 28 June 2015 at 09:55:53 UTC, Vladimir Panteleev wrote: On Sunday, 28 June 2015 at 09:46:45 UTC, rsw0x wrote: looks like this commit more than doubled the size of hello world https://github.com/D-Programming-Language/phobos

Re: hello world executable size

2015-06-28 Thread rsw0x via Digitalmars-d
On Sunday, 28 June 2015 at 10:06:20 UTC, Joakim wrote: On Sunday, 28 June 2015 at 09:55:53 UTC, Vladimir Panteleev wrote: On Sunday, 28 June 2015 at 09:46:45 UTC, rsw0x wrote: looks like this commit more than doubled the size of hello world https://github.com/D-Programming-Language/phobos

Re: hello world executable size

2015-06-28 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 28 June 2015 at 10:37:15 UTC, Joakim wrote: On Sunday, 28 June 2015 at 10:11:08 UTC, Vladimir Panteleev wrote: No, he's right. Removing the import doubled the filesize of a helloworld binary. Ah, I didn't want to download the full 90 MBs graph data again to see it. Yes, I see it n

Re: hello world executable size

2015-06-28 Thread Joakim via Digitalmars-d
On Sunday, 28 June 2015 at 10:11:08 UTC, Vladimir Panteleev wrote: No, he's right. Removing the import doubled the filesize of a helloworld binary. Ah, I didn't want to download the full 90 MBs graph data again to see it. Yes, I see it now. On Sunday, 28 June 2015 at 09:58:35 UTC, Vladimir

Linking fails on Hello World?!

2010-03-25 Thread qwesx
Hello! I just installed LDC on Debian from the repository and tried out to compile a simple Hello World program: > import tango.io.Stdout; > int main(char[][] argv) { > Stdout("Hello world!"); > return 0; > } Looks simlpe enough, but when running "ldc main.d&qu

Trouble with Cortex-M "Hello World"

2015-03-31 Thread Jens Bauer via Digitalmars-d
Encouraged by Timo Sintonen's great posts, I decided to spend some time trying to build a Cortex-M toolchain for D-programming. So this morning, I've successfully built my first toolchain supporting C, C++ and D for the first time. I wanted to take the new language out for a spin, but I ran into

Re: Linking fails on Hello World?!

2010-03-25 Thread Robert Clipsham
On 25/03/10 15:02, qwesx wrote: Hello! I just installed LDC on Debian from the repository and tried out to compile a simple Hello World program: import tango.io.Stdout; int main(char[][] argv) { Stdout("Hello world!"); return 0; } Looks simlpe enough, but when running "

Re: Linking fails on Hello World?!

2010-03-25 Thread qwesx
Robert Clipsham Wrote: > Try this: > $ ldc -L-L/usr/lib/d -L-ltango-base-ldc -L-ltango-user-ldc main.d > > If that works you need to make sure these -L's are included in yout > ldc.conf (I'm not sure where this is in the debian packages, probably > /etc/ldc.conf, /etc/ldc/ldc.conf or /usr/bin/l

Re: Linking fails on Hello World?!

2010-03-25 Thread Robert Clipsham
On 25/03/10 15:34, qwesx wrote: Robert Clipsham Wrote: Try this: $ ldc -L-L/usr/lib/d -L-ltango-base-ldc -L-ltango-user-ldc main.d If that works you need to make sure these -L's are included in yout ldc.conf (I'm not sure where this is in the debian packages, probably /etc/ldc.conf, /etc/ldc/l

Re: Linking fails on Hello World?!

2010-03-25 Thread Moritz Warning
On Thu, 25 Mar 2010 11:34:15 -0400, qwesx wrote: > Robert Clipsham Wrote: > >> Try this: >> $ ldc -L-L/usr/lib/d -L-ltango-base-ldc -L-ltango-user-ldc main.d >> >> If that works you need to make sure these -L's are included in yout >> ldc.conf (I'm not sure where this is in the debian packages,

Re: Trouble with Cortex-M "Hello World"

2015-03-31 Thread Jens Bauer via Digitalmars-d
(I just found out that I should probably have posted this in the digitalmars.D.learn forum instead, sorry for the inconvenience)

Re: Trouble with Cortex-M "Hello World"

2015-03-31 Thread Jens Bauer via Digitalmars-d
I belive the following information is slightly incorrect: "GDC requires the following minimal object.d file in the same folder as start.d. It is imported automatically." My tests have shown that object.d needs to be in the CWD, not in the same directory as "start.d". This is my command-line:

Re: Trouble with Cortex-M "Hello World"

2015-03-31 Thread Mike via Digitalmars-d
On Tuesday, 31 March 2015 at 10:39:05 UTC, Jens Bauer wrote: Referring to the tutorial on this page: -I'm getting the following error: start.d:45:11: error: mismatched array lengths, 0 and 3 uint[3] message =

Re: Trouble with Cortex-M "Hello World"

2015-03-31 Thread Mike via Digitalmars-d
On Tuesday, 31 March 2015 at 11:19:29 UTC, Jens Bauer wrote: I belive the following information is slightly incorrect: "GDC requires the following minimal object.d file in the same folder as start.d. It is imported automatically." My tests have shown that object.d needs to be in the CWD, not

Re: Trouble with Cortex-M "Hello World"

2015-03-31 Thread Dan Olson via Digitalmars-d
"Mike" writes: > On Tuesday, 31 March 2015 at 10:39:05 UTC, Jens Bauer wrote: > >> Referring to the tutorial on this page: >> >> >> -I'm getting the following error: >> >> start.d:45:11: error: mismatched array lengths, 0 a

Re: Trouble with Cortex-M "Hello World"

2015-03-31 Thread Jens Bauer via Digitalmars-d
On Tuesday, 31 March 2015 at 15:50:17 UTC, Dan Olson wrote: "Mike" writes: I just cut and pasted the code from the wiki myself and compiled with my arm-none-eabi-gdc cross-compiler and it works fine. I'm sorry, but I'm not sure what the problem could be. Mike Yeah, something strange. The

Re: Trouble with Cortex-M "Hello World"

2015-04-01 Thread Jens Bauer via Digitalmars-d
Unfortunately, my attempt to build GDC on my CubieBoard2 failed. However, I decided to change the line slightly, in order to find out exactly what's going wrong... src/start.d:46:12: error: mismatched array lengths, 0 and 3 uint[4]message=[2,cast(uint)"hello\r\n".ptr,7]; ^ ma

Re: Trouble with Cortex-M "Hello World"

2015-04-01 Thread Johannes Pfau via Digitalmars-d
Am Wed, 01 Apr 2015 12:56:22 + schrieb "Jens Bauer" : > Unfortunately, my attempt to build GDC on my CubieBoard2 failed. > > However, I decided to change the line slightly, in order to find > out exactly what's going wrong... > > > src/start.d:46:12: error: mismatched array lengths, 0 and

Re: Trouble with Cortex-M "Hello World"

2015-04-01 Thread Jens Bauer via Digitalmars-d
On Wednesday, 1 April 2015 at 13:59:34 UTC, Johannes Pfau wrote: Am Wed, 01 Apr 2015 12:56:22 + It could be an endianess issue somewhere in the code. I debugged a misaligned-access bug in the frontend some time ago, bugs like these can result in the weirdest effects. Indeed. I had some st

Re: Trouble with Cortex-M "Hello World"

2015-04-01 Thread Jens Bauer via Digitalmars-d
I have successfully built GDC on CubieBoard2 (Cubian) now. I've rebuilt GDC on the G5 as well, using the same script. I've used nano for making object.d and start.d, in order to avoid too many problems with character encoding. In addition, I've used hexdump -C .d to verify that the text-files a

Re: Trouble with Cortex-M "Hello World"

2015-04-02 Thread Mike via Digitalmars-d
On Thursday, 2 April 2015 at 05:55:52 UTC, Jens Bauer wrote: So are there any suggestions on enabling debug-code, which might give hints on what is going wrong ? You can find information on debugging GDC here: http://wiki.dlang.org/GDC/Development/DevelopmentEnvironment Mike

Re: Trouble with Cortex-M "Hello World"

2015-04-02 Thread Johannes Pfau via Digitalmars-d
Am Thu, 02 Apr 2015 05:55:48 + schrieb "Jens Bauer" : > > So are there any suggestions on enabling debug-code, which might > give hints on what is going wrong ? I'm not sure if there's any debug code, but here's what I would do: /opt/gdc/bin/gdc test.d -c -wrapper gdb,--args break express

Re: Trouble with Cortex-M "Hello World"

2015-04-02 Thread Jens Bauer via Digitalmars-d
So are there any suggestions on enabling debug-code, which might give hints on what is going wrong ? I'm not sure if there's any debug code, but here's what I would do [snip] Mike and Johannes - Thank you both for the suggestions. I will follow the debug path you've given me when I've finishe

Re: Trouble with Cortex-M "Hello World"

2015-04-02 Thread Jens Bauer via Digitalmars-d
I got a little further, and will continue to look into the issue. Currently, this is what I've gotten so far... arm-none-eabi-gdc start.d -c -wrapper gdb,--args break expression.c:11707 break expression.c:11570 break init.c:1015 break init.c:557 run ... Breakpoint 1, AssignExp::semantic (this=

Re: Trouble with Cortex-M "Hello World"

2015-04-02 Thread Daniel Murphy via Digitalmars-d
"Jens Bauer" wrote in message news:gufvwhyvuyuhhkgdy...@forum.dlang.org... I expect to get more information about this, and of course, I hope to find what causes the bug. When my next build is finished, I plan to add a zero in front of the number 3: uint[03] message = ... just in case it's a

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
Well, it seems I found the problem. lexer.h, line 203 reads: union { d_int32 int32value; d_uns32 uns32value; d_int64 int64value; d_uns64 uns64value; ... ... ... }; While this optimization is neat, it does not produce correct co

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
I better also mention that the problem is the same for floats in Lexer::inreal(Token *).

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
On Friday, 3 April 2015 at 08:06:03 UTC, Jens Bauer wrote: I better also mention that the problem is the same for floats in Lexer::inreal(Token *). Ignore that - it's always read/written as a long double. Sorry for then noise.

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Johannes Pfau via Digitalmars-d
Am Fri, 03 Apr 2015 07:32:21 + schrieb "Jens Bauer" : > Well, it seems I found the problem. > > lexer.h, line 203 reads: > > union > { > d_int32 int32value; > d_uns32 uns32value; > d_int64 int64value; > d_uns64 uns64value; > ... >

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Daniel Murphy via Digitalmars-d
"Jens Bauer" wrote in message news:ckqcspcptqazbawds...@forum.dlang.org... Well, it seems I found the problem. lexer.h, line 203 reads: Yeah, I thought it might be that. Looking for union-"tricks", I also found ... stringtable.c:24 hash will not be the same value on Big Endian, Mixed Endi

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
On Friday, 3 April 2015 at 10:32:39 UTC, Daniel Murphy wrote: It doesn't matter for this hash table. Alright - if there's no major difference in performance, then it won't matter (Johannes mentioned that it's only used internally). I've sent an email to Johannes regarding the patch - because

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Kai Nacke via Digitalmars-d
On Wednesday, 1 April 2015 at 13:59:34 UTC, Johannes Pfau wrote: I'm not sure if anybody ever used GDC/DMD/LDC on a big-endian system. LDC is endian-clean. I used LDC on big-endian Linux/PPC64. Regards, Kai

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
On Friday, 3 April 2015 at 14:22:43 UTC, Kai Nacke wrote: On Wednesday, 1 April 2015 at 13:59:34 UTC, Johannes Pfau wrote: I'm not sure if anybody ever used GDC/DMD/LDC on a big-endian system. LDC is endian-clean. I used LDC on big-endian Linux/PPC64. Unfortunately, I can't b uild LLVM on my

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread John Colvin via Digitalmars-d
On Friday, 3 April 2015 at 14:39:35 UTC, Jens Bauer wrote: On Friday, 3 April 2015 at 14:22:43 UTC, Kai Nacke wrote: On Wednesday, 1 April 2015 at 13:59:34 UTC, Johannes Pfau wrote: I'm not sure if anybody ever used GDC/DMD/LDC on a big-endian system. LDC is endian-clean. I used LDC on big-en

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Iain Buclaw via Digitalmars-d
On 3 April 2015 at 17:05, John Colvin via Digitalmars-d wrote: > On Friday, 3 April 2015 at 14:39:35 UTC, Jens Bauer wrote: >> >> On Friday, 3 April 2015 at 14:22:43 UTC, Kai Nacke wrote: >>> >>> On Wednesday, 1 April 2015 at 13:59:34 UTC, Johannes Pfau wrote: I'm not sure if anybody eve

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread David Nadlinger via Digitalmars-d
On Friday, 3 April 2015 at 14:39:35 UTC, Jens Bauer wrote: Unfortunately, I can't b uild LLVM on my PowerMac. :/ Why would that be so? — David

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread David Nadlinger via Digitalmars-d
On Friday, 3 April 2015 at 15:39:33 UTC, Iain Buclaw wrote: That's a bit greedy of them to not upstream fixes. >:-) Some of the fixes use LLVM libraries, so there is not much point in upstreaming that. ;) – David

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Iain Buclaw via Digitalmars-d
On 3 April 2015 at 17:40, David Nadlinger via Digitalmars-d wrote: > On Friday, 3 April 2015 at 15:39:33 UTC, Iain Buclaw wrote: >> >> That's a bit greedy of them to not upstream fixes. >:-) > > > Some of the fixes use LLVM libraries, so there is not much point in > upstreaming that. ;) > > – Dav

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
On Friday, 3 April 2015 at 15:41:34 UTC, David Nadlinger wrote: On Friday, 3 April 2015 at 14:39:35 UTC, Jens Bauer wrote: Unfortunately, I can't b uild LLVM on my PowerMac. :/ Why would that be so? Basically because it requires GCC > 4.2 - but unfortunately there's more. Once upon a time,

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Iain Buclaw via Digitalmars-d
On 3 April 2015 at 17:58, Jens Bauer via Digitalmars-d wrote: > On Friday, 3 April 2015 at 15:41:34 UTC, David Nadlinger wrote: >> >> On Friday, 3 April 2015 at 14:39:35 UTC, Jens Bauer wrote: >>> >>> Unfortunately, I can't b uild LLVM on my PowerMac. :/ >> >> >> Why would that be so? > > > Basica

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread David Nadlinger via Digitalmars-d
On Friday, 3 April 2015 at 15:58:03 UTC, Jens Bauer wrote: Basically because it requires GCC > 4.2 - but unfortunately there's more. Once upon a time, LLVM did support being built with GCC 4.2, but I can't get those sources anymore, so I can't get a 'bootstrap LLVM' that way. Can't you just b

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
On Friday, 3 April 2015 at 16:11:59 UTC, Iain Buclaw wrote: On 3 April 2015 at 17:58, Jens Bauer via Digitalmars-d Basically because it requires GCC > 4.2 - but unfortunately there's more. Once upon a time, LLVM did support being built with GCC 4.2, but I can't get those sources anymore, so I c

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
On Friday, 3 April 2015 at 16:39:40 UTC, David Nadlinger wrote: On Friday, 3 April 2015 at 15:58:03 UTC, Jens Bauer wrote: Basically because it requires GCC > 4.2 - but unfortunately there's more. Once upon a time, LLVM did support being built with GCC 4.2, but I can't get those sources anymore

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread John Colvin via Digitalmars-d
On Friday, 3 April 2015 at 15:58:03 UTC, Jens Bauer wrote: On Friday, 3 April 2015 at 15:41:34 UTC, David Nadlinger wrote: On Friday, 3 April 2015 at 14:39:35 UTC, Jens Bauer wrote: Unfortunately, I can't b uild LLVM on my PowerMac. :/ Why would that be so? Basically because it requires GCC

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Jens Bauer via Digitalmars-d
On Friday, 3 April 2015 at 17:05:28 UTC, John Colvin wrote: There is universal binary of LLVM 2.1 with clang (llvm-gcc back then I think) available here: http://llvm.org/releases/2.1/llvm-llvm-gcc4.0-2.1-darwin-univ.tar.gz Thank you so much; I'll try it immediately. I don't know why I haven't

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Kai Nacke via Digitalmars-d
On Friday, 3 April 2015 at 15:39:33 UTC, Iain Buclaw wrote: That's a bit greedy of them to not upstream fixes. >:-) I don't know why this change was not upstreamed - it's from 2012! BTW: There are some places in constfold.c and ctfeexpr.c which are also not endian-clean. And also not upstream

Re: Trouble with Cortex-M "Hello World"

2015-04-03 Thread Iain Buclaw via Digitalmars-d
On 4 April 2015 at 01:17, Kai Nacke via Digitalmars-d wrote: > On Friday, 3 April 2015 at 15:39:33 UTC, Iain Buclaw wrote: >> >> That's a bit greedy of them to not upstream fixes. >:-) > > > I don't know why this change was not upstreamed - it's from 2012! > > BTW: There are some places in constfo

Want to start a graphical Hello world.

2018-01-20 Thread MHE via Digitalmars-d
Hi there , i have this code : import gtk.MainWindow, gtk.Label, gtk.Main; class GoodbyeWorld : MainWindow { this() { super("GtkD"); add(new Label("Goodbye World")); showAll(); } } void main(string[] args) { Ma

Hello World crashes on OS X 10.6.1

2009-10-31 Thread asd
import std.stdio; void main() { writef("Hello world\n"); } dmd -run test.d gives: Process: test [1703] Path:/Users/username/Desktop/test Identifier: test Version: ??? (???) Code Type: X86 (Native) Parent Process: dmd [1698]

Re: Want to start a graphical Hello world.

2018-01-20 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 January 2018 at 04:16:10 UTC, MHE wrote: $ dmd hw_graphical.d You need to link in and tell the compiler where to find the library. Tru dmd -I/usr/local/GIT/whatever hw_graphical.d -L-lgtk and whatever else the library does. I haven't used gtkd so I don't know the exact thing

Re: Want to start a graphical Hello world.

2018-01-20 Thread Matthias Klumpp via Digitalmars-d
On Sunday, 21 January 2018 at 04:16:10 UTC, MHE wrote: [...] For this i have made a folder named GIT in the linux directory /usr/local/GIT And Gitcloned in the GIT folder : git clone https://github.com/nomad-software/x11 git clone https://github.com/nomad-software/tcltk.git The clones are now i

Re: Hello World crashes on OS X 10.6.1

2009-10-31 Thread asd
forgot to add it's freshly downloaded dmd v2.035.

Re: Hello World crashes on OS X 10.6.1

2009-10-31 Thread Jason House
rote: > import std.stdio; > > > void main() > { > writef("Hello world\n"); > } > > > dmd -run test.d gives: > > Process: test [1703] > Path:/Users/username/Desktop/test > Identifier: test > Version: ??? (?

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 fo

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.

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

2014-08-31 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

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 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.

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 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 unnece

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 for

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 -de

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 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-05 Thread Marco Leise via Digitalmars-d
ing up the .so version) the file size is: 48 KiB !!! after `strip main` it comes down to: 34 KiB !!! 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. -- Marco

  1   2   >