On Friday, 5 July 2019 at 16:25:10 UTC, Nick Treleaven wrote:
Yes, I was wondering why the compiler doesn't statically
allocate it automatically as an optimization.
Which i would think it could, but silently adds .dup to the end
as it points to a unnamed memory block of N size. Or if it's
On Friday, 5 July 2019 at 23:08:04 UTC, Patrick Schluter wrote:
On Thursday, 4 July 2019 at 10:56:50 UTC, Nick Treleaven wrote:
immutable(int[]) f() @nogc {
return [1,2];
}
onlineapp.d(2): Error: array literal in `@nogc` function
`onlineapp.f` may cause a GC allocation
This makes
On Thursday, 4 July 2019 at 10:56:50 UTC, Nick Treleaven wrote:
immutable(int[]) f() @nogc {
return [1,2];
}
onlineapp.d(2): Error: array literal in `@nogc` function
`onlineapp.f` may cause a GC allocation
This makes dynamic array literals unusable with @nogc, and adds
to GC pressure
On Friday, July 5, 2019 10:25:10 AM MDT Nick Treleaven via Digitalmars-d-
learn wrote:
> On Thursday, 4 July 2019 at 11:06:36 UTC, Eugene Wissner wrote:
> > static immutable arr = [1, 2];
> >
> > You have to spell it out that the data is static.
>
> Yes, I was wondering why the compiler
On 7/5/19 9:56 PM, ag0aep6g via Digitalmars-d-learn wrote:
On 05.07.19 20:49, Samir wrote:
As a follow-on to my earlier question, is there a way to pass a
variable to the `map` function that specifies the column, rather than
hard-coding it? I'm thinking of something like:
On 7/5/19 9:56 PM, ag0aep6g via Digitalmars-d-learn wrote:
On 05.07.19 20:49, Samir wrote:
As a follow-on to my earlier question, is there a way to pass a
variable to the `map` function that specifies the column, rather than
hard-coding it? I'm thinking of something like:
On 05.07.19 20:49, Samir wrote:
As a follow-on to my earlier question, is there a way to pass a variable
to the `map` function that specifies the column, rather than hard-coding
it? I'm thinking of something like:
p.map!("a[column]").maxElement.writeln;
You can't do that with the string
On Friday, 5 July 2019 at 18:45:01 UTC, Les De Ridder wrote:
On Friday, 5 July 2019 at 18:29:36 UTC, berni wrote:
On Friday, 5 July 2019 at 17:57:39 UTC, Les De Ridder wrote:
File.byChunk[1] should do the trick.
[1] https://dlang.org/library/std/stdio/file.by_chunk.html
Not sure, if this
On Friday, 5 July 2019 at 18:29:36 UTC, berni wrote:
On Friday, 5 July 2019 at 17:57:39 UTC, Les De Ridder wrote:
File.byChunk[1] should do the trick.
[1] https://dlang.org/library/std/stdio/file.by_chunk.html
Not sure, if this is, what I'm looking for. I'd like to do
something like
On Friday, 5 July 2019 at 00:54:15 UTC, Samir wrote:
Is there a cleaner way of finding the maximum value of say the
third column in a multi-dimensional array than this?
int[][] p = [[1,2,3,4], [9,0,5,4], [0,6,2,1]];
writeln([p[0][2], p[1][2], p[2][2]].max);
I've tried the following
writeln([0,
On Friday, 5 July 2019 at 17:57:39 UTC, Les De Ridder wrote:
File.byChunk[1] should do the trick.
[1] https://dlang.org/library/std/stdio/file.by_chunk.html
Not sure, if this is, what I'm looking for. I'd like to do
something like
buffered_file.map!(a=>2*a).writeln();
When I understand
On Friday, 5 July 2019 at 17:29:26 UTC, berni wrote:
I'd like to process a (binary) file as a buffered InputRange
but I havn't found anything yet. Is there anything or do I
have to write it on my own?
File.byChunk[1] should do the trick.
[1]
I'd like to process a (binary) file as a buffered InputRange but
I havn't found anything yet. Is there anything or do I have to
write it on my own?
On Friday, 5 July 2019 at 13:52:40 UTC, matheus wrote:
On Friday, 5 July 2019 at 09:34:08 UTC, Ron Tarrant wrote:
Today is a bit of a milestone for the blog as the 50th regular
post goes up. Also, the facelift is coming along nicely, the
next phase of which should be ready to push by July 9th.
On Friday, 5 July 2019 at 16:25:10 UTC, Nick Treleaven wrote:
On Thursday, 4 July 2019 at 11:06:36 UTC, Eugene Wissner wrote:
static immutable arr = [1, 2];
You have to spell it out that the data is static.
Yes, I was wondering why the compiler doesn't statically
allocate it
On Thursday, 4 July 2019 at 11:06:36 UTC, Eugene Wissner wrote:
static immutable arr = [1, 2];
You have to spell it out that the data is static.
Yes, I was wondering why the compiler doesn't statically allocate
it automatically as an optimization.
On Friday, 5 July 2019 at 13:56:18 UTC, Craig Dillabaugh wrote:
Ali's book is targeted at beginners (see link below). I don't
see why D wouldn't make a good first language. If your
objective is to learn D, then I don't think learning C or
Python is going to be help that much. Obviously if
On Friday, 5 July 2019 at 12:00:15 UTC, Binarydepth wrote:
I've considering learning full D. I remembered that D is not
recommended as a first language, So I read time ago.
So my question, is learning C and Python a good intro before
learning D?
TY
Ali's book is targeted at beginners (see
On Friday, 5 July 2019 at 09:34:08 UTC, Ron Tarrant wrote:
Today is a bit of a milestone for the blog as the 50th regular
post goes up. Also, the facelift is coming along nicely, the
next phase of which should be ready to push by July 9th.
And today's topic continues with the MVC series by
On Friday, 5 July 2019 at 01:41:38 UTC, 9il wrote:
You may want to take a look into mir-algorithm [1] library.
It contains ndsilce package [2] to work with multidimensional
data.
Thanks for referring me to this library, Ilya. I will have to
check this out. While it seems a bit more
On Friday, 5 July 2019 at 12:00:15 UTC, Binarydepth wrote:
I've considering learning full D. I remembered that D is not
recommended as a first language, So I read time ago.
So my question, is learning C and Python a good intro before
learning D?
TY
Both C and Python provide valuable and
I've considering learning full D. I remembered that D is not
recommended as a first language, So I read time ago.
So my question, is learning C and Python a good intro before
learning D?
TY
Today is a bit of a milestone for the blog as the 50th regular
post goes up. Also, the facelift is coming along nicely, the next
phase of which should be ready to push by July 9th.
And today's topic continues with the MVC series by demonstrating
how to add and remove items from a ComboBoxText
23 matches
Mail list logo