On Saturday, 13 February 2021 at 05:52:34 UTC, Jack wrote:
I have a base class A, where I make specific operator depending
on the derived class type. Currently I'm using something like
this:
c is a class derived from A
bool shouldDoX = (cast(X)c) !is null || (cast(Y)c) !is null ||
(cast(K)c)
I have a base class A, where I make specific operator depending
on the derived class type. Currently I'm using something like
this:
c is a class derived from A
bool shouldDoX = (cast(X)c) !is null || (cast(Y)c) !is null ||
(cast(K)c) !is null ... ;
as the number of cast(C) !is null is growin
helpful always,thank you guys
On 2/11/21 6:22 PM, H. S. Teoh wrote:
>bool[size_t] hashes;
I would start with an even simpler solution until it's proven that there
still is a memory issue:
import std.stdio;
void main() {
bool[string] lines;
foreach (line; stdin.byLine) {
if (line !in li
On 2/12/21 6:22 PM, Chris Bare wrote:
I'm working on a project with vibe.d and ddbc to access my database.
Both have powerful functions that operate on Struct types to avoid a lot
of boilerplate code.
I have a web site that sends a json message to update a record.
deserializeJson creates a new
On Friday, 12 February 2021 at 12:17:13 UTC, Per Nordlöw wrote:
On Tuesday, 9 February 2021 at 03:05:10 UTC, frame wrote:
On Sunday, 7 February 2021 at 14:13:18 UTC, vitamin wrote:
Why using 'new' is allowed in pure functions but calling
GC.addRange or GC.removeRange isn't allowed?
Would maki
I'm working on a project with vibe.d and ddbc to access my
database.
Both have powerful functions that operate on Struct types to
avoid a lot of boilerplate code.
I have a web site that sends a json message to update a record.
deserializeJson creates a new Foo record containing the json data.
Ho
On Friday, 12 February 2021 at 19:48:01 UTC, vitamin wrote:
On Wednesday, 10 February 2021 at 16:25:44 UTC, Petar Kirov
[ZombineDev] wrote:
On Wednesday, 10 February 2021 at 13:44:53 UTC, vit wrote:
[...]
TL;DR Yes, you can, but it depends on what "without problem"
means for you :P
[...]
On Wednesday, 10 February 2021 at 16:25:44 UTC, Petar Kirov
[ZombineDev] wrote:
On Wednesday, 10 February 2021 at 13:44:53 UTC, vit wrote:
[...]
TL;DR Yes, you can, but it depends on what "without problem"
means for you :P
[...]
Thanks,
Yes, I am implementing container (ref counted point
On Fri, Feb 12, 2021 at 07:23:12AM +, frame via Digitalmars-d-learn wrote:
> On Friday, 12 February 2021 at 02:22:35 UTC, H. S. Teoh wrote:
>
> > This turns the OP's O(n log n) algorithm into an O(n) algorithm,
> > doesn't need to copy the entire content of the file into memory, and
> > also u
On 2/9/21 12:45 AM, JG wrote:
I was trying to profile a d program. So I ran: dub build
--build=profile. I then ran the program and it produced trace.log and
trace.def. I then ran d-profile-viewer and got the following error:
std.conv.ConvException@/home/jg/dlang/ldc-1.24.0/bin/../import/std/co
On Tuesday, 9 February 2021 at 03:05:10 UTC, frame wrote:
On Sunday, 7 February 2021 at 14:13:18 UTC, vitamin wrote:
Why using 'new' is allowed in pure functions but calling
GC.addRange or GC.removeRange isn't allowed?
Would making
`new T[]` inject a call to `GC.addRange` based on `T` (and ma
On Friday, 12 February 2021 at 07:23:12 UTC, frame wrote:
On Friday, 12 February 2021 at 02:22:35 UTC, H. S. Teoh wrote:
This turns the OP's O(n log n) algorithm into an O(n)
algorithm, doesn't
need to copy the entire content of the file into memory, and
also uses
much less memory by storing
13 matches
Mail list logo