On Tuesday, 13 August 2019 at 06:39:24 UTC, a11e99z wrote:
On Tuesday, 13 August 2019 at 05:57:23 UTC, Mike Parker wrote:
On Tuesday, 13 August 2019 at 04:40:53 UTC, Chris Katko wrote:
OT:
and again how to easy to google info about error/warning just
with one word "CS0108"
D can use attrs f
On Tuesday, 13 August 2019 at 04:43:29 UTC, Paul Backus wrote:
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it, but
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it, but this state
actually needs to be different for each tree object
How to use #pragma omp parallel for collapse(n) in dlang?
On Tuesday, 13 August 2019 at 04:43:29 UTC, Paul Backus wrote:
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it, but
When all you want is quick-n-dirty text in a GTK DrawingArea and
Pango seems like more than you wanna deal with, Cairo's Toy Text
will do the job nicely. Here's how:
https://gtkdcoding.com/2019/08/13/0061-cairo-v-toy-text-image-formats.html
On 2019-08-12 11:25, a11e99z wrote:
its weird that next compiles in some weird form
import std;
static class A {
static a() { "a".writeln; } // forgot return type
}
Since you have specified an attribute on "a", the compiler can infer the
return type. In this case it's inferred to "void"
On Tuesday, August 13, 2019 3:03:49 AM MDT Jacob Carlborg via Digitalmars-d-
learn wrote:
> On 2019-08-12 11:25, a11e99z wrote:
> > its weird that next compiles in some weird form
> >
> > import std;
> > static class A {
> >
> > static a() { "a".writeln; } // forgot return type
> >
> > }
>
> S
On Mon, 2019-08-12 at 20:01 +, DanielG via Digitalmars-d-learn wrote:
> On Monday, 12 August 2019 at 10:41:57 UTC, GreatSam4sure wrote:
> > I will be happy if I can build an app in D with fanciful ui. I
> > will also be happy if you know any other way to build a
> > fanciful ui in D like adob
On Mon, 2019-08-12 at 17:45 +, Enjoys Math via Digitalmars-d-learn wrote:
> Hi,
>
> I'm writing my GUI in C++ & Qt Quick. I know that I could
> connect to D from the GUI code using a DLL, but can something
> similar be done on the other PC OS's and the mobile OS's?
>
> Thanks.
>
Looking
Hello there,
If I had a DLL, how would I sort it judging by the node contents,
the D way?
In C if I were to sort a piece of malloc'd memory pointing to
node pointers, I would write my compare function and let qsort
sort it out. In D, I tried to use std.algorithm's sort
functionality to no av
On Tuesday, 13 August 2019 at 09:48:52 UTC, Mirjam Akkersdijk
wrote:
Hello there,
If I had a DLL, how would I sort it judging by the node
contents, the D way?
[...]
Node.t
Node.x, my bad
On Tuesday, 13 August 2019 at 09:44:59 UTC, Russel Winder wrote:
On Mon, 2019-08-12 at 20:01 +, DanielG via
Digitalmars-d-learn wrote:
[...]
GtkD allows for "reactive" UI.
https://www.reactivemanifesto.org/
There is also Qt, I haven't tried any of the D bindings to Qt,
but given Qt is
You can make an array from it
On Tue, Aug 13, 2019 at 12:05 PM Mirjam Akkersdijk via
Digitalmars-d-learn wrote:
>
> On Tuesday, 13 August 2019 at 09:48:52 UTC, Mirjam Akkersdijk
> wrote:
> > Hello there,
> > If I had a DLL, how would I sort it judging by the node
> > contents, the D way?
> >
> >
On Tuesday, August 13, 2019 3:48:52 AM MDT Mirjam Akkersdijk via
Digitalmars-d-learn wrote:
> Hello there,
> If I had a DLL, how would I sort it judging by the node contents,
> the D way?
>
> In C if I were to sort a piece of malloc'd memory pointing to
> node pointers, I would write my compare fu
On Tuesday, 13 August 2019 at 09:48:52 UTC, Mirjam Akkersdijk
wrote:
Hello there,
If I had a DLL, how would I sort it judging by the node
contents, the D way?
In C if I were to sort a piece of malloc'd memory pointing to
node pointers, I would write my compare function and let qsort
sort it
On Tuesday, 13 August 2019 at 08:41:02 UTC, Bert wrote:
On Tuesday, 13 August 2019 at 04:43:29 UTC, Paul Backus wrote:
It seems to me like the obvious solution is to use two
different classes, one to store the global state, and one to
store the individual objects in your structure. For example:
On Tuesday, 13 August 2019 at 09:48:52 UTC, Mirjam Akkersdijk
wrote:
I would write my compare function and let qsort sort it out.
I'm confused by this statement. Are you referring to the qsort in
C's stdlib? I had never heard of using that to sort a linked
list, so I searched, and it is not
On Tuesday, 13 August 2019 at 09:48:52 UTC, Mirjam Akkersdijk
wrote:
and I would like to sort based on Node.t, how should I tackle
it, preferably without resorting to C libraries?
Convert the nodes into an D array, sort the array with
nodes.sort!"a.x < b.x" and then iterate the array and repai
On Tuesday, 13 August 2019 at 12:34:46 UTC, bachmeier wrote:
I'm confused by this statement. Are you referring to the qsort
in C's stdlib? I had never heard of using that to sort a linked
list, so I searched, and it is not possible.
Ah yes, maybe I should have elaborated. In C, you can just cr
On Tuesday, 13 August 2019 at 14:04:45 UTC, Sebastiaan Koppe
wrote:
On Tuesday, 13 August 2019 at 09:48:52 UTC, Mirjam Akkersdijk
wrote:
and I would like to sort based on Node.t, how should I tackle
it, preferably without resorting to C libraries?
Convert the nodes into an D array, sort the ar
On Tuesday, August 13, 2019 11:33:10 AM MDT Mirjam Akkersdijk via
Digitalmars-d-learn wrote:
> On Tuesday, 13 August 2019 at 14:04:45 UTC, Sebastiaan Koppe
>
> wrote:
> > On Tuesday, 13 August 2019 at 09:48:52 UTC, Mirjam Akkersdijk
> >
> > wrote:
> >> and I would like to sort based on Node.t, how
Am 13.08.19 um 11:48 schrieb Mirjam Akkersdijk:
> Hello there,
> If I had a DLL, how would I sort it judging by the node contents, the D
> way?
>
> In C if I were to sort a piece of malloc'd memory pointing to node
> pointers, I would write my compare function and let qsort sort it out.
> In D, I
On Tue, Aug 13, 2019 at 12:12:28PM -0600, Jonathan M Davis via
Digitalmars-d-learn wrote:
> On Tuesday, August 13, 2019 11:33:10 AM MDT Mirjam Akkersdijk via
> Digitalmars-d-learn wrote:
[...]
> > Thank you, this is what I eventually chose to do. It's also fairly
> > fast, though doesn't the natu
On 08/13/2019 10:33 AM, Mirjam Akkersdijk wrote:
> On Tuesday, 13 August 2019 at 14:04:45 UTC, Sebastiaan Koppe wrote:
>> Convert the nodes into an D array, sort the array with nodes.sort!"a.x
>> < b.x" and then iterate the array and repair the next/prev pointers.
If possible, I would go further
On Tue, Aug 13, 2019 at 11:28:35AM -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
[...]
> Summary: Ditch the linked list and put the elements into an array. :)
[...]
+1. The linked list may have been faster 20 years ago, before the
advent of modern CPUs with caching hierarchies and memory acc
On Tuesday, 13 August 2019 at 18:28:35 UTC, Ali Çehreli wrote:
On Tuesday, 13 August 2019 at 14:04:45 UTC, Sebastiaan Koppe
> wrote:
> Convert the nodes into an D array, sort the array with
> nodes.sort!"a.x < b.x" and then iterate the array and repair
> the next/prev pointers.
If possible, I
On Tuesday, 13 August 2019 at 18:54:58 UTC, H. S. Teoh wrote:
On Tue, Aug 13, 2019 at 11:28:35AM -0700, Ali Çehreli via
Digitalmars-d-learn wrote: [...]
Summary: Ditch the linked list and put the elements into an
array. :)
[...]
+1. The linked list may have been faster 20 years ago, before
t
On Tue, Aug 13, 2019 at 08:42:37PM +, Max Haughton via Digitalmars-d-learn
wrote:
> On Tuesday, 13 August 2019 at 18:54:58 UTC, H. S. Teoh wrote:
[...]
> > These days, with CPU multi-level caches and memory access
> > predictors, in-place arrays are often the best option for
> > performance, u
On Tuesday, 13 August 2019 at 18:28:35 UTC, Ali Çehreli wrote:
> can't I define an array of fixed size, which is dependent on
the input
> of the function?
arr.length = number_of_elements;
All elements will be initialized to the element's default
value, which happens to be null for pointers
On Tuesday, 13 August 2019 at 21:11:41 UTC, H. S. Teoh wrote:
A contiguous allocator doesn't help after the list has
undergone a large number of insertions/deletions, because of
fragmentation.
Fragmentation should not be an issue, I insist on keep using a
DLL for the base structure in my applic
On Tuesday, 13 August 2019 at 22:12:23 UTC, Mirjam Akkersdijk
wrote:
Though, it left me with some semi-offtopic questions unanswered:
(1) Ali, do you mean that from an optimization viewpoint, it's
better to keep appending like `nodes ~= ...` instead of setting
the length first? I would like
32 matches
Mail list logo