Re: NEW asm.dlang.org site

2015-01-27 Thread ZombineDev via Digitalmars-d-announce
Thanks for the good work! It would be really nice if in the 
future we could compare  DMD, GDC and LDC (and SDC when it 
becomes more usable) at asm.dlang.org. (Btw a nice choice of name 
:) )


I have a couple of questions about the output when looking at a 
C++[1] program and the same in GDC[2] and DMD[3](I am not very 
familiar with assembly):


1) Syntax:
AFAIU, (_D)main pushes 3 and 4 to the stack and calls 
(example.)add. Then (example.)add loads them from the stack in 
two registers and adds them.
IIRC, dmd passes parameters in reverse order (of the normal C 
way) and that's why pushing and loading 3 and 4 from the stack is 
in reverse order.


However why does DMD use hex instead of decimal notation?
[I was also a little confused about positive vs negative indexing 
of bp and the order of src and dst in the arguments to movl, but 
then I noticed that I am comparing x86 and x86_64, so I managed 
to answer those questions myself :D ]


2) _Dmain:
I also noticed that the output of gdc-4.4 and gdc-4.6 does not 
include a label for _Dmain (nor the regular C main). Is this a 
problem of the disassembly, or just how older version of GDC 
produced code?



[1]: http://goo.gl/mUQKiX (permalink at http://gcc.godbolt.org/)
[2]: http://goo.gl/CmYbrZ (permalink at http://explore.dgnu.org/)
[3]: http://goo.gl/ZHHVuZ (permalink at http://asm.dlang.org/)

On Monday, 26 January 2015 at 23:46:24 UTC, Iain Buclaw wrote:

Hi,

It is my pleasure to release a new site onto the community.  An 
Interactive DMD compiler.


http://asm.dlang.org/

Inspired by Matt Godbolt's GCC Explorer[1], and my own hosted 
version that uses GDC[2].  I was asked by Andrei to fork and 
make a working protoype that uses DMD.


All work is hosted on Github[3], and we are planning on moving 
it to part of the D-Programming-Language repositories.


Please share, contribute, and destroy!

Regards
Iain.

[1]: http://gcc.godbolt.org/
[2]: http://explore.dgnu.org/
[3]: https://github.com/ibuclaw/gcc-explorer/




Re: DlangUI

2015-01-27 Thread Gan via Digitalmars-d-announce

On Saturday, 14 June 2014 at 19:40:58 UTC, Jim Hewes wrote:
Very nice, thanks. I'm looking forward to trying it out when I 
can find the time. I'm not a big fan of bindings/wrappers.


Jim


This is looks fantastic. I tried the demo but I get an error:
SDL_GL_CreateContext failed: Failed creating OpenGL context

Running Mac OS 10.10.2 on 2011 Macbook Pro


Re: DlangUI

2015-01-27 Thread Dylan Allbee via Digitalmars-d-announce
Was pleasantly surprised to see that it worked without having to 
manually muck with any dependencies. Resource usage is minimal, 
interface feels smooth (though obviously ugly, but that isn't the 
point).


I can't wait until I have some extra free time to build something 
with this and hopefully contribute. Great work!


P.S. I noticed that it *almost* builds with gdc, but fails on 
freetype. Have you been attempting to target gdc at all for those 
performance gains?


Re: NEW asm.dlang.org site

2015-01-27 Thread Iain Buclaw via Digitalmars-d-announce
On 27 January 2015 at 12:53, ZombineDev via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
 Thanks for the good work! It would be really nice if in the future we could
 compare  DMD, GDC and LDC (and SDC when it becomes more usable) at
 asm.dlang.org. (Btw a nice choice of name :) )

 I have a couple of questions about the output when looking at a C++[1]
 program and the same in GDC[2] and DMD[3](I am not very familiar with
 assembly):

 1) Syntax:
 AFAIU, (_D)main pushes 3 and 4 to the stack and calls (example.)add. Then
 (example.)add loads them from the stack in two registers and adds them.
 IIRC, dmd passes parameters in reverse order (of the normal C way) and
 that's why pushing and loading 3 and 4 from the stack is in reverse order.


That is correct

 However why does DMD use hex instead of decimal notation?
 [I was also a little confused about positive vs negative indexing of bp and
 the order of src and dst in the arguments to movl, but then I noticed that I
 am comparing x86 and x86_64, so I managed to answer those questions myself
 :D ]

Because GCC and GDC dumps are raw assembly.  Whereas with DMD I had to
disassemble from object code (using obbjdump).  This is an
implementation detail really of how DMD works vs GCC backend.



 2) _Dmain:
 I also noticed that the output of gdc-4.4 and gdc-4.6 does not include a
 label for _Dmain (nor the regular C main). Is this a problem of the
 disassembly, or just how older version of GDC produced code?


