oooh... I used
str = std.readln();
to get my string and there must have been some other sign, line
break or whitespace or something at the end :(
Now I understand it, thx
On Wednesday, 19 February 2020 at 07:04:48 UTC, Namal wrote:
Hello, I wanted to remove the lastchar in a string and figured
that you can do that wit
str = str[0..$-2];
but why is
str = str[0..$] and str=str[0..$-1]
the same ?
Why do you think that they are the same?
$ rdmd --eval 'auto
What's the current state of MIPS compiling for bare metal?
Especially the R4300i processor. I see MIPS on both GDC and LDC
"partial support/bare metal" lists but them being somewhat vague
about it I'm not quite sure which it means and I'm sure by now
the processors and instruction sets are
Hello, I wanted to remove the lastchar in a string and figured
that you can do that wit
str = str[0..$-2];
but why is
str = str[0..$] and str=str[0..$-1]
the same ?
On Tuesday, 18 February 2020 at 18:05:43 UTC, AlphaPurned wrote:
json has two issues, it doesn't work with tuple:
(isArray!T)
goes to
(isArray!T || (T.stringof.length > 4 && T.stringof[0..5] ==
"Tuple"))
and right below
else
{
static assert(false, text(`unable
json has two issues, it doesn't work with tuple:
(isArray!T)
goes to
(isArray!T || (T.stringof.length > 4 && T.stringof[0..5] ==
"Tuple"))
and right below
else
{
static assert(false, text(`unable to convert type "`,
T.Stringof, `" to json`));
}
and it
Hello!
Say I have a struct where every member function can either be
static or not depending on a template parameter. Is there a
simple way to do this? Like, for example:
struct Foo(Condition)
{
static if (Condition) static:
void Bar() {}
void Baz() {}
}
On Tuesday, 18 February 2020 at 13:07:35 UTC, wjoe wrote:
I have a function add(index, data) which throws RangeError if
the index is invalid.
Never mind. For whatever reason RangeError is now caught. Sorry
for the noise.
On Tuesday, 18 February 2020 at 12:43:22 UTC, Adnan wrote:
class Wife(uint N) : Female {
FemaleID engagedTo = -1;
const MaleID[N] preferences;
this(MaleID[N] preferences) {
this.preferences = preferences;
}
}
void engage(N)(ref Wife!N, wife, ref Husband!N husband) {
I have a function add(index, data) which throws RangeError if the
index is invalid.
unittest { // is supposed to test that RangeError is thrown on a
range violation
assertThrown!RangeError(add(size_t.max, something)); //which
doesn't work, the test is killed with core.exception.RangeError:
On Tuesday, 18 February 2020 at 12:37:45 UTC, Adnan wrote:
I have a base class that has a couple of constant member
variables. These variables are abstract, they will only get
defined when the derived class gets constructed.
class Person {
const string name;
const int id;
}
class
On Tuesday, 18 February 2020 at 12:43:22 UTC, Adnan wrote:
What is the alternative to C++'s friend functions in D?
module stable_matching;
alias FemaleID = int;
alias MaleID = int;
class Person {
string name;
int id;
}
class Male : Person {
this(string name = "Unnamed Male") {
On Tuesday, 18 February 2020 at 12:37:45 UTC, Adnan wrote:
I have a base class that has a couple of constant member
variables. These variables are abstract, they will only get
defined when the derived class gets constructed.
class Person {
const string name;
const int id;
}
class
What is the alternative to C++'s friend functions in D?
module stable_matching;
alias FemaleID = int;
alias MaleID = int;
class Person {
string name;
int id;
}
class Male : Person {
this(string name = "Unnamed Male") {
static int nextID = 0;
this.id = nextID++;
I have a base class that has a couple of constant member
variables. These variables are abstract, they will only get
defined when the derived class gets constructed.
class Person {
const string name;
const int id;
}
class Male : Person {
this(string name = "Unnamed Male") {
On Tuesday, 18 February 2020 at 03:33:21 UTC, Basile B. wrote:
On Monday, 17 February 2020 at 22:34:31 UTC, Stefan Koch wrote:
Upon seeing this I just implemented typeid(stuff).name;
https://github.com/dlang/dmd/pull/10796
With any luck this will be possible in the next release ;)
Can this
On Tuesday, 18 February 2020 at 09:20:08 UTC, Andre Pany wrote:
Hi Petar,
Hi Andre, I'm happy to help :)
thank you very much for the explanation and the code sample.
Filling the az_span anonymous member was the tricky part,
I thought it would be not possible to do so, but you showed me
the
On Monday, 17 February 2020 at 19:02:50 UTC, Stefan Koch wrote:
Sorry I just realized I never published the code.
I am going to add it to ctfeutils.
Thank you very much
On Tuesday, 18 February 2020 at 08:32:47 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 18 February 2020 at 05:41:38 UTC, Andre Pany wrote:
Hi,
I try to get wrap the "Azure SDK for C" using DPP and have
following issue.
Functions, which are actually implemented in C header files
will cause
On Tuesday, 18 February 2020 at 05:41:38 UTC, Andre Pany wrote:
Hi,
I try to get wrap the "Azure SDK for C" using DPP and have
following issue.
Functions, which are actually implemented in C header files
will cause
linker errors:
20 matches
Mail list logo