On Friday, 31 August 2018 at 13:30:10 UTC, Nicholas Wilson wrote:
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
On Friday, 7 September 2018 at 02:44:24 UTC, hridyansh thakur
wrote:
On Thursday, 6 September 2018 at 16:59:43 UTC, rikki cattermole
wrote:
On 07/09/2018 4:03 AM, hridyansh thakur wrote:
[...]
That definition isn't complete. Missing at the very least
``();`` to make it a function declaration
On Friday, 7 September 2018 at 02:22:58 UTC, Domain wrote:
The following code fail to compile:
enum KeyMod : int
{
LCtrl = 1 << 0,
RCtrl = 1 << 1,
Ctrl = LCtrl | RCtrl,
}
struct Flags(E)
{
public:
BitFlags!(E, Yes.unsafe) flags;
alias flags this;
bool opDispatch(str
On Thursday, 6 September 2018 at 16:59:43 UTC, rikki cattermole
wrote:
On 07/09/2018 4:03 AM, hridyansh thakur wrote:
[...]
That definition isn't complete. Missing at the very least
``();`` to make it a function declaration.
[...]
So what is the errors you're getting?
And what are the co
The following code fail to compile:
enum KeyMod : int
{
LCtrl = 1 << 0,
RCtrl = 1 << 1,
Ctrl = LCtrl | RCtrl,
}
struct Flags(E)
{
public:
BitFlags!(E, Yes.unsafe) flags;
alias flags this;
bool opDispatch(string name)() const
if (__traits(hasMember, E, name))
On Thursday, September 6, 2018 1:05:03 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 9/6/18 2:52 PM, Jonathan M Davis wrote:
> > On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
> >
> > Digitalmars-d-learn wrote:
> >> On 9/6/18 12:55 PM, Jonathan M Davis wr
On 9/6/18 2:52 PM, Jonathan M Davis wrote:
On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
On 9/6/18 12:55 PM, Jonathan M Davis wrote:
It's not a bug in writeln. Any time that a range is copied, you must not
do _anything_ else with the original
On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 9/6/18 12:55 PM, Jonathan M Davis wrote:
> > On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via
> > Digitalmars-d->
> > learn wrote:
> >> Is this a bug with writeln?
> >>
> >> void ma
On 9/6/18 2:30 PM, Steven Schveighoffer wrote:
On 9/6/18 1:07 PM, rikki cattermole wrote:
On 07/09/2018 4:17 AM, Arun Chandrasekaran wrote:
On Thursday, 6 September 2018 at 16:13:42 UTC, hridyansh thakur wrote:
how to read a file line by line in D
std.stdio.File.byLine()
Refer the doc here:
On 9/6/18 1:07 PM, rikki cattermole wrote:
On 07/09/2018 4:17 AM, Arun Chandrasekaran wrote:
On Thursday, 6 September 2018 at 16:13:42 UTC, hridyansh thakur wrote:
how to read a file line by line in D
std.stdio.File.byLine()
Refer the doc here: https://dlang.org/library/std/stdio/file.by_lin
On 9/6/18 12:55 PM, Jonathan M Davis wrote:
On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via Digitalmars-d-
learn wrote:
Is this a bug with writeln?
void main()
{
import std.stdio, std.range, std.algorithm;
auto a1 = sort([1,3,5,4,2]);
auto a2 = sort([9,8,9]);
On Thursday, September 6, 2018 11:34:18 AM MDT Adam D. Ruppe via
Digitalmars-d-learn wrote:
> On Thursday, 6 September 2018 at 17:10:49 UTC, Oleksii wrote:
> > struct Slice(T) {
> >
> > size_t capacity;
> > size_t size;
> > T* memory;
> >
> > }
>
> There's no capacity in the slice, that
On Thursday, 6 September 2018 at 17:10:49 UTC, Oleksii wrote:
struct Slice(T) {
size_t capacity;
size_t size;
T* memory;
}
There's no capacity in the slice, that is stored as part of the
GC block, which it looks up with the help of RTTI, thus the
TypeInfo reference.
Slices *just*
On Thursday, 6 September 2018 at 17:10:49 UTC, Oleksii wrote:
allocatedFoo = foos[0 .. $ + 1];// <= Error: TypeInfo
This line meant to be `allocatedFoo = foos[$]`. Sorry about that.
Hi the folks,
Could you please share your wisdom with me? I wonder why the
following code:
```
import core.stdc.stdlib;
Foo[] pool;
Foo[] foos;
auto buff = (Foo*)malloc(Foo.sizeof * 10);
pool = buff[0 .. 10];
foos = pool[0 .. 0 ];
// Now let's allocate a Foo:
Foo* allocatedFoo;
if (foos.leng
On 07/09/2018 4:17 AM, Arun Chandrasekaran wrote:
On Thursday, 6 September 2018 at 16:13:42 UTC, hridyansh thakur wrote:
how to read a file line by line in D
std.stdio.File.byLine()
Refer the doc here: https://dlang.org/library/std/stdio/file.by_line.html
An example from the doc:
```
import
On 07/09/2018 4:03 AM, hridyansh thakur wrote:
i am on windows i have tried
DMD
LDC
and i am getting same linking error with linking my c++ object
i am doing by the official tutorial (dlang spec book)
here is my app.d code
import std.stdio;
void main()
{
//writeln("Edit source/app.d to
On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via Digitalmars-d-
learn wrote:
> Is this a bug with writeln?
>
> void main()
> {
> import std.stdio, std.range, std.algorithm;
>
> auto a1 = sort([1,3,5,4,2]);
> auto a2 = sort([9,8,9]);
> auto a3 = sort([5,4,5,4]);
>
>
On Mon, 2018-09-03 at 11:41 +1200, rikki cattermole via Digitalmars-d-learn
wrote:
[…]
>
> You won't need to actually fill out any c struct's that you don't need
> either. Make them opaque as long as they are referenced via pointer and
> not by value.
True. And indeed Fontconfig can mostly meet
On Thursday, 6 September 2018 at 16:13:42 UTC, hridyansh thakur
wrote:
how to read a file line by line in D
std.stdio.File.byLine()
Refer the doc here:
https://dlang.org/library/std/stdio/file.by_line.html
An example from the doc:
```
import std.algorithm, std.stdio, std.string;
// Count w
how to read a file line by line in D
i am on windows i have tried
DMD
LDC
and i am getting same linking error with linking my c++ object
i am doing by the official tutorial (dlang spec book)
here is my app.d code
import std.stdio;
void main()
{
//writeln("Edit source/app.d to start your project.");
int[] m = some
On Thursday, 6 September 2018 at 07:37:11 UTC, Simen Kjærås wrote:
On Wednesday, 5 September 2018 at 22:35:16 UTC, SrMordred wrote:
https://run.dlang.io/is/TOTsL4
Yup, that's a bug. Reduced example:
struct S {
int*[1] arr;
}
import std.traits : hasAliasing;
static assert(hasAliasing!S);
On Mon, 2018-09-03 at 13:19 +, Gerald via Digitalmars-d-learn
wrote:
> Myself and some others are looking at replacing autotools in
> Tilix with meson for the various Linux distros to use when
> building and packaging the binary. However we are running into an
> issue with meson around the u
On Tuesday, 4 September 2018 at 19:23:16 UTC, SrMordred wrote:
Most C++ game related projects uses GLM as they default
math/vector lib (even if not using opengl).
In D we have (that I found):
gfm.math - https://github.com/d-gamedev-team/gfm
dlib.math - https://github.com/gecko0307/dlib
Gl3n
On Thursday, 6 September 2018 at 09:06:21 UTC, Simen Kjærås wrote:
On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das
wrote:
Is this a bug with writeln?
Yup. What happens is writeln destructively iterates over b[i].
Since b[i] is a forward range, this shouldn't be done
destructively.
On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das wrote:
Is this a bug with writeln?
Yup. What happens is writeln destructively iterates over b[i].
Since b[i] is a forward range, this shouldn't be done
destructively. Instead, a copy should be made using b[i].save,
somewhere deep in
Is this a bug with writeln?
void main()
{
import std.stdio, std.range, std.algorithm;
auto a1 = sort([1,3,5,4,2]);
auto a2 = sort([9,8,9]);
auto a3 = sort([5,4,5,4]);
pragma(msg, typeof(a1));
pragma(msg, typeof(a2));
pragma(msg, typeof(a3));
auto b = [a1, a2, a3
Maybe poke into GC and see if it has ClassInfo associated with
the allocated block.
On Wednesday, 5 September 2018 at 22:35:16 UTC, SrMordred wrote:
https://run.dlang.io/is/TOTsL4
Yup, that's a bug. Reduced example:
struct S {
int*[1] arr;
}
import std.traits : hasAliasing;
static assert(hasAliasing!S);
Issue filed: https://issues.dlang.org/show_bug.cgi?id=19228
Pull re
30 matches
Mail list logo