Re: Status of Win32 C++ interop

2015-09-04 Thread Szymon Gatner via Digitalmars-d-learn
On Friday, 4 September 2015 at 09:27:14 UTC, Benjamin Thaut wrote: On Friday, 4 September 2015 at 09:07:39 UTC, Szymon Gatner wrote: What about 32bit phobos? Last time I checked (2.067) only x64 was distributed. You have to compile it yourself. Use the win64 makefile and replace the

Status of Win32 C++ interop

2015-09-04 Thread Szymon Gatner via Digitalmars-d-learn
Hi, what is the current status of: - Win x86/32bit/coff32 interop with C++? - improvements for general C++ interop that were suppose to come with 2.068

Re: Status of Win32 C++ interop

2015-09-04 Thread Szymon Gatner via Digitalmars-d-learn
On Friday, 4 September 2015 at 08:58:41 UTC, Benjamin Thaut wrote: On Friday, 4 September 2015 at 08:53:27 UTC, Szymon Gatner wrote: Hi, what is the current status of: - Win x86/32bit/coff32 interop with C++? - improvements for general C++ interop that were suppose to come with 2.068 If

Re: Status of Win32 C++ interop

2015-09-04 Thread Szymon Gatner via Digitalmars-d-learn
On Friday, 4 September 2015 at 14:18:40 UTC, Benjamin Thaut wrote: On Friday, 4 September 2015 at 10:04:48 UTC, Szymon Gatner wrote: On Friday, 4 September 2015 at 09:27:14 UTC, Benjamin Thaut wrote: On Friday, 4 September 2015 at 09:07:39 UTC, Szymon Gatner wrote: What about 32bit phobos?

Re: Status of Win32 C++ interop

2015-09-04 Thread Szymon Gatner via Digitalmars-d-learn
On Friday, 4 September 2015 at 16:26:51 UTC, Kagamin wrote: On Friday, 4 September 2015 at 15:43:44 UTC, Szymon Gatner wrote: but now using phobos64.lib from 2.068 distribution does not even link properly with VC2015. That's https://issues.dlang.org/show_bug.cgi?id=14849 yup, that looks

Re: Interlocked (compare) exchange

2015-04-17 Thread Szymon Gatner via Digitalmars-d-learn
On Friday, 17 April 2015 at 11:00:40 UTC, rumbu wrote: On Friday, 17 April 2015 at 10:36:33 UTC, Szymon Gatner wrote: Hi, are there equivalents of Interlocked.Exchange [1] and Interlocked.CompareExchange [2] in D? I can't find it in teh docs? [1]

Interlocked (compare) exchange

2015-04-17 Thread Szymon Gatner via Digitalmars-d-learn
Hi, are there equivalents of Interlocked.Exchange [1] and Interlocked.CompareExchange [2] in D? I can't find it in teh docs? [1] https://msdn.microsoft.com/en-us/library/f2090ex9(v=vs.110).aspx [2] https://msdn.microsoft.com/en-us/library/h7etff8w(v=vs.110).aspx

Re: UFCS and overloading

