On Sunday, 25 April 2021 at 02:45:38 UTC, Paul Backus wrote:
On Sunday, 25 April 2021 at 02:26:00 UTC, Jack wrote:
doesn't this work when called from member in a derived class?
```d
class A
{
void doSomething(this T)()
{
writefln("name = [%s]",
On Sunday, 25 April 2021 at 02:26:00 UTC, Jack wrote:
doesn't this work when called from member in a derived class?
```d
class A
{
void doSomething(this T)()
{
writefln("name = [%s]", __traits(identifier, T));
}
}
class K : A
{
void baa()
On Sunday, 25 April 2021 at 02:26:00 UTC, Jack wrote:
On Sunday, 25 April 2021 at 02:02:47 UTC, Ali Çehreli wrote:
On 4/24/21 6:50 PM, Jack wrote:
I'd like to output `K` and get this identifier at compile
time.
This is solved by the "this template parameter":
import std.stdio;
class A {
On Sunday, 25 April 2021 at 02:02:47 UTC, Ali Çehreli wrote:
On 4/24/21 6:50 PM, Jack wrote:
I'd like to output `K` and get this identifier at compile time.
This is solved by the "this template parameter":
import std.stdio;
class A {
void showMyName(this T)() {
writefln("name = [%s]",
On Sunday, 25 April 2021 at 02:02:47 UTC, Ali Çehreli wrote:
On 4/24/21 6:50 PM, Jack wrote:
I'd like to output `K` and get this identifier at compile time.
This is solved by the "this template parameter":
import std.stdio;
class A {
void showMyName(this T)() {
writefln("name = [%s]",
On Saturday, 24 April 2021 at 04:09:15 UTC, Mike Parker wrote:
On Saturday, 24 April 2021 at 03:40:20 UTC, Jack wrote:
Can I rely on this format from fullyQualifiedName? for
example, let's say I do:
```d
enum s = fullyQualifiedName!f.split;
```
where f is a function member of a class. Can I
On 4/24/21 6:50 PM, Jack wrote:
I'd like to output `K` and get this identifier at compile time.
This is solved by the "this template parameter":
import std.stdio;
class A {
void showMyName(this T)() {
writefln("name = [%s]", __traits(identifier, T));
}
}
class K : A { }
void main()
```d
class A
{
void showMyName()
{
writefln("name = [%s]", __traits(identifier, typeof(this)));
}
}
class K : A { }
```
then
```d
new K().showMyName();
```
output:
name = [A]
I'd like to output `K` and get this identifier at compile time.
But I'd to
On 4/24/21 7:46 AM, PinDPlugga wrote:
> write("Please enter a number: ");
> double number;
> readf(" %s", number);
Just to make sure, this is a common issue for other languages as well.
As the explanation, the character ('\n') that you injected into stdin by
pressing Enter is
On Saturday, 24 April 2021 at 19:25:47 UTC, Ishax wrote:
On Saturday, 24 April 2021 at 18:55:33 UTC, ichneumwn wrote:
"Use the lib command. If it's static, lib will show you a pile
of .obj files inside. Not so if it's am implib."
lib /list foo.lib
This is the output of `lib /list
On Saturday, 24 April 2021 at 18:55:33 UTC, ichneumwn wrote:
"Use the lib command. If it's static, lib will show you a pile
of .obj files inside. Not so if it's am implib."
lib /list foo.lib
This is the output of `lib /list SDL2.lib`
```
Microsoft (R) Library Manager Version 14.28.29913.0
On Saturday, 24 April 2021 at 18:18:11 UTC, russhy wrote:
Try to add this in your dub file:
libs "user32" "gdi32" "shell32"
No change.
On Saturday, 24 April 2021 at 16:44:09 UTC, Ishax wrote:
So I have the lib files. It's failing with only an exit code.
No window is appearing. It's using the same D code as with the
dynamic setup which I was able to produce a window with.
```sdl
dependency "bindbc-sdl" version="~>0.1.0"
Try to add this in your dub file:
libs "user32" "gdi32" "shell32"
On Saturday, 24 April 2021 at 17:20:06 UTC, russhy wrote:
This should work
I just tried your code. I get:
```Program exited with code -1073741701```
I put the libraries straight into the project root this time.
```sdl
name "sdl2try2"
description "A minimal D application."
authors "Isaac"
On Saturday, 24 April 2021 at 16:48:49 UTC, Ishax wrote:
It's using the same D code as with the dynamic setup which I
was able to produce a window with.
Yet the .exe functions if I supply it with .dlls. Thats silly.
you didn't read my message
Remove all the code used to loadSDL, it's not
Yet the .exe functions if I supply it with .dlls. Thats silly.
On Saturday, 24 April 2021 at 16:13:12 UTC, russhy wrote:
on windows, for static compilation you have to use "*.lib"
files, not "*.a"
also you are missing the
```
subConfigurations "bindbc-sdl" "staticBC"
```
So I have the lib files. It's failing with only an exit code. No
window is
On Saturday, 24 April 2021 at 16:10:13 UTC, Ishax wrote:
On Saturday, 24 April 2021 at 16:02:27 UTC, russhy wrote:
.a are object files for linux right?
Are they? I'm not very familiar with c++. I'm using windows.
For that matter I should mention I'm using dub in vscode.
send us your
On Saturday, 24 April 2021 at 16:02:27 UTC, russhy wrote:
.a are object files for linux right?
Are they? I'm not very familiar with c++. I'm using windows. For
that matter I should mention I'm using dub in vscode.
send us your dub.json file maybe some things are misconfigured?
```sdl
On Saturday, 24 April 2021 at 15:58:26 UTC, Ishax wrote:
I am trying to get graphics working in D. All seems well with
bindbc sdl, but I hit a nitpick: I prefer to be able to create
a standalone executable when possible. I cannot get bindbc to
be happy with sdl .a files. It's a small problem,
I am trying to get graphics working in D. All seems well with
bindbc sdl, but I hit a nitpick: I prefer to be able to create a
standalone executable when possible. I cannot get bindbc to be
happy with sdl .a files. It's a small problem, but if there's a
simple solution, I'm eager to hear it.
On Saturday, 24 April 2021 at 14:46:06 UTC, PinDPlugga wrote:
I didn't want to necropost, but I ran into the same behaviour
as in this post:
https://forum.dlang.org/post/yfybveovbknvvxmio...@forum.dlang.org
and was just curious to understand it better.
[...]
I didn't want to necropost, but I ran into the same behaviour as
in this post:
https://forum.dlang.org/post/yfybveovbknvvxmio...@forum.dlang.org
and was just curious to understand it better.
If I call readln() after having previously called readf(), it
does not behave as expected:
```d
import
24 matches
Mail list logo