October 22, 2015
On Thursday, 22 October 2015 at 06:28:06 UTC, Suliman wrote:
> Does it's mean, that Calypso can be work as plugin for Clang?

As a LDC plugin, so that LDC doesn't depend on Clang.

On Thursday, 22 October 2015 at 15:22:16 UTC, Szymon Gatner wrote:
> Wow, this is fantastic. What about Windows and iOS support?

MSVC hasn't been tested since 5 months ago. Calypso built by MSVC compiles basic examples but last time we tried none of the C++ standard lib test cases worked. Maybe it's better now that the template support is more robust but I've postponed work on MSVC until LDC 0.16 which includes the Win64 work by kinke.

The MingW x86 build works better and compiles most libstdc++ samples but hasn't been tested much either.

I'll come back to MSVC after improving the C++11 support, because one Achilles' heel of Calypso is currently whenever template argument deduction is involved and both MSVC's standard lib and C++11-enabled GNU libstdc++ makes heavy usage of template argument deduction. It's because Calypso relies on a hack that doesn't handle every case yet, although the situation has improved a lot and it works well enough to handle some Boost libraries.
October 22, 2015
On Thursday, 22 October 2015 at 18:02:08 UTC, Kagamin wrote:
> Cool, is that a value type QString? Really? Then functions in Qt5 demo should accept QString by ref to better match C++.

Not sure if I already announced it here but one major change a few months ago is that all C++ classes are now value types, it made things a lot saner.

I think the reason why Kelly didn't use ref was to be able to write loadFile(QString("myFilename")) instead of:

    auto s_myFilename = QString("myFilename");
    loadFile(s_myFilename); // only takes lvalues

Add me to the people who'd really love D to get through this once and for all btw :)

> Are copy constructors and assignment operator invoked?
> As I see default constructors are not invoked yet?

Default constructors are invoked, and I should have added another line to the list of main features:

 • Maps C++ overloaded operators to D operators when an equivalent exists (and others are mapped to normal functions named e.g __opUnaryArrow for operator->)

Since D doesn't support non-member overloaded operators those aren't usable as in C++, I need to work on a solution for this (there's already some groundwork actually, non-member operators that take for example a std::basic_string left operand are mapped as part of the std.basic_string module).

Currently copy constructors aren't invoked when calling functions with class/struct byval arguments, arguments are memcpy'd. This is another important missing feature I should implement asap.
October 23, 2015
On Thursday, 22 October 2015 at 23:23:50 UTC, Elie Morisse wrote:
>
> MSVC hasn't been tested since 5 months ago. Calypso built by MSVC compiles basic examples but last time we tried none of the C++ standard lib test cases worked. Maybe it's better now that the template support is more robust but I've postponed work on MSVC until LDC 0.16 which includes the Win64 work by kinke.

You might find this informative as well, if you were not aware:
http://www.theregister.co.uk/2015/10/21/microsoft_promises_clang_for_windows_in_november_visual_c_update/
October 23, 2015
On Thursday, 22 October 2015 at 23:24:57 UTC, Elie Morisse wrote:
> Default constructors are invoked

Including class fields?

class A
{
  QString s_myFilename;
  this()
  {
    //is s_myFilename constructed already?
  }
}
October 25, 2015
On Friday, 23 October 2015 at 09:19:44 UTC, Kagamin wrote:
> On Thursday, 22 October 2015 at 23:24:57 UTC, Elie Morisse wrote:
>> Default constructors are invoked
>
> Including class fields?
>
> class A
> {
>   QString s_myFilename;
>   this()
>   {
>     //is s_myFilename constructed already?
>   }
> }

That triggered my own assert, oops. It's fixed now, the field default ctor is called if the field has no initializer, just before A's ctor.
October 25, 2015
Hello,

// compile with: ldc2 -cpp-args -std=gnu++11 main.d

modmap (C++) "cmath";

import (C++) std._;

import std.stdio;

int main()
{
  writeln(sin(cast(float)0.8159));
	return 0;
}

gives a lot of "error: constexpr function never produces a constant expression" messages. Not sure this is supposed to work?
October 25, 2015
On Sunday, 25 October 2015 at 21:42:15 UTC, Stefan wrote:
> Hello,
>
> // compile with: ldc2 -cpp-args -std=gnu++11 main.d
>
> modmap (C++) "cmath";
>
> import (C++) std._;
>
> import std.stdio;
>
> int main()
> {
>   writeln(sin(cast(float)0.8159));
> 	return 0;
> }
>
> gives a lot of "error: constexpr function never produces a constant expression" messages. Not sure this is supposed to work?

Hi and thank you for testing!

The code compiles and runs with C++11 disabled, I don't know why these errors occur while generating the PCH with C++11 enabled, looking into it.
October 26, 2015
On Sunday, 25 October 2015 at 21:42:15 UTC, Stefan wrote:
> Hello,
>
> // compile with: ldc2 -cpp-args -std=gnu++11 main.d
>
> modmap (C++) "cmath";
>
> import (C++) std._;
>
> import std.stdio;
>
> int main()
> {
>   writeln(sin(cast(float)0.8159));
> 	return 0;
> }
>
> gives a lot of "error: constexpr function never produces a constant expression" messages. Not sure this is supposed to work?

It's fixed with the latest commit.
October 26, 2015
On Monday, 26 October 2015 at 01:39:52 UTC, Elie Morisse wrote:
> On Sunday, 25 October 2015 at 21:42:15 UTC, Stefan wrote:
>> Hello,
>>
>> // compile with: ldc2 -cpp-args -std=gnu++11 main.d
>>
>> modmap (C++) "cmath";
>>
>> import (C++) std._;
>>
>> import std.stdio;
>>
>> int main()
>> {
>>   writeln(sin(cast(float)0.8159));
>> 	return 0;
>> }
>>
>> gives a lot of "error: constexpr function never produces a constant expression" messages. Not sure this is supposed to work?
>
> It's fixed with the latest commit.

any chance of some release builds on github when the time is right?  I've tried a few times, and somewhat embarrassingly each time I get a bit further, but still never made it to a usable version of ldc-calypso.  I didn't want to file bug report as figure you have better things to do at this stage and it's a moving target. ldc itself I can compile fine (without your mods).

I'd be interested in seeing if quantlib is usable.  it's a library that's quite popular in finance world, and might open up the set of people that are interested in exploring D.
October 26, 2015
On Monday, 26 October 2015 at 01:52:37 UTC, Laeeth Isharc wrote:
> any chance of some release builds on github when the time is right?  I've tried a few times, and somewhat embarrassingly each time I get a bit further, but still never made it to a usable version of ldc-calypso.  I didn't want to file bug report as figure you have better things to do at this stage and it's a moving target. ldc itself I can compile fine (without your mods).
>
> I'd be interested in seeing if quantlib is usable.  it's a library that's quite popular in finance world, and might open up the set of people that are interested in exploring D.

Hi Laeeth,

Were you trying to build it on Linux? I uploaded a Linux build: http://www.homo-nebulus.fr/dlang/Calypso-x86_64-Ubuntu15_04-2015_10_25.tar.xz

The build process got much simpler 2 weeks ago though, now that it doesn't depend on an LLVM source tree and an external Clang executable anymore it's almost identical to building LDC.

Let me know how Calypso fares with quantlib.