April 16, 2015
Sorry for the lack of updates, progress was a bit boring for the past 2 months and consisted mostly in crawling my way up a bottomless pit of errors generated by « import (C++) Ogre.Light; ».

And then this happens: https://paste.kde.org/pse8pqzch :D

The compilation speed could be improved, more bugs should get triggered by actual usage of Ogre, but close to everything gets mapped, semantic'd and codegen'd and this is the milestone I've been working towards for months.


Last week also introduced was the Clang module map file support, which helps breaking namespaces into smaller pieces and thus makes probably most C libraries usable right now without having to maintain bindings, only a module map file which may also be generated by clang-modularize.
April 16, 2015
On Thursday, 16 April 2015 at 00:47:31 UTC, Elie Morisse wrote:
> Sorry for the lack of updates, progress was a bit boring for the past 2 months and consisted mostly in crawling my way up a bottomless pit of errors generated by « import (C++) Ogre.Light; ».
>
> And then this happens: https://paste.kde.org/pse8pqzch :D
>
> The compilation speed could be improved, more bugs should get triggered by actual usage of Ogre, but close to everything gets mapped, semantic'd and codegen'd and this is the milestone I've been working towards for months.
>
>
> Last week also introduced was the Clang module map file support, which helps breaking namespaces into smaller pieces and thus makes probably most C libraries usable right now without having to maintain bindings, only a module map file which may also be generated by clang-modularize.

Wow, this is great stuff!

I'd love to get this working with VTK! I currently have half-baked bindings that still have a bunch of bugs. This looks like a much more interesting approach.

bye,
lobo
April 16, 2015
Amazing stuff Elie!! It has been a pleasure watching this come together. Looking forward to testing and using Calypso.

A huge and impressive milestone :)

Thanks,
Kelly

On Thursday, 16 April 2015 at 00:47:31 UTC, Elie Morisse wrote:
> Sorry for the lack of updates, progress was a bit boring for the past 2 months and consisted mostly in crawling my way up a bottomless pit of errors generated by « import (C++) Ogre.Light; ».
>
> And then this happens: https://paste.kde.org/pse8pqzch :D
>
> The compilation speed could be improved, more bugs should get triggered by actual usage of Ogre, but close to everything gets mapped, semantic'd and codegen'd and this is the milestone I've been working towards for months.
>
>
> Last week also introduced was the Clang module map file support, which helps breaking namespaces into smaller pieces and thus makes probably most C libraries usable right now without having to maintain bindings, only a module map file which may also be generated by clang-modularize.

April 16, 2015
On Thursday, 16 April 2015 at 00:47:31 UTC, Elie Morisse wrote:
> Sorry for the lack of updates, progress was a bit boring for the past 2 months and consisted mostly in crawling my way up a bottomless pit of errors generated by « import (C++) Ogre.Light; ».
>
> And then this happens: https://paste.kde.org/pse8pqzch :D
>
> The compilation speed could be improved, more bugs should get triggered by actual usage of Ogre, but close to everything gets mapped, semantic'd and codegen'd and this is the milestone I've been working towards for months.
>
>
> Last week also introduced was the Clang module map file support, which helps breaking namespaces into smaller pieces and thus makes probably most C libraries usable right now without having to maintain bindings, only a module map file which may also be generated by clang-modularize.

Why do all compiler devs are french ?
April 16, 2015
Could anybody wrote very simple tutorial, that show how to use any popular C/C++ lib without binding? I mean step by step manual.

Also it would be nice to get binary builds for Windows to test.
April 16, 2015
On Thursday, 16 April 2015 at 06:43:25 UTC, Suliman wrote:
> Could anybody wrote very simple tutorial, that show how to use any popular C/C++ lib without binding? I mean step by step manual.
>
> Also it would be nice to get binary builds for Windows to test.

Suliman sorry for keeping you waiting :)
I'll be spending the evening installing MSVC and Qt Creator, and building Calypso for Windows users to play with and to help with testing. Expect binaries tomorrow.

The usage should be clear just by looking at and building the examples in tests/calypso.
April 16, 2015
On Thursday, 16 April 2015 at 16:42:42 UTC, Elie Morisse wrote:
> On Thursday, 16 April 2015 at 06:43:25 UTC, Suliman wrote:
>> Could anybody wrote very simple tutorial, that show how to use any popular C/C++ lib without binding? I mean step by step manual.
>>
>> Also it would be nice to get binary builds for Windows to test.
>
> Suliman sorry for keeping you waiting :)
> I'll be spending the evening installing MSVC and Qt Creator, and building Calypso for Windows users to play with and to help with testing. Expect binaries tomorrow.
>
> The usage should be clear just by looking at and building the examples in tests/calypso.

