On Sunday, 22 August 2021 at 04:38:58 UTC, Ali Çehreli wrote:
On 8/21/21 8:46 PM, Brian Tiffin wrote:
> prompt$ cat B.d
> module B;
> version = boss;
A cannot know about 'version' condition inside B.
The solution is to provide version on the command line. This is
how I do it with dmd:
$ dmd
On Saturday, 21 August 2021 at 23:50:51 UTC, Ruby The Roobster
wrote:
On Saturday, 21 August 2021 at 23:50:08 UTC, Ruby The Roobster
wrote:
On Saturday, 21 August 2021 at 06:08:17 UTC, evilrat wrote:
First parameter for CreateWindow should be window class
string that you used in
wndclass.lps
On Sunday, 22 August 2021 at 01:14:08 UTC, Alexey wrote:
On Saturday, 21 August 2021 at 20:35:43 UTC, Alexey wrote:
Hello
```D
interface Int
{
void coolFunc();
}
class C1
{
void coolFunc()
{
return;
}
}
class C2 : C1, Int
{
}
void main()
{
auto c = new C2;
}
```
d
On 8/21/21 8:46 PM, Brian Tiffin wrote:
> prompt$ cat B.d
> module B;
> version = boss;
A cannot know about 'version' condition inside B.
The solution is to provide version on the command line. This is how I do
it with dmd:
$ dmd -version=boss [...]
(So, remove 'version = boss;' line in B.d
On Sunday, 22 August 2021 at 03:22:02 UTC, Brian Tiffin wrote:
Is this wrong thinking? I'm ~~working on~~ playing with a
first project.
Meant to be a suite of tools, each usable from the command
line, i.e. with a `main`. Then a manager program that accepts
subcommands for dispatch *and othe
Is this wrong thinking? I'm ~~working on~~ playing with a first
project.
Meant to be a suite of tools, each usable from the command line,
i.e. with a `main`. Then a manager program that accepts
subcommands for dispatch *and other boss type things*.
boss.d wants to import command1.d command
On Sunday, 22 August 2021 at 00:18:18 UTC, Ali Çehreli wrote:
I did not read the linked thread but a "this template
parameter" seems to work in this case:
class Whoami {
string name(this This)() const {
return __traits(identifier, This);
}
}
class AnotherOne : Whoami { }
unittest {
a
On Saturday, 21 August 2021 at 20:35:43 UTC, Alexey wrote:
Hello
```D
interface Int
{
void coolFunc();
}
class C1
{
void coolFunc()
{
return;
}
}
class C2 : C1, Int
{
}
void main()
{
auto c = new C2;
}
```
dmd says it's not Ok:
t.d(14): Error: class `t.C2` interfac
On 8/21/21 2:48 PM, jfondren wrote:
On Saturday, 21 August 2021 at 21:13:58 UTC, Jeremy T. Gibson wrote:
On Saturday, 21 August 2021 at 18:27:34 UTC, Ali Çehreli wrote:
return __traits(identifier, typeof(this));
That works perfectly! Thanks. =)
This is exactly the solution you linked t
On Saturday, 21 August 2021 at 23:50:08 UTC, Ruby The Roobster
wrote:
wndclass.lpszClassName = "Test"; //May need casting...
don't cast it just use the w suffix
wndclass.lpszClassName = "Test"w;
casts are usually indicating a mistake
On Saturday, 21 August 2021 at 06:08:17 UTC, evilrat wrote:
First parameter for CreateWindow should be window class string
that you used in
wndclass.lpszClassName = appName.toUTF16z;
Fix:
wndclass.lpszClassName = "Test"; //May need casting...
On Saturday, 21 August 2021 at 23:50:08 UTC, Ruby The Roobster
wrote:
On Saturday, 21 August 2021 at 06:08:17 UTC, evilrat wrote:
First parameter for CreateWindow should be window class string
that you used in
wndclass.lpszClassName = appName.toUTF16z;
Fix:
wndclass.lpszClassName = "Test";
On Saturday, 21 August 2021 at 23:14:14 UTC, Alexey wrote:
I want `this` inside of C1::coolFunc to return C2 if called as
C2::coolFunc
so executing `cast(C2) this !is null` inside of C1::coolFunc
would work
If this would work, I'd farther used this like so
```D
interface Int
{
void coolF
I want `this` inside of C1::coolFunc to return C2 if called as
C2::coolFunc
so executing `cast(C2) this !is null` inside of C1::coolFunc
would work
On Saturday, 21 August 2021 at 22:56:40 UTC, Bastiaan Veelo wrote:
On Saturday, 21 August 2021 at 20:35:43 UTC, Alexey wrote:
Hello
```D
interface Int
{
void coolFunc();
}
class C1
{
void coolFunc()
{
return;
}
}
class C2 : C1, Int
{
}
void main()
{
auto c = new C
On Saturday, 21 August 2021 at 20:35:43 UTC, Alexey wrote:
Hello
```D
interface Int
{
void coolFunc();
}
class C1
{
void coolFunc()
{
return;
}
}
class C2 : C1, Int
{
}
void main()
{
auto c = new C2;
}
```
dmd says it's not Ok:
t.d(14): Error: class `t.C2` interfac
On Saturday, 21 August 2021 at 21:13:58 UTC, Jeremy T. Gibson
wrote:
On Saturday, 21 August 2021 at 18:27:34 UTC, Ali Çehreli wrote:
return __traits(identifier, typeof(this));
That works perfectly! Thanks. =)
This is exactly the solution you linked to in your first post,
and found want
On Saturday, 21 August 2021 at 18:45:07 UTC, jfondren wrote:
On Saturday, 21 August 2021 at 17:33:51 UTC, Jeremy T. Gibson
wrote:
is there a simple way to get the unqualified name of a class
at runtime without having to pass it through std.format?
`typeid(class).name` always yields the full cl
On Saturday, 21 August 2021 at 18:27:34 UTC, Ali Çehreli wrote:
return __traits(identifier, typeof(this));
That works perfectly! Thanks. =)
Hello
```D
interface Int
{
void coolFunc();
}
class C1
{
void coolFunc()
{
return;
}
}
class C2 : C1, Int
{
}
void main()
{
auto c = new C2;
}
```
dmd says it's not Ok:
t.d(14): Error: class `t.C2` interface function `void coolFunc()`
is not implemented
how to ma
On Saturday, 21 August 2021 at 17:33:51 UTC, Jeremy T. Gibson
wrote:
is there a simple way to get the unqualified name of a class at
runtime without having to pass it through std.format?
`typeid(class).name` always yields the full classname,
including its module information (i.e.,
"modulename
On 8/21/21 10:33 AM, Jeremy T. Gibson wrote:
`typeid(class).name` always yields the full classname, including its
module information (i.e., "modulename.classname"), where I only want
"classname" on its own.
I've been reminded of __traits(identifier) on this forum just yesterday:
import std.s
I saw this thread --
https://forum.dlang.org/post/hdkvezicxfvehbtvj...@forum.dlang.org
-- which works at compile time (although templating seems like
overkill for my purpose), but is there a simple way to get the
unqualified name of a class at runtime without having to pass it
through std.form
On Saturday, 21 August 2021 at 13:45:59 UTC, Ali Çehreli wrote:
On 8/21/21 1:31 AM, Tejas wrote:
> I was more impressed that you found that hack in the first
place
I can't take credit. :) 'static foreach' had that difference
since its inception. The spec says "If a new scope is desired
for ea
On 8/21/21 1:31 AM, Tejas wrote:
> I was more impressed that you found that hack in the first place
I can't take credit. :) 'static foreach' had that difference since its
inception. The spec says "If a new scope is desired for each expansion,
use another set of braces:"
https://dlang.org/s
On Saturday, 21 August 2021 at 08:59:55 UTC, evilrat wrote:
On Saturday, 21 August 2021 at 08:14:22 UTC, Виталий Фадеев
wrote:
I know, i know... It not possible, but part of the C code we
can to convert to the D.
Show me, please, solutions, projects, tools, scripts, docs.
Can you give the link
On Saturday, 21 August 2021 at 08:14:22 UTC, Виталий Фадеев wrote:
I know, i know... It not possible, but part of the C code we
can to convert to the D.
Show me, please, solutions, projects, tools, scripts, docs.
Can you give the link ?
`htod` is 1.
Any more ?
dstep
https://code.dlang.org/pac
On Saturday, 21 August 2021 at 06:58:47 UTC, Ali Çehreli wrote:
On 8/20/21 11:19 PM, Tejas wrote:
[...]
Yes. 'static foreach' does not introduce scope, which can be
pretty useful. For example, one can define functions at module
scope.
The subtle differences between 'static foreach' and
'(
I know, i know... It not possible, but part of the C code we can
to convert to the D.
Show me, please, solutions, projects, tools, scripts, docs.
Can you give the link ?
Examples of what the wanted:
// C
typedef struct {
uint32_t version; /* 0x5000 */
uin
On 8/20/21 11:19 PM, Tejas wrote:
On Saturday, 21 August 2021 at 06:03:33 UTC, Ali Çehreli wrote:
On 8/20/21 10:37 PM, Alexandru Ermicioi wrote:
[...]
Cool! Much better. :)
I could not do
[...]
Did you use that double curly bracket in `static foreach` so that you
don't get error for decl
30 matches
Mail list logo