On Saturday, 30 June 2018 at 10:48:49 UTC, Suliman wrote:
Correct me if I am wrong, but I have read news that dmd now can
be used without C++ Build Tools.
I trying to build simple project. And getting Error:
Warning: no Visual C++ installation detected
OPTLINK (R) for Win32 Release 8.00.17
Co
On 07/05/2018 01:00 PM, ag0aep6g wrote:
> `immutable` means that the data can't ever change. Not even the owning
> Foo is allowed to change it. If you want to disallow changes from
> outside, but still allow the owning Foo to make changes, use `const`:
>
> static const(Foo[]) getFooList()
T
On Thursday, 5 July 2018 at 12:52:49 UTC, Steven Schveighoffer
wrote:
On 7/5/18 4:42 AM, drug wrote:
There were several attempts to make Qt binding for dlang, but
either they has failed or has been stalled. It would be nice
to collect that experience. Considering 2.081 supports C++
special mem
On 07/05/2018 09:43 PM, Ivo Maffei wrote:
class Foo {
private static Foo[] fooSlice = new Foo[0]; //private static slice
static immutable Foo[] getFooList() { //static method returning an
immutable slice
return fooSlice;
}
}
However when compiling with dub I get the fo
On Thursday, 5 July 2018 at 19:43:43 UTC, Ivo Maffei wrote:
private static Foo[] fooSlice = new Foo[0]; //private static
That initializer is useless, don't do that, just use the slice.
static immutable Foo[] getFooList() { //static method
returning an immutable slice
Actually, that
I'm writing my first D program and I want to have a class which
contains a private static list of objects.
Moreover such list should be visible from outside the class, so I
wrote a get method which returns such list as immutable (so that
the list cannot be modified outside the class).
Finally su
On Thursday, 5 July 2018 at 12:00:03 UTC, vit wrote:
On Thursday, 5 July 2018 at 09:47:32 UTC, Andre Pany wrote:
[...]
roundRobin doesn't return RandomAccessRange => chunks doesn't
return range of RandomAccessRange => Error: no [] operator
overload
try this:
string content = roundRobi
On Sunday, 1 July 2018 at 12:46:30 UTC, Timoses wrote:
On Sunday, 1 July 2018 at 11:58:30 UTC, vino.B wrote:
On Sunday, 1 July 2018 at 11:52:19 UTC, Alex wrote:
NewType.d(19): Error: function declaration without return
type. (Note that constructors are always named this)
[...]
auto coCleanFi
On Thursday, July 05, 2018 11:42:39 drug via Digitalmars-d-learn wrote:
> There were several attempts to make Qt binding for dlang, but either
> they has failed or has been stalled. It would be nice to collect that
> experience. Considering 2.081 supports C++ special member (not all but
> majority)
On Thursday, July 05, 2018 05:47:20 Flaze07 via Digitalmars-d-learn wrote:
> On Wednesday, 4 July 2018 at 16:02:25 UTC, Jonathan M Davis wrote:
> > -dip1000 fully implements scope so that it verifies that no
> > reference escapes, but it's not ready yet, let alone the
> > default behavior.
> >
> >
On Thursday, 5 July 2018 at 12:52:49 UTC, Steven Schveighoffer
wrote:
I remember there being a project for qt for D a long time ago.
I think this is it: http://www.dsource.org/projects/qtd
You may find some way to resurrect this.
And QtE5 is still active. He announced support for QML not to
On Thursday, 5 July 2018 at 12:15:35 UTC, vit wrote:
Try pure functions:
class A {}
A getA()pure @safe //pure whitout mutable parameters
guarantees that function doesn't leak data.
{
A a;
// .. do stuff with a
// not leaking a to any functions
// is this safe
re
On 7/5/18 4:42 AM, drug wrote:
There were several attempts to make Qt binding for dlang, but either
they has failed or has been stalled. It would be nice to collect that
experience. Considering 2.081 supports C++ special member (not all but
majority) isn't it time to make another attempt or the
On 7/5/18 6:32 AM, Timoses wrote:
int fun(T)(T i)
{
static assert(is(typeof(return) == T)); //true
This is the type of the return value for the function you are in.
pragma(msg, is(T == return)); // false
This is not a valid is expression, which is why it's false.
On Thursday, 5 July 2018 at 10:32:01 UTC, Timoses wrote:
int fun(T)(T i)
{
static assert(is(typeof(return) == T)); //true
pragma(msg, is(T == return)); // false
static if (is(T ReturnType == return))
pragma(msg, ReturnType); // does not enter
re
On 7/5/18 7:15 AM, Timoses wrote:
Is this safe?
class A {}
immutable(A) getA()
{
A a;
// .. do stuff with a
// not leaking a to any functions
// is this safe
return cast(immutable A)a;
}
As in @safe? no. But it's safe in the fact that you aren't escaping any
muta
On Thursday, 5 July 2018 at 11:37:16 UTC, Timoses wrote:
I think it refers to this section:
https://dlang.org/spec/expression.html#is_expression
should mention that I mean the 6th paragraph.
On Thursday, 5 July 2018 at 11:15:03 UTC, Timoses wrote:
Is this safe?
class A {}
immutable(A) getA()
{
A a;
// .. do stuff with a
// not leaking a to any functions
// is this safe
return cast(immutable A)a;
}
What if A is replaced with A[] or A[int]?
If it's not safe,
On Thursday, 5 July 2018 at 09:47:32 UTC, Andre Pany wrote:
Hi,
the purpose of this code is to generate CSV based on 3 double
arrays.
I wonder why map cannot directly use the result of the chunks
function.
import std.experimental.all;
void main()
{
double[] timestamps = [1.1];
doubl
On Thursday, 5 July 2018 at 11:37:16 UTC, Timoses wrote:
I think it refers to this section:
https://dlang.org/spec/expression.html#is_expression
I don't remember where I read this usage (think it was in a
book), but I noted it down and now I wonder how it can be used.
I saw some usage cases,
On Thursday, 5 July 2018 at 11:21:41 UTC, Alex wrote:
On Thursday, 5 July 2018 at 10:32:01 UTC, Timoses wrote:
int fun(T)(T i)
{
static assert(is(typeof(return) == T)); //true
pragma(msg, is(T == return)); // false
static if (is(T ReturnType == return))
On Thursday, 5 July 2018 at 10:32:01 UTC, Timoses wrote:
int fun(T)(T i)
{
static assert(is(typeof(return) == T)); //true
pragma(msg, is(T == return)); // false
static if (is(T ReturnType == return))
pragma(msg, ReturnType); // does not enter
re
On Thursday, 5 July 2018 at 09:47:32 UTC, Andre Pany wrote:
Is it correct that I need to call ".map!(c => c.array)"?
Kind regards
André
Well, no. It depends on how you define the formatting string.
This would also work:
´´´
import std.experimental.all;
void main()
{
double[] timestamps
Is this safe?
class A {}
immutable(A) getA()
{
A a;
// .. do stuff with a
// not leaking a to any functions
// is this safe
return cast(immutable A)a;
}
What if A is replaced with A[] or A[int]?
If it's not safe, what would be the proper way to return an
immutable insta
On 2018-07-05 08:14:18 +, Seb said:
On Thursday, 5 July 2018 at 06:35:01 UTC, Robert M. Münch wrote:
So, the only difference left is the C++ static and the additional
__ptr64 (whatever this is) on the D side. Any further ideas?
Could you post your current C++ and D files?
It's a big cod
int fun(T)(T i)
{
static assert(is(typeof(return) == T)); //true
pragma(msg, is(T == return)); // false
static if (is(T ReturnType == return))
pragma(msg, ReturnType); // does not enter
return i;
}
unittest
{
fun(3);
}
Wh
On Thursday, 5 July 2018 at 09:47:32 UTC, Andre Pany wrote:
Hi,
the purpose of this code is to generate CSV based on 3 double
arrays.
I wonder why map cannot directly use the result of the chunks
function.
import std.experimental.all;
void main()
{
double[] timestamps = [1.1];
doubl
Hi,
the purpose of this code is to generate CSV based on 3 double
arrays.
I wonder why map cannot directly use the result of the chunks
function.
import std.experimental.all;
void main()
{
double[] timestamps = [1.1];
double[] temperatures = [2.2];
double[] pressures = [3.3];
On Thursday, 5 July 2018 at 08:55:13 UTC, Timoses wrote:
Depending on your use case I see these options:
- If you have a library that defines the symbols that you are
using in the imported files you could use the dub `libs` setting
- Otherwise, if you're just using the other folder to separate
On Thursday, 5 July 2018 at 05:38:29 UTC, Flaze07 wrote:
I have a dub project, and I put the importPath to the path of
the file I want to import and the source file to the source
folder, and it appears that I have succeeded at importing the
module, but there's one problem, it appears like I nee
There were several attempts to make Qt binding for dlang, but either
they has failed or has been stalled. It would be nice to collect that
experience. Considering 2.081 supports C++ special member (not all but
majority) isn't it time to make another attempt or the problem is more
complex?
Coul
On Thursday, 5 July 2018 at 06:35:01 UTC, Robert M. Münch wrote:
So, the only difference left is the C++ static and the
additional __ptr64 (whatever this is) on the D side. Any
further ideas?
Could you post your current C++ and D files?
So, how or where could such a collection be done?
Wel
On Tuesday, 17 April 2018 at 03:26:25 UTC, Jamie wrote:
I'm attempting to use the lubeck package, as described here
https://forum.dlang.org/post/axacgiisczwvygyef...@forum.dlang.org
I have lubeck, mir-algorithm, mir-blas, mir-lapack downloaded
and accessible by the compiler, and I have install
33 matches
Mail list logo