On Monday, 13 March 2017 at 11:06:53 UTC, Russel Winder wrote:
It is a shame that dmd and ldc do not just use the standard GCC
option set.
Totally agreed.
Moreover, funny stuff like "dmd -of" (instead of standard
"-o ") breaks automatic Msys path conversion hack (the
code translates Unix
Ups, somehow overread the last sentence of tourge :)
Thanks for the detailed insights!
On Tuesday, 21 March 2017 at 12:30:57 UTC, Stefan Koch wrote:
Try scope obj = new MyClass(flag ? 1 : 2);
In essence you should never need to delay construction.
Just construct the object as soon as you have everything to
construct it.
which includes conditions.
Yes I know it. I prepare all
On Tuesday, 21 March 2017 at 08:46:43 UTC, Ali Çehreli wrote:
Another option is std.conv.emplace:
import std.conv : emplace;
class MyClass {
this(int) @nogc {
}
~this() @nogc {
}
}
void method(bool flag) @nogc
{
void[__traits(classInstanceSize, MyClass)] buffer = void;
On Wednesday, 22 March 2017 at 04:06:50 UTC, Mike Parker wrote:
dub fetch --cache=local mir-algorithm
Using --cache=local will put the package in the current
directory instead of the AppData path. When you aren't using
dub to manage your own projects, that makes it easier to deal
with
On Tuesday, 21 March 2017 at 22:51:41 UTC, thorstein wrote:
Thanks to all, I got it!
I created a new dub package and copied my code there. Compiles.
So I guess I get the rest working as well.
Still will have to figure out later the procedure to do the
same for a VisualD project, if it is
On Tuesday, 21 March 2017 at 19:26:47 UTC, Robly18 wrote:
Oh! Right, I forgot to mention that, my bad. The earliest
errors were, as you said, mismatched version exceptions.
However, to fix them, what I did was, at first, do the 2,0,2
version thing you said. Later, however, I decided to
Thanks to all, I got it!
I created a new dub package and copied my code there. Compiles.
So I guess I get the rest working as well.
Still will have to figure out later the procedure to do the same
for a VisualD project, if it is possible.
Thorstein
On Tuesday, 21 March 2017 at 21:01:31 UTC, thorstein wrote:
Beside my specific problem of how to start with the mir-tools I
wonder how and for what purpose 'dub' is applied when building
projects in connection with Visual Studio? Or is it just a more
light-weight command line build tool?
On Tuesday, 21 March 2017 at 21:01:31 UTC, thorstein wrote:
C:\..\AppData\Roaming\dub>dub run mir-algorithm
Building package mir-algorithm in
C:\..\AppData\Roaming\dub\packages\mir-algorithm-0.1.1\mir-algorithm\
Fetching mir-internal 0.0.5 (getting selected version)...
Main package must have a
On Tuesday, 21 March 2017 at 21:01:31 UTC, thorstein wrote:
Hi,
I have questions regarding the usage of 'dub'. I'm learning D
under Win7. I have installed VisualD for the community edition
of Visual Studio and got some file i/o working.
Next I would like to continue with the mir-tools for
Hi,
I have questions regarding the usage of 'dub'. I'm learning D
under Win7. I have installed VisualD for the community edition of
Visual Studio and got some file i/o working.
Next I would like to continue with the mir-tools for matrix
manipulation. I understood that I have to build them
On Tuesday, 21 March 2017 at 14:21:30 UTC, Mike Parker wrote:
On Tuesday, 21 March 2017 at 12:31:41 UTC, Robly18 wrote:
Two days of fix attempt laters, here I am. I tried
reinstalling and recompiling SDL from source (since the
version from apt-get was only 2.0.4 and the one Derelict uses
On Friday, 17 March 2017 at 19:05:20 UTC, H. S. Teoh wrote:
There are actually (at least) TWO distinct phases of
compilation that are conventionally labelled "compile time":
1) Template expansion / AST manipulation, and:
2) CTFE (compile-time function evaluation).
[ ... ]
Template
On 03/21/2017 04:09 PM, StarGrazer wrote:
On Tuesday, 21 March 2017 at 15:01:43 UTC, ag0aep6g wrote:
On 03/20/2017 05:55 PM, StarGrazer wrote:
typeof() fails unless method is static. Says & requires this.
Works for me:
class C
{
void method() {}
typeof() x;
}
typeof() y;
On Tuesday, 21 March 2017 at 15:01:43 UTC, ag0aep6g wrote:
On 03/20/2017 05:55 PM, StarGrazer wrote:
typeof() fails unless method is static. Says & requires
this.
Works for me:
class C
{
void method() {}
typeof() x;
}
typeof() y;
Tested with dmd 2.073.2.
Yes, but you
On 03/20/2017 05:55 PM, StarGrazer wrote:
typeof() fails unless method is static. Says & requires this.
Works for me:
class C
{
void method() {}
typeof() x;
}
typeof() y;
Tested with dmd 2.073.2.
Note that the type of x and y is `void function()`, not `void
delegate()`.
On Tuesday, 21 March 2017 at 12:39:26 UTC, WebFreak001 wrote:
On Tuesday, 21 March 2017 at 12:31:41 UTC, Robly18 wrote:
I've been working on a small game of tic tac toe using
Derelict SDL, and development has been going along great...
Until I tried to develop on my Ubuntu laptop.
[...]
On Tuesday, 21 March 2017 at 12:31:41 UTC, Robly18 wrote:
Two days of fix attempt laters, here I am. I tried reinstalling
and recompiling SDL from source (since the version from apt-get
was only 2.0.4 and the one Derelict uses seems to be 2.0.5),
and it continues segfaulting at seemingly
On Tuesday, 21 March 2017 at 13:04:29 UTC, Robly18 wrote:
On Tuesday, 21 March 2017 at 12:39:26 UTC, WebFreak001 wrote:
On Tuesday, 21 March 2017 at 12:31:41 UTC, Robly18 wrote:
I've been working on a small game of tic tac toe using
Derelict SDL, and development has been going along great...
21.03.2017 16:04, Robly18 пишет:
On Tuesday, 21 March 2017 at 12:39:26 UTC, WebFreak001 wrote:
On Tuesday, 21 March 2017 at 12:31:41 UTC, Robly18 wrote:
I've been working on a small game of tic tac toe using Derelict SDL,
and development has been going along great... Until I tried to
develop
On Tuesday, 21 March 2017 at 12:39:26 UTC, WebFreak001 wrote:
On Tuesday, 21 March 2017 at 12:31:41 UTC, Robly18 wrote:
I've been working on a small game of tic tac toe using
Derelict SDL, and development has been going along great...
Until I tried to develop on my Ubuntu laptop.
[...]
On Tuesday, 21 March 2017 at 12:31:41 UTC, Robly18 wrote:
I've been working on a small game of tic tac toe using Derelict
SDL, and development has been going along great... Until I
tried to develop on my Ubuntu laptop.
[...]
Derelict-SDL is binding against newer functions than ubuntu
I've been working on a small game of tic tac toe using Derelict
SDL, and development has been going along great... Until I tried
to develop on my Ubuntu laptop.
I uploaded the code to github, downloaded it on my laptop,
installed the prequesites and... The program crashed with error
-11 -- a
On Tuesday, 21 March 2017 at 08:08:24 UTC, ANtlord wrote:
Hello! I read documentation about memory management and can't
find description about delay allocation of instance. I have a
method marked by @nogc. This method takes boolean variable. If
this variable is true I want to construct object
On Friday, 3 February 2017 at 14:30:01 UTC, Soolayman wrote:
Is there any usable full-text search library? for D I couldn't
find any except the Elasticsearch client called elasticsearch-d
in the package registry a very old Lucene port for D1 called
dlucene. This is it or did I miss something?
On 03/21/2017 01:08 AM, ANtlord wrote:
void method(bool flag) @nogc
{
scope MyClass obj;
if(flag) {
obj = new MyClass(1);
} else {
obj = new MyClass(2);
}
// using obj
}
Another option is std.conv.emplace:
import std.conv : emplace;
class MyClass {
On Tuesday, 21 March 2017 at 08:12:36 UTC, rikki cattermole wrote:
You probably want[0] to allocate a class on the stack instead
of doing this.
[0] http://dlang.org/phobos/std_typecons.html#.scoped
If I will use it I won't use @nogc. Is the only one case?
You probably want[0] to allocate a class on the stack instead of doing this.
[0] http://dlang.org/phobos/std_typecons.html#.scoped
Hello! I read documentation about memory management and can't
find description about delay allocation of instance. I have a
method marked by @nogc. This method takes boolean variable. If
this variable is true I want to construct object with one set of
parameters else I want to construct object
30 matches
Mail list logo