Re: Can I use Dlang in Qt5 instead C++ for develop Android Apps?

2020-04-13 Thread evilrat via Digitalmars-d-learn
On Monday, 13 April 2020 at 21:01:50 UTC, Baby Beaker wrote: I want develop Android apps using Qt5. But C++ is very hard. I want to use Dlang becouse Dlang is very easy. In theory nothing stops you from doing that. In practice however you have to deal with C++ anyway, how API matches ABI, and

Re: Adding item to a rbtree with a custom binaryFun

2020-04-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/13/20 7:59 PM, Adnan wrote: I want to keep an ordered set of records and the standard provides me with RedBlackTree. The record is of type Tuple!(string, uint). Here's what it looks like: import std.json : parseJSON; uint[string] wordTable; import std.datetime.stopwatch : StopW

Re: Adding item to a rbtree with a custom binaryFun

2020-04-13 Thread Adnan via Digitalmars-d-learn
On Monday, 13 April 2020 at 23:59:20 UTC, Adnan wrote: I want to keep an ordered set of records and the standard provides me with RedBlackTree. The record is of type Tuple!(string, uint). Here's what it looks like: import std.json : parseJSON; uint[string] wordTable; import st

Adding item to a rbtree with a custom binaryFun

2020-04-13 Thread Adnan via Digitalmars-d-learn
I want to keep an ordered set of records and the standard provides me with RedBlackTree. The record is of type Tuple!(string, uint). Here's what it looks like: import std.json : parseJSON; uint[string] wordTable; import std.datetime.stopwatch : StopWatch, AutoStart; au

Re: Github vs Bugzilla for submitting a PR/issue.

2020-04-13 Thread Mike Parker via Digitalmars-d-learn
On Monday, 13 April 2020 at 21:32:43 UTC, Adnan wrote: On Monday, 13 April 2020 at 21:31:49 UTC, Adnan wrote: I'm a bit confused about D's development process. I've seen people discussing DIPs in Github. I've also seen people discuss internal issues in bugzilla. How do these to correlate? I'm

Github vs Bugzilla for submitting a PR/issue.

2020-04-13 Thread Adnan via Digitalmars-d-learn
I'm a bit confused about D's development process. I've seen people discussing DIPs in Github. I've also seen people discuss internal issues in bugzilla. How do these to correlate? I'm not very familiar with bugzilla, last time I reported an issue about a documentation in the std, I was forward

Re: Github vs Bugzilla for submitting a PR/issue.

2020-04-13 Thread Adnan via Digitalmars-d-learn
On Monday, 13 April 2020 at 21:31:49 UTC, Adnan wrote: I'm a bit confused about D's development process. I've seen people discussing DIPs in Github. I've also seen people discuss internal issues in bugzilla. How do these to correlate? I'm not very familiar with bugzilla, last time I reported a

Can I use Dlang in Qt5 instead C++ for develop Android Apps?

2020-04-13 Thread Baby Beaker via Digitalmars-d-learn
I want develop Android apps using Qt5. But C++ is very hard. I want to use Dlang becouse Dlang is very easy.

Re: __tls_get_addr symbol

2020-04-13 Thread kdevel via Digitalmars-d-learn
On Monday, 13 April 2020 at 14:42:25 UTC, Marius Cristian Baciu wrote: [...] I am having some trouble locating a symbol referenced in rt/sections_elf_shared.d (__tls_get_addr). Could someone tell me where does the runtime expect to retrieve its implementation from $ gdb test (gdb) b __tls_get_

Re: std.algorithm.sort with copy constructors

2020-04-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/13/20 10:24 AM, Steven Schveighoffer wrote: This is a bug in phobos. https://issues.dlang.org/show_bug.cgi?id=20732 https://github.com/dlang/phobos/pull/7442 -Steve

__tls_get_addr symbol

2020-04-13 Thread Marius Cristian Baciu via Digitalmars-d-learn
Hi, I'm currently working on porting the D runtime on Unikraft[1] and I am having some trouble locating a symbol referenced in rt/sections_elf_shared.d (__tls_get_addr). Could someone tell me where does the runtime expect to retrieve its implementation from and what's its purpose? Thanks, Cri

Re: std.algorithm.sort with copy constructors

2020-04-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/13/20 9:27 AM, Gregor Mückl wrote: import std; struct S {     pure this(ref return scope const S rhs) nothrow @nogc {     this.x = x;     }     int x; } void main() {     S[] array = new S[10];     array.sort!("a.x < b.x", SwapStrategy.stable); } This is a bug in phobos. http

std.algorithm.sort with copy constructors

2020-04-13 Thread Gregor Mückl via Digitalmars-d-learn
Hi! Consider the following code: --- import std; struct S { pure this(ref return scope const S rhs) nothrow @nogc { this.x = x; } int x; } void main() { S[] array = new S[10]; array.sort!("a.x < b.x", SwapStrategy.stable); } --- In this program, sort compiles on

Re: Is it possible to store different subclasses in one array?

2020-04-13 Thread Leonardo via Digitalmars-d-learn
On Monday, 13 April 2020 at 05:54:52 UTC, evilrat wrote: On Monday, 13 April 2020 at 04:21:48 UTC, Leonardo wrote: foreach (ref gi; GameItems) { if (gi == Weapon) gi.Attack() } How would it be? Replying myself... weapon = cast(Weapon) gi; if (weapon !is null) weapon.Attack(

Re: Link error undefined symbol: __imp__InterlockedIncrement@4 on windows

2020-04-13 Thread Clayton Alves via Digitalmars-d-learn
On Saturday, 11 April 2020 at 05:45:37 UTC, evilrat wrote: On Thursday, 9 April 2020 at 14:07:10 UTC, Clayton Alves wrote: I'm trying to compile my first hello world dub project, but when I run "dub" it spits this error: lld-link: error: undefined symbol: __imp__InterlockedIncrement@4 Does

Re: Is there an exception for access violation on LDC/win64?

2020-04-13 Thread JN via Digitalmars-d-learn
On Monday, 13 April 2020 at 10:18:17 UTC, realhet wrote: Hi, import std.stdio, std.exception; [...] Running under the debugger should show you the location of the crash.

Is there an exception for access violation on LDC/win64?

2020-04-13 Thread realhet via Digitalmars-d-learn
Hi, import std.stdio, std.exception; void main(){ class C{ void foo(){ writeln(123); } } C c; try{ writeln(1); c.foo;// access violation here writeln(2); }catch(Throwable t){ writeln("exception"); } writeln(3); } When I run this code (using LDC2 64bit

Re: How user dub packages in dmd without dub.exe ?

2020-04-13 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 12 April 2020 at 17:31:14 UTC, Marcone wrote: On Sunday, 5 April 2020 at 14:19:40 UTC, WebFreak001 wrote: On Sunday, 5 April 2020 at 14:02:19 UTC, Baby Beaker wrote: On Saturday, 4 April 2020 at 21:54:34 UTC, Andre Pany wrote: On Saturday, 4 April 2020 at 20:21:03 UTC, Marcone wrote