On Sunday, August 19, 2018 9:08:39 PM MDT Nick Sabalausky (Abscissa) via
Digitalmars-d-learn wrote:
> On 08/19/2018 10:23 PM, Jonathan M Davis wrote:
> > On Sunday, August 19, 2018 6:33:06 PM MDT Nick Sabalausky (Abscissa) via
> >
> > Digitalmars-d-learn wrote:
> >> Maybe something involving
On Monday, 20 August 2018 at 00:27:04 UTC, Nick Sabalausky
(Abscissa) wrote:
Suppose I've wrapped a Variant in a struct/class which ensures
the Variant *only* ever contains types which satisfy a
particular constraint (for example: isInputRange, or hasLength,
etc...).
Is there a way to call a
On 08/19/2018 10:23 PM, Jonathan M Davis wrote:
On Sunday, August 19, 2018 6:33:06 PM MDT Nick Sabalausky (Abscissa) via
Digitalmars-d-learn wrote:
Maybe something involving using Variant.coerce to convert the payload to
a single common type? Not sure how I would do that though.
You could
hi,
I thinks D need an ORM library for Sqlite/Mysql/PostgreSQL,
entity currently support all the three targets, but entity's API
is too complex and cumbersome for using.
Is there a more light-weight and simpler implementation like
ActiveAndroid ?
Thanks!
---
Binghoo Dang
On Monday, 13 August 2018 at 13:20:25 UTC, Seb wrote:
BTW it's very uncommon for empty to do work, it's much more
common to do such lazy initialization in `.front`.
Thanks Seb, that entire reply is a huge help.
By lazy initialization in `.front`, do you mean that I should
find a way for
On Sunday, August 19, 2018 6:33:06 PM MDT Nick Sabalausky (Abscissa) via
Digitalmars-d-learn wrote:
> On 08/19/2018 08:27 PM, Nick Sabalausky (Abscissa) wrote:
> > Suppose I've wrapped a Variant in a struct/class which ensures the
> > Variant *only* ever contains types which satisfy a particular
On Sunday, August 19, 2018 12:32:17 PM MDT QueenSvetlana via Digitalmars-d-
learn wrote:
> In the D Style Guide, it says:
>
> Properties
> https://dlang.org/dstyle.html#properties
>
> Functions should be property functions whenever appropriate. In
> particular, getters and setters should generally
On 08/19/2018 08:27 PM, Nick Sabalausky (Abscissa) wrote:
Suppose I've wrapped a Variant in a struct/class which ensures the
Variant *only* ever contains types which satisfy a particular constraint
(for example: isInputRange, or hasLength, etc...).
Is there a way to call a function (ex:
Suppose I've wrapped a Variant in a struct/class which ensures the
Variant *only* ever contains types which satisfy a particular constraint
(for example: isInputRange, or hasLength, etc...).
Is there a way to call a function (ex: popFront) on the Variant,
*without* knowing ahead of time all
On Sunday, 19 August 2018 at 16:03:06 UTC, QueenSvetlana wrote:
On Sunday, 19 August 2018 at 15:53:25 UTC, Chris M. wrote:
On Sunday, 19 August 2018 at 15:49:18 UTC, Chris M. wrote:
On Sunday, 19 August 2018 at 15:44:07 UTC, QueenSvetlana
wrote:
[...]
auto appendNumber =
On 08/19/2018 08:55 PM, Neia Neutuladh wrote:
You *could* add @property to the next and seed functions. That forces
people to use them as fields.
It doesn't.
On Sunday, 19 August 2018 at 18:32:17 UTC, QueenSvetlana wrote:
In the D Style Guide, it says:
Properties
https://dlang.org/dstyle.html#properties
Functions should be property functions whenever appropriate. In
particular, getters and setters should generally be avoided in
favor of property
In the D Style Guide, it says:
Properties
https://dlang.org/dstyle.html#properties
Functions should be property functions whenever appropriate. In
particular, getters and setters should generally be avoided in
favor of property functions. And in general, whereas functions
should be verbs,
On Sunday, 19 August 2018 at 16:03:06 UTC, QueenSvetlana wrote:
On Sunday, 19 August 2018 at 15:53:25 UTC, Chris M. wrote:
On Sunday, 19 August 2018 at 15:49:18 UTC, Chris M. wrote:
On Sunday, 19 August 2018 at 15:44:07 UTC, QueenSvetlana
wrote:
[...]
auto appendNumber =
On Sunday, 19 August 2018 at 15:53:25 UTC, Chris M. wrote:
On Sunday, 19 August 2018 at 15:49:18 UTC, Chris M. wrote:
On Sunday, 19 August 2018 at 15:44:07 UTC, QueenSvetlana wrote:
[...]
auto appendNumber = appender(arrayofNumbers);
This returns a separate object. You probably meant to put
On Sunday, 19 August 2018 at 15:49:18 UTC, Chris M. wrote:
On Sunday, 19 August 2018 at 15:44:07 UTC, QueenSvetlana wrote:
[...]
auto appendNumber = appender(arrayofNumbers);
This returns a separate object. You probably meant to put this
for the last line
writeln(appendNumber.length);
On Sunday, 19 August 2018 at 15:44:07 UTC, QueenSvetlana wrote:
When using the .length property of a dynamic array why does it
return the incorrect number of elements after I use the
appender?
import std.stdio;
import std.array : appender;
void main()
{
//declaring a dynamic array
When using the .length property of a dynamic array why does it
return the incorrect number of elements after I use the appender?
import std.stdio;
import std.array : appender;
void main()
{
//declaring a dynamic array
int [] arrayofNumbers;
//append an element using the ~= syntax
On Sunday, 19 August 2018 at 12:10:08 UTC, kinke wrote:
I think the spec is pretty clear; the elements of the
right-hand-side initializer array are interpreted as
per-element initializer, i.e., `result[0] = 2, result[1] = 1`
(rest: default-init).
I can't find where in the spec it says that
On Sunday, 19 August 2018 at 11:20:41 UTC, Dennis wrote:
I have a two dimensional static array in a game board struct
and want to explicitly set the default value for each cell. Now
typing the whole 9x9 array out would be cumbersome and I can't
change the default constructor of a struct, so I
I have a two dimensional static array in a game board struct and
want to explicitly set the default value for each cell. Now
typing the whole 9x9 array out would be cumbersome and I can't
change the default constructor of a struct, so I played around
with initializers and found some... strange
Okay, I see. I'll try with a shared library. I only have 3 or 4
algorithms that don't auto-vectorize well with modern compilers
and have to be written by hand.
Patreon have that terrible catch 22 tax form that stopped me
writing for US magazines, rather unfortunate.
I keep having the same problem with building DSFMLC
https://ibb.co/edRStK
On Sunday, 19 August 2018 at 07:18:20 UTC, Sean O'Connor wrote:
How to I phrase RIP addressing in assembly under Linux AMD64 in
D. I can't seem to figure it out.
Normally I do something like:
movq rax,rndphi[rip]
Where rndphi is a label pointing to data.
I know I have change movq to mov in
How to I phrase RIP addressing in assembly under Linux AMD64 in
D. I can't seem to figure it out.
Normally I do something like:
movq rax,rndphi[rip]
Where rndphi is a label pointing to data.
I know I have change movq to mov in D and hope the operation
works on all 64 bits.
If for some
25 matches
Mail list logo