On Monday, 23 March 2020 at 01:18:15 UTC, walker wrote:
Which function should I use when I read Chinese characters in
the terminal?
Terminal.getline *might* work in my lib, but if there's combining
codepoints I'm not sure. You can try it though and let me know if
you are already using the
On Sunday, 22 March 2020 at 16:12:34 UTC, Adam D. Ruppe wrote:
Thank you!
Your arsd.terminal is the first 3rd party module I used, which I
use to output colored text on the terminal preview on windows10.
I have tried your code above with both string and dstring, It
works! Really good!
On Sunday, 22 March 2020 at 15:53:29 UTC, Steven Schveighoffer
wrote:
On windows, the default codepage for the terminal is NOT UTF8.
Which means it may not know how to properly deal with your
output.
Most likely nim is making the terminal use the UTF8 codepage.
See more info here:
On Sunday, 15 March 2020 at 17:58:58 UTC, Steven Schveighoffer
wrote:
I want to try and learn how to write 2d games. I'd prefer to do
it with D.
I've found a ton of tutorials on learning 2d gaming with other
languages. Is there a place to look that uses D for learning?
Should I just start
On 3/22/20 2:43 PM, realhet wrote:
Hello,
I'm try to use the latest LDC2 version: 1.20.0
Previously I used 1.6.0
After fixing all the compiler errors and warnings, I managed to compile
all the d source files to obj files, and I got 4 linking errors. I think
all of them caused by the first 2:
On 3/22/20 3:04 PM, Dennis wrote:
On Sunday, 22 March 2020 at 18:48:32 UTC, Abby wrote:
Is there a way to create a template that would do the same is glib
g_return_val_if_fail()
(https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail)
I'm not
On Sunday, 22 March 2020 at 19:04:40 UTC, Mike Parker wrote:
```
T returnValIfFail(T)(bool expr, T val) {
if(expr) return val;
else assert(0);
}
```
Heh, of course, as Dennis pointed out, that's essentialy
assert(expr).
```
assert(expr);
x = val;
```
On Sunday, 22 March 2020 at 18:48:32 UTC, Abby wrote:
Is there a way to create a template that would do the same is
glib
g_return_val_if_fail()
(https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail)
I was hoping something like this would work
On Sunday, 22 March 2020 at 18:48:32 UTC, Abby wrote:
Is there a way to create a template that would do the same is
glib
g_return_val_if_fail()
(https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail)
I'm not famililar with glib, but the description:
Is there a way to create a template that would do the same is glib
g_return_val_if_fail()
(https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail)
I was hoping something like this would work
template returnValIfFail(alias expr, alias val)
{
Hello,
I'm try to use the latest LDC2 version: 1.20.0
Previously I used 1.6.0
After fixing all the compiler errors and warnings, I managed to
compile all the d source files to obj files, and I got 4 linking
errors. I think all of them caused by the first 2:
1:
msvcrt.lib(initializers.obj) :
On Sunday, 22 March 2020 at 15:19:13 UTC, walker wrote:
writeln(var1);
writeln calls the wrong function for the Windows console.
You can kinda hack it by changing the code page like Steven said
(which has other bugs though, but works for many cases), or you
can call the correct function -
On 3/22/20 11:19 AM, walker wrote:
I am new to dlang, I like it :)
I am on windows10 and use the terminal preview to test and run programs.
In order to print Chinese characters correctly, I always use
void main()
{
string var1 = "你好"; # to!string(in_other_conditions)
writeln(var1);
}
I tried
I am new to dlang, I like it :)
I am on windows10 and use the terminal preview to test and run
programs.
In order to print Chinese characters correctly, I always use
void main()
{
string var1 = "你好"; # to!string(in_other_conditions)
writeln(var1);
}
I tried dstring but not working. Need Help
On Sunday, 22 March 2020 at 07:59:01 UTC, rikki cattermole wrote:
On 22/03/2020 8:57 PM, mark wrote:
I have a module with a unittest { ... } block. However, when I
run dub test sometimes I want to output some extra data when
the test runs. At the moment I control this by using an
environment
I have a module with a unittest { ... } block. However, when I
run dub test sometimes I want to output some extra data when the
test runs. At the moment I control this by using an environment
variable, but I wondered if it was possible to pass a command
line argument 'dub test myarg' and if so
On 22/03/2020 8:57 PM, mark wrote:
I have a module with a unittest { ... } block. However, when I run dub
test sometimes I want to output some extra data when the test runs. At
the moment I control this by using an environment variable, but I
wondered if it was possible to pass a command line
17 matches
Mail list logo