2015-04-07 Thread Szymon Gatner via Digitalmars-d-learn
On Tuesday, 7 April 2015 at 14:46:52 UTC, cym13 wrote: EDIT: mis-formatted previous snippet import std.algorithm, std.stdio, std.range, std.conv; void main() { stdin .byLine .filter!(s = !s.empty s.front != '#’) // Filter with this lambda function .map!(s =

Re: UFCS and overloading

2015-04-06 Thread Szymon Gatner via Digitalmars-d-learn
On Monday, 6 April 2015 at 17:53:13 UTC, Steven Schveighoffer wrote: On 4/6/15 12:23 PM, Szymon Gatner wrote: Hi, I am surprised that this doesn't work: class Foo { void bar(string) {} } void bar(Foo foo, int i) { } auto foo = new Foo(); foo.bar(123); // === error causing compilation

UFCS and overloading

2015-04-06 Thread Szymon Gatner via Digitalmars-d-learn
Hi, I am surprised that this doesn't work: class Foo { void bar(string) {} } void bar(Foo foo, int i) { } auto foo = new Foo(); foo.bar(123); // === error causing compilation error: main.d(24): Error: function main.Foo.bar (string _param_0) is not callable using argument types (int)

dlib help

2015-01-19 Thread Szymon Gatner via Digitalmars-d-learn
Hi, I am hoping to use dlib for image manipulation utility program but I can't find any documentation for it. Am I missing something? Any examples at least? (also: dlib from dub does not compile with wcslen import conflict., I managed to find a fix on github but bup packages need updating)

Re: Implementing SmartPtr - compiler bug?

2014-10-28 Thread Szymon Gatner via Digitalmars-d-learn
On Monday, 27 October 2014 at 18:42:11 UTC, Marc Schütz wrote: On Monday, 27 October 2014 at 16:58:56 UTC, Szymon Gatner wrote: On Monday, 27 October 2014 at 14:04:53 UTC, Marc Schütz wrote: On Monday, 27 October 2014 at 12:40:17 UTC, Shachar Shemesh wrote: On 27/10/14 11:31, Szymon Gatner

Re: Implementing SmartPtr - compiler bug?

2014-10-27 Thread Szymon Gatner via Digitalmars-d-learn
On Monday, 27 October 2014 at 07:31:34 UTC, Shachar Shemesh wrote: For reasons I won't go into (but should be fairly obvious), I am trying to write code that does not rely on the garbage collector. As such, I'm using reference counting structs allocated on a pool. To keep things sane, I'm

Re: Implementing SmartPtr - compiler bug?

2014-10-27 Thread Szymon Gatner via Digitalmars-d-learn
On Monday, 27 October 2014 at 09:21:14 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 27 Oct 2014 09:11:33 + Szymon Gatner via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: You have created dynamic array of SmartPtrs. nope. it's stack-allocated array. Right, sorry

Re: Implementing SmartPtr - compiler bug?

2014-10-27 Thread Szymon Gatner via Digitalmars-d-learn
On Monday, 27 October 2014 at 14:04:53 UTC, Marc Schütz wrote: On Monday, 27 October 2014 at 12:40:17 UTC, Shachar Shemesh wrote: On 27/10/14 11:31, Szymon Gatner wrote: Right, sorry. Tho I admit I made assumptions since that was not the full code. I've opened a bug. It has a fully

Re: Global const variables

2014-10-21 Thread Szymon Gatner via Digitalmars-d-learn
On Tuesday, 21 October 2014 at 08:48:09 UTC, safety0ff wrote: On Tuesday, 21 October 2014 at 08:25:07 UTC, bearophile wrote: Minas Mina: Aren't pure functions supposed to return the same result every time? If yes, it is correct to not accept it. But how can main() not be pure? Or, how can't

Re: COFF on Win32 how to try?

2014-10-13 Thread Szymon Gatner via Digitalmars-d-learn
On Saturday, 11 October 2014 at 13:35:55 UTC, Rainer Schuetze wrote: Yes, DMD git HEAD is required. Getting this when trying to build all with Digger: std\uri.d(872): Deprecation: alias object.clear is deprecated - Please use destroy instead. std\uri.d(1166): Deprecation: alias object.clear

Re: COFF on Win32 how to try?

2014-10-13 Thread Szymon Gatner via Digitalmars-d-learn
On Saturday, 11 October 2014 at 13:35:55 UTC, Rainer Schuetze wrote: Yes, DMD git HEAD is required. Getting this when trying to build all with Digger: std\uri.d(872): Deprecation: alias object.clear is deprecated - Please use destroy instead. std\uri.d(1166): Deprecation: alias object.clear

Re: COFF on Win32 how to try?

2014-10-11 Thread Szymon Gatner via Digitalmars-d-learn
On Saturday, 11 October 2014 at 09:21:18 UTC, Rainer Schuetze wrote: On 10.10.2014 20:44, Szymon Gatner wrote: Hi, thanks for all the information. I got Digger (pretty nice tool btw) and it pulled all neccessary repos from GitHub. As my understanding is that I should not be doing Build

COFF on Win32 how to try?

2014-10-10 Thread Szymon Gatner via Digitalmars-d-learn
I would like to try recently merged COFF support on Win32 for a hybrid D/C++ application. Until now I tried that (hybridizing) only with DMD from the official installer and in x64 mode. My question is: how to try the same in 32 bits?

Re: COFF on Win32 how to try?

2014-10-10 Thread Szymon Gatner via Digitalmars-d-learn
On Friday, 10 October 2014 at 16:14:56 UTC, Rainer Schuetze wrote: On 10.10.2014 10:37, Szymon Gatner wrote: I would like to try recently merged COFF support on Win32 for a hybrid D/C++ application. Until now I tried that (hybridizing) only with DMD from the official installer and in x64

Re: Interop with C++ library - what toolchain do you use?

2014-09-18 Thread Szymon Gatner via Digitalmars-d-learn
On Wednesday, 17 September 2014 at 22:28:44 UTC, Cliff wrote: So I am trying to use a C++ library with D. My toolchain is currently Visual Studio 2013 with Visual D, using the DMD compiler. When trying to link, I obviously ran into the OMF vs. COFF issue, which makes using the C++ library a

Re: writeln() assertion failed in hybrid x64

2014-09-05 Thread Szymon Gatner via Digitalmars-d-learn
On Thursday, 4 September 2014 at 20:57:41 UTC, Kagamin wrote: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L270 well, this sucks. Is there a way I can call module c-tors explicitly? I was under impression that D(dmd) was suppose to work with VisualC++ in

Re: writeln() assertion failed in hybrid x64

2014-09-04 Thread Szymon Gatner via Digitalmars-d-learn
On Thursday, 4 September 2014 at 15:25:59 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 04 Sep 2014 15:10:21 + Jorge A. S. via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: In one of the specializations of the write function in the std.stdio (the call site that you

Re: writeln() assertion failed in hybrid x64

2014-09-04 Thread Szymon Gatner via Digitalmars-d-learn
On Thursday, 4 September 2014 at 18:22:55 UTC, Marc Schütz wrote: On Thursday, 4 September 2014 at 17:57:47 UTC, Szymon Gatner wrote: On Thursday, 4 September 2014 at 15:25:59 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 04 Sep 2014 15:10:21 + Jorge A. S. via Digitalmars-d-learn

Re: writeln() assertion failed in hybrid x64

2014-09-04 Thread Szymon Gatner via Digitalmars-d-learn
On Thursday, 4 September 2014 at 20:38:38 UTC, Kagamin wrote: Maybe some module constructor wasn't run due to linking mess. So it remains uninitialized. Is there a way I can check if module c-tor run? rt_init() returned no error.

Linking phobos64.lib errors

2014-09-03 Thread Szymon Gatner via Digitalmars-d-learn
Hi, I am trying to make simple x64 C++ application that uses D static library (trying to do Interfacing with C++ from D Cookbook chapter). I am Using Visual Studio 2012 to create main() like this: #include iostream extern C int rt_init(); extern C void rt_term(); // RAII struct for D

Re: Linking phobos64.lib errors

2014-09-03 Thread Szymon Gatner via Digitalmars-d-learn
On Wednesday, 3 September 2014 at 08:47:35 UTC, Rikki Cattermole wrote: On 3/09/2014 7:22 p.m., Szymon Gatner wrote: Hi, I am trying to make simple x64 C++ application that uses D static library (trying to do Interfacing with C++ from D Cookbook chapter). I am Using Visual Studio 2012 to

writeln() assertion failed in hybrid x64

2014-09-03 Thread Szymon Gatner via Digitalmars-d-learn
Hey, I am trying to build hybrid (C++, D) application (more here: http://forum.dlang.org/thread/ugkpqprobonorbdun...@forum.dlang.org) but I am now getting assertion failure from within writeln(). writeln() is called from a D function that has C++ linkage: D definition: extern (C++) void

Re: writeln() assertion failed in hybrid x64

2014-09-03 Thread Szymon Gatner via Digitalmars-d-learn
On Wednesday, 3 September 2014 at 09:55:55 UTC, Szymon Gatner wrote: Hey, I am trying to build hybrid (C++, D) application (more here: http://forum.dlang.org/thread/ugkpqprobonorbdun...@forum.dlang.org) but I am now getting assertion failure from within writeln(). writeln() is called from a

Re: Programming a Game in D? :D

2014-05-27 Thread Szymon Gatner via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 10:03:36 UTC, David wrote: On Saturday, 24 May 2014 at 08:54:53 UTC, ponce wrote: Hi David, Learning programming, learning D and learning 3D are 3 significant endeavours. You might want to begin with http://www.basic4gl.net/ which will get you going with 3D, quite