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 arch
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
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
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
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
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]
https://msdn.microsoft.com/en-us/library
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
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 =
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
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)
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)
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
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
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
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
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
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
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
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
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?
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
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
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
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
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
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.
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
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
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
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
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
On Saturday, 1 March 2014 at 18:00:21 UTC, Steve Teale wrote:
On Friday, 28 February 2014 at 19:06:26 UTC, Dicebot wrote:
On Friday, 28 February 2014 at 18:42:57 UTC, Steve Teale wrote:
Is this typical - libraries use templates, applications
don't, or
am I just being unimaginative?
Steve
On Friday, 28 February 2014 at 10:44:22 UTC, Dicebot wrote:
On Thursday, 27 February 2014 at 18:29:57 UTC, Szymon Gatner
wrote:
I dig flexibility, I really do, and I appreciate D's features
that enable that, but in case of such basic thing as a
resource management, I just want things to work
On Friday, 28 February 2014 at 11:54:52 UTC, Mike Parker wrote:
On 2/28/2014 8:43 PM, Dicebot wrote:
Most problems I have with D data structures come from
qualifiers, not
from resource management. I really don't understand why this
looks that
much of a problem. That said, my background very
On Friday, 28 February 2014 at 11:43:58 UTC, Dicebot wrote:
On Friday, 28 February 2014 at 11:28:01 UTC, Szymon Gatner
wrote:
I didn't mean basic in the sense of easy but in the sense
of something that has to dealt with all the time / is common
requirement.
Yes, it needs to be dealt with all
On Friday, 28 February 2014 at 12:17:22 UTC, Dicebot wrote:
On Friday, 28 February 2014 at 12:15:21 UTC, Szymon Gatner
wrote:
It really is, RAII is the most important idiom in C++, in
short no RAII == buggy code. I mean proper C++ not
C-with-classes-no-templates-no-exceptions bs.
So to sum
On Friday, 28 February 2014 at 12:48:47 UTC, Mike Parker wrote:
On 2/28/2014 9:15 PM, Szymon Gatner wrote:
So to sum up: C folks are not really happy, C++ folks are not
really
happy and C# folks are not really happy :P
I'm a C folk and I'm really happy :)
C'mon, GC has to be an itch
Hi,
I am evaluating D for future projects and coming from C++ I find
it really hard to understand semantics of destruction of
GC-managed code.
After many application-shutdown crashes caused by invalid order
of class destructor calls I really think I need to change the way
I am thinking
On Thursday, 27 February 2014 at 09:57:51 UTC, Tobias Pankrath
wrote:
On Thursday, 27 February 2014 at 09:55:14 UTC, Tobias Pankrath
wrote:
On Thursday, 27 February 2014 at 09:49:08 UTC, Szymon Gatner
wrote:
My crashes (still have them and can't track all as debugging
D sucks) are caused
On Thursday, 27 February 2014 at 10:40:15 UTC, Tobias Pankrath
wrote:
Szymon Gatner wrote:
Parent-child in the sense of object graph. I did read the spec
when I started to notice crashes. I must say that it really
terrified me to my very bones. I always though that
higher-level memory
On Thursday, 27 February 2014 at 11:13:17 UTC, bearophile wrote:
Szymon Gatner:
I just want them to do their cleanup first as they should.
Why? Perhaps if you explain what's behind your needs better,
people can help better.
Bye,
bearophile
In my specific example I am creating OpenGL
On Thursday, 27 February 2014 at 12:32:36 UTC, Namespace wrote:
On Thursday, 27 February 2014 at 12:25:49 UTC, Szymon Gatner
wrote:
On Thursday, 27 February 2014 at 11:13:17 UTC, bearophile
wrote:
Szymon Gatner:
I just want them to do their cleanup first as they should.
Why? Perhaps if you
On Thursday, 27 February 2014 at 13:04:17 UTC, Namespace wrote:
I use this solution especially because I have to finalize the
data before I call SDL_Quit. And therefore I cannot trust the
non-deterministic execution of the Dtor.
I fully understand that ;)
I will take a look at DGame too
On Thursday, 27 February 2014 at 13:31:45 UTC, Dicebot wrote:
On Thursday, 27 February 2014 at 13:18:51 UTC, Remo wrote:
Then the question is why not use structs all the time?
Key class feature is run-time polymorphism (via
interfaces/inheritance). I tend to use structs for everything
else
On Thursday, 27 February 2014 at 14:18:47 UTC, Dicebot wrote:
On Thursday, 27 February 2014 at 14:14:43 UTC, Namespace wrote:
Why not? Overhead? No RAII support?
Simply no reason to use classes, structs have all features I
need for cases when polymorphism is not necessary (95%+). Being
On Thursday, 27 February 2014 at 16:10:34 UTC, Adam D. Ruppe
wrote:
On Thursday, 27 February 2014 at 14:37:14 UTC, Szymon Gatner
wrote:
They actually don't have all the necessary features in D
afaiu. They do have value semantics but can't represent
uniqueness because of missing move d-tor
On Thursday, 27 February 2014 at 18:06:58 UTC, John Colvin wrote:
On Thursday, 27 February 2014 at 14:52:00 UTC, Szymon Gatner
wrote:
On Thursday, 27 February 2014 at 14:42:43 UTC, Dicebot wrote:
There is also one complex and feature-reach implementation of
uniqueness concept by Sonke Ludwig
On Thursday, 27 February 2014 at 14:42:43 UTC, Dicebot wrote:
There is also one complex and feature-reach implementation of
uniqueness concept by Sonke Ludwig :
https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/core/concurrency.d#L281
(Isolated!T)
Priceless for message
On Thursday, 27 February 2014 at 14:58:50 UTC, bearophile wrote:
Szymon Gatner:
Tbh it only looks worse and worse to me :(
Perhaps for your use case it's better for you to stick with
C++11? While I have written a good amount of D code (perhaps
200_000 lines or more), I still use Python
On Thursday, 27 February 2014 at 15:36:02 UTC, Remo wrote:
What do you mean by Microsoft's dialect?
I mean half-implemented buggy version of C++11 in VC2012 ;)
On Thursday, 27 February 2014 at 15:56:26 UTC, Remo wrote:
On Thursday, 27 February 2014 at 15:39:48 UTC, Szymon Gatner
wrote:
On Thursday, 27 February 2014 at 15:36:02 UTC, Remo wrote:
What do you mean by Microsoft's dialect?
I mean half-implemented buggy version of C++11 in VC2012
On Thursday, 27 February 2014 at 14:41:27 UTC, Dicebot wrote:
On Thursday, 27 February 2014 at 14:37:14 UTC, Szymon Gatner
wrote:
They actually don't have all the necessary features in D
afaiu. They do have value semantics but can't represent
uniqueness because of missing move d-tor
On Thursday, 27 February 2014 at 14:56:22 UTC, Namespace wrote:
On Thursday, 27 February 2014 at 14:52:00 UTC, Szymon Gatner
wrote:
On Thursday, 27 February 2014 at 14:42:43 UTC, Dicebot wrote:
There is also one complex and feature-reach implementation of
uniqueness concept by Sonke Ludwig
I want to keep a list of pointers-to-C-struct but this line:
cpBody* cpBodies_[];
cpBodies_ ~= cpBodyNew(0, 0);
gives:
Error 1 Error 42: Symbol Undefined
_D5dchip6cpBody6cpBody11__xopEqualsFKxS5dchip6cpBody6cpBodyKxS5dchip6cpBody6cpBodyZb
(bool dchip.cpBody.cpBody.__xopEquals(ref
On Wednesday, 26 February 2014 at 10:01:53 UTC, Tobias Pankrath
wrote:
On Wednesday, 26 February 2014 at 09:56:39 UTC, Szymon Gatner
wrote:
I want to keep a list of pointers-to-C-struct but this line:
cpBody* cpBodies_[];
which I use as a workaround. I am using DMD 2.065.
cpBody*[] cpBodies
On Wednesday, 26 February 2014 at 10:59:39 UTC, bearophile wrote:
Szymon Gatner:
I want to keep a list of pointers-to-C-struct but this line:
Please reduce your code as much as possible, and show the whole
compilable reduced buggy program here.
Bye,
bearophile
That would be just
On Wednesday, 26 February 2014 at 11:21:37 UTC, bearophile wrote:
Szymon Gatner:
That would be just it:
import dchip.all;
void main()
{
cpBody* bodies[];
auto b = cpBodyNew(0, 0);
bodies ~= b;
}
where dchip is pulled using dub. As described earlier,
wrapping cpBody* in another struct
On Wednesday, 26 February 2014 at 11:22:00 UTC, Tobias Pankrath
wrote:
On Wednesday, 26 February 2014 at 11:07:44 UTC, Szymon Gatner
wrote:
On Wednesday, 26 February 2014 at 10:59:39 UTC, bearophile
wrote:
Szymon Gatner:
I want to keep a list of pointers-to-C-struct but this line:
Please
Still exploring what D has to offer but this blew my mind:
import std.stdio;
struct Base
{
void print(string text)
{
writeln(Base : ~ text);
}
int add(int a, int b)
{
return a + b;
}
}
struct Wrap
{
auto opDispatch(string op, Args...)(Args args)
{
enum name = op;
On Wednesday, 8 January 2014 at 23:26:26 UTC, Adam D. Ruppe wrote:
On Wednesday, 8 January 2014 at 23:20:06 UTC, Szymon Gatner
wrote:
I don't quite understand why enum name part is necessary
It isn't!
Indeed, I don't know why it didn't compile for me the first time.
On Wednesday, 8 January 2014 at 23:27:37 UTC, Brad Anderson wrote:
On Wednesday, 8 January 2014 at 23:20:06 UTC, Szymon Gatner
wrote:
Still exploring what D has to offer but this blew my mind:
snip
I don't quite understand why enum name part is necessary (as
my understanding is that op
On Wednesday, 8 January 2014 at 23:46:28 UTC, bearophile wrote:
Szymon Gatner:
Two small improvements in your code:
writeln(Base : ~ text);
=
writeln(Base : , text);
int main(string[] argv)
{
...
return 0;
}
=
void main(string[] argv)
{
...
}
Or even:
void main
Thanks a lot Adam, this is what I came with:
module main;
import std.stdio;
class MyObject
{
abstract string[] getPublicMembers();
}
class MyClassBase(T) : MyObject
{
override string[] getPublicMembers()
{
return generatePublicMembers!T();
}
string[] generatePublicMembers(T)()
Hi,
I am trying to get members of a class via pointer to Object.
I know how to iterate over members when type is known at compile
time (with __traits) but I can't find a documentation of how to
get them polymorphically, I mean:
class Foo
{
int x, y;
}
Object o = new Foo();
auto ci =
64 matches
Mail list logo