https://github.com/dlang/dmd/blob/master/samples/listener.d
Can some one add more comment to that example?
I need to make code that connects to local application, very
similar to this.
Assumptions:
1. Create an application that listens to arguments.
2. Create an application that will send arg
For me, it seems that for generality you should always add ref
into foreach loop variable. The reason is this:
import std.experimental.all;
struct NoCopies
{ @disable this(this);
int payload;
}
void main()
{ auto range = new NoCopies[20];
foreach(const ref el; range) el.payload.wri
On Thursday, 30 August 2018 at 21:40:40 UTC, Everlast wrote:
On Thursday, 30 August 2018 at 00:10:42 UTC, Paul Backus wrote:
[...]
This is not true! You claim that I'm making a blanket statement
about what mathematicians would view then you do the same.
[...]
If ... implies "an arbitrary
On Thursday, 30 August 2018 at 12:04:26 UTC, vit wrote:
On Thursday, 30 August 2018 at 11:34:36 UTC, Andrey wrote:
On Thursday, 30 August 2018 at 11:09:40 UTC, vit wrote:
[...]
I want to create a reusable template for this purpose.
Why I can't use "staticMap" so that compiler it self would do
On Friday, 31 August 2018 at 10:51:51 UTC, Andrey wrote:
On Thursday, 30 August 2018 at 12:04:26 UTC, vit wrote:
On Thursday, 30 August 2018 at 11:34:36 UTC, Andrey wrote:
On Thursday, 30 August 2018 at 11:09:40 UTC, vit wrote:
[...]
I want to create a reusable template for this purpose.
Why
On Friday, 31 August 2018 at 12:21:48 UTC, aliak wrote:
auto ToUnderlyingType(alias a)() {
return cast(OriginalType!(typeof(a)))a;
}
void print(T...)(T args) {
writeln(staticMap!(ToUnderlyingType, args));
}
Oohhh. So easy! Killed 2 days - and templates and mixins tried...
And the sol
On Friday, 31 August 2018 at 09:59:20 UTC, Dukc wrote:
For me, it seems that for generality you should always add ref
into foreach loop variable. The reason is this:
import std.experimental.all;
struct NoCopies
{ @disable this(this);
int payload;
}
void main()
{ auto range = new NoCop
On Thursday, 30 August 2018 at 10:34:33 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 12:47:45 UTC, Nicholas Wilson
wrote:
On Monday, 27 August 2018 at 09:57:18 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 09:41:34 UTC, 9il wrote:
On Monday, 27 August 2018 at 08:25:14 UTC, Sobaya wrote:
On Friday, 31 August 2018 at 12:52:17 UTC, bauss wrote:
So basically ... Instead of copying the value, you're just
copying the address.
I can't see the benefit other than added complexity.
I assume a benefit could be observed if you are copying a large
struct instead of an int.
On Friday, 31 August 2018 at 06:20:09 UTC, James Blachly wrote:
Hi all,
I am linking to a C library which defines a symbol,
const char seq_nt16_str[] = "=ACMGRSVTWYHKDBN";
In the C sources, this is an array of 16 bytes (17 I guess,
because it is written as a string).
In the C headers, it is
On Friday, 31 August 2018 at 12:52:17 UTC, bauss wrote:
In reality you're micro-optimizing something that doesn't
require it.
I think you misunderstood. I wasn't trying to optimize, I was
looking for a general way to iterate.
I can't see the benefit other than added complexity.
I just exp
On 8/31/18 1:18 PM, Neia Neutuladh wrote:
On Friday, 31 August 2018 at 06:20:09 UTC, James Blachly wrote:
Hi all,
I am linking to a C library which defines a symbol,
const char seq_nt16_str[] = "=ACMGRSVTWYHKDBN";
In the C sources, this is an array of 16 bytes (17 I guess, because it
is writ
On 8/31/18 2:20 AM, James Blachly wrote:
Hi all,
I am linking to a C library which defines a symbol,
const char seq_nt16_str[] = "=ACMGRSVTWYHKDBN";
In the C sources, this is an array of 16 bytes (17 I guess, because it
is written as a string).
In the C headers, it is listed as extern const
On Friday, 31 August 2018 at 07:38:54 UTC, Marcin wrote:
https://github.com/dlang/dmd/blob/master/samples/listener.d
Can some one add more comment to that example?
I need to make code that connects to local application, very
similar to this.
Assumptions:
1. Create an application that listens
On Friday, 31 August 2018 at 06:20:09 UTC, James Blachly wrote:
Hi all,
I am linking to a C library which defines a symbol,
const char seq_nt16_str[] = "=ACMGRSVTWYHKDBN";
In the C sources, this is an array of 16 bytes (17 I guess,
because it is written as a string).
In the C headers, it is
On Friday, 31 August 2018 at 17:18:58 UTC, Neia Neutuladh wrote:
On Friday, 31 August 2018 at 06:20:09 UTC, James Blachly wrote:
Hi all,
...
When linking to this library from D, I have declared it as:
extern __gshared const(char)* seq_nt16_str;
***But this segfaults when I treat it like an a
On Friday, 31 August 2018 at 17:50:17 UTC, Steven Schveighoffer
wrote:
What the C compiler is doing is storing it as data, and then
storing the symbol to point at the first element in the data.
When you use const char* in D, it's expecting a *pointer* to be
stored at that address, not the data
17 matches
Mail list logo