Everything is fine until I try to instantiate Tuples with my
arrays. Then I get an error that says none of the overloads of
the constructor are callable with these arguments. But I see
this: http://dlang.org/phobos/std_typecons.html#.Tuple.this.2 ,
which makes me think it should work. Am I do
On 6/1/15 8:36 PM, Hugo wrote:
On Tuesday, 2 June 2015 at 00:00:43 UTC, Steven Schveighoffer wrote:
On 6/1/15 7:16 PM, Hugo wrote:
Thanks! Is there a way to specify a source base different than 10?
A "source base"? the source base is always binary :)
If you want to go between base string rep
On Tuesday, 2 June 2015 at 00:00:43 UTC, Steven Schveighoffer
wrote:
On 6/1/15 7:16 PM, Hugo wrote:
Thanks! Is there a way to specify a source base different than
10?
A "source base"? the source base is always binary :)
If you want to go between base string representation, there is
parse for
auto result = input
.splitter(',')
.map!splitter
.joiner
.map!(to!int)
.chunks(2)
.map!array
.array
.sort()
.retro;
Thanks for th
On 6/1/15 7:16 PM, Hugo wrote:
On Monday, 1 June 2015 at 19:53:50 UTC, Steven Schveighoffer wrote:
On 6/1/15 3:43 PM, Hugo wrote:
How could I convert a number form binary to an arbitrary base like 19 or
23?
import std.conv;
to!(string)(100, 19); // "55"
Thanks! Is there a way to specify a
On Monday, 1 June 2015 at 22:31:38 UTC, Adam wrote:
Hi,
I have a string of pairs of integers, where pairs are delimited
from each other by commas, and members of the pair are
delimited by a space. I'd like to end up with something like a
range of 2-tuples
I can offer this option:
import st
On 06/01/2015 03:31 PM, Adam wrote:
Hi,
I have a string of pairs of integers, where pairs are delimited from
each other by commas, and members of the pair are delimited by a space.
I'd like to end up with something like a range of 2-tuples, which I can
then sort with a lambda. I'm running into p
On Monday, 1 June 2015 at 19:53:50 UTC, Steven Schveighoffer
wrote:
On 6/1/15 3:43 PM, Hugo wrote:
How could I convert a number form binary to an arbitrary base
like 19 or
23?
import std.conv;
to!(string)(100, 19); // "55"
Thanks! Is there a way to specify a source base different than 10?
On Sunday, 31 May 2015 at 04:02:19 UTC, Timothee Cour wrote:
Is there a way to alias attributes?
alias my_alias=pure nothrow @trusted @nogc;
asm @my_alias {...}
I'm not sure if this will work for you, but check out the last
part of this post:
http://forum.dlang.org/post/sfwtxngbiamlketod...@
Hi,
I have a string of pairs of integers, where pairs are delimited
from each other by commas, and members of the pair are delimited
by a space. I'd like to end up with something like a range of
2-tuples, which I can then sort with a lambda. I'm running into
problems trying to do this, after
On 6/1/15 3:43 PM, Hugo wrote:
How could I convert a number form binary to an arbitrary base like 19 or
23?
import std.conv;
to!(string)(100, 19); // "55"
-Steve
How could I convert a number form binary to an arbitrary base
like 19 or 23?
On 2015-06-01 16:54:58 +, Alex Parrill said:
Are you sure that it's not the calls to `isEmpty`? Check if spec,
lvars, or anything that `isEmpty` uses are null.
Yep, I was confused by my own naming. I don't have to check against
isEmpty but instead "... is null" ...
--
Robert M. Münch
ht
On Monday, 1 June 2015 at 17:19:50 UTC, Robert M. Münch wrote:
Isn't the construtor of the contained types run when the class
is constructed? Or do I need to explicitly initialize the
contained types on my own?
(haven't touched the OO part of D yet so much)
Classes are not automatically cr
On 6/1/15 1:19 PM, Robert M. Münch wrote:
On 2015-06-01 17:06:27 +, Kapps said:
Chances are very good that it's the code within the if statement,
classes are null by default, you're checking if null isEmpty, thus
getting a segfault.
Isn't the construtor of the contained types run when the
On 2015-06-01 17:06:27 +, Kapps said:
Chances are very good that it's the code within the if statement,
classes are null by default, you're checking if null isEmpty, thus
getting a segfault.
Isn't the construtor of the contained types run when the class is
constructed? Or do I need to ex
On Monday, 1 June 2015 at 16:52:30 UTC, Robert M. Münch wrote:
I'm a bit confused... I have the following class:
class foo : superFoo {
aFoo spec;
aFoo lvars;
aFoo bdy;
override string toString(){
if(spec.isEmpty() && lvars.isEmpty()){
return "does spec";
}
if(lvars.isEmpty()){
On Monday, 1 June 2015 at 16:52:30 UTC, Robert M. Münch wrote:
I'm a bit confused... I have the following class:
class foo : superFoo {
aFoo spec;
aFoo lvars;
aFoo bdy;
override string toString(){
if(spec.isEmpty() && lvars.isEmpty()){
return "does spec";
}
if(lvars.isEmpty()){
I'm a bit confused... I have the following class:
class foo : superFoo {
aFoo spec;
aFoo lvars;
aFoo bdy;
override string toString(){
if(spec.isEmpty() && lvars.isEmpty()){
return "does spec";
}
if(lvars.isEmpty()){
return "funct spec";
}
return "function spec";
}
}
19 matches
Mail list logo