get module name of function

2019-03-29 Thread Alex via Digitalmars-d-learn
How do I get the module name that a function is defined in? I have a generic template that auto Do(T)() { pragma(msg, moduleName!T); } in a module and in another module I define a function void foo() { } and a class class C { } and call Do!(typeof(foo)) and Do!(C) but it fails for

Re: D interface bug?

2019-03-29 Thread Alex via Digitalmars-d-learn
On Saturday, 30 March 2019 at 00:44:31 UTC, Alex wrote: On Saturday, 30 March 2019 at 00:06:23 UTC, H. S. Teoh wrote: On Fri, Mar 29, 2019 at 11:44:35PM +, Alex via Digitalmars-d-learn wrote: interface iBase { iBase fooBase(iBase); } class cBase : iBase { cBase

Re: D interface bug?

2019-03-29 Thread Alex via Digitalmars-d-learn
On Saturday, 30 March 2019 at 00:06:23 UTC, H. S. Teoh wrote: On Fri, Mar 29, 2019 at 11:44:35PM +, Alex via Digitalmars-d-learn wrote: interface iBase { iBase fooBase(iBase); } class cBase : iBase { cBase fooBase(cBase c) { return c; } } cBase.fooBase should be a valid

Re: D interface bug?

2019-03-29 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Mar 29, 2019 at 11:44:35PM +, Alex via Digitalmars-d-learn wrote: > interface iBase > { > iBase fooBase(iBase); > } > > > class cBase : iBase > { > cBase fooBase(cBase c) { return c; } > > } > > cBase.fooBase should be a valid override of iBase.fooBase because they

Re: Easiest way to use Linux system C files / tiny C libraries

2019-03-29 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Mar 29, 2019 at 10:48:47PM +, Chris Katko via Digitalmars-d-learn wrote: > What's the easiest way to use POSIX and Linux-specific C include > files? That depends on what you're expecting and what you're willing to do yourself. If you want a nicely-packaged, black-box way of using C

Re: D interface bug?

2019-03-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 29 March 2019 at 23:44:35 UTC, Alex wrote: > interface iBase > { > iBase fooBase(iBase); > } > > > class cBase : iBase > { > cBase fooBase(cBase c) { return c; } > > } > > cBase.fooBase should be a valid override of iBase.fooBase > because > they are the same type!

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-29 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 29 March 2019 at 20:34:32 UTC, Michelle Long wrote: I really wish you would start taking screenshots! It is not hard! You still think this is about me not knowing how to take a screenshot? :) I guess you didn't read my reply to your last request.

Re: Derived classes? Reflection

2019-03-29 Thread Alex via Digitalmars-d-learn
On Saturday, 13 April 2013 at 17:50:00 UTC, Tofu Ninja wrote: On Saturday, 13 April 2013 at 17:45:12 UTC, Tofu Ninja wrote: Maybe this is helpfully: http://forum.dlang.org/thread/scgjnudclnwlbdqqd...@forum.dlang.org Oddly enough, I found that at about the same time you posted it. Sadly

D interface bug?

2019-03-29 Thread Alex via Digitalmars-d-learn
interface iBase { iBase fooBase(iBase); } class cBase : iBase { cBase fooBase(cBase c) { return c; } } cBase.fooBase should be a valid override of iBase.fooBase because they are the same type! cBase is a super type so it contains everything iBase contains and maybe

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-29 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 29 March 2019 at 16:21:59 UTC, aberba wrote: Have shared gtkdcoding.com with some folks and they like it, keep it coming!! Cool. Thanks, aberba.

Re: Easiest way to use Linux system C files / tiny C libraries

2019-03-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 29 March 2019 at 22:48:47 UTC, Chris Katko wrote: What's the easiest way to use POSIX and Linux-specific C include files? For standard ones, they are pre-done for you under the `core.sys.posix` D package namespace (or `core.sys.linux` for Linux-specific ones). For ones not in

Easiest way to use Linux system C files / tiny C libraries

2019-03-29 Thread Chris Katko via Digitalmars-d-learn
What's the easiest way to use POSIX and Linux-specific C include files? I know you can write a wrapper but it seems like half the time these files include 20 files which include 20 files which use strange enums, arrays, etc that don't clearly have answers on how to wrap them. Is there

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-29 Thread Michelle Long via Digitalmars-d-learn
On Friday, 29 March 2019 at 14:25:16 UTC, Ron Tarrant wrote: I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.html I really wish you would start taking screenshots! It

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-29 Thread aberba via Digitalmars-d-learn
On Friday, 29 March 2019 at 14:25:16 UTC, Ron Tarrant wrote: I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.html Have shared gtkdcoding.com with some folks and they

gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-29 Thread Ron Tarrant via Digitalmars-d-learn
I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.html

Re: How to decode UTF-8 text?

2019-03-29 Thread Andrey via Digitalmars-d-learn
On Wednesday, 27 March 2019 at 19:16:21 UTC, kdevel wrote: On Wednesday, 27 March 2019 at 13:39:07 UTC, Andrey wrote: Thank you!