On Tuesday, 21 November 2017 at 10:04:50 UTC, Petar Kirov
[ZombineDev] wrote:
File a bug report and try contacting Martin Nowak, as he's the
author of this test, IIRC.
https://issues.dlang.org/show_bug.cgi?id=18013
On Sunday, 26 November 2017 at 01:35:01 UTC, Dave Jones wrote:
So it makes it a const/immutable/mutable method depending on
whether the instance it is called on is const/immutable/mutable?
On the outside, yes.
So
@property ref inout(int) front() inout {
return i++;
}
Would
On Saturday, 25 November 2017 at 21:59:54 UTC, Ali Çehreli wrote:
On 11/25/2017 01:51 PM, Dave Jones wrote:
> What does the "inout" after front() do here...
>
>
> @property ref inout(T) front() inout
> {
> assert(_data.refCountedStore.isInitialized);
> return _data._payload[0];
> }
>
>
On Saturday, 25 November 2017 at 22:45:03 UTC, Ali Çehreli wrote:
Despite 'lazy', apparently my failed attempt had eager
arguments:
void when(lazy bool[] args...) {
Yeah, I'm tempted to say that is a bug... I doubt anyone has
combined lazy with T[]... like this before - especially since the
On Saturday, 25 November 2017 at 22:43:30 UTC, A Guy With a
Question wrote:
Actually ignore that last comment, they are producing libs not
dlls. Funny how all three ways of linking work...
On Windows, when building a DLL, compilers typically produce an
"import library" alongside it, which ha
On 11/25/2017 02:05 PM, Adam D. Ruppe wrote:
On Saturday, 25 November 2017 at 21:42:29 UTC, Ali Çehreli wrote:
I tried to implement the following but gave up because I could not
ensure short circuit behaviour.
when(
c1.then(foo()),
c2.then(bar()),
otherwise(zar())
On Saturday, 25 November 2017 at 22:40:49 UTC, A Guy With a
Question wrote:
On Saturday, 25 November 2017 at 22:36:32 UTC, A Guy With a
Question wrote:
On Saturday, 25 November 2017 at 22:31:10 UTC, Mike Parker
wrote:
On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a
Question wrote:
On Saturday, 25 November 2017 at 22:36:32 UTC, A Guy With a
Question wrote:
On Saturday, 25 November 2017 at 22:31:10 UTC, Mike Parker
wrote:
On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a
Question wrote:
That's how I set up the linking in Visual D. Everything
builds. But shoul
On Saturday, 25 November 2017 at 22:31:10 UTC, Mike Parker wrote:
On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a
Question wrote:
That's how I set up the linking in Visual D. Everything
builds. But should the final exe try to link against all 3
libraries, library 3 link to libra
On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a
Question wrote:
That's how I set up the linking in Visual D. Everything builds.
But should the final exe try to link against all 3 libraries,
library 3 link to library 1 & 2 and library 2 link to library 1
(also builds)? Or is the
On Saturday, 25 November 2017 at 22:13:43 UTC, Adam D. Ruppe
wrote:
On Saturday, 25 November 2017 at 16:16:52 UTC, A Guy With a
Question wrote:
If D chooses it's defaults to make errors stick out, why not
just error at declaration if they don't explicitly set it to
something.
It technically d
Hi,
So I got this working, I would just like to see if I have done
this correctly or if it's just working out of a fluke. I am using
Visual D. Lets say I have four projects:
Library 1: Common Library
Library 2: Base Service Library - Dependent on the Common Library.
Library 3: More Specified
On Saturday, 25 November 2017 at 16:16:52 UTC, A Guy With a
Question wrote:
If D chooses it's defaults to make errors stick out, why not
just error at declaration if they don't explicitly set it to
something.
It technically did:
https://dlang.org/spec/function.html#local-variables
"It is an
On Saturday, 25 November 2017 at 21:42:29 UTC, Ali Çehreli wrote:
I tried to implement the following but gave up because I could
not ensure short circuit behaviour.
when(
c1.then(foo()),
c2.then(bar()),
otherwise(zar())
);
Possible?
Bones: "Perhaps the profess
On Saturday, 25 November 2017 at 21:51:41 UTC, Dave Jones wrote:
What does the "inout" after front() do here...
Applies the `inout` modifier to the hidden `this` variable inside
the function.
https://dlang.org/spec/function.html#inout-functions
It basically makes it const inside the functio
On 11/25/2017 01:51 PM, Dave Jones wrote:
> What does the "inout" after front() do here...
>
>
> @property ref inout(T) front() inout
> {
> assert(_data.refCountedStore.isInitialized);
> return _data._payload[0];
> }
>
> Cant seem to find an explanation in the docs or forums :(
It's for
What does the "inout" after front() do here...
@property ref inout(T) front() inout
{
assert(_data.refCountedStore.isInitialized);
return _data._payload[0];
}
Cant seem to find an explanation in the docs or forums :(
On 11/23/2017 06:16 AM, Andrea Fontana wrote:
On Thursday, 23 November 2017 at 13:47:37 UTC, Adam D. Ruppe wrote:
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
for instance in kotlin it can be replace with this:
when {
c1 -> foo(),
c2 -> bar(),
c3 -> ...
else ->
Nonetheless, my original question was answered. Thanks for the
insights!
On Saturday, 25 November 2017 at 09:39:15 UTC, Dave Jones wrote:
On Friday, 24 November 2017 at 22:38:49 UTC, Jonathan M Davis
wrote:
On Friday, November 24, 2017 20:43:14 A Guy With a Question
via Digitalmars- d-learn wrote:
On Friday, 24 November 2017 at 14:43:24 UTC, Adam D. Ruppe
That requi
On Saturday, 25 November 2017 at 15:38:15 UTC, Adam D. Ruppe
wrote:
nope. It'd be indistinguishable from the user just happening to
initialize it to some random value.
Thanks. I'll got with .init instead.
On Saturday, 25 November 2017 at 15:34:21 UTC, John Chapman wrote:
Is there any way of determining whether a variable has been
initialized or not? For example, if something is declared like
this:
nope. It'd be indistinguishable from the user just happening to
initialize it to some random valu
On 25/11/2017 3:34 PM, John Chapman wrote:
Is there any way of determining whether a variable has been initialized
or not? For example, if something is declared like this:
int x = void;
can I check if it's void before I use it, say, in a function it's been
passed to?
`` = void;`` isn't n
Is there any way of determining whether a variable has been
initialized or not? For example, if something is declared like
this:
int x = void;
can I check if it's void before I use it, say, in a function it's
been passed to?
I've been using ndslice for some timeseries work and it's
incredibly good.
One question which I couldn't find an answer to: Can ndslice
behave as a scalar (ie: 0-dimensional slice)?
It would be convenient if that is possible since then I won't
have to write different functions for scalars an
On Saturday, 25 November 2017 at 10:08:36 UTC, vit wrote:
On Saturday, 25 November 2017 at 09:52:01 UTC, Chirs Forest
wrote:
[...]
import std.meta : staticMap;
class Bar(T) {
T bar;
}
class Foo(Ts...){
staticMap!(Bar, Ts) bars;
this(){
static foreach(i, alias T; Ts) bars
On Saturday, 25 November 2017 at 09:52:01 UTC, Chirs Forest wrote:
I'd like to make a class that takes multiple template types (1
- several) which can hold an array/tuple of a second class that
are instantiated with those types.
class Bar(T) {
T bar;
}
class Foo(T[]){ // not sure how to t
I'd like to make a class that takes multiple template types (1 -
several) which can hold an array/tuple of a second class that are
instantiated with those types.
class Bar(T) {
T bar;
}
class Foo(T[]){ // not sure how to take variadic types here?
Bar!(?)[] bars; //not sure how I'd defi
On Friday, 24 November 2017 at 22:38:49 UTC, Jonathan M Davis
wrote:
That requires data flow analysis, which the compiler doesn't do
a lot of, because it can be complicated.
If dataflow is sufficient then it isn't all that complicated, you
can implement generic dataflow using Monotone Framewor
On Friday, 24 November 2017 at 22:38:49 UTC, Jonathan M Davis
wrote:
On Friday, November 24, 2017 20:43:14 A Guy With a Question via
Digitalmars- d-learn wrote:
On Friday, 24 November 2017 at 14:43:24 UTC, Adam D. Ruppe
That requires data flow analysis, which the compiler doesn't do
a lot of, b
30 matches
Mail list logo