Re: Blog Post #69: TextView and TextBuffer Basics

2019-09-10 Thread Zekereth via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 08:29:59 UTC, Ron Tarrant wrote: This morning's discussion covers the basic workings and relationship between the TextView and TextBuffer widgets. Here's the link: https://gtkdcoding.com/2019/09/10/0069-textview-and-textbuffer.html Yes, thank you very much.

Re: Undefined reference - built from source DMD

2019-09-10 Thread Stefanos Baziotis via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 15:01:11 UTC, Stefanos Baziotis wrote: On Tuesday, 10 September 2019 at 14:47:00 UTC, Nicholas Wilson wrote: Is this you have built your own DMD Yes I have branched to an old PR (4 months ago) and the problem doesn't exist.

Re: LDC asm for int128

2019-09-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 06:18:05 UTC, Newbie2019 wrote: I want to translate this c code into d (build with ldc), so I can use -flto and inline with other code. uint64_t _wymum(uint64_t A, uint64_t B){ __uint128_t r = A ; r *= B; return (r>>64)^r; } Do i need

Re: Blog Post #69: TextView and TextBuffer Basics

2019-09-10 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 09:14:13 UTC, Mike Parker wrote: Seriously impressed that you're able to keep this up so consistently. Keep on trucking! Thanks, Mike.

Re: Undefined reference - built from source DMD

2019-09-10 Thread Stefanos Baziotis via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 14:47:00 UTC, Nicholas Wilson wrote: Is this you have built your own DMD Yes and using it to compile a test program and you get that error, or you get that error trying to build DMD? Both. I get that error trying to compile _any_ program.

Re: Undefined reference - built from source DMD

2019-09-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 11:12:30 UTC, Stefanos Baziotis wrote: I don't if this the right group to post this. DMD built from source fails to link / find `main`. The error is: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start': (.text+0x20):

Re: need this for name of type string

2019-09-10 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 11:20:03 UTC, Ali Çehreli wrote: On 09/10/2019 03:32 AM, Andre Pany wrote: > [...] The UDA syntax allows both types and an objects. method0 uses Foo type and method1 uses a Foo object. So, if your API allows both, your code that deals with UDA must

Re: need this for name of type string

2019-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 09/10/2019 03:32 AM, Andre Pany wrote: > @Foo void method0(){} > > @Foo("abc") void method1(){} The UDA syntax allows both types and an objects. method0 uses Foo type and method1 uses a Foo object. So, if your API allows both, your code that deals with UDA must account for both.

Re: need this for name of type string

2019-09-10 Thread Alex via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 10:32:29 UTC, Andre Pany wrote: Hi, following coding is throwing compiler error: need this for name of type string The error disappears if I delete method0. My gut feeling is, this is a compiler bug? --- class C { static this() {

Undefined reference - built from source DMD

2019-09-10 Thread Stefanos Baziotis via Digitalmars-d-learn
I don't if this the right group to post this. DMD built from source fails to link / find `main`. The error is: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status Error:

need this for name of type string

2019-09-10 Thread Andre Pany via Digitalmars-d-learn
Hi, following coding is throwing compiler error: need this for name of type string The error disappears if I delete method0. My gut feeling is, this is a compiler bug? --- class C { static this() { getT!(typeof(this))(); } @Foo void method0(){} @Foo("abc") void

Re: Blog Post #69: TextView and TextBuffer Basics

2019-09-10 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 08:29:59 UTC, Ron Tarrant wrote: This morning's discussion covers the basic workings and relationship between the TextView and TextBuffer widgets. Here's the link: https://gtkdcoding.com/2019/09/10/0069-textview-and-textbuffer.html Seriously impressed that

Blog Post #69: TextView and TextBuffer Basics

2019-09-10 Thread Ron Tarrant via Digitalmars-d-learn
This morning's discussion covers the basic workings and relationship between the TextView and TextBuffer widgets. Here's the link: https://gtkdcoding.com/2019/09/10/0069-textview-and-textbuffer.html

Re: LDC asm for int128

2019-09-10 Thread a11e99z via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 06:18:05 UTC, Newbie2019 wrote: I want to translate this c code into d (build with ldc), so I can use -flto and inline with other code. uint64_t _wymum(uint64_t A, uint64_t B){ __uint128_t r = A ; r *= B; return (r>>64)^r; } Do i need

Re: Learning delegates

2019-09-10 Thread Bert via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? Simple, don't make it harder than it is. Delegates are basically functions... that is, function pointers(they point to some function

LDC asm for int128

2019-09-10 Thread Newbie2019 via Digitalmars-d-learn
I want to translate this c code into d (build with ldc), so I can use -flto and inline with other code. uint64_t _wymum(uint64_t A, uint64_t B){ __uint128_t r = A ; r *= B; return (r>>64)^r; } Do i need ASM or is there a easy way to implement it ?