On 02/19/2019 03:21 PM, SrMordred wrote:
> On Tuesday, 19 February 2019 at 23:03:37 UTC, Paul Backus wrote:
>> Inside a templated struct, the name of the template, by itself,
>> actually refers to the current instantiation. So when you write `Test`
>> in your __traits(isSame) test, the compiler
On Tuesday, 19 February 2019 at 22:04:58 UTC, Victor Porton wrote:
What is the right way to store in a structure a class (not an
instance) derived from a given interface(s)?
What are you trying to do with the "class"? If you just want a
static "reference" to it you can use an `alias`:
In the new era of rapid economic development, people's pursuit of
quality of life is constantly improving. More and more people are
beginning to pay attention to their quality of life. How to live
better is also the goal of happiness that people pursue. At a
time of rapid change, many new
2017 is the most crazy year in the token market, and the price is
so high that one coin is hard to get.
However, such a good phenomenon has gradually declined in 2018
and even fluctuated and affected with the collapse of Bitcoin! At
the same time, with the frequent problems of security
On Tuesday, 19 February 2019 at 11:57:00 UTC, Andre Pany wrote:
The python script generates a list of available functions in
the python package.
This list will be used to generate D coding at compilation time.
That is the reason, the error occurs in a mixin.
Unfortunately one function had the
On Tuesday, 19 February 2019 at 23:03:37 UTC, Paul Backus wrote:
On Tuesday, 19 February 2019 at 22:43:25 UTC, SrMordred wrote:
import std.traits;
import std.stdio;
struct Test(T)
{
this(T)( auto ref T value )
{
writeln( TemplateOf!(typeof(value)).stringof);
On Tuesday, 19 February 2019 at 22:43:25 UTC, SrMordred wrote:
import std.traits;
import std.stdio;
struct Test(T)
{
this(T)( auto ref T value )
{
writeln( TemplateOf!(typeof(value)).stringof);
writeln( __traits(isSame, TemplateOf!(typeof(value)), Test)
);
import std.traits;
import std.stdio;
struct Test(T)
{
this(T)( auto ref T value )
{
writeln( TemplateOf!(typeof(value)).stringof);
writeln( __traits(isSame, TemplateOf!(typeof(value)), Test) );
}
}
void main(){
auto value =
What is the right way to store in a structure a class (not an
instance) derived from a given interface(s)?
On Monday, 18 February 2019 at 16:32:26 UTC, belkin wrote:
Additional question as a beginner. What do I need to install to
get started.
Obviously I need a compiler (which one is best ). But I also
want an IDE and so far it seems Visual D would be a best choice.
Ideas?
Visual D works well,
On Tuesday, 19 February 2019 at 18:56:01 UTC, Paul Backus wrote:
On Tuesday, 19 February 2019 at 18:37:22 UTC, Matthew_Blake
wrote:
Hi there,
is the concept of generators (like in Python, using yield)
available in D? If so, where can I find information?
Regards
Generally speaking, things
On Tuesday, 19 February 2019 at 18:37:22 UTC, Matthew_Blake wrote:
Hi there,
is the concept of generators (like in Python, using yield)
available in D? If so, where can I find information?
Regards
Generally speaking, things that are generators in Python are
implemented as ranges [1] in D.
On Tuesday, 19 February 2019 at 18:37:22 UTC, Matthew_Blake wrote:
Hi there,
is the concept of generators (like in Python, using yield)
available in D? If so, where can I find information?
Regards
I do not know python well, but do you search for this one?
Hi there,
is the concept of generators (like in Python, using yield)
available in D? If so, where can I find information?
Regards
19.02.2019 19:55, Alex пишет:
On Tuesday, 19 February 2019 at 16:44:23 UTC, drug wrote:
On 19.02.2019 19:35, Alex wrote:
On Tuesday, 19 February 2019 at 16:26:33 UTC, drug wrote:
Well, I understand that using floating point values to represent
time internally is a bad idea and I totally
On Tuesday, 19 February 2019 at 16:44:23 UTC, drug wrote:
On 19.02.2019 19:35, Alex wrote:
On Tuesday, 19 February 2019 at 16:26:33 UTC, drug wrote:
Well, I understand that using floating point values to
represent time internally is a bad idea and I totally agree.
But some convenient API to
On 19.02.2019 19:35, Alex wrote:
On Tuesday, 19 February 2019 at 16:26:33 UTC, drug wrote:
Well, I understand that using floating point values to represent time
internally is a bad idea and I totally agree. But some convenient API
to convert Duration to floating point and vice versa would be
On 19.02.2019 19:19, Kagamin wrote:
On Tuesday, 19 February 2019 at 15:30:22 UTC, Atila Neves wrote:
I keep hearing how const is nigh unusable in D, and except for ranges
I litter my code with const everywhere, pretty much just as often as I
used in C++.
I once spent a good amount of effort
On Tuesday, 19 February 2019 at 16:26:33 UTC, drug wrote:
Well, I understand that using floating point values to
represent time internally is a bad idea and I totally agree.
But some convenient API to convert Duration to floating point
and vice versa would be useful because in mechanics for
On 19.02.2019 18:07, Dennis wrote:
On Tuesday, 19 February 2019 at 14:34:09 UTC, drug wrote:
Now I do it this way (https://run.dlang.io/is/8kVibT):
```
auto some_duration = dur!"msecs"(500);
auto seconds = some_duration.total!"hnsecs" / 10_000_000.0;
On Tuesday, 19 February 2019 at 15:30:22 UTC, Atila Neves wrote:
I keep hearing how const is nigh unusable in D, and except for
ranges I litter my code with const everywhere, pretty much just
as often as I used in C++.
I once spent a good amount of effort to annotate my code with
pure and
On Wednesday, 13 February 2019 at 16:40:18 UTC, H. S. Teoh wrote:
On Wed, Feb 13, 2019 at 11:32:46AM +, envoid via
Digitalmars-d-learn wrote:
[...]
Const in D is very restrictive because it's supposed to provide
real compiler guarantees, i.e., it's statically verifiable that
the data
On Tuesday, 19 February 2019 at 14:34:09 UTC, drug wrote:
Now I do it this way (https://run.dlang.io/is/8kVibT):
```
auto some_duration = dur!"msecs"(500);
auto seconds = some_duration.total!"hnsecs" / 10_000_000.0;
assert(seconds.approxEqual(0.5));
```
is there better
Now I do it this way (https://run.dlang.io/is/8kVibT):
```
auto some_duration = dur!"msecs"(500);
auto seconds = some_duration.total!"hnsecs" / 10_000_000.0;
assert(seconds.approxEqual(0.5));
```
is there better way to do it?
Thanks in advance
On Tuesday, 19 February 2019 at 11:40:09 UTC, Per Nordlöw wrote:
Is `formatValue` more lightweight to the compiler?
I already posted a very similar question at
https://forum.dlang.org/post/xsovipkjyjyumtyzm...@forum.dlang.org
but in this thread I'm interested in knowing if is there is any
On Tuesday, 19 February 2019 at 00:05:46 UTC, Samir wrote:
On Monday, 18 February 2019 at 21:50:25 UTC, Andre Pany wrote:
In the meantime you could adapt the python script on your
local file system in the dub packages cache folder as
described here
Is `formatValue` also preferred over `formattedWrite` when
writing a single value?
Code example:
import std.array : appender;
auto writer1 = appender!string();
writer1.formattedWrite("%08b", 42);
auto writer2 = appender!string();
auto f = singleSpec("%08b");
writer2.formatValue(42, f);
Is
On Monday, 18 February 2019 at 19:34:31 UTC, Seb wrote:
On Monday, 18 February 2019 at 16:32:26 UTC, belkin wrote:
I am trying to install the compiler and get started on
learning D again ( attempted and stopped way back )
This is the error message I am getting. I am on Windows 10.
Windows
28 matches
Mail list logo