On 08/04/2017 7:46 AM, Jethro wrote:
I have a custom type and I'm trying to do things like
x~1 and 1~x.
I can get x~1 no problem by overriding the op "~" but how to I get 1~x
to convert 1 in to typeof(x)? instead of x in to typeof(1) so to speak?
I really want D to realize that 1~x is suppose
I have a custom type and I'm trying to do things like
x~1 and 1~x.
I can get x~1 no problem by overriding the op "~" but how to I
get 1~x to convert 1 in to typeof(x)? instead of x in to
typeof(1) so to speak?
I really want D to realize that 1~x is suppose to use ~ of x, not
1.
On Friday, 7 April 2017 at 10:26:24 UTC, ANtlord wrote:
On Friday, 7 April 2017 at 07:46:40 UTC, Ali Çehreli wrote:
[...]
I can't understand. Documentation of cartesianProduct points
out about finite arrays. At least one of arrays must be a
inifinte array. As far as I know finite arrays is `
On 04/07/2017 04:47 PM, biocyberman wrote:
I want to use mixin to generate function in-place. In template
declaration, I can see 'mixin' keyword is optional. Is it true? What is
the difference and when I must use one way over another?
This is my program:
// This works with and without 'mixin' a
I want to use mixin to generate function in-place. In template
declaration, I can see 'mixin' keyword is optional. Is it true?
What is the difference and when I must use one way over another?
This is my program:
// This works with and without 'mixin' attribute.
mixin template funcgen(T, U){
On Friday, 7 April 2017 at 17:06:31 UTC, Russel Winder wrote:
Simple Dub build of a Factorial example using Unit-Threaded for
testing. Works fine with ldc2 breaks with dmd. This is on
Debian Sid fully up to date.
|> ldc2 --version
LDC - the LLVM D compiler (1.1.1):
based on DMD v2.071.2 and
On 04/07/2017 11:19 AM, Yuxuan Shui wrote:
> On Thursday, 6 April 2017 at 18:45:26 UTC, Ali Çehreli wrote:
>> On 04/06/2017 11:37 AM, Russel Winder via Digitalmars-d-learn wrote:
>>> [...]
>>
>> I think it's just a design choice. C implicitly converts the name of
>> the function to a pointer to th
On Friday, 7 April 2017 at 17:06:31 UTC, Russel Winder wrote:
If anyone has any useful intelligence as to what happening and
how I
can workaround it, I'd be a grateful bunny.
You might want to check with LDC from Git master first to see
whether it is in fact a 2.073-related problem. — David
On Friday, 7 April 2017 at 17:06:31 UTC, Russel Winder wrote:
Simple Dub build of a Factorial example using Unit-Threaded for
testing. Works fine with ldc2 breaks with dmd.
Can you post the code your using?
On Thursday, 6 April 2017 at 18:45:26 UTC, Ali Çehreli wrote:
On 04/06/2017 11:37 AM, Russel Winder via Digitalmars-d-learn
wrote:
[...]
I think it's just a design choice. C implicitly converts the
name of the function to a pointer to that function. D requires
the explicit & operator:
alia
Simple Dub build of a Factorial example using Unit-Threaded for
testing. Works fine with ldc2 breaks with dmd. This is on Debian Sid
fully up to date.
|> ldc2 --version
LDC - the LLVM D compiler (1.1.1):
based on DMD v2.071.2 and LLVM 3.9.1
built with LDC - the LLVM D compiler (1.1.0)
Defau
On Thu, 2017-04-06 at 11:45 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
>
[…]
> I think it's just a design choice. C implicitly converts the name of
> the
> function to a pointer to that function. D requires the explicit &
> operator:
One of the dangers of being a bit like and a replacemen
On Wednesday, 5 April 2017 at 22:05:07 UTC, H. S. Teoh wrote:
If you are doing lots of concatenation and produce a single big
string at the end, take a look at std.array.appender.
Though if you're concerned about performance, you really should
run a profiler. Last I heard, appender may not be
On Friday, 7 April 2017 at 07:46:40 UTC, Ali Çehreli wrote:
Here is a solution:
auto objectFactory(ObjectType, Args...)(Args args) {
import std.algorithm : cartesianProduct, map;
import std.array : array;
return cartesianProduct(args).map!(a =>
ObjectType(a.expand)).array;
}
str
On Thu, 2017-04-06 at 18:45 +, Adam D. Ruppe via Digitalmars-d-
learn wrote:
> On Thursday, 6 April 2017 at 18:37:51 UTC, Russel Winder wrote:
> > I am used to a function name being a reference to the function
> > body, cf. lots of other languages. However D rejects:
> >
> > iterative
>
On Thursday, 6 April 2017 at 13:49:11 UTC, Russel Winder wrote:
Is there any need for the unittest block in the application
created to run the integration tests?
If you don't care to call each and all of them by hand. Test
frameworks are handy for extensive testing, builtin unittests
work bes
On Friday, 7 April 2017 at 07:46:40 UTC, Ali Çehreli wrote:
Here is a solution:
auto objectFactory(ObjectType, Args...)(Args args) {
import std.algorithm : cartesianProduct, map;
import std.array : array;
return cartesianProduct(args).map!(a =>
ObjectType(a.expand)).array;
}
str
06.04.2017 19:34, Russel Winder via Digitalmars-d-learn пишет:
I am still wondering about separating integration and system tests out
of the module source leaving the unit tests in the module source.
I do this. I have unittests in the module sources and have a separate
subpackage intended for
On 04/06/2017 10:43 PM, ANtlord wrote:
Hello! I've got an issue related to making a Tuple or AliasSeq using
income template arguments. I want to create template makes an array of
objects from array of arrays have different sizes and different types of
values.
Here is a solution:
auto objectFac
I'm going to give you a very bad but still a good place to begin with
explanation.
So, what is an executable? Well in modern operating systems that is a
file with a very complex structure inside, like PE-COFF or ELF. It has a
bunch of things as part of this, a dynamic relocation table, section
On Thursday, 6 April 2017 at 17:39:15 UTC, Stefan Koch wrote:
On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote:
Hi,
How can I build single exe application with vibe.d (windows)?
now it require zlib.dll, libeay32.dll and ssleay32.dll
But I need it as single app.
One solution would be
21 matches
Mail list logo