Thanks for doing all of this - an impressive effort by a single person.

Is it worth writing a quick D build script to automate downloading and building the whole thing?  There are lots of different little bits to get right that become invisible with experience.  "Everything's easy when you know how to do it".  I got stuck at various points previously, but I will have another go, and if I get there this time will turn into a quick script.
April 17, 2015
Hello Elie,

Elie...I added some more examples for some of the tests in libstdc++ to a new PR. The main reason for this is that iterators for lists and vectors work now (for those that were keeping track, they didn't work last month or thereabouts). This makes things work quite well for several of the STL files now.

I thought I would also point out, to those that are following this thread, that I have tried at least a half dozen libraries (like zeromq, vecmathlib, dlib, etc.) and I haven't been able to get any of them to work for anything really meaningful. There is still one fairly major compilation error in the ScopeChecker that keeps popping up for all of these libs and a few STL files. I just wanted to point this out, as it seems from a couple comments, that people might be expecting to be able to just use C++ libs with Calypso straight away, and that isn't quite the case today. Some impressive stuff does work though...check out the libstdc++ examples.

So, my point is that while some impressive things compile (like CImg, which is a 50,000 line header file!! ... actually you need to comment out 3 lines of preprocessor code but close enough) and you might be able to instantiate a few classes and/or templates, I don't think any significant lib will actually work out-of-the-box with Calypso right now...but it is very close, I think.

I just wanted to be clear about this so that there isn't too much of a shock for anyone trying to use Calypso right away :)

Any automatic build script would be nice to have Laeeth :)

Once useful portions of a 'popular' (or requested) C++ lib work with Calypso, I will be happy to write up a step by step tutorial, but I don't think it is quite at that point yet.

Thanks,
Kelly

On Thursday, 16 April 2015 at 16:42:42 UTC, Elie Morisse wrote:
> On Thursday, 16 April 2015 at 06:43:25 UTC, Suliman wrote:
>> Could anybody wrote very simple tutorial, that show how to use any popular C/C++ lib without binding? I mean step by step manual.
>>
>> Also it would be nice to get binary builds for Windows to test.
>
> Suliman sorry for keeping you waiting :)
> I'll be spending the evening installing MSVC and Qt Creator, and building Calypso for Windows users to play with and to help with testing. Expect binaries tomorrow.
>
> The usage should be clear just by looking at and building the examples in tests/calypso.

April 18, 2015
I should have given the same warning, there's a chance that Calypso may work with not too sophisticated C++ libraries but new bugs are around the corner if you try anything too big. Nevertheless Suliman, Laeeth and maybe others have been wanting to try it out in its current state, and it was useful because new errors seems to have appeared while compiling the STL examples by a MSVC build since Kelly's successful attempt two months ago (no idea whether it's because more of the MSVC runtime/standard lib gets mapped or because he used another standard lib?).

So sorry for the wait but this is taking longer than expected, first I could only start building LLVM yesterday's evening because of slow download speeds, and today the MSVC build is triggering these new errors I'm investigating.
April 21, 2015
On Thursday, 16 April 2015 at 06:43:25 UTC, Suliman wrote:
> Could anybody wrote very simple tutorial, that show how to use any popular C/C++ lib without binding? I mean step by step manual.
>
> Also it would be nice to get binary builds for Windows to test.

Sorry for the wait.

So Calypso still can't load the MSVC C++ standard lib. I thought Kelly managed to build some STL examples but actually it's not remotely possible yet. The main blocker is that template instances often depend on each other (but not in their entirety) which cause forward reference errors in DMD.

However it works with MinGW-w64, but this wasn't remotely straightforward either, I had to modify Clang to make it detect correctly the MinGW paths (which are hardcoded in Clang and obsolete):

 - install mingw-w64, in the installer choose 4.9.2, DWARF exceptions and POSIX threads
 - download http://homo-nebulus.fr/dlang/Calypso_mingw-w64.7z
 - extract the archive over the MinGW root directory (where the bin/, etc/, etc. folders lie)
 - correct the paths in /etc/ldc.conf
 - add Z:\path\to\MingW\bin to your PATH environment variable in your System settings (e.g follow: http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx)

Then you can build the examples in tests/