Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-29 Thread snow jhon via Digitalmars-d-learn

On Saturday, 28 September 2019 at 16:20:03 UTC, snow jhon wrote:
On Thursday, 26 September 2019 at 10:07:34 UTC, bioinfornatics 
wrote:

[...]


To be more precise, gtkd is a wrapper for GTK. Gtkd is not 
interesting in this context, but the dependency on gtk. On 
windows you have the possibility to either publish your 
application with GTK dlls or to run gtk setup routine as part 
of your application setup routine or just say in your readme 
that the customer needs to run GTK setup on there own.


see: https://bluestacks.vip/ , https://kodi.software/ & 
https://luckypatcher.pro/​​​


Re: Looking for a Simple Doubly Linked List Implementation

2019-09-29 Thread snow jhon via Digitalmars-d-learn

On Saturday, 28 September 2019 at 16:21:10 UTC, snow jhon wrote:

On Saturday, 21 September 2019 at 18:52:23 UTC, Dennis wrote:

[...]


Below is a simple doubly linked list with Garbage Collected 
memory.
It's not performant or complete by any means, just a minimal 
example in D like you wanted.
You probably also want methods for removing nodes or inserting 
in the middle (else why don't you use an array?), I think you 
can think of an implementation for those yourself (or look them 
up, there should be plenty examples online).


https://tutuapp.uno/ , https://9apps.ooo/ , https://showbox.kim/



Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-28 Thread snow jhon via Digitalmars-d-learn
On Thursday, 26 September 2019 at 10:07:34 UTC, bioinfornatics 
wrote:
On Wednesday, 25 September 2019 at 17:03:51 UTC, Ron Tarrant 
wrote:
On Wednesday, 25 September 2019 at 13:52:48 UTC, 
bioinfornatics wrote:


I think I misunderstood your need but are lo looking for dub 
tool with its repository https://code.dlang.org/


I don't think so, but I could be wrong. I tried reading up on 
dub, but got lost in the docs, so I really don't understand 
what all it can do.


dub is more or less like pip from python, npm from javascript 
and so on ...

The code source is here: https://github.com/dlang/dub

you can open an issue there or open a thread about how to write 
package file for dub doc: https://dub.pm/package-format-json)


have a nice day


To be more precise, gtkd is a wrapper for GTK. Gtkd is not 
interesting in this context, but the dependency on gtk. On 
windows you have the possibility to either publish your 
application with GTK dlls or to run gtk setup routine as part of 
your application setup routine or just say in your readme that 
the customer needs to run GTK setup on there own.




Re: Looking for a Simple Doubly Linked List Implementation

2019-09-28 Thread snow jhon via Digitalmars-d-learn

On Saturday, 21 September 2019 at 18:52:23 UTC, Dennis wrote:
On Saturday, 21 September 2019 at 08:34:09 UTC, Ron Tarrant 
wrote:
Thanks, Dennis. Not performant... It doesn't work? I was 
hoping for a complete, working example, but maybe this'll help.


Bad word choice (it appears it's debatable whether 'performant' 
even is a word), I meant it was a simple implementation not 
optimized for speed / memory efficiency.
Making it 'complete' is a bit hard since I can think of tens of 
methods and operator overloads you could use, but if I include 
them all it's no longer minimal and it just becomes 
std.container.dlist.


Does a doubly-linked list always have to be done with structs? 
Can it be classes instead?


My example originally included classes actually. It was mostly 
the same, except that Node!T* was just Node!T. The only problem 
was with const:


```
size_t length() const {
size_t result = 0;
for(auto a = head; a !is null; a = a.next) result++;
return result;
}

```

Since I marked the method as const, `auto a = head` got the 
type const(Node!T) and `a = a.next` no longer compiled. With 
structs you can declare a const(Node!T)* (mutable pointer to 
const node), but I don't know if I can declare a mutable 
reference to a const class, so I switched to structs.


Below is a simple doubly linked list with Garbage Collected 
memory.
It's not performant or complete by any means, just a minimal 
example in D like you wanted.
You probably also want methods for removing nodes or inserting in 
the middle (else why don't you use an array?), I think you can 
think of an implementation for those yourself (or look them up, 
there should be plenty examples online).