GCC-Explorer thinks _Dmain is a label, and sees that it is unused (not
called from anywhere).  So it removes it.  In later versions of GDC, a
C main function is included in the compilation, and so now references
_Dmain.

I guess this is a bug in GCC Explorer itself that will need to be
addressed somehow.


Iain.


Re: NEW asm.dlang.org site

2015-01-27 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 1/26/15 3:46 PM, Iain Buclaw wrote:

Hi,

It is my pleasure to release a new site onto the community.  An
Interactive DMD compiler.

http://asm.dlang.org/


Someone found it: 
https://www.reddit.com/r/programming/comments/2tukc6/online_disassembler_for_d_paste_code_see/


Andrei



Re: DlangUI

2015-01-27 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 27 January 2015 at 19:37:44 UTC, Gan wrote:

On Saturday, 14 June 2014 at 19:40:58 UTC, Jim Hewes wrote:
Very nice, thanks. I'm looking forward to trying it out when I 
can find the time. I'm not a big fan of bindings/wrappers.


Jim


This is looks fantastic. I tried the demo but I get an error:
SDL_GL_CreateContext failed: Failed creating OpenGL context

Running Mac OS 10.10.2 on 2011 Macbook Pro


Never tried it on mac.
I believe, if OpenGL context cannot be created, DlangUI SDL 
backend should switch to bare SDL (sw renderer).

I would rather expect that app crashes on missing fonts.
Linux (and mac) font paths are hardcoded. Where are .ttf files 
located on macos? Fast and dirty fix is possible - add paths for 
a few mac fonts.

Could you please share startup logs?

As well, you can try to build w/o OpenGL - clone repository and 
remove USE_OPENGL version from dub.json


Re: Travis-CI support for D

2015-01-27 Thread Brad Roberts via Digitalmars-d-announce

On 12/11/2014 3:16 AM, Martin Nowak via Digitalmars-d-announce wrote:

On Thursday, 11 December 2014 at 07:40:14 UTC, Andrej Mitrovic via
Digitalmars-d-announce wrote:

On 12/11/14, Martin Nowak via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

Glad to announce that D support on Travis-CI was launched today.

http://blog.travis-ci.com/2014-12-10-community-driven-language-support-comes-to-travis-ci/



Awesome!!

Btw, I've noticed this command in the log file of a Travis run:
$ curl http://downloads.dlang.org/releases/2014/dmd.2.066.1.linux.zip

~/dmd.zip


It seems a bit of a waste of bandwidth to re-download the release for
each run?


Indeed, and we'll have to see how that works. Easiest solution would be
to add a caching proxy on either side (incapsula?). We could also come
up with some chef recipes to preinstall a bunch of compilers on certain
worker boxes.


For the last 30 days, travis represents about 2.5% of all downloads (1k 
of 40k).  So, not horrible, but could also be a whole lot less (down 
from 1k to 74 based on January's data) if it were cached on each host.


Re: Travis-CI support for D

2015-01-27 Thread Paul O'Neil via Digitalmars-d-announce
On 01/27/2015 09:52 PM, Brad Roberts via Digitalmars-d-announce wrote:
 On 12/11/2014 3:16 AM, Martin Nowak via Digitalmars-d-announce wrote:
 On Thursday, 11 December 2014 at 07:40:14 UTC, Andrej Mitrovic via
 Digitalmars-d-announce wrote:
 On 12/11/14, Martin Nowak via Digitalmars-d-announce
 digitalmars-d-announce@puremagic.com wrote:
 Glad to announce that D support on Travis-CI was launched today.

 http://blog.travis-ci.com/2014-12-10-community-driven-language-support-comes-to-travis-ci/



 Awesome!!

 Btw, I've noticed this command in the log file of a Travis run:
 $ curl http://downloads.dlang.org/releases/2014/dmd.2.066.1.linux.zip
 ~/dmd.zip

 It seems a bit of a waste of bandwidth to re-download the release for
 each run?

 Indeed, and we'll have to see how that works. Easiest solution would be
 to add a caching proxy on either side (incapsula?). We could also come
 up with some chef recipes to preinstall a bunch of compilers on certain
 worker boxes.
 
 For the last 30 days, travis represents about 2.5% of all downloads (1k
 of 40k).  So, not horrible, but could also be a whole lot less (down
 from 1k to 74 based on January's data) if it were cached on each host.

I tried to use Travis a few weeks ago, but it's still on Ubuntu 12.04,
so even though there is DMD 2.066.1, I can't get the other things I need.

-- 
Paul O'Neil
Github / IRC: todayman